This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  102e836e8e9864f28f8d48c357107c2d001fc86b (commit)
       via  783d4b9de7d0898495b9f31580af2884508f62a3 (commit)
       via  82dcc944c202258ee9520db780b146b4d30c25ee (commit)
       via  766e8ad57513f2e9f24cdcf96b5dc7cc5c656521 (commit)
      from  df7fb014e59630653d06387a28b80688384b68d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/102e836e8e9864f28f8d48c357107c2d001fc86b

commit 102e836e8e9864f28f8d48c357107c2d001fc86b
Author: Rodolfo García Peñas (kix) <[email protected]>
Date:   Sat Oct 19 12:17:05 2013 +0200

    Included compile file in gitignore
    
    The compile file (in the root folder) is created by autotools for
    compilers that don't support '-c -o' options.

diff --git a/.gitignore b/.gitignore
index 333fa3e..0fcf185 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@
 INSTALL
 aclocal.m4
 autom4te.cache*
+compile
 config-paths.h
 config.guess
 config.h

http://repo.or.cz/w/wmaker-crm.git/commit/783d4b9de7d0898495b9f31580af2884508f62a3

commit 783d4b9de7d0898495b9f31580af2884508f62a3
Author: Iain Patterson <[email protected]>
Date:   Fri Oct 18 18:04:38 2013 +0100

    Update other window menu shortcut labels.
    
    Ensure that keyboard shortcut labels for other entries in the window
    menu are updated if the user changes the shortcut.  Previously they were
    only set when the menu was created and could get out of sync.

diff --git a/src/winmenu.c b/src/winmenu.c
index 5efdafb..5d56759 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -610,25 +610,19 @@ static WMenu *createWindowMenu(WScreen * scr)
         * this file.
         */
        entry = wMenuAddCallback(menu, _("Maximize"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_MAXIMIZE]);
 
        entry = wMenuAddCallback(menu, _("Other maximization"), NULL, NULL);
        wMenuEntrySetCascade(menu, entry, makeMaximizeMenu(scr));
 
        entry = wMenuAddCallback(menu, _("Miniaturize"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_MINIATURIZE]);
 
        entry = wMenuAddCallback(menu, _("Shade"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_SHADE]);
 
        entry = wMenuAddCallback(menu, _("Hide"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_HIDE]);
 
        entry = wMenuAddCallback(menu, _("Resize/Move"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_MOVERESIZE]);
 
        entry = wMenuAddCallback(menu, _("Select"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_SELECT]);
 
        entry = wMenuAddCallback(menu, _("Move To"), NULL, NULL);
        w_global.workspace.submenu = makeWorkspaceMenu(scr);
@@ -641,10 +635,8 @@ static WMenu *createWindowMenu(WScreen * scr)
        wMenuEntrySetCascade(menu, entry, 
makeMakeShortcutMenu(makeOptionsMenu(scr)));
 
        entry = wMenuAddCallback(menu, _("Launch"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_RELAUNCH]);
 
        entry = wMenuAddCallback(menu, _("Close"), execMenuCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_CLOSE]);
 
        entry = wMenuAddCallback(menu, _("Kill"), execMenuCommand, NULL);
 
@@ -755,6 +747,17 @@ static void updateMenuForWindow(WMenu * menu, WWindow * 
wwin)
                wMenuSetEnabled(menu, MC_PROPERTIES, False);
        }
 
