changeset 14394:2620e491c8f1

[gaim-migrate @ 17102] Remove gaim_show_xfer_dialog, it was only used as a callback from the buddy list menus, and it just ended up calling gaim_gtkxfer_dialog_show anyway, so I removed the middle man. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 31 Aug 2006 21:52:06 +0000
parents 81932c1ec6cf
children d72cbd259357
files doc/ChangeLog.API gtk/gtkblist.c gtk/gtkft.c gtk/gtkft.h
diffstat 4 files changed, 20 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog.API	Thu Aug 31 21:50:55 2006 +0000
+++ b/doc/ChangeLog.API	Thu Aug 31 21:52:06 2006 +0000
@@ -130,6 +130,8 @@
 	* GAIM_CMD_P_VERYHIGH is now GAIM_CMD_P_VERY_HIGH
 	* gtk_imhtml_search_find(): Now wraps around to the top instead of
 	  clearing the search at the end.
+	* gaim_gtkxfer_dialog_show: Can now take NULL to show (and possibly
+	  create) a default gtkxfer dialog.
 
 	Removed:
 	* gaim_gtk_sound_{get,set}_mute() (replaced by the /gaim/gtk/sound/mute
@@ -194,6 +196,7 @@
 	* Removed ui_ops from GaimBuddyList. Use gaim_blist_get_ui_ops() instead
 	* GaimGtkLogViewer hidden... You weren't using it anyway.
 	* GaimGtkConversation: dialogs (dialogs.search moved to GaimGtkWindow)
+	* gaim_show_xfer_dialog: Use gaim_gtk_xfer_dialog_show(NULL) instead.
 
 	Added:
 	* gaim_prefs_disconnect_by_handle()
@@ -373,6 +376,7 @@
 	* "gtkblist-unhiding"
 	* "log-displaying"
 	* "savedstatus-changed"
+	* "sendto-extended-menu"
 
 	Signals - Removed:
 	* "account-away": replaced by account-status-changed
--- a/gtk/gtkblist.c	Thu Aug 31 21:50:55 2006 +0000
+++ b/gtk/gtkblist.c	Thu Aug 31 21:52:06 2006 +0000
@@ -2494,7 +2494,7 @@
 	{ N_("/Tools/Pr_eferences"), "<CTL>P", gaim_gtk_prefs_show, 0, "<StockItem>", GTK_STOCK_PREFERENCES },
 	{ N_("/Tools/Pr_ivacy"), NULL, gaim_gtk_privacy_dialog_show, 0, "<StockItem>", GTK_STOCK_DIALOG_ERROR },
 	{ "/Tools/sep2", NULL, NULL, 0, "<Separator>", NULL },
-	{ N_("/Tools/_File Transfers"), "<CTL>T", gaim_show_xfer_dialog, 0, "<StockItem>", GAIM_STOCK_FILE_TRANSFER },
+	{ N_("/Tools/_File Transfers"), "<CTL>T", gaim_gtkxfer_dialog_show, 0, "<StockItem>", GAIM_STOCK_FILE_TRANSFER },
 	{ N_("/Tools/R_oom List"), NULL, gaim_gtk_roomlist_dialog_show, 0, "<StockItem>", GTK_STOCK_INDEX },
 	{ N_("/Tools/System _Log"), NULL, gtk_blist_show_systemlog_cb, 0, "<StockItem>", GAIM_STOCK_LOG },
 	{ "/Tools/sep3", NULL, NULL, 0, "<Separator>", NULL },
--- a/gtk/gtkft.c	Thu Aug 31 21:50:55 2006 +0000
+++ b/gtk/gtkft.c	Thu Aug 31 21:52:06 2006 +0000
@@ -844,9 +844,20 @@
 void
 gaim_gtkxfer_dialog_show(GaimGtkXferDialog *dialog)
 {
-	g_return_if_fail(dialog != NULL);
+	GaimGtkXferDialog *tmp;
+
+	if (dialog == NULL) {
+		tmp = gaim_get_gtkxfer_dialog();
 
-	gtk_widget_show(dialog->window);
+		if (tmp == NULL) {
+			tmp = gaim_gtkxfer_dialog_new();
+			gaim_set_gtkxfer_dialog(tmp);
+		}
+
+		gtk_widget_show(tmp->window);
+	} else {
+		gtk_widget_show(dialog->window);
+	}
 }
 
 void
@@ -860,22 +871,6 @@
 }
 
 void
-gaim_show_xfer_dialog()
-{
-	GaimGtkXferDialog *dialog;
-
-	dialog = gaim_get_gtkxfer_dialog();
-
-	if (dialog == NULL) {
-		dialog = gaim_gtkxfer_dialog_new();
-
-		gaim_set_gtkxfer_dialog(dialog);
-	}
-
-	gaim_gtkxfer_dialog_show(dialog);
-}
-
-void
 gaim_gtkxfer_dialog_add_xfer(GaimGtkXferDialog *dialog, GaimXfer *xfer)
 {
 	GaimGtkXferUiData *data;
--- a/gtk/gtkft.h	Thu Aug 31 21:50:55 2006 +0000
+++ b/gtk/gtkft.h	Thu Aug 31 21:52:06 2006 +0000
@@ -55,7 +55,8 @@
 void gaim_gtkxfer_dialog_destroy(GaimGtkXferDialog *dialog);
 
 /**
- * Displays the file transfer dialog.
+ * Displays the file transfer dialog given.
+ * If dialog is @c NULL, displays the default dialog, creating one if necessary
  *
  * @param dialog The file transfer dialog to show.
  */
@@ -69,11 +70,6 @@
 void gaim_gtkxfer_dialog_hide(GaimGtkXferDialog *dialog);
 
 /**
- * Shows the file transfer dialog, creating a new one if necessary
- */
-void gaim_show_xfer_dialog(void);
-
-/**
  * Adds a file transfer to the dialog.
  *
  * @param dialog The file transfer dialog.