From 32fe186c54eefbee60d856288a07c6dbcbd8f687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20=28kix=29?= Date: Wed, 6 Jun 2012 07:38:53 +0200 Subject: [PATCH] WScreen argument removed in get_generic_value() The argument "src" is removed in the function get_generic_value() because it is not used. The function wDefaultGetIconFile() is moved close to wDefaultGetStartWorkspace() because both are similar. --- src/wdefaults.c | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/wdefaults.c b/src/wdefaults.c index dd91b91d..e627dd45 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;