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

wmaker: removed unnecessary variable 'done' in panelBtnCallback

The variable is assigned a value that never change, so it adds extra
complexity which is not good for code maintainability. It is probable that
this was meant for cases that are handled in current code with early
function return, which are better for code readability.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
Christophe CURIS
2014-11-15 19:40:45 +01:00
committed by Carlos R. Mafra
parent a6d7ac8cb9
commit 694e66e30d

View File

@@ -154,7 +154,6 @@ static void panelBtnCallback(WMWidget * self, void *data)
WMButton *btn = self;
AppSettingsPanel *panel = (AppSettingsPanel *) data;
char *text;
int done = 1;
if (panel->okBtn == btn) {
text = WMGetTextFieldText(panel->iconField);
@@ -215,8 +214,7 @@ static void panelBtnCallback(WMWidget * self, void *data)
panel->editedIcon->lock = WMGetButtonSelected(panel->lockBtn);
}
if (done)
DestroyDockAppSettingsPanel(panel);
DestroyDockAppSettingsPanel(panel);
}
#define PWIDTH 295