Mercurial > pidgin.yaz
comparison pidgin/plugins/timestamp.c @ 15501:d75099d2567e
gaim_gtk to pidgin. I hope
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 03 Feb 2007 07:23:11 +0000 |
parents | 5fe8042783c1 |
children | 32c366eeeb99 |
comparison
equal
deleted
inserted
replaced
15500:45ecefd0ce3a | 15501:d75099d2567e |
---|---|
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; |
92 } | 92 } |
93 | 93 |
94 static void | 94 static void |
95 timestamp_new_convo(GaimConversation *conv) | 95 timestamp_new_convo(GaimConversation *conv) |
96 { | 96 { |
97 GaimGtkConversation *gtk_conv = GAIM_GTK_CONVERSATION(conv); | 97 PidginConversation *gtk_conv = PIDGIN_CONVERSATION(conv); |
98 GtkTextBuffer *buffer; | 98 GtkTextBuffer *buffer; |
99 | 99 |
100 if (!g_list_find(gaim_get_conversations(), conv)) | 100 if (!g_list_find(gaim_get_conversations(), conv)) |
101 return; | 101 return; |
102 | 102 |
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); |
172 interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval") / 1000; | 172 interval = gaim_prefs_get_int("/plugins/gtk/timestamp/interval") / 1000; |
173 | 173 |
174 return TRUE; | 174 return TRUE; |
175 } | 175 } |
176 | 176 |
177 static GaimGtkPluginUiInfo ui_info = | 177 static PidginPluginUiInfo ui_info = |
178 { | 178 { |
179 get_config_frame, | 179 get_config_frame, |
180 0 /* page_num (Reserved) */ | 180 0 /* page_num (Reserved) */ |
181 }; | 181 }; |
182 | 182 |
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 */ |