Sun, 12 Oct 2003 04:27:00 +0000
[gaim-migrate @ 7813]
I was going to remove the apply button, but apparently spin boxes don't
emit a value-changed signal when a user types a number in the box...
Seems like a gtk bug for me.
Whateva.
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
1 | /* |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
2 | * Gaim - iChat-like timestamps |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
3 | * |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
4 | * Copyright (C) 2002-2003, Sean Egan |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
5 | * Copyright (C) 2003, Chris J. Friesen <Darth_Sebulba04@yahoo.com> |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
6 | * |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
10 | * (at your option) any later version. |
| 4220 | 11 | * |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
15 | * GNU General Public License for more details. |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
16 | * |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
20 | * |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
21 | */ |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
22 | |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
23 | |
| 3598 | 24 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
25 | #include "internal.h" |
|
4202
8b92de3b1c07
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4201
diff
changeset
|
26 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
27 | #include "conversation.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
28 | #include "debug.h" |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
29 | #include "prefs.h" |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
30 | #include "signals.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
31 | |
| 3598 | 32 | #include "gtkimhtml.h" |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
33 | #include "gtkplugin.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
34 | #include "gtkutils.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
35 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
36 | #define TIMESTAMP_PLUGIN_ID "gtk-timestamp" |
| 3598 | 37 | |
|
6050
7410ba1809ad
[gaim-migrate @ 6500]
Mark Doliner <markdoliner@pidgin.im>
parents:
5920
diff
changeset
|
38 | /* Set the default to 5 minutes. */ |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
39 | static int interval = 5 * 60 * 1000; |
| 3598 | 40 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
41 | static GSList *timestamp_timeouts; |
| 3598 | 42 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
43 | static gboolean do_timestamp (gpointer data) |
| 3598 | 44 | { |
|
5676
d3c2fdaf4821
[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]; | |
| 48 | time_t tim = time(NULL); | |
|
6050
7410ba1809ad
[gaim-migrate @ 6500]
Mark Doliner <markdoliner@pidgin.im>
parents:
5920
diff
changeset
|
49 | |
|
4376
88f8faf7cb61
[gaim-migrate @ 4642]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
50 | if (!g_list_find(gaim_get_conversations(), c)) |
| 3598 | 51 | return FALSE; |
| 52 | ||
| 53 | strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim)); | |
| 54 | buf = g_strdup_printf(" %s", mdate); | |
|
6982
12f08de92674
[gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents:
6621
diff
changeset
|
55 | gaim_conversation_write(c, NULL, buf, GAIM_MESSAGE_NO_LOG, tim); |
| 3598 | 56 | g_free(buf); |
| 57 | return TRUE; | |
| 58 | } | |
| 59 | ||
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
60 | static void timestamp_new_convo(GaimConversation *conv) |
| 3598 | 61 | { |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
62 | do_timestamp(conv); |
| 4168 | 63 | |
| 3727 | 64 | timestamp_timeouts = g_slist_append(timestamp_timeouts, |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
65 | GINT_TO_POINTER(g_timeout_add(interval, do_timestamp, conv))); |
| 3598 | 66 | |
| 67 | } | |
| 4220 | 68 | |
| 69 | static void set_timestamp(GtkWidget *button, GtkWidget *spinner) { | |
| 70 | int tm; | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
71 | |
| 4220 | 72 | tm = 0; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
73 | |
| 4220 | 74 | tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT); |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
75 | gaim_debug(GAIM_DEBUG_MISC, "timestamp", "setting time to %d mins\n", tm); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
76 | |
| 4220 | 77 | tm = tm * 60 * 1000; |
| 78 | ||
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
79 | interval = tm; |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
80 | gaim_prefs_set_int("/plugins/gtk/timestamp/interval", interval); |
| 4220 | 81 | } |
| 82 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
83 | static GtkWidget * |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
84 | get_config_frame(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
85 | { |
| 4220 | 86 | GtkWidget *ret; |
| 87 | GtkWidget *frame, *label; | |
| 88 | GtkWidget *vbox, *hbox; | |
| 89 | GtkAdjustment *adj; | |
| 90 | GtkWidget *spinner, *button; | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
91 | |
| 4220 | 92 | ret = gtk_vbox_new(FALSE, 18); |
| 93 | gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 94 | ||
|
5530
ba1ad464b56f
[gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents:
5314
diff
changeset
|
95 | frame = gaim_gtk_make_frame(ret, _("iChat Timestamp")); |
| 4220 | 96 | vbox = gtk_vbox_new(FALSE, 5); |
| 97 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 98 | ||
| 99 | hbox = gtk_hbox_new(FALSE, 5); | |
| 100 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
| 101 | ||
| 4586 | 102 | label = gtk_label_new(_("Delay")); |
| 4220 | 103 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
104 | |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
105 | adj = (GtkAdjustment *)gtk_adjustment_new(interval/(60*1000), 1, G_MAXINT, 1, 0, 0); |
| 4220 | 106 | spinner = gtk_spin_button_new(adj, 0, 0); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
107 | gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
| 4220 | 108 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
109 | label = gtk_label_new(_("minutes.")); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
110 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
| 4220 | 111 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
112 | hbox = gtk_hbox_new(TRUE, 5); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
113 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
| 4220 | 114 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
115 | button = gtk_button_new_with_mnemonic(_("_Apply")); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
116 | gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
117 | g_signal_connect(G_OBJECT(button), "clicked", |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
118 | G_CALLBACK(set_timestamp), spinner); |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
119 | |
| 4220 | 120 | gtk_widget_show_all(ret); |
| 121 | return ret; | |
| 122 | } | |
| 123 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
124 | static gboolean |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
125 | plugin_load(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
126 | { |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
127 | GList *cnvs; |
|
5676
d3c2fdaf4821
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5530
diff
changeset
|
128 | GaimConversation *c; |
| 3598 | 129 | |
|
6050
7410ba1809ad
[gaim-migrate @ 6500]
Mark Doliner <markdoliner@pidgin.im>
parents:
5920
diff
changeset
|
130 | timestamp_timeouts = NULL; |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
131 | for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) { |
| 3598 | 132 | c = cnvs->data; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
133 | timestamp_new_convo(c); |
| 3598 | 134 | } |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
135 | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
136 | gaim_signal_connect(gaim_conversations_get_handle(), |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
137 | "conversation-created", |
|
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
138 | plugin, GAIM_CALLBACK(timestamp_new_convo), NULL); |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
139 | |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
140 | interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval"); |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
141 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
142 | return TRUE; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
143 | } |
| 3598 | 144 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
145 | static gboolean |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
146 | plugin_unload(GaimPlugin *plugin) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
147 | { |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
148 | GSList *to; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
149 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
150 | for (to = timestamp_timeouts; to != NULL; to = to->next) |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
151 | g_source_remove(GPOINTER_TO_INT(to->data)); |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
152 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
153 | g_slist_free(timestamp_timeouts); |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
154 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
155 | return TRUE; |
| 3598 | 156 | } |
| 157 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
158 | static GaimGtkPluginUiInfo ui_info = |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
159 | { |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
160 | get_config_frame |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
161 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
162 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
163 | static GaimPluginInfo info = |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
164 | { |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
165 | 2, /**< api_version */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
166 | GAIM_PLUGIN_STANDARD, /**< type */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
167 | GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
168 | 0, /**< flags */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
169 | NULL, /**< dependencies */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
170 | GAIM_PRIORITY_DEFAULT, /**< priority */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
171 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
172 | TIMESTAMP_PLUGIN_ID, /**< id */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
173 | N_("Timestamp"), /**< name */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
174 | VERSION, /**< version */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
175 | /** summary */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
176 | N_("Adds iChat-style timestamps to conversations every N minutes."), |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
177 | /** description */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
178 | N_("Adds iChat-style timestamps to conversations every N minutes."), |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
179 | "Sean Egan <bj91704@binghamton.edu>", /**< author */ |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
180 | GAIM_WEBSITE, /**< homepage */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
181 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
182 | plugin_load, /**< load */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
183 | plugin_unload, /**< unload */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
184 | NULL, /**< destroy */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
185 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
186 | &ui_info, /**< ui_info */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
187 | NULL /**< extra_info */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
188 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
189 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
190 | static void |
|
5920
963bfdefee02
[gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents:
5873
diff
changeset
|
191 | init_plugin(GaimPlugin *plugin) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
192 | { |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
193 | gaim_prefs_add_none("/plugins/gtk/timestamp"); |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
194 | gaim_prefs_add_int("/plugins/gtk/timestamp/interval", interval); |
| 3598 | 195 | } |
| 196 | ||
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
197 | GAIM_INIT_PLUGIN(interval, init_plugin, info) |