mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
More register cleanup.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5172 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
9c6209f360
commit
bac11f87b6
@ -742,7 +742,7 @@ gnc_configure_auto_raise (void)
|
||||
|
||||
auto_pop = gnc_lookup_boolean_option("Register", "Auto-Raise Lists", TRUE);
|
||||
|
||||
xaccComboCellSetAutoPop(auto_pop);
|
||||
gnc_combo_cell_set_autopop (auto_pop);
|
||||
}
|
||||
|
||||
/* gnc_configure_negative_color_cb
|
||||
|
@ -3867,12 +3867,12 @@ xaccSRLoadRegister (SplitRegister *reg, GList * slist,
|
||||
xaccSRShowTrans (reg, table->current_cursor_loc.vcell_loc);
|
||||
|
||||
/* set the completion character for the xfer cells */
|
||||
xaccComboCellSetCompleteChar
|
||||
gnc_combo_cell_set_complete_char
|
||||
((ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL),
|
||||
gnc_get_account_separator ());
|
||||
|
||||
xaccComboCellSetCompleteChar
|
||||
gnc_combo_cell_set_complete_char
|
||||
((ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, XFRM_CELL),
|
||||
gnc_get_account_separator ());
|
||||
@ -3915,7 +3915,7 @@ LoadXferCell (ComboCell * cell, AccountGroup * grp)
|
||||
name = xaccAccountGetFullName (account, gnc_get_account_separator ());
|
||||
if (name != NULL)
|
||||
{
|
||||
xaccAddComboCellMenuItem (cell, name);
|
||||
gnc_combo_cell_add_menu_item (cell, name);
|
||||
g_free(name);
|
||||
}
|
||||
}
|
||||
@ -3942,12 +3942,12 @@ xaccSRLoadXferCells (SplitRegister *reg, Account *base_account)
|
||||
|
||||
cell = (ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, XFRM_CELL);
|
||||
xaccClearComboCellMenu (cell);
|
||||
gnc_combo_cell_clear_menu (cell);
|
||||
LoadXferCell (cell, group);
|
||||
|
||||
cell = (ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL);
|
||||
xaccClearComboCellMenu (cell);
|
||||
gnc_combo_cell_clear_menu (cell);
|
||||
LoadXferCell (cell, group);
|
||||
}
|
||||
|
||||
|
@ -750,8 +750,8 @@ gnc_split_register_auto_completion (SplitRegister *reg,
|
||||
ACTN_CELL, TRUE))
|
||||
{
|
||||
cell = gnc_table_layout_get_cell (reg->table->layout, ACTN_CELL);
|
||||
xaccSetComboCellValue ((ComboCell *) cell,
|
||||
xaccSplitGetAction (auto_split));
|
||||
gnc_combo_cell_set_value ((ComboCell *) cell,
|
||||
xaccSplitGetAction (auto_split));
|
||||
}
|
||||
|
||||
/* auto-complete the account name */
|
||||
@ -759,7 +759,7 @@ gnc_split_register_auto_completion (SplitRegister *reg,
|
||||
|
||||
fullname = xaccAccountGetFullName (xaccSplitGetAccount (auto_split),
|
||||
gnc_get_account_separator ());
|
||||
xaccSetComboCellValue ((ComboCell *) cell, fullname);
|
||||
gnc_combo_cell_set_value ((ComboCell *) cell, fullname);
|
||||
g_free(fullname);
|
||||
|
||||
gnc_basic_cell_set_changed (cell, TRUE);
|
||||
@ -926,7 +926,7 @@ gnc_split_register_traverse (VirtualLocation *p_new_virt_loc,
|
||||
info->full_refresh = TRUE;
|
||||
|
||||
name = xaccAccountGetFullName (account, gnc_get_account_separator ());
|
||||
xaccSetComboCellValue (cell, name);
|
||||
gnc_combo_cell_set_value (cell, name);
|
||||
gnc_basic_cell_set_changed (&cell->cell, TRUE);
|
||||
g_free (name);
|
||||
|
||||
|
@ -59,38 +59,36 @@ typedef struct _ComboCell
|
||||
} ComboCell;
|
||||
|
||||
|
||||
BasicCell * xaccMallocComboCell (void);
|
||||
void xaccInitComboCell (ComboCell *cell);
|
||||
BasicCell * gnc_combo_cell_new (void);
|
||||
void gnc_combo_cell_init (ComboCell *cell);
|
||||
|
||||
void xaccSetComboCellValue (ComboCell *cell, const char *value);
|
||||
void gnc_combo_cell_set_value (ComboCell *cell, const char *value);
|
||||
|
||||
void xaccClearComboCellMenu (ComboCell *cell);
|
||||
void xaccAddComboCellMenuItem (ComboCell *cell, char * menustr);
|
||||
void gnc_combo_cell_clear_menu (ComboCell *cell);
|
||||
void gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr);
|
||||
|
||||
/* Determines whether the cell will accept strings not in the
|
||||
* menu. Defaults to strict, i.e., only menu items are accepted. */
|
||||
void xaccComboCellSetStrict (ComboCell *cell, gboolean strict);
|
||||
void gnc_combo_cell_set_strict (ComboCell *cell, gboolean strict);
|
||||
|
||||
/* Sets a character used for special completion processing. */
|
||||
void xaccComboCellSetCompleteChar (ComboCell *cell,
|
||||
char complete_char);
|
||||
void gnc_combo_cell_set_complete_char (ComboCell *cell,
|
||||
char complete_char);
|
||||
|
||||
/* Add a string to a list of strings which, if the cell has that value,
|
||||
* will cause the cell to be uneditable on 'enter'. If the cell has
|
||||
* that value, the ignore_help string will be returned by the
|
||||
* help handler. */
|
||||
void xaccComboCellAddIgnoreString (ComboCell *cell,
|
||||
const char *ignore_string,
|
||||
const char *ignore_help);
|
||||
void gnc_combo_cell_add_ignore_string (ComboCell *cell,
|
||||
const char *ignore_string,
|
||||
const char *ignore_help);
|
||||
|
||||
/* Determines whether the popup list autosizes itself or uses
|
||||
* all available space. FALSE by default. */
|
||||
void xaccComboCellSetAutoSize (ComboCell *cell, gboolean autosize);
|
||||
void gnc_combo_cell_set_autosize (ComboCell *cell, gboolean autosize);
|
||||
|
||||
/* Determines whether combocells are automatically raised upon typing.
|
||||
* Defaults to false. This is a 'class' method. */
|
||||
void xaccComboCellSetAutoPop (gboolean auto_pop_combos);
|
||||
void gnc_combo_cell_set_autopop (gboolean auto_pop_combos);
|
||||
|
||||
#endif /* COMBO_CELL_H */
|
||||
|
||||
/* --------------- end of file ---------------------- */
|
||||
#endif
|
||||
|
@ -49,7 +49,7 @@ gnc_register_init (void)
|
||||
|
||||
gnc_register_add_cell_type (BASIC_CELL_TYPE_NAME, gnc_basic_cell_new);
|
||||
|
||||
gnc_register_add_cell_type (COMBO_CELL_TYPE_NAME, xaccMallocComboCell);
|
||||
gnc_register_add_cell_type (COMBO_CELL_TYPE_NAME, gnc_combo_cell_new);
|
||||
|
||||
gnc_register_add_cell_type (DATE_CELL_TYPE_NAME, xaccMallocDateCell);
|
||||
|
||||
|
@ -111,89 +111,89 @@ configAction (SplitRegister *reg)
|
||||
case BANK_REGISTER:
|
||||
/* broken ! FIXME bg */
|
||||
case SEARCH_LEDGER:
|
||||
xaccAddComboCellMenuItem (cell, _("Deposit"));
|
||||
xaccAddComboCellMenuItem (cell, _("Withdraw"));
|
||||
xaccAddComboCellMenuItem (cell, _("Check"));
|
||||
xaccAddComboCellMenuItem (cell, _("Int"));
|
||||
xaccAddComboCellMenuItem (cell, _("ATM"));
|
||||
xaccAddComboCellMenuItem (cell, _("Teller"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Deposit"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Withdraw"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Check"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Int"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("ATM"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Teller"));
|
||||
/* Action: Point Of Sale */
|
||||
xaccAddComboCellMenuItem (cell, _("POS"));
|
||||
xaccAddComboCellMenuItem (cell, _("Phone"));
|
||||
xaccAddComboCellMenuItem (cell, _("Online"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("POS"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Phone"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Online"));
|
||||
/* Action: Automatic Deposit ?!? */
|
||||
xaccAddComboCellMenuItem (cell, _("AutoDep"));
|
||||
xaccAddComboCellMenuItem (cell, _("Wire"));
|
||||
xaccAddComboCellMenuItem (cell, _("Credit"));
|
||||
xaccAddComboCellMenuItem (cell, _("Direct Debit"));
|
||||
xaccAddComboCellMenuItem (cell, _("Transfer"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("AutoDep"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Wire"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Credit"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Direct Debit"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Transfer"));
|
||||
break;
|
||||
case CASH_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
break;
|
||||
case ASSET_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
xaccAddComboCellMenuItem (cell, _("Fee"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Fee"));
|
||||
break;
|
||||
case CREDIT_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("ATM"));
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Credit"));
|
||||
xaccAddComboCellMenuItem (cell, _("Fee"));
|
||||
xaccAddComboCellMenuItem (cell, _("Int"));
|
||||
xaccAddComboCellMenuItem (cell, _("Online"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("ATM"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Credit"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Fee"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Int"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Online"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
break;
|
||||
case LIABILITY_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
xaccAddComboCellMenuItem (cell, _("Loan"));
|
||||
xaccAddComboCellMenuItem (cell, _("Int"));
|
||||
xaccAddComboCellMenuItem (cell, _("Payment"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Loan"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Int"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Payment"));
|
||||
break;
|
||||
case INCOME_LEDGER:
|
||||
case INCOME_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
xaccAddComboCellMenuItem (cell, _("Int"));
|
||||
xaccAddComboCellMenuItem (cell, _("Payment"));
|
||||
xaccAddComboCellMenuItem (cell, _("Rebate"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Int"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Payment"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Rebate"));
|
||||
break;
|
||||
case EXPENSE_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
break;
|
||||
case GENERAL_LEDGER:
|
||||
case EQUITY_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
xaccAddComboCellMenuItem (cell, _("Equity"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Equity"));
|
||||
break;
|
||||
case STOCK_REGISTER:
|
||||
case PORTFOLIO_LEDGER:
|
||||
case CURRENCY_REGISTER:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
xaccAddComboCellMenuItem (cell, _("Price"));
|
||||
xaccAddComboCellMenuItem (cell, _("Fee"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Price"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Fee"));
|
||||
/* Action: Dividend */
|
||||
xaccAddComboCellMenuItem (cell, _("Div"));
|
||||
xaccAddComboCellMenuItem (cell, _("Int"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Div"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Int"));
|
||||
/* Action: Long Term Capital Gains */
|
||||
xaccAddComboCellMenuItem (cell, _("LTCG"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("LTCG"));
|
||||
/* Action: Short Term Capital Gains */
|
||||
xaccAddComboCellMenuItem (cell, _("STCG"));
|
||||
xaccAddComboCellMenuItem (cell, _("Income"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("STCG"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Income"));
|
||||
/* Action: Distribution */
|
||||
xaccAddComboCellMenuItem (cell, _("Dist"));
|
||||
xaccAddComboCellMenuItem (cell, _("Split"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Dist"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Split"));
|
||||
break;
|
||||
|
||||
default:
|
||||
xaccAddComboCellMenuItem (cell, _("Buy"));
|
||||
xaccAddComboCellMenuItem (cell, _("Sell"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Buy"));
|
||||
gnc_combo_cell_add_menu_item (cell, _("Sell"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -822,7 +822,7 @@ xaccInitSplitRegister (SplitRegister *reg,
|
||||
const char *help = _("This transaction has multiple splits; "
|
||||
"press the Split button to see them all");
|
||||
|
||||
xaccComboCellAddIgnoreString
|
||||
gnc_combo_cell_add_ignore_string
|
||||
((ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL),
|
||||
_("-- Split Transaction --"), help);
|
||||
@ -832,14 +832,14 @@ xaccInitSplitRegister (SplitRegister *reg,
|
||||
const char *help = _("This transaction is a stock split; "
|
||||
"press the Split button to see details");
|
||||
|
||||
xaccComboCellAddIgnoreString
|
||||
gnc_combo_cell_add_ignore_string
|
||||
((ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, MXFRM_CELL),
|
||||
_("-- Stock Split --"), help);
|
||||
}
|
||||
|
||||
/* the action cell */
|
||||
xaccComboCellSetAutoSize
|
||||
gnc_combo_cell_set_autosize
|
||||
((ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, ACTN_CELL), TRUE);
|
||||
|
||||
@ -882,7 +882,7 @@ xaccInitSplitRegister (SplitRegister *reg,
|
||||
gnc_default_share_print_info ());
|
||||
|
||||
/* The action cell should accept strings not in the list */
|
||||
xaccComboCellSetStrict
|
||||
gnc_combo_cell_set_strict
|
||||
((ComboCell *)
|
||||
gnc_table_layout_get_cell (reg->table->layout, ACTN_CELL), FALSE);
|
||||
|
||||
|
@ -75,17 +75,17 @@ typedef struct _PopBox
|
||||
} PopBox;
|
||||
|
||||
|
||||
static void block_list_signals (ComboCell *cell);
|
||||
static void unblock_list_signals (ComboCell *cell);
|
||||
static void combo_cell_gui_realize (BasicCell *bcell, gpointer w);
|
||||
static void combo_cell_gui_move (BasicCell *bcell);
|
||||
static void combo_cell_gui_destroy (BasicCell *bcell);
|
||||
static gboolean combo_cell_enter (BasicCell *bcell,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection);
|
||||
static void combo_cell_leave (BasicCell *bcell);
|
||||
static void combo_cell_destroy (BasicCell *bcell);
|
||||
static void gnc_combo_cell_block_list_signals (ComboCell *cell);
|
||||
static void gnc_combo_cell_unblock_list_signals (ComboCell *cell);
|
||||
static void gnc_combo_cell_gui_realize (BasicCell *bcell, gpointer w);
|
||||
static void gnc_combo_cell_gui_move (BasicCell *bcell);
|
||||
static void gnc_combo_cell_gui_destroy (BasicCell *bcell);
|
||||
static gboolean gnc_combo_cell_enter (BasicCell *bcell,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection);
|
||||
static void gnc_combo_cell_leave (BasicCell *bcell);
|
||||
static void gnc_combo_cell_destroy (BasicCell *bcell);
|
||||
|
||||
/* This static indicates the debugging module that this .o belongs to. */
|
||||
static short module = MOD_GTK_REG;
|
||||
@ -93,19 +93,19 @@ static gboolean auto_pop_combos = FALSE;
|
||||
|
||||
|
||||
BasicCell *
|
||||
xaccMallocComboCell (void)
|
||||
gnc_combo_cell_new (void)
|
||||
{
|
||||
ComboCell * cell;
|
||||
|
||||
cell = g_new0 (ComboCell, 1);
|
||||
|
||||
xaccInitComboCell (cell);
|
||||
gnc_combo_cell_init (cell);
|
||||
|
||||
return &cell->cell;
|
||||
}
|
||||
|
||||
void
|
||||
xaccInitComboCell (ComboCell *cell)
|
||||
gnc_combo_cell_init (ComboCell *cell)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -113,10 +113,10 @@ xaccInitComboCell (ComboCell *cell)
|
||||
|
||||
cell->cell.is_popup = TRUE;
|
||||
|
||||
cell->cell.destroy = combo_cell_destroy;
|
||||
cell->cell.destroy = gnc_combo_cell_destroy;
|
||||
|
||||
cell->cell.gui_realize = combo_cell_gui_realize;
|
||||
cell->cell.gui_destroy = combo_cell_gui_destroy;
|
||||
cell->cell.gui_realize = gnc_combo_cell_gui_realize;
|
||||
cell->cell.gui_destroy = gnc_combo_cell_gui_destroy;
|
||||
|
||||
box = g_new0 (PopBox, 1);
|
||||
|
||||
@ -263,7 +263,7 @@ unblock_list_signals (ComboCell *cell)
|
||||
}
|
||||
|
||||
static void
|
||||
combo_cell_gui_destroy (BasicCell *bcell)
|
||||
gnc_combo_cell_gui_destroy (BasicCell *bcell)
|
||||
{
|
||||
PopBox *box = bcell->gui_private;
|
||||
ComboCell *cell = (ComboCell *) bcell;
|
||||
@ -278,7 +278,7 @@ combo_cell_gui_destroy (BasicCell *bcell)
|
||||
}
|
||||
|
||||
/* allow the widget to be shown again */
|
||||
cell->cell.gui_realize = combo_cell_gui_realize;
|
||||
cell->cell.gui_realize = gnc_combo_cell_gui_realize;
|
||||
cell->cell.gui_move = NULL;
|
||||
cell->cell.enter_cell = NULL;
|
||||
cell->cell.leave_cell = NULL;
|
||||
@ -295,12 +295,12 @@ menustring_free (gpointer string, gpointer user_data)
|
||||
}
|
||||
|
||||
static void
|
||||
combo_cell_destroy (BasicCell *bcell)
|
||||
gnc_combo_cell_destroy (BasicCell *bcell)
|
||||
{
|
||||
ComboCell *cell = (ComboCell *) bcell;
|
||||
PopBox *box = cell->cell.gui_private;
|
||||
|
||||
combo_cell_gui_destroy (&(cell->cell));
|
||||
gnc_combo_cell_gui_destroy (&(cell->cell));
|
||||
|
||||
if (box != NULL)
|
||||
{
|
||||
@ -340,7 +340,7 @@ combo_cell_destroy (BasicCell *bcell)
|
||||
}
|
||||
|
||||
void
|
||||
xaccClearComboCellMenu (ComboCell * cell)
|
||||
gnc_combo_cell_clear_menu (ComboCell * cell)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -353,8 +353,8 @@ xaccClearComboCellMenu (ComboCell * cell)
|
||||
if (box->menustrings == NULL)
|
||||
return;
|
||||
|
||||
g_list_foreach(box->menustrings, menustring_free, NULL);
|
||||
g_list_free(box->menustrings);
|
||||
g_list_foreach (box->menustrings, menustring_free, NULL);
|
||||
g_list_free (box->menustrings);
|
||||
box->menustrings = NULL;
|
||||
|
||||
gnc_quickfill_destroy (box->qf);
|
||||
@ -362,11 +362,11 @@ xaccClearComboCellMenu (ComboCell * cell)
|
||||
|
||||
if (box->item_list != NULL)
|
||||
{
|
||||
block_list_signals(cell);
|
||||
block_list_signals (cell);
|
||||
|
||||
gnc_item_list_clear(box->item_list);
|
||||
gnc_item_list_clear (box->item_list);
|
||||
|
||||
unblock_list_signals(cell);
|
||||
unblock_list_signals (cell);
|
||||
}
|
||||
|
||||
box->list_in_sync = TRUE;
|
||||
@ -403,7 +403,7 @@ gnc_combo_sort_edit_list(PopBox *box)
|
||||
}
|
||||
|
||||
void
|
||||
xaccAddComboCellMenuItem (ComboCell *cell, char * menustr)
|
||||
gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -437,20 +437,20 @@ xaccAddComboCellMenuItem (ComboCell *cell, char * menustr)
|
||||
}
|
||||
|
||||
void
|
||||
xaccSetComboCellValue (ComboCell *cell, const char *str)
|
||||
gnc_combo_cell_set_value (ComboCell *cell, const char *str)
|
||||
{
|
||||
gnc_basic_cell_set_value (&cell->cell, str);
|
||||
}
|
||||
|
||||
static void
|
||||
ComboMV (BasicCell *_cell,
|
||||
const GdkWChar *change,
|
||||
int change_len,
|
||||
const GdkWChar *newval,
|
||||
int newval_len,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection)
|
||||
gnc_combo_cell_modify_verify (BasicCell *_cell,
|
||||
const GdkWChar *change,
|
||||
int change_len,
|
||||
const GdkWChar *newval,
|
||||
int newval_len,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection)
|
||||
{
|
||||
ComboCell *cell = (ComboCell *) _cell;
|
||||
PopBox *box = cell->cell.gui_private;
|
||||
@ -521,11 +521,11 @@ ComboMV (BasicCell *_cell,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
ComboDirect (BasicCell *bcell,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection,
|
||||
void *gui_data)
|
||||
gnc_combo_cell_direct_update (BasicCell *bcell,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection,
|
||||
void *gui_data)
|
||||
{
|
||||
ComboCell *cell = (ComboCell *) bcell;
|
||||
PopBox *box = cell->cell.gui_private;
|
||||
@ -705,7 +705,7 @@ ComboHelpValue (BasicCell *bcell)
|
||||
}
|
||||
|
||||
static void
|
||||
combo_cell_gui_realize (BasicCell *bcell, gpointer data)
|
||||
gnc_combo_cell_gui_realize (BasicCell *bcell, gpointer data)
|
||||
{
|
||||
GnucashSheet *sheet = data;
|
||||
GnomeCanvasItem *item = sheet->item_editor;
|
||||
@ -722,17 +722,17 @@ combo_cell_gui_realize (BasicCell *bcell, gpointer data)
|
||||
|
||||
/* to mark cell as realized, remove the realize method */
|
||||
cell->cell.gui_realize = NULL;
|
||||
cell->cell.gui_move = combo_cell_gui_move;
|
||||
cell->cell.enter_cell = combo_cell_enter;
|
||||
cell->cell.leave_cell = combo_cell_leave;
|
||||
cell->cell.gui_destroy = combo_cell_gui_destroy;
|
||||
cell->cell.modify_verify = ComboMV;
|
||||
cell->cell.direct_update = ComboDirect;
|
||||
cell->cell.gui_move = gnc_combo_cell_gui_move;
|
||||
cell->cell.enter_cell = gnc_combo_cell_enter;
|
||||
cell->cell.leave_cell = gnc_combo_cell_leave;
|
||||
cell->cell.gui_destroy = gnc_combo_cell_gui_destroy;
|
||||
cell->cell.modify_verify = gnc_combo_cell_modify_verify;
|
||||
cell->cell.direct_update = gnc_combo_cell_direct_update;
|
||||
cell->cell.get_help_value = ComboHelpValue;
|
||||
}
|
||||
|
||||
static void
|
||||
combo_cell_gui_move (BasicCell *bcell)
|
||||
gnc_combo_cell_gui_move (BasicCell *bcell)
|
||||
{
|
||||
PopBox *box = bcell->gui_private;
|
||||
|
||||
@ -744,8 +744,6 @@ combo_cell_gui_move (BasicCell *bcell)
|
||||
box->list_popped = FALSE;
|
||||
}
|
||||
|
||||
/* =============================================== */
|
||||
|
||||
static int
|
||||
get_popup_height (GnomeCanvasItem *item,
|
||||
int space_available,
|
||||
@ -798,7 +796,7 @@ popup_get_width (GnomeCanvasItem *item,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
combo_cell_enter (BasicCell *bcell,
|
||||
gnc_combo_cell_enter (BasicCell *bcell,
|
||||
int *cursor_position,
|
||||
int *start_selection,
|
||||
int *end_selection)
|
||||
@ -836,7 +834,7 @@ combo_cell_enter (BasicCell *bcell,
|
||||
}
|
||||
|
||||
static void
|
||||
combo_cell_leave (BasicCell *bcell)
|
||||
gnc_combo_cell_leave (BasicCell *bcell)
|
||||
{
|
||||
PopBox *box = bcell->gui_private;
|
||||
|
||||
@ -868,7 +866,7 @@ combo_cell_leave (BasicCell *bcell)
|
||||
}
|
||||
|
||||
void
|
||||
xaccComboCellSetStrict (ComboCell *cell, gboolean strict)
|
||||
gnc_combo_cell_set_strict (ComboCell *cell, gboolean strict)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -881,7 +879,7 @@ xaccComboCellSetStrict (ComboCell *cell, gboolean strict)
|
||||
}
|
||||
|
||||
void
|
||||
xaccComboCellSetCompleteChar (ComboCell *cell, char complete_char)
|
||||
gnc_combo_cell_set_complete_char (ComboCell *cell, char complete_char)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -894,9 +892,9 @@ xaccComboCellSetCompleteChar (ComboCell *cell, char complete_char)
|
||||
}
|
||||
|
||||
void
|
||||
xaccComboCellAddIgnoreString (ComboCell *cell,
|
||||
const char *ignore_string,
|
||||
const char *ignore_help)
|
||||
gnc_combo_cell_add_ignore_string (ComboCell *cell,
|
||||
const char *ignore_string,
|
||||
const char *ignore_help)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -912,7 +910,7 @@ xaccComboCellAddIgnoreString (ComboCell *cell,
|
||||
}
|
||||
|
||||
void
|
||||
xaccComboCellSetAutoSize (ComboCell *cell, gboolean autosize)
|
||||
gnc_combo_cell_set_autosize (ComboCell *cell, gboolean autosize)
|
||||
{
|
||||
PopBox *box;
|
||||
|
||||
@ -927,7 +925,7 @@ xaccComboCellSetAutoSize (ComboCell *cell, gboolean autosize)
|
||||
}
|
||||
|
||||
void
|
||||
xaccComboCellSetAutoPop (gboolean auto_pop_combos_arg)
|
||||
gnc_combo_cell_set_autopop (gboolean auto_pop_combos_arg)
|
||||
{
|
||||
auto_pop_combos = auto_pop_combos_arg;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user