view plugins/iconaway.c @ 140:436bead8f65d

[gaim-migrate @ 150] There was some weird case where it wouldn't set your password properly if you use different passwords between screen names. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 19 Apr 2000 22:12:02 +0000
parents e8ea1e2fdf0c
children ec301cfcaebf
line wrap: on
line source

#define GAIM_PLUGINS
#include "gaim.h"

#include <gdk/gdkx.h>
#include <X11/Xlib.h>

void *handle;

extern GtkWidget *imaway;
extern GtkWidget *blist;

extern void set_applet_draw_closed();

void iconify_windows(void *data) {
	XIconifyWindow(GDK_DISPLAY(),
			GDK_WINDOW_XWINDOW(imaway->window),
			((_XPrivDisplay)GDK_DISPLAY())->default_screen);
#ifdef USE_APPLET
	applet_destroy_buddy();
#else
	XIconifyWindow(GDK_DISPLAY(),
			GDK_WINDOW_XWINDOW(blist->window),
			((_XPrivDisplay)GDK_DISPLAY())->default_screen);
#endif
}

void gaim_plugin_init(void *h) {
	handle = h;

	gaim_signal_connect(handle, event_away, iconify_windows, NULL);
}

char *name() {
	return "Iconify On Away";
}

char *description() {
	return "Iconifies the away box and the buddy list when you go away.";
}