mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-06-26 Dave Peticolas <dave@krondo.com>
* src/register/gnome/gnucash-sheet.c (gnucash_sheet_key_press_event): allow shift-pgup and shift-pgdn to go to top & bottom of register respectively. * src/register/gnome/datecell-gnome.c (DateDirect): allow '-' hotkey to work if there is a full date there, or the cell is blank. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4809 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
7b7cb97c79
commit
e5e161fa7e
@ -1,5 +1,13 @@
|
|||||||
2001-06-26 Dave Peticolas <dave@krondo.com>
|
2001-06-26 Dave Peticolas <dave@krondo.com>
|
||||||
|
|
||||||
|
* src/register/gnome/gnucash-sheet.c
|
||||||
|
(gnucash_sheet_key_press_event): allow shift-pgup and shift-pgdn
|
||||||
|
to go to top & bottom of register respectively.
|
||||||
|
|
||||||
|
* src/register/gnome/datecell-gnome.c (DateDirect): allow '-'
|
||||||
|
hotkey to work if there is a full date there, or the cell is
|
||||||
|
blank.
|
||||||
|
|
||||||
* src/gnome/gnc-html.c: don't handle keypresses, let the gtkhtml
|
* src/gnome/gnc-html.c: don't handle keypresses, let the gtkhtml
|
||||||
object do it.
|
object do it.
|
||||||
|
|
||||||
|
@ -590,8 +590,22 @@ DateDirect (BasicCell *bcell,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GDK_minus:
|
case GDK_minus:
|
||||||
if (dateSeparator () == '-')
|
if ((bcell->value_len != 0) && (dateSeparator () == '-'))
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
int count;
|
||||||
|
|
||||||
|
/* rough check for existing date */
|
||||||
|
for (i = count = 0; i < bcell->value_len; i++)
|
||||||
|
{
|
||||||
|
if (bcell->value_w[i] == '-')
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count < 2)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case GDK_KP_Subtract:
|
case GDK_KP_Subtract:
|
||||||
case GDK_underscore:
|
case GDK_underscore:
|
||||||
|
@ -1591,17 +1591,28 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
|
|||||||
case GDK_Page_Up:
|
case GDK_Page_Up:
|
||||||
direction = GNC_TABLE_TRAVERSE_UP;
|
direction = GNC_TABLE_TRAVERSE_UP;
|
||||||
new_virt_loc.phys_col_offset = 0;
|
new_virt_loc.phys_col_offset = 0;
|
||||||
|
if (event->state & GDK_SHIFT_MASK)
|
||||||
|
new_virt_loc.vcell_loc.virt_row = 1;
|
||||||
|
else
|
||||||
|
{
|
||||||
distance = sheet->num_visible_phys_rows - 1;
|
distance = sheet->num_visible_phys_rows - 1;
|
||||||
gnc_table_move_vertical_position (table, &new_virt_loc,
|
gnc_table_move_vertical_position
|
||||||
-distance);
|
(table, &new_virt_loc, -distance);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GDK_KP_Page_Down:
|
case GDK_KP_Page_Down:
|
||||||
case GDK_Page_Down:
|
case GDK_Page_Down:
|
||||||
direction = GNC_TABLE_TRAVERSE_DOWN;
|
direction = GNC_TABLE_TRAVERSE_DOWN;
|
||||||
new_virt_loc.phys_col_offset = 0;
|
new_virt_loc.phys_col_offset = 0;
|
||||||
|
if (event->state & GDK_SHIFT_MASK)
|
||||||
|
new_virt_loc.vcell_loc.virt_row =
|
||||||
|
sheet->num_virt_rows - 1;
|
||||||
|
else
|
||||||
|
{
|
||||||
distance = sheet->num_visible_phys_rows - 1;
|
distance = sheet->num_visible_phys_rows - 1;
|
||||||
gnc_table_move_vertical_position (table, &new_virt_loc,
|
gnc_table_move_vertical_position
|
||||||
distance);
|
(table, &new_virt_loc, distance);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GDK_KP_Up:
|
case GDK_KP_Up:
|
||||||
case GDK_Up:
|
case GDK_Up:
|
||||||
|
Loading…
Reference in New Issue
Block a user