aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-07-27 06:54:23 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-07-30 06:13:20 +0800
commit000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f (patch)
tree69f482485a68ffb3423c9376f853f42c6b19acfa /src
parenta84e75c56b59533a551a411ff7a2aa7d88659cd4 (diff)
downloadgsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.tar
gsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.tar.gz
gsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.tar.bz2
gsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.tar.lz
gsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.tar.xz
gsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.tar.zst
gsoc2013-empathy-000a7c0ca4dc343b42e628323ddd1ca0f2a08e3f.zip
First cut at GObject-ifying EmpathyAccountWidget
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 78ef4fe75..bfdae5c4c 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -137,28 +137,27 @@ accounts_dialog_update_name_label (EmpathyAccountsDialog *dialog,
g_free (text);
}
-typedef GtkWidget *CreateWidget (EmpathyAccountSettings *);
-
static GtkWidget *
get_account_setup_widget (EmpathyAccountSettings *settings)
{
const gchar *cm = empathy_account_settings_get_cm (settings);
const gchar *proto = empathy_account_settings_get_protocol (settings);
+
+ g_print ("cm : %s, proto %s\n", cm, proto);
struct {
const gchar *cm;
const gchar *proto;
- CreateWidget *cb;
} dialogs[] = {
- { "gabble", "jabber", empathy_account_widget_jabber_new},
- { "butterfly", "msn", empathy_account_widget_msn_new},
- { "salut", "local-xmpp", empathy_account_widget_salut_new},
- { "idle", "irc", empathy_account_widget_irc_new},
- { "haze", "icq", empathy_account_widget_icq_new},
- { "haze", "aim", empathy_account_widget_aim_new},
- { "haze", "yahoo", empathy_account_widget_yahoo_new},
- { "haze", "groupwise", empathy_account_widget_groupwise_new},
- { "sofiasip", "sip", empathy_account_widget_sip_new},
- { NULL, NULL, NULL }
+ { "gabble", "jabber" },
+ { "butterfly", "msn" },
+ { "salut", "local-xmpp" },
+ { "idle", "irc" },
+ { "haze", "icq" },
+ { "haze", "aim" },
+ { "haze", "yahoo" },
+ { "haze", "groupwise" },
+ { "sofiasip", "sip" },
+ { NULL, NULL }
};
int i;
@@ -166,10 +165,10 @@ get_account_setup_widget (EmpathyAccountSettings *settings)
{
if (!tp_strdiff (cm, dialogs[i].cm)
&& !tp_strdiff (proto, dialogs[i].proto))
- return dialogs[i].cb (settings);
+ return empathy_account_widget_new_for_protocol (dialogs[i].proto, settings);
}
- return empathy_account_widget_generic_new (settings);
+ return empathy_account_widget_new_for_protocol ("generic", settings);
}
static void