From 56f4ce37cd52817a5fcba360dc5eec23d81656f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 8 Sep 2017 12:13:48 +0200 Subject: dateMenu: Adjust to GWeather IAPI change It's not exactly clear what changed - gobject-introspection, gjs - but the newly added gweather_condition_to_string_full() API no longer works like it used to. The replacement code does look more idiomatic anyway, so just fix the code without investigating the reason of the breakage. https://bugzilla.gnome.org/show_bug.cgi?id=787423 --- js/ui/dateMenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 18f2f0e..0054f2d 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -237,12 +237,12 @@ var WeatherSection = new Lang.Class({ let options = capitalize ? GWeather.FormatOptions.SENTENCE_CAPITALIZATION : GWeather.FormatOptions.NO_CAPITALIZATION; - let [ok, phenom, qualifier] = info.get_value_conditions(); + let [ok, phenomenon, qualifier] = info.get_value_conditions(); if (ok) - return GWeather.conditions_to_string_full(phenom, qualifier, options); + return new GWeather.Conditions({ phenomenon, qualifier}).to_string_full(options); let [, sky] = info.get_value_sky(); - return GWeather.sky_to_string_full(sky, options); + return GWeather.Sky.to_string_full(sky, options); }, _sameSummary: function(info1, info2) { -- cgit v0.12 From bddc2c0016878c8eb629d6d4b7c0f2f38353377a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 12 Sep 2017 12:33:37 +0200 Subject: dateMenu: Use icon for message indicator Using a unicode character here means it may look quite different from the intended style (for instance with emoji fonts). Avoid this by providing a custom icon and use that instead. https://bugzilla.gnome.org/show_bug.cgi?id=766368 --- data/gnome-shell-theme.gresource.xml | 1 + data/theme/message-indicator-symbolic.svg | 40 +++++++++++++++++++++++++++++++ js/ui/dateMenu.js | 6 +++-- js/ui/main.js | 1 + 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 data/theme/message-indicator-symbolic.svg diff --git a/data/gnome-shell-theme.gresource.xml b/data/gnome-shell-theme.gresource.xml index 25769a4..896a1e2 100644 --- a/data/gnome-shell-theme.gresource.xml +++ b/data/gnome-shell-theme.gresource.xml @@ -18,6 +18,7 @@ gnome-shell.css gnome-shell-high-contrast.css logged-in-indicator.svg + message-indicator-symbolic.svg no-events.svg no-notifications.svg noise-texture.png diff --git a/data/theme/message-indicator-symbolic.svg b/data/theme/message-indicator-symbolic.svg new file mode 100644 index 0000000..257a984 --- /dev/null +++ b/data/theme/message-indicator-symbolic.svg @@ -0,0 +1,40 @@ + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 0054f2d..0aad37e 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -337,8 +337,10 @@ var MessagesIndicator = new Lang.Class({ Name: 'MessagesIndicator', _init: function() { - this.actor = new St.Label({ text: '⚫', visible: false, y_expand: true, - y_align: Clutter.ActorAlign.CENTER }); + this.actor = new St.Icon({ icon_name: 'message-indicator-symbolic', + icon_size: 16, + visible: false, y_expand: true, + y_align: Clutter.ActorAlign.CENTER }); this._sources = []; diff --git a/js/ui/main.js b/js/ui/main.js index 85dbe1f..e981db9 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -122,6 +122,7 @@ function start() { sessionMode.connect('updated', _sessionUpdated); Gtk.Settings.get_default().connect('notify::gtk-theme-name', _loadDefaultStylesheet); + Gtk.IconTheme.get_default().add_resource_path('/org/gnome/shell/theme/icons'); _initializeUI(); shellAccessDialogDBusService = new AccessDialog.AccessDialogDBus(); -- cgit v0.12