Fix Page_Up and Page_Down in the completion popup to move page-wise if

Sun Feb 29 03:31:42 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkentry.c (gtk_entry_completion_key_press): Fix Page_Up
	and Page_Down in the completion popup to move page-wise if we're
	scrolling.
This commit is contained in:
Matthias Clasen 2004-02-29 02:30:37 +00:00 committed by Matthias Clasen
parent 8a7f716aa4
commit b678b2da3c
6 changed files with 64 additions and 5 deletions

View File

@ -1,3 +1,9 @@
Sun Feb 29 03:31:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.c (gtk_entry_completion_key_press): Fix Page_Up
and Page_Down in the completion popup to move page-wise if we're
scrolling.
2004-02-28 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (set_cell_text_bold_if_folder):

View File

@ -1,3 +1,9 @@
Sun Feb 29 03:31:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.c (gtk_entry_completion_key_press): Fix Page_Up
and Page_Down in the completion popup to move page-wise if we're
scrolling.
2004-02-28 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (set_cell_text_bold_if_folder):

View File

@ -1,3 +1,9 @@
Sun Feb 29 03:31:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.c (gtk_entry_completion_key_press): Fix Page_Up
and Page_Down in the completion popup to move page-wise if we're
scrolling.
2004-02-28 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (set_cell_text_bold_if_folder):

View File

@ -1,3 +1,9 @@
Sun Feb 29 03:31:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.c (gtk_entry_completion_key_press): Fix Page_Up
and Page_Down in the completion popup to move page-wise if we're
scrolling.
2004-02-28 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (set_cell_text_bold_if_folder):

View File

@ -1,3 +1,9 @@
Sun Feb 29 03:31:42 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkentry.c (gtk_entry_completion_key_press): Fix Page_Up
and Page_Down in the completion popup to move page-wise if we're
scrolling.
2004-02-28 Federico Mena Quintero <federico@ximian.com>
* gtk/gtkfilechooserdefault.c (set_cell_text_bold_if_folder):

View File

@ -4574,10 +4574,39 @@ gtk_entry_completion_key_press (GtkWidget *widget,
completion->priv->current_selected = matches + actions - 1;
}
else if (event->keyval == GDK_Page_Up)
{
if (completion->priv->current_selected <= 0)
completion->priv->current_selected = -1;
else if (completion->priv->current_selected < matches)
{
completion->priv->current_selected -= 14;
if (completion->priv->current_selected < 0)
completion->priv->current_selected = 0;
}
else
{
completion->priv->current_selected -= 14;
if (completion->priv->current_selected < matches - 1)
completion->priv->current_selected = matches - 1;
}
}
else if (event->keyval == GDK_Page_Down)
{
if (completion->priv->current_selected < 0)
completion->priv->current_selected = 0;
else if (completion->priv->current_selected < matches - 1)
{
completion->priv->current_selected += 14;
if (completion->priv->current_selected > matches - 1)
completion->priv->current_selected = matches - 1;
}
else
{
completion->priv->current_selected += 14;
if (completion->priv->current_selected > matches + actions - 1)
completion->priv->current_selected = matches + actions - 1;
}
}
if (completion->priv->current_selected < 0)
{