https://bugzilla.gnome.org/show_bug.cgi?id=784188

--- Comment #5 from Lester Carballo <lestc...@gmail.com> ---
I don't want to spam gtk more with more things.

In short,  I changed the way of how unity-gtk-module is working to be adapted
of what i think Gtk apparently is waiting for. So, i'm using now:

gtk_application_set_menubar

instead of try to publish by myself the menu over Dbus. This have the
inconvenient of only can be used from a GtkApplicationWindow and not from a
GtkWindow, but well something is better than nothing.

As a result, the menu bar is exported on DBus propertly, but several gnome
application are observing the Gtk.Setting of gtk-shell-shows-menubar and i can
not be able to set it.

I'm trying to set gtk-shell-shows-menubar from
org.gnome.settings-daemon.plugins.xsettings in the overrides value of it. I try
to set Gtk/ShellShowsMenubar to the value 1, but after that, i can not see any
effect when i execute:

g_object_get (settings, "gtk-shell-shows-menubar", &shell_shows_menubar, NULL);

The value of shell_shows_menubar variable is always FALSE, not matter what i
can try.

Also, i try to set it directly in the gtk module, resulting in a Core dump of
the whole app. So, in this code, the last line will ending in a core dump:

gtk_widget_shell_shows_menubar (GtkWidget *widget)
{
  g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);

  GtkSettings *settings = gtk_settings_get_default ();

  g_return_val_if_fail (GTK_IS_SETTINGS (settings), FALSE);

  GParamSpec *pspec = g_object_class_find_property (G_OBJECT_GET_CLASS
(settings), "gtk-shell-shows-menubar");

  g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), FALSE);

  g_return_val_if_fail (pspec->value_type == G_TYPE_BOOLEAN, FALSE);

  g_object_set (settings, "gtk-shell-shows-menubar", TRUE);
}

Also the same if i use:
  gtk_widget_get_settings (widget);

instead of:
  gtk_settings_get_default ();

So, then how Gtk.Settings this is working on Wayland? Probably relate with:
https://bugzilla.gnome.org/show_bug.cgi?id=790201

Apparently the property gtk-shell-shows-menubar exist, but can not be set.

lsb_release -a
LSB Version:   
core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID:    Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:    16.04
Codename:    xenial

dpkg -l libgtk2.0-0 libgtk-3-0
ii  libgtk-3-0:amd 3.20.8-1ubun amd64        GTK+ graphical user interface lib
ii  libgtk2.0-0:am 2.24.30-4ubu amd64        GTK+ graphical user interface lib

Thanks any way.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to