aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/main.vala27
1 files changed, 3 insertions, 24 deletions
diff --git a/lib/main.vala b/lib/main.vala
index 52f7ab8b..aa1bb8e3 100644
--- a/lib/main.vala
+++ b/lib/main.vala
@@ -64,7 +64,6 @@ public class Indicator.Keyboard.Service : Object {
context.close_path ();
context.set_source_rgba (colour.red, colour.green, colour.blue, colour.alpha);
- context.set_source_rgba (1.0, 0.0, 0.0, 1.0);
context.fill ();
context.set_operator (Cairo.Operator.CLEAR);
@@ -139,26 +138,16 @@ public class Indicator.Keyboard.Service : Object {
action.activate.connect (this.handle_activate_settings);
group.insert (action);
- action = new SimpleAction ("foo", null);
- action.activate.connect (this.handle_activate_foo);
- group.insert (action);
-
return group;
}
[DBus (visible = false)]
private void update_indicator_action () {
var current = this.settings.get_uint ("current");
- Variant array;
- this.settings.get ("sources", "@a(ss)", out array);
-
- if (current < array.n_children ()) {
- string type;
- string name;
+ var icon = get_icon (current);
- array.get_child (current, "(ss)", out type, out name);
-
- var state = new Variant.parsed ("(%s, '', '', true)", name);
+ if (icon != null) {
+ var state = new Variant.parsed ("('', %s, '', true)", icon.to_string ());
get_indicator_action ().set_state (state);
}
}
@@ -195,7 +184,6 @@ public class Indicator.Keyboard.Service : Object {
section.append ("Character Map", "indicator.map");
section.append ("Keyboard Layout Chart", "indicator.chart");
section.append ("Text Entry Settings...", "indicator.settings");
- section.append ("foo", "indicator.foo");
submenu.append_section (null, section);
var indicator = new MenuItem.submenu ("x", submenu);
@@ -346,15 +334,6 @@ public class Indicator.Keyboard.Service : Object {
}
[DBus (visible = false)]
- private void handle_activate_foo (Variant? parameter) {
- var window = new Gtk.Window ();
-
- window.add (new Gtk.Image.from_gicon (create_icon ("US"), Gtk.IconSize.INVALID));
-
- window.show_all ();
- }
-
- [DBus (visible = false)]
private void handle_bus_acquired (DBusConnection connection, string name) {
try {
connection.export_action_group ("/com/canonical/indicator/keyboard", get_action_group ());