mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
wAppIconCreateForDockm, changed variable WAppIcon name
The variable "dicon" is now named "aicon", the same name that the WAppIcon variable used in wAppIconCreate. Some clean code more, like spaces in function arguments.
This commit is contained in:
committed by
Carlos R. Mafra
parent
ff49393bfa
commit
adfb761021
@@ -108,43 +108,43 @@ void wApplicationExtractDirPackIcon(WScreen * scr, char *path, char *wm_instance
|
|||||||
|
|
||||||
WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance, char *wm_class, int tile)
|
WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance, char *wm_class, int tile)
|
||||||
{
|
{
|
||||||
WAppIcon *dicon;
|
WAppIcon *aicon;
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
dicon = wmalloc(sizeof(WAppIcon));
|
aicon = wmalloc(sizeof(WAppIcon));
|
||||||
wretain(dicon);
|
wretain(aicon);
|
||||||
dicon->yindex = -1;
|
aicon->yindex = -1;
|
||||||
dicon->xindex = -1;
|
aicon->xindex = -1;
|
||||||
|
|
||||||
add_to_appicon_list(scr, dicon);
|
add_to_appicon_list(scr, aicon);
|
||||||
|
|
||||||
if (command)
|
if (command)
|
||||||
dicon->command = wstrdup(command);
|
aicon->command = wstrdup(command);
|
||||||
|
|
||||||
if (wm_class)
|
if (wm_class)
|
||||||
dicon->wm_class = wstrdup(wm_class);
|
aicon->wm_class = wstrdup(wm_class);
|
||||||
|
|
||||||
if (wm_instance)
|
if (wm_instance)
|
||||||
dicon->wm_instance = wstrdup(wm_instance);
|
aicon->wm_instance = wstrdup(wm_instance);
|
||||||
|
|
||||||
/* Search the icon using instance and class, without default icon */
|
/* Search the icon using instance and class, without default icon */
|
||||||
path = get_default_icon_filename(scr, wm_instance, wm_class, command, False);
|
path = get_default_icon_filename(scr, wm_instance, wm_class, command, False);
|
||||||
|
|
||||||
dicon->icon = wIconCreateWithIconFile(scr, path, tile);
|
aicon->icon = wIconCreateWithIconFile(scr, path, tile);
|
||||||
if (path)
|
if (path)
|
||||||
wfree(path);
|
wfree(path);
|
||||||
#ifdef XDND
|
#ifdef XDND
|
||||||
wXDNDMakeAwareness(dicon->icon->core->window);
|
wXDNDMakeAwareness(aicon->icon->core->window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* will be overriden by dock */
|
/* will be overriden by dock */
|
||||||
dicon->icon->core->descriptor.handle_mousedown = appIconMouseDown;
|
aicon->icon->core->descriptor.handle_mousedown = appIconMouseDown;
|
||||||
dicon->icon->core->descriptor.handle_expose = iconExpose;
|
aicon->icon->core->descriptor.handle_expose = iconExpose;
|
||||||
dicon->icon->core->descriptor.parent_type = WCLASS_APPICON;
|
aicon->icon->core->descriptor.parent_type = WCLASS_APPICON;
|
||||||
dicon->icon->core->descriptor.parent = dicon;
|
aicon->icon->core->descriptor.parent = aicon;
|
||||||
AddToStackList(dicon->icon->core);
|
AddToStackList(aicon->icon->core);
|
||||||
|
|
||||||
return dicon;
|
return aicon;
|
||||||
}
|
}
|
||||||
|
|
||||||
void makeAppIconFor(WApplication *wapp)
|
void makeAppIconFor(WApplication *wapp)
|
||||||
|
|||||||
Reference in New Issue
Block a user