mirror of https://github.com/GNOME/gimp.git
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.
This commit is contained in:
parent
95e014f514
commit
047a01e24f
|
@ -1,3 +1,9 @@
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue