mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-26 16:32:30 +01:00
wAppIconPaint paint argument
The function wAppIconPaint has a new argument. This argument is used to force an icon create if needed.
This commit is contained in:
committed by
Carlos R. Mafra
parent
a3078a5095
commit
33ebded4f9
@@ -151,15 +151,15 @@ static void panelBtnCallback(WMWidget * self, void *data)
|
||||
WMButton *btn = self;
|
||||
AppSettingsPanel *panel = (AppSettingsPanel *) data;
|
||||
char *text;
|
||||
int done;
|
||||
int done = 1;
|
||||
|
||||
done = 1;
|
||||
if (panel->okBtn == btn) {
|
||||
text = WMGetTextFieldText(panel->iconField);
|
||||
if (text[0] == 0) {
|
||||
wfree(text);
|
||||
text = NULL;
|
||||
}
|
||||
|
||||
if (!wIconChangeImageFile(panel->editedIcon->icon, text)) {
|
||||
char *buf;
|
||||
int len = strlen(text) + 64;
|
||||
@@ -177,10 +177,12 @@ static void panelBtnCallback(WMWidget * self, void *data)
|
||||
} else {
|
||||
WAppIcon *aicon = panel->editedIcon;
|
||||
|
||||
/* The image was updated in wIconChangeImageFile,
|
||||
* so we don't need udpate it at wAppIconPaint */
|
||||
if (aicon == aicon->icon->core->screen_ptr->clip_icon)
|
||||
wClipIconPaint(aicon);
|
||||
else
|
||||
wAppIconPaint(aicon);
|
||||
wAppIconPaint(aicon, False);
|
||||
|
||||
wDefaultChangeIcon(panel->wwin->screen_ptr, aicon->wm_instance, aicon->wm_class, text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user