+       /* Update shortcut labels except for (Un)Maximize which is
+        * handled separately.
+        */
+       menu->entries[MC_MINIATURIZE]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_MINIATURIZE]);
+       menu->entries[MC_SHADE]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_SHADE]);
+       menu->entries[MC_HIDE]->rtext = GetShortcutKey(wKeyBindings[WKBD_HIDE]);
+       menu->entries[MC_MOVERESIZE]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_MOVERESIZE]);
+       menu->entries[MC_SELECT]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_SELECT]);
+       menu->entries[MC_RELAUNCH]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_RELAUNCH]);
+       menu->entries[MC_CLOSE]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_CLOSE]);
+
        /* set the client data of the entries to the window */
        for (i = 0; i < menu->entry_no; i++) {
                menu->entries[i]->clientdata = wwin;

http://repo.or.cz/w/wmaker-crm.git/commit/82dcc944c202258ee9520db780b146b4d30c25ee

commit 82dcc944c202258ee9520db780b146b4d30c25ee
Author: Iain Patterson <[email protected]>
Date:   Fri Oct 18 17:38:25 2013 +0100

    Update shortcut labels for Other maximization submenu.
    
    The shortcut labels for items in the "Other maximization" menu were set
    at startup and not updated if the user changed the shortcut key.  Thus
    the labels shown could be wrong.  They might even be missing if no
    shortcut was assigned at startup but was subsequently set during the
    session.
    
    We now ensure that the shortcut labels are updated with the menu
    whenever preferences are reloaded.

diff --git a/src/winmenu.c b/src/winmenu.c
index 044342b..5efdafb 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -481,16 +481,37 @@ static void updateMaximizeMenu(WMenu * menu, WWindow * 
wwin)
        WMenu *smenu = menu->cascades[menu->entries[MC_OTHERMAX]->cascade];
 
        smenu->entries[MAXC_V]->clientdata = wwin;
+       smenu->entries[MAXC_V]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_VMAXIMIZE]);
+
        smenu->entries[MAXC_H]->clientdata = wwin;
+       smenu->entries[MAXC_H]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_HMAXIMIZE]);
+
        smenu->entries[MAXC_LH]->clientdata = wwin;
+       smenu->entries[MAXC_LH]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_LHMAXIMIZE]);
+
        smenu->entries[MAXC_RH]->clientdata = wwin;
+       smenu->entries[MAXC_RH]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_RHMAXIMIZE]);
+
        smenu->entries[MAXC_TH]->clientdata = wwin;
+       smenu->entries[MAXC_TH]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_THMAXIMIZE]);
+
        smenu->entries[MAXC_BH]->clientdata = wwin;
+       smenu->entries[MAXC_BH]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_BHMAXIMIZE]);
+
        smenu->entries[MAXC_LTC]->clientdata = wwin;
+       smenu->entries[MAXC_LTC]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_LTCMAXIMIZE]);
+
        smenu->entries[MAXC_RTC]->clientdata = wwin;
+       smenu->entries[MAXC_RTC]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_RTCMAXIMIZE]);
+
        smenu->entries[MAXC_LBC]->clientdata = wwin;
+       smenu->entries[MAXC_LBC]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_LBCMAXIMIZE]);
+
        smenu->entries[MAXC_RBC]->clientdata = wwin;
+       smenu->entries[MAXC_RBC]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_RBCMAXIMIZE]);
+
        smenu->entries[MAXC_MAXIMUS]->clientdata = wwin;
+       smenu->entries[MAXC_MAXIMUS]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_MAXIMUS]);
 
        smenu->flags.realized = 0;
        wMenuRealize(smenu);
@@ -563,36 +584,16 @@ static WMenu *makeMaximizeMenu(WScreen * scr)
        }
 
        entry = wMenuAddCallback(menu, _("Maximize vertically"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_VMAXIMIZE]);
        entry = wMenuAddCallback(menu, _("Maximize horizontally"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_HMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize left half"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_LHMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize right half"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_RHMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize top half"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_THMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize bottom half"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_BHMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize left top corner"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_LTCMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize right top corner"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_RTCMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize left bottom corner"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_LBCMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximize right bottom corner"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_RBCMAXIMIZE]);
-
        entry = wMenuAddCallback(menu, _("Maximus: tiled maximization"), 
execMaximizeCommand, NULL);
-       entry->rtext = GetShortcutKey(wKeyBindings[WKBD_MAXIMUS]);
 
        return menu;
 }

http://repo.or.cz/w/wmaker-crm.git/commit/766e8ad57513f2e9f24cdcf96b5dc7cc5c656521

