>From 17c4022b098f357e4da86af2834ca14ff73f8bd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Tue, 3 Jul 2012 11:42:39 +0200
Subject: [PATCH 02/13] WScreen argument not used in wDefaultGetIconFile()
The function wDefaultGetIconFile() don't use the argument WScreen,
so can be removed.
---
src/appicon.c | 4 ++--
src/defaults.c | 4 ++--
src/defaults.h | 4 +---
src/dockedapp.c | 2 +-
src/icon.c | 4 ++--
src/switchpanel.c | 2 +-
src/wdefaults.c | 4 ++--
src/winspector.c | 2 +-
8 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/appicon.c b/src/appicon.c
index 9cf0b14..25f88ce 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -127,10 +127,10 @@ WAppIcon *wAppIconCreateForDock(WScreen * scr, char
*command, char *wm_instance,
if (wm_instance)
dicon->wm_instance = wstrdup(wm_instance);
- path = wDefaultGetIconFile(scr, wm_instance, wm_class, True);
+ path = wDefaultGetIconFile(wm_instance, wm_class, True);
if (!path && command) {
wApplicationExtractDirPackIcon(scr, command, wm_instance,
wm_class);
- path = wDefaultGetIconFile(scr, wm_instance, wm_class, False);
+ path = wDefaultGetIconFile(wm_instance, wm_class, False);
}
if (path)
diff --git a/src/defaults.c b/src/defaults.c
index e512a8b..c6fc2c3 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -1125,7 +1125,7 @@ void wDefaultUpdateIcons(WScreen * scr)
char *file;
while (aicon) {
- file = wDefaultGetIconFile(scr, aicon->wm_instance,
aicon->wm_class, False);
+ file = wDefaultGetIconFile(aicon->wm_instance, aicon->wm_class,
False);
if ((file && aicon->icon->file && strcmp(file,
aicon->icon->file) != 0)
|| (file && !aicon->icon->file)) {
wIconChangeImageFile(aicon->icon, file);
@@ -1139,7 +1139,7 @@ void wDefaultUpdateIcons(WScreen * scr)
while (wwin) {
if (wwin->icon && wwin->flags.miniaturized) {
- file = wDefaultGetIconFile(scr, wwin->wm_instance,
wwin->wm_class, False);
+ file = wDefaultGetIconFile(wwin->wm_instance,
wwin->wm_class, False);
if ((file && wwin->icon->file && strcmp(file,
wwin->icon->file) != 0)
|| (file && !wwin->icon->file)) {
wIconChangeImageFile(wwin->icon, file);
diff --git a/src/defaults.h b/src/defaults.h
index 95ddff2..199abb7 100644
--- a/src/defaults.h
+++ b/src/defaults.h
@@ -41,9 +41,7 @@ void wDefaultFillAttributes(WScreen *scr, char *instance,
char *class,
WWindowAttributes *attr, WWindowAttributes *mask,
Bool useGlobalDefault);
-
-char * wDefaultGetIconFile(WScreen *scr, char *instance, char *class,
- Bool noDefault);
+char *wDefaultGetIconFile(char *instance, char *class, Bool noDefault);
RImage * wDefaultGetImage(WScreen *scr, char *winstance, char *wclass, int
max_size);
diff --git a/src/dockedapp.c b/src/dockedapp.c
index 02c9a22..cd059c2 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -320,7 +320,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
panel->iconField = WMCreateTextField(panel->iconFrame);
WMResizeWidget(panel->iconField, 176, 20);
WMMoveWidget(panel->iconField, 10, 20);
- WMSetTextFieldText(panel->iconField, wDefaultGetIconFile(scr,
aicon->wm_instance, aicon->wm_class, True));
+ WMSetTextFieldText(panel->iconField,
wDefaultGetIconFile(aicon->wm_instance, aicon->wm_class, True));
panel->browseBtn = WMCreateCommandButton(panel->iconFrame);
WMResizeWidget(panel->browseBtn, 70, 24);
diff --git a/src/icon.c b/src/icon.c
index fd9bb11..6537ece 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -127,7 +127,7 @@ WIcon *wIconCreate(WWindow * wwin)
#endif
icon->file_image = wDefaultGetImage(scr, wwin->wm_instance,
wwin->wm_class, wPreferences.icon_size);
- file = wDefaultGetIconFile(scr, wwin->wm_instance, wwin->wm_class,
False);
+ file = wDefaultGetIconFile(wwin->wm_instance, wwin->wm_class, False);
if (file)
icon->file = wstrdup(file);
@@ -617,7 +617,7 @@ void get_pixmap_icon_from_user_icon(WScreen *scr, WIcon *
icon)
} else {
/* make default icons */
if (!scr->def_icon_pixmap) {
- file = wDefaultGetIconFile(scr, NULL, NULL, False);
+ file = wDefaultGetIconFile(NULL, NULL, False);
if (file) {
path = FindImage(wPreferences.icon_path, file);
if (path) {
diff --git a/src/switchpanel.c b/src/switchpanel.c
index 8e9e9f6..80b30a3 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -182,7 +182,7 @@ static void addIconForWindow(WSwitchPanel * panel, WMWidget
* parent, WWindow *
image = wDefaultGetImage(panel->scr, wwin->wm_instance,
wwin->wm_class, ICON_TILE_SIZE);
if (!image && !panel->defIcon) {
- char *file = wDefaultGetIconFile(panel->scr, NULL, NULL, False);
+ char *file = wDefaultGetIconFile(NULL, NULL, False);
if (file) {
char *path = FindImage(wPreferences.icon_path, file);
if (path) {
diff --git a/src/wdefaults.c b/src/wdefaults.c
index 7170b3d..2169a2f 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -381,7 +381,7 @@ RImage *wDefaultGetImage(WScreen * scr, char *winstance,
char *wclass, int max_s
RImage *image;
/* Get the file name of the image, using instance and class */
- file_name = wDefaultGetIconFile(scr, winstance, wclass, False);
+ file_name = wDefaultGetIconFile(winstance, wclass, False);
if (!file_name)
return NULL;
@@ -433,7 +433,7 @@ int wDefaultGetStartWorkspace(WScreen * scr, char
*instance, char *class)
}
/* 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)
+char *wDefaultGetIconFile(char *instance, char *class, Bool noDefault)
{
WMPropList *value;
char *tmp;
diff --git a/src/winspector.c b/src/winspector.c
index 3a75af2..b671087 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -323,7 +323,7 @@ static int showIconFor(WMScreen *scrPtr, InspectorPanel
*panel, char *wm_instanc
file = NULL;
}
} else {
- db_icon = wDefaultGetIconFile(panel->inspected->screen_ptr,
wm_instance, wm_class, False);
+ db_icon = wDefaultGetIconFile(wm_instance, wm_class, False);
if (db_icon != NULL)
file = wstrdup(db_icon);
}
--
1.7.10
--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/
>From 17c4022b098f357e4da86af2834ca14ff73f8bd3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
Date: Tue, 3 Jul 2012 11:42:39 +0200
Subject: [PATCH 02/13] WScreen argument not used in wDefaultGetIconFile()
The function wDefaultGetIconFile() don't use the argument WScreen,
so can be removed.
---
src/appicon.c | 4 ++--
src/defaults.c | 4 ++--
src/defaults.h | 4 +---
src/dockedapp.c | 2 +-
src/icon.c | 4 ++--
src/switchpanel.c | 2 +-
src/wdefaults.c | 4 ++--
src/winspector.c | 2 +-
8 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/src/appicon.c b/src/appicon.c
index 9cf0b14..25f88ce 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -127,10 +127,10 @@ WAppIcon *wAppIconCreateForDock(WScreen * scr, char *command, char *wm_instance,
if (wm_instance)
dicon->wm_instance = wstrdup(wm_instance);
- path = wDefaultGetIconFile(scr, wm_instance, wm_class, True);
+ path = wDefaultGetIconFile(wm_instance, wm_class, True);
if (!path && command) {
wApplicationExtractDirPackIcon(scr, command, wm_instance, wm_class);
- path = wDefaultGetIconFile(scr, wm_instance, wm_class, False);
+ path = wDefaultGetIconFile(wm_instance, wm_class, False);
}
if (path)
diff --git a/src/defaults.c b/src/defaults.c
index e512a8b..c6fc2c3 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -1125,7 +1125,7 @@ void wDefaultUpdateIcons(WScreen * scr)
char *file;
while (aicon) {
- file = wDefaultGetIconFile(scr, aicon->wm_instance, aicon->wm_class, False);
+ file = wDefaultGetIconFile(aicon->wm_instance, aicon->wm_class, False);
if ((file && aicon->icon->file && strcmp(file, aicon->icon->file) != 0)
|| (file && !aicon->icon->file)) {
wIconChangeImageFile(aicon->icon, file);
@@ -1139,7 +1139,7 @@ void wDefaultUpdateIcons(WScreen * scr)
while (wwin) {
if (wwin->icon && wwin->flags.miniaturized) {
- file = wDefaultGetIconFile(scr, wwin->wm_instance, wwin->wm_class, False);
+ file = wDefaultGetIconFile(wwin->wm_instance, wwin->wm_class, False);
if ((file && wwin->icon->file && strcmp(file, wwin->icon->file) != 0)
|| (file && !wwin->icon->file)) {
wIconChangeImageFile(wwin->icon, file);
diff --git a/src/defaults.h b/src/defaults.h
index 95ddff2..199abb7 100644
--- a/src/defaults.h
+++ b/src/defaults.h
@@ -41,9 +41,7 @@ void wDefaultFillAttributes(WScreen *scr, char *instance, char *class,
WWindowAttributes *attr, WWindowAttributes *mask,
Bool useGlobalDefault);
-
-char * wDefaultGetIconFile(WScreen *scr, char *instance, char *class,
- Bool noDefault);
+char *wDefaultGetIconFile(char *instance, char *class, Bool noDefault);
RImage * wDefaultGetImage(WScreen *scr, char *winstance, char *wclass, int max_size);
diff --git a/src/dockedapp.c b/src/dockedapp.c
index 02c9a22..cd059c2 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -320,7 +320,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
panel->iconField = WMCreateTextField(panel->iconFrame);
WMResizeWidget(panel->iconField, 176, 20);
WMMoveWidget(panel->iconField, 10, 20);
- WMSetTextFieldText(panel->iconField, wDefaultGetIconFile(scr, aicon->wm_instance, aicon->wm_class, True));
+ WMSetTextFieldText(panel->iconField, wDefaultGetIconFile(aicon->wm_instance, aicon->wm_class, True));
panel->browseBtn = WMCreateCommandButton(panel->iconFrame);
WMResizeWidget(panel->browseBtn, 70, 24);
diff --git a/src/icon.c b/src/icon.c
index fd9bb11..6537ece 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -127,7 +127,7 @@ WIcon *wIconCreate(WWindow * wwin)
#endif
icon->file_image = wDefaultGetImage(scr, wwin->wm_instance, wwin->wm_class, wPreferences.icon_size);
- file = wDefaultGetIconFile(scr, wwin->wm_instance, wwin->wm_class, False);
+ file = wDefaultGetIconFile(wwin->wm_instance, wwin->wm_class, False);
if (file)
icon->file = wstrdup(file);
@@ -617,7 +617,7 @@ void get_pixmap_icon_from_user_icon(WScreen *scr, WIcon * icon)
} else {
/* make default icons */
if (!scr->def_icon_pixmap) {
- file = wDefaultGetIconFile(scr, NULL, NULL, False);
+ file = wDefaultGetIconFile(NULL, NULL, False);
if (file) {
path = FindImage(wPreferences.icon_path, file);
if (path) {
diff --git a/src/switchpanel.c b/src/switchpanel.c
index 8e9e9f6..80b30a3 100644
--- a/src/switchpanel.c
+++ b/src/switchpanel.c
@@ -182,7 +182,7 @@ static void addIconForWindow(WSwitchPanel * panel, WMWidget * parent, WWindow *
image = wDefaultGetImage(panel->scr, wwin->wm_instance, wwin->wm_class, ICON_TILE_SIZE);
if (!image && !panel->defIcon) {
- char *file = wDefaultGetIconFile(panel->scr, NULL, NULL, False);
+ char *file = wDefaultGetIconFile(NULL, NULL, False);
if (file) {
char *path = FindImage(wPreferences.icon_path, file);
if (path) {
diff --git a/src/wdefaults.c b/src/wdefaults.c
index 7170b3d..2169a2f 100644
--- a/src/wdefaults.c
+++ b/src/wdefaults.c
@@ -381,7 +381,7 @@ RImage *wDefaultGetImage(WScreen * scr, char *winstance, char *wclass, int max_s
RImage *image;
/* Get the file name of the image, using instance and class */
- file_name = wDefaultGetIconFile(scr, winstance, wclass, False);
+ file_name = wDefaultGetIconFile(winstance, wclass, False);
if (!file_name)
return NULL;
@@ -433,7 +433,7 @@ int wDefaultGetStartWorkspace(WScreen * scr, char *instance, char *class)
}
/* 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)
+char *wDefaultGetIconFile(char *instance, char *class, Bool noDefault)
{
WMPropList *value;
char *tmp;
diff --git a/src/winspector.c b/src/winspector.c
index 3a75af2..b671087 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -323,7 +323,7 @@ static int showIconFor(WMScreen *scrPtr, InspectorPanel *panel, char *wm_instanc
file = NULL;
}
} else {
- db_icon = wDefaultGetIconFile(panel->inspected->screen_ptr, wm_instance, wm_class, False);
+ db_icon = wDefaultGetIconFile(wm_instance, wm_class, False);
if (db_icon != NULL)
file = wstrdup(db_icon);
}
--
1.7.10