Mercurial > pidgin
annotate plugins/timestamp.c @ 10402:3d2dd0ed368d
[gaim-migrate @ 11645]
updated
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 22 Dec 2004 23:45:37 +0000 |
parents | 6a043ae92db6 |
children | ce098e226486 |
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; |
10389 | 47 GaimGtkConversation *conv = GAIM_GTK_CONVERSATION(c); |
48 GtkTextIter iter; | |
10390 | 49 char mdate[7]; |
9191 | 50 int is_conversation_active; |
3598 | 51 time_t tim = time(NULL); |
9191 | 52 |
4376
2c985a9e994c
[gaim-migrate @ 4642]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
53 if (!g_list_find(gaim_get_conversations(), c)) |
3598 | 54 return FALSE; |
55 | |
9191 | 56 /* is_conversation_active is true if an im has been displayed since the last timestamp */ |
57 is_conversation_active = GPOINTER_TO_INT(gaim_conversation_get_data(c, "timestamp-conv-active")); | |
58 | |
59 if (is_conversation_active){ | |
10400 | 60 int y, height; |
61 GdkRectangle rect; | |
62 gboolean scroll = TRUE; | |
63 GtkWidget *imhtml = conv->imhtml; | |
64 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)); | |
10389 | 65 gtk_text_buffer_get_end_iter(buffer, &iter); |
9191 | 66 gaim_conversation_set_data(c, "timestamp-conv-active", GINT_TO_POINTER(FALSE)); |
10390 | 67 strftime(mdate, sizeof(mdate), "\n%H:%M", localtime(&tim)); |
10400 | 68 gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect); |
69 gtk_text_view_get_line_yrange(GTK_TEXT_VIEW(imhtml), &iter, &y, &height); | |
70 if(((y + height) - (rect.y + rect.height)) > height | |
71 && gtk_text_buffer_get_char_count(buffer)){ | |
72 scroll = FALSE; | |
73 } | |
10389 | 74 gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, mdate, strlen(mdate), "TIMESTAMP", NULL); |
10400 | 75 if (scroll) |
76 gtk_imhtml_scroll_to_end(imhtml); | |
9191 | 77 } |
78 else | |
79 gaim_conversation_set_data(c, "timestamp-enabled", GINT_TO_POINTER(FALSE)); | |
80 | |
3598 | 81 return TRUE; |
82 } | |
83 | |
9191 | 84 |
85 static gboolean | |
86 timestamp_displaying_conv_msg(GaimAccount *account, GaimConversation *conv, | |
9863 | 87 char **buffer, void *data) |
9191 | 88 { |
89 int is_timestamp_enabled; | |
90 | |
91 if (!g_list_find(gaim_get_conversations(), conv)) | |
92 return FALSE; | |
93 | |
94 /* set to true, since there has been an im since the last timestamp */ | |
95 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
96 | |
97 is_timestamp_enabled = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "timestamp-enabled")); | |
98 | |
99 if (!is_timestamp_enabled){ | |
100 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
101 do_timestamp((gpointer)conv); | |
102 } | |
103 | |
104 return FALSE; | |
105 } | |
106 | |
107 static gboolean | |
108 timestamp_receiving_msg(GaimAccount *account, char **sender, char **buffer, | |
10104 | 109 GaimConversation *conv, int *flags, void *data) |
9191 | 110 { |
10104 | 111 g_return_val_if_fail(conv != NULL, FALSE); |
112 | |
113 return timestamp_displaying_conv_msg(account, conv, buffer, data); | |
9191 | 114 } |
115 | |
116 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
117 static void timestamp_new_convo(GaimConversation *conv) |
3598 | 118 { |
10389 | 119 GaimGtkConversation *c = GAIM_GTK_CONVERSATION(conv); |
120 | |
9191 | 121 if (!g_list_find(gaim_get_conversations(), conv)) |
122 return; | |
123 | |
10389 | 124 gtk_imhtml_show_comments(GTK_IMHTML(c->imhtml), FALSE); |
125 | |
9191 | 126 /* |
127 This if statement stops conversations that have already been initialized for timestamps | |
128 from being reinitialized. This prevents every active conversation from immediately being spammed | |
129 with a new timestamp when the user modifies the timer interval. | |
130 */ | |
131 if (!gaim_conversation_get_data(conv, "timestamp-initialized")){ | |
10389 | 132 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(c->imhtml)); |
9191 | 133 gaim_conversation_set_data(conv, "timestamp-initialized", GINT_TO_POINTER(TRUE)); |
134 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
135 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
10389 | 136 gtk_text_buffer_create_tag (buffer, "TIMESTAMP", "foreground", "#888888", "justification", GTK_JUSTIFY_CENTER, |
137 "weight", PANGO_WEIGHT_BOLD, NULL); | |
9191 | 138 do_timestamp(conv); |
139 } | |
4168 | 140 |
3727 | 141 timestamp_timeouts = g_slist_append(timestamp_timeouts, |
7237 | 142 GINT_TO_POINTER(g_timeout_add(interval, do_timestamp, conv))); |
9191 | 143 } |
3598 | 144 |
9191 | 145 |
146 static void destroy_timer_list() | |
147 { | |
148 GSList *to; | |
149 | |
150 for (to = timestamp_timeouts; to != NULL; to = to->next) | |
151 g_source_remove(GPOINTER_TO_INT(to->data)); | |
152 | |
153 g_slist_free(timestamp_timeouts); | |
154 | |
155 timestamp_timeouts = NULL; | |
3598 | 156 } |
4220 | 157 |
9191 | 158 static void init_timer_list() |
159 { | |
160 GList *cnvs; | |
161 GaimConversation *c; | |
162 | |
163 if (timestamp_timeouts != NULL) | |
164 destroy_timer_list(); | |
165 | |
166 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { | |
167 c = cnvs->data; | |
168 timestamp_new_convo(c); | |
169 } | |
170 } | |
171 | |
172 | |
173 | |
4220 | 174 static void set_timestamp(GtkWidget *button, GtkWidget *spinner) { |
175 int tm; | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
176 |
4220 | 177 tm = 0; |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
178 |
4220 | 179 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); |
7237 | 180 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
|
181 |
4220 | 182 tm = tm * 60 * 1000; |
183 | |
7237 | 184 interval = tm; |
185 gaim_prefs_set_int("/plugins/gtk/timestamp/interval", interval); | |
9191 | 186 |
187 destroy_timer_list(); | |
188 init_timer_list(); | |
4220 | 189 } |
190 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
191 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
192 get_config_frame(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
193 { |
4220 | 194 GtkWidget *ret; |
195 GtkWidget *frame, *label; | |
196 GtkWidget *vbox, *hbox; | |
197 GtkAdjustment *adj; | |
198 GtkWidget *spinner, *button; | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
199 |
4220 | 200 ret = gtk_vbox_new(FALSE, 18); |
201 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
202 | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
203 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); |
4220 | 204 vbox = gtk_vbox_new(FALSE, 5); |
205 gtk_container_add(GTK_CONTAINER(frame), vbox); | |
206 | |
207 hbox = gtk_hbox_new(FALSE, 5); | |
208 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
209 | |
4586 | 210 label = gtk_label_new(_("Delay")); |
4220 | 211 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
|
212 |
7237 | 213 adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); |
4220 | 214 spinner = gtk_spin_button_new(adj, 0, 0); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
215 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
4220 | 216 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
217 label = gtk_label_new(_("minutes.")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
218 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4220 | 219 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
220 hbox = gtk_hbox_new(TRUE, 5); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
221 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
4220 | 222 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
223 button = gtk_button_new_with_mnemonic(_("_Apply")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
224 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
225 g_signal_connect(G_OBJECT(button), "clicked", |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
226 G_CALLBACK(set_timestamp), spinner); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
227 |
4220 | 228 gtk_widget_show_all(ret); |
229 return ret; | |
230 } | |
231 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
232 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
233 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
234 { |
9191 | 235 void *conv_handle = gaim_conversations_get_handle(); |
236 | |
237 init_timer_list(); | |
3598 | 238 |
9191 | 239 gaim_signal_connect(conv_handle, "conversation-created", |
240 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
241 |
9863 | 242 /* record IM display events for each conversation */ |
9191 | 243 gaim_signal_connect(conv_handle, "receiving-im-msg", |
244 plugin, GAIM_CALLBACK(timestamp_receiving_msg), NULL); | |
245 gaim_signal_connect(conv_handle, "displaying-im-msg", | |
246 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
247 |
7237 | 248 interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval"); |
249 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
250 return TRUE; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
251 } |
3598 | 252 |
9191 | 253 |
254 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
255 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
256 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
257 { |
10389 | 258 GList *cnvs; |
9191 | 259 void *conv_handle = gaim_conversations_get_handle(); |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
260 |
9191 | 261 gaim_signal_disconnect(conv_handle, "conversation-created", |
262 plugin, GAIM_CALLBACK(timestamp_new_convo)); | |
263 gaim_signal_disconnect(conv_handle, "receiving-im-msg", | |
264 plugin, GAIM_CALLBACK(timestamp_receiving_msg)); | |
265 gaim_signal_disconnect(conv_handle, "displaying-im-msg", | |
266 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg)); | |
267 | |
268 destroy_timer_list(); | |
10389 | 269 |
270 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { | |
271 GaimConversation *c = cnvs->data; | |
272 GaimGtkConversation *conv = GAIM_GTK_CONVERSATION(c); | |
273 gtk_imhtml_show_comments(GTK_IMHTML(conv->imhtml), TRUE); | |
274 } | |
275 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
276 return TRUE; |
3598 | 277 } |
278 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
279 static GaimGtkPluginUiInfo ui_info = |
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 get_config_frame |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
282 }; |
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 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
285 { |
9943 | 286 GAIM_PLUGIN_MAGIC, |
287 GAIM_MAJOR_VERSION, | |
288 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
289 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
290 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
291 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
292 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
293 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
294 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
295 TIMESTAMP_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
296 N_("Timestamp"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
297 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
298 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
299 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
300 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
301 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
302 "Sean Egan <bj91704@binghamton.edu>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
303 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
304 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
305 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
306 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
307 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
308 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
309 &ui_info, /**< ui_info */ |
8993 | 310 NULL, /**< extra_info */ |
311 NULL, | |
312 NULL | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
313 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
314 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
315 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
316 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
317 { |
7237 | 318 gaim_prefs_add_none("/plugins/gtk/timestamp"); |
319 gaim_prefs_add_int("/plugins/gtk/timestamp/interval", interval); | |
3598 | 320 } |
321 | |
7237 | 322 GAIM_INIT_PLUGIN(interval, init_plugin, info) |