aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--libempathy-gtk/empathy-account-widget.c12
-rw-r--r--src/empathy-account-assistant.c3
5 files changed, 118 insertions, 4 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>
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
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index e302aaf66..4e615e82e 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -477,8 +477,7 @@ account_assistant_chooser_enter_details_filter_func (
gboolean is_facebook,
gpointer user_data)
{
- if (!tp_strdiff (protocol->name, "local-xmpp") ||
- !tp_strdiff (protocol->name, "irc"))
+ if (!tp_strdiff (protocol->name, "local-xmpp"))
return FALSE;
return TRUE;