Codebase list gnome-shell-extension-appindicator / 171ae57
testTool: Add test to show a changing label Marco Trevisan (TreviƱo) 4 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
107107 })
108108 menu.append(item);
109109
110 item = Gtk.MenuItem.new_with_label("Autodestroy Label");
111 item.connect('activate', () => {
112 let i = 30;
113 GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 1, () => {
114 indicator.set_label(i > 0 ? `Label timeout ${i--}` : '', '');
115 return (i >= 0);
116 });
117 })
118 menu.append(item);
119
110120 item = Gtk.MenuItem.new_with_label("Toggle Attention");
111121 item.connect('activate', (item) => {
112122 indicator.set_status(indicator.get_status() != AppIndicator.IndicatorStatus.ATTENTION ?