aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c41
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.h3
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.ui63
3 files changed, 107 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);
+}
diff --git a/libempathy-gtk/empathy-account-widget-irc.h b/libempathy-gtk/empathy-account-widget-irc.h
index 022158529..0c51cfa8f 100644
--- a/libempathy-gtk/empathy-account-widget-irc.h
+++ b/libempathy-gtk/empathy-account-widget-irc.h
@@ -30,6 +30,9 @@ void empathy_account_widget_irc_build (EmpathyAccountWidget *self,
const char *filename,
GtkWidget **table_common_settings);
+void empathy_account_widget_irc_build_simple (EmpathyAccountWidget *self,
+ const char *filename);
+
G_END_DECLS
#endif /* __EMPATHY_ACCOUNT_WIDGET_IRC_H__ */
diff --git a/libempathy-gtk/empathy-account-widget-irc.ui b/libempathy-gtk/empathy-account-widget-irc.ui
index de0aa00cd..c69a54790 100644
--- a/libempathy-gtk/empathy-account-widget-irc.ui
+++ b/libempathy-gtk/empathy-account-widget-irc.ui
@@ -392,4 +392,67 @@
</packing>
</child>
</object>
+ <object class="GtkVBox" id="vbox_irc_simple">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkLabel" id="label_network_simple">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Which IRC network?</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment_network_simple">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xscale">0.34999999403953552</property>
+ <property name="yscale">0.34999999403953552</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">3</property>
+ <property name="left_padding">12</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_nick_simple">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">What is your IRC nick?</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment_nick_simple">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xscale">0.34999999403953552</property>
+ <property name="yscale">0.34999999403953552</property>
+ <property name="top_padding">6</property>
+ <property name="bottom_padding">3</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkEntry" id="entry_nick_simple">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x2022;</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
</interface>