aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-21 23:30:04 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-22 17:46:20 +0800
commit15d88648810843c23ac86ff2321828dc35d57f5d (patch)
treede38b22c4ec2eb3b9a3c401826fb5b5f0fa53a47
parentd8e5f5d2ec4a2c3582d6764ea388e91ad91a45c6 (diff)
downloadgsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.tar
gsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.tar.gz
gsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.tar.bz2
gsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.tar.lz
gsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.tar.xz
gsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.tar.zst
gsoc2013-empathy-15d88648810843c23ac86ff2321828dc35d57f5d.zip
accounts-dialog: remove protocol chooser
-rw-r--r--src/empathy-accounts-dialog.c99
1 files changed, 0 insertions, 99 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index de15cae83..0e33de2a6 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -99,7 +99,6 @@ typedef struct {
GtkWidget *button_remove;
GtkWidget *button_import;
- GtkWidget *combobox_protocol;
GtkWidget *hbox_protocol;
GtkWidget *image_type;
@@ -871,97 +870,6 @@ accounts_dialog_has_pending_change (EmpathyAccountsDialog *dialog,
}
static void
-accounts_dialog_setup_ui_to_add_account (EmpathyAccountsDialog *dialog)
-{
- EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- EmpathyAccountSettings *settings;
-
- settings = empathy_protocol_chooser_create_account_settings (
- EMPATHY_PROTOCOL_CHOOSER (priv->combobox_protocol));
- if (settings == NULL)
- return;
-
- accounts_dialog_add (dialog, settings);
- accounts_dialog_model_set_selected (dialog, settings);
-
- gtk_widget_show_all (priv->hbox_protocol);
-
- g_object_unref (settings);
-}
-
-static void
-accounts_dialog_protocol_changed_cb (GtkWidget *widget,
- EmpathyAccountsDialog *dialog)
-{
- EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean creating;
- EmpathyAccountSettings *settings;
- gchar *account = NULL, *password = NULL;
-
- /* The "changed" signal is fired during the initiation of the
- * EmpathyProtocolChooser while populating the widget. Such signals should
- * be ignored so we check if we are actually creating a new account. */
- if (priv->setting_widget_object == NULL)
- return;
-
- g_object_get (priv->setting_widget_object,
- "creating-account", &creating, NULL);
- if (!creating)
- return;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
-
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- /* Save "account" and "password" parameters */
- g_object_get (priv->setting_widget_object, "settings", &settings, NULL);
-
- if (settings != NULL)
- {
- account = g_strdup (empathy_account_settings_get_string (settings,
- "account"));
- password = g_strdup (empathy_account_settings_get_string (settings,
- "password"));
- g_object_unref (settings);
- }
-
- /* We are creating a new widget to replace the current one, don't ask
- * confirmation to the user. */
- priv->force_change_row = TRUE;
-
- /* We'll update the selection after we create the new account widgets;
- * updating it right now causes problems for the # of accounts = zero case */
- g_signal_handlers_block_by_func (selection,
- accounts_dialog_model_selection_changed, dialog);
-
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
-
- g_signal_handlers_unblock_by_func (selection,
- accounts_dialog_model_selection_changed, dialog);
-
- accounts_dialog_setup_ui_to_add_account (dialog);
-
- /* Restore "account" and "password" parameters in the new widget */
- if (account != NULL)
- {
- empathy_account_widget_set_account_param (priv->setting_widget_object,
- account);
- g_free (account);
- }
-
- if (password != NULL)
- {
- empathy_account_widget_set_password_param (priv->setting_widget_object,
- password);
- g_free (password);
- }
-}
-
-static void
accounts_dialog_show_question_dialog (EmpathyAccountsDialog *dialog,
const gchar *primary_text,
const gchar *secondary_text,
@@ -2441,13 +2349,6 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog)
gtk_widget_set_sensitive (priv->button_import, FALSE);
gtk_widget_set_sensitive (priv->treeview, FALSE);
- priv->combobox_protocol = empathy_protocol_chooser_new ();
- gtk_box_pack_start (GTK_BOX (priv->hbox_protocol), priv->combobox_protocol,
- TRUE, TRUE, 0);
- g_signal_connect (priv->combobox_protocol, "changed",
- G_CALLBACK (accounts_dialog_protocol_changed_cb),
- dialog);
-
if (priv->parent_window)
gtk_window_set_transient_for (GTK_WINDOW (dialog),
priv->parent_window);