Re: GtkAccelLabel on GtkNotebook popup menu
| From: | Scott Mattocks | Date: | Fri, 05 May 2006 12:39:47 +0000 |
| Subject: | Re: GtkAccelLabel on GtkNotebook popup menu | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6906@lists.php.net to get a copy of this message | ||
Christian Weiske wrote:
What is the most easy way to get GtkAccelLabels with working accelerators on the popup menu of a GtkNotebook? I can use $notebook->append_page_menu($content, new GtkLabel('bla'), $accellabel); to set the accelerator label. Now I need to add the accelerator: $al->add_accelerator('activate', $accgrp, Gdk::KEY_S, Gdk::CONTROL_MASK, Gtk::ACCEL_VISIBLE ); $al->set_accel_widget($lbl); The problem here is that there is no "activate" method on the gtknotebook's label, nor does gtknotebook has a activate signal that could be used.Then don't use the activate signal. Use the "select-page" signal or something else and then make sure to set the accelerator widget. $al->add_accelerator('select-page', $accgrp, ...); $al->set_accel_widget($notebook); -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com