mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
Icon: Make icon_create_for_* be more similar
The contents for searching the icon in wAppIconCreateForDock() are moved to icon_create_for_dock(). Now wAppIconCreateForDock() and wAppIconCreate() do the same work and icon_create_for_dock() and icon_create_for_wwindow() do the same work too. The procedure to create the icon is similar in both functions. Now wAppIconCreateForDock, needs more arguments (command, instance and class).
This commit is contained in:
committed by
Carlos R. Mafra
parent
97f74548ef
commit
727b25d947
@@ -109,7 +109,6 @@ void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance
|
||||
WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance, char *wm_class, int tile)
|
||||
{
|
||||
WAppIcon *aicon;
|
||||
char *path;
|
||||
|
||||
aicon = wmalloc(sizeof(WAppIcon));
|
||||
wretain(aicon);
|
||||
@@ -127,12 +126,8 @@ WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance,
|
||||
if (wm_instance)
|
||||
aicon->wm_instance = wstrdup(wm_instance);
|
||||
|
||||
/* Search the icon using instance and class, without default icon */
|
||||
path = get_default_icon_filename(scr, wm_instance, wm_class, command, False);
|
||||
aicon->icon = icon_create_for_dock(scr, command, wm_instance, wm_class, tile);
|
||||
|
||||
aicon->icon = icon_create_for_dock(scr, path, tile);
|
||||
if (path)
|
||||
wfree(path);
|
||||
#ifdef XDND
|
||||
wXDNDMakeAwareness(aicon->icon->core->window);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user