Commit eb92e078 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Set background upon state changes. (#301651, Billy Biggs)

2005-04-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_state_changed): Set
	background upon state changes.  (#301651, Billy Biggs)
parent b75a8a15
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_state_changed): Set
background upon state changes. (#301651, Billy Biggs)
* configure.in: Check for nm.
* gtk/Makefile.am: Use $(NM), not nm directly. (#301299,
......
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_state_changed): Set
background upon state changes. (#301651, Billy Biggs)
* configure.in: Check for nm.
* gtk/Makefile.am: Use $(NM), not nm directly. (#301299,
......
2005-04-29 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeview.c (gtk_tree_view_state_changed): Set
background upon state changes. (#301651, Billy Biggs)
* configure.in: Check for nm.
* gtk/Makefile.am: Use $(NM), not nm directly. (#301299,
......
......@@ -193,6 +193,8 @@ static void gtk_tree_view_style_set (GtkWidget *widget,
GtkStyle *previous_style);
static void gtk_tree_view_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static void gtk_tree_view_state_changed (GtkWidget *widget,
GtkStateType previous_state);
/* container signals */
static void gtk_tree_view_remove (GtkContainer *container,
......@@ -535,6 +537,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
widget_class->grab_focus = gtk_tree_view_grab_focus;
widget_class->style_set = gtk_tree_view_style_set;
widget_class->grab_notify = gtk_tree_view_grab_notify;
widget_class->state_changed = gtk_tree_view_state_changed;
/* GtkContainer signals */
container_class->remove = gtk_tree_view_remove;
......@@ -13060,5 +13063,20 @@ gtk_tree_view_grab_notify (GtkWidget *widget,
tree_view->priv->pressed_button = -1;
}
static void
gtk_tree_view_state_changed (GtkWidget *widget,
GtkStateType previous_state)
{
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
if (GTK_WIDGET_REALIZED (widget))
{
gdk_window_set_background (widget->window, &widget->style->base[widget->state]);
gdk_window_set_background (tree_view->priv->bin_window, &widget->style->base[widget->state]);
}
gtk_widget_queue_draw (widget);
}
#define __GTK_TREE_VIEW_C__
#include "gtkaliasdef.c"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment