annotate plugins/timestamp.c @ 5646:48c63ee49961

[gaim-migrate @ 6060] The protocol drop-down menu now has protocol icons. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 02 Jun 2003 03:52:43 +0000
parents 2c4c975620f0
children dae79aefac8d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /* iChat-like timestamps by Sean Egan.
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
2 *
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
3 * Modified by: Chris J. Friesen <Darth_Sebulba04@yahoo.com> Jan 05, 2003.
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
4 * <INSERT GPL HERE> */
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5
4202
59751fe608c5 [gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents: 4201
diff changeset
6 #include "config.h"
59751fe608c5 [gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents: 4201
diff changeset
7
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 #include <time.h>
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 #include "gaim.h"
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 #include "gtkimhtml.h"
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
11 #include "gtkplugin.h"
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
12
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
13 #define TIMESTAMP_PLUGIN_ID "gtk-timestamp"
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
15 //Set the default to 5 minutes.
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
16 static int timestamp = 5 * 60 * 1000;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
18 static GSList *timestamp_timeouts;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19
4201
511c2b63caa4 [gaim-migrate @ 4432]
Christian Hammond <chipx86@chipx86.com>
parents: 4168
diff changeset
20 gboolean do_timestamp (gpointer data)
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 {
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4220
diff changeset
22 struct gaim_conversation *c = (struct gaim_conversation *)data;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 char *buf;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 char mdate[6];
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 time_t tim = time(NULL);
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26
4376
2c985a9e994c [gaim-migrate @ 4642]
Christian Hammond <chipx86@chipx86.com>
parents: 4359
diff changeset
27 if (!g_list_find(gaim_get_conversations(), c))
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 return FALSE;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim));
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 buf = g_strdup_printf(" %s", mdate);
4475
1f3241831734 [gaim-migrate @ 4750]
Christian Hammond <chipx86@chipx86.com>
parents: 4376
diff changeset
32 gaim_conversation_write(c, NULL, buf, -1, WFLAG_NOLOG, tim);
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 g_free(buf);
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 return TRUE;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
35 }
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 void timestamp_new_convo(char *name)
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 {
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4220
diff changeset
39 struct gaim_conversation *c = gaim_find_conversation(name);
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 do_timestamp(c);
4168
ebfb80bbe1ed [gaim-migrate @ 4397]
Luke Schierer <lschiere@pidgin.im>
parents: 4113
diff changeset
41
3727
dadb43e0bcae [gaim-migrate @ 3864]
Luke Schierer <lschiere@pidgin.im>
parents: 3598
diff changeset
42 timestamp_timeouts = g_slist_append(timestamp_timeouts,
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
43 GINT_TO_POINTER(g_timeout_add(timestamp, do_timestamp, c)));
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 }
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
46
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
47 static void set_timestamp(GtkWidget *button, GtkWidget *spinner) {
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
48 int tm;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
49
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
50 tm = 0;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
51
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
52 tm = CLAMP(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spinner)), 1, G_MAXINT);
5227
6d1707dc8c3d [gaim-migrate @ 5597]
Christian Hammond <chipx86@chipx86.com>
parents: 5205
diff changeset
53 gaim_debug(GAIM_DEBUG_MISC, "timestamp", "setting time to %d mins\n", tm);
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
54
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
55 tm = tm * 60 * 1000;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
56
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
57 timestamp = tm;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
58 }
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
59
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
60 static GtkWidget *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
61 get_config_frame(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
62 {
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
63 GtkWidget *ret;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
64 GtkWidget *frame, *label;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
65 GtkWidget *vbox, *hbox;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
66 GtkAdjustment *adj;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
67 GtkWidget *spinner, *button;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
68
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
69 ret = gtk_vbox_new(FALSE, 18);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
70 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
71
5530
2c4c975620f0 [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
72 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp"));
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
73 vbox = gtk_vbox_new(FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
74 gtk_container_add(GTK_CONTAINER(frame), vbox);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
75
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
76 hbox = gtk_hbox_new(FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
77 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
78
4586
c7986b4d182a [gaim-migrate @ 4870]
Luke Schierer <lschiere@pidgin.im>
parents: 4475
diff changeset
79 label = gtk_label_new(_("Delay"));
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
80 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
81
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
82 adj = (GtkAdjustment *)gtk_adjustment_new(timestamp/(60*1000), 1, G_MAXINT, 1, 0, 0);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
83 spinner = gtk_spin_button_new(adj, 0, 0);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
84 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
85
4586
c7986b4d182a [gaim-migrate @ 4870]
Luke Schierer <lschiere@pidgin.im>
parents: 4475
diff changeset
86 label = gtk_label_new(_("minutes."));
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
87 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
88
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
89 hbox = gtk_hbox_new(TRUE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
90 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
91
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
92 button = gtk_button_new_with_mnemonic(_("_Apply"));
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
93 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5);
5314
1f901484599d [gaim-migrate @ 5686]
Christian Hammond <chipx86@chipx86.com>
parents: 5227
diff changeset
94 g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(set_timestamp), spinner);
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
95
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
96 gtk_widget_show_all(ret);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
97 return ret;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
98 }
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
99
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
100 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
101 plugin_load(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
102 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
103 GList *cnvs;
4359
5fb47ec9bfe4 [gaim-migrate @ 4625]
Christian Hammond <chipx86@chipx86.com>
parents: 4220
diff changeset
104 struct gaim_conversation *c;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
106 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) {
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 c = cnvs->data;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 timestamp_new_convo(c->name);
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 }
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
110
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
111 gaim_signal_connect(plugin, event_new_conversation,
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
112 timestamp_new_convo, NULL);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
113
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
114 return TRUE;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
115 }
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
117 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
118 plugin_unload(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
119 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
120 GSList *to;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
121
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
122 for (to = timestamp_timeouts; to != NULL; to = to->next)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
123 g_source_remove(GPOINTER_TO_INT(to->data));
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
124
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
125 g_slist_free(timestamp_timeouts);
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
126
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
127 return TRUE;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128 }
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
130 static GaimGtkPluginUiInfo ui_info =
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
131 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
132 get_config_frame
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
133 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
134
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
135 static GaimPluginInfo info =
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
136 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
137 2, /**< api_version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
138 GAIM_PLUGIN_STANDARD, /**< type */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
139 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
140 0, /**< flags */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
141 NULL, /**< dependencies */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
142 GAIM_PRIORITY_DEFAULT, /**< priority */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
143
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
144 TIMESTAMP_PLUGIN_ID, /**< id */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
145 N_("Timestamp"), /**< name */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
146 VERSION, /**< version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
147 /** summary */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
148 N_("Adds iChat-style timestamps to conversations every N minutes."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
149 /** description */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
150 N_("Adds iChat-style timestamps to conversations every N minutes."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
151 "Sean Egan <bj91704@binghamton.edu>", /**< author */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
152 WEBSITE, /**< homepage */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
153
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
154 plugin_load, /**< load */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
155 plugin_unload, /**< unload */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
156 NULL, /**< destroy */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
157
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
158 &ui_info, /**< ui_info */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
159 NULL /**< extra_info */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
160 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
161
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
162 static void
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
163 __init_plugin(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
164 {
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 }
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
167 GAIM_INIT_PLUGIN(timestamp, __init_plugin, info);