Public bug reported:
Hello, I have a problem with the libappindicator3 and GTK3. It's maybe a bug.
I set up synchronization for a gtk_check_menu_item. It works.
Then I set up synchronisation for two GTK_RADIO_MENU_ITEM in a same group. But
it doesn't work properly.
When I change the selected item, the group is changed, but GSettings doesn't
get the new value.
When I change the value using the GTK interface which propose the whole set of
options for this software, or using dconf-editor, the active
GTK_RADIO_MENU_ITEM of the group is changed.
In a nutshell, we can say that in my code, G_SETTINGS_BIND_DEFAULT works well
for the checkbox, but for the radio_menu_item, it works like
G_SETTINGS_BIND_GET.
I tried to replace it with G_SETTINGS_BIND_SET|G_SETTINGS_BIND_GET but I got
the same result so the #define is right.
Here a part of my code with the bindings between GSettings and the
widgets (not actual code, but easier than the newer one so I give you
this one) :
menu = gtk_menu_new ();
/* Live Wallpaper checkbutton */
ctl = gtk_check_menu_item_new_with_label (_("LiveWallpaper"));
g_settings_bind ( g_settings_new ("apps.livewallpapers.livewallpaper"),
"active", ctl, "active",
G_SETTINGS_BIND_DEFAULT);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), ctl);
/* Separator */
gtk_menu_shell_append ( GTK_MENU_SHELL (menu),
gtk_separator_menu_item_new ());
/* Galaxy Plugins */
ctl = gtk_radio_menu_item_new_with_label (group, _("Galaxy"));
g_settings_bind ( g_settings_new
("apps.livewallpapers.galaxy"),
"active", ctl, "active",
G_SETTINGS_BIND_DEFAULT);
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM
(ctl));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), ctl);
/* Nexus Plugins */
ctl = gtk_radio_menu_item_new_with_label (group, _("Nexus"));
g_settings_bind ( g_settings_new ("apps.livewallpapers.nexus"),
"active", ctl, "active",
G_SETTINGS_BIND_DEFAULT);
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM
(ctl));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), ctl);
Thank you for helping me.
Yours faithfully.
** Affects: libappindicator (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1024811
Title:
GSettings bindings works properly with GtkCheckMenuItem but get
unidirectional binding for GtkRadioMenuItem
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libappindicator/+bug/1024811/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs