Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:stefjakobs
gwenhywfar
0001-Fix-warning-dialog.c-695-Widget-storePassw...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-warning-dialog.c-695-Widget-storePasswordCheck-n.patch of Package gwenhywfar
From 267875f5b739cbcf281a8c39eece544e429cc4d4 Mon Sep 17 00:00:00 2001 From: Ralf Habacker <ralf.habacker@freenet.de> Date: Wed, 16 Feb 2022 08:59:30 +0100 Subject: [PATCH] Fix warning "dialog.c:695: Widget [storePasswordCheck] not found" The mentioned widget is only available if it has not been removed in GWEN_DlgInput_new() has been removed. To check this state, a new input dialog attribute `storePasswordCheckEnabled` has been added and used in GWEN_DlgInput_Fini(). Fixes bug #251 --- src/gui/dlg_input.c | 8 ++++++-- src/gui/dlg_input_p.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/dlg_input.c b/src/gui/dlg_input.c index 7794326b..097f29da 100644 --- a/src/gui/dlg_input.c +++ b/src/gui/dlg_input.c @@ -125,6 +125,7 @@ GWEN_DIALOG *GWEN_DlgInput_new(uint32_t flags, if (!(n & 2)) { GWEN_Dialog_RemoveWidget(dlg, "storePasswordCheck"); + xdlg->storePasswordCheckEnabled = 1; } return dlg; @@ -221,7 +222,7 @@ void GWEN_DlgInput_Init(GWEN_DIALOG *dlg) GWEN_Dialog_SetIntProperty(dlg, "input1", GWEN_DialogProperty_Focus, 0, 1, 0); - + xdlg->storePasswordCheckEnabled = 0; xdlg->wasInit=1; } @@ -251,7 +252,10 @@ void GWEN_DlgInput_Fini(GWEN_DIALOG *dlg) s=GWEN_Dialog_GetCharProperty(dlg, "input1", GWEN_DialogProperty_Value, 0, NULL); if (s) xdlg->response=strdup(s); - xdlg->flagAllowStore=GWEN_Dialog_GetIntProperty(dlg, "storePasswordCheck", GWEN_DialogProperty_Value, 0, 0); + if (xdlg->storePasswordCheckEnabled) + xdlg->flagAllowStore=GWEN_Dialog_GetIntProperty(dlg, "storePasswordCheck", GWEN_DialogProperty_Value, 0, 0); + else + xdlg->flagAllowStore=0; } #if 0 diff --git a/src/gui/dlg_input_p.h b/src/gui/dlg_input_p.h index 5c627809..313b937c 100644 --- a/src/gui/dlg_input_p.h +++ b/src/gui/dlg_input_p.h @@ -24,6 +24,7 @@ struct GWEN_DLGINPUT { int maxLen; char *response; + int storePasswordCheckEnabled; int flagAllowStore; }; typedef struct GWEN_DLGINPUT GWEN_DLGINPUT; -- 2.26.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor