Commit 1900a4d5990558206633398ddc60b36552c83299
1 parent
afb1d0bc
Exists in
master
and in
5 other branches
Radio buttons do dialogo não estavam respeitando as opções pré-definidas
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
po/pt_BR.po
... | ... | @@ -5,7 +5,7 @@ msgid "" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
7 | 7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2013-12-03 13:26-0200\n" | |
8 | +"POT-Creation-Date: 2013-12-03 13:44-0200\n" | |
9 | 9 | "PO-Revision-Date: 2013-12-03 13:26-0200\n" |
10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
11 | 11 | "Language-Team: Portugues <>\n" | ... | ... |
src/pw3270/ft/ftdialog.c
... | ... | @@ -231,7 +231,7 @@ static GtkWidget * ftvalue_new(v3270FTD *dialog, GtkGrid *grid, int r, const str |
231 | 231 | |
232 | 232 | } |
233 | 233 | |
234 | -static GtkWidget * ftradio_new(v3270FTD *dialog, GtkToggleButton **button, const gchar *title, const gchar *tooltip, const struct rdoptions *opt) | |
234 | +static GtkWidget * ftradio_new(v3270FTD *dialog, GtkToggleButton **button, LIB3270_FT_OPTION option, const gchar *title, const gchar *tooltip, const struct rdoptions *opt) | |
235 | 235 | { |
236 | 236 | GtkContainer * frame = GTK_CONTAINER(gtk_frame_new(title)); |
237 | 237 | GtkBox * box = GTK_BOX(gtk_box_new(GTK_ORIENTATION_HORIZONTAL,2)); |
... | ... | @@ -241,7 +241,7 @@ static GtkWidget * ftradio_new(v3270FTD *dialog, GtkToggleButton **button, const |
241 | 241 | for(f=0;opt[f].label;f++) |
242 | 242 | { |
243 | 243 | button[f] = GTK_TOGGLE_BUTTON(gtk_radio_button_new_with_label(lst,gettext(opt[f].label))); |
244 | - gtk_toggle_button_set_active(button[f],(dialog->options & opt[f].flag) != 0); | |
244 | + gtk_toggle_button_set_active(button[f],(dialog->options & opt[f].flag) == opt[f].flag); | |
245 | 245 | if(opt[f].tooltip) |
246 | 246 | gtk_widget_set_tooltip_text(GTK_WIDGET(button[f]),gettext(opt[f].tooltip)); |
247 | 247 | |
... | ... | @@ -528,7 +528,7 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) |
528 | 528 | }; |
529 | 529 | |
530 | 530 | gtk_grid_attach( grid, |
531 | - ftradio_new(dialog,dialog->recfm,_("Record format"),_("Specifies the record format of the data set."),recfm), | |
531 | + ftradio_new(dialog,dialog->recfm,dialog->options,_("Record format"),_("Specifies the record format of the data set."),recfm), | |
532 | 532 | 0,0,2,1 |
533 | 533 | ); |
534 | 534 | |
... | ... | @@ -563,7 +563,7 @@ GtkWidget * v3270_ft_dialog_new(GtkWidget *parent, LIB3270_FT_OPTION options) |
563 | 563 | } |
564 | 564 | }; |
565 | 565 | |
566 | - dialog->units = ftradio_new(dialog,dialog->btnUnits,_("Space allocation units"),_("Specifies the units for the TSO host primary and secondary space options."),units); | |
566 | + dialog->units = ftradio_new(dialog,dialog->btnUnits,dialog->options,_("Space allocation units"),_("Specifies the units for the TSO host primary and secondary space options."),units); | |
567 | 567 | |
568 | 568 | gtk_grid_attach( grid, |
569 | 569 | dialog->units, | ... | ... |
src/pw3270/ft/testprogram.c
... | ... | @@ -47,7 +47,7 @@ int main (int argc, char *argv[]) |
47 | 47 | */ |
48 | 48 | |
49 | 49 | { |
50 | - GtkWidget *win = v3270_ft_dialog_new(NULL,LIB3270_FT_OPTION_SEND); | |
50 | + GtkWidget *win = v3270_ft_dialog_new(NULL,LIB3270_FT_OPTION_SEND|LIB3270_FT_RECORD_FORMAT_VARIABLE); | |
51 | 51 | v3270_ft_dialog_set_tso(win,FALSE); |
52 | 52 | gtk_dialog_run(GTK_DIALOG(win)); |
53 | 53 | } | ... | ... |