| 7910 |
7910 |
| 7911 { |
7911 { |
| 7912 /* Set default tab colors */ |
7912 /* Set default tab colors */ |
| 7913 GString *str = g_string_new(NULL); |
7913 GString *str = g_string_new(NULL); |
| 7914 GtkSettings *settings = gtk_settings_get_default(); |
7914 GtkSettings *settings = gtk_settings_get_default(); |
| |
7915 GtkStyle *parent = gtk_rc_get_style_by_paths(settings, "tab-container.tab-label*", NULL, G_TYPE_NONE), *now; |
| 7915 struct { |
7916 struct { |
| 7916 const char *stylename; |
7917 const char *stylename; |
| 7917 const char *labelname; |
7918 const char *labelname; |
| 7918 const char *color; |
7919 const char *color; |
| 7919 } styles[] = { |
7920 } styles[] = { |
| 7924 {"pidgin_tab_label_event_default", "tab-label-event", "#888a85"}, |
7925 {"pidgin_tab_label_event_default", "tab-label-event", "#888a85"}, |
| 7925 {NULL, NULL, NULL} |
7926 {NULL, NULL, NULL} |
| 7926 }; |
7927 }; |
| 7927 int iter; |
7928 int iter; |
| 7928 for (iter = 0; styles[iter].stylename; iter++) { |
7929 for (iter = 0; styles[iter].stylename; iter++) { |
| 7929 if (!gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE)) |
7930 now = gtk_rc_get_style_by_paths(settings, styles[iter].labelname, NULL, G_TYPE_NONE); |
| 7930 /* Apparently both ACTIVE and NORMAL are required */ |
7931 if (parent == now || |
| |
7932 (parent && now && parent->rc_style == now->rc_style)) { |
| 7931 g_string_append_printf(str, "style \"%s\" {\n" |
7933 g_string_append_printf(str, "style \"%s\" {\n" |
| 7932 "fg[ACTIVE] = \"%s\"\n" |
7934 "fg[ACTIVE] = \"%s\"\n" |
| 7933 "}\n" |
7935 "}\n" |
| 7934 "widget \"*%s\" style \"%s\"\n", |
7936 "widget \"*%s\" style \"%s\"\n", |
| 7935 styles[iter].stylename, |
7937 styles[iter].stylename, |
| 7936 styles[iter].color, |
7938 styles[iter].color, |
| 7937 styles[iter].labelname, styles[iter].stylename); |
7939 styles[iter].labelname, styles[iter].stylename); |
| |
7940 } |
| 7938 } |
7941 } |
| 7939 gtk_rc_parse_string(str->str); |
7942 gtk_rc_parse_string(str->str); |
| 7940 g_string_free(str, TRUE); |
7943 g_string_free(str, TRUE); |
| 7941 #if GTK_CHECK_VERSION(2,4,0) |
7944 #if GTK_CHECK_VERSION(2,4,0) |
| 7942 gtk_rc_reset_styles(settings); |
7945 gtk_rc_reset_styles(settings); |
| 9333 |
9336 |
| 9334 if (angle) |
9337 if (angle) |
| 9335 gtkconv->tabby = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
9338 gtkconv->tabby = gtk_vbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
| 9336 else |
9339 else |
| 9337 gtkconv->tabby = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
9340 gtkconv->tabby = gtk_hbox_new(FALSE, PIDGIN_HIG_BOX_SPACE); |
| |
9341 gtk_widget_set_name(gtkconv->tabby, "tab-container"); |
| 9338 |
9342 |
| 9339 /* select the correct ordering for verticle tabs */ |
9343 /* select the correct ordering for verticle tabs */ |
| 9340 if (angle == 90) { |
9344 if (angle == 90) { |
| 9341 first = gtkconv->close; |
9345 first = gtkconv->close; |
| 9342 third = gtkconv->icon; |
9346 third = gtkconv->icon; |