pidgin/gtkconv.c

changeset 30706
612b36b49058
parent 30407
4ec2fadc96e8
child 30802
165991082b46
equal deleted inserted replaced
30705:7ff782ca5089 30706:612b36b49058
748 748
749 static void 749 static void
750 do_invite(GtkWidget *w, int resp, InviteBuddyInfo *info) 750 do_invite(GtkWidget *w, int resp, InviteBuddyInfo *info)
751 { 751 {
752 const char *buddy, *message; 752 const char *buddy, *message;
753 PidginConversation *gtkconv; 753 PurpleConversation *conv;
754 754
755 gtkconv = PIDGIN_CONVERSATION(info->conv); 755 conv = info->conv;
756 756
757 if (resp == GTK_RESPONSE_OK) { 757 if (resp == GTK_RESPONSE_OK) {
758 buddy = gtk_entry_get_text(GTK_ENTRY(info->entry)); 758 buddy = gtk_entry_get_text(GTK_ENTRY(info->entry));
759 message = gtk_entry_get_text(GTK_ENTRY(info->message)); 759 message = gtk_entry_get_text(GTK_ENTRY(info->message));
760 760
761 if (!g_ascii_strcasecmp(buddy, "")) 761 if (!g_ascii_strcasecmp(buddy, ""))
762 return; 762 return;
763 763
764 serv_chat_invite(purple_conversation_get_gc(info->conv), 764 serv_chat_invite(purple_conversation_get_gc(conv),
765 purple_conv_chat_get_id(PURPLE_CONV_CHAT(info->conv)), 765 purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)),
766 message, buddy); 766 message, buddy);
767 } 767 }
768 768
769 gtk_widget_destroy(invite_dialog); 769 gtk_widget_destroy(invite_dialog);
770 invite_dialog = NULL; 770 invite_dialog = NULL;
854 { 854 {
855 PurpleConversation *conv = gtkconv->active_conv; 855 PurpleConversation *conv = gtkconv->active_conv;
856 InviteBuddyInfo *info = NULL; 856 InviteBuddyInfo *info = NULL;
857 857
858 if (invite_dialog == NULL) { 858 if (invite_dialog == NULL) {
859 PurpleConnection *gc;
860 PidginWindow *gtkwin; 859 PidginWindow *gtkwin;
861 GtkWidget *label; 860 GtkWidget *label;
862 GtkWidget *vbox, *hbox; 861 GtkWidget *vbox, *hbox;
863 GtkWidget *table; 862 GtkWidget *table;
864 GtkWidget *img; 863 GtkWidget *img;
867 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE)); 866 gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_HUGE));
868 867
869 info = g_new0(InviteBuddyInfo, 1); 868 info = g_new0(InviteBuddyInfo, 1);
870 info->conv = conv; 869 info->conv = conv;
871 870
872 gc = purple_conversation_get_gc(conv);
873 gtkwin = pidgin_conv_get_window(gtkconv); 871 gtkwin = pidgin_conv_get_window(gtkconv);
874 872
875 /* Create the new dialog. */ 873 /* Create the new dialog. */
876 invite_dialog = gtk_dialog_new_with_buttons( 874 invite_dialog = gtk_dialog_new_with_buttons(
877 _("Invite Buddy Into Chat Room"), 875 _("Invite Buddy Into Chat Room"),
1198 1196
1199 static void 1197 static void
1200 menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget) 1198 menu_insert_image_cb(gpointer data, guint action, GtkWidget *widget)
1201 { 1199 {
1202 PidginWindow *win = data; 1200 PidginWindow *win = data;
1203 PurpleConversation *conv;
1204 PidginConversation *gtkconv; 1201 PidginConversation *gtkconv;
1205 GtkIMHtmlToolbar *toolbar; 1202 GtkIMHtmlToolbar *toolbar;
1206 1203
1207 gtkconv = pidgin_conv_window_get_active_gtkconv(win); 1204 gtkconv = pidgin_conv_window_get_active_gtkconv(win);
1208 conv = gtkconv->active_conv;
1209 toolbar = GTK_IMHTMLTOOLBAR(gtkconv->toolbar); 1205 toolbar = GTK_IMHTMLTOOLBAR(gtkconv->toolbar);
1210 1206
1211 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->image), 1207 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toolbar->image),
1212 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->image))); 1208 !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toolbar->image)));
1213 } 1209 }
1909 1905
1910 static gboolean 1906 static gboolean
1911 conv_keypress_common(PidginConversation *gtkconv, GdkEventKey *event) 1907 conv_keypress_common(PidginConversation *gtkconv, GdkEventKey *event)
1912 { 1908 {
1913 PidginWindow *win; 1909 PidginWindow *win;
1914 PurpleConversation *conv;
1915 int curconv; 1910 int curconv;
1916 1911
1917 conv = gtkconv->active_conv;
1918 win = gtkconv->win; 1912 win = gtkconv->win;
1919 curconv = gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook)); 1913 curconv = gtk_notebook_get_current_page(GTK_NOTEBOOK(win->notebook));
1920 1914
1921 /* clear any tooltips */ 1915 /* clear any tooltips */
1922 pidgin_tooltip_destroy(); 1916 pidgin_tooltip_destroy();
2007 } 2001 }
2008 2002
2009 static gboolean 2003 static gboolean
2010 entry_key_press_cb(GtkWidget *entry, GdkEventKey *event, gpointer data) 2004 entry_key_press_cb(GtkWidget *entry, GdkEventKey *event, gpointer data)
2011 { 2005 {
2012 PidginWindow *win;
2013 PurpleConversation *conv; 2006 PurpleConversation *conv;
2014 PidginConversation *gtkconv; 2007 PidginConversation *gtkconv;
2015 2008
2016 gtkconv = (PidginConversation *)data; 2009 gtkconv = (PidginConversation *)data;
2017 conv = gtkconv->active_conv; 2010 conv = gtkconv->active_conv;
2018 win = gtkconv->win;
2019 2011
2020 if (conv_keypress_common(gtkconv, event)) 2012 if (conv_keypress_common(gtkconv, event))
2021 return TRUE; 2013 return TRUE;
2022 2014
2023 /* If CTRL was held down... */ 2015 /* If CTRL was held down... */
2348 static void 2340 static void
2349 insert_text_cb(GtkTextBuffer *textbuffer, GtkTextIter *position, 2341 insert_text_cb(GtkTextBuffer *textbuffer, GtkTextIter *position,
2350 gchar *new_text, gint new_text_length, gpointer user_data) 2342 gchar *new_text, gint new_text_length, gpointer user_data)
2351 { 2343 {
2352 PidginConversation *gtkconv = (PidginConversation *)user_data; 2344 PidginConversation *gtkconv = (PidginConversation *)user_data;
2353 PurpleConversation *conv;
2354 2345
2355 g_return_if_fail(gtkconv != NULL); 2346 g_return_if_fail(gtkconv != NULL);
2356
2357 conv = gtkconv->active_conv;
2358 2347
2359 if (!purple_prefs_get_bool("/purple/conversations/im/send_typing")) 2348 if (!purple_prefs_get_bool("/purple/conversations/im/send_typing"))
2360 return; 2349 return;
2361 2350
2362 got_typing_keypress(gtkconv, (gtk_text_iter_is_start(position) && 2351 got_typing_keypress(gtkconv, (gtk_text_iter_is_start(position) &&
2615 redraw_icon(gpointer data) 2604 redraw_icon(gpointer data)
2616 { 2605 {
2617 PidginConversation *gtkconv = (PidginConversation *)data; 2606 PidginConversation *gtkconv = (PidginConversation *)data;
2618 PurpleConversation *conv = gtkconv->active_conv; 2607 PurpleConversation *conv = gtkconv->active_conv;
2619 PurpleAccount *account; 2608 PurpleAccount *account;
2620 PurplePluginProtocolInfo *prpl_info = NULL;
2621 2609
2622 GdkPixbuf *buf; 2610 GdkPixbuf *buf;
2623 GdkPixbuf *scale; 2611 GdkPixbuf *scale;
2624 gint delay; 2612 gint delay;
2625 int scale_width, scale_height; 2613 int scale_width, scale_height;
2626 int size; 2614 int size;
2627 2615
2628 gtkconv = PIDGIN_CONVERSATION(conv); 2616 gtkconv = PIDGIN_CONVERSATION(conv);
2629 account = purple_conversation_get_account(conv); 2617 account = purple_conversation_get_account(conv);
2630 2618
2631 if(account && account->gc) { 2619 if (!(account && account->gc)) {
2632 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
2633 } else {
2634 gtkconv->u.im->icon_timer = 0; 2620 gtkconv->u.im->icon_timer = 0;
2635 return FALSE; 2621 return FALSE;
2636 } 2622 }
2637 2623
2638 gdk_pixbuf_animation_iter_advance(gtkconv->u.im->iter, NULL); 2624 gdk_pixbuf_animation_iter_advance(gtkconv->u.im->iter, NULL);
2700 remove_icon(GtkWidget *widget, PidginConversation *gtkconv) 2686 remove_icon(GtkWidget *widget, PidginConversation *gtkconv)
2701 { 2687 {
2702 GList *children; 2688 GList *children;
2703 GtkWidget *event; 2689 GtkWidget *event;
2704 PurpleConversation *conv = gtkconv->active_conv; 2690 PurpleConversation *conv = gtkconv->active_conv;
2705 PidginWindow *gtkwin;
2706 2691
2707 g_return_if_fail(conv != NULL); 2692 g_return_if_fail(conv != NULL);
2708 2693
2709 gtk_widget_set_size_request(gtkconv->u.im->icon_container, -1, BUDDYICON_SIZE_MIN); 2694 gtk_widget_set_size_request(gtkconv->u.im->icon_container, -1, BUDDYICON_SIZE_MIN);
2710 children = gtk_container_get_children(GTK_CONTAINER(gtkconv->u.im->icon_container)); 2695 children = gtk_container_get_children(GTK_CONTAINER(gtkconv->u.im->icon_container));
2728 gtkconv->u.im->icon_timer = 0; 2713 gtkconv->u.im->icon_timer = 0;
2729 gtkconv->u.im->icon = NULL; 2714 gtkconv->u.im->icon = NULL;
2730 gtkconv->u.im->anim = NULL; 2715 gtkconv->u.im->anim = NULL;
2731 gtkconv->u.im->iter = NULL; 2716 gtkconv->u.im->iter = NULL;
2732 gtkconv->u.im->show_icon = FALSE; 2717 gtkconv->u.im->show_icon = FALSE;
2733
2734 gtkwin = gtkconv->win;
2735 } 2718 }
2736 2719
2737 static void 2720 static void
2738 saveicon_writefile_cb(void *user_data, const char *filename) 2721 saveicon_writefile_cb(void *user_data, const char *filename)
2739 { 2722 {
3682 } 3665 }
3683 3666
3684 static void 3667 static void
3685 update_typing_icon(PidginConversation *gtkconv) 3668 update_typing_icon(PidginConversation *gtkconv)
3686 { 3669 {
3687 PidginWindow *gtkwin;
3688 PurpleConvIm *im = NULL; 3670 PurpleConvIm *im = NULL;
3689 PurpleConversation *conv = gtkconv->active_conv; 3671 PurpleConversation *conv = gtkconv->active_conv;
3690 char *message = NULL; 3672 char *message = NULL;
3691
3692 gtkwin = gtkconv->win;
3693 3673
3694 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) 3674 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM)
3695 im = PURPLE_CONV_IM(conv); 3675 im = PURPLE_CONV_IM(conv);
3696 3676
3697 if (im == NULL) 3677 if (im == NULL)
5738 pidgin_conv_write_conv(PurpleConversation *conv, const char *name, const char *alias, 5718 pidgin_conv_write_conv(PurpleConversation *conv, const char *name, const char *alias,
5739 const char *message, PurpleMessageFlags flags, 5719 const char *message, PurpleMessageFlags flags,
5740 time_t mtime) 5720 time_t mtime)
5741 { 5721 {
5742 PidginConversation *gtkconv; 5722 PidginConversation *gtkconv;
5743 PidginWindow *win;
5744 PurpleConnection *gc; 5723 PurpleConnection *gc;
5745 PurpleAccount *account; 5724 PurpleAccount *account;
5746 PurplePluginProtocolInfo *prpl_info;
5747 int gtk_font_options = 0; 5725 int gtk_font_options = 0;
5748 int gtk_font_options_all = 0; 5726 int gtk_font_options_all = 0;
5749 int max_scrollback_lines; 5727 int max_scrollback_lines;
5750 int line_count; 5728 int line_count;
5751 char buf2[BUF_LONG]; 5729 char buf2[BUF_LONG];
5827 if (tag_count > 100) { 5805 if (tag_count > 100) {
5828 char *tmp = displaying; 5806 char *tmp = displaying;
5829 displaying = purple_markup_strip_html(tmp); 5807 displaying = purple_markup_strip_html(tmp);
5830 g_free(tmp); 5808 g_free(tmp);
5831 } 5809 }
5832
5833 win = gtkconv->win;
5834 prpl_info = gc ? PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl) : NULL;
5835 5810
5836 line_count = gtk_text_buffer_get_line_count( 5811 line_count = gtk_text_buffer_get_line_count(
5837 gtk_text_view_get_buffer(GTK_TEXT_VIEW( 5812 gtk_text_view_get_buffer(GTK_TEXT_VIEW(
5838 gtkconv->imhtml))); 5813 gtkconv->imhtml)));
5839 5814
6261 6236
6262 static void 6237 static void
6263 pidgin_conv_chat_update_user(PurpleConversation *conv, const char *user) 6238 pidgin_conv_chat_update_user(PurpleConversation *conv, const char *user)
6264 { 6239 {
6265 PurpleConvChat *chat; 6240 PurpleConvChat *chat;
6266 PurpleConvChatBuddyFlags flags;
6267 PurpleConvChatBuddy *cbuddy; 6241 PurpleConvChatBuddy *cbuddy;
6268 PidginConversation *gtkconv; 6242 PidginConversation *gtkconv;
6269 PidginChatPane *gtkchat; 6243 PidginChatPane *gtkchat;
6270 GtkTreeIter iter; 6244 GtkTreeIter iter;
6271 GtkTreeModel *model; 6245 GtkTreeModel *model;
6303 g_free(alias); 6277 g_free(alias);
6304 return; 6278 return;
6305 } 6279 }
6306 6280
6307 g_return_if_fail(alias != NULL); 6281 g_return_if_fail(alias != NULL);
6308
6309 flags = purple_conv_chat_user_get_flags(chat, user);
6310 6282
6311 cbuddy = purple_conv_chat_cb_find(chat, user); 6283 cbuddy = purple_conv_chat_cb_find(chat, user);
6312 if (cbuddy) 6284 if (cbuddy)
6313 add_chat_buddy_common(conv, cbuddy, NULL); 6285 add_chat_buddy_common(conv, cbuddy, NULL);
6314 g_free(alias); 6286 g_free(alias);
6727 { 6699 {
6728 char *title; 6700 char *title;
6729 PurpleConvIm *im = NULL; 6701 PurpleConvIm *im = NULL;
6730 PurpleAccount *account = purple_conversation_get_account(conv); 6702 PurpleAccount *account = purple_conversation_get_account(conv);
6731 PurpleBuddy *buddy = NULL; 6703 PurpleBuddy *buddy = NULL;
6732 PurplePresence *p = NULL;
6733 char *markup = NULL; 6704 char *markup = NULL;
6734 AtkObject *accessibility_obj; 6705 AtkObject *accessibility_obj;
6735 /* I think this is a little longer than it needs to be but I'm lazy. */ 6706 /* I think this is a little longer than it needs to be but I'm lazy. */
6736 char *style; 6707 char *style;
6737 6708
6747 title = g_strdup(purple_conversation_get_title(conv)); 6718 title = g_strdup(purple_conversation_get_title(conv));
6748 6719
6749 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) { 6720 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
6750 buddy = purple_find_buddy(account, conv->name); 6721 buddy = purple_find_buddy(account, conv->name);
6751 if (buddy) { 6722 if (buddy) {
6752 p = purple_buddy_get_presence(buddy);
6753 markup = pidgin_blist_get_name_markup(buddy, FALSE, FALSE); 6723 markup = pidgin_blist_get_name_markup(buddy, FALSE, FALSE);
6754 } else { 6724 } else {
6755 markup = title; 6725 markup = title;
6756 } 6726 }
6757 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) { 6727 } else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
6962 GdkPixbuf *scale; 6932 GdkPixbuf *scale;
6963 int scale_width, scale_height; 6933 int scale_width, scale_height;
6964 int size = 0; 6934 int size = 0;
6965 6935
6966 PurpleAccount *account; 6936 PurpleAccount *account;
6967 PurplePluginProtocolInfo *prpl_info = NULL;
6968 6937
6969 PurpleBuddyIcon *icon; 6938 PurpleBuddyIcon *icon;
6970 6939
6971 g_return_if_fail(conv != NULL); 6940 g_return_if_fail(conv != NULL);
6972 g_return_if_fail(PIDGIN_IS_PIDGIN_CONVERSATION(conv)); 6941 g_return_if_fail(PIDGIN_IS_PIDGIN_CONVERSATION(conv));
6979 6948
6980 if (!gtkconv->u.im->show_icon) 6949 if (!gtkconv->u.im->show_icon)
6981 return; 6950 return;
6982 6951
6983 account = purple_conversation_get_account(conv); 6952 account = purple_conversation_get_account(conv);
6984 if(account && account->gc)
6985 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(account->gc->prpl);
6986 6953
6987 /* Remove the current icon stuff */ 6954 /* Remove the current icon stuff */
6988 children = gtk_container_get_children(GTK_CONTAINER(gtkconv->u.im->icon_container)); 6955 children = gtk_container_get_children(GTK_CONTAINER(gtkconv->u.im->icon_container));
6989 if (children) { 6956 if (children) {
6990 /* We know there's only one child here. It'd be nice to shortcut to the 6957 /* We know there's only one child here. It'd be nice to shortcut to the
8625 } 8592 }
8626 8593
8627 static gboolean 8594 static gboolean
8628 notebook_press_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win) 8595 notebook_press_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win)
8629 { 8596 {
8630 gint nb_x, nb_y, x_rel, y_rel; 8597 gint nb_x, nb_y;
8631 int tab_clicked; 8598 int tab_clicked;
8632 GtkWidget *page; 8599 GtkWidget *page;
8633 GtkWidget *tab; 8600 GtkWidget *tab;
8634 8601
8635 if (e->button == 2 && e->type == GDK_BUTTON_PRESS) { 8602 if (e->button == 2 && e->type == GDK_BUTTON_PRESS) {
8667 /* 8634 /*
8668 * Get the relative position of the press event, with regards to 8635 * Get the relative position of the press event, with regards to
8669 * the position of the notebook. 8636 * the position of the notebook.
8670 */ 8637 */
8671 gdk_window_get_origin(win->notebook->window, &nb_x, &nb_y); 8638 gdk_window_get_origin(win->notebook->window, &nb_x, &nb_y);
8672
8673 x_rel = e->x_root - nb_x;
8674 y_rel = e->y_root - nb_y;
8675 8639
8676 /* Reset the min/max x/y */ 8640 /* Reset the min/max x/y */
8677 win->drag_min_x = 0; 8641 win->drag_min_x = 0;
8678 win->drag_min_y = 0; 8642 win->drag_min_y = 0;
8679 win->drag_max_x = 0; 8643 win->drag_max_x = 0;
9237 /* if the window exists, is hidden, we're saving positions, and the 9201 /* if the window exists, is hidden, we're saving positions, and the
9238 * position is sane... */ 9202 * position is sane... */
9239 if (win && win->window && 9203 if (win && win->window &&
9240 !GTK_WIDGET_VISIBLE(win->window) && conv_width != 0) { 9204 !GTK_WIDGET_VISIBLE(win->window) && conv_width != 0) {
9241 9205
9206 #ifdef _WIN32 /* only override window manager placement on Windows */
9242 /* ...check position is on screen... */ 9207 /* ...check position is on screen... */
9243 if (conv_x >= gdk_screen_width()) 9208 if (conv_x >= gdk_screen_width())
9244 conv_x = gdk_screen_width() - 100; 9209 conv_x = gdk_screen_width() - 100;
9245 else if (conv_x + conv_width < 0) 9210 else if (conv_x + conv_width < 0)
9246 conv_x = 100; 9211 conv_x = 100;
9249 conv_y = gdk_screen_height() - 100; 9214 conv_y = gdk_screen_height() - 100;
9250 else if (conv_y + conv_height < 0) 9215 else if (conv_y + conv_height < 0)
9251 conv_y = 100; 9216 conv_y = 100;
9252 9217
9253 /* ...and move it back. */ 9218 /* ...and move it back. */
9254 #ifdef _WIN32 /* only override window manager placement on Windows */
9255 gtk_window_move(GTK_WINDOW(win->window), conv_x, conv_y); 9219 gtk_window_move(GTK_WINDOW(win->window), conv_x, conv_y);
9256 #endif 9220 #endif
9257 gtk_window_resize(GTK_WINDOW(win->window), conv_width, conv_height); 9221 gtk_window_resize(GTK_WINDOW(win->window), conv_width, conv_height);
9258 } 9222 }
9259 } 9223 }
9501 gtk_widget_show(gtkconv->menu_label); 9465 gtk_widget_show(gtkconv->menu_label);
9502 gtk_misc_set_alignment(GTK_MISC(gtkconv->menu_label), 0, 0); 9466 gtk_misc_set_alignment(GTK_MISC(gtkconv->menu_label), 0, 0);
9503 9467
9504 gtk_widget_show(gtkconv->menu_tabby); 9468 gtk_widget_show(gtkconv->menu_tabby);
9505 9469
9506 if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) 9470 if (conv_type == PURPLE_CONV_TYPE_IM)
9507 pidgin_conv_update_buddy_icon(conv); 9471 pidgin_conv_update_buddy_icon(conv);
9508 9472
9509 /* Build and set conversations tab */ 9473 /* Build and set conversations tab */
9510 pidgin_conv_tab_pack(win, gtkconv); 9474 pidgin_conv_tab_pack(win, gtkconv);
9511 9475
9628 9592
9629 void 9593 void
9630 pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv) 9594 pidgin_conv_window_remove_gtkconv(PidginWindow *win, PidginConversation *gtkconv)
9631 { 9595 {
9632 unsigned int index; 9596 unsigned int index;
9633 PurpleConversationType conv_type; 9597
9634
9635 conv_type = purple_conversation_get_type(gtkconv->active_conv);
9636 index = gtk_notebook_page_num(GTK_NOTEBOOK(win->notebook), gtkconv->tab_cont); 9598 index = gtk_notebook_page_num(GTK_NOTEBOOK(win->notebook), gtkconv->tab_cont);
9637 9599
9638 g_object_ref(gtkconv->tab_cont); 9600 g_object_ref(gtkconv->tab_cont);
9639 gtk_object_sink(GTK_OBJECT(gtkconv->tab_cont)); 9601 gtk_object_sink(GTK_OBJECT(gtkconv->tab_cont));
9640 9602
9963 * open windows will get a new window. 9925 * open windows will get a new window.
9964 */ 9926 */
9965 static void 9927 static void
9966 conv_placement_by_group(PidginConversation *conv) 9928 conv_placement_by_group(PidginConversation *conv)
9967 { 9929 {
9968 PurpleConversationType type;
9969 PurpleGroup *group = NULL; 9930 PurpleGroup *group = NULL;
9970 GList *wl, *cl; 9931 GList *wl, *cl;
9971
9972 type = purple_conversation_get_type(conv->active_conv);
9973 9932
9974 group = conv_get_group(conv); 9933 group = conv_get_group(conv);
9975 9934
9976 /* Go through the list of IMs and find one with this group. */ 9935 /* Go through the list of IMs and find one with this group. */
9977 for (wl = pidgin_conv_windows_get_list(); wl != NULL; wl = wl->next) { 9936 for (wl = pidgin_conv_windows_get_list(); wl != NULL; wl = wl->next) {
10002 9961
10003 /* This groups things by account. Otherwise, the same semantics as above */ 9962 /* This groups things by account. Otherwise, the same semantics as above */
10004 static void 9963 static void
10005 conv_placement_by_account(PidginConversation *conv) 9964 conv_placement_by_account(PidginConversation *conv)
10006 { 9965 {
10007 PurpleConversationType type;
10008 GList *wins, *convs; 9966 GList *wins, *convs;
10009 PurpleAccount *account; 9967 PurpleAccount *account;
10010 9968
10011 account = purple_conversation_get_account(conv->active_conv); 9969 account = purple_conversation_get_account(conv->active_conv);
10012 type = purple_conversation_get_type(conv->active_conv);
10013 9970
10014 /* Go through the list of IMs and find one with this group. */ 9971 /* Go through the list of IMs and find one with this group. */
10015 for (wins = pidgin_conv_windows_get_list(); wins != NULL; wins = wins->next) { 9972 for (wins = pidgin_conv_windows_get_list(); wins != NULL; wins = wins->next) {
10016 PidginWindow *win2; 9973 PidginWindow *win2;
10017 PidginConversation *conv2; 9974 PidginConversation *conv2;

mercurial