Mercurial > pidgin
annotate plugins/iconaway.c @ 3476:36fd2bddddf6
[gaim-migrate @ 3527]
+ gdk_pixbuf_free(icon);
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Fri, 30 Aug 2002 03:27:26 +0000 |
parents | d33ec392a5e1 |
children | cd938f18f3f8 |
rev | line source |
---|---|
2098
d37c2220e4df
[gaim-migrate @ 2108]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2090
diff
changeset
|
1 #include "../config.h" |
133 | 2 #include "gaim.h" |
3 | |
3472 | 4 #include <gtk/gtk.h> |
133 | 5 |
6 void *handle; | |
7 | |
8 extern GtkWidget *imaway; | |
9 extern GtkWidget *blist; | |
1779
0da2a831c0ae
[gaim-migrate @ 1789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1406
diff
changeset
|
10 extern GtkWidget *all_chats; |
0da2a831c0ae
[gaim-migrate @ 1789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1406
diff
changeset
|
11 extern GtkWidget *all_convos; |
133 | 12 |
147
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
13 #ifdef USE_APPLET |
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
14 extern void applet_destroy_buddy(); |
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
15 #endif |
133 | 16 |
1404
96e93119268d
[gaim-migrate @ 1414]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1047
diff
changeset
|
17 void iconify_windows(struct gaim_connection *gc, char *state, char *message, void *data) { |
2395
c014fd611443
[gaim-migrate @ 2408]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2098
diff
changeset
|
18 if (!imaway || !gc->away) |
1406
cabde2947ba4
[gaim-migrate @ 1416]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1405
diff
changeset
|
19 return; |
3472 | 20 gtk_window_iconify(GTK_WINDOW(imaway)); |
3188 | 21 hide_buddy_list(); |
1779
0da2a831c0ae
[gaim-migrate @ 1789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1406
diff
changeset
|
22 if (all_convos) |
3472 | 23 gtk_window_iconify(GTK_WINDOW(all_convos)); |
1779
0da2a831c0ae
[gaim-migrate @ 1789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1406
diff
changeset
|
24 if (all_chats) |
3472 | 25 gtk_window_iconify(GTK_WINDOW(all_chats)); |
133 | 26 } |
27 | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
28 char *gaim_plugin_init(GModule *h) { |
133 | 29 handle = h; |
30 | |
31 gaim_signal_connect(handle, event_away, iconify_windows, NULL); | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
32 |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
33 return NULL; |
133 | 34 } |
35 | |
36 char *name() { | |
37 return "Iconify On Away"; | |
38 } | |
39 | |
40 char *description() { | |
41 return "Iconifies the away box and the buddy list when you go away."; | |
42 } |