Code

Added temp option to enable repositioning of not-quite-completed UI items in relayout.
authorJon A. Cruz <jon@joncruz.org>
Mon, 18 Jan 2010 02:11:50 +0000 (15:11 +1300)
committerJon A. Cruz <jon@joncruz.org>
Mon, 18 Jan 2010 02:11:50 +0000 (15:11 +1300)
src/preferences-skeleton.h
src/ui/dialog/inkscape-preferences.cpp
src/ui/dialog/inkscape-preferences.h
src/ui/uxmanager.cpp

index 0c58a05f453782e036f479114f5c26fae2e2155c..e73c17535b6c86d324e46179d6a8a7af86f10247 100644 (file)
@@ -339,7 +339,8 @@ static char const preferences_skeleton[] =
 "             empspacing=\"5\"/>\n"
 "    </group>\n"
 "    <group id=\"workarounds\"\n"
-"           colorsontop=\"0\"/>\n"
+"           colorsontop=\"0\"\n"
+"           partialdynamic=\"0\"/>\n"
 "    <group id=\"threading\" numthreads=\"1\"/>\n"
 "  </group>\n"
 "\n"
index 348bd74db4788f427918dd987e958747acb65c19..c4aa328b3ecf845603c67d70da58c709880773da 100644 (file)
@@ -1128,6 +1128,12 @@ void InkscapePreferences::initPageUI()
     _page_ui.add_line( false, _("Zoom correction factor (in %):"), _ui_zoom_correction, "",
                               _("Adjust the slider until the length of the ruler on your screen matches its real length. This information is used when zooming to 1:1, 1:2, etc., to display objects in their true sizes"), true);
 
+
+    _ui_partialdynamic.init( _("Enable dynamic relayout for incomplete sections."), "/options/workarounds/dynamicnotdone", false);
+    _page_ui.add_line( false, "", _ui_partialdynamic, "",
+                       _("When on, will allow dynamic layout of components that are not completely finished being refactored."), true);
+
+
     this->AddPage(_page_ui, _("Interface"), PREFS_PAGE_UI);
 }
 
index 8ab8408255ec1deea5b921ee90f80bf765f299ac..46542b0e16b87cd0572a0b7366f4c88cd2d2f44c 100644 (file)
@@ -200,6 +200,7 @@ protected:
     PrefCombo       _misc_small_tools;
     PrefCheckButton _ui_colorsliders_top;
     PrefSpinButton  _misc_recent;
+    PrefCheckButton _ui_partialdynamic;
     ZoomCorrRulerSlider _ui_zoom_correction;
 
     //Spellcheck
index 7c080d3b89a6497a348bcae4e69c3a8852f8d5f6..3c6f85b915ad9b30ef142626768108159fb1740f 100644 (file)
@@ -19,6 +19,7 @@
 #include "util/ege-tags.h"
 #include "widgets/toolbox.h"
 #include "widgets/desktop-widget.h"
+#include "preferences.h"
 
 #ifdef GDK_WINDOWING_X11
 #include <gdk/gdkx.h>
@@ -88,26 +89,35 @@ void UXManager::setTask(SPDesktop* dt, gint val)
 {
     for (vector<SPDesktopWidget*>::iterator it = dtws.begin(); it != dtws.end(); ++it) {
         SPDesktopWidget* dtw = *it;
+
+        gboolean notDone = Inkscape::Preferences::get()->getBool("/options/workarounds/dynamicnotdone", false);
+
         if (dtw->desktop == dt) {
             switch (val) {
                 default:
                 case 0:
                     dtw->setToolboxPosition("ToolToolbar", GTK_POS_LEFT);
                     dtw->setToolboxPosition("CommandsToolbar", GTK_POS_TOP);
-                    //dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP);
+                    if (notDone) {
+                        dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP);
+                    }
                     dtw->setToolboxPosition("SnapToolbar", GTK_POS_TOP);
                     break;
                 case 1:
                     dtw->setToolboxPosition("ToolToolbar", GTK_POS_TOP);
                     dtw->setToolboxPosition("CommandsToolbar", GTK_POS_LEFT);
-                    //dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP);
+                    if (notDone) {
+                        dtw->setToolboxPosition("AuxToolbar", GTK_POS_TOP);
+                    }
                     dtw->setToolboxPosition("SnapToolbar", GTK_POS_RIGHT);
                     break;
                 case 2:
                     dtw->setToolboxPosition("ToolToolbar", GTK_POS_LEFT);
                     dtw->setToolboxPosition("CommandsToolbar", GTK_POS_RIGHT);
                     dtw->setToolboxPosition("SnapToolbar", GTK_POS_RIGHT);
-                    //dtw->setToolboxPosition("AuxToolbar", GTK_POS_RIGHT);
+                    if (notDone) {
+                        dtw->setToolboxPosition("AuxToolbar", GTK_POS_RIGHT);
+                    }
             }
         }
     }