libglademm connect_clicked patch



Hi.

Sorry if this is the wrong spot for this post.  It looks like the gnomemm list is deprecated.  I have added support for Gtk::ToolButton widgets in the connect_clicked function in the Gnome::Glade::Xml class.  I created a patch based on the svn trunk.  Seems to work fine for me.  Can you confirm it works and possibly add to the next release?

Thanks,

dave

--- libglade/src/xml.ccg        (revision 1074)
+++ libglade/src/xml.ccg        (working copy)
@@ -20,6 +20,7 @@
 #include <glade/glade-xml.h>
 #include <gtkmm/button.h>
 #include <gtkmm/menuitem.h>
+#include <gtkmm/toolbutton.h>
 
 namespace Gnome
 {
@@ -188,12 +189,16 @@
 
   Gtk::Button* pButton = dynamic_cast<Gtk::Button*>(pWidget);
   Gtk::MenuItem* pMenuItem = dynamic_cast<Gtk::MenuItem*>(pWidget);
+  Gtk::ToolButton* pToolButton = dynamic_cast<Gtk::ToolButton*>(pWidget);
 
   if(pButton)
     pButton->signal_clicked().connect( slot_);
 
   if(pMenuItem)
     pMenuItem->signal_activate().connect( slot_ );
+
+  if(pToolButton)
+    pToolButton->signal_clicked().connect( slot_ );
 }
 
 } // namespace Glade



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