diff options
Diffstat (limited to 'src/desktop.cpp')
| -rw-r--r-- | src/desktop.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index b01bf5d64..bfec523db 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -55,6 +55,7 @@ #include "document.h" #include "event-log.h" #include "helper/units.h" +#include "interface.h" #include "inkscape-private.h" #include "layer-fns.h" #include "layer-manager.h" @@ -1318,6 +1319,17 @@ SPDesktop::toggleScrollbars() _widget->toggleScrollbars(); } + +void SPDesktop::toggleToolbar(gchar const *toolbar_name) +{ + Glib::ustring pref_path = getLayoutPrefPath(this) + toolbar_name + "/state"; + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + gboolean visible = prefs->getBool(pref_path, true); + prefs->setBool(pref_path, !visible); + + layoutWidget(); +} + void SPDesktop::layoutWidget() { @@ -1474,7 +1486,6 @@ void SPDesktop::toggleSnapGlobal() namedview->setSnapGlobal(!v); } - //---------------------------------------------------------------------- // Callback implementations. The virtual ones are connected by the view. |
