summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-02-24 16:06:12 +0000
committerbernard.xiong <[email protected]>2010-02-24 16:06:12 +0000
commitfdc074beb25cff52d128430677df8233c8347299 (patch)
treeddff8bc2e25de990ad1a29ffeb838bffac5cce90
parent35e90a50040831d3ad918ad61614a78f668a1d97 (diff)
fix the modal widget initialization issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@444 bbd45198-f89e-11dd-88c7-29a3b14d5316
-rw-r--r--rtgui/widgets/window.c2
-rw-r--r--rtgui/widgets/workbench.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/rtgui/widgets/window.c b/rtgui/widgets/window.c
index 03465f207e..8cba39d0c2 100644
--- a/rtgui/widgets/window.c
+++ b/rtgui/widgets/window.c
@@ -27,6 +27,8 @@ static void _rtgui_win_constructor(rtgui_win_t *win)
win->on_deactivate = RT_NULL;
win->on_close = RT_NULL;
win->title = RT_NULL;
+ win->modal_code = RTGUI_MODAL_OK;
+ win->modal_widget = RT_NULL;
/* set window hide */
RTGUI_WIDGET_HIDE(RTGUI_WIDGET(win));
diff --git a/rtgui/widgets/workbench.c b/rtgui/widgets/workbench.c
index cd0d5fedb3..2408f1254e 100644
--- a/rtgui/widgets/workbench.c
+++ b/rtgui/widgets/workbench.c
@@ -21,11 +21,12 @@ static void _rtgui_workbench_constructor(rtgui_workbench_t *workbench)
rtgui_widget_set_event_handler(RTGUI_WIDGET(workbench), rtgui_workbench_event_handler);
/* set attributes */
- workbench->panel = RT_NULL;
- workbench->flag = RTGUI_WORKBENCH_FLAG_DEFAULT;
- workbench->modal_code = RTGUI_MODAL_OK;
- workbench->title = RT_NULL;
+ workbench->flag = RTGUI_WORKBENCH_FLAG_DEFAULT;
+ workbench->panel = RT_NULL;
+ workbench->title = RT_NULL;
workbench->current_view = RT_NULL;
+ workbench->modal_code = RTGUI_MODAL_OK;
+ workbench->modal_widget = RT_NULL;
}
static void _rtgui_workbench_destructor(rtgui_workbench_t *workbench)