forked from AuroraMiddleware/gtk
gtk: gtk_cell_renderer_get_state(): a row can be both selected and insensitive
so pull the SELECTED state flag out of the !sensitive branch. Also, don't make FOCUSED depend on SELECTED here, it's up to the widget to decide whether or not that is possible.
This commit is contained in:
parent
1aaed01d4f
commit
1c0f85a813
@ -1703,21 +1703,21 @@ gtk_cell_renderer_get_state (GtkCellRenderer *cell,
|
||||
if ((widget && !gtk_widget_get_sensitive (widget)) ||
|
||||
(cell && !gtk_cell_renderer_get_sensitive (cell)) ||
|
||||
(cell_state & GTK_CELL_RENDERER_INSENSITIVE) != 0)
|
||||
state |= GTK_STATE_FLAG_INSENSITIVE;
|
||||
{
|
||||
state |= GTK_STATE_FLAG_INSENSITIVE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((cell_state & GTK_CELL_RENDERER_SELECTED) != 0)
|
||||
{
|
||||
state |= GTK_STATE_FLAG_SELECTED;
|
||||
|
||||
if ((widget && gtk_widget_has_focus (widget)) &&
|
||||
(cell_state & GTK_CELL_RENDERER_FOCUSED) != 0)
|
||||
state |= GTK_STATE_FLAG_FOCUSED;
|
||||
}
|
||||
if ((widget && gtk_widget_has_focus (widget)) &&
|
||||
(cell_state & GTK_CELL_RENDERER_FOCUSED) != 0)
|
||||
state |= GTK_STATE_FLAG_FOCUSED;
|
||||
|
||||
if ((cell_state & GTK_CELL_RENDERER_PRELIT) != 0)
|
||||
state |= GTK_STATE_FLAG_PRELIGHT;
|
||||
}
|
||||
|
||||
if ((cell_state & GTK_CELL_RENDERER_SELECTED) != 0)
|
||||
state |= GTK_STATE_FLAG_SELECTED;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user