1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Remove unused argument from wDefaultGetIconFile()

The function wDefaultGetIconFile() doesn't use the argument WScreen,
so it can be removed.
This commit is contained in:
Rodolfo García Peñas (kix)
2012-07-03 11:42:39 +02:00
committed by Carlos R. Mafra
parent fd07a6bb36
commit d6db53af0b
8 changed files with 12 additions and 14 deletions

View File

@@ -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)

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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;

View File

@@ -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);
}