(quick_widget_t): add pos_flags member.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-10-03 13:33:01 +04:00
parent 322bf132d7
commit 612c32349d
2 changed files with 18 additions and 1 deletions

View File

@ -93,6 +93,8 @@ quick_create_labeled_input (GArray * widgets, int *y, int x, quick_widget_t * qu
label.quick_widget = g_new0 (quick_widget_t, 1);
label.quick_widget->widget_type = quick_label;
label.quick_widget->options = quick_widget->options;
/* FIXME: this should be turned in depend of label_location */
label.quick_widget->pos_flags = quick_widget->pos_flags;
switch (quick_widget->u.input.label_location)
{
@ -555,7 +557,7 @@ quick_dialog_skip (quick_dialog_t * quick_dlg, int nskip)
/* add widget into dialog */
item->widget->options |= item->quick_widget->options; /* FIXME: cannot reset flags, setup only */
id = add_widget (dd, item->widget);
id = add_widget_autopos (dd, item->widget, item->quick_widget->pos_flags, NULL);
if (item->quick_widget->id != NULL)
*item->quick_widget->id = id;
}

View File

@ -13,6 +13,7 @@
{ \
.widget_type = quick_checkbox, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = id_, \
.u = { \
.checkbox = { \
@ -26,6 +27,7 @@
{ \
.widget_type = quick_button, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = id_, \
.u = { \
.button = { \
@ -40,6 +42,7 @@
{ \
.widget_type = quick_input, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = id_, \
.u = { \
.input = { \
@ -58,6 +61,7 @@
{ \
.widget_type = quick_input, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = id_, \
.u = { \
.input = { \
@ -76,6 +80,7 @@
{ \
.widget_type = quick_label, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = id_, \
.u = { \
.label = { \
@ -89,6 +94,7 @@
{ \
.widget_type = quick_radio, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = id_, \
.u = { \
.radio = { \
@ -103,6 +109,7 @@
{ \
.widget_type = quick_start_groupbox, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.groupbox = { \
@ -115,6 +122,7 @@
{ \
.widget_type = quick_stop_groupbox, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.input = { \
@ -130,6 +138,7 @@
{ \
.widget_type = quick_separator, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.separator = { \
@ -143,6 +152,7 @@
{ \
.widget_type = quick_start_columns, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.input = { \
@ -158,6 +168,7 @@
{ \
.widget_type = quick_next_column, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.input = { \
@ -173,6 +184,7 @@
{ \
.widget_type = quick_stop_columns, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.input = { \
@ -188,6 +200,7 @@
{ \
.widget_type = quick_buttons, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.separator = { \
@ -206,6 +219,7 @@
{ \
.widget_type = quick_end, \
.options = 0, \
.pos_flags = WPOS_KEEP_DEFAULT, \
.id = NULL, \
.u = { \
.input = { \
@ -256,6 +270,7 @@ struct quick_widget_t
quick_t widget_type;
widget_options_t options;
widget_pos_flags_t pos_flags;
unsigned long *id;
/* widget parameters */