summaryrefslogtreecommitdiff
path: root/gtk/gtkrc.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@gtk.org>1999-01-17 22:38:05 +0000
committerOwen Taylor <otaylor@src.gnome.org>1999-01-17 22:38:05 +0000
commit2aca4b0a80e3995bea4aa83d9d6c211b3cbf9555 (patch)
treefdc4f6ce6f6f12c51efa5420656f2d97412a841c /gtk/gtkrc.c
parent5af447fa074bbe241aca0a9fb9804e75817c98bd (diff)
downloadgdk-pixbuf-2aca4b0a80e3995bea4aa83d9d6c211b3cbf9555.tar.gz
Allow a bg_pixmap of "<none>", as there was no way to set the background
Sun Jan 17 12:01:57 1999 Owen Taylor <otaylor@gtk.org> * gtk/gtkrc.c (gtk_rc_style_init): Allow a bg_pixmap of "<none>", as there was no way to set the background on all widget but some widgets. This is important because Text widgets with background images are slow and possibly ugly.
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r--gtk/gtkrc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index 6aaa50a85..3dc13cc81 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -1120,6 +1120,14 @@ gtk_rc_style_init (GSList *rc_styles)
tmp_styles = tmp_styles->next;
}
+ for (i=0; i<5; i++)
+ if (proto_style->bg_pixmap_name[i] &&
+ (strcmp (proto_style->bg_pixmap_name[i], "<none>") == 0))
+ {
+ g_free (proto_style->bg_pixmap_name[i]);
+ proto_style->bg_pixmap_name[i] = NULL;
+ }
+
style = gtk_rc_style_to_style (proto_style);
g_hash_table_insert (realized_style_ht, rc_styles, style);
@@ -1467,7 +1475,8 @@ gtk_rc_parse_bg_pixmap (GScanner *scanner,
if (token != G_TOKEN_STRING)
return G_TOKEN_STRING;
- if (strcmp (scanner->value.v_string, "<parent>") == 0)
+ if ((strcmp (scanner->value.v_string, "<parent>") == 0) ||
+ (strcmp (scanner->value.v_string, "<none>") == 0))
pixmap_file = g_strdup (scanner->value.v_string);
else
pixmap_file = gtk_rc_find_pixmap_in_path (scanner, scanner->value.v_string);