| 449 return; |
449 return; |
| 450 } |
450 } |
| 451 |
451 |
| 452 to = gtk_entry_get_text(GTK_ENTRY(to_entry)); |
452 to = gtk_entry_get_text(GTK_ENTRY(to_entry)); |
| 453 type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(type_combo)); |
453 type = gtk_combo_box_get_active_text(GTK_COMBO_BOX(type_combo)); |
| 454 if (!strcmp(type, "default")) |
454 if (purple_strequal(type, "default")) |
| 455 type = ""; |
455 type = ""; |
| 456 show = gtk_combo_box_get_active_text(GTK_COMBO_BOX(show_combo)); |
456 show = gtk_combo_box_get_active_text(GTK_COMBO_BOX(show_combo)); |
| 457 if (!strcmp(show, "default")) |
457 if (purple_strequal(show, "default")) |
| 458 show = ""; |
458 show = ""; |
| 459 status = gtk_entry_get_text(GTK_ENTRY(status_entry)); |
459 status = gtk_entry_get_text(GTK_ENTRY(status_entry)); |
| 460 priority = gtk_entry_get_text(GTK_ENTRY(priority_entry)); |
460 priority = gtk_entry_get_text(GTK_ENTRY(priority_entry)); |
| 461 if (!strcmp(priority, "0")) |
461 if (purple_strequal(priority, "0")) |
| 462 priority = ""; |
462 priority = ""; |
| 463 |
463 |
| 464 stanza = g_strdup_printf("<presence %s%s%s id='console%x' %s%s%s>" |
464 stanza = g_strdup_printf("<presence %s%s%s id='console%x' %s%s%s>" |
| 465 "%s%s%s%s%s%s%s%s%s" |
465 "%s%s%s%s%s%s%s%s%s" |
| 466 "</presence>", |
466 "</presence>", |
| 768 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
768 gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); |
| 769 gtk_box_pack_start(GTK_BOX(console->hbox), label, FALSE, FALSE, 0); |
769 gtk_box_pack_start(GTK_BOX(console->hbox), label, FALSE, FALSE, 0); |
| 770 console->dropdown = gtk_combo_box_new_text(); |
770 console->dropdown = gtk_combo_box_new_text(); |
| 771 for (connections = purple_connections_get_all(); connections; connections = connections->next) { |
771 for (connections = purple_connections_get_all(); connections; connections = connections->next) { |
| 772 PurpleConnection *gc = connections->data; |
772 PurpleConnection *gc = connections->data; |
| 773 if (!strcmp(purple_account_get_protocol_id(purple_connection_get_account(gc)), "prpl-jabber")) { |
773 if (purple_strequal(purple_account_get_protocol_id(purple_connection_get_account(gc)), "prpl-jabber")) { |
| 774 console->count++; |
774 console->count++; |
| 775 console->accounts = g_list_append(console->accounts, gc); |
775 console->accounts = g_list_append(console->accounts, gc); |
| 776 gtk_combo_box_append_text(GTK_COMBO_BOX(console->dropdown), |
776 gtk_combo_box_append_text(GTK_COMBO_BOX(console->dropdown), |
| 777 purple_account_get_username(purple_connection_get_account(gc))); |
777 purple_account_get_username(purple_connection_get_account(gc))); |
| 778 if (!console->gc) |
778 if (!console->gc) |
| 785 |
785 |
| 786 console->imhtml = gtk_imhtml_new(NULL, NULL); |
786 console->imhtml = gtk_imhtml_new(NULL, NULL); |
| 787 if (console->count == 0) |
787 if (console->count == 0) |
| 788 gtk_imhtml_append_text(GTK_IMHTML(console->imhtml), |
788 gtk_imhtml_append_text(GTK_IMHTML(console->imhtml), |
| 789 _("<font color='#777777'>Not connected to XMPP</font>"), 0); |
789 _("<font color='#777777'>Not connected to XMPP</font>"), 0); |
| 790 gtk_box_pack_start(GTK_BOX(vbox), |
790 gtk_box_pack_start(GTK_BOX(vbox), |
| 791 pidgin_make_scrollable(console->imhtml, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC, GTK_SHADOW_ETCHED_IN, -1, -1), |
791 pidgin_make_scrollable(console->imhtml, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC, GTK_SHADOW_ETCHED_IN, -1, -1), |
| 792 TRUE, TRUE, 0); |
792 TRUE, TRUE, 0); |
| 793 |
793 |
| 794 toolbar = gtk_toolbar_new(); |
794 toolbar = gtk_toolbar_new(); |
| 795 button = gtk_tool_button_new(NULL, "<iq/>"); |
795 button = gtk_tool_button_new(NULL, "<iq/>"); |