Mercurial > pidgin
view plugins/iconaway.c @ 3374:3cd2fbddf95a
[gaim-migrate @ 3393]
I had terrible days today and yesterday--a really terrible weekend.
No cool stuff from me--the prefs away message page works a bit better.
Ari and Chip both sent some patches to make things work a bit better in
GTK 2, and Etan rewrote the notify plugin so it's really cool now!
Thanks, guys!
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 05 Aug 2002 07:33:09 +0000 |
parents | 49fb2b634a2a |
children | d33ec392a5e1 |
line wrap: on
line source
#include "../config.h" #include "gaim.h" #include <gdk/gdkx.h> #include <X11/Xlib.h> void *handle; extern GtkWidget *imaway; extern GtkWidget *blist; extern GtkWidget *all_chats; extern GtkWidget *all_convos; #ifdef USE_APPLET extern void applet_destroy_buddy(); #endif void iconify_windows(struct gaim_connection *gc, char *state, char *message, void *data) { if (!imaway || !gc->away) return; XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(imaway->window), ((_XPrivDisplay)GDK_DISPLAY())->default_screen); hide_buddy_list(); if (all_convos) XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(all_convos->window), ((_XPrivDisplay)GDK_DISPLAY())->default_screen); if (all_chats) XIconifyWindow(GDK_DISPLAY(), GDK_WINDOW_XWINDOW(all_chats->window), ((_XPrivDisplay)GDK_DISPLAY())->default_screen); } 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."; }