# HG changeset patch # User Gabriel Schulhof # Date 1190500163 0 # Node ID b93d1ad9cf02bbec822773b7a1b7d79d37f36f4b # Parent f90f334a58f0d11e2dd699989d988e1e70da88bb Doing pounces diff -r f90f334a58f0 -r b93d1ad9cf02 pidgin/gtkblist.c --- a/pidgin/gtkblist.c Sat Sep 22 22:10:10 2007 +0000 +++ b/pidgin/gtkblist.c Sat Sep 22 22:29:23 2007 +0000 @@ -617,7 +617,7 @@ static void gtk_blist_menu_bp_cb(GtkWidget *w, PurpleBuddy *b) { - pidgin_pounce_editor_show(GTK_WINDOW(gtkblist->window), b->account, b->name, NULL); + pidgin_pounce_editor_show_with_parent(GTK_WINDOW(gtkblist->window), b->account, b->name, NULL); } static void gtk_blist_menu_showlog_cb(GtkWidget *w, PurpleBlistNode *node) @@ -3090,7 +3090,7 @@ /* Tools */ { N_("/_Tools"), NULL, NULL, 0, "", NULL }, - { N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "", NULL }, + { N_("/Tools/Buddy _Pounces"), NULL, pidgin_blist_show_with_parent, (int)pidgin_pounces_manager_show_with_parent, "", 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/Pr_eferences"), "P", pidgin_prefs_show, 0, "", GTK_STOCK_PREFERENCES }, diff -r f90f334a58f0 -r b93d1ad9cf02 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sat Sep 22 22:10:10 2007 +0000 +++ b/pidgin/gtkconv.c Sat Sep 22 22:29:23 2007 +0000 @@ -1236,7 +1236,7 @@ conv = pidgin_conv_window_get_active_gtkconv(win)->active_conv; - pidgin_pounce_editor_show(GTK_WINDOW(win->window), purple_conversation_get_account(conv), + pidgin_pounce_editor_show_with_parent(GTK_WINDOW(win->window), purple_conversation_get_account(conv), purple_conversation_get_name(conv), NULL); } diff -r f90f334a58f0 -r b93d1ad9cf02 pidgin/gtkpounce.c --- a/pidgin/gtkpounce.c Sat Sep 22 22:10:10 2007 +0000 +++ b/pidgin/gtkpounce.c Sat Sep 22 22:29:23 2007 +0000 @@ -462,7 +462,14 @@ } void -pidgin_pounce_editor_show(GtkWindow *parent, PurpleAccount *account, const char *name, +pidgin_pounce_editor_show(PurpleAccount *account, const char *name, + PurplePounce *cur_pounce) +{ + pidgin_pounce_editor_show_with_parent(NULL, account, name, cur_pounce); +} + +void +pidgin_pounce_editor_show_with_parent(GtkWindow *parent, PurpleAccount *account, const char *name, PurplePounce *cur_pounce) { PidginPounceDialog *dialog; @@ -1043,7 +1050,7 @@ static void pounces_manager_add_cb(GtkButton *button, gpointer user_data) { - pidgin_pounce_editor_show(GTK_WINDOW(pounces_manager->window), NULL, NULL, NULL); + pidgin_pounce_editor_show_with_parent(GTK_WINDOW(pounces_manager->window), NULL, NULL, NULL); } static void @@ -1053,7 +1060,7 @@ PurplePounce *pounce; gtk_tree_model_get(model, iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1); - pidgin_pounce_editor_show(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce); + pidgin_pounce_editor_show_with_parent(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce); } static void @@ -1153,7 +1160,7 @@ if ((pounce != NULL) && (event->button == 1) && (event->type == GDK_2BUTTON_PRESS)) { - pidgin_pounce_editor_show(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce); + pidgin_pounce_editor_show_with_parent(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce); return TRUE; } @@ -1302,7 +1309,13 @@ } void -pidgin_pounces_manager_show(GtkWindow *parent) +pidgin_pounces_manager_show() +{ + pidgin_pounces_manager_show_with_parent(NULL); +} + +void +pidgin_pounces_manager_show_with_parent(GtkWindow *parent) { PouncesManager *dialog; GtkWidget *bbox; diff -r f90f334a58f0 -r b93d1ad9cf02 pidgin/gtkpounce.h --- a/pidgin/gtkpounce.h Sat Sep 22 22:10:10 2007 +0000 +++ b/pidgin/gtkpounce.h Sat Sep 22 22:29:23 2007 +0000 @@ -31,17 +31,29 @@ /** * Displays a New Buddy Pounce or Edit Buddy Pounce dialog. * + * @param parent The parent window. * @param account The optional account to use. * @param name The optional name to pounce on. * @param cur_pounce The current buddy pounce, if editing an existing one. */ -void pidgin_pounce_editor_show(GtkWindow *parent, PurpleAccount *account, const char *name, +void pidgin_pounce_editor_show_with_parent(GtkWindow *parent, PurpleAccount *account, const char *name, + PurplePounce *cur_pounce); + +/** + * @deprecated Please use pidgin_pounce_editor_show_with_parent + */ +void pidgin_pounce_editor_show(PurpleAccount *account, const char *name, PurplePounce *cur_pounce); /** * Shows the pounces manager window. */ -void pidgin_pounces_manager_show(GtkWindow *parent); +void pidgin_pounces_manager_show_with_parent(GtkWindow *parent); + +/** + * @deprecated Please use pidgin_pounces_manager_show_with_parent + */ +void pidgin_pounces_manager_show(void); /** * Hides the pounces manager window. diff -r f90f334a58f0 -r b93d1ad9cf02 pidgin/plugins/perl/common/GtkPounce.xs --- a/pidgin/plugins/perl/common/GtkPounce.xs Sat Sep 22 22:10:10 2007 +0000 +++ b/pidgin/plugins/perl/common/GtkPounce.xs Sat Sep 22 22:29:23 2007 +0000 @@ -8,8 +8,13 @@ Purple::Account account const char * name Purple::Pounce cur_pounce -CODE: - pidgin_pounce_editor_show(NULL, account, name, cur_pounce); + +void +pidgin_pounce_editor_show_with_parent(parent, account, name, cur_pounce) + void * parent + Purple::Account account + const char * name + Purple::Pounce cur_pounce MODULE = Pidgin::Pounce PACKAGE = Pidgin::Pounces PREFIX = pidgin_pounces_ PROTOTYPES: ENABLE @@ -22,8 +27,10 @@ void pidgin_pounces_manager_show() -CODE: - pidgin_pounces_manager_show(NULL); + +void +pidgin_pounces_manager_show_with_parent(parent) + void * parent void pidgin_pounces_manager_hide()