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

wIconUpdate removed image argument

The argument image is not used in any call, so can be removed.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-04-08 19:40:46 +02:00
committed by Carlos R. Mafra
parent c24499f6ad
commit 4093d24625
7 changed files with 38 additions and 42 deletions

View File

@@ -154,7 +154,7 @@ void create_appicon_for_application(WApplication *wapp, WWindow *wwin)
if (!wapp->app_icon) { if (!wapp->app_icon) {
/* Create the icon */ /* Create the icon */
wapp->app_icon = wAppIconCreate(wapp->main_window_desc); wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
wIconUpdate(wapp->app_icon->icon, NULL); wIconUpdate(wapp->app_icon->icon);
/* Now, paint the icon */ /* Now, paint the icon */
if (!WFLAGP(wapp->main_window_desc, no_appicon)) if (!WFLAGP(wapp->main_window_desc, no_appicon))
@@ -999,7 +999,7 @@ static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window m
wapp->app_icon->icon->icon_win = mainw->wm_hints->icon_window; wapp->app_icon->icon->icon_win = mainw->wm_hints->icon_window;
/* Update the icon images */ /* Update the icon images */
wIconUpdate(wapp->app_icon->icon, NULL); wIconUpdate(wapp->app_icon->icon);
/* Paint it */ /* Paint it */
wAppIconPaint(wapp->app_icon); wAppIconPaint(wapp->app_icon);

View File

@@ -472,12 +472,12 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
|| (wwin->wm_hints->flags & IconWindowHint)) { || (wwin->wm_hints->flags & IconWindowHint)) {
WApplication *wapp; WApplication *wapp;
if (wwin->flags.miniaturized && wwin->icon) { if (wwin->flags.miniaturized && wwin->icon)
wIconUpdate(wwin->icon, NULL); wIconUpdate(wwin->icon);
}
wapp = wApplicationOf(wwin->main_window); wapp = wApplicationOf(wwin->main_window);
if (wapp && wapp->app_icon) { if (wapp && wapp->app_icon) {
wIconUpdate(wapp->app_icon->icon, NULL); wIconUpdate(wapp->app_icon->icon);
wAppIconPaint(wapp->app_icon); wAppIconPaint(wapp->app_icon);
} }
} }

View File

@@ -542,7 +542,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry *entry)
aicon->icon->shadowed = 0; aicon->icon->shadowed = 0;
/* Update the icon images */ /* Update the icon images */
wIconUpdate(aicon->icon, NULL); wIconUpdate(aicon->icon);
/* Paint it */ /* Paint it */
wAppIconPaint(aicon); wAppIconPaint(aicon);
@@ -1942,7 +1942,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon
/* Update the icon images */ /* Update the icon images */
if (lupdate_icon) if (lupdate_icon)
wIconUpdate(icon->icon, NULL); wIconUpdate(icon->icon);
/* Paint it */ /* Paint it */
wAppIconPaint(icon); wAppIconPaint(icon);
@@ -2096,7 +2096,7 @@ static Bool moveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x,
/* Update the icon images */ /* Update the icon images */
if (update_icon) if (update_icon)
wIconUpdate(icon->icon, NULL); wIconUpdate(icon->icon);
/* Paint it */ /* Paint it */
wAppIconPaint(icon); wAppIconPaint(icon);
@@ -2173,7 +2173,7 @@ void wDockDetach(WDock *dock, WAppIcon *icon)
/* Update the icon images */ /* Update the icon images */
if (update_icon) if (update_icon)
wIconUpdate(icon->icon, NULL); wIconUpdate(icon->icon);
/* Paint it */ /* Paint it */
wAppIconPaint(icon); wAppIconPaint(icon);

View File

