comparison src/gtkconv.c @ 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 fe12abd6b879
children 91aaa1b3ac30
comparison
equal deleted inserted replaced
11935:cb73483c9f63 11936:2af814f836e6
5481 gaim_conversation_foreach(gaim_gtkconv_update_buddy_icon); 5481 gaim_conversation_foreach(gaim_gtkconv_update_buddy_icon);
5482 } 5482 }
5483 } 5483 }
5484 5484
5485 static void 5485 static void
5486 conv_placement_usetabs_cb(const char *name, GaimPrefType type,
5487 gpointer value, gpointer data)
5488 {
5489 gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement");
5490 }
5491
5492 static void
5486 conv_placement_pref_cb(const char *name, GaimPrefType type, 5493 conv_placement_pref_cb(const char *name, GaimPrefType type,
5487 gpointer value, gpointer data) 5494 gpointer value, gpointer data)
5488 { 5495 {
5489 GaimConvPlacementFunc func; 5496 GaimConvPlacementFunc func;
5490 5497
5558 show_formatting_toolbar_pref_cb, NULL); 5565 show_formatting_toolbar_pref_cb, NULL);
5559 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/spellcheck", 5566 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/spellcheck",
5560 spellcheck_pref_cb, NULL); 5567 spellcheck_pref_cb, NULL);
5561 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/tab_side", 5568 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/tab_side",
5562 tab_side_pref_cb, NULL); 5569 tab_side_pref_cb, NULL);
5570
5571 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/tabs",
5572 conv_placement_usetabs_cb, NULL);
5563 5573
5564 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/placement", 5574 gaim_prefs_connect_callback(handle, "/gaim/gtk/conversations/placement",
5565 conv_placement_pref_cb, NULL); 5575 conv_placement_pref_cb, NULL);
5566 gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement"); 5576 gaim_prefs_trigger_callback("/gaim/gtk/conversations/placement");
5567 5577
6969 void 6979 void
6970 gaim_gtkconv_placement_set_current_func(GaimConvPlacementFunc func) 6980 gaim_gtkconv_placement_set_current_func(GaimConvPlacementFunc func)
6971 { 6981 {
6972 g_return_if_fail(func != NULL); 6982 g_return_if_fail(func != NULL);
6973 6983
6974 place_conv = func; 6984 /* If tabs are enabled, set the function, otherwise, NULL it out. */
6985 if (gaim_prefs_get_bool("/gaim/gtk/conversations/tabs"))
6986 place_conv = func;
6987 else
6988 place_conv = NULL;
6975 } 6989 }
6976 6990
6977 GaimConvPlacementFunc 6991 GaimConvPlacementFunc
6978 gaim_gtkconv_placement_get_current_func(void) 6992 gaim_gtkconv_placement_get_current_func(void)
6979 { 6993 {
6983 void 6997 void
6984 gaim_gtkconv_placement_place(GaimGtkConversation *gtkconv) 6998 gaim_gtkconv_placement_place(GaimGtkConversation *gtkconv)
6985 { 6999 {
6986 if (place_conv) 7000 if (place_conv)
6987 place_conv(gtkconv); 7001 place_conv(gtkconv);
6988 } 7002 else
7003 conv_placement_new_window(gtkconv);
7004 }