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>
|
2001-06-03 Christian Stimming <stimming@tuhh.de>
|
||||||
|
|
||||||
* po/de.po: Massive update of the German translation according to
|
* po/de.po: Massive update of the German translation according to
|
||||||
|
@ -4449,7 +4449,7 @@ xaccSRConfirmHandler (VirtualLocation virt_loc,
|
|||||||
Split *split;
|
Split *split;
|
||||||
char recn;
|
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. */
|
* This happens in LedgerMoveCursor. */
|
||||||
if (info->change_confirmed)
|
if (info->change_confirmed)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -1119,8 +1119,32 @@ static void
|
|||||||
item_edit_popup_toggled (GtkToggleButton *button, gpointer data)
|
item_edit_popup_toggled (GtkToggleButton *button, gpointer data)
|
||||||
{
|
{
|
||||||
ItemEdit *item_edit = ITEM_EDIT (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)
|
if (!item_edit->show_popup)
|
||||||
item_edit_hide_popup (item_edit);
|
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_set (item_edit->popup_toggle.arrow,
|
||||||
GTK_ARROW_DOWN, GTK_SHADOW_IN);
|
GTK_ARROW_DOWN, GTK_SHADOW_IN);
|
||||||
|
|
||||||
gtk_widget_grab_focus (GTK_WIDGET (item_edit->sheet));
|
|
||||||
|
|
||||||
gtk_toggle_button_set_active
|
gtk_toggle_button_set_active
|
||||||
(item_edit->popup_toggle.toggle_button, FALSE);
|
(item_edit->popup_toggle.toggle_button, FALSE);
|
||||||
|
|
||||||
|
gtk_widget_grab_focus (GTK_WIDGET (item_edit->sheet));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1617,7 +1617,9 @@ gnucash_sheet_key_press_event (GtkWidget *widget, GdkEventKey *event)
|
|||||||
|
|
||||||
item_edit = ITEM_EDIT (sheet->item_editor);
|
item_edit = ITEM_EDIT (sheet->item_editor);
|
||||||
|
|
||||||
item_edit_show_popup (item_edit);
|
if (gnc_table_confirm_change (table,
|
||||||
|
cur_virt_loc))
|
||||||
|
item_edit_show_popup (item_edit);
|
||||||
|
|
||||||
return TRUE;
|
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.
|
/* returned result should not be touched by the caller.
|
||||||
* NULL return value means the edit was rejected. */
|
* NULL return value means the edit was rejected. */
|
||||||
const char *
|
const char *
|
||||||
|
@ -421,7 +421,9 @@ gboolean gnc_table_enter_update(Table *table,
|
|||||||
int *start_selection,
|
int *start_selection,
|
||||||
int *end_selection);
|
int *end_selection);
|
||||||
|
|
||||||
void gnc_table_leave_update(Table *table, VirtualLocation virt_loc);
|
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,
|
const char * gnc_table_modify_update(Table *table,
|
||||||
VirtualLocation virt_loc,
|
VirtualLocation virt_loc,
|
||||||
|
Loading…
Reference in New Issue
Block a user