testTool: Add test to show a changing label
Marco Trevisan (TreviƱo)
4 years ago
107 | 107 | }) |
108 | 108 | menu.append(item); |
109 | 109 | |
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 | ||
110 | 120 | item = Gtk.MenuItem.new_with_label("Toggle Attention"); |
111 | 121 | item.connect('activate', (item) => { |
112 | 122 | indicator.set_status(indicator.get_status() != AppIndicator.IndicatorStatus.ATTENTION ? |