diff options
-rw-r--r-- | gtk/gtkentry.c | 27 | ||||
-rw-r--r-- | gtk/gtkinputdialog.c | 4 | ||||
-rw-r--r-- | gtk/gtklist.c | 3 | ||||
-rw-r--r-- | gtk/gtklistitem.c | 10 | ||||
-rw-r--r-- | gtk/gtkradiobutton.h | 4 | ||||
-rw-r--r-- | gtk/gtktree.c | 3 | ||||
-rw-r--r-- | gtk/gtktreeitem.c | 12 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 6 | ||||
-rw-r--r-- | gtk/testgtkrc | 3 | ||||
-rw-r--r-- | tests/testgtkrc | 3 |
10 files changed, 41 insertions, 34 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 276f779f2..67850c31c 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -344,10 +344,10 @@ gtk_entry_init (GtkEntry *entry) gtk_selection_add_handler (GTK_WIDGET(entry), GDK_SELECTION_PRIMARY, GDK_TARGET_STRING, gtk_entry_selection_handler, - NULL, NULL); + NULL); gtk_selection_add_handler (GTK_WIDGET(entry), clipboard_atom, GDK_TARGET_STRING, gtk_entry_selection_handler, - NULL, NULL); + NULL); if (!text_atom) text_atom = gdk_atom_intern ("TEXT", FALSE); @@ -355,11 +355,11 @@ gtk_entry_init (GtkEntry *entry) gtk_selection_add_handler (GTK_WIDGET(entry), GDK_SELECTION_PRIMARY, text_atom, gtk_entry_selection_handler, - NULL, NULL); + NULL); gtk_selection_add_handler (GTK_WIDGET(entry), clipboard_atom, text_atom, gtk_entry_selection_handler, - NULL, NULL); + NULL); if (!ctext_atom) ctext_atom = gdk_atom_intern ("COMPOUND_TEXT", FALSE); @@ -367,11 +367,11 @@ gtk_entry_init (GtkEntry *entry) gtk_selection_add_handler (GTK_WIDGET(entry), GDK_SELECTION_PRIMARY, ctext_atom, gtk_entry_selection_handler, - NULL, NULL); + NULL); gtk_selection_add_handler (GTK_WIDGET(entry), clipboard_atom, ctext_atom, gtk_entry_selection_handler, - NULL, NULL); + NULL); } GtkWidget* @@ -599,8 +599,8 @@ gtk_entry_realize (GtkWidget *widget) widget->style = gtk_style_attach (widget->style, widget->window); - gdk_window_set_background (widget->window, &widget->style->white); - gdk_window_set_background (entry->text_area, &widget->style->white); + gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); + gdk_window_set_background (entry->text_area, &widget->style->base[GTK_STATE_NORMAL]); #ifdef USE_XIM if (gdk_im_ready ()) @@ -664,7 +664,7 @@ gtk_entry_realize (GtkWidget *widget) } gdk_ic_set_attr (entry->ic,"preeditAttributes", "foreground", widget->style->fg[GTK_STATE_NORMAL].pixel, - "background", widget->style->white.pixel, + "background", widget->style->base[GTK_STATE_NORMAL].pixel, NULL); } } @@ -720,8 +720,9 @@ gtk_entry_draw_focus (GtkWidget *widget) } else { - gdk_draw_rectangle (widget->window, widget->style->white_gc, FALSE, - x + 2, y + 2, width - 5, height - 5); + gdk_draw_rectangle (widget->window, + widget->style->base_gc[GTK_WIDGET_STATE(widget)], + FALSE, x + 2, y + 2, width - 5, height - 5); } gtk_draw_shadow (widget->style, widget->window, @@ -1457,7 +1458,7 @@ gtk_entry_draw_text (GtkEntry *entry) gtk_entry_make_backing_pixmap (entry, width, height); drawable = entry->backing_pixmap; gdk_draw_rectangle (drawable, - widget->style->white_gc, + widget->style->base_gc[GTK_WIDGET_STATE(widget)], TRUE, 0, 0, width, @@ -1570,7 +1571,7 @@ gtk_entry_draw_cursor_on_drawable (GtkEntry *entry, GdkDrawable *drawable) (entry->selection_start_pos == entry->selection_end_pos)) gc = widget->style->fg_gc[GTK_STATE_NORMAL]; else - gc = widget->style->white_gc; + gc = widget->style->base_gc[GTK_WIDGET_STATE(widget)]; gdk_window_get_size (entry->text_area, NULL, &text_area_height); gdk_draw_line (drawable, gc, xoffset, 0, xoffset, text_area_height); diff --git a/gtk/gtkinputdialog.c b/gtk/gtkinputdialog.c index 380f82c83..44c1cec9b 100644 --- a/gtk/gtkinputdialog.c +++ b/gtk/gtkinputdialog.c @@ -529,7 +529,7 @@ gtk_input_dialog_fill_axes(GtkInputDialog *inputd, GdkDeviceInfo *info) gtk_widget_realize (inputd->axis_list); gdk_window_set_background (inputd->axis_list->window, - &inputd->axis_list->style->white); + &inputd->axis_list->style->base[GTK_STATE_NORMAL]); for (i=GDK_AXIS_X;i<GDK_AXIS_LAST;i++) { @@ -664,7 +664,7 @@ gtk_input_dialog_fill_keys(GtkInputDialog *inputd, GdkDeviceInfo *info) gtk_widget_realize (inputd->keys_list); gdk_window_set_background (inputd->keys_list->window, - &inputd->keys_list->style->white); + &inputd->keys_list->style->base[GTK_STATE_NORMAL]); for (i=0;i<info->num_keys;i++) { diff --git a/gtk/gtklist.c b/gtk/gtklist.c index d9050b2fe..81c7ffdc3 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -604,7 +604,8 @@ gtk_list_realize (GtkWidget *widget) gdk_window_set_user_data (widget->window, widget); widget->style = gtk_style_attach (widget->style, widget->window); - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, + &widget->style->base[GTK_STATE_NORMAL]); } static void diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c index 4e618f94b..cae416eb8 100644 --- a/gtk/gtklistitem.c +++ b/gtk/gtklistitem.c @@ -145,7 +145,8 @@ gtk_list_item_realize (GtkWidget *widget) if (GTK_WIDGET_CLASS (parent_class)->realize) (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, + &widget->style->base[GTK_STATE_NORMAL]); } static void @@ -222,7 +223,8 @@ gtk_list_item_draw (GtkWidget *widget, if (!GTK_WIDGET_IS_SENSITIVE (widget)) gtk_style_set_background (widget->style, widget->window, GTK_STATE_INSENSITIVE); else if (widget->state == GTK_STATE_NORMAL) - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, + &widget->style->base[GTK_STATE_NORMAL]); else gtk_style_set_background (widget->style, widget->window, widget->state); @@ -251,7 +253,7 @@ gtk_list_item_draw_focus (GtkWidget *widget) else if (!GTK_WIDGET_IS_SENSITIVE (widget)) gc = widget->style->bg_gc[GTK_STATE_INSENSITIVE]; else if (widget->state == GTK_STATE_NORMAL) - gc = widget->style->white_gc; + gc = widget->style->base_gc[GTK_STATE_NORMAL]; else gc = widget->style->bg_gc[widget->state]; @@ -294,7 +296,7 @@ gtk_list_item_expose (GtkWidget *widget, if (!GTK_WIDGET_IS_SENSITIVE (widget)) gdk_window_set_background (widget->window, &widget->style->bg[GTK_STATE_INSENSITIVE]); else if (widget->state == GTK_STATE_NORMAL) - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); else gdk_window_set_background (widget->window, &widget->style->bg[widget->state]); diff --git a/gtk/gtkradiobutton.h b/gtk/gtkradiobutton.h index bf346c27e..468e5b7eb 100644 --- a/gtk/gtkradiobutton.h +++ b/gtk/gtkradiobutton.h @@ -54,10 +54,6 @@ GtkWidget* gtk_radio_button_new (GSList *group); GtkWidget* gtk_radio_button_new_from_widget (GtkRadioButton *group); GtkWidget* gtk_radio_button_new_with_label (GSList *group, const gchar *label); -GtkWidget* gtk_radio_button_new_interp (GtkRadioButton *group); -GtkWidget* gtk_radio_button_new_with_label_interp - (GtkRadioButton *group, - const gchar *label); GSList* gtk_radio_button_group (GtkRadioButton *radio_button); diff --git a/gtk/gtktree.c b/gtk/gtktree.c index bf6daded7..8bc714558 100644 --- a/gtk/gtktree.c +++ b/gtk/gtktree.c @@ -615,7 +615,8 @@ gtk_tree_realize (GtkWidget *widget) gdk_window_set_user_data (widget->window, widget); widget->style = gtk_style_attach (widget->style, widget->window); - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, + &widget->style->base[GTK_STATE_NORMAL]); } diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c index 56fc7e3b4..05e647818 100644 --- a/gtk/gtktreeitem.c +++ b/gtk/gtktreeitem.c @@ -187,7 +187,7 @@ gtk_tree_item_subtree_button_changed_state(GtkWidget *w) if(GTK_WIDGET_VISIBLE (w)) { if (w->state == GTK_STATE_NORMAL) - gdk_window_set_background (w->window, &w->style->white); + gdk_window_set_background (w->window, &w->style->base[w->state]); else gdk_window_set_background (w->window, &w->style->bg[w->state]); @@ -410,7 +410,8 @@ gtk_tree_item_realize (GtkWidget *widget) if (GTK_WIDGET_CLASS (parent_class)->realize) (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, + &widget->style->base[GTK_STATE_NORMAL]); } static void @@ -602,7 +603,8 @@ gtk_tree_item_draw (GtkWidget *widget, widget->state == GTK_STATE_SELECTED) gtk_style_set_background (widget->style, widget->window, widget->state); else - gdk_window_set_background (widget->window, &widget->style->white); + gdk_window_set_background (widget->window, + &widget->style->base[GTK_STATE_NORMAL]); gdk_window_clear_area (widget->window, child_area.x, child_area.y, @@ -623,7 +625,7 @@ gtk_tree_item_draw (GtkWidget *widget, gtk_style_set_background (widget->style, widget->window, GTK_STATE_INSENSITIVE); else if (widget->state == GTK_STATE_NORMAL) - gdk_window_set_background(widget->window, &widget->style->white); + gdk_window_set_background(widget->window, &widget->style->base[GTK_STATE_NORMAL]); else gtk_style_set_background (widget->style, widget->window, widget->state); @@ -656,7 +658,7 @@ gtk_tree_item_draw_focus (GtkWidget *widget) else if (!GTK_WIDGET_IS_SENSITIVE (widget)) gc = widget->style->bg_gc[GTK_STATE_INSENSITIVE]; else if (widget->state == GTK_STATE_NORMAL) - gc = widget->style->white_gc; + gc = widget->style->base_gc[GTK_STATE_NORMAL]; else gc = widget->style->bg_gc[widget->state]; diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 9e8389011..6f3f26541 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -1414,7 +1414,8 @@ gtk_widget_queue_draw (GtkWidget *widget) GTK_PRIVATE_SET_FLAG (widget, GTK_REDRAW_PENDING); if (gtk_widget_redraw_queue == NULL) - gtk_idle_add ((GtkFunction) gtk_widget_idle_draw, NULL); + gtk_idle_add_priority (GTK_PRIORITY_INTERNAL, + (GtkFunction) gtk_widget_idle_draw, NULL); gtk_widget_redraw_queue = g_slist_prepend (gtk_widget_redraw_queue, widget); } @@ -1460,7 +1461,8 @@ gtk_widget_queue_resize (GtkWidget *widget) { GTK_PRIVATE_SET_FLAG (toplevel, GTK_RESIZE_PENDING); if (gtk_widget_resize_queue == NULL) - gtk_idle_add ((GtkFunction) gtk_widget_idle_sizer, NULL); + gtk_idle_add_priority (GTK_PRIORITY_INTERNAL, + (GtkFunction) gtk_widget_idle_sizer, NULL); gtk_widget_resize_queue = g_slist_prepend (gtk_widget_resize_queue, toplevel); } diff --git a/gtk/testgtkrc b/gtk/testgtkrc index 4215f9549..e57b3b0fb 100644 --- a/gtk/testgtkrc +++ b/gtk/testgtkrc @@ -13,6 +13,7 @@ pixmap_path "." style "default" { fontset = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*,*" + base[NORMAL] = { 1.0, 0.8, 0.8 } } style "window" @@ -61,7 +62,7 @@ style "curve" fg[NORMAL] = { 58000, 0, 0 } # red } -#widget_class "*" style "default" +widget_class "*" style "default" widget_class "GtkWindow" style "window" widget_class "GtkDialog" style "window" widget_class "GtkFileSelection" style "window" diff --git a/tests/testgtkrc b/tests/testgtkrc index 4215f9549..e57b3b0fb 100644 --- a/tests/testgtkrc +++ b/tests/testgtkrc @@ -13,6 +13,7 @@ pixmap_path "." style "default" { fontset = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*,*" + base[NORMAL] = { 1.0, 0.8, 0.8 } } style "window" @@ -61,7 +62,7 @@ style "curve" fg[NORMAL] = { 58000, 0, 0 } # red } -#widget_class "*" style "default" +widget_class "*" style "default" widget_class "GtkWindow" style "window" widget_class "GtkDialog" style "window" widget_class "GtkFileSelection" style "window" |