Re: Question about menus (usermenu, appmenu)
"Rodolfo García Peñas (kix)" <[email protected]>
| Newsgroups | gmane.compw.window-managers.windowmaker.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, if nobody is using these menus and nobody knows about them, my proposal is remove this code. I will do it. Vote? Cheers, kix Quoting "Rodolfo García Peñas (kix)" <[email protected]>: > Hello, > > I am reading a lot of code and I am not sure about the usage of > usermenu and appmenu in wmaker. > > Do you have more info about these menus? How can use/call them? Both > uses the wApplication->menu pointer. The variable wapp->menu is only > used in actions.c as wAppMenuMap(napp->menu, wwin), but I don't know > how to show this menu: > > 223 if (napp && !wasfocused) { > 224 #ifdef USER_MENU > 225 wUserMenuRefreshInstances(napp->menu, wwin); > 226 #endif /* USER_MENU */ > 227 > 228 if (wwin->flags.mapped) > 229 wAppMenuMap(napp->menu, wwin); > 230 } > > There is no info in the wmaker manual. > Are these menus really used? We need this code? Could we remove it? > > Cheers, > kix > > PS. Code about this menus: > > appmenu: > > appmenu.h > 25 WMenu *wAppMenuGet(WScreen *scr, Window window); > 26 void wAppMenuDestroy(WMenu *menu); > 27 > 28 void wAppMenuMap(WMenu *menu, WWindow *wwin); > 29 void wAppMenuUnmap(WMenu *menu); > > client.c: > 600 if (wapp) { > 601 wapp->menu = *wAppMenuGet*(scr, wwin->main_window); > 602 } > 603 if (wPreferences.auto_arrange_icons) { > 604 wArrangeIcons(wwin->screen_ptr, True); > 605 } > 606 } else { > 607 wapp->menu = *wAppMenuGet*(wwin->screen_ptr, wwin->main_window); > > application.c > 127 > 128 wapp->menu = *wAppMenuGet*(scr, main_window); > 129 #ifdef USER_MENU > 130 if (!wapp->menu) > 131 wapp->menu = wUserMenuGet(scr, wapp->main_window_desc); > 132 #endif > 133 > > Usermenu: > > usermenu.h has these functions: > > 28 WMenu *wUserMenuGet(WScreen *scr, WWindow *wwin); > 29 void wUserMenuRefreshInstances(WMenu *menu, WWindow *wwin); > > The function wUserMenuGet is used only in application.c, overriding > the previous call for appmenu (se above). > > 129 #ifdef USER_MENU > 130 if (!wapp->menu) > 131 wapp->menu = wUserMenuGet(scr, wapp->main_window_desc); > 132 #endif > > > > > > > > > > Rodolfo García Peñas (kix) > http://www.kix.es/ > > > -- > To unsubscribe, send mail to [email protected]. Rodolfo García Peñas (kix) http://www.kix.es/ -- To unsubscribe, send mail to [email protected].