mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
More work on transaction expansion.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3254 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ceb181c26e
commit
4fbcb7f130
@ -389,7 +389,6 @@ xaccLedgerDisplayGeneral (Account *lead_account, GList *accounts,
|
|||||||
regData = (xaccLedgerDisplay *) malloc (sizeof (xaccLedgerDisplay));
|
regData = (xaccLedgerDisplay *) malloc (sizeof (xaccLedgerDisplay));
|
||||||
|
|
||||||
regData->leader = lead_account;
|
regData->leader = lead_account;
|
||||||
regData->redraw = NULL;
|
|
||||||
regData->destroy = NULL;
|
regData->destroy = NULL;
|
||||||
regData->get_parent = NULL;
|
regData->get_parent = NULL;
|
||||||
regData->set_help = NULL;
|
regData->set_help = NULL;
|
||||||
@ -473,31 +472,6 @@ xaccLedgerDisplayRefresh (xaccLedgerDisplay *regData)
|
|||||||
xaccSRLoadRegister (regData->ledger,
|
xaccSRLoadRegister (regData->ledger,
|
||||||
xaccQueryGetSplits (regData->query),
|
xaccQueryGetSplits (regData->query),
|
||||||
regData->leader);
|
regData->leader);
|
||||||
|
|
||||||
/* hack alert -- this computation of totals is incorrect
|
|
||||||
* for multi-account ledgers */
|
|
||||||
|
|
||||||
/* OK, now tell this specific GUI window to redraw itself ... */
|
|
||||||
if (regData->redraw)
|
|
||||||
(regData->redraw) (regData);
|
|
||||||
}
|
|
||||||
|
|
||||||
/********************************************************************\
|
|
||||||
* refresh all the register windows, but only with the gui callback *
|
|
||||||
\********************************************************************/
|
|
||||||
|
|
||||||
void
|
|
||||||
xaccRegisterRefreshAllGUI (void)
|
|
||||||
{
|
|
||||||
xaccLedgerDisplay *ledger_display;
|
|
||||||
GList *node;
|
|
||||||
|
|
||||||
for (node = fullList; node; node = g_list_next(node))
|
|
||||||
{
|
|
||||||
ledger_display = node->data;
|
|
||||||
if (ledger_display->redraw)
|
|
||||||
(ledger_display->redraw) (ledger_display);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
|
@ -56,7 +56,6 @@ struct _xaccLedgerDisplay
|
|||||||
SplitRegister *ledger; /* main ledger window */
|
SplitRegister *ledger; /* main ledger window */
|
||||||
gpointer gui_hook; /* GUI-specific state */
|
gpointer gui_hook; /* GUI-specific state */
|
||||||
|
|
||||||
void (*redraw) (xaccLedgerDisplay *); /* redraw callback */
|
|
||||||
void (*destroy) (xaccLedgerDisplay *); /* destroy callback */
|
void (*destroy) (xaccLedgerDisplay *); /* destroy callback */
|
||||||
gncUIWidget (*get_parent) (xaccLedgerDisplay *); /* get parent widget */
|
gncUIWidget (*get_parent) (xaccLedgerDisplay *); /* get parent widget */
|
||||||
void (*set_help) (xaccLedgerDisplay *, const char *); /* help string */
|
void (*set_help) (xaccLedgerDisplay *, const char *); /* help string */
|
||||||
@ -92,11 +91,6 @@ void xaccTransDisplayRefresh (Transaction *trans);
|
|||||||
void xaccLedgerDisplayRefresh (xaccLedgerDisplay * ledger_display);
|
void xaccLedgerDisplayRefresh (xaccLedgerDisplay * ledger_display);
|
||||||
void xaccRegisterRefresh (SplitRegister *reg);
|
void xaccRegisterRefresh (SplitRegister *reg);
|
||||||
|
|
||||||
/* Call the user refresh callback for all registers. This does not
|
|
||||||
* perform a full refresh, i.e., it does not reload transactions.
|
|
||||||
* This is just for updating gui controls. */
|
|
||||||
void xaccRegisterRefreshAllGUI (void);
|
|
||||||
|
|
||||||
/* close the window */
|
/* close the window */
|
||||||
void xaccLedgerDisplayClose (xaccLedgerDisplay * ledger_display);
|
void xaccLedgerDisplayClose (xaccLedgerDisplay * ledger_display);
|
||||||
|
|
||||||
|
@ -248,6 +248,7 @@ static void xaccSRSetTransVisible (SplitRegister *reg,
|
|||||||
VirtualCellLocation vcell_loc,
|
VirtualCellLocation vcell_loc,
|
||||||
gboolean visible,
|
gboolean visible,
|
||||||
gboolean only_blank_split);
|
gboolean only_blank_split);
|
||||||
|
static void xaccSRLoadXferCells (SplitRegister *reg, Account *base_account);
|
||||||
|
|
||||||
|
|
||||||
/** implementations *******************************************************/
|
/** implementations *******************************************************/
|
||||||
@ -787,12 +788,30 @@ xaccSRExpandCurrentTrans (SplitRegister *reg, gboolean expand)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info->trans_expanded = expand;
|
||||||
|
|
||||||
|
gnc_table_set_virt_cell_cursor (reg->table,
|
||||||
|
reg->table->current_cursor_loc.vcell_loc,
|
||||||
|
sr_get_active_cursor (reg));
|
||||||
xaccSRSetTransVisible (reg, reg->table->current_cursor_loc.vcell_loc,
|
xaccSRSetTransVisible (reg, reg->table->current_cursor_loc.vcell_loc,
|
||||||
expand, FALSE);
|
expand, FALSE);
|
||||||
|
|
||||||
gnc_table_refresh_gui (reg->table);
|
gnc_table_refresh_gui (reg->table);
|
||||||
|
}
|
||||||
|
|
||||||
info->trans_expanded = expand;
|
gboolean
|
||||||
|
xaccSRCurrentTransExpanded (SplitRegister *reg)
|
||||||
|
{
|
||||||
|
SRInfo *info = xaccSRGetInfo (reg);
|
||||||
|
|
||||||
|
if (!reg)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (reg->style == REG_STYLE_AUTO_LEDGER ||
|
||||||
|
reg->style == REG_STYLE_JOURNAL)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return info->trans_expanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================================================== */
|
/* ======================================================== */
|
||||||
@ -942,7 +961,8 @@ LedgerMoveCursor (Table *table, VirtualLocation *p_new_virt_loc)
|
|||||||
/* in the mult-line and dynamic modes, we need to hide the old
|
/* in the mult-line and dynamic modes, we need to hide the old
|
||||||
* and show the new. */
|
* and show the new. */
|
||||||
if (((REG_STYLE_AUTO_LEDGER == reg->style) ||
|
if (((REG_STYLE_AUTO_LEDGER == reg->style) ||
|
||||||
(REG_STYLE_JOURNAL == reg->style)) &&
|
(REG_STYLE_JOURNAL == reg->style) ||
|
||||||
|
info->trans_expanded) &&
|
||||||
(old_trans_split != new_trans_split))
|
(old_trans_split != new_trans_split))
|
||||||
{
|
{
|
||||||
VirtualCellLocation vc_loc;
|
VirtualCellLocation vc_loc;
|
||||||
@ -953,11 +973,17 @@ LedgerMoveCursor (Table *table, VirtualLocation *p_new_virt_loc)
|
|||||||
xaccSRSetTransVisible (reg, vc_loc, FALSE,
|
xaccSRSetTransVisible (reg, vc_loc, FALSE,
|
||||||
reg->style == REG_STYLE_JOURNAL);
|
reg->style == REG_STYLE_JOURNAL);
|
||||||
|
|
||||||
xaccSRGetTransSplit (reg, new_virt_loc.vcell_loc, &vc_loc);
|
if ((REG_STYLE_AUTO_LEDGER == reg->style) ||
|
||||||
gnc_table_set_virt_cell_cursor (table, vc_loc,
|
(REG_STYLE_JOURNAL == reg->style))
|
||||||
sr_get_active_cursor (reg));
|
{
|
||||||
xaccSRSetTransVisible (reg, vc_loc, TRUE,
|
xaccSRGetTransSplit (reg, new_virt_loc.vcell_loc, &vc_loc);
|
||||||
reg->style == REG_STYLE_JOURNAL);
|
gnc_table_set_virt_cell_cursor (table, vc_loc,
|
||||||
|
sr_get_active_cursor (reg));
|
||||||
|
xaccSRSetTransVisible (reg, vc_loc, TRUE,
|
||||||
|
reg->style == REG_STYLE_JOURNAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
info->trans_expanded = FALSE;
|
||||||
|
|
||||||
do_refresh = TRUE;
|
do_refresh = TRUE;
|
||||||
}
|
}
|
||||||
@ -4237,6 +4263,8 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist,
|
|||||||
table->user_data = reg;
|
table->user_data = reg;
|
||||||
|
|
||||||
reg->destroy = LedgerDestroy;
|
reg->destroy = LedgerDestroy;
|
||||||
|
|
||||||
|
xaccSRLoadXferCells (reg, default_source_acc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================================================== */
|
/* ======================================================== */
|
||||||
@ -4316,7 +4344,7 @@ xaccLoadXferCell (ComboCell *cell,
|
|||||||
|
|
||||||
/* ======================================================== */
|
/* ======================================================== */
|
||||||
|
|
||||||
void
|
static void
|
||||||
xaccSRLoadXferCells (SplitRegister *reg, Account *base_account)
|
xaccSRLoadXferCells (SplitRegister *reg, Account *base_account)
|
||||||
{
|
{
|
||||||
AccountGroup *group;
|
AccountGroup *group;
|
||||||
|
@ -175,10 +175,6 @@ gboolean xaccSRSaveRegEntry (SplitRegister *reg, gboolean do_commit);
|
|||||||
* other split that belongs to this same tansaction. */
|
* other split that belongs to this same tansaction. */
|
||||||
void xaccSRRedrawRegEntry (SplitRegister *reg);
|
void xaccSRRedrawRegEntry (SplitRegister *reg);
|
||||||
|
|
||||||
/* The xaccSRLoadXferCells() method loads (or reloads) the transfer
|
|
||||||
* cells with appropriate entries. */
|
|
||||||
void xaccSRLoadXferCells (SplitRegister *reg, Account *base_account);
|
|
||||||
|
|
||||||
/* The xaccSRHasPendingChanges() method returns TRUE if the register
|
/* The xaccSRHasPendingChanges() method returns TRUE if the register
|
||||||
* has changed cells that have not been committed. */
|
* has changed cells that have not been committed. */
|
||||||
gboolean xaccSRHasPendingChanges (SplitRegister *reg);
|
gboolean xaccSRHasPendingChanges (SplitRegister *reg);
|
||||||
@ -205,6 +201,9 @@ void xaccSetSplitRegisterColorizeNegative (gboolean use_red);
|
|||||||
/* Expand the current transaction if it is collapsed. */
|
/* Expand the current transaction if it is collapsed. */
|
||||||
void xaccSRExpandCurrentTrans (SplitRegister *reg, gboolean expand);
|
void xaccSRExpandCurrentTrans (SplitRegister *reg, gboolean expand);
|
||||||
|
|
||||||
|
/* Return TRUE if current trans is expanded and style is REG_STYLE_LEDGER. */
|
||||||
|
gboolean xaccSRCurrentTransExpanded (SplitRegister *reg);
|
||||||
|
|
||||||
/* Private function, for MultiLedger.c only */
|
/* Private function, for MultiLedger.c only */
|
||||||
const char * xaccSRGetEntryHandler (VirtualLocation virt_loc,
|
const char * xaccSRGetEntryHandler (VirtualLocation virt_loc,
|
||||||
short _cell_type,
|
short _cell_type,
|
||||||
|
@ -83,10 +83,9 @@ struct _RegWindow
|
|||||||
|
|
||||||
GtkWidget * statusbar;
|
GtkWidget * statusbar;
|
||||||
|
|
||||||
GtkWidget * ledger_button;
|
GtkWidget * split_button;
|
||||||
GtkWidget * auto_ledger_button;
|
GtkWidget * split_menu_check;
|
||||||
GtkWidget * journal_button;
|
GtkWidget * split_popup_check;
|
||||||
GtkWidget * expand_button;
|
|
||||||
|
|
||||||
GtkWidget * balance_label;
|
GtkWidget * balance_label;
|
||||||
GtkWidget * cleared_label;
|
GtkWidget * cleared_label;
|
||||||
@ -110,8 +109,7 @@ static int last_stock_width = 0;
|
|||||||
|
|
||||||
|
|
||||||
/** PROTOTYPES ******************************************************/
|
/** PROTOTYPES ******************************************************/
|
||||||
RegWindow * regWindowLedger(xaccLedgerDisplay *ledger);
|
static void gnc_register_redraw_all_cb (GnucashRegister *g_reg, gpointer data);
|
||||||
static void regRefresh(xaccLedgerDisplay *ledger);
|
|
||||||
static void gnc_reg_refresh_toolbar(RegWindow *regData);
|
static void gnc_reg_refresh_toolbar(RegWindow *regData);
|
||||||
static void regDestroy(xaccLedgerDisplay *ledger);
|
static void regDestroy(xaccLedgerDisplay *ledger);
|
||||||
static void regSetHelp(xaccLedgerDisplay *ledger, const char *help_str);
|
static void regSetHelp(xaccLedgerDisplay *ledger, const char *help_str);
|
||||||
@ -268,60 +266,10 @@ static void
|
|||||||
gnc_register_change_style (RegWindow *regData, SplitRegisterStyle style)
|
gnc_register_change_style (RegWindow *regData, SplitRegisterStyle style)
|
||||||
{
|
{
|
||||||
SplitRegister *reg = regData->ledger->ledger;
|
SplitRegister *reg = regData->ledger->ledger;
|
||||||
GtkCheckMenuItem *radio_button;
|
|
||||||
GtkToggleButton *expand_button;
|
|
||||||
|
|
||||||
if (style == reg->style)
|
if (style == reg->style)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (regData->ledger_button),
|
|
||||||
regData);
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (regData->auto_ledger_button),
|
|
||||||
regData);
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (regData->journal_button),
|
|
||||||
regData);
|
|
||||||
gtk_signal_handler_block_by_data (GTK_OBJECT (regData->expand_button),
|
|
||||||
regData);
|
|
||||||
|
|
||||||
expand_button = GTK_TOGGLE_BUTTON (regData->expand_button);
|
|
||||||
|
|
||||||
switch (style)
|
|
||||||
{
|
|
||||||
case REG_STYLE_LEDGER:
|
|
||||||
radio_button = GTK_CHECK_MENU_ITEM (regData->ledger_button);
|
|
||||||
gtk_toggle_button_set_active (expand_button, FALSE);
|
|
||||||
gtk_widget_set_sensitive (regData->expand_button, TRUE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case REG_STYLE_AUTO_LEDGER:
|
|
||||||
radio_button = GTK_CHECK_MENU_ITEM (regData->auto_ledger_button);
|
|
||||||
gtk_toggle_button_set_active (expand_button, TRUE);
|
|
||||||
gtk_widget_set_sensitive (regData->expand_button, TRUE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case REG_STYLE_JOURNAL:
|
|
||||||
radio_button = GTK_CHECK_MENU_ITEM (regData->journal_button);
|
|
||||||
gtk_toggle_button_set_active (expand_button, TRUE);
|
|
||||||
gtk_widget_set_sensitive (regData->expand_button, FALSE);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
PERR ("Bad style");
|
|
||||||
radio_button = NULL;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_check_menu_item_set_active (radio_button, TRUE);
|
|
||||||
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (regData->ledger_button),
|
|
||||||
regData);
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (regData->auto_ledger_button),
|
|
||||||
regData);
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (regData->journal_button),
|
|
||||||
regData);
|
|
||||||
gtk_signal_handler_unblock_by_data (GTK_OBJECT (regData->expand_button),
|
|
||||||
regData);
|
|
||||||
|
|
||||||
xaccConfigSplitRegister (reg, reg->type, style, reg->use_double_line);
|
xaccConfigSplitRegister (reg, reg->type, style, reg->use_double_line);
|
||||||
|
|
||||||
regData->ledger->dirty = TRUE;
|
regData->ledger->dirty = TRUE;
|
||||||
@ -609,7 +557,7 @@ gnc_register_set_date_range(RegWindow *regData)
|
|||||||
static void
|
static void
|
||||||
gnc_register_date_cb(GtkWidget *widget, gpointer data)
|
gnc_register_date_cb(GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
|
|
||||||
gnc_register_set_date_range(regData);
|
gnc_register_set_date_range(regData);
|
||||||
|
|
||||||
@ -620,7 +568,7 @@ gnc_register_date_cb(GtkWidget *widget, gpointer data)
|
|||||||
static void
|
static void
|
||||||
show_all_cb(GtkWidget *widget, gpointer data)
|
show_all_cb(GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
RegDateWindow *regDateData;
|
RegDateWindow *regDateData;
|
||||||
GtkToggleButton *toggle;
|
GtkToggleButton *toggle;
|
||||||
|
|
||||||
@ -642,7 +590,7 @@ show_all_cb(GtkWidget *widget, gpointer data)
|
|||||||
static void
|
static void
|
||||||
gnc_register_today_cb(GtkWidget *widget, gpointer data)
|
gnc_register_today_cb(GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
RegDateWindow *regDateData;
|
RegDateWindow *regDateData;
|
||||||
|
|
||||||
assert(regData != NULL);
|
assert(regData != NULL);
|
||||||
@ -656,7 +604,7 @@ gnc_register_today_cb(GtkWidget *widget, gpointer data)
|
|||||||
static void
|
static void
|
||||||
gnc_register_date_toggle_cb(GtkToggleButton *toggle, gpointer data)
|
gnc_register_date_toggle_cb(GtkToggleButton *toggle, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
|
|
||||||
gtk_widget_set_sensitive(regData->date_window->set_button, TRUE);
|
gtk_widget_set_sensitive(regData->date_window->set_button, TRUE);
|
||||||
|
|
||||||
@ -890,8 +838,8 @@ gnc_register_create_tool_bar (RegWindow *regData)
|
|||||||
GNOMEUIINFO_SEPARATOR,
|
GNOMEUIINFO_SEPARATOR,
|
||||||
{
|
{
|
||||||
GNOME_APP_UI_TOGGLEITEM,
|
GNOME_APP_UI_TOGGLEITEM,
|
||||||
N_("Expand"),
|
N_("Split"),
|
||||||
N_("Expand the current transaction"),
|
N_("Show all splits in the current transaction"),
|
||||||
expand_trans_cb, NULL, NULL,
|
expand_trans_cb, NULL, NULL,
|
||||||
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_BOOK_OPEN,
|
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_BOOK_OPEN,
|
||||||
0, 0, NULL
|
0, 0, NULL
|
||||||
@ -899,7 +847,7 @@ gnc_register_create_tool_bar (RegWindow *regData)
|
|||||||
{
|
{
|
||||||
GNOME_APP_UI_ITEM,
|
GNOME_APP_UI_ITEM,
|
||||||
N_("Blank"),
|
N_("Blank"),
|
||||||
N_("Move to the blank transaction at the "\
|
N_("Move to the blank transaction at the " \
|
||||||
"bottom of the register"),
|
"bottom of the register"),
|
||||||
new_trans_cb, NULL, NULL,
|
new_trans_cb, NULL, NULL,
|
||||||
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_NEW,
|
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_NEW,
|
||||||
@ -952,7 +900,7 @@ gnc_register_create_tool_bar (RegWindow *regData)
|
|||||||
|
|
||||||
regData->toolbar = toolbar;
|
regData->toolbar = toolbar;
|
||||||
|
|
||||||
regData->expand_button = toolbar_info[6].widget;
|
regData->split_button = toolbar_info[6].widget;
|
||||||
|
|
||||||
return toolbar;
|
return toolbar;
|
||||||
}
|
}
|
||||||
@ -1041,15 +989,28 @@ gnc_register_jump_to_blank(RegWindow *regData)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
expand_trans_cb(GtkWidget *widget, gpointer data)
|
expand_trans_check_cb (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = data;
|
RegWindow *regData = data;
|
||||||
SplitRegisterStyle style;
|
gboolean expand;
|
||||||
|
|
||||||
style = GTK_TOGGLE_BUTTON (widget)->active ?
|
if (!regData)
|
||||||
REG_STYLE_AUTO_LEDGER : REG_STYLE_LEDGER;
|
return;
|
||||||
|
|
||||||
gnc_register_change_style (regData, style);
|
expand = GTK_CHECK_MENU_ITEM (widget)->active;
|
||||||
|
|
||||||
|
xaccSRExpandCurrentTrans (regData->ledger->ledger, expand);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
expand_trans_cb (GtkWidget *widget, gpointer data)
|
||||||
|
{
|
||||||
|
RegWindow *regData = data;
|
||||||
|
gboolean expand;
|
||||||
|
|
||||||
|
expand = GTK_TOGGLE_BUTTON (widget)->active;
|
||||||
|
|
||||||
|
xaccSRExpandCurrentTrans (regData->ledger->ledger, expand);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1071,7 +1032,7 @@ new_trans_cb(GtkWidget *widget, gpointer data)
|
|||||||
static void
|
static void
|
||||||
jump_cb(GtkWidget *widget, gpointer data)
|
jump_cb(GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
Account *account;
|
Account *account;
|
||||||
Split *split;
|
Split *split;
|
||||||
|
|
||||||
@ -1139,7 +1100,7 @@ print_check_cb(GtkWidget * widget, gpointer data)
|
|||||||
static void
|
static void
|
||||||
gnc_register_scrub_cb(GtkWidget *widget, gpointer data)
|
gnc_register_scrub_cb(GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
Account *account = regData->ledger->leader;
|
Account *account = regData->ledger->leader;
|
||||||
|
|
||||||
if (account == NULL)
|
if (account == NULL)
|
||||||
@ -1379,6 +1340,14 @@ gnc_register_create_menu_bar(RegWindow *regData, GtkWidget *statusbar)
|
|||||||
0, 0, NULL
|
0, 0, NULL
|
||||||
},
|
},
|
||||||
GNOMEUIINFO_SEPARATOR,
|
GNOMEUIINFO_SEPARATOR,
|
||||||
|
{
|
||||||
|
GNOME_APP_UI_TOGGLEITEM,
|
||||||
|
N_("_Split"),
|
||||||
|
N_("Show all splits in the current transaction"),
|
||||||
|
expand_trans_check_cb, NULL, NULL,
|
||||||
|
GNOME_APP_PIXMAP_NONE, NULL,
|
||||||
|
0, 0, NULL
|
||||||
|
},
|
||||||
{
|
{
|
||||||
GNOME_APP_UI_ITEM,
|
GNOME_APP_UI_ITEM,
|
||||||
N_("_Blank"),
|
N_("_Blank"),
|
||||||
@ -1445,9 +1414,7 @@ gnc_register_create_menu_bar(RegWindow *regData, GtkWidget *statusbar)
|
|||||||
gnome_app_install_appbar_menu_hints(GNOME_APPBAR(statusbar),
|
gnome_app_install_appbar_menu_hints(GNOME_APPBAR(statusbar),
|
||||||
register_window_menu);
|
register_window_menu);
|
||||||
|
|
||||||
regData->ledger_button = style_list[0].widget;
|
regData->split_menu_check = transaction_menu[6].widget;
|
||||||
regData->auto_ledger_button = style_list[1].widget;
|
|
||||||
regData->journal_button = style_list[2].widget;
|
|
||||||
|
|
||||||
/* Make sure the right style radio item is active */
|
/* Make sure the right style radio item is active */
|
||||||
{
|
{
|
||||||
@ -1492,11 +1459,11 @@ gnc_register_create_menu_bar(RegWindow *regData, GtkWidget *statusbar)
|
|||||||
|
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
gnc_register_create_popup_menu(RegWindow *regData)
|
gnc_register_create_popup_menu (RegWindow *regData)
|
||||||
{
|
{
|
||||||
GtkWidget *popup;
|
GtkWidget *popup;
|
||||||
|
|
||||||
static GnomeUIInfo transaction_menu[] =
|
GnomeUIInfo transaction_menu[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
GNOME_APP_UI_ITEM,
|
GNOME_APP_UI_ITEM,
|
||||||
@ -1532,6 +1499,14 @@ gnc_register_create_popup_menu(RegWindow *regData)
|
|||||||
0, 0, NULL
|
0, 0, NULL
|
||||||
},
|
},
|
||||||
GNOMEUIINFO_SEPARATOR,
|
GNOMEUIINFO_SEPARATOR,
|
||||||
|
{
|
||||||
|
GNOME_APP_UI_TOGGLEITEM,
|
||||||
|
N_("_Split"),
|
||||||
|
N_("Show all splits in the current transaction"),
|
||||||
|
expand_trans_check_cb, NULL, NULL,
|
||||||
|
GNOME_APP_PIXMAP_NONE, NULL,
|
||||||
|
0, 0, NULL
|
||||||
|
},
|
||||||
{
|
{
|
||||||
GNOME_APP_UI_ITEM,
|
GNOME_APP_UI_ITEM,
|
||||||
N_("_Blank"),
|
N_("_Blank"),
|
||||||
@ -1553,9 +1528,11 @@ gnc_register_create_popup_menu(RegWindow *regData)
|
|||||||
GNOMEUIINFO_END
|
GNOMEUIINFO_END
|
||||||
};
|
};
|
||||||
|
|
||||||
gnc_fill_menu_with_data(transaction_menu, regData);
|
gnc_fill_menu_with_data (transaction_menu, regData);
|
||||||
|
|
||||||
popup = gnome_popup_menu_new(transaction_menu);
|
popup = gnome_popup_menu_new (transaction_menu);
|
||||||
|
|
||||||
|
regData->split_popup_check = transaction_menu[6].widget;
|
||||||
|
|
||||||
return popup;
|
return popup;
|
||||||
}
|
}
|
||||||
@ -1598,13 +1575,13 @@ gnc_register_record_cb(GnucashRegister *reg, gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* First record the transaction. This will perform a refresh. */
|
/* First record the transaction. This will perform a refresh. */
|
||||||
recordCB(GTK_WIDGET(reg), data);
|
recordCB (GTK_WIDGET(reg), data);
|
||||||
|
|
||||||
/* Now move. */
|
/* Now move. */
|
||||||
if (goto_blank)
|
if (goto_blank)
|
||||||
gnc_register_jump_to_blank(regData);
|
gnc_register_jump_to_blank (regData);
|
||||||
else
|
else
|
||||||
gnucash_register_goto_next_virt_row(reg);
|
gnucash_register_goto_next_virt_row (reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -1697,7 +1674,7 @@ gnc_toolbar_change_cb(void *data)
|
|||||||
* Return: regData - the register window instance *
|
* Return: regData - the register window instance *
|
||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
RegWindow *
|
RegWindow *
|
||||||
regWindowLedger(xaccLedgerDisplay *ledger)
|
regWindowLedger (xaccLedgerDisplay *ledger)
|
||||||
{
|
{
|
||||||
RegWindow *regData;
|
RegWindow *regData;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
@ -1713,7 +1690,6 @@ regWindowLedger(xaccLedgerDisplay *ledger)
|
|||||||
regData = g_new(RegWindow, 1);
|
regData = g_new(RegWindow, 1);
|
||||||
|
|
||||||
ledger->gui_hook = regData;
|
ledger->gui_hook = regData;
|
||||||
ledger->redraw = regRefresh;
|
|
||||||
ledger->destroy = regDestroy;
|
ledger->destroy = regDestroy;
|
||||||
ledger->set_help = regSetHelp;
|
ledger->set_help = regSetHelp;
|
||||||
ledger->get_parent = gnc_register_get_parent;
|
ledger->get_parent = gnc_register_get_parent;
|
||||||
@ -1807,6 +1783,8 @@ regWindowLedger(xaccLedgerDisplay *ledger)
|
|||||||
|
|
||||||
gtk_signal_connect(GTK_OBJECT(register_widget), "activate_cursor",
|
gtk_signal_connect(GTK_OBJECT(register_widget), "activate_cursor",
|
||||||
GTK_SIGNAL_FUNC(gnc_register_record_cb), regData);
|
GTK_SIGNAL_FUNC(gnc_register_record_cb), regData);
|
||||||
|
gtk_signal_connect(GTK_OBJECT(register_widget), "redraw_all",
|
||||||
|
GTK_SIGNAL_FUNC(gnc_register_redraw_all_cb), regData);
|
||||||
|
|
||||||
popup = gnc_register_create_popup_menu(regData);
|
popup = gnc_register_create_popup_menu(regData);
|
||||||
gnucash_register_attach_popup(GNUCASH_REGISTER(register_widget),
|
gnucash_register_attach_popup(GNUCASH_REGISTER(register_widget),
|
||||||
@ -1869,84 +1847,118 @@ regWindowLedger(xaccLedgerDisplay *ledger)
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_reg_refresh_toolbar(RegWindow *regData)
|
gnc_reg_refresh_toolbar (RegWindow *regData)
|
||||||
{
|
{
|
||||||
GtkToolbarStyle tbstyle;
|
GtkToolbarStyle tbstyle;
|
||||||
|
|
||||||
if ((regData == NULL) || (regData->toolbar == NULL))
|
if ((regData == NULL) || (regData->toolbar == NULL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tbstyle = gnc_get_toolbar_style();
|
tbstyle = gnc_get_toolbar_style ();
|
||||||
|
|
||||||
gtk_toolbar_set_style(GTK_TOOLBAR(regData->toolbar), tbstyle);
|
gtk_toolbar_set_style (GTK_TOOLBAR (regData->toolbar), tbstyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
regRefresh(xaccLedgerDisplay *ledger)
|
gnc_register_redraw_all_cb (GnucashRegister *g_reg, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) (ledger->gui_hook);
|
RegWindow *regData = data;
|
||||||
|
const gnc_commodity * currency;
|
||||||
GNCPrintAmountInfo print_info;
|
GNCPrintAmountInfo print_info;
|
||||||
gboolean euro = gnc_lookup_boolean_option("International",
|
gnc_numeric amount;
|
||||||
"Enable EURO support",
|
Account *leader;
|
||||||
FALSE);
|
char string[256];
|
||||||
const gnc_commodity * currency = xaccAccountGetCurrency(ledger->leader);
|
gboolean reverse;
|
||||||
|
gboolean euro;
|
||||||
|
|
||||||
|
if (regData->window == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
leader = regData->ledger->leader;
|
||||||
|
|
||||||
|
euro = gnc_lookup_boolean_option ("International",
|
||||||
|
"Enable EURO support",
|
||||||
|
FALSE);
|
||||||
|
|
||||||
|
currency = xaccAccountGetCurrency (leader);
|
||||||
|
|
||||||
/* no EURO converson, if account is already EURO or no EURO currency */
|
/* no EURO converson, if account is already EURO or no EURO currency */
|
||||||
if(currency != NULL)
|
if (currency != NULL)
|
||||||
euro = (euro && gnc_is_euro_currency(currency));
|
euro = (euro && gnc_is_euro_currency(currency));
|
||||||
else
|
else
|
||||||
euro = FALSE;
|
euro = FALSE;
|
||||||
|
|
||||||
xaccSRLoadXferCells(ledger->ledger, ledger->leader);
|
print_info = gnc_account_value_print_info (leader, TRUE);
|
||||||
|
|
||||||
print_info = gnc_account_value_print_info (ledger->leader, TRUE);
|
reverse = gnc_reverse_balance(leader);
|
||||||
|
|
||||||
if (regData->window != NULL)
|
if (regData->balance_label != NULL)
|
||||||
{
|
{
|
||||||
char string[256];
|
amount = xaccAccountGetBalance (leader);
|
||||||
gboolean reverse = gnc_reverse_balance(ledger->leader);
|
if (reverse)
|
||||||
gnc_numeric amount;
|
amount = gnc_numeric_neg (amount);
|
||||||
|
|
||||||
if (regData->balance_label != NULL)
|
xaccSPrintAmount(string, amount, print_info);
|
||||||
|
if (euro)
|
||||||
{
|
{
|
||||||
amount = xaccAccountGetBalance (ledger->leader);
|
strcat(string, " / ");
|
||||||
if (reverse)
|
xaccSPrintAmount(string + strlen(string),
|
||||||
amount = gnc_numeric_neg (amount);
|
gnc_convert_to_euro(currency, amount),
|
||||||
|
gnc_commodity_print_info (gnc_get_euro (), TRUE));
|
||||||
xaccSPrintAmount(string, amount, print_info);
|
|
||||||
if (euro)
|
|
||||||
{
|
|
||||||
strcat(string, " / ");
|
|
||||||
xaccSPrintAmount(string + strlen(string),
|
|
||||||
gnc_convert_to_euro(currency, amount),
|
|
||||||
gnc_commodity_print_info (gnc_get_euro (), TRUE));
|
|
||||||
}
|
|
||||||
|
|
||||||
gnc_set_label_color(regData->balance_label, amount);
|
|
||||||
gtk_label_set_text(GTK_LABEL(regData->balance_label), string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (regData->cleared_label != NULL)
|
gnc_set_label_color(regData->balance_label, amount);
|
||||||
|
gtk_label_set_text(GTK_LABEL(regData->balance_label), string);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (regData->cleared_label != NULL)
|
||||||
|
{
|
||||||
|
amount = xaccAccountGetClearedBalance (leader);
|
||||||
|
if (reverse)
|
||||||
|
amount = gnc_numeric_neg (amount);
|
||||||
|
|
||||||
|
xaccSPrintAmount(string, amount, print_info);
|
||||||
|
if (euro)
|
||||||
{
|
{
|
||||||
amount = xaccAccountGetClearedBalance (ledger->leader);
|
strcat(string, " / ");
|
||||||
if (reverse)
|
xaccSPrintAmount(string + strlen(string),
|
||||||
amount = gnc_numeric_neg (amount);
|
gnc_convert_to_euro(currency, amount),
|
||||||
|
gnc_commodity_print_info (gnc_get_euro (), TRUE));
|
||||||
xaccSPrintAmount(string, amount, print_info);
|
|
||||||
if (euro)
|
|
||||||
{
|
|
||||||
strcat(string, " / ");
|
|
||||||
xaccSPrintAmount(string + strlen(string),
|
|
||||||
gnc_convert_to_euro(currency, amount),
|
|
||||||
gnc_commodity_print_info (gnc_get_euro (), TRUE));
|
|
||||||
}
|
|
||||||
|
|
||||||
gnc_set_label_color(regData->cleared_label, amount);
|
|
||||||
gtk_label_set_text(GTK_LABEL(regData->cleared_label), string);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gnc_reg_set_window_name(regData);
|
gnc_set_label_color(regData->cleared_label, amount);
|
||||||
|
gtk_label_set_text(GTK_LABEL(regData->cleared_label), string);
|
||||||
|
}
|
||||||
|
|
||||||
|
gnc_reg_set_window_name (regData);
|
||||||
|
|
||||||
|
{
|
||||||
|
gboolean expand;
|
||||||
|
gboolean sensitive;
|
||||||
|
|
||||||
|
expand = xaccSRCurrentTransExpanded (regData->ledger->ledger);
|
||||||
|
|
||||||
|
gtk_signal_handler_block_by_data
|
||||||
|
(GTK_OBJECT (regData->split_button), regData);
|
||||||
|
gtk_toggle_button_set_active
|
||||||
|
(GTK_TOGGLE_BUTTON (regData->split_button), expand);
|
||||||
|
gtk_signal_handler_unblock_by_data
|
||||||
|
(GTK_OBJECT (regData->split_button), regData);
|
||||||
|
|
||||||
|
gtk_signal_handler_block_by_data
|
||||||
|
(GTK_OBJECT (regData->split_menu_check), regData);
|
||||||
|
gtk_check_menu_item_set_active
|
||||||
|
(GTK_CHECK_MENU_ITEM (regData->split_menu_check), expand);
|
||||||
|
gtk_signal_handler_unblock_by_data
|
||||||
|
(GTK_OBJECT (regData->split_menu_check), regData);
|
||||||
|
|
||||||
|
gtk_check_menu_item_set_active
|
||||||
|
(GTK_CHECK_MENU_ITEM (regData->split_popup_check), expand);
|
||||||
|
|
||||||
|
sensitive = regData->ledger->ledger->style == REG_STYLE_LEDGER;
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive (regData->split_button, sensitive);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1985,7 +1997,7 @@ gnc_reg_save_size(RegWindow *regData)
|
|||||||
static void
|
static void
|
||||||
regDestroy(xaccLedgerDisplay *ledger)
|
regDestroy(xaccLedgerDisplay *ledger)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) (ledger->gui_hook);
|
RegWindow *regData = ledger->gui_hook;
|
||||||
|
|
||||||
if (regData)
|
if (regData)
|
||||||
{
|
{
|
||||||
@ -2179,7 +2191,7 @@ xferCB(GtkWidget * w, gpointer data)
|
|||||||
static void
|
static void
|
||||||
editCB(GtkWidget * w, gpointer data)
|
editCB(GtkWidget * w, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
xaccLedgerDisplay *ledger = regData->ledger;
|
xaccLedgerDisplay *ledger = regData->ledger;
|
||||||
Account *account = ledger->leader;
|
Account *account = ledger->leader;
|
||||||
|
|
||||||
@ -2201,7 +2213,7 @@ editCB(GtkWidget * w, gpointer data)
|
|||||||
static void
|
static void
|
||||||
startRecnCB(GtkWidget * w, gpointer data)
|
startRecnCB(GtkWidget * w, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
xaccLedgerDisplay *ledger = regData->ledger;
|
xaccLedgerDisplay *ledger = regData->ledger;
|
||||||
Account *account = ledger->leader;
|
Account *account = ledger->leader;
|
||||||
|
|
||||||
@ -2515,9 +2527,9 @@ deleteCB(GtkWidget *widget, gpointer data)
|
|||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
static void duplicateCB(GtkWidget *w, gpointer data)
|
static void duplicateCB(GtkWidget *w, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
|
|
||||||
xaccSRDuplicateCurrent(regData->ledger->ledger);
|
xaccSRDuplicateCurrent (regData->ledger->ledger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2531,9 +2543,9 @@ static void duplicateCB(GtkWidget *w, gpointer data)
|
|||||||
static void
|
static void
|
||||||
cancelCB(GtkWidget *w, gpointer data)
|
cancelCB(GtkWidget *w, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = (RegWindow *) data;
|
RegWindow *regData = data;
|
||||||
|
|
||||||
xaccSRCancelCursorTransChanges(regData->ledger->ledger);
|
xaccSRCancelCursorTransChanges (regData->ledger->ledger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2568,15 +2580,15 @@ gnc_register_check_close(RegWindow *regData)
|
|||||||
* Return: none *
|
* Return: none *
|
||||||
\********************************************************************/
|
\********************************************************************/
|
||||||
static void
|
static void
|
||||||
closeCB(GtkWidget *widget, gpointer data)
|
closeCB (GtkWidget *widget, gpointer data)
|
||||||
{
|
{
|
||||||
RegWindow *regData = data;
|
RegWindow *regData = data;
|
||||||
|
|
||||||
gnc_register_check_close(regData);
|
gnc_register_check_close (regData);
|
||||||
|
|
||||||
gnc_reg_save_size(regData);
|
gnc_reg_save_size (regData);
|
||||||
|
|
||||||
gtk_widget_destroy(regData->window);
|
gtk_widget_destroy (regData->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
|
@ -59,6 +59,7 @@ static void gnucash_sheet_stop_editing (GnucashSheet *sheet);
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ACTIVATE_CURSOR,
|
ACTIVATE_CURSOR,
|
||||||
|
REDRAW_ALL,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -554,6 +555,8 @@ gnucash_sheet_redraw_all (GnucashSheet *sheet)
|
|||||||
|
|
||||||
gnome_canvas_request_redraw (GNOME_CANVAS (sheet), 0, 0,
|
gnome_canvas_request_redraw (GNOME_CANVAS (sheet), 0, 0,
|
||||||
sheet->width + 1, sheet->height + 1);
|
sheet->width + 1, sheet->height + 1);
|
||||||
|
|
||||||
|
gtk_signal_emit_by_name (GTK_OBJECT (sheet->reg), "redraw_all");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2127,8 +2130,20 @@ gnucash_register_class_init (GnucashRegisterClass *class)
|
|||||||
gtk_marshal_NONE__NONE,
|
gtk_marshal_NONE__NONE,
|
||||||
GTK_TYPE_NONE, 0);
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
|
register_signals[REDRAW_ALL] =
|
||||||
|
gtk_signal_new("redraw_all",
|
||||||
|
GTK_RUN_LAST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET(GnucashRegisterClass,
|
||||||
|
redraw_all),
|
||||||
|
gtk_marshal_NONE__NONE,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
|
|
||||||
gtk_object_class_add_signals(object_class, register_signals,
|
gtk_object_class_add_signals(object_class, register_signals,
|
||||||
LAST_SIGNAL);
|
LAST_SIGNAL);
|
||||||
|
|
||||||
|
class->activate_cursor = NULL;
|
||||||
|
class->redraw_all = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@ typedef struct
|
|||||||
} SheetBlock;
|
} SheetBlock;
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
GnomeCanvas canvas;
|
GnomeCanvas canvas;
|
||||||
|
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
@ -190,15 +191,18 @@ void gnucash_register_copy_clipboard (GnucashRegister *reg);
|
|||||||
void gnucash_register_paste_clipboard (GnucashRegister *reg);
|
void gnucash_register_paste_clipboard (GnucashRegister *reg);
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
GnomeCanvasClass parent_class;
|
GnomeCanvasClass parent_class;
|
||||||
} GnucashSheetClass;
|
} GnucashSheetClass;
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
GtkTableClass parent_class;
|
GtkTableClass parent_class;
|
||||||
|
|
||||||
void (*activate_cursor) (GnucashRegister *reg);
|
void (*activate_cursor) (GnucashRegister *reg);
|
||||||
|
void (*redraw_all) (GnucashRegister *reg);
|
||||||
} GnucashRegisterClass;
|
} GnucashRegisterClass;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -208,7 +208,7 @@ gnc_table_refresh_cursor_gui (Table * table,
|
|||||||
if (gnc_table_virtual_cell_out_of_bounds (table, vcell_loc))
|
if (gnc_table_virtual_cell_out_of_bounds (table, vcell_loc))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sheet = GNUCASH_SHEET(table->ui_data);
|
sheet = GNUCASH_SHEET (table->ui_data);
|
||||||
|
|
||||||
gnucash_sheet_cursor_set_from_table (sheet, do_scroll);
|
gnucash_sheet_cursor_set_from_table (sheet, do_scroll);
|
||||||
if (gnucash_sheet_block_set_from_table (sheet, vcell_loc))
|
if (gnucash_sheet_block_set_from_table (sheet, vcell_loc))
|
||||||
@ -216,7 +216,7 @@ gnc_table_refresh_cursor_gui (Table * table,
|
|||||||
g_warning ("woops");
|
g_warning ("woops");
|
||||||
gnucash_sheet_recompute_block_offsets (sheet);
|
gnucash_sheet_recompute_block_offsets (sheet);
|
||||||
gnucash_sheet_set_scroll_region (sheet);
|
gnucash_sheet_set_scroll_region (sheet);
|
||||||
gnucash_sheet_compute_visible_range(sheet);
|
gnucash_sheet_compute_visible_range (sheet);
|
||||||
gnucash_sheet_redraw_all (sheet);
|
gnucash_sheet_redraw_all (sheet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user