From: "Rodolfo García Peñas (kix)" <k...@kix.es>

The WScreen arguments in the functions wWorkspaceMenuUpdate() and
makeMakeShortcutMenu() is not used now, so can be removed.
---
 src/defaults.c  |    4 ++--
 src/dock.c      |    2 +-
 src/rootmenu.c  |    2 +-
 src/winmenu.c   |   19 ++-----------------
 src/workspace.c |   14 +++++++-------
 src/workspace.h |    2 +-
 6 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/src/defaults.c b/src/defaults.c
index 8fe999a..b92a1dc 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -1205,9 +1205,9 @@ void wReadDefaults(WScreen * scr, WMPropList * new_dict)
 
                if (needs_refresh & REFRESH_WORKSPACE_MENU) {
                        if (wks_nfo.workspace_menu)
-                               wWorkspaceMenuUpdate(scr, 
wks_nfo.workspace_menu);
+                               wWorkspaceMenuUpdate(wks_nfo.workspace_menu);
                        if (wks_nfo.clip_ws_menu)
-                               wWorkspaceMenuUpdate(scr, wks_nfo.clip_ws_menu);
+                               wWorkspaceMenuUpdate(wks_nfo.clip_ws_menu);
                        if (wks_nfo.workspace_submenu)
                                wks_nfo.workspace_submenu->flags.realized = 0;
                        if (wks_nfo.clip_submenu)
diff --git a/src/dock.c b/src/dock.c
index c483622..24dd886 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -3969,7 +3969,7 @@ static void iconMouseDown(WObjDescriptor *desc, XEvent 
*event)
                        WMenu *wsMenu = wks_nfo.clip_ws_menu;
                        int xpos;
 
-                       wWorkspaceMenuUpdate(scr, wsMenu);
+                       wWorkspaceMenuUpdate(wsMenu);
 
                        xpos = event->xbutton.x_root - 
wsMenu->frame->core->width / 2 - 1;
                        if (xpos < 0) {
diff --git a/src/rootmenu.c b/src/rootmenu.c
index 5f6c4b3..c5596fc 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -783,7 +783,7 @@ static WMenuEntry *addWorkspaceMenu(WScreen *scr, WMenu 
*menu, const char *title
                entry = wMenuAddCallback(menu, title, NULL, NULL);
                wMenuEntrySetCascade(menu, entry, wsmenu);
 
-               wWorkspaceMenuUpdate(scr, wsmenu);
+               wWorkspaceMenuUpdate(wsmenu);
        }
        return entry;
 }
diff --git a/src/winmenu.c b/src/winmenu.c
index c45bea1..d16448f 100644
--- a/src/winmenu.c
+++ b/src/winmenu.c
@@ -358,19 +358,9 @@ static WMenu *makeWorkspaceMenu(WScreen * scr)
        return menu;
 }
 
-static WMenu *makeMakeShortcutMenu(WScreen * scr, WMenu * menu)
+static WMenu *makeMakeShortcutMenu(WMenu *menu)
 {
-       /*
-          WMenu *menu;
-        */
        int i;
-       /*
-          menu = wMenuCreate(scr, NULL, False);
-          if (!menu) {
-          wwarning(_("could not create submenu for window menu"));
-          return NULL;
-          }
-        */
 
        for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) {
                WMenuEntry *entry;
@@ -445,12 +435,7 @@ static WMenu *createWindowMenu(WScreen * scr)
        entry = wMenuAddCallback(menu, _("Attributes..."), execMenuCommand, 
NULL);
 
        entry = wMenuAddCallback(menu, _("Options"), NULL, NULL);
-       wMenuEntrySetCascade(menu, entry, makeMakeShortcutMenu(scr, 
makeOptionsMenu(scr)));
-
-       /*
-          entry = wMenuAddCallback(menu, _("Select Shortcut"), NULL, NULL);
-          wMenuEntrySetCascade(menu, entry, makeMakeShortcutMenu(scr));
-        */
+       wMenuEntrySetCascade(menu, entry, 
makeMakeShortcutMenu(makeOptionsMenu(scr)));
 
        entry = wMenuAddCallback(menu, _("Launch"), execMenuCommand, NULL);
        entry->rtext = GetShortcutKey(wKeyBindings[WKBD_RELAUNCH]);
diff --git a/src/workspace.c b/src/workspace.c
index c8cd8b2..9a4c764 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -116,8 +116,8 @@ int wWorkspaceNew(WScreen *scr)
 
                wks_nfo.workspaces = list;
 
-               wWorkspaceMenuUpdate(scr, wks_nfo.workspace_menu);
-               wWorkspaceMenuUpdate(scr, wks_nfo.clip_ws_menu);
+               wWorkspaceMenuUpdate(wks_nfo.workspace_menu);
+               wWorkspaceMenuUpdate(wks_nfo.clip_ws_menu);
                wNETWMUpdateDesktop(scr);
                WMPostNotificationName(WMNWorkspaceCreated, scr, (void 
*)(uintptr_t) (wks_nfo.workspace_count - 1));
                XFlush(dpy);
@@ -167,9 +167,9 @@ Bool wWorkspaceDelete(WScreen * scr, int workspace)
        wks_nfo.workspace_count--;
 
        /* update menu */
-       wWorkspaceMenuUpdate(scr, wks_nfo.workspace_menu);
+       wWorkspaceMenuUpdate(wks_nfo.workspace_menu);
        /* clip workspace menu */
-       wWorkspaceMenuUpdate(scr, wks_nfo.clip_ws_menu);
+       wWorkspaceMenuUpdate(wks_nfo.clip_ws_menu);
 
        /* update also window menu */
        if (wks_nfo.workspace_submenu) {
@@ -488,9 +488,9 @@ void wWorkspaceForceChange(WScreen * scr, int workspace)
        wks_nfo.last_used_workspace = wks_nfo.current_workspace;
        wks_nfo.current_workspace = workspace;
 
-       wWorkspaceMenuUpdate(scr, wks_nfo.workspace_menu);
+       wWorkspaceMenuUpdate(wks_nfo.workspace_menu);
 
-       wWorkspaceMenuUpdate(scr, wks_nfo.clip_ws_menu);
+       wWorkspaceMenuUpdate(wks_nfo.clip_ws_menu);
 
        toUnmapSize = 16;
        toUnmapCount = 0;
@@ -743,7 +743,7 @@ WMenu *wWorkspaceMenuMake(WScreen * scr, Bool titled)
        return wsmenu;
 }
 
-void wWorkspaceMenuUpdate(WScreen * scr, WMenu * menu)
+void wWorkspaceMenuUpdate(WMenu *menu)
 {
        int i;
        long ws;
diff --git a/src/workspace.h b/src/workspace.h
index 341e89d..e469e1d 100644
--- a/src/workspace.h
+++ b/src/workspace.h
@@ -52,7 +52,7 @@ Bool wWorkspaceDelete(WScreen *scr, int workspace);
 void wWorkspaceChange(WScreen *scr, int workspace);
 void wWorkspaceForceChange(WScreen *scr, int workspace);
 WMenu *wWorkspaceMenuMake(WScreen *scr, Bool titled);
-void wWorkspaceMenuUpdate(WScreen *scr, WMenu *menu);
+void wWorkspaceMenuUpdate(WMenu *menu);
 void wWorkspaceMenuEdit(WScreen *scr);
 void wWorkspaceSaveState(WScreen *scr, WMPropList *old_state);
 void wWorkspaceRestoreState(WScreen *scr);
-- 
1.7.10.4


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to