| 195 static void generate_send_to_items(PidginWindow *win); |
195 static void generate_send_to_items(PidginWindow *win); |
| 196 |
196 |
| 197 /* Prototypes. <-- because Paco-Paco hates this comment. */ |
197 /* Prototypes. <-- because Paco-Paco hates this comment. */ |
| 198 static void load_conv_theme(PidginConversation *gtkconv); |
198 static void load_conv_theme(PidginConversation *gtkconv); |
| 199 static gboolean infopane_entry_activate(PidginConversation *gtkconv); |
199 static gboolean infopane_entry_activate(PidginConversation *gtkconv); |
| |
200 #if 0 |
| 200 static void got_typing_keypress(PidginConversation *gtkconv, gboolean first); |
201 static void got_typing_keypress(PidginConversation *gtkconv, gboolean first); |
| |
202 #endif |
| 201 static void gray_stuff_out(PidginConversation *gtkconv); |
203 static void gray_stuff_out(PidginConversation *gtkconv); |
| 202 static void add_chat_buddy_common(PurpleConversation *conv, PurpleConvChatBuddy *cb, const char *old_name); |
204 static void add_chat_buddy_common(PurpleConversation *conv, PurpleConvChatBuddy *cb, const char *old_name); |
| 203 static gboolean tab_complete(PurpleConversation *conv); |
205 static gboolean tab_complete(PurpleConversation *conv); |
| 204 static void pidgin_conv_updated(PurpleConversation *conv, PurpleConvUpdateType type); |
206 static void pidgin_conv_updated(PurpleConversation *conv, PurpleConvUpdateType type); |
| 205 static void conv_set_unseen(PurpleConversation *gtkconv, PidginUnseenState state); |
207 static void conv_set_unseen(PurpleConversation *gtkconv, PidginUnseenState state); |
| 2437 |
2439 |
| 2438 conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name); |
2440 conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name); |
| 2439 pidgin_conv_switch_active_conversation(conv); |
2441 pidgin_conv_switch_active_conversation(conv); |
| 2440 } |
2442 } |
| 2441 |
2443 |
| |
2444 #if 0 |
| 2442 static void |
2445 static void |
| 2443 insert_text_cb(GtkTextBuffer *textbuffer, GtkTextIter *position, |
2446 insert_text_cb(GtkTextBuffer *textbuffer, GtkTextIter *position, |
| 2444 gchar *new_text, gint new_text_length, gpointer user_data) |
2447 gchar *new_text, gint new_text_length, gpointer user_data) |
| 2445 { |
2448 { |
| 2446 PidginConversation *gtkconv = (PidginConversation *)user_data; |
2449 PidginConversation *gtkconv = (PidginConversation *)user_data; |
| 2483 else { |
2486 else { |
| 2484 /* We're deleting, but not all of it, so it counts as typing. */ |
2487 /* We're deleting, but not all of it, so it counts as typing. */ |
| 2485 got_typing_keypress(gtkconv, FALSE); |
2488 got_typing_keypress(gtkconv, FALSE); |
| 2486 } |
2489 } |
| 2487 } |
2490 } |
| |
2491 #endif |
| 2488 |
2492 |
| 2489 /************************************************************************** |
2493 /************************************************************************** |
| 2490 * A bunch of buddy icon functions |
2494 * A bunch of buddy icon functions |
| 2491 **************************************************************************/ |
2495 **************************************************************************/ |
| 2492 |
2496 |
| 3736 |
3740 |
| 3737 /************************************************************************** |
3741 /************************************************************************** |
| 3738 * Utility functions |
3742 * Utility functions |
| 3739 **************************************************************************/ |
3743 **************************************************************************/ |
| 3740 |
3744 |
| |
3745 #if 0 |
| 3741 static void |
3746 static void |
| 3742 got_typing_keypress(PidginConversation *gtkconv, gboolean first) |
3747 got_typing_keypress(PidginConversation *gtkconv, gboolean first) |
| 3743 { |
3748 { |
| 3744 PurpleConversation *conv = gtkconv->active_conv; |
3749 PurpleConversation *conv = gtkconv->active_conv; |
| 3745 PurpleConvIm *im; |
3750 PurpleConvIm *im; |
| 3764 PURPLE_TYPING); |
3769 PURPLE_TYPING); |
| 3765 purple_conv_im_set_type_again(im, timeout); |
3770 purple_conv_im_set_type_again(im, timeout); |
| 3766 } |
3771 } |
| 3767 } |
3772 } |
| 3768 |
3773 |
| 3769 #if 0 |
|
| 3770 static gboolean |
3774 static gboolean |
| 3771 typing_animation(gpointer data) { |
3775 typing_animation(gpointer data) { |
| 3772 PidginConversation *gtkconv = data; |
3776 PidginConversation *gtkconv = data; |
| 3773 PidginWindow *gtkwin = gtkconv->win; |
3777 PidginWindow *gtkwin = gtkconv->win; |
| 3774 const char *stock_id = NULL; |
3778 const char *stock_id = NULL; |
| 5265 static void |
5271 static void |
| 5266 set_theme_webkit_settings(WebKitWebView *webview, PidginConvTheme *theme) |
5272 set_theme_webkit_settings(WebKitWebView *webview, PidginConvTheme *theme) |
| 5267 { |
5273 { |
| 5268 WebKitWebSettings *settings; |
5274 WebKitWebSettings *settings; |
| 5269 const GValue *val; |
5275 const GValue *val; |
| 5270 |
5276 |
| 5271 g_object_get(G_OBJECT(webview), "settings", &settings, NULL); |
5277 g_object_get(G_OBJECT(webview), "settings", &settings, NULL); |
| 5272 |
5278 |
| 5273 val = pidgin_conversation_theme_lookup(theme, "DefaultFontFamily", TRUE); |
5279 val = pidgin_conversation_theme_lookup(theme, "DefaultFontFamily", TRUE); |
| 5274 if (val && G_VALUE_HOLDS_STRING(val)) |
5280 if (val && G_VALUE_HOLDS_STRING(val)) |
| 5275 g_object_set(G_OBJECT(settings), "default-font-family", g_value_get_string(val), NULL); |
5281 { |
| |
5282 const gchar *font_family = g_value_get_string(val); |
| |
5283 #ifdef _WIN32 |
| |
5284 /* XXX: a hack for not converting backslash to yen sign. |
| |
5285 * See gtkwebview.c: gtk_webview_new. |
| |
5286 */ |
| |
5287 if (g_ascii_strcasecmp(font_family, "sans-serif") == 0) |
| |
5288 font_family = NULL; |
| |
5289 #endif |
| |
5290 if (font_family) |
| |
5291 g_object_set(G_OBJECT(settings), "default-font-family", font_family, NULL); |
| |
5292 } |
| 5276 |
5293 |
| 5277 val = pidgin_conversation_theme_lookup(theme, "DefaultFontSize", TRUE); |
5294 val = pidgin_conversation_theme_lookup(theme, "DefaultFontSize", TRUE); |
| 5278 if (val && G_VALUE_HOLDS_INT(val)) |
5295 if (val && G_VALUE_HOLDS_INT(val)) |
| 5279 g_object_set(G_OBJECT(settings), "default-font-size", GINT_TO_POINTER(g_value_get_int(val)), NULL); |
5296 g_object_set(G_OBJECT(settings), "default-font-size", GINT_TO_POINTER(g_value_get_int(val)), NULL); |
| 5280 |
5297 |
| 6444 if (plugin_return) |
6461 if (plugin_return) |
| 6445 { |
6462 { |
| 6446 g_free(displaying); |
6463 g_free(displaying); |
| 6447 return; |
6464 return; |
| 6448 } |
6465 } |
| |
6466 #if 0 |
| 6449 length = strlen(displaying) + 1; |
6467 length = strlen(displaying) + 1; |
| |
6468 #endif |
| 6450 |
6469 |
| 6451 old_flags = gtkconv->last_flags; |
6470 old_flags = gtkconv->last_flags; |
| 6452 if ((flags & PURPLE_MESSAGE_SEND) && (old_flags & PURPLE_MESSAGE_SEND)) { |
6471 if ((flags & PURPLE_MESSAGE_SEND) && (old_flags & PURPLE_MESSAGE_SEND)) { |
| 6453 message_html = pidgin_conversation_theme_get_template(gtkconv->theme, |
6472 message_html = pidgin_conversation_theme_get_template(gtkconv->theme, |
| 6454 PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_NEXT_CONTENT); |
6473 PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_NEXT_CONTENT); |