changeset 9714:2273790bb518

[gaim-migrate @ 10575] Begin cleanup of gtkdialogs.c/.h Renamed show_warn_dialog to gaim_gtkdialogs_warn Renamed show_im_dialog to gaim_gtkdialogs_im Renamed show_info_dialog to gaim_gtkdialogs_info Renamed show_log_dialog to gaim_gtkdialogs_log committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 08 Aug 2004 05:56:17 +0000
parents db62420a53a2
children b030f83693da
files plugins/docklet/docklet.c src/gtkblist.c src/gtkconv.c src/gtkdialogs.c src/gtkdialogs.h src/gtkinternal.h
diffstat 6 files changed, 34 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/docklet/docklet.c	Sun Aug 08 05:38:02 2004 +0000
+++ b/plugins/docklet/docklet.c	Sun Aug 08 05:56:17 2004 +0000
@@ -114,7 +114,7 @@
 			gaim_new_item_from_stock(menu, _("Auto-login"), GAIM_STOCK_SIGN_ON, G_CALLBACK(docklet_auto_login), NULL, 0, 0, NULL);
 			break;
 		default:
-			gaim_new_item_from_stock(menu, _("New Message..."), GAIM_STOCK_IM, G_CALLBACK(show_im_dialog), NULL, 0, 0, NULL);
+			gaim_new_item_from_stock(menu, _("New Message..."), GAIM_STOCK_IM, G_CALLBACK(gaim_gtkdialogs_im), NULL, 0, 0, NULL);
 			gaim_new_item_from_stock(menu, _("Join A Chat..."), GAIM_STOCK_CHAT, G_CALLBACK(gaim_gtk_blist_joinchat_show), NULL, 0, 0, NULL);
 			break;
 	}
--- a/src/gtkblist.c	Sun Aug 08 05:38:02 2004 +0000
+++ b/src/gtkblist.c	Sun Aug 08 05:56:17 2004 +0000
@@ -580,7 +580,7 @@
 			return;
 		}
 	}
-	show_im_dialog();
+	gaim_gtkdialogs_im();
 }
 
 static void gtk_blist_button_info_cb(GtkWidget *w, GtkTreeView *tv)
@@ -602,7 +602,7 @@
 			return;
 		}
 	}
-	show_info_dialog();
+	gaim_gtkdialogs_info();
 }
 
 static void
