Mercurial > pidgin.yaz
changeset 20619:b93d1ad9cf02
Doing pounces
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Sat, 22 Sep 2007 22:29:23 +0000 |
parents | f90f334a58f0 |
children | 38b694bbe57b |
files | pidgin/gtkblist.c pidgin/gtkconv.c pidgin/gtkpounce.c pidgin/gtkpounce.h pidgin/plugins/perl/common/GtkPounce.xs |
diffstat | 5 files changed, 46 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- 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, "<Branch>", NULL }, - { N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "<Item>", NULL }, + { N_("/Tools/Buddy _Pounces"), NULL, pidgin_blist_show_with_parent, (int)pidgin_pounces_manager_show_with_parent, "<Item>", NULL }, { N_("/Tools/_Certificates"), NULL, pidgin_certmgr_show, 0, "<Item>", NULL }, { N_("/Tools/Plu_gins"), "<CTL>U", pidgin_blist_show_with_parent, (int)pidgin_plugin_dialog_show_with_parent, "<StockItem>", PIDGIN_STOCK_TOOLBAR_PLUGINS }, { N_("/Tools/Pr_eferences"), "<CTL>P", pidgin_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES },
--- 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); }
--- 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;
--- 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.
--- 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()