Codebase list gnome-shell-extension-appindicator / 2d72bfc
DBusMenu: prevent crashing when the client is destroyed with an open menu Yes, this can happen; The test tool gained a way to provoke it. Jonas Kümmerlin 8 years ago
2 changed file(s) with 18 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
395395 },
396396
397397 send_event: function(id, event, params, timestamp) {
398 if (!this._proxy)
399 return
400
398401 this._proxy.EventRemote(id, event, params, timestamp, function(result, error) { /* we don't care */ })
399402 },
400403
580583 this._dbusItem.handle_event("opened", null, 0)
581584 this._dbusItem.send_about_to_show()
582585 } else {
586 if (NEED_NESTED_SUBMENU_FIX) {
587 // close our own submenus
588 if (menu._openedSubMenu)
589 menu._openedSubMenu.close(false)
590 }
591
583592 this._dbusItem.handle_event("closed", null, 0)
584593 }
585594 },
120120 });
121121 menu.append(item);
122122
123 item = Gtk.MenuItem.new_with_label("Close in 5 seconds");
124 item.connect('activate', function() {
125 GLib.timeout_add(0, 5000, function() {
126 app.quit();
127 return false;
128 });
129 });
130 menu.append(item);
131
123132 menu.show_all();
124133
125134 var indicator = AppIndicator.Indicator.new("Hello", "indicator-test", AppIndicator.IndicatorCategory.APPLICATION_STATUS);