summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby Rong <rjl931189261@126.com>2022-09-21 13:39:42 +0800
committerBobby Rong <rjl931189261@126.com>2022-09-23 20:48:27 +0800
commit67e5af9bbad6e0ae76d231e03eb186e93321b93d (patch)
treec6b07e29e66401786b8115038d9cef2e349dcd3b
parentpantheon.elementary-calendar: Fix build with evolution-data-server 3.46 (diff)
downloadnixpkgs-67e5af9bbad6e0ae76d231e03eb186e93321b93d.tar.gz
pantheon.wingpanel-indicator-datetime: Workaround for showing date numbers
-rw-r--r--pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix4
-rw-r--r--pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/partly-revert-pr-150.patch40
2 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix
index 3f7408d9dff3..c884dd2d247d 100644
--- a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix
+++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/default.nix
@@ -37,6 +37,10 @@ stdenv.mkDerivation rec {
src = ./fix-paths.patch;
elementary_calendar = elementary-calendar;
})
+
+ # Workaround for showing date numbers (TODO: should try to fix upstream)
+ # https://github.com/elementary/calendar/issues/756#issuecomment-1252400047
+ ./partly-revert-pr-150.patch
];
nativeBuildInputs = [
diff --git a/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/partly-revert-pr-150.patch b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/partly-revert-pr-150.patch
new file mode 100644
index 000000000000..766c1dda29f7
--- /dev/null
+++ b/pkgs/desktops/pantheon/desktop/wingpanel-indicators/datetime/partly-revert-pr-150.patch
@@ -0,0 +1,40 @@
+diff --git a/src/Widgets/calendar/Grid.vala b/src/Widgets/calendar/Grid.vala
+index e440306..21a631a 100644
+--- a/src/Widgets/calendar/Grid.vala
++++ b/src/Widgets/calendar/Grid.vala
+@@ -229,7 +229,7 @@ namespace DateTime.Widgets {
+ day.sensitive_container (false);
+ }
+
+- day.date = new_date;
++ day.update_date (new_date);
+
+ return day;
+ }
+diff --git a/src/Widgets/calendar/GridDay.vala b/src/Widgets/calendar/GridDay.vala
+index 8602875..7bd6140 100644
+--- a/src/Widgets/calendar/GridDay.vala
++++ b/src/Widgets/calendar/GridDay.vala
+@@ -79,10 +79,6 @@ public class DateTime.Widgets.GridDay : Gtk.EventBox {
+ button_press_event.connect (on_button_press);
+ key_press_event.connect (on_key_press);
+
+- notify["date"].connect (() => {
+- label.label = date.get_day_of_month ().to_string ();
+- });
+-
+ component_dots = new Gee.HashMap<string, Gtk.Widget> ();
+ }
+
+@@ -124,6 +120,11 @@ public class DateTime.Widgets.GridDay : Gtk.EventBox {
+ }
+ }
+
++ public void update_date (GLib.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);