>From 9dd4ad4125e5f6beb686b5a6fed011b2de502baa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Wed, 6 Jun 2012 07:38:53 +0200
Subject: [PATCH 01/10] WScreen argument removed in get_generic_value()
The argument "src" is removed in the function get_generic_value()
because is not used.
The function wDefaultGetIconFile() is moved near of
wDefaultGetDefaultWorkspace() because are too similar (short code).
---
src/wdefaults.c | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/wdefaults.c b/src/wdefaults.c
index dd91b91..8235e97 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -317,7 +317,7 @@ wDefaultFillAttributes(WScreen * scr, char *instance, char
*class,
WMPLSetCaseSensitive(False);
}
-static WMPropList *get_generic_value(WScreen *scr, char *instance, char *class,
+static WMPropList *get_generic_value(char *instance, char *class,
WMPropList *option, Bool noDefault)
{
WMPropList *value, *key, *dict;
@@ -378,28 +378,6 @@ static WMPropList *get_generic_value(WScreen *scr, char
*instance, char *class,
return value;
}
-/* Get the name of the Icon File. If noDefault is False, then, default value
included */
-char *wDefaultGetIconFile(WScreen * scr, char *instance, char *class, Bool
noDefault)
-{
- WMPropList *value;
- char *tmp;
-
- if (!ANoTitlebar)
- init_wdefaults(scr);
-
- if (!WDWindowAttributes->dictionary)
- return NULL;
-
- value = get_generic_value(scr, instance, class, AIcon, noDefault);
-
- if (!value)
- return NULL;
-
- tmp = getString(AIcon, value);
-
- return tmp;
-}
-
RImage *wDefaultGetImage(WScreen * scr, char *winstance, char *wclass, int
max_size)
{
char *file_name;
@@ -442,7 +420,7 @@ int wDefaultGetStartWorkspace(WScreen * scr, char
*instance, char *class)
if (!WDWindowAttributes->dictionary)
return -1;
- value = get_generic_value(scr, instance, class, AStartWorkspace, False);
+ value = get_generic_value(instance, class, AStartWorkspace, False);
if (!value)
return -1;
@@ -458,6 +436,28 @@ int wDefaultGetStartWorkspace(WScreen * scr, char
*instance, char *class)
return w;
}
+/* Get the name of the Icon File. If noDefault is False, then, default value
included */
+char *wDefaultGetIconFile(WScreen * scr, char *instance, char *class, Bool
noDefault)
+{
+ WMPropList *value;
+ char *tmp;
+
+ if (!ANoTitlebar)
+ init_wdefaults(scr);
+
+ if (!WDWindowAttributes->dictionary)
+ return NULL;
+
+ value = get_generic_value(instance, class, AIcon, noDefault);
+
+ if (!value)
+ return NULL;
+
+ tmp = getString(AIcon, value);
+
+ return tmp;
+}
+
void wDefaultChangeIcon(WScreen * scr, char *instance, char *class, char *file)
{
WDDomain *db = WDWindowAttributes;
--
1.7.10
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 9dd4ad4125e5f6beb686b5a6fed011b2de502baa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Wed, 6 Jun 2012 07:38:53 +0200
Subject: [PATCH 01/10] WScreen argument removed in get_generic_value()
The argument "src" is removed in the function get_generic_value()
because is not used.
The function wDefaultGetIconFile() is moved near of
wDefaultGetDefaultWorkspace() because are too similar (short code).
---
src/wdefaults.c | 48 ++++++++++++++++++++++++------------------------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/wdefaults.c b/src/wdefaults.c
index dd91b91..8235e97 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -317,7 +317,7 @@ wDefaultFillAttributes(WScreen * scr, char *instance, char *class,
WMPLSetCaseSensitive(False);
}
-static WMPropList *get_generic_value(WScreen *scr, char *instance, char *class,
+static WMPropList *get_generic_value(char *instance, char *class,
WMPropList *option, Bool noDefault)
{
WMPropList *value, *key, *dict;
@@ -378,28 +378,6 @@ static WMPropList *get_generic_value(WScreen *scr, char *instance, char *class,
return value;
}
-/* Get the name of the Icon File. If noDefault is False, then, default value included */
-char *wDefaultGetIconFile(WScreen * scr, char *instance, char *class, Bool noDefault)
-{
- WMPropList *value;
- char *tmp;
-
- if (!ANoTitlebar)
- init_wdefaults(scr);
-
- if (!WDWindowAttributes->dictionary)
- return NULL;
-
- value = get_generic_value(scr, instance, class, AIcon, noDefault);
-
- if (!value)
- return NULL;
-
- tmp = getString(AIcon, value);
-
- return tmp;
-}
-
RImage *wDefaultGetImage(WScreen * scr, char *winstance, char *wclass, int max_size)
{
char *file_name;
@@ -442,7 +420,7 @@ int wDefaultGetStartWorkspace(WScreen * scr, char *instance, char *class)
if (!WDWindowAttributes->dictionary)
return -1;
- value = get_generic_value(scr, instance, class, AStartWorkspace, False);
+ value = get_generic_value(instance, class, AStartWorkspace, False);
if (!value)
return -1;
@@ -458,6 +436,28 @@ int wDefaultGetStartWorkspace(WScreen * scr, char *instance, char *class)
return w;
}
+/* Get the name of the Icon File. If noDefault is False, then, default value included */
+char *wDefaultGetIconFile(WScreen * scr, char *instance, char *class, Bool noDefault)
+{
+ WMPropList *value;
+ char *tmp;
+
+ if (!ANoTitlebar)
+ init_wdefaults(scr);
+
+ if (!WDWindowAttributes->dictionary)
+ return NULL;
+
+ value = get_generic_value(instance, class, AIcon, noDefault);
+
+ if (!value)
+ return NULL;
+
+ tmp = getString(AIcon, value);
+
+ return tmp;
+}
+
void wDefaultChangeIcon(WScreen * scr, char *instance, char *class, char *file)
{
WDDomain *db = WDWindowAttributes;
--
1.7.10