applySettings icon set updated

The function applySettings() set now the icons. Updated icons are:

- Appicon: Always, with or without always_user_icon
- Window: If the window is minimized, with or without always_user_icon.
  Window must be minimized to see the icon change, else, wwin->icon
  doesn't exist and therefore you won't see this change (no icon).

There is a problem if the window is not minimized and is minimezed,
because it will show the icon in the database, not the assigned icon.
This problem must be updated not here, in the wIconifyWindow()
function, at actions.c
This commit is contained in:
Rodolfo García Peñas (kix) authored and Carlos R. Mafra committed 2012-11-17 21:10:36 +01:00
1 parent 3f2c87fb06
commit 2165faec5d
1 file changed
+25 -13
+25 -13
View File
@@ -778,20 +778,32 @@ static void applySettings(WMButton *button, InspectorPanel *panel)
else
paint_app_icon(wapp);
if (wapp->app_icon && wapp->main_window == wwin->client_win) {
char *file = WMGetTextFieldText(panel->fileText);
if (file[0] == 0) {
wfree(file);
file = NULL;
}
wIconChangeImageFile(wapp->app_icon->icon, file);
if (file)
wfree(file);
wAppIconPaint(wapp->app_icon);
char *file = WMGetTextFieldText(panel->fileText);
if (file[0] == 0) {
wfree(file);
file = NULL;
}
if (WFLAGP(wwin, always_user_icon)) {
/* Change icon image if the app is minimized */
if (wwin->icon)
wIconChangeImageFile(wwin->icon, file);
/* Change App Icon image */
if (wapp->app_icon)
wIconChangeImageFile(wapp->app_icon->icon, file);
} else {
/* Change App Icon image */
if (wapp->app_icon)
wIconUpdate(wapp->app_icon->icon, get_rimage_icon_from_wm_hints(wapp->app_icon->icon));
/* Change icon image if the app is minimized */
if (wwin->icon)
wIconUpdate(wwin->icon, get_rimage_icon_from_wm_hints(wwin->icon));
}
if (file)
wfree(file);
}
wNETFrameExtents(wwin);