aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget-irc.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-25 21:23:42 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-26 20:04:09 +0800
commit94895f1acb08a01dc28dae1f423abe43e8f6afbd (patch)
treeee4e12eefc6366b847c5914dd073f1edc6c9a70f /libempathy-gtk/empathy-account-widget-irc.c
parent2de3bc4c03f97f1ceea44f43a1b86dedcb7e6893 (diff)
downloadgsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.tar
gsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.tar.gz
gsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.tar.bz2
gsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.tar.lz
gsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.tar.xz
gsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.tar.zst
gsoc2013-empathy-94895f1acb08a01dc28dae1f423abe43e8f6afbd.zip
account-widget-irc: add simple version of the widget
Diffstat (limited to 'libempathy-gtk/empathy-account-widget-irc.c')
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index d60af5ea8..6cb1e22dd 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -146,3 +146,44 @@ empathy_account_widget_irc_build (EmpathyAccountWidget *self,
g_object_unref (ac_settings);
}
+
+void
+empathy_account_widget_irc_build_simple (EmpathyAccountWidget *self,
+ const char *filename)
+{
+ EmpathyAccountWidgetIrc *settings;
+ EmpathyAccountSettings *ac_settings;
+ GtkAlignment *alignment;
+
+ settings = g_slice_new0 (EmpathyAccountWidgetIrc);
+ settings->self = self;
+
+ self->ui_details->gui = empathy_builder_get_file (filename,
+ "vbox_irc_simple", &self->ui_details->widget,
+ "alignment_network_simple", &alignment,
+ NULL);
+
+ /* Add network chooser button */
+ g_object_get (settings->self, "settings", &ac_settings, NULL);
+
+ settings->network_chooser = empathy_irc_network_chooser_new (ac_settings);
+
+ g_signal_connect (settings->network_chooser, "changed",
+ G_CALLBACK (network_changed_cb), settings);
+
+ gtk_container_add (GTK_CONTAINER (alignment), settings->network_chooser);
+
+ gtk_widget_show (settings->network_chooser);
+
+ empathy_account_widget_handle_params (self,
+ "entry_nick_simple", "account",
+ NULL);
+
+ empathy_builder_connect (self->ui_details->gui, settings,
+ "vbox_irc_simple", "destroy", account_widget_irc_destroy_cb,
+ NULL);
+
+ self->ui_details->default_focus = g_strdup ("entry_nick_simple");
+
+ g_object_unref (ac_settings);
+}