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) {
/* Create the icon */
wapp->app_icon = wAppIconCreate(wapp->main_window_desc);
wIconUpdate(wapp->app_icon->icon, NULL);
wIconUpdate(wapp->app_icon->icon);
/* Now, paint the icon */
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;
/* Update the icon images */
wIconUpdate(wapp->app_icon->icon, NULL);
wIconUpdate(wapp->app_icon->icon);
/* Paint it */
wAppIconPaint(wapp->app_icon);

View File

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

View File

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

View File

@@ -93,7 +93,7 @@ static void tileObserver(void *self, WMNotification *notif)
{
WIcon *icon = (WIcon *) self;
wIconUpdate(icon, NULL);
wIconUpdate(icon);
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;
if (changed)
wIconUpdate(icon, NULL);
wIconUpdate(icon);
else
wIconPaint(icon);
}
@@ -573,35 +573,31 @@ void set_icon_image_from_image(WIcon *icon, RImage *image)
icon->file_image = image;
}
void wIconUpdate(WIcon *icon, RImage *image)
void wIconUpdate(WIcon *icon)
{
WWindow *wwin = NULL;
if (image) {
icon->file_image = image;
} else {
if (icon && icon->owner)
wwin = icon->owner;
if (icon && icon->owner)
wwin = icon->owner;
if (wwin && WFLAGP(wwin, always_user_icon)) {
/* Forced use user_icon */
if (wwin && WFLAGP(wwin, always_user_icon)) {
/* Forced use user_icon */
get_rimage_icon_from_user_icon(icon);
} else if (icon->icon_win != None) {
/* Get the Pixmap from the WIcon */
get_rimage_icon_from_icon_win(icon);
} else if (wwin && wwin->net_icon_image) {
/* Use _NET_WM_ICON icon */
get_rimage_icon_from_x11(icon);
} else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) {
/* Get the Pixmap from the wm_hints, else, from the user */
unset_icon_image(icon);
icon->file_image = get_rimage_icon_from_wm_hints(icon);
if (!icon->file_image)
get_rimage_icon_from_user_icon(icon);
} else if (icon->icon_win != None) {
/* Get the Pixmap from the WIcon */
get_rimage_icon_from_icon_win(icon);
} else if (wwin && wwin->net_icon_image) {
/* Use _NET_WM_ICON icon */
get_rimage_icon_from_x11(icon);
} else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) {
/* Get the Pixmap from the wm_hints, else, from the user */
unset_icon_image(icon);
icon->file_image = get_rimage_icon_from_wm_hints(icon);
if (!icon->file_image)
get_rimage_icon_from_user_icon(icon);
} else {
/* Get the Pixmap from the user */
get_rimage_icon_from_user_icon(icon);
}
} else {
/* Get the Pixmap from the user */
get_rimage_icon_from_user_icon(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);
}
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 wIconDestroy(WIcon *icon);
void wIconPaint(WIcon *icon);
void wIconUpdate(WIcon *icon, RImage *image);
void wIconUpdate(WIcon *icon);
void wIconSelect(WIcon *icon);
void wIconChangeTitle(WIcon *icon, char *new_title);
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);
update_icon_pixmap(wapp->app_icon->icon);
} 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);
update_icon_pixmap(wwin->icon);
} else {
wIconUpdate(wwin->icon, NULL);
wIconUpdate(wwin->icon);
}
}
} else {

View File

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