Code

convert almost all libnrtype to Geom::
[inkscape.git] / src / ui / dialog / panel-dialog.h
index 3eeea6d95c27ad37cf22b2cf6de77bc35c6ec469..eebd323d6a54ed6ff252c5fd4295ad68de1e7fa2 100644 (file)
@@ -71,9 +71,11 @@ public:
     template <typename T>
     static PanelDialog<Behavior> *create();
 
-    virtual void present() { Dialog::present(); }
+    inline virtual void present();
 
 private:
+    inline void _presentDialog();
+
     PanelDialog();  // no constructor without params
     PanelDialog(PanelDialog<Behavior> const &d);                      // no copy
     PanelDialog<Behavior>& operator=(PanelDialog<Behavior> const &d); // no assign
@@ -93,7 +95,7 @@ public:
     template <typename T>
     static PanelDialog<Behavior::FloatingBehavior> *create();
 
-    virtual void present() { Dialog::present(); }
+    inline virtual void present();
 
 private:
     PanelDialog();  // no constructor without params
@@ -134,7 +136,7 @@ PanelDialog<B>::PanelDialog(Panel &panel, char const *prefs_path, int const verb
 {
     Gtk::VBox *vbox = get_vbox();
     _panel.signalResponse().connect(sigc::mem_fun(*this, &PanelDialog::_handleResponse));
-    _panel.signalPresent().connect(sigc::mem_fun(*this, &PanelDialog::present));
+    _panel.signalPresent().connect(sigc::mem_fun(*this, &PanelDialog::_presentDialog));
 
     vbox->pack_start(_panel, true, true, 0);
 
@@ -165,6 +167,19 @@ PanelDialog<B>::create()
     return new PanelDialog<B>(panel, panel.getPrefsPath(), panel.getVerb(), panel.getApplyLabel());
 }
 
+template <typename B>
+void
+PanelDialog<B>::present()
+{
+    _panel.present(); 
+}
+
+template <typename B>
+void
+PanelDialog<B>::_presentDialog()
+{
+    Dialog::present(); 
+}
 
 PanelDialog<Behavior::FloatingBehavior>::PanelDialog(Panel &panel, char const *prefs_path,
                                                      int const verb_num, Glib::ustring const &apply_label) :
@@ -173,7 +188,6 @@ PanelDialog<Behavior::FloatingBehavior>::PanelDialog(Panel &panel, char const *p
 {
     Gtk::VBox *vbox = get_vbox();
     _panel.signalResponse().connect(sigc::mem_fun(*this, &PanelDialog::_handleResponse));
-    _panel.signalPresent().connect(sigc::mem_fun(*this, &PanelDialog::present));
 
     vbox->pack_start(_panel, true, true, 0);
 
@@ -196,6 +210,13 @@ PanelDialog<Behavior::FloatingBehavior>::PanelDialog(Panel &panel, char const *p
     show_all_children();
 }
 
+void
+PanelDialog<Behavior::FloatingBehavior>::present()
+{ 
+    Dialog::present();
+    _panel.present();
+}
+
 /**
  * Specialize factory method for panel dialogs with floating behavior in order to make them work as
  * singletons, i.e. allow them track the current active desktop.