annotate plugins/statenotify.c @ 9584:fe35f55ee984

[gaim-migrate @ 10427] " When joining a jabber conference many jabber servers send a recap of the last 20 or so messages. If you have sounds enabled, this will result in either 20 sounds in row, or worse if mixing is available, a horrible mix of 20 overlapping sounds. These recap messages can be identifed be the presence of the "jabber:x:delay". This patch identifies delayed messages, passes that information through flags from the prpl to the core, and then on to the gui. Detailed changes: Add GAIM_MESSAGE_DELAYED to GaimMessageFlags to indicate a delayed message. Change gtkconv.c to not play sounds when either GAIM_MESSAGE_DELAYED or GAIM_MESSAGE_SYSTEM are set. Add GaimConvChatFlags, parallel to GaimConvImFlags, to pass flags from protocols to core. Currently contains two flags: GAIM_CONV_CHAT_WHISPER GAIM_CONV_CHAT_DELAYED Change fourth arg of serv_got_chat_in() from "int whisper" to "GaimConvChatFlags chatflags". Change jabber prpl to set delayed flag when the "jabber:x:delay" element is present. Change toc protocol since it uses the whisper flag." --Nathan Fredrickson Date: 2004-07-24 00:49 Sender: marv_sfAccepting Donations Logged In: YES user_id=790708 I'm not sure I like naming the flags "DELAYED". I mean that's okay inside jabber since that's what the jabber protocol refers to it as, but for the the GAIM_*_DELAYED flags, I think they should be named something else. I thought about NOSOUND, but I decided that was wrong, because the flag should say what kind of message it is, not what to do with it, that's up to the UI to decide. What's up with not playing sounds on GAIM_MESSAGE_SYSTEM? This sounds unrelated to this. Are there times when we want to play sounds on system messages? Date: 2004-07-24 09:13 Sender: noif Logged In: YES user_id=365548 I purposely did not use a name that implied what the UI should do with the flag. The only characteristic that makes these messages unique is that they've been stored in the server for some period of time and are not current. I'm open to a better flag name than "DELAYED"... I thought about "RECAP", but that seemed less generalized than "DELAYED". As for not playing sounds on GAIM_MESSAGE_SYSTEM, that can be removed if it's controversial. I think I slipped that in since the setting of the topic was still playing a sound every time you joined a jabber conference. I think we can change the flag name ourselves if something else is better. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 24 Jul 2004 15:18:32 +0000
parents 91c9e060111b
children c001be3c330e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
1 #include "internal.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
2
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
3 #include "blist.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
4 #include "conversation.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
5 #include "debug.h"
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
6 #include "signals.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
7
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
8 #include "plugin.h"
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
9 #include "pluginpref.h"
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
10 #include "prefs.h"
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
11
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
12 #define STATENOTIFY_PLUGIN_ID "core-statenotify"
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
13
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 static void
6695
0c5637b5462e [gaim-migrate @ 7221]
Nathan Walp <nwalp@pidgin.im>
parents: 6621
diff changeset
15 write_status(GaimBuddy *buddy, const char *message)
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5587
diff changeset
17 GaimConversation *conv;
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
18 const char *who;
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 char buf[256];
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
21 conv = gaim_find_conversation_with_account(buddy->name, buddy->account);
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 if (conv == NULL)
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 return;
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
26 who = gaim_get_buddy_alias(buddy);
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
6489
aefe4067d3a3 [gaim-migrate @ 7003]
Nathan Walp <nwalp@pidgin.im>
parents: 6485
diff changeset
28 g_snprintf(buf, sizeof(buf), message, who);
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
6982
083d1e4a9c78 [gaim-migrate @ 7538]
Mark Doliner <mark@kingant.net>
parents: 6695
diff changeset
30 gaim_conversation_write(conv, NULL, buf, GAIM_MESSAGE_SYSTEM, time(NULL));
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 static void
6695
0c5637b5462e [gaim-migrate @ 7221]
Nathan Walp <nwalp@pidgin.im>
parents: 6621
diff changeset
34 buddy_away_cb(GaimBuddy *buddy, void *data)
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 {
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
36 if (gaim_prefs_get_bool("/plugins/core/statenotify/notify_away"))
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
37 write_status(buddy, _("%s has gone away."));
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 static void
6695
0c5637b5462e [gaim-migrate @ 7221]
Nathan Walp <nwalp@pidgin.im>
parents: 6621
diff changeset
41 buddy_unaway_cb(GaimBuddy *buddy, void *data)
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 {
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
43 if (gaim_prefs_get_bool("/plugins/core/statenotify/notify_away"))
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
44 write_status(buddy, _("%s is no longer away."));
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
47 static void
6695
0c5637b5462e [gaim-migrate @ 7221]
Nathan Walp <nwalp@pidgin.im>
parents: 6621
diff changeset
48 buddy_idle_cb(GaimBuddy *buddy, void *data)
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
49 {
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
50 if (gaim_prefs_get_bool("/plugins/core/statenotify/notify_idle"))
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
51 write_status(buddy, _("%s has become idle."));
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
52 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
54 static void
6695
0c5637b5462e [gaim-migrate @ 7221]
Nathan Walp <nwalp@pidgin.im>
parents: 6621
diff changeset
55 buddy_unidle_cb(GaimBuddy *buddy, void *data)
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
56 {
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
57 if (gaim_prefs_get_bool("/plugins/core/statenotify/notify_idle"))
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
58 write_status(buddy, _("%s is no longer idle."));
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
59 }
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
60
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
61 static GaimPluginPrefFrame *
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
62 get_plugin_pref_frame(GaimPlugin *plugin)
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
63 {
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
64 GaimPluginPrefFrame *frame;
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
65 GaimPluginPref *ppref;
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
66
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
67 frame = gaim_plugin_pref_frame_new();
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
68
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
69 ppref = gaim_plugin_pref_new_with_label("Notify When");
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
70 gaim_plugin_pref_frame_add(frame, ppref);
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
71
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
72 ppref = gaim_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_away", "Buddy Goes _Away");
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
73 gaim_plugin_pref_frame_add(frame, ppref);
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
74
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
75 ppref = gaim_plugin_pref_new_with_name_and_label("/plugins/core/statenotify/notify_idle", "Buddy Goes _Idle");
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
76 gaim_plugin_pref_frame_add(frame, ppref);
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
77
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
78 return frame;
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
79 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
80
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 static gboolean
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
82 plugin_load(GaimPlugin *plugin)
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
83 {
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
84 void *blist_handle = gaim_blist_get_handle();
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
85
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
86 gaim_signal_connect(blist_handle, "buddy-away",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
87 plugin, GAIM_CALLBACK(buddy_away_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
88 gaim_signal_connect(blist_handle, "buddy-back",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
89 plugin, GAIM_CALLBACK(buddy_unaway_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
90 gaim_signal_connect(blist_handle, "buddy-idle",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
91 plugin, GAIM_CALLBACK(buddy_idle_cb), NULL);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
92 gaim_signal_connect(blist_handle, "buddy-unidle",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
93 plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL);
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
95 return TRUE;
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
96 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
97
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
98 static GaimPluginUiInfo prefs_info =
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
99 {
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
100 get_plugin_pref_frame
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
101 };
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
102
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
103 static GaimPluginInfo info =
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
104 {
8749
d7b8eb1f0a18 [gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents: 6982
diff changeset
105 GAIM_PLUGIN_API_VERSION, /**< api_version */
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 GAIM_PLUGIN_STANDARD, /**< type */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 NULL, /**< ui_requirement */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 0, /**< flags */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 NULL, /**< dependencies */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 GAIM_PRIORITY_DEFAULT, /**< priority */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
111
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
112 STATENOTIFY_PLUGIN_ID, /**< id */
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
113 N_("Buddy State Notification"), /**< name */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 VERSION, /**< version */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 /** summary */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 N_("Notifies in a conversation window when a buddy goes or returns from "
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 "away or idle."),
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 /** description */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 N_("Notifies in a conversation window when a buddy goes or returns from "
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
120 "away or idle."),
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
121 "Christian Hammond <chipx86@gnupdate.org>", /**< author */
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6441
diff changeset
122 GAIM_WEBSITE, /**< homepage */
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
123
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
124 plugin_load, /**< load */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
125 NULL, /**< unload */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
126 NULL, /**< destroy */
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
127
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
128 NULL, /**< ui_info */
8993
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
129 NULL, /**< extra_info */
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
130 &prefs_info, /**< prefs_info */
8993
294ae6548d4e [gaim-migrate @ 9768]
Luke Schierer <lschiere@pidgin.im>
parents: 8749
diff changeset
131 NULL
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 };
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 static void
5920
7d385de2f9cd [gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents: 5873
diff changeset
135 init_plugin(GaimPlugin *plugin)
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 {
9583
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
137 gaim_prefs_add_none("/plugins/core/statenotify");
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
138 gaim_prefs_add_bool("/plugins/core/statenotify/notify_away", TRUE);
91c9e060111b [gaim-migrate @ 10426]
Luke Schierer <lschiere@pidgin.im>
parents: 8993
diff changeset
139 gaim_prefs_add_bool("/plugins/core/statenotify/notify_idle", TRUE);
5267
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 }
3cd24f012091 [gaim-migrate @ 5639]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 5920
diff changeset
142 GAIM_INIT_PLUGIN(statenotify, init_plugin, info)