aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-20 23:48:12 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-20 23:48:12 +0200
commit123a23fbae9777f9366cf0b6d70578e57c99938a (patch)
treef4caa34cf69c70518549d7753e06b4025c2b00b7
parentd297788f86ff97eaa21c04c8878f358aed6ed989 (diff)
downloadarctica-greeter-123a23fbae9777f9366cf0b6d70578e57c99938a.tar.gz
arctica-greeter-123a23fbae9777f9366cf0b6d70578e57c99938a.tar.bz2
arctica-greeter-123a23fbae9777f9366cf0b6d70578e57c99938a.zip
src/menubar.vala: Disable all indicators in test mode.
-rw-r--r--src/menubar.vala40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/menubar.vala b/src/menubar.vala
index 8dbf3a9..3b25791 100644
--- a/src/menubar.vala
+++ b/src/menubar.vala
@@ -106,7 +106,8 @@ public class MenuBar : Gtk.MenuBar
*/
public void set_keyboard_state ()
{
- onscreen_keyboard_item.set_active (AGSettings.get_boolean (AGSettings.KEY_ONSCREEN_KEYBOARD));
+ if (!ArcticaGreeter.singleton.test_mode)
+ onscreen_keyboard_item.set_active (AGSettings.get_boolean (AGSettings.KEY_ONSCREEN_KEYBOARD));
}
private string default_theme_name;
@@ -286,25 +287,28 @@ public class MenuBar : Gtk.MenuBar
private void load_indicator (string indicator_name)
{
- if (indicator_name == "ug-accessibility")
+ if (!ArcticaGreeter.singleton.test_mode)
{
- var a11y_item = make_a11y_indicator ();
- insert (a11y_item, (int) get_children ().length () - 1);
- }
- else
- {
- var io = load_indicator_file (indicator_name);
-
- if (io == null)
- io = load_indicator_library (indicator_name);
-
- if (io != null)
+ if (indicator_name == "ug-accessibility")
+ {
+ var a11y_item = make_a11y_indicator ();
+ insert (a11y_item, (int) get_children ().length () - 1);
+ }
+ else
{
- indicator_objects.append (io);
- io.entry_added.connect (indicator_added_cb);
- io.entry_removed.connect (indicator_removed_cb);
- foreach (var entry in io.get_entries ())
- indicator_added_cb (io, entry);
+ var io = load_indicator_file (indicator_name);
+
+ if (io == null)
+ io = load_indicator_library (indicator_name);
+
+ if (io != null)
+ {
+ indicator_objects.append (io);
+ io.entry_added.connect (indicator_added_cb);
+ io.entry_removed.connect (indicator_removed_cb);
+ foreach (var entry in io.get_entries ())
+ indicator_added_cb (io, entry);
+ }
}
}
}