Mercurial > pidgin.yaz
changeset 19581:4e147af6a033
disapproval of revision 'cccc7902a8993aaa6b6ef10c1fb9480763055463'
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Mon, 03 Sep 2007 02:16:27 +0000 |
parents | 1c5d0f2c2d4e |
children | d4fb44035799 |
files | pidgin/gtkconv.c pidgin/gtkmain.c |
diffstat | 2 files changed, 25 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Mon Sep 03 02:16:08 2007 +0000 +++ b/pidgin/gtkconv.c Mon Sep 03 02:16:27 2007 +0000 @@ -9116,7 +9116,7 @@ /* This one places conversations in the last made window of the same type. */ static gboolean -conv_placement_new_window_by_type_configured_cb(GtkWidget *w, +conv_placement_last_created_win_type_configured_cb(GtkWidget *w, GdkEventConfigure *event, PidginConversation *conv) { int x, y; @@ -9163,34 +9163,6 @@ } static void -conv_placement_new_window_by_type(PidginConversation *conv) -{ - PidginWindow *win = pidgin_conv_window_new(); - - if (purple_conversation_get_type(conv->active_conv) == - PURPLE_CONV_TYPE_IM || - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/width") == 0) { - pidgin_conv_set_position_size(win, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/x"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/y"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/width"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/height")); - } else if (PURPLE_CONV_TYPE_CHAT == purple_conversation_get_type(conv->active_conv)) { - pidgin_conv_set_position_size(win, - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/x"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/y"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/width"), - purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/height")); - } - - pidgin_conv_window_add_gtkconv(win, conv); - pidgin_conv_window_show(win); - - g_signal_connect(G_OBJECT(win->window), "configure_event", - G_CALLBACK(conv_placement_new_window_by_type_configured_cb), conv); -} - -static void conv_placement_last_created_win_type(PidginConversation *conv) { PidginWindow *win; @@ -9198,7 +9170,28 @@ win = pidgin_conv_window_last_with_type(purple_conversation_get_type(conv->active_conv)); if (win == NULL) { - conv_placement_new_window_by_type(conv); + win = pidgin_conv_window_new(); + + if (PURPLE_CONV_TYPE_IM == purple_conversation_get_type(conv->active_conv) || + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/width") == 0) { + pidgin_conv_set_position_size(win, + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/x"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/y"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/width"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/height")); + } else if (PURPLE_CONV_TYPE_CHAT == purple_conversation_get_type(conv->active_conv)) { + pidgin_conv_set_position_size(win, + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/x"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/y"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/width"), + purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/chat/height")); + } + + pidgin_conv_window_add_gtkconv(win, conv); + pidgin_conv_window_show(win); + + g_signal_connect(G_OBJECT(win->window), "configure_event", + G_CALLBACK(conv_placement_last_created_win_type_configured_cb), conv); } else pidgin_conv_window_add_gtkconv(win, conv); } @@ -9362,7 +9355,7 @@ add_conv_placement_fnc("im_chat", _("Separate IM and Chat windows"), conv_placement_last_created_win_type); add_conv_placement_fnc("new", _("New window"), - conv_placement_new_window_by_type); + conv_placement_new_window); add_conv_placement_fnc("group", _("By group"), conv_placement_by_group); add_conv_placement_fnc("account", _("By account"), @@ -9470,7 +9463,7 @@ if (place_conv) place_conv(gtkconv); else - conv_placement_new_window_by_type(gtkconv); + conv_placement_new_window(gtkconv); } gboolean
--- a/pidgin/gtkmain.c Mon Sep 03 02:16:08 2007 +0000 +++ b/pidgin/gtkmain.c Mon Sep 03 02:16:27 2007 +0000 @@ -86,8 +86,6 @@ static SnDisplay *sn_display = NULL; #endif -#include "/home/khc/Code/scratch/memory_profile.c" - #ifdef HAVE_SIGNAL_H /* @@ -102,7 +100,6 @@ SIGQUIT, SIGCHLD, SIGALRM, - SIGUSR2, -1 }; @@ -218,9 +215,6 @@ case SIGALRM: clean_pid(); break; - case SIGUSR2: - mp_tally(); - break; default: purple_debug_warning("sighandler", "Caught signal %d\n", sig); purple_connections_disconnect_all(); @@ -490,9 +484,6 @@ {0, 0, 0, 0} }; - //g_mem_set_vtable(&memhook); - //mp_init(); - #ifdef DEBUG debug_enabled = TRUE; #else