]> Dogcows Code - chaz/openbox/commitdiff
add configmenu option for workspace warping
authorDana Jansens <danakj@orodu.net>
Tue, 23 Jul 2002 04:29:57 +0000 (04:29 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 23 Jul 2002 04:29:57 +0000 (04:29 +0000)
nls/C/Configmenu.m
src/Configmenu.cc

index e5d24d4ed64c55dfcea3494f7475de7d9cde45f2..97a8fa273480a7b179848603f89a921ad5abaaa2 100644 (file)
@@ -22,6 +22,8 @@ $ #WindowToWindowSnap
 # Window-To-Window Snapping
 $ #WindowCornerSnap
 # Window Corner Snapping
+$ #WorkspaceWarping
+# Workspace Warping
 $ #DisableBindings
 # Disable Mouse with Scroll Lock
 $ #HideToolbar
index 13266d3696bede209824f6e59cca7cfe62930d68..37967092bb5b9a0456d09262fe060f485050408c 100644 (file)
@@ -64,10 +64,12 @@ Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
               "Window-To-Window Snapping"), 6);
   insert(i18n(ConfigmenuSet, ConfigmenuWindowCornerSnap,
               "Window Corner Snapping"), 7);
+  insert(i18n(ConfigmenuSet, ConfigmenuWorkspaceWarping,
+              "Workspace Warping"), 8);
   insert(i18n(ConfigmenuSet, ConfigmenuDisableBindings,
-              "Disable Mouse with Scroll Lock"), 8);
+              "Disable Mouse with Scroll Lock"), 9);
   insert(i18n(ConfigmenuSet, ConfigmenuHideToolbar,
-              "Hide Toolbar"), 9);
+              "Hide Toolbar"), 10);
   update();
   setValues();
 }
@@ -88,6 +90,7 @@ void Configmenu::setValues(void) {
   setItemSelected(index, getScreen()->getWindowCornerSnap());
   setItemEnabled(index++, getScreen()->getWindowToWindowSnap());
   
+  setItemSelected(index++, getScreen()->doWorkspaceWarping());
   setItemSelected(index++, getScreen()->allowScrollLock());
   setItemSelected(index++, getScreen()->doHideToolbar());
 }
@@ -148,13 +151,18 @@ void Configmenu::itemSelected(int button, unsigned int index) {
     setItemSelected(index, getScreen()->getWindowCornerSnap());
     break;
 
-  case 8: // disable mouse bindings with Scroll Lock
+  case 8: // workspace wrapping
+    getScreen()->saveWorkspaceWarping(! getScreen()->doWorkspaceWarping());
+    setItemSelected(index, getScreen()->doWorkspaceWarping());
+    break;
+
+  case 9: // disable mouse bindings with Scroll Lock
     getScreen()->saveAllowScrollLock(! getScreen()->allowScrollLock());
     setItemSelected(index, getScreen()->allowScrollLock());
     getScreen()->reconfigure();
     break;
 
-  case 9: // hide toolbar
+  case 10: // hide toolbar
     getScreen()->saveHideToolbar(! getScreen()->doHideToolbar());
     setItemSelected(index, getScreen()->doHideToolbar());
     break;
This page took 0.029416 seconds and 4 git commands to generate.