Lines 934-943
Link Here
|
934 |
gaim_conversation_autoset_title(conv); |
936 |
gaim_conversation_autoset_title(conv); |
935 |
|
937 |
|
936 |
/* |
938 |
/* |
937 |
* Create a window if one does not exist. If it does, use the last |
939 |
* Create a new window if conversation tabbing is disabled |
938 |
* created window. |
|
|
939 |
*/ |
940 |
*/ |
940 |
if (windows == NULL) { |
941 |
if (windows == NULL || ! gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) { |
941 |
GaimWindow *win; |
942 |
GaimWindow *win; |
942 |
|
943 |
|
943 |
win = gaim_window_new(); |
944 |
win = gaim_window_new(); |
Lines 2786-2788
Link Here
|
2786 |
{ |
2787 |
{ |
2787 |
gaim_signals_unregister_by_instance(gaim_conversations_get_handle()); |
2788 |
gaim_signals_unregister_by_instance(gaim_conversations_get_handle()); |
2788 |
} |
2789 |
} |
|
|
2790 |
|
2791 |
void gaim_tabstyle_update() |
2792 |
{ |
2793 |
GaimWindow * win = NULL; |
2794 |
|
2795 |
if(windows == NULL) |
2796 |
return; |
2797 |
|
2798 |
if(gaim_prefs_get_bool("/gaim/gtk/conversations/tabs")) |
2799 |
{ |
2800 |
GaimWindow * win_iter = NULL; |
2801 |
/* consolidate all the windows into one */ |
2802 |
win = (GaimWindow *)windows->data; |
2803 |
while(windows->next != NULL) |
2804 |
{ |
2805 |
win_iter = (GaimWindow *) windows->next->data; |
2806 |
while(windows->next != NULL && windows->next->data == win_iter) |
2807 |
{ |
2808 |
/* removing the last conversation takes care of destroying/removing |
2809 |
the window */ |
2810 |
GaimConversation * conv = gaim_window_remove_conversation(win_iter, 0); |
2811 |
gaim_window_add_conversation(win, conv); |
2812 |
} |
2813 |
} |
2814 |
update_conv_indexes(win); |
2815 |
gaim_window_show(win); |
2816 |
} |
2817 |
else |
2818 |
{ |
2819 |
GList * check = windows; |
2820 |
/* expand all tabbed windows. There should be only one (if any), |
2821 |
but we might as well handle the case that this isn't true. */ |
2822 |
/* note here that since gaim_window_new appends the new window to |
2823 |
the end of the windows GList, these windows will be checked as well. |
2824 |
Of course, they will only have one conversation, so the loop will not |
2825 |
get executed, but rather only update_conv_indexes and gaim_window_show */ |
2826 |
while(check != NULL) |
2827 |
{ |
2828 |
win = (GaimWindow *) check->data; |
2829 |
while(gaim_window_get_conversation_count(win) > 1) |
2830 |
{ |
2831 |
GaimWindow * t_win = gaim_window_new(); |
2832 |
gaim_window_add_conversation(t_win, gaim_window_remove_conversation(win, 1)); |
2833 |
} |
2834 |
update_conv_indexes(win); |
2835 |
gaim_window_show(win); |
2836 |
|
2837 |
check = check->next; |
2838 |
} |
2839 |
} |
2840 |
} |