Mercurial > pidgin.yaz
view plugins/iconaway.c @ 1751:14494564481e
[gaim-migrate @ 1761]
a long december and there's reason to believe
maybe this year will be better than the last
i can't remember the last thing that you said as you were leaving
and the days go by so fast
and it's one more day up in the canyon
and it's one more night in hollywood
if you think that i could be forgiven
wish you would
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 25 Apr 2001 19:42:45 +0000 |
parents | cabde2947ba4 |
children | 0da2a831c0ae |
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; #ifdef USE_APPLET extern void applet_destroy_buddy(); #endif void iconify_windows(struct gaim_connection *gc, char *state, char *message, void *data) { if (!gc->away) return; if (!imaway) return; 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 } char *gaim_plugin_init(GModule *h) { handle = h; gaim_signal_connect(handle, event_away, iconify_windows, NULL); return NULL; } char *name() { return "Iconify On Away"; } char *description() { return "Iconifies the away box and the buddy list when you go away."; }