Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        E.h actions.c conf.h config.c settings.c setup.c 


Log Message:
Patch for desktop wraparound by Alan Schmitt <[EMAIL PROTECTED]>.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -3 -r1.142 -r1.143
--- E.h 8 Nov 2003 10:54:03 -0000       1.142
+++ E.h 8 Nov 2003 23:39:20 -0000       1.143
@@ -1292,6 +1292,7 @@
    int                 pager_menu_button;
    char                area_wraparound;
    char                dialog_headers;
+   char                desktop_wraparound;
 }
 EMode;
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- actions.c   8 Nov 2003 10:54:03 -0000       1.111
+++ actions.c   8 Nov 2003 23:39:20 -0000       1.112
@@ -1572,36 +1572,44 @@
 int
 doNextDesktop(void *params)
 {
-   int                 pd;
+   int                 pd, nd;
 
    EDBUG(6, "doNextDesktop");
+
    if (InZoom())
       EDBUG_RETURN(0);
+
    pd = desks.current;
-   GotoDesktop(desks.current + 1);
+   nd = desks.current + 1;
+   if (mode.desktop_wraparound && (nd >= mode.numdesktops))
+      nd = 0;
+   GotoDesktop(nd);
+
    if (desks.current != pd)
-     {
-       AUDIO_PLAY("SOUND_DESKTOP_SHUT");
-     }
-   params = NULL;
+      AUDIO_PLAY("SOUND_DESKTOP_SHUT");
+
    EDBUG_RETURN(0);
 }
 
 int
 doPrevDesktop(void *params)
 {
-   int                 pd;
+   int                 pd, nd;
 
    EDBUG(6, "doPrevDesktop");
+
    if (InZoom())
       EDBUG_RETURN(0);
+
    pd = desks.current;
-   GotoDesktop(desks.current - 1);
+   nd = desks.current - 1;
+   if (mode.desktop_wraparound && (nd < 0))
+      nd = mode.numdesktops - 1;
+   GotoDesktop(nd);
+
    if (desks.current != pd)
-     {
-       AUDIO_PLAY("SOUND_DESKTOP_SHUT");
-     }
-   params = NULL;
+      AUDIO_PLAY("SOUND_DESKTOP_SHUT");
+
    EDBUG_RETURN(0);
 }
 
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/conf.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- conf.h      8 Nov 2003 10:54:03 -0000       1.28
+++ conf.h      8 Nov 2003 23:39:20 -0000       1.29
@@ -111,6 +111,7 @@
 #define CONTROL_MENUONSCREEN 351
 #define CONTROL_AREA_WRAPAROUND 352
 #define CONTROL_DIALOG_HEADERS 353
+#define CONTROL_DESKTOP_WRAPAROUND 354
 #define CONTROL_MANUAL_PLACEMENT_MOUSE_POINTER 3360
 #define CONTROL_WARPMENUS 666
 #define CONTROL_USER_BG 1350
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- config.c    8 Nov 2003 10:54:03 -0000       1.69
+++ config.c    8 Nov 2003 23:39:20 -0000       1.70
@@ -769,6 +769,9 @@
          case CONTROL_DIALOG_HEADERS:
             mode.dialog_headers = i2;
             break;
+         case CONTROL_DESKTOP_WRAPAROUND:
+            mode.desktop_wraparound = i2;
+            break;
          case CONTROL_SLIDESPEEDMAP:
             mode.slidespeedmap = i2;
             break;
@@ -3873,6 +3876,7 @@
        fprintf(autosavefile, "351 %i\n", (int)mode.menusonscreen);
        fprintf(autosavefile, "352 %i\n", (int)mode.area_wraparound);
        fprintf(autosavefile, "353 %i\n", (int)mode.dialog_headers);
+       fprintf(autosavefile, "354 %i\n", (int)mode.desktop_wraparound);
        fprintf(autosavefile, "666 %i\n", (int)mode.warpmenus);
        fprintf(autosavefile, "667 %i\n", (int)mode.warpsticky);
        fprintf(autosavefile, "668 %i\n", (int)mode.warpshaded);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/settings.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -3 -r1.76 -r1.77
--- settings.c  8 Nov 2003 10:54:04 -0000       1.76
+++ settings.c  8 Nov 2003 23:39:20 -0000       1.77
@@ -1011,6 +1011,7 @@
 static int          tmp_desktops;
 static DItem       *tmp_desk_text;
 static Dialog      *tmp_desk_dialog;
+static char         tmp_desktop_wraparound;
 
 static void         CB_ConfigureDesktops(int val, void *data);
 static void
@@ -1019,6 +1020,7 @@
    if (val < 2)
      {
        ChangeNumberOfDesktops(tmp_desktops);
+       mode.desktop_wraparound = tmp_desktop_wraparound;
      }
    autosave();
    data = NULL;
@@ -1113,6 +1115,7 @@
    AUDIO_PLAY("SOUND_SETTINGS_DESKTOPS");
 
    tmp_desktops = mode.numdesktops;
+   tmp_desktop_wraparound = mode.desktop_wraparound;
 
    d = tmp_desk_dialog = CreateDialog("CONFIGURE_DESKTOPS");
    DialogSetTitle(d, _("Multiple Desktop Settings"));
@@ -1172,6 +1175,20 @@
    DialogItemSetColSpan(di, 2);
    DialogItemSetPadding(di, 2, 2, 2, 2);
    DialogItemAreaSetSize(di, 128, 96);
+
+   di = DialogAddItem(table, DITEM_SEPARATOR);
+   DialogItemSetColSpan(di, 2);
+   DialogItemSetPadding(di, 2, 2, 2, 2);
+   DialogItemSetFill(di, 1, 0);
+   DialogItemSeparatorSetOrientation(di, 0);
+
+   di = DialogAddItem(table, DITEM_CHECKBUTTON);
+   DialogItemSetPadding(di, 2, 2, 2, 2);
+   DialogItemSetFill(di, 1, 0);
+   DialogItemSetColSpan(di, 2);
+   DialogItemCheckButtonSetText(di, _("Wrap desktops around"));
+   DialogItemCheckButtonSetState(di, tmp_desktop_wraparound);
+   DialogItemCheckButtonSetPtr(di, &tmp_desktop_wraparound);
 
    di = DialogAddItem(table, DITEM_SEPARATOR);
    DialogItemSetColSpan(di, 2);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- setup.c     8 Nov 2003 10:54:04 -0000       1.94
+++ setup.c     8 Nov 2003 23:39:20 -0000       1.95
@@ -497,6 +497,7 @@
    mode.group_swapmove = 1;
    mode.area_wraparound = 0;
    mode.dialog_headers = 0;
+   mode.desktop_wraparound = 0;
    mode.clickalways = 0;
    mode.keybinds_changed = 0;
 




-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to