| 6795 |
6795 |
| 6796 static void |
6796 static void |
| 6797 pidgin_conversations_set_tab_colors(void) |
6797 pidgin_conversations_set_tab_colors(void) |
| 6798 { |
6798 { |
| 6799 /* Set default tab colors */ |
6799 /* Set default tab colors */ |
| 6800 GString *str = g_string_new(NULL); |
6800 GString *str; |
| 6801 GtkSettings *settings = gtk_settings_get_default(); |
6801 GtkSettings *settings; |
| 6802 GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now; |
6802 GtkStyle *parent, *now; |
| 6803 struct { |
6803 struct { |
| 6804 const char *stylename; |
6804 const char *stylename; |
| 6805 const char *labelname; |
6805 const char *labelname; |
| 6806 const char *color; |
6806 const char *color; |
| 6807 } styles[] = { |
6807 } styles[] = { |
| 6816 |
6816 |
| 6817 if(tab_color_fuse) { |
6817 if(tab_color_fuse) { |
| 6818 tab_color_fuse = FALSE; |
6818 tab_color_fuse = FALSE; |
| 6819 return; |
6819 return; |
| 6820 } |
6820 } |
| |
6821 |
| |
6822 str = g_string_new(NULL); |
| |
6823 settings = gtk_settings_get_default(); |
| |
6824 parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", |
| |
6825 NULL, G_TYPE_NONE); |
| 6821 |
6826 |
| 6822 for (iter = 0; styles[iter].stylename; iter++) { |
6827 for (iter = 0; styles[iter].stylename; iter++) { |
| 6823 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); |
6828 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); |
| 6824 if (parent == now || |
6829 if (parent == now || |
| 6825 (parent && now && parent->rc_style == now->rc_style)) { |
6830 (parent && now && parent->rc_style == now->rc_style)) { |