changeset 11936:2af814f836e6

[gaim-migrate @ 14227] Patch from Kevin Stange to "properly ignore placement with tabs off" see: http://sourceforge.net/tracker/?func=detail&aid=1343648&group_id=235&atid=300235 for more details committer: Tailor Script <tailor@pidgin.im>
author Gary Kramlich <grim@reaperworld.com>
date Mon, 31 Oct 2005 22:55:16 +0000
parents cb73483c9f63
children 83cf4df8809d
files src/gtkconv.c
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Mon Oct 31 22:02:30 2005 +0000
+++ b/src/gtkconv.c	Mon Oct 31 22:55:16 2005 +0000
@@ -5483,6 +5483,13 @@
 }
 
 static void
+conv_placement_usetabs_cb(const char *name, GaimPrefType type,
+						gpointer value, gpointer data)
+{
+	gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement");
+}
+
+static void
 conv_placement_pref_cb(const char *name, GaimPrefType type,
 					   gpointer value, gpointer data)
 {
@@ -5561,6 +5568,9 @@
 	gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/tab_side",
 								tab_side_pref_cb, NULL);
 
+	gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/tabs",
+								conv_placement_usetabs_cb, NULL);
+
 	gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/placement",
 								conv_placement_pref_cb, NULL);
 	gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement");
@@ -6971,7 +6981,11 @@
 {
 	g_return_if_fail(func != NULL);
 
-	place_conv = func;
+	/* If tabs are enabled, set the function, otherwise, NULL it out. */
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/tabs"))
+		place_conv = func;
+	else
+		place_conv = NULL;
 }
 
 GaimConvPlacementFunc
@@ -6985,4 +6999,6 @@
 {
 	if (place_conv)
 		place_conv(gtkconv);
-}
+	else
+		conv_placement_new_window(gtkconv);
+}