aboutsummaryrefslogtreecommitdiff
path: root/lib/source.vala
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2014-02-27 19:37:55 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-02-27 19:37:55 +0000
commit89d447d27b925b3c10593840440b8e1a8ab70e18 (patch)
treefda82ef05a2c7acfef9baff8f4a1dda12ee7bf4f /lib/source.vala
parent7b3c032fa7e4f42b5fe4a3dc3b3409ecbf7baf2e (diff)
parentc68445a226bf38411a7baa7ea5a82890fbb4bba1 (diff)
downloadayatana-indicator-keyboard-89d447d27b925b3c10593840440b8e1a8ab70e18.tar.gz
ayatana-indicator-keyboard-89d447d27b925b3c10593840440b8e1a8ab70e18.tar.bz2
ayatana-indicator-keyboard-89d447d27b925b3c10593840440b8e1a8ab70e18.zip
Update icons when icon theme changes. Fixes: 1237749
Diffstat (limited to 'lib/source.vala')
-rw-r--r--lib/source.vala13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/source.vala b/lib/source.vala
index 1ee2650a..5fe7157d 100644
--- a/lib/source.vala
+++ b/lib/source.vala
@@ -51,7 +51,7 @@ public class Indicator.Keyboard.Source : Object {
public Icon? icon {
get { if (_icon == null) { _icon = _get_icon (); } return _icon; }
- private set { _icon = value; }
+ set { _icon = value; }
}
public uint subscript {
@@ -424,16 +424,7 @@ public class Indicator.Keyboard.Source : Object {
Gtk.IconInfo? icon_info = icon_theme.lookup_icon (icon_name, 22, 0);
if (icon_info != null) {
- string? file_name = ((!) icon_info).get_filename ();
- var has_file_name = file_name != null && ((!) file_name).get_char () != '\0';
-
- if (has_file_name) {
- try {
- icon = Icon.new_for_string ((!) file_name);
- } catch (Error error) {
- warning ("error: %s", error.message);
- }
- }
+ icon = new ThemedIcon (icon_name);
}
} else {
icon = new ThemedIcon (icon_name);