Mercurial > pidgin
annotate plugins/iconaway.c @ 3610:9313e146daf4
[gaim-migrate @ 3723]
Thanks much to Wil Mahan :)
(thats with one l ;-))
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Wed, 09 Oct 2002 04:55:57 +0000 |
parents | 83a54877f1ae |
children | 9682c0e022c6 |
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 | |
3551 | 36 struct gaim_plugin_description desc; |
37 struct gaim_plugin_description *gaim_plugin_desc() { | |
38 desc.api_version = PLUGIN_API_VERSION; | |
39 desc.name = g_strdup("Iconify on away"); | |
40 desc.version = g_strdup(VERSION); | |
3564 | 41 desc.description = g_strdup("Iconifies the away box and the buddy list when you go away."); |
3551 | 42 desc.authors = g_strdup("Eric Warmenhoven <eric@warmenhoven.org>"); |
43 desc.url = g_strdup(WEBSITE); | |
44 return &desc; | |
45 } | |
46 | |
133 | 47 char *name() { |
48 return "Iconify On Away"; | |
49 } | |
50 | |
51 char *description() { | |
52 return "Iconifies the away box and the buddy list when you go away."; | |
53 } |