| 39 static int interval = 5 * 60; |
39 static int interval = 5 * 60; |
| 40 |
40 |
| 41 static void |
41 static void |
| 42 timestamp_display(GaimConversation *conv, time_t then, time_t now) |
42 timestamp_display(GaimConversation *conv, time_t then, time_t now) |
| 43 { |
43 { |
| 44 GaimGtkConversation *gtk_conv = GAIM_GTK_CONVERSATION(conv); |
44 PidginConversation *gtk_conv = PIDGIN_CONVERSATION(conv); |
| 45 GtkWidget *imhtml = gtk_conv->imhtml; |
45 GtkWidget *imhtml = gtk_conv->imhtml; |
| 46 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)); |
46 GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(imhtml)); |
| 47 GtkTextIter iter; |
47 GtkTextIter iter; |
| 48 const char *mdate; |
48 const char *mdate; |
| 49 int y, height; |
49 int y, height; |
| 131 GtkWidget *spinner; |
131 GtkWidget *spinner; |
| 132 |
132 |
| 133 ret = gtk_vbox_new(FALSE, 18); |
133 ret = gtk_vbox_new(FALSE, 18); |
| 134 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
134 gtk_container_set_border_width (GTK_CONTAINER (ret), 12); |
| 135 |
135 |
| 136 frame = gaim_gtk_make_frame(ret, _("Display Timestamps Every")); |
136 frame = pidgin_make_frame(ret, _("Display Timestamps Every")); |
| 137 vbox = gtk_vbox_new(FALSE, 5); |
137 vbox = gtk_vbox_new(FALSE, 5); |
| 138 gtk_container_add(GTK_CONTAINER(frame), vbox); |
138 gtk_container_add(GTK_CONTAINER(frame), vbox); |
| 139 |
139 |
| 140 hbox = gtk_hbox_new(FALSE, 5); |
140 hbox = gtk_hbox_new(FALSE, 5); |
| 141 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
141 gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 5); |
| 155 |
155 |
| 156 static gboolean |
156 static gboolean |
| 157 plugin_load(GaimPlugin *plugin) |
157 plugin_load(GaimPlugin *plugin) |
| 158 { |
158 { |
| 159 void *conv_handle = gaim_conversations_get_handle(); |
159 void *conv_handle = gaim_conversations_get_handle(); |
| 160 void *gtkconv_handle = gaim_gtk_conversations_get_handle(); |
160 void *gtkconv_handle = pidgin_conversations_get_handle(); |
| 161 |
161 |
| 162 /* lower priority to display initial timestamp after logged messages */ |
162 /* lower priority to display initial timestamp after logged messages */ |
| 163 gaim_signal_connect_priority(conv_handle, "conversation-created", |
163 gaim_signal_connect_priority(conv_handle, "conversation-created", |
| 164 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL, |
164 plugin, GAIM_CALLBACK(timestamp_new_convo), NULL, |
| 165 GAIM_SIGNAL_PRIORITY_DEFAULT + 1); |
165 GAIM_SIGNAL_PRIORITY_DEFAULT + 1); |
| 184 { |
184 { |
| 185 GAIM_PLUGIN_MAGIC, |
185 GAIM_PLUGIN_MAGIC, |
| 186 GAIM_MAJOR_VERSION, |
186 GAIM_MAJOR_VERSION, |
| 187 GAIM_MINOR_VERSION, |
187 GAIM_MINOR_VERSION, |
| 188 GAIM_PLUGIN_STANDARD, /**< type */ |
188 GAIM_PLUGIN_STANDARD, /**< type */ |
| 189 GAIM_GTK_PLUGIN_TYPE, /**< ui_requirement */ |
189 PIDGIN_PLUGIN_TYPE, /**< ui_requirement */ |
| 190 0, /**< flags */ |
190 0, /**< flags */ |
| 191 NULL, /**< dependencies */ |
191 NULL, /**< dependencies */ |
| 192 GAIM_PRIORITY_DEFAULT, /**< priority */ |
192 GAIM_PRIORITY_DEFAULT, /**< priority */ |
| 193 |
193 |
| 194 TIMESTAMP_PLUGIN_ID, /**< id */ |
194 TIMESTAMP_PLUGIN_ID, /**< id */ |