changeset 3428:0202b5e1af69

[gaim-migrate @ 3454] Thanks Etan. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sun, 25 Aug 2002 19:24:30 +0000
parents 8fa61405af2b
children 1b18d4693d32
files plugins/notify.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/notify.c	Sun Aug 25 10:51:24 2002 +0000
+++ b/plugins/notify.c	Sun Aug 25 19:24:30 2002 +0000
@@ -15,13 +15,14 @@
 #define GAIM_PLUGINS
 #include "gaim.h"
 
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
 #include <gtk/gtk.h>
-#include <string.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 #include <gdk/gdkx.h>
-#include <errno.h>
 
 guint choice = 1;
 #define NOTIFY_FOCUS		0x00000001
@@ -53,6 +54,7 @@
 void count_remove(GtkWidget *widget);
 void quote_remove(GtkWidget *widget);
 void urgent_remove(struct conversation *c);
+int counter (char *buf, int *length);
 
 int received_im(struct gaim_connection *gc, char **who, char **what, void *m) {
 	char buf[256];
@@ -122,7 +124,7 @@
 }
 
 int sent_im(struct gaim_connection *gc, char *who, char **what, void *m) {
-	char buf[256];
+	/* char buf[256]; */
 	struct conversation *c = find_conversation(who);
 
 	if (method & METHOD_QUOTE)
@@ -158,6 +160,7 @@
 		gtk_signal_connect_while_alive(GTK_OBJECT(c->entry), "key-press-event", GTK_SIGNAL_FUNC(un_star_window), NULL, GTK_OBJECT(really_evil_hack));
 		gtk_object_set_user_data(GTK_OBJECT(c->entry), (gpointer) c);
 	}
+	return 0;
 }
 
 void un_star(GtkWidget *widget, gpointer data) {
@@ -243,12 +246,11 @@
 }
 
 void urgent_remove(struct conversation *c) {
-	char buf[256];
 	GdkWindow *win = c->window->window;
 
-	XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window));
+	XWMHints *hints = XGetWMHints(GDK_WINDOW_XDISPLAY(win), GDK_WINDOW_XWINDOW(win));
 	hints->flags &= ~XUrgencyHint;
-	XSetWMHints(GDK_WINDOW_XDISPLAY(c->window->window), GDK_WINDOW_XWINDOW(c->window->window), hints);
+	XSetWMHints(GDK_WINDOW_XDISPLAY(win), GDK_WINDOW_XWINDOW(win), hints);
 	return;
 }
 
@@ -258,7 +260,7 @@
 
 	snprintf(buf, 1000, "%s/.gaim/.notify", getenv("HOME"));
 	if (!(fp = fopen(buf, "w"))) {
-		do_error_dialog(_("Unable to write notify plugin config file"), strerror(errno), GAIM_ERROR);
+		do_error_dialog(_("Unable to write to config file"), _("Notify plugin"), GAIM_ERROR);
 		return;
 	}
 
@@ -380,7 +382,7 @@
 
 void gaim_plugin_remove() {
 	GList *c = conversations;
-	guint options;
+	/* guint options; */
 
 	gtk_widget_destroy(really_evil_hack);