[gtkmm-documentation] TreeView Popup example: Make sure the menu items are shown.



commit d6ae14758711d1c421d917b52ba02db1f5e009c4
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Sun Sep 11 16:25:38 2011 +0200

    TreeView Popup example: Make sure the menu items are shown.
    
    * examples/book/treeview/popup/treeview_withpopup.cc: Add a call to
    m_Menu_Popup.show_all(). Bug #658265.

 ChangeLog                                          |    7 +++++++
 examples/book/treeview/popup/treeview_withpopup.cc |    7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8e75d82..8e5ef22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-11  Kjell Ahlstedt <kjell ahlstedt bredband net>
+
+	TreeView Popup example: Make sure the menu items are shown.
+
+	* examples/book/treeview/popup/treeview_withpopup.cc: Add a call to
+	m_Menu_Popup.show_all(). Bug #658265.
+
 2011-09-07  Kjell Ahlstedt <kjell ahlstedt bredband net>
 
 	Label and ProgressBar examples: Fix text. Fix orientation of a Box.
diff --git a/examples/book/treeview/popup/treeview_withpopup.cc b/examples/book/treeview/popup/treeview_withpopup.cc
index 79acfed..f89c15d 100644
--- a/examples/book/treeview/popup/treeview_withpopup.cc
+++ b/examples/book/treeview/popup/treeview_withpopup.cc
@@ -43,22 +43,23 @@ TreeView_WithPopup::TreeView_WithPopup()
   append_column("Name", m_Columns.m_col_name);
 
   //Fill popup menu:
-  Gtk::MenuItem* item = Gtk::manage(new Gtk::MenuItem("_Edit"));
+  Gtk::MenuItem* item = Gtk::manage(new Gtk::MenuItem("_Edit", true));
   item->signal_activate().connect(
     sigc::mem_fun(*this, &TreeView_WithPopup::on_menu_file_popup_generic) );
   m_Menu_Popup.append(*item);
     
-  item = Gtk::manage(new Gtk::MenuItem("_Process"));
+  item = Gtk::manage(new Gtk::MenuItem("_Process", true));
   item->signal_activate().connect(
     sigc::mem_fun(*this, &TreeView_WithPopup::on_menu_file_popup_generic) );
   m_Menu_Popup.append(*item);
     
-  item = Gtk::manage(new Gtk::MenuItem("_Remove"));
+  item = Gtk::manage(new Gtk::MenuItem("_Remove", true));
   item->signal_activate().connect(
     sigc::mem_fun(*this, &TreeView_WithPopup::on_menu_file_popup_generic) );
   m_Menu_Popup.append(*item);
 
   m_Menu_Popup.accelerate(*this);
+  m_Menu_Popup.show_all(); //Show all menu items when the menu pops up
 
 #ifndef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
   signal_button_press_event()



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