aboutsummaryrefslogtreecommitdiff
path: root/lib/source.vala
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2015-02-18 10:52:18 -0500
committerWilliam Hua <william.hua@canonical.com>2015-02-18 10:52:18 -0500
commita8721bcb87bef4c18e501cf559af35926d11c0eb (patch)
tree8c2e4ea57c465e0f89618ac46e11b745159476da /lib/source.vala
parent603fdf817fbecbc184853ca4a4a078a2e7072fde (diff)
downloadayatana-indicator-keyboard-a8721bcb87bef4c18e501cf559af35926d11c0eb.tar.gz
ayatana-indicator-keyboard-a8721bcb87bef4c18e501cf559af35926d11c0eb.tar.bz2
ayatana-indicator-keyboard-a8721bcb87bef4c18e501cf559af35926d11c0eb.zip
Remove (!) when possible.
Diffstat (limited to 'lib/source.vala')
-rw-r--r--lib/source.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/source.vala b/lib/source.vala
index f73b4b69..38a628c1 100644
--- a/lib/source.vala
+++ b/lib/source.vala
@@ -335,12 +335,14 @@ public class Indicator.Keyboard.Source : Object {
Gdk.Screen? screen = Gdk.Screen.get_default ();
if (screen != null) {
- context = new Gtk.StyleContext ();
- ((!) context).set_screen ((!) screen);
+ var style_context = new Gtk.StyleContext ();
+ style_context.set_screen ((!) screen);
var path = new Gtk.WidgetPath ();
path.append_type (typeof (Gtk.MenuItem));
- ((!) context).set_path (path);
+ style_context.set_path (path);
+
+ context = style_context;
}
}