aboutsummaryrefslogtreecommitdiff
path: root/lib/source.vala
diff options
context:
space:
mode:
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;
}
}