Fix 1797745: show the correct SVN revision id in the about dialog
[synfig.git] / synfig-studio / trunk / src / gtkmm / dockbook.cpp
index a7470f9..5d1a460 100644 (file)
@@ -38,6 +38,8 @@
 #include <gtkmm/eventbox.h>
 #include <gtkmm/menu.h>
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -79,9 +81,7 @@ void
 DockBook::clear()
 {
        while(get_n_pages())
-       {
                remove(static_cast<Dockable&>(*get_nth_page(get_n_pages()-1)));
-       }
 }
 
 void
@@ -240,6 +240,7 @@ DockBook::tab_button_pressed(GdkEventButton* event, Dockable* dockable)
                return false;
 
        Gtk::Menu *tabmenu=manage(new class Gtk::Menu());
+       tabmenu->signal_hide().connect(sigc::bind(sigc::ptr_fun(&delete_widget), tabmenu));
 
        tabmenu->items().push_back(
                Gtk::Menu_Helpers::StockMenuElem(Gtk::StockID("gtk-close"),