Fri, 02 Sep 2011 04:25:04 +0000
Remove deprecated buddy icon functions and @since tags.
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
1 | /* |
| 15884 | 2 | * Purple - iChat-style timestamps |
|
7237
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> |
| 15415 | 6 | * Copyright (C) 2007, Andrew Gaul <andrew@gaul.org> |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
7 | * |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
8 | * 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
|
9 | * 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
|
10 | * the Free Software Foundation; either version 2 of the License, or |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
11 | * (at your option) any later version. |
| 4220 | 12 | * |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
13 | * 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
|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
16 | * GNU General Public License for more details. |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
17 | * |
|
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
18 | * 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
|
19 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
16749
diff
changeset
|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
7237
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 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
24 | #include "internal.h" |
|
4202
8b92de3b1c07
[gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents:
4201
diff
changeset
|
25 | |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
26 | #include "conversation.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
27 | #include "debug.h" |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
28 | #include "prefs.h" |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
29 | #include "signals.h" |
| 9943 | 30 | #include "version.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" |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15884
diff
changeset
|
34 | #include "gtkprefs.h" |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
35 | #include "gtkutils.h" |
|
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5676
diff
changeset
|
36 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
37 | #define TIMESTAMP_PLUGIN_ID "gtk-timestamp" |
| 3598 | 38 | |
| 15415 | 39 | /* minutes externally, seconds internally, and milliseconds in preferences */ |
| 40 | static int interval = 5 * 60; | |
| 3598 | 41 | |
| 15415 | 42 | static void |
| 15884 | 43 | timestamp_display(PurpleConversation *conv, time_t then, time_t now) |
| 3598 | 44 | { |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
45 | PidginConversation *gtk_conv = PIDGIN_CONVERSATION(conv); |
| 15415 | 46 | GtkWidget *imhtml = gtk_conv->imhtml; |
| 47 | GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)); | |
| 10389 | 48 | GtkTextIter iter; |
|
13105
8f9c66e4af87
[gaim-migrate @ 15466]
Richard Laager <rlaager@pidgin.im>
parents:
12604
diff
changeset
|
49 | const char *mdate; |
| 15415 | 50 | int y, height; |
| 51 | GdkRectangle rect; | |
|
29294
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
52 | gboolean scrolled = FALSE; |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
53 | GtkTextTag *tag; |
|
21720
235394d5c7f4
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
54 | |
| 15415 | 55 | /* display timestamp */ |
| 15884 | 56 | mdate = purple_utf8_strftime(then == 0 ? "%H:%M" : "\n%H:%M", |
| 15415 | 57 | localtime(&now)); |
| 58 | gtk_text_buffer_get_end_iter(buffer, &iter); | |
|
21720
235394d5c7f4
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
59 | |
|
29294
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
60 | /* is the view already scrolled? */ |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
61 | gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect); |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
62 | gtk_text_view_get_line_yrange(GTK_TEXT_VIEW(imhtml), &iter, &y, &height); |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
63 | if (((y + height) - (rect.y + rect.height)) > height) |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
64 | scrolled = TRUE; |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
65 | |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
66 | if ((tag = gtk_text_tag_table_lookup(gtk_text_buffer_get_tag_table(buffer), "TIMESTAMP")) == NULL) |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
67 | tag = gtk_text_buffer_create_tag(buffer, "TIMESTAMP", |
|
21720
235394d5c7f4
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
68 | "foreground", "#888888", "justification", GTK_JUSTIFY_CENTER, |
|
235394d5c7f4
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
69 | "weight", PANGO_WEIGHT_BOLD, NULL); |
|
235394d5c7f4
Pull a bunch of bugfix only changes to im.pidgin.pidgin.2.3.1,
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
20288
diff
changeset
|
70 | |
|
29294
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
71 | gtk_text_buffer_insert_with_tags(buffer, &iter, mdate, |
|
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
72 | strlen(mdate), tag, NULL); |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
73 | |
| 15415 | 74 | /* scroll view if necessary */ |
| 75 | gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(imhtml), &rect); | |
| 76 | gtk_text_view_get_line_yrange( | |
| 77 | GTK_TEXT_VIEW(imhtml), &iter, &y, &height); | |
|
29294
ee2180f692c1
timestamp: Do not scroll down if it was scrolled up.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
25633
diff
changeset
|
78 | if (!scrolled && ((y + height) - (rect.y + rect.height)) > height && |
| 15415 | 79 | gtk_text_buffer_get_char_count(buffer)) { |
| 15884 | 80 | gboolean smooth = purple_prefs_get_bool( |
|
16123
8b98683319e7
Rename /purple/gtk preferences back to /gaim/gtk to allow for smooth upgrades
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15884
diff
changeset
|
81 | PIDGIN_PREFS_ROOT "/conversations/use_smooth_scrolling"); |
| 15415 | 82 | gtk_imhtml_scroll_to_end(GTK_IMHTML(imhtml), smooth); |
| 9191 | 83 | } |
| 3598 | 84 | } |
| 85 | ||
| 9191 | 86 | static gboolean |
| 15884 | 87 | timestamp_displaying_conv_msg(PurpleAccount *account, const char *who, |
| 88 | char **buffer, PurpleConversation *conv, | |
| 89 | PurpleMessageFlags flags, void *data) | |
| 9191 | 90 | { |
| 15415 | 91 | time_t now = time(NULL) / interval * interval; |
| 92 | time_t then; | |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
93 | |
| 15884 | 94 | if (!g_list_find(purple_get_conversations(), conv)) |
| 9191 | 95 | return FALSE; |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
96 | |
| 15884 | 97 | then = GPOINTER_TO_INT(purple_conversation_get_data( |
| 15415 | 98 | conv, "timestamp-last")); |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
99 | |
| 15415 | 100 | if (now - then >= interval) { |
| 101 | timestamp_display(conv, then, now); | |
| 15884 | 102 | purple_conversation_set_data( |
| 15415 | 103 | conv, "timestamp-last", GINT_TO_POINTER(now)); |
| 9191 | 104 | } |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
105 | |
| 9191 | 106 | return FALSE; |
| 107 | } | |
| 108 | ||
| 15415 | 109 | static void |
| 15884 | 110 | timestamp_new_convo(PurpleConversation *conv) |
| 3598 | 111 | { |
| 15884 | 112 | if (!g_list_find(purple_get_conversations(), conv)) |
| 9191 | 113 | return; |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
114 | |
| 15884 | 115 | purple_conversation_set_data(conv, "timestamp-last", GINT_TO_POINTER(0)); |
| 9191 | 116 | } |
| 3598 | 117 | |
| 15415 | 118 | static void |
| 119 | set_timestamp(GtkWidget *spinner, void *null) | |
| 9191 | 120 | { |
| 4220 | 121 | int tm; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
122 | |
|
12204
77be85a65fe8
[gaim-migrate @ 14506]
Richard Laager <rlaager@pidgin.im>
parents:
11740
diff
changeset
|
123 | tm = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)); |
| 15884 | 124 | purple_debug(PURPLE_DEBUG_MISC, "timestamp", |
| 15415 | 125 | "setting interval to %d minutes\n", tm); |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
126 | |
| 15415 | 127 | interval = tm * 60; |
| 15884 | 128 | purple_prefs_set_int("/plugins/gtk/timestamp/interval", interval * 1000); |
| 4220 | 129 | } |
| 130 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
131 | static GtkWidget * |
| 15884 | 132 | get_config_frame(PurplePlugin *plugin) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
133 | { |
| 4220 | 134 | GtkWidget *ret; |
| 135 | GtkWidget *frame, *label; | |
| 136 | GtkWidget *vbox, *hbox; | |
| 15415 | 137 | GtkObject *adj; |
| 11740 | 138 | GtkWidget *spinner; |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
139 | |
| 4220 | 140 | ret = gtk_vbox_new(FALSE, 18); |
| 141 | gtk_container_set_border_width (GTK_CONTAINER (ret), 12); | |
| 142 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
143 | frame = pidgin_make_frame(ret, _("Display Timestamps Every")); |
| 4220 | 144 | vbox = gtk_vbox_new(FALSE, 5); |
| 145 | gtk_container_add(GTK_CONTAINER(frame), vbox); | |
| 146 | ||
| 147 | hbox = gtk_hbox_new(FALSE, 5); | |
| 148 | gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); | |
| 149 | ||
| 15415 | 150 | /* XXX limit to divisors of 60? */ |
| 151 | adj = gtk_adjustment_new(interval / 60, 1, 60, 1, 0, 0); | |
| 152 | spinner = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 0, 0); | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
153 | gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0); |
| 15415 | 154 | g_signal_connect(G_OBJECT(spinner), "value-changed", |
| 155 | G_CALLBACK(set_timestamp), NULL); | |
| 156 | label = gtk_label_new(_("minutes")); | |
|
6485
3c7ba18e32f1
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6371
diff
changeset
|
157 | gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); |
| 4220 | 158 | |
| 159 | gtk_widget_show_all(ret); | |
| 160 | return ret; | |
| 161 | } | |
| 162 | ||
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
163 | static gboolean |
| 15884 | 164 | plugin_load(PurplePlugin *plugin) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
165 | { |
| 15884 | 166 | void *conv_handle = purple_conversations_get_handle(); |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
167 | void *gtkconv_handle = pidgin_conversations_get_handle(); |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
168 | |
| 15415 | 169 | /* lower priority to display initial timestamp after logged messages */ |
| 15884 | 170 | purple_signal_connect_priority(conv_handle, "conversation-created", |
| 171 | plugin, PURPLE_CALLBACK(timestamp_new_convo), NULL, | |
| 172 | PURPLE_SIGNAL_PRIORITY_DEFAULT + 1); | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
173 | |
| 15884 | 174 | purple_signal_connect(gtkconv_handle, "displaying-chat-msg", |
| 175 | plugin, PURPLE_CALLBACK(timestamp_displaying_conv_msg), NULL); | |
| 176 | purple_signal_connect(gtkconv_handle, "displaying-im-msg", | |
| 177 | plugin, PURPLE_CALLBACK(timestamp_displaying_conv_msg), NULL); | |
|
7237
da128ba7a4de
[gaim-migrate @ 7812]
Mark Doliner <markdoliner@pidgin.im>
parents:
6982
diff
changeset
|
178 | |
| 15884 | 179 | interval = purple_prefs_get_int("/plugins/gtk/timestamp/interval") / 1000; |
| 10389 | 180 | |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
181 | return TRUE; |
| 3598 | 182 | } |
| 183 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
184 | static PidginPluginUiInfo ui_info = |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
185 | { |
|
12600
7ecd4441fdc7
[gaim-migrate @ 14934]
Richard Laager <rlaager@pidgin.im>
parents:
12560
diff
changeset
|
186 | get_config_frame, |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
187 | 0, /* page_num (Reserved) */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
188 | |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
189 | /* padding */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
190 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
191 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
192 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
193 | NULL |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
194 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
195 | |
| 15884 | 196 | static PurplePluginInfo info = |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
197 | { |
| 15884 | 198 | PURPLE_PLUGIN_MAGIC, |
| 199 | PURPLE_MAJOR_VERSION, | |
| 200 | PURPLE_MINOR_VERSION, | |
| 201 | PURPLE_PLUGIN_STANDARD, /**< type */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
202 | PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
203 | 0, /**< flags */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
204 | NULL, /**< dependencies */ |
| 15884 | 205 | PURPLE_PRIORITY_DEFAULT, /**< priority */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
206 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
207 | TIMESTAMP_PLUGIN_ID, /**< id */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
208 | N_("Timestamp"), /**< name */ |
|
20288
5ca925a094e2
applied changes from 03b709ec2a153e7e82719df0ba4635108bb1d3c6
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
209 | DISPLAY_VERSION, /**< version */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
210 | /** summary */ |
| 15415 | 211 | N_("Display iChat-style timestamps"), |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
212 | /** description */ |
| 15415 | 213 | N_("Display iChat-style timestamps every N minutes."), |
|
12406
89863d2d9b8d
[gaim-migrate @ 14713]
Richard Laager <rlaager@pidgin.im>
parents:
12204
diff
changeset
|
214 | "Sean Egan <seanegan@gmail.com>", /**< author */ |
| 15884 | 215 | PURPLE_WEBSITE, /**< homepage */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
216 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
217 | plugin_load, /**< load */ |
| 15415 | 218 | NULL, /**< unload */ |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
219 | NULL, /**< destroy */ |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
220 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
221 | &ui_info, /**< ui_info */ |
| 8993 | 222 | NULL, /**< extra_info */ |
|
10404
9d66d897e96d
[gaim-migrate @ 11649]
Mark Doliner <markdoliner@pidgin.im>
parents:
10400
diff
changeset
|
223 | NULL, |
|
16749
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
224 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
225 | |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
226 | /* padding */ |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
227 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
228 | NULL, |
|
14a3fdc0aed7
Default plugins are done, for the release i'm not that concerned about plugins that do _NOT_ compile by default
Gary Kramlich <grim@reaperworld.com>
parents:
16123
diff
changeset
|
229 | NULL, |
| 8993 | 230 | NULL |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
231 | }; |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
232 | |
|
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
233 | static void |
| 15884 | 234 | init_plugin(PurplePlugin *plugin) |
|
5205
242b8aa81328
[gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents:
4586
diff
changeset
|
235 | { |
| 15884 | 236 | purple_prefs_add_none("/plugins/gtk/timestamp"); |
| 237 | purple_prefs_add_int("/plugins/gtk/timestamp/interval", interval * 1000); | |
| 3598 | 238 | } |
| 239 | ||
|
25633
feee0c7e503f
Fix some more mis-identified plugins, like 3b3526a0...
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
21720
diff
changeset
|
240 | PURPLE_INIT_PLUGIN(timestamp, init_plugin, info) |