Code

fix for crash bug 607557
[inkscape.git] / src / ui / dialog / fill-and-stroke.h
index f0d68ced8cbe84e459f98e8027492ea4cd04d812..2d4e90d734f40d48b0c444ee8bacfd33aa8fa624 100644 (file)
@@ -25,8 +25,7 @@
 #include "ui/widget/panel.h"
 #include "ui/widget/notebook-page.h"
 #include "ui/widget/object-composite-settings.h"
-
-using namespace Inkscape::UI::Widget;
+#include "ui/dialog/desktop-tracker.h"
 
 namespace Inkscape {
 namespace UI {
@@ -42,9 +41,6 @@ public:
 
     virtual void setDesktop(SPDesktop *desktop);
 
-    // temporary work-around until panel dialog itself tracks 'focus' properly.
-    virtual void setTargetDesktop(SPDesktop *desktop);
-
     void selectionChanged(Inkscape::Application *inkscape,
                           Inkscape::Selection *selection);
 
@@ -55,12 +51,12 @@ public:
 protected:
     Gtk::Notebook   _notebook;
 
-    NotebookPage    _page_fill;
-    NotebookPage    _page_stroke_paint;
-    NotebookPage    _page_stroke_style;
+    UI::Widget::NotebookPage    _page_fill;
+    UI::Widget::NotebookPage    _page_stroke_paint;
+    UI::Widget::NotebookPage    _page_stroke_style;
 
-    StyleSubject::Selection _subject;
-    ObjectCompositeSettings _composite_settings;
+    UI::Widget::StyleSubject::Selection _subject;
+    UI::Widget::ObjectCompositeSettings _composite_settings;
 
     Gtk::HBox &_createPageTabLabel(const Glib::ustring &label,
                                    const char *label_image);
@@ -73,20 +69,20 @@ private:
     FillAndStroke(FillAndStroke const &d);
     FillAndStroke& operator=(FillAndStroke const &d);
 
-    static gboolean activateDesktopCB(Inkscape::Application *inkscape, SPDesktop *desktop, FillAndStroke *self );
-    static bool hierarchyChangeCB(GtkWidget *widget, GtkWidget* prev, FillAndStroke *self);
+    void setTargetDesktop(SPDesktop *desktop);
 
-    gulong hierID;
-    bool trackActive;
+    DesktopTracker deskTrack;
     SPDesktop *targetDesktop;
     Gtk::Widget *fillWdgt;
     Gtk::Widget *strokeWdgt;
+    sigc::connection desktopChangeConn;
 };
 
 } // namespace Dialog
 } // namespace UI
 } // namespace Inkscape
 
+
 #endif // INKSCAPE_UI_DIALOG_FILL_AND_STROKE_H
 
 /*