| 9342 static gboolean |
9342 static gboolean |
| 9343 notebook_release_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win) |
9343 notebook_release_cb(GtkWidget *widget, GdkEventButton *e, PidginWindow *win) |
| 9344 { |
9344 { |
| 9345 PidginWindow *dest_win; |
9345 PidginWindow *dest_win; |
| 9346 GtkNotebook *dest_notebook; |
9346 GtkNotebook *dest_notebook; |
| 9347 PurpleConversation *conv; |
9347 PidginConversation *active_gtkconv; |
| 9348 PidginConversation *gtkconv; |
9348 PidginConversation *gtkconv; |
| 9349 gint dest_page_num = 0; |
9349 gint dest_page_num = 0; |
| 9350 gboolean new_window = FALSE; |
9350 gboolean new_window = FALSE; |
| 9351 gboolean to_right = FALSE; |
9351 gboolean to_right = FALSE; |
| 9352 #if GTK_CHECK_VERSION(3,0,0) |
9352 #if GTK_CHECK_VERSION(3,0,0) |
| 9409 |
9409 |
| 9410 dnd_hints_hide_all(); |
9410 dnd_hints_hide_all(); |
| 9411 |
9411 |
| 9412 dest_win = pidgin_conv_window_get_at_event((GdkEvent *)e); |
9412 dest_win = pidgin_conv_window_get_at_event((GdkEvent *)e); |
| 9413 |
9413 |
| 9414 conv = pidgin_conv_window_get_active_conversation(win); |
9414 active_gtkconv = pidgin_conv_window_get_active_gtkconv(win); |
| 9415 |
9415 |
| 9416 if (dest_win == NULL) { |
9416 if (dest_win == NULL) { |
| 9417 /* If the current window doesn't have any other conversations, |
9417 /* If the current window doesn't have any other conversations, |
| 9418 * there isn't much point transferring the conv to a new window. */ |
9418 * there isn't much point transferring the conv to a new window. */ |
| 9419 if (pidgin_conv_window_get_gtkconv_count(win) > 1) { |
9419 if (pidgin_conv_window_get_gtkconv_count(win) > 1) { |
| 10092 } |
10092 } |
| 10093 |
10093 |
| 10094 void |
10094 void |
| 10095 pidgin_conv_window_destroy(PidginWindow *win) |
10095 pidgin_conv_window_destroy(PidginWindow *win) |
| 10096 { |
10096 { |
| |
10097 PidginConversation *gtkconv; |
| |
10098 GList *iter; |
| |
10099 |
| |
10100 if (win->gtkconvs) { |
| |
10101 for (iter = win->gtkconvs; iter != NULL; iter = iter->next) { |
| |
10102 gtkconv = iter->data; |
| |
10103 close_conv_cb(NULL, gtkconv); |
| |
10104 } |
| |
10105 return; |
| |
10106 } |
| |
10107 |
| 10097 purple_prefs_disconnect_by_handle(win); |
10108 purple_prefs_disconnect_by_handle(win); |
| 10098 window_list = g_list_remove(window_list, win); |
10109 window_list = g_list_remove(window_list, win); |
| 10099 |
10110 |
| 10100 if (win->gtkconvs) { |
|
| 10101 while (win->gtkconvs) { |
|
| 10102 gboolean last = (win->gtkconvs->next == NULL); |
|
| 10103 close_conv_cb(NULL, win->gtkconvs->data); |
|
| 10104 if (last) |
|
| 10105 break; |
|
| 10106 } |
|
| 10107 return; |
|
| 10108 } |
|
| 10109 gtk_widget_destroy(win->notebook_menu); |
10111 gtk_widget_destroy(win->notebook_menu); |
| 10110 gtk_widget_destroy(win->window); |
10112 gtk_widget_destroy(win->window); |
| 10111 |
10113 |
| 10112 g_object_unref(G_OBJECT(win->menu.ui)); |
10114 g_object_unref(G_OBJECT(win->menu.ui)); |
| 10113 |
10115 |