pantheon.elementary-calendar: switch to merged patch
This commit is contained in:
parent
af4a69ffff
commit
cf1e358e04
2 changed files with 6 additions and 60 deletions
|
@ -41,9 +41,12 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-xatxoSwAIHiUA03vvBdM8HSW27vhPLvAxEuGK0gLiio=";
|
sha256 = "sha256-xatxoSwAIHiUA03vvBdM8HSW27vhPLvAxEuGK0gLiio=";
|
||||||
})
|
})
|
||||||
|
|
||||||
# Workaround for showing date numbers (TODO: should try to fix upstream)
|
# GridDay: Fix day in month in grid with GLib 2.73.1+
|
||||||
# https://github.com/elementary/calendar/issues/756#issuecomment-1252400047
|
# https://github.com/elementary/calendar/pull/763
|
||||||
./partly-revert-pr-301.patch
|
(fetchpatch {
|
||||||
|
url = "https://github.com/elementary/calendar/commit/20b0983c85935bedef065b786ec8bbca55ba7d9e.patch";
|
||||||
|
sha256 = "sha256-Tw9uNqqRAC+vOp7EWzZVeDmZxt3hTGl9UIP21FcunqA=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
diff --git a/src/Grid/Grid.vala b/src/Grid/Grid.vala
|
|
||||||
index 61706fc8..9b69fc14 100644
|
|
||||||
--- a/src/Grid/Grid.vala
|
|
||||||
+++ b/src/Grid/Grid.vala
|
|
||||||
@@ -215,7 +215,7 @@ public class Grid : Gtk.Grid {
|
|
||||||
|
|
||||||
day.in_current_month = new_date.get_month () == month_start.get_month ();
|
|
||||||
|
|
||||||
- day.date = new_date;
|
|
||||||
+ day.update_date (new_date);
|
|
||||||
return day;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/Grid/GridDay.vala b/src/Grid/GridDay.vala
|
|
||||||
index 3e59cb7b..df04fe6f 100644
|
|
||||||
--- a/src/Grid/GridDay.vala
|
|
||||||
+++ b/src/Grid/GridDay.vala
|
|
||||||
@@ -35,6 +35,7 @@ public class Maya.View.GridDay : Gtk.EventBox {
|
|
||||||
public bool draw_left_border = true;
|
|
||||||
private VAutoHider event_box;
|
|
||||||
private GLib.HashTable<string, EventButton> event_buttons;
|
|
||||||
+ Gtk.Label label;
|
|
||||||
|
|
||||||
public bool in_current_month {
|
|
||||||
set {
|
|
||||||
@@ -79,7 +80,7 @@ public class Maya.View.GridDay : Gtk.EventBox {
|
|
||||||
style_context.add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
style_context.add_class ("cell");
|
|
||||||
|
|
||||||
- var label = new Gtk.Label ("");
|
|
||||||
+ label = new Gtk.Label ("");
|
|
||||||
label.halign = Gtk.Align.END;
|
|
||||||
label.get_style_context ().add_provider (style_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
label.margin = EVENT_MARGIN;
|
|
||||||
@@ -100,10 +101,6 @@ public class Maya.View.GridDay : Gtk.EventBox {
|
|
||||||
|
|
||||||
Gtk.TargetEntry dnd = {"binary/calendar", 0, 0};
|
|
||||||
Gtk.drag_dest_set (this, Gtk.DestDefaults.MOTION, {dnd}, Gdk.DragAction.MOVE);
|
|
||||||
-
|
|
||||||
- this.notify["date"].connect (() => {
|
|
||||||
- label.label = date.get_day_of_month ().to_string ();
|
|
||||||
- });
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool drag_drop (Gdk.DragContext context, int x, int y, uint time_) {
|
|
||||||
@@ -174,6 +171,11 @@ public class Maya.View.GridDay : Gtk.EventBox {
|
|
||||||
event_buttons.remove_all ();
|
|
||||||
}
|
|
||||||
|
|
||||||
+ public void update_date (DateTime date) {
|
|
||||||
+ this.date = date;
|
|
||||||
+ label.label = date.get_day_of_month ().to_string ();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
public void set_selected (bool selected) {
|
|
||||||
if (selected) {
|
|
||||||
set_state_flags (Gtk.StateFlags.SELECTED, true);
|
|
Loading…
Reference in a new issue