Mercurial > pidgin
annotate plugins/timestamp.c @ 12115:e9790eb93216
[gaim-migrate @ 14415]
quoth charkins:
" This patch has a few small fixes for the visibility
stuff in gtkblist.c.
First, tracking of the ICONIFIED state of the blist was
removed. This was intended to allow the blist to
"remember" if it was minimized between restarts.
Unfortunately, this is not possible because the
ICONIFIED state gets set when the blist is on a
different desktop with many window managers.
Second, while talking about the ICONIFIED issue on
#gtk@GIMPNet, muntyan_ asked about a bug where the
blist would get shown on an account re-connect with
1.5.0. Luke mentioned something about this with cvs as
well. This patch introduces a check in
gaim_gtk_blist_show() to prevent the window from being
shown if it already exists and is visible.
Third, sadrul pointed me to a one-line fix for the
missing blist on startup. I added a second line to make
sure the blist restores its proper size as well.
Finally, when the last visibility manager is removed,
gaim will now minimize the blist if it was previously
hidden, rather than showing it. This could prevent a
race condition with out-of-process applets, preventing
gaim from maintaining the visibility state properly
between restarts.
This was 'cvs diff'ed against the last available anon
cvs from Friday. Hopefully it'll apply cleanly."
it did.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 16 Nov 2005 17:55:26 +0000 |
parents | 7e0ad3b6882a |
children | 2c7e79b6d7b2 |
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 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
23 #include "internal.h" |
4202
59751fe608c5
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4201
diff
changeset
|
24 |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
25 #include "conversation.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
26 #include "debug.h" |
7237 | 27 #include "prefs.h" |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
28 #include "signals.h" |
9943 | 29 #include "version.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
30 |
3598 | 31 #include "gtkimhtml.h" |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
32 #include "gtkplugin.h" |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
33 #include "gtkutils.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
34 |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
35 #define TIMESTAMP_PLUGIN_ID "gtk-timestamp" |
3598 | 36 |
6050 | 37 /* Set the default to 5 minutes. */ |
7237 | 38 static int interval = 5 * 60 * 1000; |
3598 | 39 |
9191 | 40 static GSList *timestamp_timeouts = NULL; |
3598 | 41 |
10404 | 42 static gboolean |
43 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; |
10389 | 46 GaimGtkConversation *conv = GAIM_GTK_CONVERSATION(c); |
47 GtkTextIter iter; | |
10390 | 48 char mdate[7]; |
9191 | 49 int is_conversation_active; |
3598 | 50 time_t tim = time(NULL); |
10404 | 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")); | |
10404 | 57 |
9191 | 58 if (is_conversation_active){ |
10400 | 59 int y, height; |
60 GdkRectangle rect; | |
61 gboolean scroll = TRUE; | |
62 GtkWidget *imhtml = conv->imhtml; | |
63 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)); | |
10389 | 64 gtk_text_buffer_get_end_iter(buffer, &iter); |
9191 | 65 gaim_conversation_set_data(c, "timestamp-conv-active", GINT_TO_POINTER(FALSE)); |
10390 | 66 strftime(mdate, sizeof(mdate), "\n%H:%M", localtime(&tim)); |
10400 | 67 gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect); |
68 gtk_text_view_get_line_yrange(GTK_TEXT_VIEW(imhtml), &iter, &y, &height); | |
69 if(((y + height) - (rect.y + rect.height)) > height | |
70 && gtk_text_buffer_get_char_count(buffer)){ | |
71 scroll = FALSE; | |
72 } | |
10389 | 73 gtk_text_buffer_insert_with_tags_by_name(buffer, &iter, mdate, strlen(mdate), "TIMESTAMP", NULL); |
10400 | 74 if (scroll) |
10404 | 75 gtk_imhtml_scroll_to_end(GTK_IMHTML(imhtml)); |
9191 | 76 } |
77 else | |
78 gaim_conversation_set_data(c, "timestamp-enabled", GINT_TO_POINTER(FALSE)); | |
10404 | 79 |
3598 | 80 return TRUE; |
81 } | |
82 | |
9191 | 83 |
84 static gboolean | |
85 timestamp_displaying_conv_msg(GaimAccount *account, GaimConversation *conv, | |
9863 | 86 char **buffer, void *data) |
9191 | 87 { |
88 int is_timestamp_enabled; | |
10404 | 89 |
9191 | 90 if (!g_list_find(gaim_get_conversations(), conv)) |
91 return FALSE; | |
10404 | 92 |
9191 | 93 /* set to true, since there has been an im since the last timestamp */ |
94 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
10404 | 95 |
9191 | 96 is_timestamp_enabled = GPOINTER_TO_INT(gaim_conversation_get_data(conv, "timestamp-enabled")); |
10404 | 97 |
9191 | 98 if (!is_timestamp_enabled){ |
99 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
100 do_timestamp((gpointer)conv); | |
101 } | |
10404 | 102 |
9191 | 103 return FALSE; |
104 } | |
105 | |
106 static gboolean | |
107 timestamp_receiving_msg(GaimAccount *account, char **sender, char **buffer, | |
10104 | 108 GaimConversation *conv, int *flags, void *data) |
9191 | 109 { |
10104 | 110 g_return_val_if_fail(conv != NULL, FALSE); |
111 | |
112 return timestamp_displaying_conv_msg(account, conv, buffer, data); | |
9191 | 113 } |
114 | |
115 | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
116 static void timestamp_new_convo(GaimConversation *conv) |
3598 | 117 { |
10389 | 118 GaimGtkConversation *c = GAIM_GTK_CONVERSATION(conv); |
10404 | 119 |
9191 | 120 if (!g_list_find(gaim_get_conversations(), conv)) |
121 return; | |
10404 | 122 |
10389 | 123 gtk_imhtml_show_comments(GTK_IMHTML(c->imhtml), FALSE); |
124 | |
9191 | 125 /* |
126 This if statement stops conversations that have already been initialized for timestamps | |
127 from being reinitialized. This prevents every active conversation from immediately being spammed | |
128 with a new timestamp when the user modifies the timer interval. | |
129 */ | |
130 if (!gaim_conversation_get_data(conv, "timestamp-initialized")){ | |
10389 | 131 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(c->imhtml)); |
9191 | 132 gaim_conversation_set_data(conv, "timestamp-initialized", GINT_TO_POINTER(TRUE)); |
133 gaim_conversation_set_data(conv, "timestamp-enabled", GINT_TO_POINTER(TRUE)); | |
134 gaim_conversation_set_data(conv, "timestamp-conv-active", GINT_TO_POINTER(TRUE)); | |
10389 | 135 gtk_text_buffer_create_tag (buffer, "TIMESTAMP", "foreground", "#888888", "justification", GTK_JUSTIFY_CENTER, |
136 "weight", PANGO_WEIGHT_BOLD, NULL); | |
9191 | 137 do_timestamp(conv); |
138 } | |
4168 | 139 |
3727 | 140 timestamp_timeouts = g_slist_append(timestamp_timeouts, |
7237 | 141 GINT_TO_POINTER(g_timeout_add(interval, do_timestamp, conv))); |
9191 | 142 } |
3598 | 143 |
9191 | 144 |
145 static void destroy_timer_list() | |
146 { | |
147 GSList *to; | |
148 | |
149 for (to = timestamp_timeouts; to != NULL; to = to->next) | |
150 g_source_remove(GPOINTER_TO_INT(to->data)); | |
151 | |
152 g_slist_free(timestamp_timeouts); | |
10404 | 153 |
9191 | 154 timestamp_timeouts = NULL; |
3598 | 155 } |
4220 | 156 |
9191 | 157 static void init_timer_list() |
158 { | |
159 GList *cnvs; | |
160 GaimConversation *c; | |
10404 | 161 |
9191 | 162 if (timestamp_timeouts != NULL) |
163 destroy_timer_list(); | |
10404 | 164 |
9191 | 165 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { |
166 c = cnvs->data; | |
167 timestamp_new_convo(c); | |
168 } | |
169 } | |
170 | |
171 | |
172 | |
11740 | 173 static void set_timestamp(GtkWidget *spinner, void *null) { |
4220 | 174 int tm; |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
175 |
4220 | 176 tm = 0; |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
177 |
4220 | 178 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); |
7237 | 179 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
|
180 |
4220 | 181 tm = tm * 60 * 1000; |
182 | |
7237 | 183 interval = tm; |
184 gaim_prefs_set_int("/plugins/gtk/timestamp/interval", interval); | |
10404 | 185 |
9191 | 186 destroy_timer_list(); |
187 init_timer_list(); | |
4220 | 188 } |
189 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
190 static GtkWidget * |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
191 get_config_frame(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
192 { |
4220 | 193 GtkWidget *ret; |
194 GtkWidget *frame, *label; | |
195 GtkWidget *vbox, *hbox; | |
196 GtkAdjustment *adj; | |
11740 | 197 GtkWidget *spinner; |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
198 |
4220 | 199 ret = gtk_vbox_new(FALSE, 18); |
200 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
201 | |
5530
2c4c975620f0
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
202 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); |
4220 | 203 vbox = gtk_vbox_new(FALSE, 5); |
204 gtk_container_add(GTK_CONTAINER(frame), vbox); | |
205 | |
206 hbox = gtk_hbox_new(FALSE, 5); | |
207 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
208 | |
4586 | 209 label = gtk_label_new(_("Delay")); |
4220 | 210 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
|
211 |
7237 | 212 adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); |
4220 | 213 spinner = gtk_spin_button_new(adj, 0, 0); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
214 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
11740 | 215 g_signal_connect(G_OBJECT(spinner), "value-changed", G_CALLBACK(set_timestamp), NULL); |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
216 label = gtk_label_new(_("minutes.")); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
217 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
4220 | 218 |
219 gtk_widget_show_all(ret); | |
220 return ret; | |
221 } | |
222 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
223 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
224 plugin_load(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
225 { |
9191 | 226 void *conv_handle = gaim_conversations_get_handle(); |
10404 | 227 |
9191 | 228 init_timer_list(); |
3598 | 229 |
9191 | 230 gaim_signal_connect(conv_handle, "conversation-created", |
231 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
232 |
9863 | 233 /* record IM display events for each conversation */ |
9191 | 234 gaim_signal_connect(conv_handle, "receiving-im-msg", |
235 plugin, GAIM_CALLBACK(timestamp_receiving_msg), NULL); | |
236 gaim_signal_connect(conv_handle, "displaying-im-msg", | |
237 plugin, GAIM_CALLBACK(timestamp_displaying_conv_msg), NULL); | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
238 |
7237 | 239 interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval"); |
240 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
241 return TRUE; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
242 } |
3598 | 243 |
9191 | 244 |
245 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
246 static gboolean |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
247 plugin_unload(GaimPlugin *plugin) |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
248 { |
10389 | 249 GList *cnvs; |
10404 | 250 |
9191 | 251 destroy_timer_list(); |
10389 | 252 |
253 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { | |
254 GaimConversation *c = cnvs->data; | |
255 GaimGtkConversation *conv = GAIM_GTK_CONVERSATION(c); | |
256 gtk_imhtml_show_comments(GTK_IMHTML(conv->imhtml), TRUE); | |
257 } | |
258 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
259 return TRUE; |
3598 | 260 } |
261 | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
262 static GaimGtkPluginUiInfo ui_info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
263 { |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
264 get_config_frame |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
265 }; |
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 static GaimPluginInfo info = |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
268 { |
9943 | 269 GAIM_PLUGIN_MAGIC, |
270 GAIM_MAJOR_VERSION, | |
271 GAIM_MINOR_VERSION, | |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
272 GAIM_PLUGIN_STANDARD, /**< type */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
273 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
274 0, /**< flags */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
275 NULL, /**< dependencies */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
276 GAIM_PRIORITY_DEFAULT, /**< priority */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
277 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
278 TIMESTAMP_PLUGIN_ID, /**< id */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
279 N_("Timestamp"), /**< name */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
280 VERSION, /**< version */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
281 /** summary */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
282 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
283 /** description */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
284 N_("Adds iChat-style timestamps to conversations every N minutes."), |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
285 "Sean Egan <bj91704@binghamton.edu>", /**< author */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
286 GAIM_WEBSITE, /**< homepage */ |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
287 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
288 plugin_load, /**< load */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
289 plugin_unload, /**< unload */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
290 NULL, /**< destroy */ |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
291 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
292 &ui_info, /**< ui_info */ |
8993 | 293 NULL, /**< extra_info */ |
10404 | 294 NULL, |
8993 | 295 NULL |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
296 }; |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
297 |
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
298 static void |
5920
7d385de2f9cd
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
299 init_plugin(GaimPlugin *plugin) |
5205
fefad67de2c7
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
300 { |
7237 | 301 gaim_prefs_add_none("/plugins/gtk/timestamp"); |
302 gaim_prefs_add_int("/plugins/gtk/timestamp/interval", interval); | |
3598 | 303 } |
304 | |
7237 | 305 GAIM_INIT_PLUGIN(interval, init_plugin, info) |