GMenu items with detailed action names not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,


I am trying to add three items to a toolbar submenu, that when clicked should open the default browser with a particular url.


I came up with something like:


<?xml version="1.0"?>
<interface>
<menu id="menubar">
<section>
<submenu>
<attribute name="label">_Help</attribute>
<section>
<attribute name="id">help-section</attribute>
<item>
<attribute name="label">Visit site a</attribute>
<attribute name="action">app.help-url('https://a.com')</attribute>
</item>
<item>
<attribute name="label">Visit site b</attribute>
<attribute name="action">app.help-url('https://b.com')</attribute>
</item>
<item>
<attribute name="label">Visit site c</attribute>
<attribute name="action">app.help-url('https://c.com')</attribute>
</item>
</section>
</submenu>
</section>
</menu>
</interface>


In my GtkApplication derived class:

static GActionEntry app_entries[] = {
{"help-url", help_url_activated, "s", NULL, NULL},
};


This causes the items to be shown in the menu, but they are not sensitive (cannot be activated).

The real example is considerably more complicated and also contains menu items with actions that do not require a parameter: these all work fine.

I am using the latest versions of Gtk+3 and Glib, in case it matters...

No errors or warnings are being shown in the terminal.

Many thanks for your comments in advance,

Tom
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux