changeset 21340:6c4de0d24eff

Reverted changes from ef7ac46f90a801547f7dfc4295927a956f90e869 to 7620a822ab493396a6f651113857f1c5821e3ec1 to revert start of the hinting changes. This was necessary to get around some merges and propagates, as disapprove can't be used on revisions with more than one parent.
author Richard Laager <rlaager@wiktel.com>
date Fri, 16 Nov 2007 22:42:59 +0000
parents 059d6deebee7
children 16772d539387
files pidgin/gtkblist.c pidgin/gtkdebug.c pidgin/gtkdialogs.c pidgin/gtkdialogs.h pidgin/gtkimhtmltoolbar.c pidgin/gtklog.c pidgin/gtklog.h pidgin/gtkplugin.c pidgin/gtkplugin.h pidgin/gtkpounce.c pidgin/gtkpounce.h pidgin/plugins/perl/common/GtkDialogs.xs pidgin/plugins/perl/common/GtkLog.xs pidgin/plugins/perl/common/GtkPlugin.xs pidgin/plugins/perl/common/GtkPounce.xs
diffstat 15 files changed, 22 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkblist.c	Fri Nov 16 22:42:59 2007 +0000
@@ -617,7 +617,7 @@
 
 static void gtk_blist_menu_bp_cb(GtkWidget *w, PurpleBuddy *b)
 {
-	pidgin_pounce_editor_show_with_parent(GTK_WINDOW(gtkblist->window), b->account, b->name, NULL);
+	pidgin_pounce_editor_show(b->account, b->name, NULL);
 }
 
 static void gtk_blist_menu_showlog_cb(GtkWidget *w, PurpleBlistNode *node)
@@ -643,7 +643,7 @@
 			name = prpl_info->get_chat_name(c->components);
 		}
 	} else if (PURPLE_BLIST_NODE_IS_CONTACT(node)) {
-		pidgin_log_show_contact_with_parent(GTK_WINDOW(gtkblist->window), (PurpleContact *)node);
+		pidgin_log_show_contact((PurpleContact *)node);
 		pidgin_clear_cursor(gtkblist->window);
 		return;
 	} else {
@@ -655,7 +655,7 @@
 	}
 
 	if (name && account) {
-		pidgin_log_show_with_parent(GTK_WINDOW(gtkblist->window), type, name, account);
+		pidgin_log_show(type, name, account);
 		g_free(name);
 
 		pidgin_clear_cursor(gtkblist->window);
@@ -682,6 +682,11 @@
 	pidgin_blist_update(purple_get_blist(), node);
 }
 
+static void gtk_blist_show_systemlog_cb()
+{
+	pidgin_syslog_show();
+}
+
 static void gtk_blist_show_onlinehelp_cb()
 {
 	purple_notify_uri(NULL, PURPLE_WEBSITE "documentation");
@@ -3052,11 +3057,6 @@
 			!purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/debug/enabled"));
 }
 
-static void
-pidgin_blist_show_with_parent(gpointer data1, void (*callback)(GtkWindow *parent), gpointer data3)
-{
-	callback(GTK_WINDOW(gtkblist->window));
-}
 
 /***************************************************
  *            Crap                                 *
@@ -3090,15 +3090,15 @@
 
 	/* Tools */
 	{ N_("/_Tools"), NULL, NULL, 0, "<Branch>", NULL },
-	{ N_("/Tools/Buddy _Pounces"), NULL, pidgin_blist_show_with_parent, (int)pidgin_pounces_manager_show_with_parent, "<Item>", NULL },
+	{ N_("/Tools/Buddy _Pounces"), NULL, pidgin_pounces_manager_show, 0, "<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/Plu_gins"), "<CTL>U", pidgin_plugin_dialog_show, 0, "<StockItem>", PIDGIN_STOCK_TOOLBAR_PLUGINS },
 	{ N_("/Tools/Pr_eferences"), "<CTL>P", pidgin_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES },
 	{ N_("/Tools/Pr_ivacy"), NULL, pidgin_privacy_dialog_show, 0, "<Item>", NULL },
 	{ "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL },
 	{ N_("/Tools/_File Transfers"), "<CTL>T", pidgin_xfer_dialog_show, 0, "<Item>", NULL },
 	{ N_("/Tools/R_oom List"), NULL, pidgin_roomlist_dialog_show, 0, "<Item>", NULL },
-	{ N_("/Tools/System _Log"), NULL, pidgin_blist_show_with_parent, (int)pidgin_syslog_show_with_parent, "<Item>", NULL },
+	{ N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<Item>", NULL },
 	{ "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL },
 	{ N_("/Tools/Mute _Sounds"), "<CTL>S", pidgin_blist_mute_sounds_cb, 0, "<CheckItem>", NULL },
 	/* Help */
@@ -3106,9 +3106,9 @@
 	{ N_("/Help/Online _Help"), "F1", gtk_blist_show_onlinehelp_cb, 0, "<StockItem>", GTK_STOCK_HELP },
 	{ N_("/Help/_Debug Window"), NULL, toggle_debug, 0, "<Item>", NULL },
 #if GTK_CHECK_VERSION(2,6,0)
-	{ N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, (int)pidgin_dialogs_about_with_parent, "<StockItem>", GTK_STOCK_ABOUT },
+	{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 0,  "<StockItem>", GTK_STOCK_ABOUT },
 #else
-	{ N_("/Help/_About"), NULL, pidgin_blist_show_with_parent, (int)pidgin_dialogs_about_with_parent, "<Item>", NULL },
+	{ N_("/Help/_About"), NULL, pidgin_dialogs_about, 0,  "<Item>", NULL },
 #endif
 };
 
--- a/pidgin/gtkdebug.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkdebug.c	Fri Nov 16 22:42:59 2007 +0000
@@ -36,7 +36,6 @@
 #include "gtkimhtml.h"
 #include "gtkutils.h"
 #include "pidginstock.h"
-#include "gtkblist.h"
 
 #ifdef HAVE_REGEX_H
 # include <regex.h>
@@ -674,7 +673,6 @@
 static DebugWindow *
 debug_window_new(void)
 {
-	PidginBuddyList *blist;
 	DebugWindow *win;
 	GtkWidget *vbox;
 	GtkWidget *toolbar;
@@ -689,9 +687,6 @@
 	height = purple_prefs_get_int(PIDGIN_PREFS_ROOT "/debug/height");
 
 	PIDGIN_DIALOG(win->window);
-	if ((blist = pidgin_blist_get_default_gtk_blist()) != NULL)
-		if (blist->window)
-			gtk_window_set_transient_for(GTK_WINDOW(win->window), GTK_WINDOW(blist->window));
 	purple_debug_info("gtkdebug", "Setting dimensions to %d, %d\n",
 					width, height);
 
--- a/pidgin/gtkdialogs.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkdialogs.c	Fri Nov 16 22:42:59 2007 +0000
@@ -334,13 +334,6 @@
 
 void pidgin_dialogs_about()
 {
-	PidginBuddyList *blist = pidgin_blist_get_default_gtk_blist();
-
-	pidgin_dialogs_about_with_parent(blist ? GTK_WINDOW(blist->window) : NULL);
-}
-
-void pidgin_dialogs_about_with_parent(GtkWindow *parent)
-{
 	GtkWidget *hbox;
 	GtkWidget *vbox;
 	GtkWidget *logo;
@@ -356,15 +349,11 @@
 	GdkPixbuf *pixbuf;
 
 	if (about != NULL) {
-		if (parent)
-			gtk_window_set_transient_for(GTK_WINDOW(about), parent);
 		gtk_window_present(GTK_WINDOW(about));
 		return;
 	}
 
 	PIDGIN_DIALOG(about);
-	if (parent)
-		gtk_window_set_transient_for(GTK_WINDOW(about), parent);
 	tmp = g_strdup_printf(_("About %s"), PIDGIN_NAME);
 	gtk_window_set_title(GTK_WINDOW(about), tmp);
 	g_free(tmp);
--- a/pidgin/gtkdialogs.h	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkdialogs.h	Fri Nov 16 22:42:59 2007 +0000
@@ -33,7 +33,6 @@
 /* Functions in gtkdialogs.c (these should actually stay in this file) */
 void pidgin_dialogs_destroy_all(void);
 void pidgin_dialogs_about(void);
-void pidgin_dialogs_about_with_parent(GtkWindow *parent);
 void pidgin_dialogs_im(void);
 void pidgin_dialogs_im_with_user(PurpleAccount *, const char *);
 void pidgin_dialogs_info(void);
--- a/pidgin/gtkimhtmltoolbar.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Fri Nov 16 22:42:59 2007 +0000
@@ -184,8 +184,6 @@
 			g_signal_connect_after(G_OBJECT(toolbar->font_dialog), "realize",
 							 G_CALLBACK(realize_toolbar_font), toolbar);
 		}
-		gtk_window_set_transient_for(GTK_WINDOW(toolbar->font_dialog),
-		    GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(toolbar))));
 		gtk_window_present(GTK_WINDOW(toolbar->font_dialog));
 	} else {
 		cancel_toolbar_font(font, toolbar);
@@ -711,8 +709,6 @@
 	gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE);
 	gtk_window_set_role(GTK_WINDOW(dialog), "smiley_dialog");
 	gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
-	gtk_window_set_transient_for(GTK_WINDOW(dialog),
-	    GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(toolbar))));
 
 	if (unique_smileys != NULL) {
 		struct smiley_button_list *ls, *it, *it_tmp;
--- a/pidgin/gtklog.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtklog.c	Fri Nov 16 22:42:59 2007 +0000
@@ -523,7 +523,7 @@
 	}
 }
 
-static PidginLogViewer *display_log_viewer(GtkWindow *parent, struct log_viewer_hash_t *ht, GList *logs,
+static PidginLogViewer *display_log_viewer(struct log_viewer_hash_t *ht, GList *logs,
 						const char *title, GtkWidget *icon, int log_size)
 {
 	PidginLogViewer *lv;
@@ -569,7 +569,7 @@
 		g_hash_table_insert(log_viewers, ht, lv);
 
 	/* Window ***********/
-	lv->window = gtk_dialog_new_with_buttons(title, parent, 0,
+	lv->window = gtk_dialog_new_with_buttons(title, NULL, 0,
 					     GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL);
 #ifdef _WIN32
 	/* Steal the "HELP" response and use it to trigger browsing to the logs folder */
@@ -676,10 +676,6 @@
 }
 
 void pidgin_log_show(PurpleLogType type, const char *screenname, PurpleAccount *account) {
-	pidgin_log_show_with_parent(NULL, type, screenname, account);
-}
-
-void pidgin_log_show_with_parent(GtkWindow *parent, PurpleLogType type, const char *screenname, PurpleAccount *account) {
 	struct log_viewer_hash_t *ht;
 	PidginLogViewer *lv = NULL;
 	const char *name = screenname;
@@ -724,7 +720,7 @@
 
 	prpl_icon = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_MEDIUM);
 
-	display_log_viewer(parent, ht, purple_log_get_logs(type, screenname, account),
+	display_log_viewer(ht, purple_log_get_logs(type, screenname, account),
 			title, gtk_image_new_from_pixbuf(prpl_icon),
 			purple_log_get_total_size(type, screenname, account));
 
@@ -734,10 +730,6 @@
 }
 
 void pidgin_log_show_contact(PurpleContact *contact) {
-	pidgin_log_show_contact_with_parent(NULL, contact);
-}
-
-void pidgin_log_show_contact_with_parent(GtkWindow *parent, PurpleContact *contact) {
 	struct log_viewer_hash_t *ht = g_new0(struct log_viewer_hash_t, 1);
 	PurpleBlistNode *child;
 	PidginLogViewer *lv = NULL;
@@ -791,16 +783,11 @@
 	}
 
 	title = g_strdup_printf(_("Conversations with %s"), name);
-	display_log_viewer(parent, ht, logs, title, image, total_log_size);
+	display_log_viewer(ht, logs, title, image, total_log_size);
 	g_free(title);
 }
 
-void pidgin_syslog_show(void)
-{
-	pidgin_syslog_show_with_parent(NULL);
-}
-
-void pidgin_syslog_show_with_parent(GtkWindow *parent)
+void pidgin_syslog_show()
 {
 	GList *accounts = NULL;
 	GList *logs = NULL;
@@ -820,7 +807,7 @@
 	}
 	logs = g_list_sort(logs, purple_log_compare);
 
-	syslog_viewer = display_log_viewer(parent, NULL, logs, _("System Log"), NULL, 0);
+	syslog_viewer = display_log_viewer(NULL, logs, _("System Log"), NULL, 0);
 }
 
 /****************************************************************************
--- a/pidgin/gtklog.h	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtklog.h	Fri Nov 16 22:42:59 2007 +0000
@@ -54,12 +54,9 @@
 
 
 void pidgin_log_show(PurpleLogType type, const char *screenname, PurpleAccount *account);
-void pidgin_log_show_with_parent(GtkWindow *parent, PurpleLogType type, const char *screenname, PurpleAccount *account);
 void pidgin_log_show_contact(PurpleContact *contact);
-void pidgin_log_show_contact_with_parent(GtkWindow *parent, PurpleContact *contact);
 
 void pidgin_syslog_show(void);
-void pidgin_syslog_show_with_parent(GtkWindow *parent);
 
 /**************************************************************************/
 /** @name GTK+ Log Subsystem                                              */
--- a/pidgin/gtkplugin.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkplugin.c	Fri Nov 16 22:42:59 2007 +0000
@@ -533,11 +533,6 @@
 
 void pidgin_plugin_dialog_show()
 {
-	pidgin_plugin_dialog_show_with_parent(NULL);
-}
-
-void pidgin_plugin_dialog_show_with_parent(GtkWindow *parent)
-{
 	GtkWidget *sw;
 	GtkWidget *event_view;
 	GtkListStore *ls;
@@ -546,8 +541,6 @@
 	GtkTreeSelection *sel;
 
 	if (plugin_dialog != NULL) {
-		if (parent)
-			gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent);
 		gtk_window_present(GTK_WINDOW(plugin_dialog));
 		return;
 	}
@@ -556,8 +549,6 @@
 						    NULL,
 						    GTK_DIALOG_NO_SEPARATOR,
 						    NULL);
-	if (parent)
-		gtk_window_set_transient_for(GTK_WINDOW(plugin_dialog), parent);
 	pref_button = gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
 						_("Configure Pl_ugin"), PIDGIN_RESPONSE_CONFIGURE);
 	gtk_dialog_add_button(GTK_DIALOG(plugin_dialog),
--- a/pidgin/gtkplugin.h	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkplugin.h	Fri Nov 16 22:42:59 2007 +0000
@@ -77,9 +77,4 @@
  */
 void pidgin_plugin_dialog_show(void);
 
-/**
- * Shows the Plugins dialog, transient to a parent window
- */
-void pidgin_plugin_dialog_show_with_parent(GtkWindow *parent);
-
 #endif /* _PIDGINPLUGIN_H_ */
--- a/pidgin/gtkpounce.c	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkpounce.c	Fri Nov 16 22:42:59 2007 +0000
@@ -472,13 +472,6 @@
 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;
 	GtkWidget *window;
 	GtkWidget *label;
@@ -1057,7 +1050,7 @@
 static void
 pounces_manager_add_cb(GtkButton *button, gpointer user_data)
 {
-	pidgin_pounce_editor_show_with_parent(GTK_WINDOW(pounces_manager->window), NULL, NULL, NULL);
+	pidgin_pounce_editor_show(NULL, NULL, NULL);
 }
 
 static void
@@ -1067,7 +1060,7 @@
 	PurplePounce *pounce;
 
 	gtk_tree_model_get(model, iter, POUNCES_MANAGER_COLUMN_POUNCE, &pounce, -1);
-	pidgin_pounce_editor_show_with_parent(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce);
+	pidgin_pounce_editor_show(NULL, NULL, pounce);
 }
 
 static void
@@ -1167,7 +1160,7 @@
 	if ((pounce != NULL) && (event->button == 1) &&
 		(event->type == GDK_2BUTTON_PRESS))
 	{
-		pidgin_pounce_editor_show_with_parent(GTK_WINDOW(pounces_manager->window), NULL, NULL, pounce);
+		pidgin_pounce_editor_show(NULL, NULL, pounce);
 		return TRUE;
 	}
 
@@ -1318,12 +1311,6 @@
 void
 pidgin_pounces_manager_show(void)
 {
-	pidgin_pounces_manager_show_with_parent(NULL);
-}
-
-void
-pidgin_pounces_manager_show_with_parent(GtkWindow *parent)
-{
 	PouncesManager *dialog;
 	GtkWidget *bbox;
 	GtkWidget *button;
@@ -1334,7 +1321,6 @@
 
 	if (pounces_manager != NULL) {
 		gtk_window_present(GTK_WINDOW(pounces_manager->window));
-		gtk_window_set_transient_for(GTK_WINDOW(pounces_manager->window), parent);
 		return;
 	}
 
@@ -1345,7 +1331,6 @@
 
 	dialog->window = win = pidgin_create_window(_("Buddy Pounces"), PIDGIN_HIG_BORDER, "pounces", TRUE);
 	gtk_window_set_default_size(GTK_WINDOW(win), width, height);
-	gtk_window_set_transient_for(GTK_WINDOW(win), parent);
 
 	g_signal_connect(G_OBJECT(win), "delete_event",
 					 G_CALLBACK(pounces_manager_destroy_cb), dialog);
--- a/pidgin/gtkpounce.h	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/gtkpounce.h	Fri Nov 16 22:42:59 2007 +0000
@@ -31,28 +31,16 @@
 /**
  * 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_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_with_parent(GtkWindow *parent);
-
-/**
- * @deprecated Please use pidgin_pounces_manager_show_with_parent
- */
 void pidgin_pounces_manager_show(void);
 
 /**
--- a/pidgin/plugins/perl/common/GtkDialogs.xs	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/plugins/perl/common/GtkDialogs.xs	Fri Nov 16 22:42:59 2007 +0000
@@ -10,10 +10,6 @@
 pidgin_dialogs_about()
 
 void
-pidgin_dialogs_about_with_parent(parent)
-	void * parent
-
-void
 pidgin_dialogs_im()
 
 void
--- a/pidgin/plugins/perl/common/GtkLog.xs	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/plugins/perl/common/GtkLog.xs	Fri Nov 16 22:42:59 2007 +0000
@@ -13,27 +13,11 @@
 	Purple::Account account
 
 void
-pidgin_log_show_with_parent(parent, type, screenname, account)
-	void * parent
-	Purple::LogType type
-	const char * screenname
-	Purple::Account account
-
-void
 pidgin_log_show_contact(contact)
 	Purple::BuddyList::Contact contact
 
-void
-pidgin_log_show_contact_with_parent(parent, contact)
-	void * parent
-	Purple::BuddyList::Contact contact
-
 MODULE = Pidgin::Log  PACKAGE = Pidgin::SysLog  PREFIX = pidgin_syslog_
 PROTOTYPES: ENABLE
 
 void
 pidgin_syslog_show()
-
-void
-pidgin_syslog_show_with_parent(parent)
-	void * parent
--- a/pidgin/plugins/perl/common/GtkPlugin.xs	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/plugins/perl/common/GtkPlugin.xs	Fri Nov 16 22:42:59 2007 +0000
@@ -11,7 +11,3 @@
 
 void
 pidgin_plugin_dialog_show()
-
-void
-pidgin_plugin_dialog_show_with_parent(parent)
-	void * parent
--- a/pidgin/plugins/perl/common/GtkPounce.xs	Sat Oct 13 23:32:54 2007 +0000
+++ b/pidgin/plugins/perl/common/GtkPounce.xs	Fri Nov 16 22:42:59 2007 +0000
@@ -9,13 +9,6 @@
 	const char * name
 	Purple::Pounce 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
 
@@ -29,8 +22,4 @@
 pidgin_pounces_manager_show()
 
 void
-pidgin_pounces_manager_show_with_parent(parent)
-	void * parent
-
-void
 pidgin_pounces_manager_hide()