only draw keyboard focus when keyboard navigation is used, like

2008-09-27  Denis Washington  <denisw@svn.gnome.org>

	* gtk/gtkiconview.c: only draw keyboard focus when keyboard navigation
	is used, like GtkTreeView. (Bug #553575)

svn path=/trunk/; revision=21534
This commit is contained in:
Denis Washington 2008-09-27 12:53:05 +00:00 committed by Denis Washington
parent 783c7932f3
commit f3b6806eda
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-09-27 Denis Washington <denisw@svn.gnome.org>
* gtk/gtkiconview.c: only draw keyboard focus when keyboard navigation
is used, like GtkTreeView. (Bug #553575)
2008-09-26 Matthias Clasen <mclasen@redhat.com>
Bug 552959 GtkTrayIcon: _NET_SYSTEM_TRAY_VISUAL and real

View File

@ -160,6 +160,8 @@ struct _GtkIconViewPrivate
gint tooltip_column;
guint draw_focus : 1;
/* Drag-and-drop. */
GdkModifierType start_button_mask;
gint pressed_button;
@ -989,6 +991,8 @@ gtk_icon_view_init (GtkIconView *icon_view)
icon_view->priv->row_spacing = 6;
icon_view->priv->column_spacing = 6;
icon_view->priv->margin = 6;
icon_view->priv->draw_focus = TRUE;
}
static void
@ -1432,7 +1436,8 @@ gtk_icon_view_expose (GtkWidget *widget,
gtk_icon_view_paint_item (icon_view, cr, item, &expose->area,
icon_view->priv->bin_window,
item->x, item->y, TRUE);
item->x, item->y,
icon_view->priv->draw_focus);
if (dest_index == item->index)
dest_item = item;
@ -2076,6 +2081,8 @@ gtk_icon_view_button_press (GtkWidget *widget,
gtk_icon_view_start_rubberbanding (icon_view, event->x, event->y);
}
/* don't draw keyboard focus around an clicked-on item */
icon_view->priv->draw_focus = FALSE;
}
if (event->button == 1 && event->type == GDK_2BUTTON_PRESS)
@ -3711,6 +3718,8 @@ gtk_icon_view_real_move_cursor (GtkIconView *icon_view,
icon_view->priv->ctrl_pressed = FALSE;
icon_view->priv->shift_pressed = FALSE;
icon_view->priv->draw_focus = TRUE;
return TRUE;
}