diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-11-24 08:20:08 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-11-24 08:20:08 +0000 |
| commit | d6a0a9aad6bc34cb5c2fac14bd6c046b480e85ab (patch) | |
| tree | 1c24fd8ed6a4dfee46f15670b2f01d25e3f52264 /src/ui | |
| parent | UI. Fix for Bug #1072007 (Mouse scroll zoom depends on if the cursor is over ... (diff) | |
| download | inkscape-d6a0a9aad6bc34cb5c2fac14bd6c046b480e85ab.tar.gz inkscape-d6a0a9aad6bc34cb5c2fac14bd6c046b480e85ab.zip | |
Fix for 172236 : Dropper pixmaps and onetime fix
(bzr r11894)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/fill-and-stroke.cpp | 25 | ||||
| -rw-r--r-- | src/ui/dialog/fill-and-stroke.h | 6 |
2 files changed, 31 insertions, 0 deletions
diff --git a/src/ui/dialog/fill-and-stroke.cpp b/src/ui/dialog/fill-and-stroke.cpp index c7efd3bf2..5ba4e7e39 100644 --- a/src/ui/dialog/fill-and-stroke.cpp +++ b/src/ui/dialog/fill-and-stroke.cpp @@ -22,6 +22,7 @@ #include "filter-chemistry.h" #include "inkscape.h" #include "selection.h" +#include "preferences.h" #include "style.h" #include "svg/css-ostringstream.h" #include "ui/icon-names.h" @@ -59,6 +60,8 @@ FillAndStroke::FillAndStroke() _notebook.append_page(_page_stroke_paint, _createPageTabLabel(_("Stroke _paint"), INKSCAPE_ICON("object-stroke"))); _notebook.append_page(_page_stroke_style, _createPageTabLabel(_("Stroke st_yle"), INKSCAPE_ICON("object-stroke-style"))); + _notebook.signal_switch_page().connect(sigc::mem_fun(this, &FillAndStroke::_onSwitchPage)); + _layoutPageFill(); _layoutPageStrokePaint(); _layoutPageStrokeStyle(); @@ -105,6 +108,23 @@ void FillAndStroke::setTargetDesktop(SPDesktop *desktop) } } +#if WITH_GTKMM_3_0 +void FillAndStroke::_onSwitchPage(Gtk::Widget * /*page*/, guint pagenum) +#else +void FillAndStroke::_onSwitchPage(GtkNotebookPage * /*page*/, guint pagenum) +#endif +{ + _savePagePref(pagenum); +} + +void +FillAndStroke::_savePagePref(guint page_num) +{ + // remember the current page + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setInt("/dialogs/fillstroke/page", page_num); +} + void FillAndStroke::_layoutPageFill() { @@ -133,6 +153,8 @@ FillAndStroke::showPageFill() { present(); _notebook.set_current_page(0); + _savePagePref(0); + } void @@ -140,6 +162,7 @@ FillAndStroke::showPageStrokePaint() { present(); _notebook.set_current_page(1); + _savePagePref(1); } void @@ -147,6 +170,8 @@ FillAndStroke::showPageStrokeStyle() { present(); _notebook.set_current_page(2); + _savePagePref(2); + } Gtk::HBox& diff --git a/src/ui/dialog/fill-and-stroke.h b/src/ui/dialog/fill-and-stroke.h index 596205c58..255cea89a 100644 --- a/src/ui/dialog/fill-and-stroke.h +++ b/src/ui/dialog/fill-and-stroke.h @@ -60,6 +60,12 @@ protected: void _layoutPageFill(); void _layoutPageStrokePaint(); void _layoutPageStrokeStyle(); + void _savePagePref(guint page_num); +#if WITH_GTKMM_3_0 + void _onSwitchPage(Gtk::Widget *page, guint pagenum); +#else + void _onSwitchPage(GtkNotebookPage *page, guint pagenum); +#endif private: FillAndStroke(FillAndStroke const &d); |