commit 766e8ad57513f2e9f24cdcf96b5dc7cc5c656521
Author: Iain Patterson <[email protected]>
Date:   Fri Oct 18 17:33:50 2013 +0100

    Update shortcut label for Unmaximize menu entry.
    
    The window menu Unmaximize entry had the Maximize shortcut key as its
    label.  That's because the Maximize and Unmaximize menu options are in
    fact the same single entry with different text depending on the window's
    state.
    
    It can, however, cause confusion if a window is maximized using one
    of the "Other maximization" options such as Maximus.  Selecting the
    Unmaximize entry from the window menu would indeed unmaximize the window
    but pressing the listed shortcut key would not.
    
    We now dynamically update the shortcut label so that it shows a key
    which will actually unmaximize the window.  Thus the menu description
    and shortcut action are now consistent.

diff --git a/src/winmenu.c b/src/winmenu.c
index 6f67afc..044342b 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -173,6 +173,63 @@ static void execMaximizeCommand(WMenu * menu, WMenuEntry * 
entry)
        }
 }
 
+static void updateUnmaximizeShortcut(WMenuEntry * entry, int flags)
+{
+       int key;
+
+       switch (flags & (MAX_HORIZONTAL | MAX_VERTICAL | MAX_LEFTHALF | 
MAX_RIGHTHALF | MAX_TOPHALF | MAX_BOTTOMHALF | MAX_MAXIMUS)) {
+       case MAX_HORIZONTAL:
+               key = WKBD_HMAXIMIZE;
+               break;
+
+       case MAX_VERTICAL:
+               key = WKBD_VMAXIMIZE;
+               break;
+
+       case MAX_LEFTHALF | MAX_VERTICAL:
+               key = WKBD_LHMAXIMIZE;
+               break;
+
+       case MAX_RIGHTHALF | MAX_VERTICAL:
+               key = WKBD_RHMAXIMIZE;
+               break;
+
+       case MAX_TOPHALF | MAX_HORIZONTAL:
+               key = WKBD_THMAXIMIZE;
+               break;
+
+       case MAX_BOTTOMHALF | MAX_HORIZONTAL:
+               key = WKBD_BHMAXIMIZE;
+               break;
+
+       case MAX_LEFTHALF | MAX_TOPHALF:
+               key = WKBD_LTCMAXIMIZE;
+               break;
+
+       case MAX_RIGHTHALF | MAX_TOPHALF:
+               key = WKBD_RTCMAXIMIZE;
+               break;
+
+       case MAX_LEFTHALF | MAX_BOTTOMHALF:
+               key = WKBD_LBCMAXIMIZE;
+               break;
+
+       case MAX_RIGHTHALF | MAX_BOTTOMHALF:
+               key = WKBD_RBCMAXIMIZE;
+               break;
+
+       case MAX_MAXIMUS:
+               key = WKBD_MAXIMUS;
+               break;
+
+       default:
+               key = WKBD_MAXIMIZE;
+               break;
+       }
+
+       entry->rtext = GetShortcutKey(wKeyBindings[key]);
+}
+
 static void execMenuCommand(WMenu * menu, WMenuEntry * entry)
 {
        WWindow *wwin = (WWindow *) entry->clientdata;
@@ -644,12 +701,14 @@ static void updateMenuForWindow(WMenu * menu, WWindow * 
wwin)
                        text = _("Unmaximize");
 
                menu->entries[MC_MAXIMIZE]->text = text;
+               updateUnmaximizeShortcut(menu->entries[MC_MAXIMIZE], 
wwin->flags.maximized);
        } else {
                static char *text = NULL;
                if (!text)
                        text = _("Maximize");
 
                menu->entries[MC_MAXIMIZE]->text = text;
+               menu->entries[MC_MAXIMIZE]->rtext = 
GetShortcutKey(wKeyBindings[WKBD_MAXIMIZE]);
        }
        wMenuSetEnabled(menu, MC_MAXIMIZE, IS_RESIZABLE(wwin));
 

-----------------------------------------------------------------------

Summary of changes:
 .gitignore    |    1 +
 src/winmenu.c |  119 +++++++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 92 insertions(+), 28 deletions(-)


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to