>From 341089341a6569ae2826f4594ab16f02c41d5685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Mon, 18 Jun 2012 10:26:17 +0200
Subject: [PATCH 03/12] 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 d776ce4..4e393ef 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 don'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))
-- 
1.7.10

-- 
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 341089341a6569ae2826f4594ab16f02c41d5685 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Mon, 18 Jun 2012 10:26:17 +0200
Subject: [PATCH 03/12] 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 d776ce4..4e393ef 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 don'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))
-- 
1.7.10

Reply via email to