diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-26 21:39:43 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-08-26 21:39:43 +0800 |
commit | 692cee58aba936f5df2c791b89b697c1b05d208c (patch) | |
tree | 4e66a336ebfed41fa8ffda9e032dddc9e1f36523 /libempathy-gtk | |
parent | d02dfde3919057b552cf8ba505495d73a8644ae6 (diff) | |
parent | 08c450056e0bb41e7ecc10f505ae0e6fea6dc6ea (diff) | |
download | gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.tar gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.tar.gz gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.tar.bz2 gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.tar.lz gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.tar.xz gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.tar.zst gsoc2013-empathy-692cee58aba936f5df2c791b89b697c1b05d208c.zip |
Merge branch 'irc-wizard-596086'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-widget-irc.c | 41 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget-irc.h | 3 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget-irc.ui | 63 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 12 |
4 files changed, 117 insertions, 2 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">•</property> + </object> + </child> + </object> + <packing> + <property name="position">3</property> + </packing> + </child> + </object> </interface> diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 66c7e467b..1fec201a0 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -901,8 +901,16 @@ account_widget_build_irc (EmpathyAccountWidget *self, const char *filename) { EmpathyAccountWidgetPriv *priv = GET_PRIV (self); - empathy_account_widget_irc_build (self, filename, - &priv->table_common_settings); + + if (priv->simple) + { + empathy_account_widget_irc_build_simple (self, filename); + } + else + { + empathy_account_widget_irc_build (self, filename, + &priv->table_common_settings); + } } static void |