# HG changeset patch # User Ethan Blanton # Date 1194716371 0 # Node ID a9482e431e4302fc7fc9886ddb8f355bdc030cd9 # Parent 0bad71ee146504530b8c1017e0b9947d922ec130# Parent fb2310c914a22d209ad5d644cee1e63cef5a33ea propagate from branch 'org.maemo.garage.pidgin.pidgin.blist-show-with-parent' (head 9dc35209de2406ba1fbc9a266b4e931ff6ebd80a) to branch 'im.pidgin.pidgin' (head 9e5e4cdd0ee1212ba93c50907b439a9aa222bee9) diff -r fb2310c914a2 -r a9482e431e43 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sat Nov 10 16:39:18 2007 +0000 +++ b/pidgin/gtkblist.c Sat Nov 10 17:39:31 2007 +0000 @@ -3063,10 +3063,19 @@ !purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled")); } +static void (*show_with_parent_funcs[5])(GtkWindow *parent) = +{ + NULL, + pidgin_pounces_manager_show_with_parent, + pidgin_plugin_dialog_show_with_parent, + pidgin_syslog_show_with_parent, + pidgin_dialogs_about_with_parent +}; + static void -pidgin_blist_show_with_parent(gpointer data1, void (*callback)(GtkWindow *parent), gpointer data3) -{ - callback(GTK_WINDOW(gtkblist->window)); +pidgin_blist_show_with_parent(gpointer data1, gint show_with_parent_idx, gpointer data3) +{ + show_with_parent_funcs[show_with_parent_idx](GTK_WINDOW(gtkblist->window)); } /*************************************************** @@ -3101,15 +3110,15 @@ /* Tools */ { N_("/_Tools"), NULL, NULL, 0, "", NULL }, - { N_("/Tools/Buddy _Pounces"), NULL, pidgin_blist_show_with_parent, (int)pidgin_pounces_manager_show_with_parent, "", NULL }, + { N_("/Tools/Buddy _Pounces"), NULL, pidgin_blist_show_with_parent, 1, "", NULL }, { N_("/Tools/_Certificates"), NULL, pidgin_certmgr_show, 0, "", NULL }, - { N_("/Tools/Plu_gins"), "U", pidgin_blist_show_with_parent, (int)pidgin_plugin_dialog_show_with_parent, "", PIDGIN_STOCK_TOOLBAR_PLUGINS }, + { N_("/Tools/Plu_gins"), "U", pidgin_blist_show_with_parent, 2, "", PIDGIN_STOCK_TOOLBAR_PLUGINS }, { N_("/Tools/Pr_eferences"), "P", pidgin_prefs_show, 0, "", GTK_STOCK_PREFERENCES }, { N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "", NULL }, { "/Tools/sep2", NULL, NULL, 0, "", NULL }, { N_("/Tools/_File Transfers"), "T", pidgin_xfer_dialog_show, 0, "", NULL }, { N_("/Tools/R_oom List"), NULL, pidgin_roomlist_dialog_show, 0, "", NULL }, - { N_("/Tools/System _Log"), NULL, pidgin_blist_show_with_parent, (int)pidgin_syslog_show_with_parent, "", NULL }, + { N_("/Tools/System _Log"), NULL, pidgin_blist_show_with_parent, 3, "", NULL }, { "/Tools/sep3", NULL, NULL, 0, "", NULL }, { N_("/Tools/Mute _Sounds"), "S", pidgin_blist_mute_sounds_cb, 0, "", NULL }, /* Help */ @@ -3117,9 +3126,9 @@ { N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "", GTK_STOCK_HELP }, { N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "", NULL }, #if GTK_CHECK_VERSION(2,6,0) - { N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, (int)pidgin_dialogs_about_with_parent, "", GTK_STOCK_ABOUT }, + { N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, 4, "", GTK_STOCK_ABOUT }, #else - { N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, (int)pidgin_dialogs_about_with_parent, "", NULL }, + { N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, 4, "", NULL }, #endif };