@@ -2319,10 +2319,10 @@
 {
 	/* Buddies menu */
 	{ N_("/_Buddies"), NULL, NULL, 0, "<Branch>" },
-	{ N_("/Buddies/New Instant _Message..."), "<CTL>M", show_im_dialog, 0, "<StockItem>", GAIM_STOCK_IM },
+	{ N_("/Buddies/New Instant _Message..."), "<CTL>M", gaim_gtkdialogs_im, 0, "<StockItem>", GAIM_STOCK_IM },
 	{ N_("/Buddies/Join a _Chat..."), "<CTL>C", gaim_gtk_blist_joinchat_show, 0, "<StockItem>", GAIM_STOCK_CHAT },
-	{ N_("/Buddies/Get User _Info..."), "<CTL>I", show_info_dialog, 0, "<StockItem>", GAIM_STOCK_INFO },
-	{ N_("/Buddies/View User _Log..."), "<CTL>L", show_log_dialog, 0, NULL },
+	{ N_("/Buddies/Get User _Info..."), "<CTL>I", gaim_gtkdialogs_info, 0, "<StockItem>", GAIM_STOCK_INFO },
+	{ N_("/Buddies/View User _Log..."), "<CTL>L", gaim_gtkdialogs_log, 0, NULL },
 	{ "/Buddies/sep1", NULL, NULL, 0, "<Separator>" },
 	{ N_("/Buddies/Show _Offline Buddies"), NULL, gaim_gtk_blist_edit_mode_cb, 1, "<CheckItem>"},
 	{ N_("/Buddies/Show _Empty Groups"), NULL, gaim_gtk_blist_show_empty_groups_cb, 1, "<CheckItem>"},
--- a/src/gtkconv.c	Sun Aug 08 05:38:02 2004 +0000
+++ b/src/gtkconv.c	Sun Aug 08 05:56:17 2004 +0000
@@ -602,7 +602,7 @@
 static void
 warn_cb(GtkWidget *widget, GaimConversation *conv)
 {
-	show_warn_dialog(gaim_conversation_get_gc(conv),
+	gaim_gtkdialogs_warn(gaim_conversation_get_gc(conv),
 					 gaim_conversation_get_name(conv));
 
 	gtk_widget_grab_focus(GAIM_GTK_CONVERSATION(conv)->entry);
@@ -777,7 +777,7 @@
 static void
 menu_new_conv_cb(gpointer data, guint action, GtkWidget *widget)
 {
-	show_im_dialog();
+	gaim_gtkdialogs_im();
 }
 
 static void
--- a/src/gtkdialogs.c	Sun Aug 08 05:38:02 2004 +0000
+++ b/src/gtkdialogs.c	Sun Aug 08 05:56:17 2004 +0000
@@ -131,7 +131,7 @@
 	g_free(w);
 }
 
-void show_warn_dialog(GaimConnection *gc, const char *who)
+void gaim_gtkdialogs_warn(GaimConnection *gc, const char *who)
 {
 	char *labeltext;
 	GtkWidget *hbox, *vbox;
@@ -440,7 +440,7 @@
 }
 
 void
-show_im_dialog(void)
+gaim_gtkdialogs_im(void)
 {
 	GaimRequestFields *fields;
 	GaimRequestFieldGroup *group;
@@ -496,7 +496,7 @@
 }
 
 void
-show_info_dialog(void)
+gaim_gtkdialogs_info(void)
 {
 	GaimRequestFields *fields;
 	GaimRequestFieldGroup *group;
@@ -548,7 +548,7 @@
 }
 
 void
-show_log_dialog(void)
+gaim_gtkdialogs_log(void)
 {
 	GaimRequestFields *fields;
 	GaimRequestFieldGroup *group;
--- a/src/gtkdialogs.h	Sun Aug 08 05:38:02 2004 +0000
+++ b/src/gtkdialogs.h	Sun Aug 08 05:56:17 2004 +0000
@@ -31,20 +31,26 @@
 #include "gtkinternal.h"
 
 /* Functions in gtkdialogs.c (these should actually stay in this file) */
+void gaim_gtkdialogs_im();
+void gaim_gtkdialogs_info();
+void gaim_gtkdialogs_log();
+void gaim_gtkdialogs_new_im(GaimAccount *, const char *);
+void gaim_gtkdialogs_warn(GaimConnection *, const char *);
+
 void alias_dialog_bud(GaimBuddy *);
 void alias_dialog_contact(GaimContact *);
 void alias_dialog_blist_chat(GaimChat *);
-void show_warn_dialog(GaimConnection *, const char *);
-void gaim_gtkdialogs_new_im(GaimAccount *, const char *);
-void show_im_dialog();
-void show_info_dialog();
-void show_log_dialog();
-void destroy_all_dialogs();
 void create_away_mess(GtkWidget *, void *);
 void show_confirm_del(GaimBuddy *);
 void show_confirm_del_group(GaimGroup *);
 void show_confirm_del_blist_chat(GaimChat *);
 void show_confirm_del_contact(GaimContact *);
+void destroy_all_dialogs();
+
+/* Functions in about.c */
+extern void show_about(GtkWidget *, void *);
+
+/* Everything after this should probably be moved elsewhere */
 
 /**
  * Our UI's identifier.
@@ -56,14 +62,6 @@
 			gtk_window_set_type_hint(GTK_WINDOW(x), GDK_WINDOW_TYPE_HINT_DIALOG)
 #define GAIM_WINDOW_ICONIFIED(x) (gdk_window_get_state(GTK_WIDGET(x)->window) & GDK_WINDOW_STATE_ICONIFIED)
 
-/* This is backwards-compatibility code for old versions of GTK+ (2.2.1 and
- * earlier).  It defines the new wrap behavior (unknown in earlier versions)
- * as the old (slightly buggy) wrap behavior.
- */
-#ifndef GTK_WRAP_WORD_CHAR
-#define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD
-#endif
-
 #define DEFAULT_FONT_FACE "Helvetica"
 
 
@@ -115,9 +113,6 @@
 extern struct smiley_theme *current_smiley_theme;
 extern GSList *smiley_themes;
 
-/* Functions in about.c */
-extern void show_about(GtkWidget *, void *);
-
 /* Functions in main.c */
 extern void show_login();
 extern void gaim_setup(GaimConnection *);
--- a/src/gtkinternal.h	Sun Aug 08 05:38:02 2004 +0000
+++ b/src/gtkinternal.h	Sun Aug 08 05:56:17 2004 +0000
@@ -39,4 +39,14 @@
 # define GAIM_ALERT_TITLE "Gaim"
 #endif
 
+/*
+ * This is backwards-compatibility code for old versions of GTK+ (2.2.1 and
+ * earlier).  It defines the new wrap behavior (unknown in earlier versions)
+ * as the old (slightly buggy) wrap behavior.
+ */
+#ifndef GTK_WRAP_WORD_CHAR
+#define GTK_WRAP_WORD_CHAR GTK_WRAP_WORD
+#endif
+
+
 #endif /* _GAIM_GTKINTERNAL_H_ */