| 8171 |
8171 |
| 8172 static void |
8172 static void |
| 8173 pidgin_conversations_set_tab_colors(void) |
8173 pidgin_conversations_set_tab_colors(void) |
| 8174 { |
8174 { |
| 8175 /* Set default tab colors */ |
8175 /* Set default tab colors */ |
| 8176 GString *str = g_string_new(NULL); |
8176 GString *str; |
| 8177 GtkSettings *settings = gtk_settings_get_default(); |
8177 GtkSettings *settings = gtk_settings_get_default(); |
| 8178 GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now; |
8178 GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now; |
| 8179 struct { |
8179 struct { |
| 8180 const char *stylename; |
8180 const char *stylename; |
| 8181 const char *labelname; |
8181 const char *labelname; |
| 8190 }; |
8190 }; |
| 8191 int iter; |
8191 int iter; |
| 8192 |
8192 |
| 8193 if(tab_color_fuse) { |
8193 if(tab_color_fuse) { |
| 8194 tab_color_fuse = FALSE; |
8194 tab_color_fuse = FALSE; |
| 8195 g_string_free(str, FALSE); |
|
| 8196 return; |
8195 return; |
| 8197 } |
8196 } |
| |
8197 |
| |
8198 str = g_string_new(NULL); |
| 8198 |
8199 |
| 8199 for (iter = 0; styles[iter].stylename; iter++) { |
8200 for (iter = 0; styles[iter].stylename; iter++) { |
| 8200 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); |
8201 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); |
| 8201 if (parent == now || |
8202 if (parent == now || |
| 8202 (parent && now && parent->rc_style == now->rc_style)) { |
8203 (parent && now && parent->rc_style == now->rc_style)) { |