annotate plugins/timestamp.c @ 6485:70d5122bc3ff

[gaim-migrate @ 6999] Removed the old event system and replaced it with a much better signal system. There will most likely be some bugs in this, but it seems to be working for now. Plugins can now generate their own signals, and other plugins can find those plugins and connect to them. This could give plugins a form of IPC. It's also useful for other things. It's rather flexible, except for the damn marshalling, but there's no way around that that I or the glib people can see. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 18 Aug 2003 01:03:43 +0000
parents 8f94cce8faa5
children 42fdf16f1dad
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
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
6 #include "internal.h"
4202
59751fe608c5 [gaim-migrate @ 4438]
Christian Hammond <chipx86@chipx86.com>
parents: 4201
diff changeset
7
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
8 #include "conversation.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
9 #include "debug.h"
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
10 #include "signals.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
11
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 #include "gtkimhtml.h"
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
13 #include "gtkplugin.h"
5872
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
14 #include "gtkutils.h"
059d95c67cda [gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents: 5676
diff changeset
15
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
16 #define TIMESTAMP_PLUGIN_ID "gtk-timestamp"
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17
6050
72403c3c84e1 [gaim-migrate @ 6500]
Mark Doliner <mark@kingant.net>
parents: 5920
diff changeset
18 /* Set the default to 5 minutes. */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
19 static int timestamp = 5 * 60 * 1000;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
21 static GSList *timestamp_timeouts;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
23 static gboolean do_timestamp (gpointer data)
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24 {
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
25 GaimConversation *c = (GaimConversation *)data;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 char *buf;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
27 char mdate[6];
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28 time_t tim = time(NULL);
6050
72403c3c84e1 [gaim-migrate @ 6500]
Mark Doliner <mark@kingant.net>
parents: 5920
diff changeset
29
4376
2c985a9e994c [gaim-migrate @ 4642]
Christian Hammond <chipx86@chipx86.com>
parents: 4359
diff changeset
30 if (!g_list_find(gaim_get_conversations(), c))
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 return FALSE;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
33 strftime(mdate, sizeof(mdate), "%H:%M", localtime(&tim));
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 buf = g_strdup_printf(" %s", mdate);
4475
1f3241831734 [gaim-migrate @ 4750]
Christian Hammond <chipx86@chipx86.com>
parents: 4376
diff changeset
35 gaim_conversation_write(c, NULL, buf, -1, WFLAG_NOLOG, tim);
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36 g_free(buf);
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 return TRUE;
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 }
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
40 static void timestamp_new_convo(GaimConversation *conv)
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 {
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
42 do_timestamp(conv);
4168
ebfb80bbe1ed [gaim-migrate @ 4397]
Luke Schierer <lschiere@pidgin.im>
parents: 4113
diff changeset
43
3727
dadb43e0bcae [gaim-migrate @ 3864]
Luke Schierer <lschiere@pidgin.im>
parents: 3598
diff changeset
44 timestamp_timeouts = g_slist_append(timestamp_timeouts,
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
45 GINT_TO_POINTER(g_timeout_add(timestamp, do_timestamp, conv)));
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 }
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
48
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
49 static void set_timestamp(GtkWidget *button, GtkWidget *spinner) {
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
50 int tm;
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
51
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
52 tm = 0;
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
53
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
54 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
55 gaim_debug(GAIM_DEBUG_MISC, "timestamp", "setting time to %d mins\n", tm);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
56
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
57 tm = tm * 60 * 1000;
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 timestamp = tm;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
60 }
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
61
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
62 static GtkWidget *
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
63 get_config_frame(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
64 {
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
65 GtkWidget *ret;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
66 GtkWidget *frame, *label;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
67 GtkWidget *vbox, *hbox;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
68 GtkAdjustment *adj;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
69 GtkWidget *spinner, *button;
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
70
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
71 ret = gtk_vbox_new(FALSE, 18);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
72 gtk_container_set_border_width (GTK_CONTAINER (ret), 12);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
73
5530
2c4c975620f0 [gaim-migrate @ 5930]
Christian Hammond <chipx86@chipx86.com>
parents: 5314
diff changeset
74 frame = gaim_gtk_make_frame(ret, _("iChat Timestamp"));
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
75 vbox = gtk_vbox_new(FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
76 gtk_container_add(GTK_CONTAINER(frame), vbox);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
77
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
78 hbox = gtk_hbox_new(FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
79 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
80
4586
c7986b4d182a [gaim-migrate @ 4870]
Luke Schierer <lschiere@pidgin.im>
parents: 4475
diff changeset
81 label = gtk_label_new(_("Delay"));
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
82 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
83
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
84 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
85 spinner = gtk_spin_button_new(adj, 0, 0);
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
86 gtk_box_pack_start(GTK_BOX(hbox), spinner, TRUE, TRUE, 0);
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
87
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
88 label = gtk_label_new(_("minutes."));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
89 gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5);
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
90
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
91 hbox = gtk_hbox_new(TRUE, 5);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
92 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5);
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
93
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
94 button = gtk_button_new_with_mnemonic(_("_Apply"));
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
95 gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, FALSE, 5);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
96 g_signal_connect(G_OBJECT(button), "clicked",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
97 G_CALLBACK(set_timestamp), spinner);
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
98
4220
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
99 gtk_widget_show_all(ret);
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
100 return ret;
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
101 }
0cff8ec38935 [gaim-migrate @ 4464]
Luke Schierer <lschiere@pidgin.im>
parents: 4202
diff changeset
102
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
103 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
104 plugin_load(GaimPlugin *plugin)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
105 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
106 GList *cnvs;
5676
dae79aefac8d [gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents: 5530
diff changeset
107 GaimConversation *c;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108
6050
72403c3c84e1 [gaim-migrate @ 6500]
Mark Doliner <mark@kingant.net>
parents: 5920
diff changeset
109 timestamp_timeouts = NULL;
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
110 for (cnvs = gaim_get_conversations(); cnvs != NULL; cnvs = cnvs->next) {
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 c = cnvs->data;
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
112 timestamp_new_convo(c);
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 }
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
114
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
115 gaim_signal_connect(gaim_conversations_get_handle(),
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
116 "conversation-created",
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
117 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL);
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
118
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
119 return TRUE;
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
120 }
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
122 static gboolean
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
123 plugin_unload(GaimPlugin *plugin)
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 GSList *to;
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 for (to = timestamp_timeouts; to != NULL; to = to->next)
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
128 g_source_remove(GPOINTER_TO_INT(to->data));
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
129
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
130 g_slist_free(timestamp_timeouts);
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 return TRUE;
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 }
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
135 static GaimGtkPluginUiInfo ui_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 get_config_frame
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
138 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
139
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
140 static GaimPluginInfo info =
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
141 {
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
142 2, /**< api_version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
143 GAIM_PLUGIN_STANDARD, /**< type */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
144 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
145 0, /**< flags */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
146 NULL, /**< dependencies */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
147 GAIM_PRIORITY_DEFAULT, /**< priority */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
148
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
149 TIMESTAMP_PLUGIN_ID, /**< id */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
150 N_("Timestamp"), /**< name */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
151 VERSION, /**< version */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
152 /** summary */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
153 N_("Adds iChat-style timestamps to conversations every N minutes."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
154 /** description */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
155 N_("Adds iChat-style timestamps to conversations every N minutes."),
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
156 "Sean Egan <bj91704@binghamton.edu>", /**< author */
6485
70d5122bc3ff [gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents: 6371
diff changeset
157 GAIM_WEBSITE, /**< homepage */
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
158
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
159 plugin_load, /**< load */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
160 plugin_unload, /**< unload */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
161 NULL, /**< destroy */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
162
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
163 &ui_info, /**< ui_info */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
164 NULL /**< extra_info */
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
165 };
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
166
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
167 static void
5920
7d385de2f9cd [gaim-migrate @ 6360]
Christian Hammond <chipx86@chipx86.com>
parents: 5873
diff changeset
168 init_plugin(GaimPlugin *plugin)
5205
fefad67de2c7 [gaim-migrate @ 5573]
Christian Hammond <chipx86@chipx86.com>
parents: 4586
diff changeset
169 {
3598
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 }
c6f92ece3097 [gaim-migrate @ 3700]
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
171
6063
5239a3b4ab33 [gaim-migrate @ 6513]
Nathan Walp <nwalp@pidgin.im>
parents: 6050
diff changeset
172 GAIM_INIT_PLUGIN(timestamp, init_plugin, info)