mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 22:28:02 +01:00
wAppIconSave splitted
The function wAppIconSave is splitted in two functions: wAppIconSave() + save_app_icon_core() The function save_app_icon_core will be used in other functions as common code.
This commit is contained in:
committed by
Carlos R. Mafra
parent
de68ee6f1b
commit
f8158d047a
@@ -396,13 +396,11 @@ void wAppIconPaint(WAppIcon * aicon)
|
|||||||
0, 0, wPreferences.icon_size, wPreferences.icon_size);
|
0, 0, wPreferences.icon_size, wPreferences.icon_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wAppIconSave(WAppIcon *aicon)
|
/* Internal application to save the application icon */
|
||||||
|
static void save_app_icon_core(WAppIcon *aicon)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
if (!aicon->docked || aicon->attracted)
|
|
||||||
return;
|
|
||||||
|
|
||||||
path = wIconStore(aicon->icon);
|
path = wIconStore(aicon->icon);
|
||||||
if (!path)
|
if (!path)
|
||||||
return;
|
return;
|
||||||
@@ -410,7 +408,16 @@ void wAppIconSave(WAppIcon *aicon)
|
|||||||
wApplicationSaveIconPathFor(path, aicon->wm_instance, aicon->wm_class);
|
wApplicationSaveIconPathFor(path, aicon->wm_instance, aicon->wm_class);
|
||||||
|
|
||||||
wfree(path);
|
wfree(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Save the application icon */
|
||||||
|
/* This function is used when the icon doesn't have window, like dock or clip */
|
||||||
|
void wAppIconSave(WAppIcon *aicon)
|
||||||
|
{
|
||||||
|
if (!aicon->docked || aicon->attracted)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
save_app_icon_core(aicon);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define canBeDocked(wwin) ((wwin) && ((wwin)->wm_class||(wwin)->wm_instance))
|
#define canBeDocked(wwin) ((wwin) && ((wwin)->wm_class||(wwin)->wm_instance))
|
||||||
|
|||||||
Reference in New Issue
Block a user