Mercurial > pidgin.yaz
annotate plugins/iconaway.c @ 1266:aac04affc65d
[gaim-migrate @ 1276]
first round of cleanups. mostly just ran through indent. changed to have non-blocking connect, that's fun. changed the recv to read and increased reliability.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 14 Dec 2000 12:26:56 +0000 |
parents | ece2d1543b20 |
children | 96e93119268d |
rev | line source |
---|---|
133 | 1 #define GAIM_PLUGINS |
2 #include "gaim.h" | |
3 | |
4 #include <gdk/gdkx.h> | |
5 #include <X11/Xlib.h> | |
6 | |
7 void *handle; | |
8 | |
9 extern GtkWidget *imaway; | |
10 extern GtkWidget *blist; | |
11 | |
147
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
12 #ifdef USE_APPLET |
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
13 extern void applet_destroy_buddy(); |
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
14 #endif |
133 | 15 |
16 void iconify_windows(void *data) { | |
17 XIconifyWindow(GDK_DISPLAY(), | |
18 GDK_WINDOW_XWINDOW(imaway->window), | |
19 ((_XPrivDisplay)GDK_DISPLAY())->default_screen); | |
20 #ifdef USE_APPLET | |
138
e8ea1e2fdf0c
[gaim-migrate @ 148]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
21 applet_destroy_buddy(); |
133 | 22 #else |
23 XIconifyWindow(GDK_DISPLAY(), | |
24 GDK_WINDOW_XWINDOW(blist->window), | |
25 ((_XPrivDisplay)GDK_DISPLAY())->default_screen); | |
26 #endif | |
27 } | |
28 | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
29 char *gaim_plugin_init(GModule *h) { |
133 | 30 handle = h; |
31 | |
32 gaim_signal_connect(handle, event_away, iconify_windows, NULL); | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
33 |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
34 return NULL; |
133 | 35 } |
36 | |
37 char *name() { | |
38 return "Iconify On Away"; | |
39 } | |
40 | |
41 char *description() { | |
42 return "Iconifies the away box and the buddy list when you go away."; | |
43 } |