test tool: Allow the gjs-based tool to hide for some seconds
The PyKDE4 based one can do this basically since forever, but
PyKDE4 is not installed on my current machine, which at the
time of writing lacks working internet access.
Jonas Kümmerlin
8 years ago
107 | 107 | }) |
108 | 108 | menu.append(item); |
109 | 109 | |
110 | item = new Gtk.SeparatorMenuItem(); | |
111 | menu.append(item); | |
112 | ||
113 | item = Gtk.MenuItem.new_with_label("Hide for some time"); | |
114 | item.connect('activate', function() { | |
115 | indicator.set_status(AppIndicator.IndicatorStatus.PASSIVE); | |
116 | GLib.timeout_add(0, 5000, function() { | |
117 | indicator.set_status(AppIndicator.IndicatorStatus.ACTIVE); | |
118 | return false; | |
119 | }); | |
120 | }); | |
121 | menu.append(item); | |
122 | ||
110 | 123 | menu.show_all(); |
111 | 124 | |
112 | 125 | var indicator = AppIndicator.Indicator.new("Hello", "indicator-test", AppIndicator.IndicatorCategory.APPLICATION_STATUS); |