Commit 047a01e2 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

when focussing the widget, select the palette's first entry if none is

2005-08-17  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimppaletteview.c (gimp_palette_view_focus): when
	focussing the widget, select the palette's first entry if none is
	selected. Enables cursor navigation after tabbing in.
parent 95e014f5
2005-08-17 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppaletteview.c (gimp_palette_view_focus): when
focussing the widget, select the palette's first entry if none is
selected. Enables cursor navigation after tabbing in.
2005-08-17 Sven Neumann <sven@gimp.org>
* plug-ins/common/deinterlace.c: fixed boundary conditions.
......
......@@ -315,10 +315,17 @@ gimp_palette_view_focus (GtkWidget *widget,
GtkDirectionType direction)
{
GimpPaletteView *view = GIMP_PALETTE_VIEW (widget);
GimpPalette *palette;
palette = GIMP_PALETTE (GIMP_VIEW (view)->renderer->viewable);
if (GTK_WIDGET_CAN_FOCUS (widget) && ! GTK_WIDGET_HAS_FOCUS (widget))
{
gtk_widget_grab_focus (widget);
if (! view->selected && palette->colors)
gimp_palette_view_select_entry (view, palette->colors->data);
return TRUE;
}
......@@ -351,12 +358,9 @@ gimp_palette_view_focus (GtkWidget *widget,
if (skip != 0)
{
GimpPalette *palette;
GimpPaletteEntry *entry;
gint position;
palette = GIMP_PALETTE (GIMP_VIEW (view)->renderer->viewable);
position = view->selected->position + skip;
entry = g_list_nth_data (palette->colors, position);
......
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