From f8158d047aec5b373bdaf011885104780220608d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Mon, 18 Jun 2012 10:26:17 +0200 Subject: [PATCH] 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. --- src/appicon.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/appicon.c b/src/appicon.c index d776ce41..3e391ebf 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -396,13 +396,11 @@ void wAppIconPaint(WAppIcon * aicon) 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; - if (!aicon->docked || aicon->attracted) - return; - path = wIconStore(aicon->icon); if (!path) return; @@ -410,7 +408,16 @@ void wAppIconSave(WAppIcon *aicon) wApplicationSaveIconPathFor(path, aicon->wm_instance, aicon->wm_class); wfree(path); - return; +} + +/* 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; + + save_app_icon_core(aicon); } #define canBeDocked(wwin) ((wwin) && ((wwin)->wm_class||(wwin)->wm_instance)) -- 2.11.4.GIT