+2007-07-28 Xavier Claessens <xclaesse@gmail.com>
+
+ * libempathy-gtk/empathy-account-widget-jabber.c: Try to guess the
+ server from the jid only if we are using the jabber profile. When we
+ guessed a server don't forget to set the "server" McAccount param,
+ setting the entry's text is not enough.
+
2007-07-28 Xavier Claessens <xclaesse@gmail.com>
* libempathy-gtk/empathy-profile-chooser.c: Improve the sort function
mc_account_set_param_string (settings->account, param, str);
if (widget == settings->entry_id) {
- /* Try to guess the server */
- gchar *server;
-
- server = strstr (str, "@");
- if (server != NULL) {
- /* skip the leading @ */
- server++;
- gtk_entry_set_text (GTK_ENTRY (settings->entry_server), server);
+ McProfile *profile;
+ const gchar *profile_name;
+
+ /* Try to guess the server if we are using the vanilla
+ * jabber profile. We don't have to do that with
+ * gtalk profile. */
+ profile = mc_account_get_profile (settings->account);
+ profile_name = mc_profile_get_unique_name (profile);
+ if (strcmp (profile_name, "jabber") == 0) {
+ gchar *server;
+
+ server = strstr (str, "@");
+ if (server != NULL) {
+ /* skip the leading @ */
+ server++;
+ gtk_entry_set_text (GTK_ENTRY (settings->entry_server), server);
+ mc_account_set_param_string (settings->account, "server", server);
+ }
}
+ g_object_unref (profile);
}
}