pidgin/gtkconv.c

changeset 39277
68c17ba18f33
parent 39274
7acdb1d9797c
child 39278
4ada2c1d4c50
equal deleted inserted replaced
39276:89f307c3aa27 39277:68c17ba18f33
8874 8874
8875 for (iter = 0; styles[iter].stylename; iter++) { 8875 for (iter = 0; styles[iter].stylename; iter++) {
8876 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); 8876 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE);
8877 if (parent == now || 8877 if (parent == now ||
8878 (parent && now && parent->rc_style == now->rc_style)) { 8878 (parent && now && parent->rc_style == now->rc_style)) {
8879 GdkColor color; 8879 GdkRGBA color;
8880 gdk_color_parse(styles[iter].color, &color); 8880 gchar *color_str;
8881
8882 gdk_rgba_parse(&color, styles[iter].color);
8881 pidgin_style_adjust_contrast(gtk_widget_get_default_style(), &color); 8883 pidgin_style_adjust_contrast(gtk_widget_get_default_style(), &color);
8882 8884
8885 color_str = gdk_rgba_to_string(&color);
8883 g_string_append_printf(str, "style \"%s\" {\n" 8886 g_string_append_printf(str, "style \"%s\" {\n"
8884 "fg[ACTIVE] = \"%s\"\n" 8887 "fg[ACTIVE] = \"%s\"\n"
8885 "}\n" 8888 "}\n"
8886 "widget \"*%s\" style \"%s\"\n", 8889 "widget \"*%s\" style \"%s\"\n",
8887 styles[iter].stylename, 8890 styles[iter].stylename,
8888 gdk_color_to_string(&color), 8891 color_str,
8889 styles[iter].labelname, styles[iter].stylename); 8892 styles[iter].labelname, styles[iter].stylename);
8893 g_free(color_str);
8890 } 8894 }
8891 } 8895 }
8892 gtk_rc_parse_string(str->str); 8896 gtk_rc_parse_string(str->str);
8893 g_string_free(str, TRUE); 8897 g_string_free(str, TRUE);
8894 gtk_rc_reset_styles(settings); 8898 gtk_rc_reset_styles(settings);

mercurial