Mercurial > pidgin
annotate plugins/iconaway.c @ 3789:fb519383a058
[gaim-migrate @ 3929]
IRC passwd patch from Chip.
Fixed a compile warning in conversation.c. Nathan, tell me if this breaks
anything ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 22 Oct 2002 23:31:49 +0000 |
parents | 9682c0e022c6 |
children | 74d27aa5b686 |
rev | line source |
---|---|
3630 | 1 #define GAIM_PLUGINS |
133 | 2 #include "gaim.h" |
3 | |
3472 | 4 #include <gtk/gtk.h> |
133 | 5 |
3630 | 6 #ifdef _WIN32 |
7 #include "win32dep.h" | |
8 #endif | |
9 | |
133 | 10 void *handle; |
11 | |
3630 | 12 G_MODULE_IMPORT GtkWidget *imaway; |
13 G_MODULE_IMPORT GtkWidget *blist; | |
14 G_MODULE_IMPORT GtkWidget *all_chats; | |
15 G_MODULE_IMPORT GtkWidget *all_convos; | |
133 | 16 |
147
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
17 #ifdef USE_APPLET |
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
18 extern void applet_destroy_buddy(); |
ec301cfcaebf
[gaim-migrate @ 157]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
138
diff
changeset
|
19 #endif |
133 | 20 |
1404
96e93119268d
[gaim-migrate @ 1414]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1047
diff
changeset
|
21 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
|
22 if (!imaway || !gc->away) |
1406
cabde2947ba4
[gaim-migrate @ 1416]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1405
diff
changeset
|
23 return; |
3472 | 24 gtk_window_iconify(GTK_WINDOW(imaway)); |
3188 | 25 hide_buddy_list(); |
1779
0da2a831c0ae
[gaim-migrate @ 1789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1406
diff
changeset
|
26 if (all_convos) |
3472 | 27 gtk_window_iconify(GTK_WINDOW(all_convos)); |
1779
0da2a831c0ae
[gaim-migrate @ 1789]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1406
diff
changeset
|
28 if (all_chats) |
3472 | 29 gtk_window_iconify(GTK_WINDOW(all_chats)); |
133 | 30 } |
31 | |
3630 | 32 /* |
33 * EXPORTED FUNCTIONS | |
34 */ | |
35 | |
36 G_MODULE_EXPORT char *gaim_plugin_init(GModule *h) { | |
133 | 37 handle = h; |
38 | |
39 gaim_signal_connect(handle, event_away, iconify_windows, NULL); | |
1047
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
40 |
ece2d1543b20
[gaim-migrate @ 1057]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
147
diff
changeset
|
41 return NULL; |
133 | 42 } |
43 | |
3551 | 44 struct gaim_plugin_description desc; |
3630 | 45 G_MODULE_EXPORT struct gaim_plugin_description *gaim_plugin_desc() { |
3551 | 46 desc.api_version = PLUGIN_API_VERSION; |
47 desc.name = g_strdup("Iconify on away"); | |
48 desc.version = g_strdup(VERSION); | |
3564 | 49 desc.description = g_strdup("Iconifies the away box and the buddy list when you go away."); |
3551 | 50 desc.authors = g_strdup("Eric Warmenhoven <eric@warmenhoven.org>"); |
51 desc.url = g_strdup(WEBSITE); | |
52 return &desc; | |
53 } | |
54 | |
3630 | 55 G_MODULE_EXPORT char *name() { |
133 | 56 return "Iconify On Away"; |
57 } | |
58 | |
3630 | 59 G_MODULE_EXPORT char *description() { |
133 | 60 return "Iconifies the away box and the buddy list when you go away."; |
61 } |