@@ -14,13 +14,13 @@ public class SwitchboardPlugUserAccounts.NewUserDialog : Granite.Dialog {
1414 }
1515
1616 construct {
17- var accounttype_combobox = new Gtk .ComboBoxText ();
18- accounttype_combobox . append_text ( _(" Standard User" ));
19- accounttype_combobox . append_text ( _(" Administrator" ));
20- accounttype_combobox . set_active ( 0 );
17+ var accounttype_dropdown = new Gtk .DropDown .from_strings ({
18+ _(" Standard User" ),
19+ _(" Administrator" )
20+ } );
2121
2222 var accounttype_label = new Granite .HeaderLabel (_(" Account Type" )) {
23- mnemonic_widget = accounttype_combobox
23+ mnemonic_widget = accounttype_dropdown
2424 };
2525
2626 var realname_entry = new Gtk .Entry () {
@@ -48,7 +48,7 @@ public class SwitchboardPlugUserAccounts.NewUserDialog : Granite.Dialog {
4848 vexpand = true
4949 };
5050 form_box. append (accounttype_label);
51- form_box. append (accounttype_combobox );
51+ form_box. append (accounttype_dropdown );
5252 form_box. append (new ErrorRevealer (" ." ));
5353 form_box. append (realname_label);
5454 form_box. append (realname_entry);
@@ -88,9 +88,9 @@ public class SwitchboardPlugUserAccounts.NewUserDialog : Granite.Dialog {
8888 string fullname = realname_entry. text;
8989 string username = username_entry. text;
9090 string password = pw_editor. get_password ();
91- Act . UserAccountType accounttype = Act . UserAccountType . STANDARD ;
91+ var accounttype = Act . UserAccountType . STANDARD ;
9292
93- if (accounttype_combobox . get_active () == 1 ) {
93+ if (accounttype_dropdown . selected == 1 ) {
9494 accounttype = Act . UserAccountType . ADMINISTRATOR ;
9595 }
9696
0 commit comments