changeset 14587:bee5661c15cb

[gaim-migrate @ 17311] I couldn't see a reason why we needed all of gaim_gtk_roomlist_dialog_new, gaim_gtk_roomlist_dialog_new_with_account, gaim_gtk_roomlist_dialog_show, and gaim_gtk_roomlist_dialog_show_with_account especially considering the _show functions basically just called the _new functions. So I whittled us down to just _show and _show_with_account being visible. And since nothing outside GtkRoomlist.c was using the GaimGtkRoomlistDialog struct I made that private too. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Mon, 18 Sep 2006 18:14:50 +0000
parents 089e65ea9813
children c1ccaa4c7f12
files ChangeLog.API gtk/gtkroomlist.c gtk/gtkroomlist.h gtk/plugins/perl/common/GtkRoomlist.xs gtk/plugins/perl/common/gtkmodule.h gtk/plugins/perl/common/typemap
diffstat 6 files changed, 24 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Mon Sep 18 15:07:10 2006 +0000
+++ b/ChangeLog.API	Mon Sep 18 18:14:50 2006 +0000
@@ -199,6 +199,9 @@
 	* 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.
+	* GaimGtkRoomlistDialog: Nothing used it outside of the file it was in.
+	* gaim_gtk_roomlist_dialog_new: use gaim_gtk_roomlist_show
+	* gaim_gtk_roomlist_dialog_new_with_account: use gaim_gtk_roomlist_show_with_account
 
 	Added:
 	* gaim_prefs_disconnect_by_handle()
@@ -325,6 +328,7 @@
 	* gaim_buddy_get_server_alias()
 	* gaim_conv_send_confirm()
 	* GaimConversationUiOps.send_confirm
+	* gaim_gtk_roomlist_dialog_show_with_account
 
 	Signals - Changed:  (See the Doxygen docs for details on all signals.)
 	* Signal propagation now stops after a handler returns a non-NULL value.
--- a/gtk/gtkroomlist.c	Mon Sep 18 15:07:10 2006 +0000
+++ b/gtk/gtkroomlist.c	Mon Sep 18 18:14:50 2006 +0000
@@ -34,15 +34,7 @@
 
 #include "gtkroomlist.h"
 
-typedef struct _GaimGtkRoomlist {
-	GaimGtkRoomlistDialog *dialog;
-	GtkTreeStore *model;
-	GtkWidget *tree;
-	GHashTable *cats; /**< Meow. */
-	gint num_rooms, total_rooms;
-} GaimGtkRoomlist;
-
-struct _GaimGtkRoomlistDialog {
+typedef struct _GaimGtkRoomlistDialog {
 	GtkWidget *window;
 	GtkWidget *account_widget;
 	GtkWidget *progress;
@@ -60,7 +52,15 @@
 	gboolean pg_needs_pulse;
 	gboolean pg_to_active;
 	guint pg_update_to;
-};
+} GaimGtkRoomlistDialog;
+
+typedef struct _GaimGtkRoomlist {
+	GaimGtkRoomlistDialog *dialog;
+	GtkTreeStore *model;
+	GtkWidget *tree;
+	GHashTable *cats; /**< Meow. */
+	gint num_rooms, total_rooms;
+} GaimGtkRoomlist;
 
 enum {
 	NAME_COLUMN = 0,
@@ -335,7 +335,8 @@
 	return FALSE;
 }
 
-GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new_with_account(GaimAccount *account)
+static GaimGtkRoomlistDialog *
+gaim_gtk_roomlist_dialog_new_with_account(GaimAccount *account)
 {
 	GaimGtkRoomlistDialog *dialog;
 	GtkWidget *window;
@@ -459,12 +460,7 @@
 	return dialog;
 }
 
-GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new(void)
-{
-	return gaim_gtk_roomlist_dialog_new_with_account(NULL);
-}
-
-static void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account)
+void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account)
 {
 	GaimGtkRoomlistDialog *dialog;
 
@@ -477,7 +473,7 @@
 
 void gaim_gtk_roomlist_dialog_show(void)
 {
-	gaim_gtk_roomlist_dialog_new();
+	gaim_gtk_roomlist_dialog_new_with_account(NULL);
 }
 
 static void gaim_gtk_roomlist_new(GaimRoomlist *list)
--- a/gtk/gtkroomlist.h	Mon Sep 18 15:07:10 2006 +0000
+++ b/gtk/gtkroomlist.h	Mon Sep 18 18:14:50 2006 +0000
@@ -27,9 +27,6 @@
 
 #include "roomlist.h"
 
-
-typedef struct _GaimGtkRoomlistDialog GaimGtkRoomlistDialog;
-
 /**
  * Initializes the room list subsystem.
  */
@@ -44,24 +41,16 @@
 gboolean gaim_gtk_roomlist_is_showable(void);
 
 /**
- * Shows the roomlist dialog.
+ * Shows a new roomlist dialog.
  */
 void gaim_gtk_roomlist_dialog_show(void);
 
 /**
- * Creates a new room list dialog.
- *
- * @return The new dialog.
- */
-GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new(void);
-
-/**
- * Creates a new room list dialog and fetch the list on
- * the specified account.
+ * Shows a new room list dialog and fetches the list for the specified account.
  *
  * @param account The account to force.
  * @return The new dialog.
  */
-GaimGtkRoomlistDialog *gaim_gtk_roomlist_dialog_new_with_account(GaimAccount *account);
+void gaim_gtk_roomlist_dialog_show_with_account(GaimAccount *account);
 
 #endif /* _GAIM_GTKROOMLIST_H_ */
--- a/gtk/plugins/perl/common/GtkRoomlist.xs	Mon Sep 18 15:07:10 2006 +0000
+++ b/gtk/plugins/perl/common/GtkRoomlist.xs	Mon Sep 18 18:14:50 2006 +0000
@@ -10,15 +10,8 @@
 PROTOTYPES: ENABLE
 
 void
-gaim_gtk_roomlist_dialog_show(class)
-    C_ARGS: /* void */
+gaim_gtk_roomlist_dialog_show()
 
-Gaim::GtkUI::Roomlist::Dialog
-gaim_gtk_roomlist_dialog_new(class)
-    C_ARGS: /* void */
-
-Gaim::GtkUI::Roomlist::Dialog
-gaim_gtk_roomlist_dialog_new_with_account(class, account)
+void
+gaim_gtk_roomlist_dialog_show_with_account(account)
 	Gaim::Account account
-    C_ARGS:
-	account
--- a/gtk/plugins/perl/common/gtkmodule.h	Mon Sep 18 15:07:10 2006 +0000
+++ b/gtk/plugins/perl/common/gtkmodule.h	Mon Sep 18 18:14:50 2006 +0000
@@ -72,8 +72,5 @@
 /* gtkmenutray.h */
 typedef GaimGtkMenuTray *				Gaim__GtkUI__MenuTray;
 
-/* gtkroomlist.h */
-typedef GaimGtkRoomlistDialog *				Gaim__GtkUI__Roomlist__Dialog;
-
 /* gtkstatusbox.h */
 typedef GtkGaimStatusBox *				Gaim__GtkUI__StatusBox;
--- a/gtk/plugins/perl/common/typemap	Mon Sep 18 15:07:10 2006 +0000
+++ b/gtk/plugins/perl/common/typemap	Mon Sep 18 18:14:50 2006 +0000
@@ -17,5 +17,4 @@
 Gaim::GtkUI::IMHtml::Options            T_IV
 Gaim::GtkUI::IMHtmlToolbar              T_GaimObj
 Gaim::GtkUI::MenuTray                   T_GaimObj
-Gaim::GtkUI::Roomlist::Dialog           T_GaimObj
 Gaim::GtkUI::StatusBox                  T_GaimObj