mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-06-04 Dave Peticolas <dave@krondo.com>
* src/SplitLedger.c: fix spelling errors * src/register/gnome/gnucash-item-edit.c: same as below * src/register/gnome/gnucash-sheet.c: check change confirmation before popping up combo list. * src/register/table-allgui.c (gnc_table_confirm_change): new func git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4408 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e65fbd1dee
commit
fad634bfb6
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2001-06-04 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/SplitLedger.c: fix spelling errors
|
||||
|
||||
* src/register/gnome/gnucash-item-edit.c: same as below
|
||||
|
||||
* src/register/gnome/gnucash-sheet.c: check change confirmation
|
||||
before popping up combo list.
|
||||
|
||||
* src/register/table-allgui.c (gnc_table_confirm_change): new func
|
||||
|
||||
2001-06-03 Christian Stimming <stimming@tuhh.de>
|
||||
|
||||
* po/de.po: Massive update of the German translation according to
|
||||
|
@ -4449,7 +4449,7 @@ xaccSRConfirmHandler (VirtualLocation virt_loc,
|
||||
Split *split;
|
||||
char recn;
|
||||
|
||||
/* This assumes we reset the flag whenver we change splits.
|
||||
/* This assumes we reset the flag whenever we change splits.
|
||||
* This happens in LedgerMoveCursor. */
|
||||
if (info->change_confirmed)
|
||||
return TRUE;
|
||||
|
@ -1119,8 +1119,32 @@ static void
|
||||
item_edit_popup_toggled (GtkToggleButton *button, gpointer data)
|
||||
{
|
||||
ItemEdit *item_edit = ITEM_EDIT (data);
|
||||
gboolean show_popup;
|
||||
|
||||
item_edit->show_popup = gtk_toggle_button_get_active (button);
|
||||
show_popup = gtk_toggle_button_get_active (button);
|
||||
if (show_popup)
|
||||
{
|
||||
Table *table;
|
||||
VirtualLocation virt_loc;
|
||||
|
||||
table = item_edit->sheet->table;
|
||||
virt_loc = table->current_cursor_loc;
|
||||
|
||||
if (!gnc_table_confirm_change (table, virt_loc))
|
||||
{
|
||||
gtk_signal_handler_block_by_data
|
||||
(GTK_OBJECT (button), data);
|
||||
|
||||
gtk_toggle_button_set_active (button, FALSE);
|
||||
|
||||
gtk_signal_handler_unblock_by_data
|
||||
(GTK_OBJECT (button), data);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
item_edit->show_popup = show_popup;
|
||||
|
||||
if (!item_edit->show_popup)
|
||||
item_edit_hide_popup (item_edit);
|
||||
@ -1499,10 +1523,10 @@ item_edit_hide_popup (ItemEdit *item_edit)
|
||||
gtk_arrow_set (item_edit->popup_toggle.arrow,
|
||||
GTK_ARROW_DOWN, GTK_SHADOW_IN);
|
||||
|
||||
gtk_widget_grab_focus (GTK_WIDGET (item_edit->sheet));
|
||||
|
||||
gtk_toggle_button_set_active
|
||||
(item_edit->popup_toggle.toggle_button, FALSE);
|
||||
|
||||
gtk_widget_grab_focus (GTK_WIDGET (item_edit->sheet));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1617,6 +1617,8 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
|
||||
|
||||
item_edit = ITEM_EDIT (sheet->item_editor);
|
||||
|
||||
if (gnc_table_confirm_change (table,
|
||||
cur_virt_loc))
|
||||
item_edit_show_popup (item_edit);
|
||||
|
||||
return TRUE;
|
||||
|
@ -953,6 +953,21 @@ gnc_table_leave_update(Table *table, VirtualLocation virt_loc)
|
||||
|
||||
/* ==================================================== */
|
||||
|
||||
gboolean
|
||||
gnc_table_confirm_change (Table *table, VirtualLocation virt_loc)
|
||||
{
|
||||
if (!table)
|
||||
return TRUE;
|
||||
|
||||
if (!table->view.confirm_handler)
|
||||
return TRUE;
|
||||
|
||||
return table->view.confirm_handler (virt_loc,
|
||||
table->view.handler_user_data);
|
||||
}
|
||||
|
||||
/* ==================================================== */
|
||||
|
||||
/* returned result should not be touched by the caller.
|
||||
* NULL return value means the edit was rejected. */
|
||||
const char *
|
||||
|
@ -423,6 +423,8 @@ gboolean gnc_table_enter_update(Table *table,
|
||||
|
||||
void gnc_table_leave_update(Table *table, VirtualLocation virt_loc);
|
||||
|
||||
gboolean gnc_table_confirm_change(Table *table, VirtualLocation virt_loc);
|
||||
|
||||
const char * gnc_table_modify_update(Table *table,
|
||||
VirtualLocation virt_loc,
|
||||
const GdkWChar *change,
|
||||
|
Loading…
Reference in New Issue
Block a user