mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix tabbing behavior in reconcile window.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3341 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1ab2c3ff0a
commit
f429055b01
@ -485,6 +485,38 @@ gnc_reconcile_window_focus_cb(GtkWidget *widget, GdkEventFocus *event,
|
|||||||
gnc_reconcile_list_unselect_all(other_list);
|
gnc_reconcile_list_unselect_all(other_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gnc_reconcile_key_press_cb (GtkWidget *widget, GdkEventKey *event,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
RecnWindow *recnData = data;
|
||||||
|
GtkWidget *this_list, *other_list;
|
||||||
|
GtkWidget *debit, *credit;
|
||||||
|
|
||||||
|
switch (event->keyval)
|
||||||
|
{
|
||||||
|
case GDK_Tab:
|
||||||
|
case GDK_ISO_Left_Tab:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
|
||||||
|
|
||||||
|
this_list = widget;
|
||||||
|
|
||||||
|
debit = recnData->debit;
|
||||||
|
credit = recnData->credit;
|
||||||
|
|
||||||
|
other_list = (this_list == debit ? credit : debit);
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (other_list);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_reconcile_window_set_titles(RecnWindow *recnData)
|
gnc_reconcile_window_set_titles(RecnWindow *recnData)
|
||||||
{
|
{
|
||||||
@ -566,6 +598,9 @@ gnc_reconcile_window_create_list_box(Account *account,
|
|||||||
gtk_signal_connect(GTK_OBJECT(list), "focus_in_event",
|
gtk_signal_connect(GTK_OBJECT(list), "focus_in_event",
|
||||||
GTK_SIGNAL_FUNC(gnc_reconcile_window_focus_cb),
|
GTK_SIGNAL_FUNC(gnc_reconcile_window_focus_cb),
|
||||||
recnData);
|
recnData);
|
||||||
|
gtk_signal_connect(GTK_OBJECT(list), "key_press_event",
|
||||||
|
GTK_SIGNAL_FUNC(gnc_reconcile_key_press_cb),
|
||||||
|
recnData);
|
||||||
|
|
||||||
scrollWin = gtk_scrolled_window_new (NULL, NULL);
|
scrollWin = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrollWin),
|
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW (scrollWin),
|
||||||
@ -1526,6 +1561,8 @@ recnWindow (GtkWidget *parent, Account *account)
|
|||||||
|
|
||||||
gnc_window_adjust_for_screen(GTK_WINDOW(recnData->window));
|
gnc_window_adjust_for_screen(GTK_WINDOW(recnData->window));
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (recnData->debit);
|
||||||
|
|
||||||
return recnData;
|
return recnData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user