diff plugins/notify.c @ 5676:dae79aefac8d

[gaim-migrate @ 6094] I've been meaning to do this for a LONG time. The conversation API now follows the naming convention of the rest of the new APIs. I'll get some g_return_*_if_fail() checks in there soon. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 02 Jun 2003 21:51:06 +0000
parents 2c4c975620f0
children 7d385de2f9cd
line wrap: on
line diff
--- a/plugins/notify.c	Mon Jun 02 21:14:50 2003 +0000
+++ b/plugins/notify.c	Mon Jun 02 21:51:06 2003 +0000
@@ -71,11 +71,11 @@
 void quote_add(GtkWidget *widget);
 gboolean quote_remove(GtkWidget *widget);
 /* urgent functions */
-void urgent_add(struct gaim_conversation *c);
-gboolean urgent_remove(struct gaim_conversation *c);
+void urgent_add(GaimConversation *c);
+gboolean urgent_remove(GaimConversation *c);
 
-int notify(struct gaim_conversation *cnv) {
-	struct gaim_gtk_window *gtkwin;
+int notify(GaimConversation *cnv) {
+	GaimGtkWindow *gtkwin;
 	Window focus_return;
 	int revert_to_return;
 
@@ -97,8 +97,8 @@
 	return 0;
 }
 
-guint unnotify(struct gaim_conversation *c, gboolean clean) {
-	struct gaim_gtk_window *gtkwin;
+guint unnotify(GaimConversation *c, gboolean clean) {
+	GaimGtkWindow *gtkwin;
 	guint option = 0;
 
 	gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
@@ -130,7 +130,7 @@
 }
 
 void chat_recv_im(struct gaim_connection *gc, int id, char **who, char **text) {
-	struct gaim_conversation *c = gaim_find_chat(gc, id);
+	GaimConversation *c = gaim_find_chat(gc, id);
 
 	if (c && (type & TYPE_CHAT))
 		notify(c);
@@ -138,7 +138,7 @@
 }
 
 void chat_sent_im(struct gaim_connection *gc, int id, char **text) {
-	struct gaim_conversation *c = gaim_find_chat(gc, id);
+	GaimConversation *c = gaim_find_chat(gc, id);
 
 	if (c && (type & TYPE_CHAT))
 		unnotify(c, FALSE);
@@ -146,7 +146,7 @@
 }
 
 int im_recv_im(struct gaim_connection *gc, char **who, char **what, void *m) {
-	struct gaim_conversation *c = gaim_find_conversation(*who);
+	GaimConversation *c = gaim_find_conversation(*who);
 
 	if (c && (type & TYPE_IM))
 		notify(c);
@@ -154,16 +154,16 @@
 }
 
 int im_sent_im(struct gaim_connection *gc, char *who, char **what, void *m) {
-	struct gaim_conversation *c = gaim_find_conversation(who);
+	GaimConversation *c = gaim_find_conversation(who);
 
 	if (c && (type & TYPE_IM))
 		unnotify(c, FALSE);
 	return 0;
 }
 
-int attach_signals(struct gaim_conversation *c) {
-	struct gaim_gtk_conversation *gtkconv;
-	struct gaim_gtk_window *gtkwin;
+int attach_signals(GaimConversation *c) {
+	GaimGtkConversation *gtkconv;
+	GaimGtkWindow *gtkwin;
 
 	gtkconv = GAIM_GTK_CONVERSATION(c);
 	gtkwin  = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
@@ -189,9 +189,9 @@
 	return 0;
 }
 
-void detach_signals(struct gaim_conversation *c) {
-	struct gaim_gtk_conversation *gtkconv;
-	struct gaim_gtk_window *gtkwin;
+void detach_signals(GaimConversation *c) {
+	GaimGtkConversation *gtkconv;
+	GaimGtkWindow *gtkwin;
 	guint options;
 	
 	gtkconv = GAIM_GTK_CONVERSATION(c);
@@ -214,21 +214,21 @@
 }
 
 void new_conv(char *who) {
-	struct gaim_conversation *c = gaim_find_conversation(who);
+	GaimConversation *c = gaim_find_conversation(who);
 
 	if (c && (type & TYPE_IM))
 		attach_signals(c);
 }
 
 void chat_join(struct gaim_connection *gc, int id, char *room) {
-	struct gaim_conversation *c = gaim_find_chat(gc, id);
+	GaimConversation *c = gaim_find_chat(gc, id);
 
 	if (c && (type & TYPE_CHAT))
 		attach_signals(c);
 }
 
 int un_star(GtkWidget *widget, gpointer data) {
-	struct gaim_conversation *c = g_object_get_data(G_OBJECT(widget), "user_data");
+	GaimConversation *c = g_object_get_data(G_OBJECT(widget), "user_data");
 
 	if (method & METHOD_QUOTE)
 		quote_remove(widget);
@@ -354,8 +354,8 @@
 	return FALSE;
 }
 
-void urgent_add(struct gaim_conversation *c) {
-	struct gaim_gtk_window *gtkwin;
+void urgent_add(GaimConversation *c) {
+	GaimGtkWindow *gtkwin;
 	XWMHints *hints;
 
 	gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
@@ -366,8 +366,8 @@
 	XFree(hints);
 }
 
-gboolean urgent_remove(struct gaim_conversation *c) {
-	struct gaim_gtk_conversation *gtkconv;
+gboolean urgent_remove(GaimConversation *c) {
+	GaimGtkConversation *gtkconv;
 
 	gtkconv = GAIM_GTK_CONVERSATION(c);
 
@@ -376,8 +376,8 @@
 		(gaim_conversation_get_type(c) != GAIM_CONV_CHAT &&
 		 (im_options & OPT_IM_ONE_WINDOW))) {
 		if (gaim_conversation_get_type(c) == GAIM_CONV_CHAT) {
-			struct gaim_conversation *c = (struct gaim_conversation *)gaim_get_chats()->data;
-			struct gaim_gtk_window *gtkwin;
+			GaimConversation *c = (GaimConversation *)gaim_get_chats()->data;
+			GaimGtkWindow *gtkwin;
 			GdkWindow *win;
 			XWMHints *hints;
 
@@ -395,12 +395,12 @@
 			XFree(hints);
 			return FALSE;
 		} else {
-			struct gaim_conversation *c;
-			struct gaim_gtk_window *gtkwin;
+			GaimConversation *c;
+			GaimGtkWindow *gtkwin;
 			GdkWindow *win;
 			XWMHints *hints;
 
-			c = (struct gaim_conversation *)gaim_get_ims()->data;
+			c = (GaimConversation *)gaim_get_ims()->data;
 			gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
 			win = gtkwin->window->window;
 
@@ -415,7 +415,7 @@
 			return FALSE;
 		}
 	} else {
-		struct gaim_gtk_window *gtkwin;
+		GaimGtkWindow *gtkwin;
 		XWMHints *hints;
 
 		gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(c));
@@ -527,9 +527,9 @@
 
 	while (cnv) {
 		guint notification;
-		struct gaim_conversation *c = (struct gaim_conversation *) cnv->data;
-		struct gaim_gtk_conversation *gtkconv;
-		struct gaim_gtk_window *gtkwin;
+		GaimConversation *c = (GaimConversation *) cnv->data;
+		GaimGtkConversation *gtkconv;
+		GaimGtkWindow *gtkwin;
 		guint options = GPOINTER_TO_UINT(g_object_get_data(G_OBJECT(c->window), "notify_data"));
 
 		gtkconv = GAIM_GTK_CONVERSATION(c);
@@ -664,8 +664,8 @@
 	GList *c = gaim_get_conversations();
 
 	while (c) {
-		struct gaim_conversation *cnv = (struct gaim_conversation *)c->data;
-		struct gaim_gtk_window *gtkwin;
+		GaimConversation *cnv = (GaimConversation *)c->data;
+		GaimGtkWindow *gtkwin;
 
 		gtkwin = GAIM_GTK_WINDOW(gaim_conversation_get_window(cnv));