Mercurial > pidgin.yaz
annotate pidgin/plugins/timestamp_format.c @ 29011:31ea94bea686
German update for some keyboard accelerators
author | Björn Voigt <bjoern@cs.tu-berlin.de> |
---|---|
date | Mon, 23 Nov 2009 17:02:26 +0000 |
parents | 3cc856ca2338 |
children | 9ec94a37446a |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 #include "internal.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 #include "debug.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 #include "log.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 #include "plugin.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 #include "util.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 #include "version.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 #include "gtkconv.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 #include "gtkplugin.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 #include <time.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 |
15823 | 14 static PurplePluginPrefFrame * |
15 get_plugin_pref_frame(PurplePlugin *plugin) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 { |
15823 | 17 PurplePluginPrefFrame *frame; |
18 PurplePluginPref *ppref; | |
16012
765cfc73182f
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15878
diff
changeset
|
19 char *tmp; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 |
15823 | 21 frame = purple_plugin_pref_frame_new(); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 |
15823 | 23 ppref = purple_plugin_pref_new_with_label(_("Timestamp Format Options")); |
24 purple_plugin_pref_frame_add(frame, ppref); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 |
16931
09f0bb67a87f
Traditional Pidgin doesn't make any sense. It was only ever the case for
Richard Laager <rlaager@wiktel.com>
parents:
16819
diff
changeset
|
26 tmp = g_strdup_printf(_("_Force 24-hour time format")); |
15823 | 27 ppref = purple_plugin_pref_new_with_name_and_label( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 "/plugins/gtk/timestamp_format/force_24hr", |
16012
765cfc73182f
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15878
diff
changeset
|
29 tmp); |
15823 | 30 purple_plugin_pref_frame_add(frame, ppref); |
16012
765cfc73182f
more help for translators (I removed a few PIDGIN_NAME references
Nathan Walp <nwalp@pidgin.im>
parents:
15878
diff
changeset
|
31 g_free(tmp); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 |
15823 | 33 ppref = purple_plugin_pref_new_with_label(_("Show dates in...")); |
34 purple_plugin_pref_frame_add(frame, ppref); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 |
15823 | 36 ppref = purple_plugin_pref_new_with_name_and_label( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 "/plugins/gtk/timestamp_format/use_dates/conversation", |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 _("Co_nversations:")); |
15823 | 39 purple_plugin_pref_set_type(ppref, PURPLE_PLUGIN_PREF_CHOICE); |
40 purple_plugin_pref_add_choice(ppref, _("For delayed messages"), "automatic"); | |
41 purple_plugin_pref_add_choice(ppref, _("For delayed messages and in chats"), "chats"); | |
42 purple_plugin_pref_add_choice(ppref, _("Always"), "always"); | |
43 purple_plugin_pref_frame_add(frame, ppref); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 |
15823 | 45 ppref = purple_plugin_pref_new_with_name_and_label( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 "/plugins/gtk/timestamp_format/use_dates/log", |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 _("_Message Logs:")); |
15823 | 48 purple_plugin_pref_set_type(ppref, PURPLE_PLUGIN_PREF_CHOICE); |
49 purple_plugin_pref_add_choice(ppref, _("For delayed messages"), "automatic"); | |
50 purple_plugin_pref_add_choice(ppref, _("For delayed messages and in chats"), "chats"); | |
51 purple_plugin_pref_add_choice(ppref, _("Always"), "always"); | |
52 purple_plugin_pref_frame_add(frame, ppref); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 return frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 |
15823 | 57 static char *timestamp_cb_common(PurpleConversation *conv, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
58 time_t t, |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
59 gboolean show_date, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 gboolean force, |
16819 | 61 const char *dates, |
62 gboolean parens) | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 g_return_val_if_fail(dates != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
66 if (show_date || |
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
67 !strcmp(dates, "always") || |
15823 | 68 (conv != NULL && purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT && !strcmp(dates, "chats"))) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 { |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
70 struct tm *tm = localtime(&t); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 if (force) |
16819 | 72 return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%Y-%m-%d %H:%M:%S", tm), parens ? ")" : ""); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 else |
16819 | 74 return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_date_format_long(tm), parens ? ")" : ""); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 if (force) |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
78 { |
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
79 struct tm *tm = localtime(&t); |
16819 | 80 return g_strdup_printf("%s%s%s", parens ? "(" : "", purple_utf8_strftime("%H:%M:%S", tm), parens ? ")" : ""); |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
81 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 |
15823 | 86 static char *conversation_timestamp_cb(PurpleConversation *conv, |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
87 time_t t, gboolean show_date, gpointer data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 { |
15823 | 89 gboolean force = purple_prefs_get_bool( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
90 "/plugins/gtk/timestamp_format/force_24hr"); |
15823 | 91 const char *dates = purple_prefs_get_string( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 "/plugins/gtk/timestamp_format/use_dates/conversation"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 g_return_val_if_fail(conv != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 |
16819 | 96 return timestamp_cb_common(conv, t, show_date, force, dates, TRUE); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 |
15823 | 99 static char *log_timestamp_cb(PurpleLog *log, time_t t, gboolean show_date, gpointer data) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 { |
15823 | 101 gboolean force = purple_prefs_get_bool( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
102 "/plugins/gtk/timestamp_format/force_24hr"); |
15823 | 103 const char *dates = purple_prefs_get_string( |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
104 "/plugins/gtk/timestamp_format/use_dates/log"); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
105 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
106 g_return_val_if_fail(log != NULL, NULL); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
107 |
16819 | 108 return timestamp_cb_common(log->conv, t, show_date, force, dates, FALSE); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 static gboolean |
15823 | 112 plugin_load(PurplePlugin *plugin) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 { |
15823 | 114 purple_signal_connect(pidgin_conversations_get_handle(), "conversation-timestamp", |
115 plugin, PURPLE_CALLBACK(conversation_timestamp_cb), NULL); | |
116 purple_signal_connect(purple_log_get_handle(), "log-timestamp", | |
117 plugin, PURPLE_CALLBACK(log_timestamp_cb), NULL); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 return TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 static gboolean |
15823 | 122 plugin_unload(PurplePlugin *plugin) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 return TRUE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 |
15823 | 127 static PurplePluginUiInfo prefs_info = { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 get_plugin_pref_frame, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 0, /* page num (Reserved) */ |
16678
3d41d0d7fb9b
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:
16012
diff
changeset
|
130 NULL,/* frame (Reserved) */ |
3d41d0d7fb9b
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:
16012
diff
changeset
|
131 |
3d41d0d7fb9b
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:
16012
diff
changeset
|
132 /* padding */ |
3d41d0d7fb9b
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:
16012
diff
changeset
|
133 NULL, |
3d41d0d7fb9b
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:
16012
diff
changeset
|
134 NULL, |
3d41d0d7fb9b
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:
16012
diff
changeset
|
135 NULL, |
3d41d0d7fb9b
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:
16012
diff
changeset
|
136 NULL |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 |
15823 | 139 static PurplePluginInfo info = |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 { |
15823 | 141 PURPLE_PLUGIN_MAGIC, |
142 PURPLE_MAJOR_VERSION, | |
143 PURPLE_MINOR_VERSION, | |
15878
fde34f782314
The Message Timestamp Formats plugin lacked an ID before.
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
144 PURPLE_PLUGIN_STANDARD, /**< type */ |
15519
b15cc37605c4
In Pidgin, display a full date on the timestamp of the first message to
Richard Laager <rlaager@wiktel.com>
parents:
15501
diff
changeset
|
145 PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 0, /**< flags */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 NULL, /**< dependencies */ |
15878
fde34f782314
The Message Timestamp Formats plugin lacked an ID before.
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
148 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 |
15878
fde34f782314
The Message Timestamp Formats plugin lacked an ID before.
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
150 "core-timestamp_format", /**< id */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 N_("Message Timestamp Formats"), /**< name */ |
21030
3cc856ca2338
Add a --with-extraversion option to ./configure so packagers can fine tune
Stu Tomlinson <stu@nosnilmot.com>
parents:
16931
diff
changeset
|
152 DISPLAY_VERSION, /**< version */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 /** summary */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 N_("Customizes the message timestamp formats."), |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 /** description */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 N_("This plugin allows the user to customize " |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 "conversation and logging message timestamp " |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
158 "formats."), |
15567
b6615958d87c
Switching to my pidgin.im e-mail address, which I think fits nicely and seems professional.
Richard Laager <rlaager@wiktel.com>
parents:
15565
diff
changeset
|
159 "Richard Laager <rlaager@pidgin.im>", /**< author */ |
15878
fde34f782314
The Message Timestamp Formats plugin lacked an ID before.
Richard Laager <rlaager@wiktel.com>
parents:
15823
diff
changeset
|
160 PURPLE_WEBSITE, /**< homepage */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
162 plugin_load, /**< load */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
163 plugin_unload, /**< unload */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
164 NULL, /**< destroy */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
166 NULL, /**< ui_info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
167 NULL, /**< extra_info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
168 &prefs_info, /**< prefs_info */ |
16678
3d41d0d7fb9b
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:
16012
diff
changeset
|
169 NULL, /**< actions */ |
3d41d0d7fb9b
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:
16012
diff
changeset
|
170 |
3d41d0d7fb9b
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:
16012
diff
changeset
|
171 /* padding */ |
3d41d0d7fb9b
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:
16012
diff
changeset
|
172 NULL, |
3d41d0d7fb9b
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:
16012
diff
changeset
|
173 NULL, |
3d41d0d7fb9b
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:
16012
diff
changeset
|
174 NULL, |
3d41d0d7fb9b
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:
16012
diff
changeset
|
175 NULL |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
176 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
177 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 static void |
15823 | 179 init_plugin(PurplePlugin *plugin) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
180 { |
15823 | 181 purple_prefs_add_none("/plugins/gtk"); |
182 purple_prefs_add_none("/plugins/gtk/timestamp_format"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
183 |
15823 | 184 purple_prefs_add_bool("/plugins/gtk/timestamp_format/force_24hr", TRUE); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
185 |
15823 | 186 purple_prefs_add_none("/plugins/gtk/timestamp_format/use_dates"); |
187 purple_prefs_add_string("/plugins/gtk/timestamp_format/use_dates/conversation", "automatic"); | |
188 purple_prefs_add_string("/plugins/gtk/timestamp_format/use_dates/log", "automatic"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
189 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 |
15823 | 191 PURPLE_INIT_PLUGIN(timestamp_format, init_plugin, info) |