Comment 40 for bug 826771

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

What I did is just a workaround, here is what I can suggest instead of destroying the widget (I didn't test any of these so I'm not sure it will work):

- insert menu to proxy only on "good" sessions, like that:
  if (proxy != NULL && (desktop_session == NULL || g_str_has_prefix(desktop_session, "ubuntu")) {
       ubuntu_menu_proxy_insert(proxy, GTK_WIDGET(window), NAUTILUS_WINDOW(window)->details->menubar, 0);
  }
- set $UBUNTU_MENUPROXY only on "good" sessions, so that it won't be set in Gnome Shell/Fallback
- find out why appmenu(-gtk) draws that menu (probably it can't find a dbus listener so falls back to just drawing it) and make it looking at whether the original menubar before drawing it

Also, we can use the method described at https://wiki.ubuntu.com/MenuBar#Advertising_the_presence_of_the_menu_bar instead of checking $DESKTOP_SESSION, but this will work only if Unity/Appmenu starts before Nautilus.

You can disable the old fix while I'll be looking at this.