mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
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:
committed by
Carlos R. Mafra
parent
3f2c87fb06
commit
2165faec5d
@@ -778,20 +778,32 @@ static void applySettings(WMButton *button, InspectorPanel *panel)
|
|||||||
else
|
else
|
||||||
paint_app_icon(wapp);
|
paint_app_icon(wapp);
|
||||||
|
|
||||||
if (wapp->app_icon && wapp->main_window == wwin->client_win) {
|
char *file = WMGetTextFieldText(panel->fileText);
|
||||||
char *file = WMGetTextFieldText(panel->fileText);
|
if (file[0] == 0) {
|
||||||
|
wfree(file);
|
||||||
if (file[0] == 0) {
|
file = NULL;
|
||||||
wfree(file);
|
|
||||||
file = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
wIconChangeImageFile(wapp->app_icon->icon, file);
|
|
||||||
if (file)
|
|
||||||
wfree(file);
|
|
||||||
|
|
||||||
wAppIconPaint(wapp->app_icon);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
wNETFrameExtents(wwin);
|
||||||
|
|||||||
Reference in New Issue
Block a user