mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Remove guile dependency from src/register/gnome
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2481 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1cbaa7e0e1
commit
dc99c087e5
@ -1,3 +1,12 @@
|
||||
2000-06-19 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/gnome/top-level.c: configure list auto-popping from here.
|
||||
|
||||
* src/register/gnome/combocell-gnome.c: determine whether or not
|
||||
to auto-pop lists based on a class variable, and not by looking
|
||||
up the guile function. This removes a src/guile dependency from
|
||||
src/register/gnome.
|
||||
|
||||
2000-06-14 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/register/gnome/gnucash-item-edit.c (item_edit_show_list):
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include "SplitLedger.h"
|
||||
#include "guile-util.h"
|
||||
#include "splitreg.h"
|
||||
#include "combocell.h"
|
||||
|
||||
|
||||
/** PROTOTYPES ******************************************************/
|
||||
@ -68,6 +69,8 @@ static void gnc_configure_register_borders(void);
|
||||
static void gnc_configure_reverse_balance_cb(void *);
|
||||
static void gnc_configure_reverse_balance(void);
|
||||
static void gnc_configure_sr_label_callbacks();
|
||||
static void gnc_configure_auto_raise_cb(void *);
|
||||
static void gnc_configure_auto_raise(void);
|
||||
|
||||
/** GLOBALS *********************************************************/
|
||||
/* This static indicates the debugging module that this .o belongs to. */
|
||||
@ -85,6 +88,7 @@ static SCM account_separator_callback_id = SCM_UNDEFINED;
|
||||
static SCM register_colors_callback_id = SCM_UNDEFINED;
|
||||
static SCM register_borders_callback_id = SCM_UNDEFINED;
|
||||
static SCM reverse_balance_callback_id = SCM_UNDEFINED;
|
||||
static SCM auto_raise_callback_id = SCM_UNDEFINED;
|
||||
|
||||
/* ============================================================== */
|
||||
|
||||
@ -169,6 +173,12 @@ gnucash_ui_init()
|
||||
NULL, "General",
|
||||
"Reversed-balance account types");
|
||||
|
||||
gnc_configure_auto_raise();
|
||||
auto_raise_callback_id =
|
||||
gnc_register_option_change_callback(gnc_configure_auto_raise_cb,
|
||||
NULL, "Register",
|
||||
"Auto-Raise Lists");
|
||||
|
||||
gnc_configure_sr_label_callbacks();
|
||||
|
||||
mainWindow();
|
||||
@ -221,6 +231,7 @@ gnc_ui_destroy (void)
|
||||
gnc_unregister_option_change_callback_id(register_colors_callback_id);
|
||||
gnc_unregister_option_change_callback_id(register_borders_callback_id);
|
||||
gnc_unregister_option_change_callback_id(reverse_balance_callback_id);
|
||||
gnc_unregister_option_change_callback_id(auto_raise_callback_id);
|
||||
|
||||
if (app != NULL)
|
||||
{
|
||||
@ -586,6 +597,37 @@ gnc_configure_register_borders(void)
|
||||
gnucash_style_set_register_borders (reg_borders);
|
||||
}
|
||||
|
||||
/* gnc_configure_auto_raise_cb
|
||||
* Callback called when options change - sets
|
||||
* auto-raise status of combocell class
|
||||
*
|
||||
* Args: Nothing
|
||||
* Returns: Nothing
|
||||
*/
|
||||
static void
|
||||
gnc_configure_auto_raise_cb(void *data)
|
||||
{
|
||||
gnc_configure_auto_raise();
|
||||
}
|
||||
|
||||
/* gnc_configure_auto_raise
|
||||
* sets combocell auto raise status
|
||||
*
|
||||
* Args: Nothing
|
||||
* Returns: Nothing
|
||||
*/
|
||||
static void
|
||||
gnc_configure_auto_raise(void)
|
||||
{
|
||||
gncBoolean auto_pop;
|
||||
|
||||
auto_pop = gnc_lookup_boolean_option("Register",
|
||||
"Auto-Raise Lists",
|
||||
GNC_T);
|
||||
|
||||
xaccComboCellSetAutoPop(auto_pop);
|
||||
}
|
||||
|
||||
/* gnc_configure_reverse_balance_cb
|
||||
* Callback called when options change - sets
|
||||
* reverse balance info for the callback
|
||||
|
@ -60,26 +60,26 @@ void xaccSetComboCellValue (ComboCell *, const char *);
|
||||
void xaccClearComboCellMenu (ComboCell *);
|
||||
void xaccAddComboCellMenuItem (ComboCell *, char * menustr);
|
||||
|
||||
/* Only functional in Gnome, right now. Determines whether
|
||||
* the cell will accept strings not in the menu. Defaults
|
||||
* to strict, i.e., only menu items are accepted. */
|
||||
/* Determines whether the cell will accept strings not in the
|
||||
* menu. Defaults to strict, i.e., only menu items are accepted. */
|
||||
void xaccComboCellSetStrict (ComboCell *, gncBoolean);
|
||||
|
||||
/* Only functional in Gnome, right now. Sets a character used
|
||||
* for special completion processing. */
|
||||
/* Sets a character used for special completion processing. */
|
||||
void xaccComboCellSetCompleteChar (ComboCell *, char);
|
||||
|
||||
/* Only functional in Gnome, right now. Sets a string which,
|
||||
* if the cell has that value, will be returned on an enter,
|
||||
* thus preventing the cell from being edited. This is used
|
||||
* for transactions with multiple splits. */
|
||||
/* Sets a string which, if the cell has that value, will be returned
|
||||
* on an enter, thus preventing the cell from being edited. This is
|
||||
* used for transactions with multiple splits. */
|
||||
void xaccComboCellSetIgnoreString (ComboCell *, const char *);
|
||||
|
||||
/* Only functional in Gnome, right now. Sets a string which,
|
||||
* if the cell has the ignore value, will be returned as the
|
||||
* help string. */
|
||||
/* Sets a string which, if the cell has the ignore value, will be
|
||||
* returned as the help string. */
|
||||
void xaccComboCellSetIgnoreHelp (ComboCell *, const char *);
|
||||
|
||||
/* Determines whether combocells are automatically raised upon typing.
|
||||
* Defaults to false. This is a 'class' method. */
|
||||
void xaccComboCellSetAutoPop (gncBoolean auto_pop_combos);
|
||||
|
||||
#endif /* __XACC_COMBO_CELL_H__ */
|
||||
|
||||
/* --------------- end of file ---------------------- */
|
||||
|
@ -31,5 +31,4 @@ CFLAGS = @CFLAGS@ ${GNOME_CFLAGS}
|
||||
INCLUDES = \
|
||||
-I${top_srcdir}/src \
|
||||
-I${top_srcdir}/src/engine \
|
||||
-I${top_srcdir}/src/guile \
|
||||
-I${top_srcdir}/src/register
|
||||
|
@ -129,7 +129,7 @@ EXTRA_DIST = .cvsignore
|
||||
|
||||
CFLAGS = @CFLAGS@ ${GNOME_CFLAGS}
|
||||
|
||||
INCLUDES = -I${top_srcdir}/src -I${top_srcdir}/src/engine -I${top_srcdir}/src/guile -I${top_srcdir}/src/register
|
||||
INCLUDES = -I${top_srcdir}/src -I${top_srcdir}/src/engine -I${top_srcdir}/src/register
|
||||
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../../config.h
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "gnucash-sheet.h"
|
||||
#include "gnucash-item-edit.h"
|
||||
#include "gnucash-item-list.h"
|
||||
#include "global-options.h"
|
||||
#include "messages.h"
|
||||
#include "util.h"
|
||||
|
||||
@ -90,6 +89,7 @@ static const char * leaveCombo (BasicCell *bcell, const char *value);
|
||||
|
||||
/* This static indicates the debugging module that this .o belongs to. */
|
||||
static short module = MOD_GTK_REG;
|
||||
static gncBoolean auto_pop_combos = GNC_F;
|
||||
|
||||
/* =============================================== */
|
||||
|
||||
@ -505,9 +505,7 @@ ComboMV (BasicCell *_cell,
|
||||
*cursor_position += strlen(change);
|
||||
|
||||
if (!box->list_popped)
|
||||
pop_list = gnc_lookup_boolean_option("Register",
|
||||
"Auto-Raise Lists",
|
||||
TRUE);
|
||||
pop_list = auto_pop_combos;
|
||||
else
|
||||
pop_list = FALSE;
|
||||
|
||||
@ -876,6 +874,14 @@ xaccComboCellSetIgnoreHelp (ComboCell *cell, const char *ignore_help)
|
||||
box->ignore_help = g_strdup(ignore_help);
|
||||
}
|
||||
|
||||
/* =============================================== */
|
||||
|
||||
void
|
||||
xaccComboCellSetAutoPop (gncBoolean auto_pop_combos_arg)
|
||||
{
|
||||
auto_pop_combos = auto_pop_combos_arg;
|
||||
}
|
||||
|
||||
/* =============== end of file =================== */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user