Mercurial > pidgin.yaz
annotate plugins/timestamp.c @ 9717:f105bc0270c7
[gaim-migrate @ 10578]
nosnilmot pointed out that I'm dumb
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 08 Aug 2004 14:21:30 +0000 |
parents | 06b28fb24300 |
children | 0e3a84f18467 |
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" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
31 |
3598 | 32 #include "gtkimhtml.h" |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
33 #include "gtkplugin.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
34 #include "gtkutils.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
35 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
36 #define TIMESTAMP_PLUGIN_ID "gtk-timestamp" |
3598 | 37 |
6050 | 38 /* Set the default to 5 minutes. */ |
7237 | 39 static int interval = 5 * 60 * 1000; |
3598 | 40 |
9191 | 41 static GSList *timestamp_timeouts = NULL; |
3598 | 42 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
43 static gboolean do_timestamp (gpointer data) |
3598 | 44 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
45 GaimConversation *c = (GaimConversation *)data; |
3598 | 46 char *buf; |
47 char mdate[6]; | |
9191 | 48 int is_conversation_active; |
3598 | 49 time_t tim = time(NULL); |
9191 | 50 |
4376
2c985a9e994c
[gaim-migrate @ 4642]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
51 if (!g_list_find(gaim_get_conversations(), c)) |
3598 | 52 return FALSE; |
53 | |
9191 | 54 /* is_conversation_active is true if an im has been displayed since the last timestamp */ |
55 is_conversation_active = GPOINTER_TO_INT(gaim_conversation_get_data(c, "timestamp-conv-active")); | |
56 | |
57 if (is_conversation_active){ | |
58 gaim_conversation_set_data(c, "timestamp-conv-active", GINT_TO_POINTER(FALSE)); | |
59 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim)); | |
60 buf = g_strdup_printf(" %s", mdate); | |
61 gaim_conversation_write(c, NULL, buf, GAIM_MESSAGE_NO_LOG, tim); | |
62 g_free(buf); | |
63 } | |
64 else | |
65 gaim_conversation_set_data(c, "timestamp-enabled", GINT_TO_POINTER(FALSE)); | |
66 | |
3598 | 67 return TRUE; |
68 } | |
69 | |
9191 | 70 |
71 static gboolean | |
72 timestamp_displaying_conv_msg(GaimAccount *account, GaimConversation *conv, | |
73 char **buffer, void *data) | |
74 { | |
75 int is_timestamp_enabled; | |
76 | |
77 if (!g_list_find(gaim_get_conversations(), conv)) | |
78 return FALSE; | |
79 | |
80 /* set to true, since there has been an im since the last timestamp */ | |
81 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
82 | |
83 is_timestamp_enabled = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "timestamp-enabled")); | |
84 | |
85 if (!is_timestamp_enabled){ | |
86 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
87 do_timestamp((gpointer)conv); | |
88 } | |
89 | |
90 return FALSE; | |
91 } | |
92 | |
93 static gboolean | |
94 timestamp_receiving_msg(GaimAccount *account, char **sender, char **buffer, | |
95 int *flags, void *data) | |
96 { | |
97 GaimConversation* conv; | |
98 | |
99 conv = gaim_find_conversation_with_account(*sender, account); | |
100 if (conv != NULL) | |
101 return timestamp_displaying_conv_msg(account, conv, buffer, data); | |
102 return FALSE; | |
103 } | |
104 | |
105 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
106 static void timestamp_new_convo(GaimConversation *conv) |
3598 | 107 { |
9191 | 108 if (!g_list_find(gaim_get_conversations(), conv)) |
109 return; | |
110 | |
111 /* | |
112 This if statement stops conversations that have already been initialized for timestamps | |
113 from being reinitialized. This prevents every active conversation from immediately being spammed | |
114 with a new timestamp when the user modifies the timer interval. | |
115 */ | |
116 if (!gaim_conversation_get_data(conv, "timestamp-initialized")){ | |
117 gaim_conversation_set_data(conv, "timestamp-initialized", GINT_TO_POINTER(TRUE)); | |
118 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
119 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
120 do_timestamp(conv); | |
121 } | |
4168 | 122 |
3727 | 123 timestamp_timeouts = g_slist_append(timestamp_timeouts, |
7237 | 124 GINT_TO_POINTER(g_timeout_add(interval, do_timestamp, conv))); |
9191 | 125 } |
3598 | 126 |
9191 | 127 |
128 static void destroy_timer_list() | |
129 { | |
130 GSList *to; | |
131 | |
132 for (to = timestamp_timeouts; to != NULL; to = to->next) | |
133 g_source_remove(GPOINTER_TO_INT(to->data)); | |
134 | |
135 g_slist_free(timestamp_timeouts); | |
136 | |
137 timestamp_timeouts = NULL; | |
3598 | 138 } |
4220 | 139 |
9191 | 140 static void init_timer_list() |
141 { | |
142 GList *cnvs; | |
143 GaimConversation *c; | |
144 | |
145 if (timestamp_timeouts != NULL) | |
146 destroy_timer_list(); | |
147 | |
148 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { | |
149 c = cnvs->data; | |
150 timestamp_new_convo(c); | |
151 } | |
152 } | |
153 | |
154 | |
155 | |
4220 | 156 static void set_timestamp(GtkWidget *button, GtkWidget *spinner) { |
157 int tm; | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
158 |
4220 | 159 tm = 0; |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
160 |
4220 | 161 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); |
7237 | 162 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
|
163 |
4220 | 164 tm = tm * 60 * 1000; |
165 | |
7237 | 166 interval = tm; |
167 gaim_prefs_set_int("/plugins/gtk/timestamp/interval", interval); | |
9191 | 168 |
169 destroy_timer_list(); | |
170 init_timer_list(); | |
4220 | 171 } |
172 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
173 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
174 get_config_frame(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
175 { |
4220 | 176 GtkWidget *ret; |
177 GtkWidget *frame, *label; | |
178 GtkWidget *vbox, *hbox; | |
179 GtkAdjustment *adj; | |
180 GtkWidget *spinner, *button; | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
181 |
4220 | 182 ret = gtk_vbox_new(FALSE, 18); |
183 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
184 | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
185 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); |
4220 | 186 vbox = gtk_vbox_new(FALSE, 5); |
187 gtk_container_add(GTK_CONTAINER(frame), vbox); | |
188 | |
189 hbox = gtk_hbox_new(FALSE, 5); | |
190 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
191 | |
4586 | 192 label = gtk_label_new(_("Delay")); |
4220 | 193 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
|
194 |
7237 | 195 adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); |
4220 | 196 spinner = gtk_spin_button_new(adj, 0, 0); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
197 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
4220 | 198 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
199 label = gtk_label_new(_("minutes.")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
200 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4220 | 201 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
202 hbox = gtk_hbox_new(TRUE, 5); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
203 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
4220 | 204 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
205 button = gtk_button_new_with_mnemonic(_("_Apply")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
206 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
207 g_signal_connect(G_OBJECT(button), "clicked", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
208 G_CALLBACK(set_timestamp), spinner); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
209 |
4220 | 210 gtk_widget_show_all(ret); |
211 return ret; | |
212 } | |
213 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
214 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
215 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
216 { |
9191 | 217 void *conv_handle = gaim_conversations_get_handle(); |
218 | |
219 init_timer_list(); | |
3598 | 220 |
9191 | 221 gaim_signal_connect(conv_handle, "conversation-created", |
222 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
223 |
9191 | 224 //record IM display events for each conversation |
225 gaim_signal_connect(conv_handle, "receiving-im-msg", | |
226 plugin, GAIM_CALLBACK(timestamp_receiving_msg), NULL); | |
227 gaim_signal_connect(conv_handle, "displaying-im-msg", | |
228 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
229 |
7237 | 230 interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval"); |
231 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
232 return TRUE; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
233 } |
3598 | 234 |
9191 | 235 |
236 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
237 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
238 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
239 { |
9191 | 240 void *conv_handle = gaim_conversations_get_handle(); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
241 |
9191 | 242 gaim_signal_disconnect(conv_handle, "conversation-created", |
243 plugin, GAIM_CALLBACK(timestamp_new_convo)); | |
244 gaim_signal_disconnect(conv_handle, "receiving-im-msg", | |
245 plugin, GAIM_CALLBACK(timestamp_receiving_msg)); | |
246 gaim_signal_disconnect(conv_handle, "displaying-im-msg", | |
247 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg)); | |
248 | |
249 destroy_timer_list(); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
250 return TRUE; |
3598 | 251 } |
252 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
253 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
254 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
255 get_config_frame |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
256 }; |
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 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
259 { |
8749
d7b8eb1f0a18
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
7238
diff
changeset
|
260 GAIM_PLUGIN_API_VERSION, /**< api_version */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
261 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
262 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
263 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
264 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
265 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
266 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
267 TIMESTAMP_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
268 N_("Timestamp"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
269 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
270 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
271 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
272 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
273 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
274 "Sean Egan <bj91704@binghamton.edu>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
275 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
276 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
277 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
278 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
279 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
280 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
281 &ui_info, /**< ui_info */ |
8993 | 282 NULL, /**< extra_info */ |
283 NULL, | |
284 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
285 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
286 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
287 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
288 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
289 { |
7237 | 290 gaim_prefs_add_none("/plugins/gtk/timestamp"); |
291 gaim_prefs_add_int("/plugins/gtk/timestamp/interval", interval); | |
3598 | 292 } |
293 | |
7237 | 294 GAIM_INIT_PLUGIN(interval, init_plugin, info) |