@@ -93,7 +93,7 @@ static void tileObserver(void *self, WMNotification *notif)
{ {
WIcon *icon = (WIcon *) self; WIcon *icon = (WIcon *) self;
wIconUpdate(icon, NULL); wIconUpdate(icon);
XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True); XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True);
} }
@@ -314,7 +314,7 @@ void wIconChangeTitle(WIcon *icon, char *new_title)
icon->icon_name = new_title; icon->icon_name = new_title;
if (changed) if (changed)
wIconUpdate(icon, NULL); wIconUpdate(icon);
else else
wIconPaint(icon); wIconPaint(icon);
} }
@@ -573,13 +573,10 @@ void set_icon_image_from_image(WIcon *icon, RImage *image)
icon->file_image = image; icon->file_image = image;
} }
void wIconUpdate(WIcon *icon, RImage *image) void wIconUpdate(WIcon *icon)
{ {
WWindow *wwin = NULL; WWindow *wwin = NULL;
if (image) {
icon->file_image = image;
} else {
if (icon && icon->owner) if (icon && icon->owner)
wwin = icon->owner; wwin = icon->owner;
@@ -602,7 +599,6 @@ void wIconUpdate(WIcon *icon, RImage *image)
/* Get the Pixmap from the user */ /* Get the Pixmap from the user */
get_rimage_icon_from_user_icon(icon); get_rimage_icon_from_user_icon(icon);
} }
}
update_icon_pixmap(icon); update_icon_pixmap(icon);
} }
@@ -897,5 +893,5 @@ void set_icon_image_from_database(WIcon *icon, char *wm_instance, char *wm_class
wfree(file); wfree(file);
} }
wIconUpdate(icon, NULL); wIconUpdate(icon);
} }

View File

@@ -59,7 +59,7 @@ WIcon *icon_create_for_wwindow(WWindow *wwin);
void set_icon_image_from_database(WIcon *icon, char *wm_instance, char *wm_class, char *command); void set_icon_image_from_database(WIcon *icon, char *wm_instance, char *wm_class, char *command);
void wIconDestroy(WIcon *icon); void wIconDestroy(WIcon *icon);
void wIconPaint(WIcon *icon); void wIconPaint(WIcon *icon);
void wIconUpdate(WIcon *icon, RImage *image); void wIconUpdate(WIcon *icon);
void wIconSelect(WIcon *icon); void wIconSelect(WIcon *icon);
void wIconChangeTitle(WIcon *icon, char *new_title); void wIconChangeTitle(WIcon *icon, char *new_title);
void update_icon_pixmap(WIcon *icon); void update_icon_pixmap(WIcon *icon);

View File

@@ -769,7 +769,7 @@ static void applySettings(WMButton *button, InspectorPanel *panel)
set_icon_image_from_image(wapp->app_icon->icon, image); set_icon_image_from_image(wapp->app_icon->icon, image);
update_icon_pixmap(wapp->app_icon->icon); update_icon_pixmap(wapp->app_icon->icon);
} else { } else {
wIconUpdate(wapp->app_icon->icon, NULL); wIconUpdate(wapp->app_icon->icon);
} }
} }
@@ -781,7 +781,7 @@ static void applySettings(WMButton *button, InspectorPanel *panel)
set_icon_image_from_image(wwin->icon, image); set_icon_image_from_image(wwin->icon, image);
update_icon_pixmap(wwin->icon); update_icon_pixmap(wwin->icon);
} else { } else {
wIconUpdate(wwin->icon, NULL); wIconUpdate(wwin->icon);
} }
} }
} else { } else {

View File

@@ -468,12 +468,12 @@ static void updateIconImage(WWindow *wwin)
/* Refresh the Window Icon */ /* Refresh the Window Icon */
if (wwin->icon) if (wwin->icon)
wIconUpdate(wwin->icon, NULL); wIconUpdate(wwin->icon);
/* Refresh the application icon */ /* Refresh the application icon */
WApplication *app = wApplicationOf(wwin->main_window); WApplication *app = wApplicationOf(wwin->main_window);
if (app && app->app_icon) { if (app && app->app_icon) {
wIconUpdate(app->app_icon->icon, NULL); wIconUpdate(app->app_icon->icon);
wAppIconPaint(app->app_icon); wAppIconPaint(app->app_icon);
} }
} }