diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-06-10 23:03:29 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-06-11 18:21:30 +0800 |
commit | 58c031e979d623fdf447351713ffb0fafb801ce6 (patch) | |
tree | 59fdd0398596f262c63256e209beb7b6d256bdfa /src/empathy-accounts-dialog.c | |
parent | 50b28b2222b2b2d1f32ef7a9968e3441da13df7a (diff) | |
download | gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.tar gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.tar.gz gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.tar.bz2 gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.tar.lz gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.tar.xz gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.tar.zst gsoc2013-empathy-58c031e979d623fdf447351713ffb0fafb801ce6.zip |
empathy-accounts-dialog: Use radio buttons instead of a checkbox for the 'reuse existing account' UI
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r-- | src/empathy-accounts-dialog.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index dcf6bcc96..1dcde458f 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -72,7 +72,8 @@ typedef struct { GtkWidget *hbox_type; GtkWidget *button_create; GtkWidget *button_back; - GtkWidget *checkbutton_register; + GtkWidget *radiobutton_reuse; + GtkWidget *radiobutton_register; GtkWidget *image_type; GtkWidget *label_name; @@ -842,8 +843,8 @@ accounts_dialog_button_create_clicked_cb (GtkWidget *button, if (cap & MC_PROFILE_CAPABILITY_REGISTRATION_UI) { gboolean active; - active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->checkbutton_register)); - if (!active) { + active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->radiobutton_register)); + if (active) { mc_account_set_param_boolean (account, "register", TRUE); } } @@ -877,9 +878,11 @@ accounts_dialog_profile_changed_cb (GtkWidget *widget, cap = mc_profile_get_capabilities (profile); if (cap & MC_PROFILE_CAPABILITY_REGISTRATION_UI) { - gtk_widget_show (dialog->checkbutton_register); + gtk_widget_show (dialog->radiobutton_register); + gtk_widget_show (dialog->radiobutton_reuse); } else { - gtk_widget_hide (dialog->checkbutton_register); + gtk_widget_hide (dialog->radiobutton_register); + gtk_widget_hide (dialog->radiobutton_reuse); } g_object_unref (profile); } @@ -910,8 +913,8 @@ accounts_dialog_button_add_clicked_cb (GtkWidget *button, gtk_widget_hide (dialog->button_back); } - accounts_dialog_profile_changed_cb (dialog->checkbutton_register, dialog); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->checkbutton_register), + accounts_dialog_profile_changed_cb (dialog->radiobutton_register, dialog); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->radiobutton_reuse), TRUE); gtk_combo_box_set_active (GTK_COMBO_BOX (dialog->combobox_profile), 0); gtk_widget_grab_focus (dialog->combobox_profile); @@ -1071,7 +1074,8 @@ empathy_accounts_dialog_show (GtkWindow *parent, "hbox_type", &dialog->hbox_type, "button_create", &dialog->button_create, "button_back", &dialog->button_back, - "checkbutton_register", &dialog->checkbutton_register, + "radiobutton_reuse", &dialog->radiobutton_reuse, + "radiobutton_register", &dialog->radiobutton_register, "image_type", &dialog->image_type, "label_name", &dialog->label_name, "button_add", &dialog->button_add, |