summaryrefslogtreecommitdiff
path: root/gtk/gtkrc.c
diff options
context:
space:
mode:
authorYevgen Muntyan <muntyan@tamu.edu>2007-06-06 19:43:31 +0000
committerYevgen Muntyan <muntyan@src.gnome.org>2007-06-06 19:43:31 +0000
commit2cbaeadf43ec960d42d35479bc0bdcb14b4741d0 (patch)
treebaf0bc50a9c124ed1b1e158116a08a010efbef32 /gtk/gtkrc.c
parentec32b2aaa3ea1c7162209e56bae950ff16def577 (diff)
downloadgtk+-2cbaeadf43ec960d42d35479bc0bdcb14b4741d0.tar.gz
new method, gtk_widget_modify_cursor() (#89314).
2007-06-06 Yevgen Muntyan <muntyan@tamu.edu> * gtk/gtkwidget.c: * gtk/gtkwidget.h: new method, gtk_widget_modify_cursor() (#89314). * gtkrc.c: * gtkrc.h: new functions _gtk_rc_style_set_rc_property() and _gtk_rc_style_unset_rc_property(). * gtk/gtk.symbols: added gtk_widget_modify_cursor. * tests/testtext.c (do_cursor_visible_changed): * tests/testgtk.c (create_styles): test it. svn path=/trunk/; revision=18066
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r--gtk/gtkrc.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c
index 5ca6017243..324b37a49b 100644
--- a/gtk/gtkrc.c
+++ b/gtk/gtkrc.c
@@ -240,6 +240,10 @@ static gint gtk_rc_properties_cmp (gconstpointer bsearch_node1,
gconstpointer bsearch_node2);
static void gtk_rc_set_free (GtkRcSet *rc_set);
+static void insert_rc_property (GtkRcStyle *style,
+ GtkRcProperty *property,
+ gboolean replace);
+
static const GScannerConfig gtk_rc_scanner_config =
{
@@ -1265,6 +1269,36 @@ gtk_rc_style_copy (GtkRcStyle *orig)
return style;
}
+void
+_gtk_rc_style_set_rc_property (GtkRcStyle *rc_style,
+ GtkRcProperty *property)
+{
+ g_return_if_fail (GTK_IS_RC_STYLE (rc_style));
+ g_return_if_fail (property != NULL);
+
+ insert_rc_property (rc_style, property, TRUE);
+}
+
+void
+_gtk_rc_style_unset_rc_property (GtkRcStyle *rc_style,
+ GQuark type_name,
+ GQuark property_name)
+{
+ GtkRcProperty *node;
+
+ g_return_if_fail (GTK_IS_RC_STYLE (rc_style));
+
+ node = _gtk_rc_style_lookup_rc_property (rc_style, type_name, property_name);
+
+ if (node != NULL)
+ {
+ guint index = node - (GtkRcProperty *) rc_style->rc_properties->data;
+ g_value_unset (&node->value);
+ g_free (node->origin);
+ g_array_remove_index (rc_style->rc_properties, index);
+ }
+}
+
void
gtk_rc_style_ref (GtkRcStyle *rc_style)
{