Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 27935
Collapse All | Expand All

(-)work/gaim-0.68/src/conversation.c (-3 / +53 lines)
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
}
(-)work/gaim-0.68/src/conversation.h (+5 lines)
Lines 1250-1255 Link Here
1250
 */
1250
 */
1251
void gaim_conversations_uninit(void);
1251
void gaim_conversations_uninit(void);
1252
1252
1253
/**
1254
 * Changes to and from tabbed and untabbed chatting
1255
 */
1256
void gaim_tabstyle_update(void);
1257
1253
/*@}*/
1258
/*@}*/
1254
1259
1255
#ifdef __cplusplus
1260
#ifdef __cplusplus
(-)work/gaim-0.68/src/gtkprefs.c (+5 lines)
Lines 47-52 Link Here
47
/* XXX for grab_url */
47
/* XXX for grab_url */
48
#include "gaim.h"
48
#include "gaim.h"
49
49
50
/* for gaim_tabstyle_update() */
51
#include "conversation.h"
52
50
#define PROXYHOST 0
53
#define PROXYHOST 0
51
#define PROXYPORT 1
54
#define PROXYPORT 1
52
#define PROXYUSER 2
55
#define PROXYUSER 2
Lines 2445-2450 Link Here
2445
	button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
2448
	button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
2446
	gtk_size_group_add_widget(sg, button);
2449
	gtk_size_group_add_widget(sg, button);
2447
	g_signal_connect_swapped(G_OBJECT(button), "clicked",
2450
	g_signal_connect_swapped(G_OBJECT(button), "clicked",
2451
							 G_CALLBACK(gaim_tabstyle_update), prefs);
2452
	g_signal_connect_swapped(G_OBJECT(button), "clicked",
2448
							 G_CALLBACK(gtk_widget_destroy), prefs);
2453
							 G_CALLBACK(gtk_widget_destroy), prefs);
2449
	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
2454
	gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0);
2450
	gtk_widget_show(button);
2455
	gtk_widget_show(button);

Return to bug 27935