Mercurial > pidgin
diff pidgin/gtkaccount.c @ 31014:695b6e57e255
UI hack ala Google Talk for Facebook.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Tue, 07 Dec 2010 15:05:46 +0000 |
parents | a1964c506f29 |
children | a8cc50c2279f |
line wrap: on
line diff
--- a/pidgin/gtkaccount.c Tue Dec 07 15:04:56 2010 +0000 +++ b/pidgin/gtkaccount.c Tue Dec 07 15:05:46 2010 +0000 @@ -559,10 +559,14 @@ /* Google Talk default domain hackery! */ menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); item = gtk_menu_get_active(GTK_MENU(menu)); - if (value == NULL && g_object_get_data(G_OBJECT(item), "fake") && + if (value == NULL && g_object_get_data(G_OBJECT(item), "fakegoogle") && !strcmp(purple_account_user_split_get_text(split), _("Domain"))) value = "gmail.com"; + if (value == NULL && g_object_get_data(G_OBJECT(item), "fakefacebook") && + !strcmp(purple_account_user_split_get_text(split), _("Domain"))) + value = "chat.facebook.com"; + if (value != NULL) gtk_entry_set_text(GTK_ENTRY(entry), value); } @@ -758,7 +762,7 @@ { PurpleAccountOption *option; PurpleAccount *account; - GtkWidget *vbox, *check, *entry, *combo; + GtkWidget *vbox, *check, *entry, *combo, *menu, *item; GList *list, *node; gint i, idx, int_value; GtkListStore *model; @@ -797,6 +801,9 @@ gtk_label_new_with_mnemonic(_("Ad_vanced")), 1); gtk_widget_show(vbox); + menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(dialog->protocol_menu)); + item = gtk_menu_get_active(GTK_MENU(menu)); + for (l = dialog->prpl_info->protocol_options; l != NULL; l = l->next) { option = (PurpleAccountOption *)l->data; @@ -911,6 +918,10 @@ model = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_POINTER); opt_entry->widget = combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(model)); + if (g_object_get_data(G_OBJECT(item), "fakefacebook") && + !strcmp(opt_entry->setting, "connection_security")) + str_value = "opportunistic_tls"; + /* Loop through list of PurpleKeyValuePair items */ for (node = list; node != NULL; node = node->next) { if (node->data != NULL) {