changeset 2381:427ccd7dfdd2

[gaim-migrate @ 2394] server.c: 30 / 935 3 % committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 28 Sep 2001 05:17:16 +0000
parents 6f83c22d9e70
children 569ae9f2bb89
files src/gaim.h src/idle.c src/server.c
diffstat 3 files changed, 6 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaim.h	Fri Sep 28 02:16:34 2001 +0000
+++ b/src/gaim.h	Fri Sep 28 05:17:16 2001 +0000
@@ -613,7 +613,7 @@
 extern gchar *strip_html(gchar *);
 
 /* Functions in idle.c */
-extern gint check_idle(struct gaim_connection *);
+extern gint check_idle(gpointer);
 
 /* Functions in util.c */
 extern char *normalize(const char *);
--- a/src/idle.c	Fri Sep 28 02:16:34 2001 +0000
+++ b/src/idle.c	Fri Sep 28 05:17:16 2001 +0000
@@ -38,8 +38,9 @@
 #include "prpl.h"
 
 
-gint check_idle(struct gaim_connection *gc)
+gint check_idle(gpointer data)
 {
+	struct gaim_connection *gc = data;
 	time_t t;
 #ifdef USE_SCREENSAVER
 	static XScreenSaverInfo *mit_info = NULL;
--- a/src/server.c	Fri Sep 28 02:16:34 2001 +0000
+++ b/src/server.c	Fri Sep 28 05:17:16 2001 +0000
@@ -31,13 +31,6 @@
 #include <sys/time.h>
 #include <unistd.h>
 #include <errno.h>
-#include <gtk/gtk.h>
-#ifdef USE_SCREENSAVER
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/scrnsaver.h>
-#endif /* USE_SCREENSAVER */
-extern int gaim_caps;
 #include "prpl.h"
 #include "multi.h"
 #include "gaim.h"
@@ -107,7 +100,7 @@
 	if (gc->idle_timer > 0)
 		g_source_remove(gc->idle_timer);
 
-	gc->idle_timer = g_timeout_add(20000, (GtkFunction)check_idle, gc);
+	gc->idle_timer = g_timeout_add(20000, check_idle, gc);
 	serv_touch_idle(gc);
 
 	time(&gc->login_time);
@@ -656,7 +649,6 @@
 		g_snprintf(b->name, sizeof(b->name), "%s", name);
 		handle_buddy_rename(b, who);
 		g_free(who);
-		/*gtk_label_set_text(GTK_LABEL(b->label), b->name); */
 
 		/* okay lets save the new config... */
 
@@ -708,18 +700,10 @@
 	set_buddy(gc, b);
 }
 
-static
-void close_warned(GtkWidget *w, GtkWidget *w2)
-{
-	gtk_widget_destroy(w2);
-}
-
-
 
 void serv_got_eviled(struct gaim_connection *gc, char *name, int lev)
 {
 	char buf2[1024];
-	GtkWidget *d, *label, *close;
 
 	plugin_event(event_warned, gc, name, (void *)lev, 0);
 
@@ -733,20 +717,7 @@
 	g_snprintf(buf2, sizeof(buf2), "%s has just been warned by %s.\nYour new warning level is %d%%",
 		   gc->username, ((name == NULL)? "an anonymous person" : name), lev);
 
-	d = gtk_dialog_new();
-	gtk_widget_realize(d);
-	aol_icon(d->window);
-
-	label = gtk_label_new(buf2);
-	gtk_widget_show(label);
-	close = picture_button(d, _("Close"), cancel_xpm);
-	gtk_widget_show(close);
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->vbox), label, FALSE, FALSE, 5);
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(d)->action_area), close, FALSE, FALSE, 5);
-
-	gtk_window_set_title(GTK_WINDOW(d), "Warned");
-	gtk_signal_connect(GTK_OBJECT(close), "clicked", GTK_SIGNAL_FUNC(close_warned), d);
-	gtk_widget_show(d);
+	do_error_dialog(_("Warned"), buf2);
 }
 
 
@@ -955,7 +926,7 @@
 {
 	if (on && !gc->keepalive && blist) {
 		debug_printf("allowing NOP\n");
-		gc->keepalive = g_timeout_add(60000, (GtkFunction)send_keepalive, gc);
+		gc->keepalive = g_timeout_add(60000, send_keepalive, gc);
 	} else if (!on && gc->keepalive > 0) {
 		debug_printf("removing NOP\n");
 		g_source_remove(gc->keepalive);