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 97189ce2cccbffa6af9aa824e52a375dcfa415a0 (commit) via 2fec5f9f2817bf331c7fbc43de30d9a83ab32a22 (commit) from 7a2eb68aa47a35eede44457db5d300719be4dcdd (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/97189ce2cccbffa6af9aa824e52a375dcfa415a0 commit 97189ce2cccbffa6af9aa824e52a375dcfa415a0 Author: Rodolfo García Peñas (kix) <k...@kix.es> Date: Tue Aug 25 09:41:53 2015 +0200 Enable usermenu This patch enables the usermenu when the application is launched and the usermenu file exists. Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es> diff --git a/src/actions.c b/src/actions.c index 5adfab4..b210888 100644 --- a/src/actions.c +++ b/src/actions.c @@ -225,6 +225,7 @@ void wSetFocusTo(WScreen *scr, WWindow *wwin) wUserMenuRefreshInstances(napp->menu, wwin); #endif /* USER_MENU */ + /* kix: Only menu map with mouse, not alt+tab! */ if (wwin->flags.mapped) wAppMenuMap(napp->menu, wwin); } diff --git a/src/application.c b/src/application.c index c43df04..6ff3d3f 100644 --- a/src/application.c +++ b/src/application.c @@ -129,6 +129,8 @@ WApplication *wApplicationCreate(WWindow * wwin) #ifdef USER_MENU if (!wapp->menu) wapp->menu = wUserMenuGet(scr, wapp->main_window_desc); + + wAppMenuMap(wapp->menu, wwin); #endif /* Set application wide attributes from the leader */ http://repo.or.cz/w/wmaker-crm.git/commit/2fec5f9f2817bf331c7fbc43de30d9a83ab32a22 commit 2fec5f9f2817bf331c7fbc43de30d9a83ab32a22 Author: Rodolfo García Peñas (kix) <k...@kix.es> Date: Tue Aug 25 09:41:52 2015 +0200 usermenu.c Avoid compiler warnings This patch includes some changes to avoid compiler warnings and some code style. Compiler warnings are: - notifyClient, do not uses the menu argument. Including (void) menu. - WUserMenuData, keyover: label is not used. - configureUserMenu, params is not initialized. - configureUserMenu, mentry is not initialized. Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es> diff --git a/src/usermenu.c b/src/usermenu.c index c349810..b5c0cfe 100644 --- a/src/usermenu.c +++ b/src/usermenu.c @@ -87,7 +87,7 @@ typedef struct { int key_no; } WUserMenuData; -static void notifyClient(WMenu * menu, WMenuEntry * entry) +static void notifyClient(WMenu *menu, WMenuEntry *entry) { XEvent event; WUserMenuData *data = entry->clientdata; @@ -95,6 +95,8 @@ static void notifyClient(WMenu * menu, WMenuEntry * entry) Window window; int i; + (void) menu; + window = scr->focused_window->client_win; for (i = 0; i < data->key_no; i++) { @@ -128,20 +130,19 @@ static void removeUserMenudata(void *menudata) wfree(data); } -static WUserMenuData *convertShortcuts(WScreen * scr, WMPropList * shortcut) +static WUserMenuData *convertShortcuts(WScreen *scr, WMPropList *shortcut) { WUserMenuData *data; KeySym ksym; char *k, buf[MAX_SHORTCUT_LENGTH], *b; int keycount, i, j, mod; - if (WMIsPLString(shortcut)) { + if (WMIsPLString(shortcut)) keycount = 1; - } else if (WMIsPLArray(shortcut)) { + else if (WMIsPLArray(shortcut)) keycount = WMGetPropListItemCount(shortcut); - } else { + else return NULL; - } data = wmalloc(sizeof(WUserMenuData)); if (!data) @@ -160,7 +161,7 @@ static WUserMenuData *convertShortcuts(WScreen * scr, WMPropList * shortcut) else wstrlcpy(buf, WMGetFromPLString(shortcut), MAX_SHORTCUT_LENGTH); - b = (char *)buf; + b = (char *) buf; while ((k = strchr(b, '+')) != NULL) { *k = 0; @@ -181,8 +182,6 @@ static WUserMenuData *convertShortcuts(WScreen * scr, WMPropList * shortcut) j++; } - keyover: - /* get key */ if (!j) { puts("fatal j"); @@ -190,17 +189,18 @@ static WUserMenuData *convertShortcuts(WScreen * scr, WMPropList * shortcut) wfree(data); return NULL; } + data->key_no = j; data->screen = scr; return data; } -static WMenu *configureUserMenu(WScreen * scr, WMPropList * plum) +static WMenu *configureUserMenu(WScreen *scr, WMPropList *plum) { char *mtitle; WMenu *menu = NULL; - WMPropList *elem, *title, *command, *params; + WMPropList *elem, *title, *command, *params = NULL; int count, i; WUserMenuData *data; @@ -219,18 +219,18 @@ static WMenu *configureUserMenu(WScreen * scr, WMPropList * plum) return NULL; mtitle = WMGetFromPLString(elem); - menu = wMenuCreateForApp(scr, mtitle, True); for (i = 1; i < count; i++) { elem = WMGetFromPLArray(plum, i); if (WMIsPLArray(WMGetFromPLArray(elem, 1))) { WMenu *submenu; - WMenuEntry *mentry; + WMenuEntry *mentry = NULL; submenu = configureUserMenu(scr, elem); if (submenu) mentry = wMenuAddCallback(menu, submenu->frame->title, NULL, NULL); + wMenuEntrySetCascade(menu, mentry, submenu); } else { int idx = 0; @@ -277,7 +277,7 @@ static WMenu *configureUserMenu(WScreen * scr, WMPropList * plum) return menu; } -void wUserMenuRefreshInstances(WMenu * menu, WWindow * wwin) +void wUserMenuRefreshInstances(WMenu *menu, WWindow *wwin) { int i, j, count, paintflag; @@ -301,10 +301,12 @@ void wUserMenuRefreshInstances(WMenu * menu, WWindow * wwin) break; } } + if (oldflag != menu->entries[i]->flags.enabled) paintflag = 1; } } + for (i = 0; i < menu->cascade_no; i++) { if (!menu->cascades[i]->flags.brother) wUserMenuRefreshInstances(menu->cascades[i], wwin); @@ -326,14 +328,15 @@ static WMenu *readUserMenuFile(WScreen *scr, const char *file_name) menu = configureUserMenu(scr, plum); WMReleasePropList(plum); } + return menu; } -WMenu *wUserMenuGet(WScreen * scr, WWindow * wwin) +WMenu *wUserMenuGet(WScreen *scr, WWindow *wwin) { WMenu *menu = NULL; - char *path = NULL; - char *tmp; + char *tmp, *path = NULL; + if (wwin && wwin->wm_instance && wwin->wm_class) { int len = strlen(wwin->wm_instance) + strlen(wwin->wm_class) + 7; tmp = wmalloc(len); @@ -347,6 +350,7 @@ WMenu *wUserMenuGet(WScreen * scr, WWindow * wwin) menu = readUserMenuFile(scr, path); wfree(path); } + return menu; } ----------------------------------------------------------------------- Summary of changes: src/actions.c | 1 + src/application.c | 2 ++ src/usermenu.c | 38 +++++++++++++++++++++----------------- 3 files changed, 24 insertions(+), 17 deletions(-) repo.or.cz automatic notification. Contact project admin crma...@gmail.com if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive no reply. -- wmaker-crm.git ("The Window Maker window manager") -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.