Get MenuElem by name ?
- From: "schmirrwurst free fr" <schmirrwurst free fr>
- To: gtkmm-list gnome org
- Subject: Get MenuElem by name ?
- Date: Thu, 22 Mar 2007 18:35:10 +0100
Hi,
I try to modify a program to add some features. I would like to add some
menu element...
Those elements are added that way :
menu_partition .items() .push_back(
Gtk::Menu_Helpers::MenuElem( _("manage flags"),
sigc::mem_fun( *this, &Win_GParted::activate_manage_flags ) ) );
So I've added my element with the same syntax
menu_partition .items() .push_back(
Gtk::Menu_Helpers::MenuElem( _("Make Image"),
sigc::mem_fun( *this, &Win_GParted::on_make_image ) ) );
The Problem is that it is not appearing, I guess I have to .show it, but
in the code, it is done later, and with an ID number, and I don't know
it :
menu_partition .items()[ installer_mode ? 9 : 10 ] .show() ;
Is there a way to .show the item by name ? like
menu_partition .items()["Make Image"] .show();
???
Other question, I'm pretty new in gtkmm, can somebody explain me what
the sentense "installer_mode ? 9 : 10" means ??
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]