Mercurial > pidgin.yaz
annotate plugins/timestamp.c @ 10034:343889b2f654
[gaim-migrate @ 10988]
mergeination
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Fri, 17 Sep 2004 22:44:12 +0000 |
parents | f8e395a054e2 |
children | 60db14d54914 |
rev | line source |
---|---|
7237 | 1 /* |
2 * Gaim - iChat-like timestamps | |
3 * | |
4 * Copyright (C) 2002-2003, Sean Egan | |
5 * Copyright (C) 2003, Chris J. Friesen <Darth_Sebulba04@yahoo.com> | |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
9 * the Free Software Foundation; either version 2 of the License, or | |
10 * (at your option) any later version. | |
4220 | 11 * |
7237 | 12 * This program is distributed in the hope that it will be useful, |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 * GNU General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU General Public License | |
18 * along with this program; if not, write to the Free Software | |
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
20 * | |
21 */ | |
22 | |
23 | |
3598 | 24 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
25 #include "internal.h" |
4202
59751fe608c5
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4201
diff
changeset
|
26 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
27 #include "conversation.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
28 #include "debug.h" |
7237 | 29 #include "prefs.h" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
30 #include "signals.h" |
9943 | 31 #include "version.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
32 |
3598 | 33 #include "gtkimhtml.h" |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
34 #include "gtkplugin.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
35 #include "gtkutils.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
36 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
37 #define TIMESTAMP_PLUGIN_ID "gtk-timestamp" |
3598 | 38 |
6050 | 39 /* Set the default to 5 minutes. */ |
7237 | 40 static int interval = 5 * 60 * 1000; |
3598 | 41 |
9191 | 42 static GSList *timestamp_timeouts = NULL; |
3598 | 43 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
44 static gboolean do_timestamp (gpointer data) |
3598 | 45 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
46 GaimConversation *c = (GaimConversation *)data; |
3598 | 47 char *buf; |
48 char mdate[6]; | |
9191 | 49 int is_conversation_active; |
3598 | 50 time_t tim = time(NULL); |
9191 | 51 |
4376
2c985a9e994c
[gaim-migrate @ 4642]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
52 if (!g_list_find(gaim_get_conversations(), c)) |
3598 | 53 return FALSE; |
54 | |
9191 | 55 /* is_conversation_active is true if an im has been displayed since the last timestamp */ |
56 is_conversation_active = GPOINTER_TO_INT(gaim_conversation_get_data(c, "timestamp-conv-active")); | |
57 | |
58 if (is_conversation_active){ | |
59 gaim_conversation_set_data(c, "timestamp-conv-active", GINT_TO_POINTER(FALSE)); | |
60 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim)); | |
61 buf = g_strdup_printf(" %s", mdate); | |
62 gaim_conversation_write(c, NULL, buf, GAIM_MESSAGE_NO_LOG, tim); | |
63 g_free(buf); | |
64 } | |
65 else | |
66 gaim_conversation_set_data(c, "timestamp-enabled", GINT_TO_POINTER(FALSE)); | |
67 | |
3598 | 68 return TRUE; |
69 } | |
70 | |
9191 | 71 |
72 static gboolean | |
73 timestamp_displaying_conv_msg(GaimAccount *account, GaimConversation *conv, | |
9863 | 74 char **buffer, void *data) |
9191 | 75 { |
76 int is_timestamp_enabled; | |
77 | |
78 if (!g_list_find(gaim_get_conversations(), conv)) | |
79 return FALSE; | |
80 | |
81 /* set to true, since there has been an im since the last timestamp */ | |
82 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
83 | |
84 is_timestamp_enabled = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "timestamp-enabled")); | |
85 | |
86 if (!is_timestamp_enabled){ | |
87 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
88 do_timestamp((gpointer)conv); | |
89 } | |
90 | |
91 return FALSE; | |
92 } | |
93 | |
94 static gboolean | |
95 timestamp_receiving_msg(GaimAccount *account, char **sender, char **buffer, | |
96 int *flags, void *data) | |
97 { | |
98 GaimConversation* conv; | |
99 | |
100 conv = gaim_find_conversation_with_account(*sender, account); | |
101 if (conv != NULL) | |
102 return timestamp_displaying_conv_msg(account, conv, buffer, data); | |
103 return FALSE; | |
104 } | |
105 | |
106 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
107 static void timestamp_new_convo(GaimConversation *conv) |
3598 | 108 { |
9191 | 109 if (!g_list_find(gaim_get_conversations(), conv)) |
110 return; | |
111 | |
112 /* | |
113 This if statement stops conversations that have already been initialized for timestamps | |
114 from being reinitialized. This prevents every active conversation from immediately being spammed | |
115 with a new timestamp when the user modifies the timer interval. | |
116 */ | |
117 if (!gaim_conversation_get_data(conv, "timestamp-initialized")){ | |
118 gaim_conversation_set_data(conv, "timestamp-initialized", GINT_TO_POINTER(TRUE)); | |
119 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
120 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
121 do_timestamp(conv); | |
122 } | |
4168 | 123 |
3727 | 124 timestamp_timeouts = g_slist_append(timestamp_timeouts, |
7237 | 125 GINT_TO_POINTER(g_timeout_add(interval, do_timestamp, conv))); |
9191 | 126 } |
3598 | 127 |
9191 | 128 |
129 static void destroy_timer_list() | |
130 { | |
131 GSList *to; | |
132 | |
133 for (to = timestamp_timeouts; to != NULL; to = to->next) | |
134 g_source_remove(GPOINTER_TO_INT(to->data)); | |
135 | |
136 g_slist_free(timestamp_timeouts); | |
137 | |
138 timestamp_timeouts = NULL; | |
3598 | 139 } |
4220 | 140 |
9191 | 141 static void init_timer_list() |
142 { | |
143 GList *cnvs; | |
144 GaimConversation *c; | |
145 | |
146 if (timestamp_timeouts != NULL) | |
147 destroy_timer_list(); | |
148 | |
149 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { | |
150 c = cnvs->data; | |
151 timestamp_new_convo(c); | |
152 } | |
153 } | |
154 | |
155 | |
156 | |
4220 | 157 static void set_timestamp(GtkWidget *button, GtkWidget *spinner) { |
158 int tm; | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
159 |
4220 | 160 tm = 0; |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
161 |
4220 | 162 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); |
7237 | 163 gaim_debug(GAIM_DEBUG_MISC, "timestamp", "setting time to %d mins\n", tm); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
164 |
4220 | 165 tm = tm * 60 * 1000; |
166 | |
7237 | 167 interval = tm; |
168 gaim_prefs_set_int("/plugins/gtk/timestamp/interval", interval); | |
9191 | 169 |
170 destroy_timer_list(); | |
171 init_timer_list(); | |
4220 | 172 } |
173 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
174 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
175 get_config_frame(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
176 { |
4220 | 177 GtkWidget *ret; |
178 GtkWidget *frame, *label; | |
179 GtkWidget *vbox, *hbox; | |
180 GtkAdjustment *adj; | |
181 GtkWidget *spinner, *button; | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
182 |
4220 | 183 ret = gtk_vbox_new(FALSE, 18); |
184 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
185 | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
186 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); |
4220 | 187 vbox = gtk_vbox_new(FALSE, 5); |
188 gtk_container_add(GTK_CONTAINER(frame), vbox); | |
189 | |
190 hbox = gtk_hbox_new(FALSE, 5); | |
191 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
192 | |
4586 | 193 label = gtk_label_new(_("Delay")); |
4220 | 194 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
195 |
7237 | 196 adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); |
4220 | 197 spinner = gtk_spin_button_new(adj, 0, 0); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
198 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
4220 | 199 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
200 label = gtk_label_new(_("minutes.")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
201 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4220 | 202 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
203 hbox = gtk_hbox_new(TRUE, 5); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
204 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
4220 | 205 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
206 button = gtk_button_new_with_mnemonic(_("_Apply")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
207 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
208 g_signal_connect(G_OBJECT(button), "clicked", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
209 G_CALLBACK(set_timestamp), spinner); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
210 |
4220 | 211 gtk_widget_show_all(ret); |
212 return ret; | |
213 } | |
214 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
215 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
216 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
217 { |
9191 | 218 void *conv_handle = gaim_conversations_get_handle(); |
219 | |
220 init_timer_list(); | |
3598 | 221 |
9191 | 222 gaim_signal_connect(conv_handle, "conversation-created", |
223 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
224 |
9863 | 225 /* record IM display events for each conversation */ |
9191 | 226 gaim_signal_connect(conv_handle, "receiving-im-msg", |
227 plugin, GAIM_CALLBACK(timestamp_receiving_msg), NULL); | |
228 gaim_signal_connect(conv_handle, "displaying-im-msg", | |
229 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
230 |
7237 | 231 interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval"); |
232 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
233 return TRUE; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
234 } |
3598 | 235 |
9191 | 236 |
237 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
238 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
239 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
240 { |
9191 | 241 void *conv_handle = gaim_conversations_get_handle(); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
242 |
9191 | 243 gaim_signal_disconnect(conv_handle, "conversation-created", |
244 plugin, GAIM_CALLBACK(timestamp_new_convo)); | |
245 gaim_signal_disconnect(conv_handle, "receiving-im-msg", | |
246 plugin, GAIM_CALLBACK(timestamp_receiving_msg)); | |
247 gaim_signal_disconnect(conv_handle, "displaying-im-msg", | |
248 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg)); | |
249 | |
250 destroy_timer_list(); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
251 return TRUE; |
3598 | 252 } |
253 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
254 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
255 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
256 get_config_frame |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
257 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
258 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
259 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
260 { |
9943 | 261 GAIM_PLUGIN_MAGIC, |
262 GAIM_MAJOR_VERSION, | |
263 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
264 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
265 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
266 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
267 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
268 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
269 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
270 TIMESTAMP_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
271 N_("Timestamp"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
272 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
273 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
274 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
275 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
276 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
277 "Sean Egan <bj91704@binghamton.edu>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
278 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
279 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
280 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
281 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
282 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
283 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
284 &ui_info, /**< ui_info */ |
8993 | 285 NULL, /**< extra_info */ |
286 NULL, | |
287 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
288 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
289 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
290 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
291 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
292 { |
7237 | 293 gaim_prefs_add_none("/plugins/gtk/timestamp"); |
294 gaim_prefs_add_int("/plugins/gtk/timestamp/interval", interval); | |
3598 | 295 } |
296 | |
7237 | 297 GAIM_INIT_PLUGIN(interval, init_plugin, info) |