pidgin: 17b597f0: This colour parsing seems unnecessary no...
qulogic at pidgin.im
qulogic at pidgin.im
Fri Jun 8 03:12:14 EDT 2012
----------------------------------------------------------------------
Revision: 17b597f0f984859ccc821eca151b1e8f2fca3211
Parent: e0265c6e231d2167af946c896ed4908cfff5f5b9
Author: qulogic at pidgin.im
Date: 06/05/12 23:39:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/17b597f0f984859ccc821eca151b1e8f2fca3211
Changelog:
This colour parsing seems unnecessary now.
Changes against parent e0265c6e231d2167af946c896ed4908cfff5f5b9
patched pidgin/gtkwebview.c
-------------- next part --------------
============================================================
--- pidgin/gtkwebview.c bbe80d3151a247e5e2ab3a3eb2ba87fc6d1f50a6
+++ pidgin/gtkwebview.c 24de934b7497fbaad4a8cf96eb0d3030553a451d
@@ -726,8 +726,6 @@ gtk_webview_setup_entry(GtkWebView *webv
GtkWebViewButtons buttons;
if (flags & PURPLE_CONNECTION_HTML) {
- char color[8];
- GdkColor fg_color, bg_color;
gboolean bold, italic, underline, strike;
buttons = GTK_WEBVIEW_ALL;
@@ -769,35 +767,16 @@ gtk_webview_setup_entry(GtkWebView *webv
gtk_webview_font_set_size(webview, size);
}
- if (strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor"), "") != 0)
- {
- gdk_color_parse(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor"),
- &fg_color);
- g_snprintf(color, sizeof(color),
- "#%02x%02x%02x",
- fg_color.red / 256,
- fg_color.green / 256,
- fg_color.blue / 256);
- } else
- strcpy(color, "");
+ gtk_webview_toggle_forecolor(webview,
+ purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/fgcolor"));
- gtk_webview_toggle_forecolor(webview, color);
+ if (!(flags & PURPLE_CONNECTION_NO_BGCOLOR)) {
+ gtk_webview_toggle_backcolor(webview,
+ purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"));
+ } else {
+ gtk_webview_toggle_backcolor(webview, "");
+ }
- if (!(flags & PURPLE_CONNECTION_NO_BGCOLOR) &&
- strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"), "") != 0)
- {
- gdk_color_parse(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/bgcolor"),
- &bg_color);
- g_snprintf(color, sizeof(color),
- "#%02x%02x%02x",
- bg_color.red / 256,
- bg_color.green / 256,
- bg_color.blue / 256);
- } else
- strcpy(color, "");
-
- gtk_webview_toggle_backcolor(webview, color);
-
if (flags & PURPLE_CONNECTION_FORMATTING_WBFO)
gtk_webview_set_whole_buffer_formatting_only(webview, TRUE);
else
More information about the Commits
mailing list