mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge Bob Fewell's 'gtk3-update3' branch.
This commit is contained in:
commit
b60057dbeb
@ -154,7 +154,6 @@ gfec_eval_string(const char *str, gfec_error_handler error_handler)
|
|||||||
SCM
|
SCM
|
||||||
gfec_eval_file(const char *file, gfec_error_handler error_handler)
|
gfec_eval_file(const char *file, gfec_error_handler error_handler)
|
||||||
{
|
{
|
||||||
char *err_msg = NULL;
|
|
||||||
gchar *contents = NULL;
|
gchar *contents = NULL;
|
||||||
GError *save_error = NULL;
|
GError *save_error = NULL;
|
||||||
SCM result;
|
SCM result;
|
||||||
|
@ -60,11 +60,9 @@ static time64 gnc_accounting_period_end_time64 (GncAccountingPeriod which,
|
|||||||
static time64
|
static time64
|
||||||
lookup_start_date_option(GDate *fy_end)
|
lookup_start_date_option(GDate *fy_end)
|
||||||
{
|
{
|
||||||
gchar *choice;
|
|
||||||
time64 time;
|
time64 time;
|
||||||
int which;
|
int which;
|
||||||
|
|
||||||
|
|
||||||
if (gnc_prefs_get_bool (GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_CHOICE_ABS))
|
if (gnc_prefs_get_bool (GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_CHOICE_ABS))
|
||||||
time = gnc_prefs_get_int64 (GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_DATE);
|
time = gnc_prefs_get_int64 (GNC_PREFS_GROUP_ACCT_SUMMARY, GNC_PREF_START_DATE);
|
||||||
else
|
else
|
||||||
|
@ -620,7 +620,6 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
|
|||||||
xmlChar *newURL;
|
xmlChar *newURL;
|
||||||
gchar *tmpdir = g_build_filename (g_get_home_dir (), ".gnc-migration-tmp", NULL);
|
gchar *tmpdir = g_build_filename (g_get_home_dir (), ".gnc-migration-tmp", NULL);
|
||||||
|
|
||||||
int i;
|
|
||||||
const char *lastsegment = URL;
|
const char *lastsegment = URL;
|
||||||
const char *iter = URL;
|
const char *iter = URL;
|
||||||
|
|
||||||
@ -700,7 +699,7 @@ void gnc_gsettings_migrate_from_gconf (void)
|
|||||||
gchar *pkgdatadir, *stylesheet, *input, *output, *command;
|
gchar *pkgdatadir, *stylesheet, *input, *output, *command;
|
||||||
gchar *gconf_root, *gconf_apps, *gconf_gnucash;
|
gchar *gconf_root, *gconf_apps, *gconf_gnucash;
|
||||||
gchar *base_dir, *iter;
|
gchar *base_dir, *iter;
|
||||||
SCM migr_script, result;
|
SCM migr_script;
|
||||||
xsltStylesheetPtr stylesheetptr = NULL;
|
xsltStylesheetPtr stylesheetptr = NULL;
|
||||||
xmlDocPtr inputxml, transformedxml;
|
xmlDocPtr inputxml, transformedxml;
|
||||||
FILE *outfile;
|
FILE *outfile;
|
||||||
|
@ -70,7 +70,7 @@ static void
|
|||||||
gnc_state_set_base (const QofSession *session)
|
gnc_state_set_base (const QofSession *session)
|
||||||
{
|
{
|
||||||
gchar *basename, *original = NULL, *filename, *file_guid;
|
gchar *basename, *original = NULL, *filename, *file_guid;
|
||||||
gchar *sf_extension = NULL, *newstyle_filename = NULL;
|
gchar *sf_extension = NULL;
|
||||||
const gchar *uri;
|
const gchar *uri;
|
||||||
gchar guid_string[GUID_ENCODING_LENGTH+1];
|
gchar guid_string[GUID_ENCODING_LENGTH+1];
|
||||||
QofBook *book;
|
QofBook *book;
|
||||||
@ -200,10 +200,6 @@ gnc_state_set_base (const QofSession *session)
|
|||||||
|
|
||||||
GKeyFile *gnc_state_load (const QofSession *session)
|
GKeyFile *gnc_state_load (const QofSession *session)
|
||||||
{
|
{
|
||||||
|
|
||||||
GKeyFile *keyfile = NULL;
|
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
/* Drop possible previous state_file first */
|
/* Drop possible previous state_file first */
|
||||||
if (state_file)
|
if (state_file)
|
||||||
{
|
{
|
||||||
@ -221,7 +217,6 @@ GKeyFile *gnc_state_load (const QofSession *session)
|
|||||||
TRUE, TRUE, NULL);
|
TRUE, TRUE, NULL);
|
||||||
|
|
||||||
return gnc_state_get_current ();
|
return gnc_state_get_current ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void gnc_state_save (const QofSession *session)
|
void gnc_state_save (const QofSession *session)
|
||||||
|
@ -1584,7 +1584,6 @@ xaccSPrintAmount (char * bufp, gnc_numeric val, GNCPrintAmountInfo info)
|
|||||||
char sign_posn;
|
char sign_posn;
|
||||||
|
|
||||||
gboolean print_sign = TRUE;
|
gboolean print_sign = TRUE;
|
||||||
gboolean is_shares = FALSE;
|
|
||||||
gboolean print_absolute = FALSE;
|
gboolean print_absolute = FALSE;
|
||||||
|
|
||||||
if (!bufp)
|
if (!bufp)
|
||||||
|
@ -57,9 +57,10 @@
|
|||||||
#include "guile-util.h"
|
#include "guile-util.h"
|
||||||
#include "guile-mappings.h"
|
#include "guile-mappings.h"
|
||||||
|
|
||||||
/* This static indicates the debugging module this .o belongs to. */
|
#define UNUSED_VAR __attribute__ ((unused))
|
||||||
static QofLogModule log_module = GNC_MOD_GUILE;
|
|
||||||
|
|
||||||
|
/* This static indicates the debugging module this .o belongs to. */
|
||||||
|
static QofLogModule UNUSED_VAR log_module = GNC_MOD_GUILE;
|
||||||
|
|
||||||
struct _setters
|
struct _setters
|
||||||
{
|
{
|
||||||
|
@ -1726,7 +1726,6 @@ gnc_commit_option(GNCOption *option)
|
|||||||
char *section, *name;
|
char *section, *name;
|
||||||
const gchar *message;
|
const gchar *message;
|
||||||
const gchar *format = _("There is a problem with option %s:%s.\n%s");
|
const gchar *format = _("There is a problem with option %s:%s.\n%s");
|
||||||
char * str;
|
|
||||||
|
|
||||||
/* Second element is error message */
|
/* Second element is error message */
|
||||||
oops = SCM_CADR(result);
|
oops = SCM_CADR(result);
|
||||||
@ -2619,8 +2618,6 @@ gnc_option_db_set_string_option(GNCOptionDB *odb,
|
|||||||
char *
|
char *
|
||||||
gnc_option_date_option_get_subtype(GNCOption *option)
|
gnc_option_date_option_get_subtype(GNCOption *option)
|
||||||
{
|
{
|
||||||
SCM value;
|
|
||||||
|
|
||||||
initialize_getters();
|
initialize_getters();
|
||||||
|
|
||||||
return gnc_scm_call_1_symbol_to_string(getters.date_option_subtype, option->guile_option);
|
return gnc_scm_call_1_symbol_to_string(getters.date_option_subtype, option->guile_option);
|
||||||
@ -2636,8 +2633,6 @@ gnc_option_date_option_get_subtype(GNCOption *option)
|
|||||||
char *
|
char *
|
||||||
gnc_date_option_value_get_type (SCM option_value)
|
gnc_date_option_value_get_type (SCM option_value)
|
||||||
{
|
{
|
||||||
SCM value;
|
|
||||||
|
|
||||||
initialize_getters();
|
initialize_getters();
|
||||||
|
|
||||||
return gnc_scm_call_1_symbol_to_string (getters.date_option_value_type, option_value);
|
return gnc_scm_call_1_symbol_to_string (getters.date_option_value_type, option_value);
|
||||||
@ -2687,8 +2682,6 @@ gnc_date_option_value_get_relative (SCM option_value)
|
|||||||
char *
|
char *
|
||||||
gnc_plot_size_option_value_get_type (SCM option_value)
|
gnc_plot_size_option_value_get_type (SCM option_value)
|
||||||
{
|
{
|
||||||
SCM value;
|
|
||||||
|
|
||||||
initialize_getters();
|
initialize_getters();
|
||||||
|
|
||||||
return gnc_scm_call_1_symbol_to_string (getters.plot_size_option_value_type, option_value);
|
return gnc_scm_call_1_symbol_to_string (getters.plot_size_option_value_type, option_value);
|
||||||
|
@ -613,7 +613,6 @@ inner_main (void *closure, int argc, char **argv)
|
|||||||
{
|
{
|
||||||
SCM main_mod;
|
SCM main_mod;
|
||||||
char* fn;
|
char* fn;
|
||||||
GError *error = NULL;
|
|
||||||
|
|
||||||
scm_c_eval_string("(debug-set! stack 200000)");
|
scm_c_eval_string("(debug-set! stack 200000)");
|
||||||
|
|
||||||
|
@ -126,7 +126,9 @@ struct _invoice_select_window
|
|||||||
GncOwner owner_def;
|
GncOwner owner_def;
|
||||||
};
|
};
|
||||||
|
|
||||||
static QofLogModule log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
|
#define UNUSED_VAR __attribute__ ((unused))
|
||||||
|
|
||||||
|
static QofLogModule UNUSED_VAR log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
|
||||||
|
|
||||||
/** This data structure does double duty. It is used to maintain
|
/** This data structure does double duty. It is used to maintain
|
||||||
* information for the "New Invoice" dialog, and it is also used to
|
* information for the "New Invoice" dialog, and it is also used to
|
||||||
@ -842,7 +844,6 @@ gnc_invoice_post(InvoiceWindow *iw, struct post_invoice_params *post_params)
|
|||||||
GNCPrice *convprice;
|
GNCPrice *convprice;
|
||||||
gnc_commodity *account_currency = (gnc_commodity*)key;
|
gnc_commodity *account_currency = (gnc_commodity*)key;
|
||||||
gnc_numeric *amount = (gnc_numeric*)value;
|
gnc_numeric *amount = (gnc_numeric*)value;
|
||||||
Timespec pricedate;
|
|
||||||
XferDialog *xfer;
|
XferDialog *xfer;
|
||||||
gnc_numeric exch_rate;
|
gnc_numeric exch_rate;
|
||||||
|
|
||||||
@ -2246,7 +2247,6 @@ gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
|
|||||||
{
|
{
|
||||||
GncInvoice *invoice;
|
GncInvoice *invoice;
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *id_label;
|
|
||||||
GtkWidget *dialog, *hbox;
|
GtkWidget *dialog, *hbox;
|
||||||
GncEntryLedger *entry_ledger = NULL;
|
GncEntryLedger *entry_ledger = NULL;
|
||||||
GncOwnerType owner_type;
|
GncOwnerType owner_type;
|
||||||
@ -2595,7 +2595,6 @@ gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
|
|||||||
|
|
||||||
if (dialog_type == DUP_INVOICE)
|
if (dialog_type == DUP_INVOICE)
|
||||||
{
|
{
|
||||||
GtkWidget *invoice_radio = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_invoice_type"));
|
|
||||||
GtkWidget *cn_radio = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_creditnote_type"));
|
GtkWidget *cn_radio = GTK_WIDGET (gtk_builder_get_object (builder, "dialog_creditnote_type"));
|
||||||
|
|
||||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(cn_radio), gncInvoiceGetIsCreditNote (invoice));
|
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(cn_radio), gncInvoiceGetIsCreditNote (invoice));
|
||||||
@ -3288,7 +3287,6 @@ gnc_invoice_show_bills_due (QofBook *book, double days_in_advance, GncWhichDueTy
|
|||||||
DialogQueryView *dialog;
|
DialogQueryView *dialog;
|
||||||
gint len;
|
gint len;
|
||||||
Timespec ts;
|
Timespec ts;
|
||||||
QofQueryCompare comparetype;
|
|
||||||
static GList *param_list = NULL;
|
static GList *param_list = NULL;
|
||||||
static GNCDisplayViewButton vendorbuttons[] =
|
static GNCDisplayViewButton vendorbuttons[] =
|
||||||
{
|
{
|
||||||
|
@ -192,10 +192,8 @@ static gboolean
|
|||||||
gnc_payment_window_check_payment (PaymentWindow *pw)
|
gnc_payment_window_check_payment (PaymentWindow *pw)
|
||||||
{
|
{
|
||||||
const char *conflict_msg = NULL;
|
const char *conflict_msg = NULL;
|
||||||
Account *post, *acc;
|
|
||||||
gnc_numeric amount_deb, amount_cred;
|
gnc_numeric amount_deb, amount_cred;
|
||||||
gboolean enable_xfer_acct = TRUE;
|
gboolean enable_xfer_acct = TRUE;
|
||||||
GtkTreeSelection *selection;
|
|
||||||
|
|
||||||
if (!pw)
|
if (!pw)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -923,7 +923,6 @@ gnc_entry_ledger_get_color_internal (VirtualLocation virt_loc,
|
|||||||
const guint32 *color_table,
|
const guint32 *color_table,
|
||||||
gboolean foreground)
|
gboolean foreground)
|
||||||
{
|
{
|
||||||
const char *cursor_name;
|
|
||||||
VirtualCell *vcell;
|
VirtualCell *vcell;
|
||||||
gboolean is_current;
|
gboolean is_current;
|
||||||
guint32 colorbase = 0; /* By default return background colors */
|
guint32 colorbase = 0; /* By default return background colors */
|
||||||
|
@ -269,7 +269,6 @@ gnc_path_find_localized_html_file (const gchar *file_name)
|
|||||||
gchar *loc_file_name = NULL;
|
gchar *loc_file_name = NULL;
|
||||||
gchar *full_path = NULL;
|
gchar *full_path = NULL;
|
||||||
const gchar * const *lang;
|
const gchar * const *lang;
|
||||||
int i;
|
|
||||||
|
|
||||||
if (!file_name || *file_name == '\0')
|
if (!file_name || *file_name == '\0')
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -305,7 +305,6 @@ gnc_account_get_property (GObject *object,
|
|||||||
Account *account;
|
Account *account;
|
||||||
AccountPrivate *priv;
|
AccountPrivate *priv;
|
||||||
const gchar *key;
|
const gchar *key;
|
||||||
GValue *temp;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_ACCOUNT(object));
|
g_return_if_fail(GNC_IS_ACCOUNT(object));
|
||||||
|
|
||||||
@ -5540,7 +5539,6 @@ gnc_account_imap_add_account_bayes (GncImportMatchMap *imap,
|
|||||||
for (current_token = g_list_first(tokens); current_token;
|
for (current_token = g_list_first(tokens); current_token;
|
||||||
current_token = current_token->next)
|
current_token = current_token->next)
|
||||||
{
|
{
|
||||||
GValue value = G_VALUE_INIT;
|
|
||||||
/* Jump to next iteration if the pointer is not valid or if the
|
/* Jump to next iteration if the pointer is not valid or if the
|
||||||
string is empty. In HBCI import we almost always get an empty
|
string is empty. In HBCI import we almost always get an empty
|
||||||
string, which doesn't work in the kvp loopkup later. So we
|
string, which doesn't work in the kvp loopkup later. So we
|
||||||
|
@ -683,7 +683,6 @@ gnc_transaction_balance_trading (Transaction *trans, Account *root)
|
|||||||
gnc_commodity *commodity;
|
gnc_commodity *commodity;
|
||||||
gnc_numeric old_amount, new_amount;
|
gnc_numeric old_amount, new_amount;
|
||||||
gnc_numeric old_value, new_value, val_imbalance;
|
gnc_numeric old_value, new_value, val_imbalance;
|
||||||
Account *account = NULL;
|
|
||||||
const gnc_commodity *txn_curr = xaccTransGetCurrency (trans);
|
const gnc_commodity *txn_curr = xaccTransGetCurrency (trans);
|
||||||
|
|
||||||
commodity = gnc_monetary_commodity (*imbal_mon);
|
commodity = gnc_monetary_commodity (*imbal_mon);
|
||||||
@ -697,8 +696,6 @@ gnc_transaction_balance_trading (Transaction *trans, Account *root)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
account = xaccSplitGetAccount(balance_split);
|
|
||||||
|
|
||||||
if (! gnc_commodity_equal (txn_curr, commodity))
|
if (! gnc_commodity_equal (txn_curr, commodity))
|
||||||
{
|
{
|
||||||
val_imbalance = gnc_transaction_get_commodity_imbalance (trans, commodity);
|
val_imbalance = gnc_transaction_get_commodity_imbalance (trans, commodity);
|
||||||
@ -757,7 +754,6 @@ gnc_transaction_balance_trading_more_splits (Transaction *trans, Account *root)
|
|||||||
gnc_commodity *commodity;
|
gnc_commodity *commodity;
|
||||||
gnc_numeric old_value, new_value;
|
gnc_numeric old_value, new_value;
|
||||||
Split *balance_split;
|
Split *balance_split;
|
||||||
Account *account = NULL;
|
|
||||||
|
|
||||||
commodity = xaccAccountGetCommodity(xaccSplitGetAccount(split));
|
commodity = xaccAccountGetCommodity(xaccSplitGetAccount(split));
|
||||||
if (!commodity)
|
if (!commodity)
|
||||||
@ -772,8 +768,6 @@ gnc_transaction_balance_trading_more_splits (Transaction *trans, Account *root)
|
|||||||
LEAVE("");
|
LEAVE("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
account = xaccSplitGetAccount(balance_split);
|
|
||||||
|
|
||||||
xaccTransBeginEdit (trans);
|
xaccTransBeginEdit (trans);
|
||||||
|
|
||||||
old_value = xaccSplitGetValue (balance_split);
|
old_value = xaccSplitGetValue (balance_split);
|
||||||
@ -1339,7 +1333,6 @@ void
|
|||||||
xaccAccountScrubKvp (Account *account)
|
xaccAccountScrubKvp (Account *account)
|
||||||
{
|
{
|
||||||
GValue v = G_VALUE_INIT;
|
GValue v = G_VALUE_INIT;
|
||||||
const gchar *str;
|
|
||||||
gchar *str2;
|
gchar *str2;
|
||||||
|
|
||||||
if (!account) return;
|
if (!account) return;
|
||||||
|
@ -51,7 +51,6 @@ static void
|
|||||||
gncScrubInvoiceState (GNCLot *lot)
|
gncScrubInvoiceState (GNCLot *lot)
|
||||||
{
|
{
|
||||||
SplitList *ls_iter = NULL;
|
SplitList *ls_iter = NULL;
|
||||||
Transaction *txn = NULL; // ll_txn = "Lot Link Transaction"
|
|
||||||
GncInvoice *invoice = NULL;
|
GncInvoice *invoice = NULL;
|
||||||
GncInvoice *lot_invoice = gncInvoiceGetInvoiceFromLot (lot);
|
GncInvoice *lot_invoice = gncInvoiceGetInvoiceFromLot (lot);
|
||||||
|
|
||||||
|
@ -1568,9 +1568,6 @@ xaccSplitOrderDateOnly (const Split *sa, const Split *sb)
|
|||||||
static gboolean
|
static gboolean
|
||||||
get_corr_account_split(const Split *sa, const Split **retval)
|
get_corr_account_split(const Split *sa, const Split **retval)
|
||||||
{
|
{
|
||||||
|
|
||||||
const Split *current_split;
|
|
||||||
|
|
||||||
*retval = NULL;
|
*retval = NULL;
|
||||||
g_return_val_if_fail(sa, FALSE);
|
g_return_val_if_fail(sa, FALSE);
|
||||||
|
|
||||||
|
@ -314,7 +314,6 @@ gnc_transaction_get_property(GObject* object,
|
|||||||
{
|
{
|
||||||
Transaction* tx;
|
Transaction* tx;
|
||||||
gchar *key;
|
gchar *key;
|
||||||
GValue *temp;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_TRANSACTION(object));
|
g_return_if_fail(GNC_IS_TRANSACTION(object));
|
||||||
|
|
||||||
@ -2676,7 +2675,7 @@ xaccTransGetVoidTime(const Transaction *tr)
|
|||||||
{
|
{
|
||||||
GValue v = G_VALUE_INIT;
|
GValue v = G_VALUE_INIT;
|
||||||
const char *s = NULL;
|
const char *s = NULL;
|
||||||
Timespec void_time = {0, 0}, *ts;
|
Timespec void_time = {0, 0};
|
||||||
|
|
||||||
g_return_val_if_fail(tr, void_time);
|
g_return_val_if_fail(tr, void_time);
|
||||||
qof_instance_get_kvp (QOF_INSTANCE (tr), void_time_str, &v);
|
qof_instance_get_kvp (QOF_INSTANCE (tr), void_time_str, &v);
|
||||||
|
@ -658,7 +658,6 @@ gnc_query_scm2path (SCM path_scm)
|
|||||||
while (!scm_is_null (path_scm))
|
while (!scm_is_null (path_scm))
|
||||||
{
|
{
|
||||||
SCM key_scm = SCM_CAR (path_scm);
|
SCM key_scm = SCM_CAR (path_scm);
|
||||||
char *str;
|
|
||||||
char *key;
|
char *key;
|
||||||
|
|
||||||
if (!scm_is_string (key_scm))
|
if (!scm_is_string (key_scm))
|
||||||
|
@ -1080,7 +1080,6 @@ gnc_commodity_get_fraction(const gnc_commodity * cm)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gnc_commodity_get_auto_quote_control_flag(const gnc_commodity *cm)
|
gnc_commodity_get_auto_quote_control_flag(const gnc_commodity *cm)
|
||||||
{
|
{
|
||||||
const char *str;
|
|
||||||
GValue v = G_VALUE_INIT;
|
GValue v = G_VALUE_INIT;
|
||||||
|
|
||||||
if (!cm) return FALSE;
|
if (!cm) return FALSE;
|
||||||
@ -1144,7 +1143,6 @@ gnc_commodity_get_quote_tz(const gnc_commodity *cm)
|
|||||||
const char*
|
const char*
|
||||||
gnc_commodity_get_user_symbol(const gnc_commodity *cm)
|
gnc_commodity_get_user_symbol(const gnc_commodity *cm)
|
||||||
{
|
{
|
||||||
const char *str;
|
|
||||||
GValue v = G_VALUE_INIT;
|
GValue v = G_VALUE_INIT;
|
||||||
if (!cm) return NULL;
|
if (!cm) return NULL;
|
||||||
qof_instance_get_kvp (QOF_INSTANCE(cm), "user_symbol", &v);
|
qof_instance_get_kvp (QOF_INSTANCE(cm), "user_symbol", &v);
|
||||||
@ -1159,7 +1157,6 @@ gnc_commodity_get_user_symbol(const gnc_commodity *cm)
|
|||||||
const char*
|
const char*
|
||||||
gnc_commodity_get_default_symbol(const gnc_commodity *cm)
|
gnc_commodity_get_default_symbol(const gnc_commodity *cm)
|
||||||
{
|
{
|
||||||
const char *str;
|
|
||||||
if (!cm) return NULL;
|
if (!cm) return NULL;
|
||||||
return GET_PRIVATE(cm)->default_symbol;
|
return GET_PRIVATE(cm)->default_symbol;
|
||||||
}
|
}
|
||||||
|
@ -101,11 +101,6 @@ typedef struct LotPrivate
|
|||||||
|
|
||||||
/* ============================================================= */
|
/* ============================================================= */
|
||||||
|
|
||||||
static void gnc_lot_set_invoice (GNCLot* lot, GncGUID *guid);
|
|
||||||
static GncGUID *gnc_lot_get_invoice (GNCLot* lot);
|
|
||||||
|
|
||||||
/* ============================================================= */
|
|
||||||
|
|
||||||
/* GObject Initialization */
|
/* GObject Initialization */
|
||||||
G_DEFINE_TYPE(GNCLot, gnc_lot, QOF_TYPE_INSTANCE)
|
G_DEFINE_TYPE(GNCLot, gnc_lot, QOF_TYPE_INSTANCE)
|
||||||
|
|
||||||
@ -139,7 +134,6 @@ gnc_lot_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec*
|
|||||||
GNCLot* lot;
|
GNCLot* lot;
|
||||||
LotPrivate* priv;
|
LotPrivate* priv;
|
||||||
gchar *key;
|
gchar *key;
|
||||||
GValue *temp;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_LOT(object));
|
g_return_if_fail(GNC_IS_LOT(object));
|
||||||
|
|
||||||
|
@ -1539,7 +1539,6 @@ gnc_pricedb_lookup_latest(GNCPriceDB *db,
|
|||||||
{
|
{
|
||||||
GList *price_list;
|
GList *price_list;
|
||||||
GNCPrice *result;
|
GNCPrice *result;
|
||||||
GHashTable *currency_hash;
|
|
||||||
|
|
||||||
if (!db || !commodity || !currency) return NULL;
|
if (!db || !commodity || !currency) return NULL;
|
||||||
ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
|
ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
|
||||||
@ -1556,20 +1555,6 @@ gnc_pricedb_lookup_latest(GNCPriceDB *db,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
lookup_latest(gpointer key, gpointer val, gpointer user_data)
|
|
||||||
{
|
|
||||||
//gnc_commodity *currency = (gnc_commodity *)key;
|
|
||||||
GList *price_list = (GList *)val;
|
|
||||||
GList **return_list = (GList **)user_data;
|
|
||||||
|
|
||||||
if (!price_list) return;
|
|
||||||
|
|
||||||
/* the latest price is the first in list */
|
|
||||||
gnc_price_list_insert(return_list, price_list->data, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GList **list;
|
GList **list;
|
||||||
@ -2029,7 +2014,6 @@ gnc_pricedb_lookup_at_time(GNCPriceDB *db,
|
|||||||
{
|
{
|
||||||
GList *price_list;
|
GList *price_list;
|
||||||
GList *item = NULL;
|
GList *item = NULL;
|
||||||
GHashTable *currency_hash;
|
|
||||||
|
|
||||||
if (!db || !c || !currency) return NULL;
|
if (!db || !c || !currency) return NULL;
|
||||||
ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
|
ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
|
||||||
@ -2064,7 +2048,6 @@ lookup_nearest_in_time(GNCPriceDB *db,
|
|||||||
GNCPrice *next_price = NULL;
|
GNCPrice *next_price = NULL;
|
||||||
GNCPrice *result = NULL;
|
GNCPrice *result = NULL;
|
||||||
GList *item = NULL;
|
GList *item = NULL;
|
||||||
GHashTable *currency_hash;
|
|
||||||
|
|
||||||
if (!db || !c || !currency) return NULL;
|
if (!db || !c || !currency) return NULL;
|
||||||
ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
|
ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
|
||||||
@ -2185,7 +2168,6 @@ gnc_pricedb_lookup_latest_before (GNCPriceDB *db,
|
|||||||
/* GNCPrice *next_price = NULL;
|
/* GNCPrice *next_price = NULL;
|
||||||
GNCPrice *result = NULL;*/
|
GNCPrice *result = NULL;*/
|
||||||
GList *item = NULL;
|
GList *item = NULL;
|
||||||
GHashTable *currency_hash;
|
|
||||||
Timespec price_time;
|
Timespec price_time;
|
||||||
|
|
||||||
if (!db || !c || !currency) return NULL;
|
if (!db || !c || !currency) return NULL;
|
||||||
|
@ -147,8 +147,6 @@ gnc_search_callback_button_execute (GNCSearchCallbackButton *cb,
|
|||||||
{
|
{
|
||||||
GNCQueryView *qview = GNC_QUERY_VIEW(sw->result_view);
|
GNCQueryView *qview = GNC_QUERY_VIEW(sw->result_view);
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkTreeModel *model;
|
|
||||||
GtkTreeIter iter;
|
|
||||||
|
|
||||||
// Sanity check
|
// Sanity check
|
||||||
g_assert(qview);
|
g_assert(qview);
|
||||||
@ -188,7 +186,6 @@ gnc_search_dialog_result_clicked (GtkButton *button, GNCSearchWindow *sw)
|
|||||||
static void
|
static void
|
||||||
gnc_search_dialog_select_buttons_enable (GNCSearchWindow *sw, gint selected)
|
gnc_search_dialog_select_buttons_enable (GNCSearchWindow *sw, gint selected)
|
||||||
{
|
{
|
||||||
gint i;
|
|
||||||
gboolean enable, read_only;
|
gboolean enable, read_only;
|
||||||
GList *blist;
|
GList *blist;
|
||||||
|
|
||||||
|
@ -667,20 +667,10 @@ verify_children_compatible (AccountWindow *aw)
|
|||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||||
gnc_label_set_alignment (label, 0.0, 0.0);
|
gnc_label_set_alignment (label, 0.0, 0.0);
|
||||||
{
|
|
||||||
GtkCssProvider *provider = gtk_css_provider_new();
|
/* make label large */
|
||||||
const gchar *label_css = {
|
gnc_widget_set_style_context (GTK_WIDGET(label), "primary_label_size");
|
||||||
"label {\n"
|
|
||||||
" font-size:large;\n"
|
|
||||||
" font-weight: bold;\n"
|
|
||||||
"}\n"
|
|
||||||
};
|
|
||||||
gtk_css_provider_load_from_data (provider, label_css, strlen(label_css), NULL);
|
|
||||||
gtk_style_context_add_provider (gtk_widget_get_style_context(GTK_WIDGET(label)),
|
|
||||||
GTK_STYLE_PROVIDER (provider),
|
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
g_object_unref (provider);
|
|
||||||
}
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
|
||||||
|
|
||||||
/* secondary label */
|
/* secondary label */
|
||||||
|
@ -121,7 +121,6 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
|
|||||||
{
|
{
|
||||||
GtkWidget *date_edit;
|
GtkWidget *date_edit;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *label;
|
|
||||||
|
|
||||||
date_edit = gnc_date_edit_new (date, FALSE, FALSE);
|
date_edit = gnc_date_edit_new (date, FALSE, FALSE);
|
||||||
gnc_date_activates_default(GNC_DATE_EDIT(date_edit), TRUE);
|
gnc_date_activates_default(GNC_DATE_EDIT(date_edit), TRUE);
|
||||||
|
@ -2093,7 +2093,6 @@ component_close_handler (gpointer data)
|
|||||||
static void
|
static void
|
||||||
refresh_handler (GHashTable *changes, gpointer user_data)
|
refresh_handler (GHashTable *changes, gpointer user_data)
|
||||||
{
|
{
|
||||||
GNCOptionWin *retval = user_data;
|
|
||||||
gnc_commodity *commodity = NULL;
|
gnc_commodity *commodity = NULL;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
@ -2887,15 +2886,15 @@ static void
|
|||||||
gnc_plot_size_option_set_select_method(GNCOption *option, gboolean set_buttons)
|
gnc_plot_size_option_set_select_method(GNCOption *option, gboolean set_buttons)
|
||||||
{
|
{
|
||||||
GList* widget_list;
|
GList* widget_list;
|
||||||
GtkWidget *px_button, *p_button, *px_widget, *p_widget;
|
GtkWidget *px_widget, *p_widget;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
|
|
||||||
widget = gnc_option_get_gtk_widget (option);
|
widget = gnc_option_get_gtk_widget (option);
|
||||||
|
|
||||||
widget_list = gtk_container_get_children(GTK_CONTAINER(widget));
|
widget_list = gtk_container_get_children(GTK_CONTAINER(widget));
|
||||||
px_button = g_list_nth_data(widget_list, 0);
|
// px_button item 0
|
||||||
px_widget = g_list_nth_data(widget_list, 1);
|
px_widget = g_list_nth_data(widget_list, 1);
|
||||||
p_button = g_list_nth_data(widget_list, 2);
|
// p_button item 2
|
||||||
p_widget = g_list_nth_data(widget_list, 3);
|
p_widget = g_list_nth_data(widget_list, 3);
|
||||||
g_list_free(widget_list);
|
g_list_free(widget_list);
|
||||||
|
|
||||||
@ -3604,7 +3603,6 @@ gnc_option_set_ui_value_currency_accounting (GNCOption *option,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GtkWidget *button = NULL;
|
GtkWidget *button = NULL;
|
||||||
int i;
|
|
||||||
gpointer val;
|
gpointer val;
|
||||||
|
|
||||||
switch (index)
|
switch (index)
|
||||||
@ -3997,14 +3995,14 @@ static SCM
|
|||||||
gnc_option_get_ui_value_plot_size (GNCOption *option, GtkWidget *widget)
|
gnc_option_get_ui_value_plot_size (GNCOption *option, GtkWidget *widget)
|
||||||
{
|
{
|
||||||
GList* widget_list;
|
GList* widget_list;
|
||||||
GtkWidget *px_button, *p_button, *px_widget, *p_widget;
|
GtkWidget *px_button, *px_widget, *p_widget;
|
||||||
gdouble d_value;
|
gdouble d_value;
|
||||||
SCM type, val;
|
SCM type, val;
|
||||||
|
|
||||||
widget_list = gtk_container_get_children(GTK_CONTAINER(widget));
|
widget_list = gtk_container_get_children(GTK_CONTAINER(widget));
|
||||||
px_button = g_list_nth_data(widget_list, 0);
|
px_button = g_list_nth_data(widget_list, 0);
|
||||||
px_widget = g_list_nth_data(widget_list, 1);
|
px_widget = g_list_nth_data(widget_list, 1);
|
||||||
p_button = g_list_nth_data(widget_list, 2);
|
// p_button item 2
|
||||||
p_widget = g_list_nth_data(widget_list, 3);
|
p_widget = g_list_nth_data(widget_list, 3);
|
||||||
g_list_free(widget_list);
|
g_list_free(widget_list);
|
||||||
|
|
||||||
|
@ -549,7 +549,6 @@ gnc_preferences_build_page (gpointer data,
|
|||||||
GtkNotebook *notebook;
|
GtkNotebook *notebook;
|
||||||
addition *add_in;
|
addition *add_in;
|
||||||
struct copy_data copydata;
|
struct copy_data copydata;
|
||||||
gint rows, cols;
|
|
||||||
gchar **widgetname;
|
gchar **widgetname;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
@ -613,7 +612,6 @@ gnc_preferences_build_page (gpointer data,
|
|||||||
if (!existing_content)
|
if (!existing_content)
|
||||||
{
|
{
|
||||||
/* No existing content with this name. Create a blank page */
|
/* No existing content with this name. Create a blank page */
|
||||||
rows = 0;
|
|
||||||
existing_content = gtk_grid_new();
|
existing_content = gtk_grid_new();
|
||||||
gtk_container_set_border_width(GTK_CONTAINER(existing_content), 6);
|
gtk_container_set_border_width(GTK_CONTAINER(existing_content), 6);
|
||||||
label = gtk_label_new(add_in->tabname);
|
label = gtk_label_new(add_in->tabname);
|
||||||
@ -713,7 +711,6 @@ static void
|
|||||||
gnc_prefs_connect_font_button (GtkFontButton *fb)
|
gnc_prefs_connect_font_button (GtkFontButton *fb)
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gchar *font;
|
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
|
g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
|
||||||
|
|
||||||
@ -876,16 +873,11 @@ static void
|
|||||||
gnc_prefs_connect_radio_button (GtkRadioButton *button)
|
gnc_prefs_connect_radio_button (GtkRadioButton *button)
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gboolean active;
|
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
|
g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
|
||||||
|
|
||||||
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(button)), &group, &pref);
|
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(button)), &group, &pref);
|
||||||
|
|
||||||
// active = gnc_prefs_get_bool (group, pref);
|
|
||||||
// DEBUG(" Checkbox %s/%s initially %sactive", group, pref, active ? "" : "in");
|
|
||||||
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), active);
|
|
||||||
|
|
||||||
gnc_prefs_bind (group, pref, G_OBJECT (button), "active");
|
gnc_prefs_bind (group, pref, G_OBJECT (button), "active");
|
||||||
|
|
||||||
g_free (group);
|
g_free (group);
|
||||||
@ -905,16 +897,11 @@ static void
|
|||||||
gnc_prefs_connect_check_button (GtkCheckButton *button)
|
gnc_prefs_connect_check_button (GtkCheckButton *button)
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gboolean active;
|
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_CHECK_BUTTON(button));
|
g_return_if_fail(GTK_IS_CHECK_BUTTON(button));
|
||||||
|
|
||||||
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(button)), &group, &pref);
|
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(button)), &group, &pref);
|
||||||
|
|
||||||
// active = gnc_prefs_get_bool (group, pref);
|
|
||||||
// DEBUG(" Checkbox %s/%s initially %sactive", group, pref, active ? "" : "in");
|
|
||||||
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), active);
|
|
||||||
|
|
||||||
gnc_prefs_bind (group, pref, G_OBJECT (button), "active");
|
gnc_prefs_bind (group, pref, G_OBJECT (button), "active");
|
||||||
|
|
||||||
g_free (group);
|
g_free (group);
|
||||||
@ -934,16 +921,11 @@ static void
|
|||||||
gnc_prefs_connect_spin_button (GtkSpinButton *spin)
|
gnc_prefs_connect_spin_button (GtkSpinButton *spin)
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gdouble value;
|
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
|
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
|
||||||
|
|
||||||
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(spin)), &group, &pref);
|
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(spin)), &group, &pref);
|
||||||
|
|
||||||
// value = gnc_prefs_get_float (group, pref);
|
|
||||||
// gtk_spin_button_set_value(spin, value);
|
|
||||||
// DEBUG(" Spin button %s/%s has initial value %f", group, pref, value);
|
|
||||||
|
|
||||||
gnc_prefs_bind (group, pref, G_OBJECT (spin), "value");
|
gnc_prefs_bind (group, pref, G_OBJECT (spin), "value");
|
||||||
|
|
||||||
g_free (group);
|
g_free (group);
|
||||||
@ -962,16 +944,11 @@ static void
|
|||||||
gnc_prefs_connect_combo_box (GtkComboBox *box)
|
gnc_prefs_connect_combo_box (GtkComboBox *box)
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gint active;
|
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_COMBO_BOX(box));
|
g_return_if_fail(GTK_IS_COMBO_BOX(box));
|
||||||
|
|
||||||
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(box)), &group, &pref);
|
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(box)), &group, &pref);
|
||||||
|
|
||||||
// active = gnc_prefs_get_int(group, pref);
|
|
||||||
// gtk_combo_box_set_active(GTK_COMBO_BOX(box), active);
|
|
||||||
// DEBUG(" Combo box %s/%s set to item %d", group, pref, active);
|
|
||||||
|
|
||||||
gnc_prefs_bind (group, pref, G_OBJECT (box), "active");
|
gnc_prefs_bind (group, pref, G_OBJECT (box), "active");
|
||||||
|
|
||||||
g_free (group);
|
g_free (group);
|
||||||
@ -989,9 +966,7 @@ gnc_prefs_connect_combo_box (GtkComboBox *box)
|
|||||||
static void
|
static void
|
||||||
gnc_prefs_connect_currency_edit (GNCCurrencyEdit *gce, const gchar *boxname )
|
gnc_prefs_connect_currency_edit (GNCCurrencyEdit *gce, const gchar *boxname )
|
||||||
{
|
{
|
||||||
gnc_commodity *currency;
|
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gchar *mnemonic;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_CURRENCY_EDIT(gce));
|
g_return_if_fail(GNC_IS_CURRENCY_EDIT(gce));
|
||||||
|
|
||||||
@ -1017,17 +992,11 @@ static void
|
|||||||
gnc_prefs_connect_entry (GtkEntry *entry)
|
gnc_prefs_connect_entry (GtkEntry *entry)
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gchar *text;
|
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_ENTRY(entry));
|
g_return_if_fail(GTK_IS_ENTRY(entry));
|
||||||
|
|
||||||
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(entry)), &group, &pref);
|
gnc_prefs_split_widget_name (gtk_buildable_get_name(GTK_BUILDABLE(entry)), &group, &pref);
|
||||||
|
|
||||||
// text = gnc_prefs_get_string(group, pref);
|
|
||||||
// gtk_entry_set_text(GTK_ENTRY(entry), text ? text : "");
|
|
||||||
// DEBUG(" Entry %s/%s set to '%s'", group, pref, text ? text : "(null)");
|
|
||||||
// g_free(text);
|
|
||||||
|
|
||||||
gnc_prefs_bind (group, pref, G_OBJECT (entry), "text");
|
gnc_prefs_bind (group, pref, G_OBJECT (entry), "text");
|
||||||
|
|
||||||
g_free (group);
|
g_free (group);
|
||||||
@ -1046,7 +1015,6 @@ static void
|
|||||||
gnc_prefs_connect_period_select (GncPeriodSelect *period, const gchar *boxname )
|
gnc_prefs_connect_period_select (GncPeriodSelect *period, const gchar *boxname )
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gchar *mnemonic;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_PERIOD_SELECT(period));
|
g_return_if_fail(GNC_IS_PERIOD_SELECT(period));
|
||||||
|
|
||||||
@ -1070,7 +1038,6 @@ static void
|
|||||||
gnc_prefs_connect_date_edit (GNCDateEdit *gde , const gchar *boxname )
|
gnc_prefs_connect_date_edit (GNCDateEdit *gde , const gchar *boxname )
|
||||||
{
|
{
|
||||||
gchar *group, *pref;
|
gchar *group, *pref;
|
||||||
gchar *mnemonic;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_DATE_EDIT(gde));
|
g_return_if_fail(GNC_IS_DATE_EDIT(gde));
|
||||||
|
|
||||||
@ -1244,7 +1211,6 @@ gnc_preferences_dialog_create(void)
|
|||||||
gnc_commodity *locale_currency;
|
gnc_commodity *locale_currency;
|
||||||
const gchar *currency_name;
|
const gchar *currency_name;
|
||||||
QofBook *book;
|
QofBook *book;
|
||||||
gint64 month, day;
|
|
||||||
GDate fy_end;
|
GDate fy_end;
|
||||||
gboolean date_is_valid = FALSE;
|
gboolean date_is_valid = FALSE;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ gnc_dialog_query_view_new (GList *param_list, Query *q)
|
|||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
DialogQueryView *dqv;
|
DialogQueryView *dqv;
|
||||||
GtkWidget *result_hbox, *close, *scrollWin, *frame, *but_hbox;
|
GtkWidget *result_hbox, *close, *scrollWin, *frame;
|
||||||
GList *node;
|
GList *node;
|
||||||
|
|
||||||
dqv = g_new0 (DialogQueryView, 1);
|
dqv = g_new0 (DialogQueryView, 1);
|
||||||
|
@ -1065,7 +1065,6 @@ gnc_xfer_to_amount_update_cb(GtkWidget *widget, GdkEventFocus *event,
|
|||||||
{
|
{
|
||||||
XferDialog *xferData = data;
|
XferDialog *xferData = data;
|
||||||
gnc_numeric price_value;
|
gnc_numeric price_value;
|
||||||
Account *account;
|
|
||||||
|
|
||||||
gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (xferData->to_amount_edit));
|
gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (xferData->to_amount_edit));
|
||||||
price_value = gnc_xfer_dialog_compute_price_value(xferData);
|
price_value = gnc_xfer_dialog_compute_price_value(xferData);
|
||||||
@ -1799,7 +1798,6 @@ gnc_xfer_dialog_close_cb(GtkDialog *dialog, gpointer data)
|
|||||||
void
|
void
|
||||||
gnc_xfer_dialog_fetch (GtkButton *button, XferDialog *xferData)
|
gnc_xfer_dialog_fetch (GtkButton *button, XferDialog *xferData)
|
||||||
{
|
{
|
||||||
GNCPrice *prc;
|
|
||||||
PriceReq pr;
|
PriceReq pr;
|
||||||
SCM quotes_func;
|
SCM quotes_func;
|
||||||
SCM book_scm;
|
SCM book_scm;
|
||||||
|
@ -50,9 +50,6 @@ static QofLogModule log_module = GNC_MOD_GUI;
|
|||||||
|
|
||||||
#define GNC_PREF_LAST_GEOMETRY "last-geometry"
|
#define GNC_PREF_LAST_GEOMETRY "last-geometry"
|
||||||
|
|
||||||
const gchar *css_default_color = "* { color: currentColor }";
|
|
||||||
const gchar *css_red_color = "* { color: rgb(75%, 0%, 0%) }";
|
|
||||||
|
|
||||||
/********************************************************************\
|
/********************************************************************\
|
||||||
* gnc_set_label_color *
|
* gnc_set_label_color *
|
||||||
* sets the color of the label given the value *
|
* sets the color of the label given the value *
|
||||||
@ -65,30 +62,16 @@ void
|
|||||||
gnc_set_label_color(GtkWidget *label, gnc_numeric value)
|
gnc_set_label_color(GtkWidget *label, gnc_numeric value)
|
||||||
{
|
{
|
||||||
gboolean deficit;
|
gboolean deficit;
|
||||||
GtkStyleContext *stylecontext;
|
|
||||||
GtkCssProvider *provider;
|
|
||||||
|
|
||||||
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED))
|
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
provider = GTK_CSS_PROVIDER(g_object_get_data (G_OBJECT (label), "custom-provider"));
|
|
||||||
|
|
||||||
if (!provider)
|
|
||||||
{
|
|
||||||
provider = gtk_css_provider_new();
|
|
||||||
gtk_css_provider_load_from_data (provider, css_default_color, -1, NULL);
|
|
||||||
stylecontext = gtk_widget_get_style_context (label);
|
|
||||||
gtk_style_context_add_provider (stylecontext, GTK_STYLE_PROVIDER (provider),
|
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
g_object_set_data (G_OBJECT (label), "custom-provider", provider);
|
|
||||||
}
|
|
||||||
|
|
||||||
deficit = gnc_numeric_negative_p (value);
|
deficit = gnc_numeric_negative_p (value);
|
||||||
|
|
||||||
if (deficit)
|
if (deficit)
|
||||||
gtk_css_provider_load_from_data (provider, css_red_color, -1, NULL);
|
gnc_widget_set_style_context (GTK_WIDGET(label), "css_red_color");
|
||||||
else
|
else
|
||||||
gtk_css_provider_load_from_data (provider, css_default_color, -1, NULL);
|
gnc_widget_set_style_context (GTK_WIDGET(label), "css_default_color");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,7 +134,6 @@ gcrd_init (GncCellRendererDate *date)
|
|||||||
GncCellRendererPopup *popup;
|
GncCellRendererPopup *popup;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *vbox;
|
GtkWidget *vbox;
|
||||||
GtkWidget *bbox;
|
|
||||||
GtkWidget *button;
|
GtkWidget *button;
|
||||||
|
|
||||||
popup = GNC_CELL_RENDERER_POPUP (date);
|
popup = GNC_CELL_RENDERER_POPUP (date);
|
||||||
@ -312,7 +311,6 @@ gcrd_show (GncCellRendererPopup *cell,
|
|||||||
gint year;
|
gint year;
|
||||||
gint month;
|
gint month;
|
||||||
gint day;
|
gint day;
|
||||||
gint index;
|
|
||||||
const gchar *text;
|
const gchar *text;
|
||||||
|
|
||||||
if (parent_class->show_popup) {
|
if (parent_class->show_popup) {
|
||||||
@ -342,7 +340,6 @@ gcrd_show (GncCellRendererPopup *cell,
|
|||||||
|
|
||||||
gtk_calendar_select_day (GTK_CALENDAR (date->calendar), day);
|
gtk_calendar_select_day (GTK_CALENDAR (date->calendar), day);
|
||||||
gtk_calendar_mark_day (GTK_CALENDAR (date->calendar), day);
|
gtk_calendar_mark_day (GTK_CALENDAR (date->calendar), day);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkCellRenderer *
|
GtkCellRenderer *
|
||||||
|
@ -223,7 +223,9 @@ gcrp_grab_on_window (GdkWindow *window,
|
|||||||
#endif
|
#endif
|
||||||
GdkDevice *device;
|
GdkDevice *device;
|
||||||
|
|
||||||
GdkEvent *event = gtk_get_current_event ();
|
#if GTK_CHECK_VERSION(3,22,0)
|
||||||
|
GdkEvent *event = gtk_get_current_event ();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(3,20,0)
|
#if GTK_CHECK_VERSION(3,20,0)
|
||||||
seat = gdk_display_get_default_seat (display);
|
seat = gdk_display_get_default_seat (display);
|
||||||
|
@ -453,13 +453,9 @@ gctt_rebuild_menu (GncCombott *combott, GtkTreeModel *model)
|
|||||||
static void
|
static void
|
||||||
gctt_refresh_menu (GncCombott *combott, GtkTreeModel *model)
|
gctt_refresh_menu (GncCombott *combott, GtkTreeModel *model)
|
||||||
{
|
{
|
||||||
GncCombottPrivate *priv;
|
|
||||||
|
|
||||||
g_return_if_fail (GNC_IS_COMBOTT (combott));
|
g_return_if_fail (GNC_IS_COMBOTT (combott));
|
||||||
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
|
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
|
||||||
|
|
||||||
priv = GNC_COMBOTT_GET_PRIVATE (combott);
|
|
||||||
|
|
||||||
gctt_rebuild_menu(combott, model);
|
gctt_rebuild_menu(combott, model);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -565,7 +561,6 @@ which_tooltip_cb (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, Gt
|
|||||||
gtk_tree_model_get( priv->model, &priv->active_iter, priv->tip_col, &text, -1 );
|
gtk_tree_model_get( priv->model, &priv->active_iter, priv->tip_col, &text, -1 );
|
||||||
if(g_strcmp0(text, "") && (text != NULL))
|
if(g_strcmp0(text, "") && (text != NULL))
|
||||||
{
|
{
|
||||||
gchar *label = "";
|
|
||||||
gtk_tooltip_set_text (tooltip, text);
|
gtk_tooltip_set_text (tooltip, text);
|
||||||
g_free(text);
|
g_free(text);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -699,7 +694,6 @@ gnc_combott_set_active (GncCombott *combott, gint index)
|
|||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gboolean valid = TRUE;
|
gboolean valid = TRUE;
|
||||||
gint active = 1;
|
gint active = 1;
|
||||||
gint num = 1;
|
|
||||||
|
|
||||||
g_return_if_fail (GNC_IS_COMBOTT (combott));
|
g_return_if_fail (GNC_IS_COMBOTT (combott));
|
||||||
g_return_if_fail (index >= -1);
|
g_return_if_fail (index >= -1);
|
||||||
|
@ -302,7 +302,6 @@ static void gnc_currency_edit_active_changed (GtkComboBox *gobject,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GNCCurrencyEdit *self = GNC_CURRENCY_EDIT (gobject);
|
GNCCurrencyEdit *self = GNC_CURRENCY_EDIT (gobject);
|
||||||
GNCCurrencyEditPrivate *priv = GET_PRIVATE (self);
|
|
||||||
|
|
||||||
gnc_commodity *currency = gnc_currency_edit_get_currency (self);
|
gnc_commodity *currency = gnc_currency_edit_get_currency (self);
|
||||||
const gchar *mnemonic = gnc_commodity_get_mnemonic (currency);
|
const gchar *mnemonic = gnc_commodity_get_mnemonic (currency);
|
||||||
|
@ -893,7 +893,6 @@ create_children (GNCDateEdit *gde)
|
|||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
GtkWidget *hbox;
|
GtkWidget *hbox;
|
||||||
GtkWidget *arrow;
|
GtkWidget *arrow;
|
||||||
GtkComboBox *combo;
|
|
||||||
GtkTreeStore *store;
|
GtkTreeStore *store;
|
||||||
GtkCellRenderer *cell;
|
GtkCellRenderer *cell;
|
||||||
|
|
||||||
@ -1170,7 +1169,6 @@ time64
|
|||||||
gnc_date_edit_get_date (GNCDateEdit *gde)
|
gnc_date_edit_get_date (GNCDateEdit *gde)
|
||||||
{
|
{
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
time64 retval;
|
|
||||||
|
|
||||||
g_return_val_if_fail (gde != NULL, 0);
|
g_return_val_if_fail (gde != NULL, 0);
|
||||||
g_return_val_if_fail (GNC_IS_DATE_EDIT (gde), 0);
|
g_return_val_if_fail (GNC_IS_DATE_EDIT (gde), 0);
|
||||||
|
@ -723,14 +723,12 @@ static void
|
|||||||
gdc_reconfig(GncDenseCal *dcal)
|
gdc_reconfig(GncDenseCal *dcal)
|
||||||
{
|
{
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GdkWindow *window;
|
|
||||||
GtkAllocation alloc;
|
GtkAllocation alloc;
|
||||||
|
|
||||||
if (dcal->surface)
|
if (dcal->surface)
|
||||||
cairo_surface_destroy (dcal->surface);
|
cairo_surface_destroy (dcal->surface);
|
||||||
|
|
||||||
widget = GTK_WIDGET(dcal->cal_drawing_area);
|
widget = GTK_WIDGET(dcal->cal_drawing_area);
|
||||||
window = gtk_widget_get_window (widget);
|
|
||||||
gtk_widget_get_allocation (widget, &alloc);
|
gtk_widget_get_allocation (widget, &alloc);
|
||||||
dcal->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
dcal->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||||
alloc.width,
|
alloc.width,
|
||||||
|
@ -950,7 +950,6 @@ RESTART:
|
|||||||
QofBook *book = qof_session_get_book (new_session);
|
QofBook *book = qof_session_get_book (new_session);
|
||||||
gchar *msg = gnc_features_test_unknown (book);
|
gchar *msg = gnc_features_test_unknown (book);
|
||||||
Account *template_root = gnc_book_get_template_root (book);
|
Account *template_root = gnc_book_get_template_root (book);
|
||||||
GList *child = NULL;
|
|
||||||
|
|
||||||
if (msg)
|
if (msg)
|
||||||
{
|
{
|
||||||
|
@ -228,7 +228,6 @@ gnc_frequency_init(GncFrequency *gf)
|
|||||||
gf->startDate = GNC_DATE_EDIT(gnc_date_edit_new(time(NULL), FALSE, FALSE));
|
gf->startDate = GNC_DATE_EDIT(gnc_date_edit_new(time(NULL), FALSE, FALSE));
|
||||||
/* Add the new widget to the table. */
|
/* Add the new widget to the table. */
|
||||||
{
|
{
|
||||||
gint dont_expand_or_fill = 0;
|
|
||||||
GtkWidget *table = GTK_WIDGET(gtk_builder_get_object (builder, "gncfreq_table"));
|
GtkWidget *table = GTK_WIDGET(gtk_builder_get_object (builder, "gncfreq_table"));
|
||||||
gtk_grid_attach(GTK_GRID(table), GTK_WIDGET(gf->startDate), 4, 0, 1, 1);
|
gtk_grid_attach(GTK_GRID(table), GTK_WIDGET(gf->startDate), 4, 0, 1, 1);
|
||||||
gtk_widget_set_vexpand (GTK_WIDGET(gf->startDate), FALSE);
|
gtk_widget_set_vexpand (GTK_WIDGET(gf->startDate), FALSE);
|
||||||
|
@ -172,26 +172,38 @@ gnc_configure_date_completion (void)
|
|||||||
void
|
void
|
||||||
gnc_add_css_file (void)
|
gnc_add_css_file (void)
|
||||||
{
|
{
|
||||||
GtkCssProvider *provider;
|
GtkCssProvider *provider_user, *provider_app;
|
||||||
GdkDisplay *display;
|
GdkDisplay *display;
|
||||||
GdkScreen *screen;
|
GdkScreen *screen;
|
||||||
const gchar *var;
|
const gchar *var;
|
||||||
|
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
|
||||||
gchar *str;
|
gchar *str;
|
||||||
GError *error = 0;
|
GError *error = 0;
|
||||||
|
|
||||||
provider = gtk_css_provider_new ();
|
provider_user = gtk_css_provider_new ();
|
||||||
|
provider_app = gtk_css_provider_new ();
|
||||||
display = gdk_display_get_default ();
|
display = gdk_display_get_default ();
|
||||||
screen = gdk_display_get_default_screen (display);
|
screen = gdk_display_get_default_screen (display);
|
||||||
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_USER);
|
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider_app), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
|
gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider_user), GTK_STYLE_PROVIDER_PRIORITY_USER);
|
||||||
|
|
||||||
|
if (pkgdatadir)
|
||||||
|
{
|
||||||
|
str = g_build_filename (pkgdatadir, "ui", "gnucash.css", (char *)NULL);
|
||||||
|
gtk_css_provider_load_from_path (provider_app, str, &error);
|
||||||
|
g_free (str);
|
||||||
|
}
|
||||||
|
g_free (pkgdatadir);
|
||||||
|
|
||||||
var = g_get_home_dir ();
|
var = g_get_home_dir ();
|
||||||
if (var)
|
if (var)
|
||||||
{
|
{
|
||||||
str = g_build_filename (var, ".gtk-3.0-gnucash.css", (char *)NULL);
|
str = g_build_filename (var, ".gtk-3.0-gnucash.css", (char *)NULL);
|
||||||
gtk_css_provider_load_from_path (provider, str, &error);
|
gtk_css_provider_load_from_path (provider_user, str, &error);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
}
|
}
|
||||||
g_object_unref (provider);
|
g_object_unref (provider_user);
|
||||||
|
g_object_unref (provider_app);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MAC_INTEGRATION
|
#ifdef MAC_INTEGRATION
|
||||||
|
@ -64,7 +64,6 @@ void
|
|||||||
gnc_load_app_icons (void)
|
gnc_load_app_icons (void)
|
||||||
{
|
{
|
||||||
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
|
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
|
||||||
gchar *file;
|
|
||||||
const gchar *default_path;
|
const gchar *default_path;
|
||||||
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
|
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
|
||||||
gchar* datadir = gnc_path_get_datadir ();
|
gchar* datadir = gnc_path_get_datadir ();
|
||||||
|
@ -3844,7 +3844,7 @@ gnc_main_window_switch_page (GtkNotebook *notebook,
|
|||||||
GncMainWindowPrivate *priv;
|
GncMainWindowPrivate *priv;
|
||||||
GtkWidget *child;
|
GtkWidget *child;
|
||||||
GncPluginPage *page;
|
GncPluginPage *page;
|
||||||
gboolean immutable, visible;
|
gboolean visible;
|
||||||
|
|
||||||
ENTER("Notebook %p, page, %p, index %d, window %p",
|
ENTER("Notebook %p, page, %p, index %d, window %p",
|
||||||
notebook, notebook_page, pos, window);
|
notebook, notebook_page, pos, window);
|
||||||
|
@ -418,11 +418,7 @@ gnc_query_view_init_view (GNCQueryView *qview)
|
|||||||
static void
|
static void
|
||||||
gnc_query_view_class_init (GNCQueryViewClass *klass)
|
gnc_query_view_class_init (GNCQueryViewClass *klass)
|
||||||
{
|
{
|
||||||
GtkWidgetClass *widget_class;
|
GtkWidgetClass *widget_class = (GtkWidgetClass*) klass;
|
||||||
GtkTreeViewClass *view_class;
|
|
||||||
|
|
||||||
widget_class = (GtkWidgetClass*) klass;
|
|
||||||
view_class = (GtkTreeViewClass*) klass;
|
|
||||||
|
|
||||||
parent_class = g_type_class_peek (GTK_TYPE_TREE_VIEW);
|
parent_class = g_type_class_peek (GTK_TYPE_TREE_VIEW);
|
||||||
|
|
||||||
@ -474,7 +470,6 @@ gnc_query_view_select_row_cb (GtkTreeSelection *selection, gpointer user_data)
|
|||||||
{
|
{
|
||||||
GNCQueryView *qview = GNC_QUERY_VIEW (gtk_tree_selection_get_tree_view (selection));
|
GNCQueryView *qview = GNC_QUERY_VIEW (gtk_tree_selection_get_tree_view (selection));
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
|
||||||
gint number_of_rows;
|
gint number_of_rows;
|
||||||
gpointer entry = NULL;
|
gpointer entry = NULL;
|
||||||
GList *node;
|
GList *node;
|
||||||
@ -687,8 +682,6 @@ void
|
|||||||
gnc_query_view_refresh (GNCQueryView *qview)
|
gnc_query_view_refresh (GNCQueryView *qview)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
|
||||||
GtkTreeSelection *selection;
|
|
||||||
GList *old_entry;
|
GList *old_entry;
|
||||||
|
|
||||||
g_return_if_fail (qview != NULL);
|
g_return_if_fail (qview != NULL);
|
||||||
|
@ -833,7 +833,6 @@ void
|
|||||||
gnc_tree_control_split_reg_reinit (GncTreeViewSplitReg *view, gpointer data)
|
gnc_tree_control_split_reg_reinit (GncTreeViewSplitReg *view, gpointer data)
|
||||||
{
|
{
|
||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
Split *split;
|
|
||||||
GtkWidget *dialog, *window;
|
GtkWidget *dialog, *window;
|
||||||
gint response;
|
gint response;
|
||||||
const gchar *warning;
|
const gchar *warning;
|
||||||
@ -1082,7 +1081,6 @@ gnc_tree_control_split_reg_reverse_current (GncTreeViewSplitReg *view)
|
|||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
Transaction *trans = NULL, *new_trans = NULL;
|
Transaction *trans = NULL, *new_trans = NULL;
|
||||||
GList *snode = NULL;
|
GList *snode = NULL;
|
||||||
gboolean changed = FALSE;
|
|
||||||
|
|
||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
|
|
||||||
@ -1174,7 +1172,6 @@ gnc_tree_control_split_reg_duplicate_current (GncTreeViewSplitReg *view)
|
|||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
Split *blank_split;
|
Split *blank_split;
|
||||||
Split *split, *trans_split;
|
Split *split, *trans_split;
|
||||||
gboolean changed = FALSE;
|
|
||||||
gboolean use_split_action_for_num_field = FALSE;
|
gboolean use_split_action_for_num_field = FALSE;
|
||||||
|
|
||||||
ENTER("");
|
ENTER("");
|
||||||
@ -1313,7 +1310,6 @@ gnc_tree_control_split_reg_duplicate_current (GncTreeViewSplitReg *view)
|
|||||||
{
|
{
|
||||||
Transaction *new_trans;
|
Transaction *new_trans;
|
||||||
int trans_split_index;
|
int trans_split_index;
|
||||||
int split_index;
|
|
||||||
const char *in_num = NULL;
|
const char *in_num = NULL;
|
||||||
const char *in_tnum = NULL;
|
const char *in_tnum = NULL;
|
||||||
char *out_num;
|
char *out_num;
|
||||||
@ -1649,16 +1645,11 @@ gboolean gnc_tree_control_split_reg_is_current_movable_updown (GncTreeViewSplitR
|
|||||||
gboolean
|
gboolean
|
||||||
gnc_tree_control_split_reg_save (GncTreeViewSplitReg *view, gboolean reg_closing)
|
gnc_tree_control_split_reg_save (GncTreeViewSplitReg *view, gboolean reg_closing)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
|
||||||
RowDepth depth;
|
|
||||||
Transaction *dirty_trans;
|
Transaction *dirty_trans;
|
||||||
Transaction *blank_trans;
|
Transaction *blank_trans;
|
||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
Account *account;
|
// Split *split;
|
||||||
Split *blank_split;
|
// Split *current_trans_split;
|
||||||
const char *memo;
|
|
||||||
const char *desc;
|
|
||||||
Split *split, *current_trans_split;
|
|
||||||
|
|
||||||
ENTER("view=%p, reg_closing=%s", view, reg_closing ? "TRUE" : "FALSE");
|
ENTER("view=%p, reg_closing=%s", view, reg_closing ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
@ -1674,17 +1665,14 @@ gnc_tree_control_split_reg_save (GncTreeViewSplitReg *view, gboolean reg_closing
|
|||||||
if (reg_closing)
|
if (reg_closing)
|
||||||
view->reg_closing = TRUE;
|
view->reg_closing = TRUE;
|
||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
|
||||||
|
|
||||||
blank_split = gnc_tree_control_split_reg_get_blank_split (view);
|
|
||||||
dirty_trans = gnc_tree_view_split_reg_get_dirty_trans (view);
|
dirty_trans = gnc_tree_view_split_reg_get_dirty_trans (view);
|
||||||
blank_trans = gnc_tree_control_split_reg_get_blank_trans (view);
|
blank_trans = gnc_tree_control_split_reg_get_blank_trans (view);
|
||||||
|
|
||||||
/* get the handle to the current split and transaction */
|
/* get the handle to the current split and transaction */
|
||||||
split = gnc_tree_view_split_reg_get_current_split (view);
|
// split = gnc_tree_view_split_reg_get_current_split (view);
|
||||||
trans = gnc_tree_view_split_reg_get_current_trans (view);
|
trans = gnc_tree_view_split_reg_get_current_trans (view);
|
||||||
|
|
||||||
current_trans_split = gnc_tree_control_split_reg_get_current_trans_split (view);
|
// current_trans_split = gnc_tree_control_split_reg_get_current_trans_split (view);
|
||||||
|
|
||||||
if (trans == NULL)
|
if (trans == NULL)
|
||||||
{
|
{
|
||||||
@ -1961,7 +1949,6 @@ gnc_tree_control_split_reg_get_account_by_name (GncTreeViewSplitReg *view, const
|
|||||||
const char *placeholder = _("The account %s does not allow transactions.");
|
const char *placeholder = _("The account %s does not allow transactions.");
|
||||||
const char *missing = _("The account %s does not exist. "
|
const char *missing = _("The account %s does not exist. "
|
||||||
"Would you like to create it?");
|
"Would you like to create it?");
|
||||||
char *account_name;
|
|
||||||
Account *account;
|
Account *account;
|
||||||
|
|
||||||
if (!name || (strlen(name) == 0))
|
if (!name || (strlen(name) == 0))
|
||||||
@ -2069,7 +2056,7 @@ gnc_tree_control_split_reg_copy_trans (GncTreeViewSplitReg *view)
|
|||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
Transaction *from_trans;
|
Transaction *from_trans;
|
||||||
Account *from_acc, *anchor;
|
Account *anchor;
|
||||||
|
|
||||||
g_return_if_fail (GNC_IS_TREE_VIEW_SPLIT_REG (view));
|
g_return_if_fail (GNC_IS_TREE_VIEW_SPLIT_REG (view));
|
||||||
|
|
||||||
@ -2146,7 +2133,7 @@ void
|
|||||||
gnc_tree_control_auto_complete (GncTreeViewSplitReg *view, Transaction *trans, const gchar *new_text)
|
gnc_tree_control_auto_complete (GncTreeViewSplitReg *view, Transaction *trans, const gchar *new_text)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
Transaction *btrans, *dirty_trans;
|
Transaction *btrans;
|
||||||
GtkListStore *desc_list;
|
GtkListStore *desc_list;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gboolean valid;
|
gboolean valid;
|
||||||
|
@ -508,7 +508,7 @@ gnc_tree_model_price_get_iter (GtkTreeModel *tree_model,
|
|||||||
gnc_commodity_namespace *name_space;
|
gnc_commodity_namespace *name_space;
|
||||||
gnc_commodity *commodity = NULL;
|
gnc_commodity *commodity = NULL;
|
||||||
GNCPrice *price;
|
GNCPrice *price;
|
||||||
GList *ns_list, *cm_list, *price_list;
|
GList *ns_list, *cm_list;
|
||||||
guint i, depth;
|
guint i, depth;
|
||||||
|
|
||||||
g_return_val_if_fail (GNC_IS_TREE_MODEL_PRICE (tree_model), FALSE);
|
g_return_val_if_fail (GNC_IS_TREE_MODEL_PRICE (tree_model), FALSE);
|
||||||
|
@ -366,8 +366,6 @@ gnc_tree_model_split_reg_prefs_changed (gpointer prefs, gchar *pref, gpointer us
|
|||||||
static void
|
static void
|
||||||
gnc_tree_model_split_reg_init (GncTreeModelSplitReg *model)
|
gnc_tree_model_split_reg_init (GncTreeModelSplitReg *model)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitRegPrivate *priv;
|
|
||||||
|
|
||||||
ENTER("model %p", model);
|
ENTER("model %p", model);
|
||||||
while (model->stamp == 0)
|
while (model->stamp == 0)
|
||||||
{
|
{
|
||||||
@ -391,14 +389,10 @@ gnc_tree_model_split_reg_init (GncTreeModelSplitReg *model)
|
|||||||
static void
|
static void
|
||||||
gnc_tree_model_split_reg_finalize (GObject *object)
|
gnc_tree_model_split_reg_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
|
||||||
|
|
||||||
ENTER("model split reg %p", object);
|
ENTER("model split reg %p", object);
|
||||||
g_return_if_fail (object != NULL);
|
g_return_if_fail (object != NULL);
|
||||||
g_return_if_fail (GNC_IS_TREE_MODEL_SPLIT_REG (object));
|
g_return_if_fail (GNC_IS_TREE_MODEL_SPLIT_REG (object));
|
||||||
|
|
||||||
model = GNC_TREE_MODEL_SPLIT_REG (object);
|
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (parent_class)->finalize)
|
if (G_OBJECT_CLASS (parent_class)->finalize)
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
@ -616,8 +610,6 @@ void
|
|||||||
gnc_tree_model_split_reg_load (GncTreeModelSplitReg *model, GList *slist, Account *default_account)
|
gnc_tree_model_split_reg_load (GncTreeModelSplitReg *model, GList *slist, Account *default_account)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitRegPrivate *priv;
|
GncTreeModelSplitRegPrivate *priv;
|
||||||
GList *node;
|
|
||||||
gint rows = 0;
|
|
||||||
|
|
||||||
ENTER("#### Load ModelSplitReg = %p and slist length is %d ####", model, g_list_length (slist));
|
ENTER("#### Load ModelSplitReg = %p and slist length is %d ####", model, g_list_length (slist));
|
||||||
|
|
||||||
@ -1521,7 +1513,6 @@ gnc_tree_model_split_reg_get_value (GtkTreeModel *tree_model,
|
|||||||
GncTreeModelSplitReg *model = GNC_TREE_MODEL_SPLIT_REG (tree_model);
|
GncTreeModelSplitReg *model = GNC_TREE_MODEL_SPLIT_REG (tree_model);
|
||||||
const GncGUID *guid;
|
const GncGUID *guid;
|
||||||
GList *tnode;
|
GList *tnode;
|
||||||
gint depth, *indices;
|
|
||||||
|
|
||||||
g_return_if_fail (GNC_IS_TREE_MODEL_SPLIT_REG (model));
|
g_return_if_fail (GNC_IS_TREE_MODEL_SPLIT_REG (model));
|
||||||
|
|
||||||
@ -2116,7 +2107,6 @@ GtkTreePath *
|
|||||||
gnc_tree_model_split_reg_get_path_to_split_and_trans (GncTreeModelSplitReg *model, Split *split, Transaction *trans)
|
gnc_tree_model_split_reg_get_path_to_split_and_trans (GncTreeModelSplitReg *model, Split *split, Transaction *trans)
|
||||||
{
|
{
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
GList *slist;
|
|
||||||
gint tpos, spos, number;
|
gint tpos, spos, number;
|
||||||
|
|
||||||
ENTER("transaction is %p, split is %p", trans, split);
|
ENTER("transaction is %p, split is %p", trans, split);
|
||||||
@ -2160,7 +2150,6 @@ gnc_tree_model_split_reg_get_path_to_split_and_trans (GncTreeModelSplitReg *mode
|
|||||||
|
|
||||||
if (split != NULL)
|
if (split != NULL)
|
||||||
{
|
{
|
||||||
slist = xaccTransGetSplitList (trans);
|
|
||||||
/* Level 3 */
|
/* Level 3 */
|
||||||
spos = xaccTransGetSplitIndex (trans, split);
|
spos = xaccTransGetSplitIndex (trans, split);
|
||||||
if (spos == -1)
|
if (spos == -1)
|
||||||
@ -3022,7 +3011,6 @@ gnc_tree_model_split_reg_update_account_list (GncTreeModelSplitReg *model)
|
|||||||
Account *acc;
|
Account *acc;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GList *accts, *accts_cpy, *ptr;
|
GList *accts, *accts_cpy, *ptr;
|
||||||
gboolean valid;
|
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
gchar *fname;
|
gchar *fname;
|
||||||
gint i;
|
gint i;
|
||||||
|
@ -425,7 +425,6 @@ gchar *
|
|||||||
gnc_tree_util_split_reg_get_date_help (GDate *date)
|
gnc_tree_util_split_reg_get_date_help (GDate *date)
|
||||||
{
|
{
|
||||||
char string[1024];
|
char string[1024];
|
||||||
struct tm tm;
|
|
||||||
|
|
||||||
if (g_date_valid (date))
|
if (g_date_valid (date))
|
||||||
{
|
{
|
||||||
@ -824,20 +823,19 @@ gnc_tree_util_split_reg_get_debcred_entry (GncTreeViewSplitReg *view,
|
|||||||
void
|
void
|
||||||
gnc_tree_util_split_reg_set_value_for (GncTreeViewSplitReg *view, Transaction *trans, Split *split, gnc_numeric input, gboolean force)
|
gnc_tree_util_split_reg_set_value_for (GncTreeViewSplitReg *view, Transaction *trans, Split *split, gnc_numeric input, gboolean force)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
// GncTreeModelSplitReg *model;
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
Account *anchor;
|
// Account *anchor;
|
||||||
Account *acct = xaccSplitGetAccount (split);
|
// Account *acct = xaccSplitGetAccount (split);
|
||||||
gnc_commodity *currency;
|
// gnc_commodity *currency;
|
||||||
gnc_numeric value, amount, rate;
|
|
||||||
|
|
||||||
ENTER("set_value_for trans %p and split %p input %s force %d", trans, split, gnc_numeric_to_string (input), force);
|
ENTER("set_value_for trans %p and split %p input %s force %d", trans, split, gnc_numeric_to_string (input), force);
|
||||||
|
|
||||||
currency = xaccTransGetCurrency (trans);
|
// currency = xaccTransGetCurrency (trans);
|
||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
// model = gnc_tree_view_split_reg_get_model_from_view (view);
|
||||||
|
|
||||||
anchor = gnc_tree_model_split_reg_get_anchor (model);
|
// anchor = gnc_tree_model_split_reg_get_anchor (model);
|
||||||
|
|
||||||
if (gnc_numeric_zero_p (input))
|
if (gnc_numeric_zero_p (input))
|
||||||
{
|
{
|
||||||
|
@ -98,8 +98,8 @@ static void gtv_sr_edited_normal_cb (GtkCellRendererText *cell, const gchar *pat
|
|||||||
static void gtv_sr_edited_template_cb (GtkCellRendererText *cell, const gchar *path_string,
|
static void gtv_sr_edited_template_cb (GtkCellRendererText *cell, const gchar *path_string,
|
||||||
const gchar *new_text, gpointer user_data);
|
const gchar *new_text, gpointer user_data);
|
||||||
|
|
||||||
static void start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
|
//static void start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
|
||||||
const gchar *path, gpointer user_data); //FIXME This may not be needed
|
// const gchar *path, gpointer user_data); //FIXME This may not be needed
|
||||||
|
|
||||||
static void gtv_sr_begin_edit (GncTreeViewSplitReg *view, Transaction *trans);
|
static void gtv_sr_begin_edit (GncTreeViewSplitReg *view, Transaction *trans);
|
||||||
|
|
||||||
@ -110,11 +110,11 @@ static void gtv_sr_editable_start_editing_cb (GtkCellRenderer *cr, GtkCellEditab
|
|||||||
|
|
||||||
static void gtv_sr_editing_canceled_cb (GtkCellRenderer *cr, gpointer user_data);
|
static void gtv_sr_editing_canceled_cb (GtkCellRenderer *cr, gpointer user_data);
|
||||||
|
|
||||||
static void gtv_sr_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
|
//static void gtv_sr_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
|
||||||
GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
|
// GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
|
||||||
|
|
||||||
static void gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
|
//static void gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
|
||||||
GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
|
// GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
|
||||||
|
|
||||||
static void gtv_sr_selection_move_delete_cb (GncTreeModelSplitReg *model, gpointer item, gpointer user_data);
|
static void gtv_sr_selection_move_delete_cb (GncTreeModelSplitReg *model, gpointer item, gpointer user_data);
|
||||||
|
|
||||||
@ -548,15 +548,11 @@ gnc_tree_view_split_reg_dispose (GObject *object)
|
|||||||
static void
|
static void
|
||||||
gnc_tree_view_split_reg_finalize (GObject *object)
|
gnc_tree_view_split_reg_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GncTreeViewSplitReg *view;
|
|
||||||
|
|
||||||
gnc_leave_return_if_fail(object != NULL);
|
gnc_leave_return_if_fail(object != NULL);
|
||||||
gnc_leave_return_if_fail(GNC_IS_TREE_VIEW_SPLIT_REG (object));
|
gnc_leave_return_if_fail(GNC_IS_TREE_VIEW_SPLIT_REG (object));
|
||||||
|
|
||||||
ENTER("split reg view %p", object);
|
ENTER("split reg view %p", object);
|
||||||
|
|
||||||
view = GNC_TREE_VIEW_SPLIT_REG (object);
|
|
||||||
|
|
||||||
if (G_OBJECT_CLASS(parent_class)->finalize)
|
if (G_OBJECT_CLASS(parent_class)->finalize)
|
||||||
(* G_OBJECT_CLASS(parent_class)->finalize) (object);
|
(* G_OBJECT_CLASS(parent_class)->finalize) (object);
|
||||||
|
|
||||||
@ -622,15 +618,6 @@ gnc_tree_view_split_reg_pref_changed (gpointer prefs, gchar *pref, gpointer user
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Set the grid lines to be solid */
|
|
||||||
static const gchar *css_string =
|
|
||||||
{
|
|
||||||
"treeview.view {\n"
|
|
||||||
" border-color: black;\n"
|
|
||||||
"}\n"
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/* Define which columns are in which views */
|
/* Define which columns are in which views */
|
||||||
static ViewCol *
|
static ViewCol *
|
||||||
gnc_tree_view_split_reg_get_colummn_list (GncTreeModelSplitReg *model)
|
gnc_tree_view_split_reg_get_colummn_list (GncTreeModelSplitReg *model)
|
||||||
@ -1018,7 +1005,6 @@ gnc_tree_view_split_reg_new_with_model (GncTreeModelSplitReg *model)
|
|||||||
GtkTreeModel *s_model;
|
GtkTreeModel *s_model;
|
||||||
GncTreeViewSplitReg *view;
|
GncTreeViewSplitReg *view;
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkCssProvider* provider = gtk_css_provider_new();
|
|
||||||
|
|
||||||
view = g_object_new (gnc_tree_view_split_reg_get_type(), NULL);
|
view = g_object_new (gnc_tree_view_split_reg_get_type(), NULL);
|
||||||
g_object_set (view, "name", "split_reg_tree", NULL);
|
g_object_set (view, "name", "split_reg_tree", NULL);
|
||||||
@ -1030,12 +1016,8 @@ gnc_tree_view_split_reg_new_with_model (GncTreeModelSplitReg *model)
|
|||||||
g_assert (gnc_commodity_is_currency (view->priv->reg_currency));
|
g_assert (gnc_commodity_is_currency (view->priv->reg_currency));
|
||||||
view->help_text = g_strdup ("Help Text");
|
view->help_text = g_strdup ("Help Text");
|
||||||
|
|
||||||
// This sets up solid lines for the grid line.
|
/* Set the grid lines to be solid */
|
||||||
gtk_css_provider_load_from_data (provider, css_string, strlen(css_string), NULL);
|
gnc_widget_set_style_context (GTK_WIDGET(view), "treeview_grid_lines");
|
||||||
gtk_style_context_add_provider (gtk_widget_get_style_context(GTK_WIDGET(view)),
|
|
||||||
GTK_STYLE_PROVIDER (provider),
|
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
g_object_unref (provider);
|
|
||||||
|
|
||||||
/* TreeView Grid lines */
|
/* TreeView Grid lines */
|
||||||
if (view->priv->use_horizontal_lines)
|
if (view->priv->use_horizontal_lines)
|
||||||
@ -1837,8 +1819,6 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
|
|||||||
{
|
{
|
||||||
GNCPrintAmountInfo print_info;
|
GNCPrintAmountInfo print_info;
|
||||||
|
|
||||||
gnc_commodity *split_com = xaccAccountGetCommodity (xaccSplitGetAccount (split));
|
|
||||||
|
|
||||||
print_info = gnc_default_price_print_info();
|
print_info = gnc_default_price_print_info();
|
||||||
print_info.min_decimal_places = 2;
|
print_info.min_decimal_places = 2;
|
||||||
|
|
||||||
@ -2221,13 +2201,12 @@ gtv_sr_cdf1 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
|
|||||||
gboolean is_split, is_blank, is_trow1, is_trow2;
|
gboolean is_split, is_blank, is_trow1, is_trow2;
|
||||||
gboolean editable = FALSE, expanded = FALSE;
|
gboolean editable = FALSE, expanded = FALSE;
|
||||||
gboolean read_only = FALSE;
|
gboolean read_only = FALSE;
|
||||||
gboolean open_edited = FALSE;
|
// gboolean open_edited = FALSE;
|
||||||
gnc_numeric num;
|
|
||||||
const gchar *s = "";
|
const gchar *s = "";
|
||||||
const gchar *row_color;
|
const gchar *row_color;
|
||||||
RowDepth depth;
|
// RowDepth depth;
|
||||||
gint *indices;
|
gint *indices;
|
||||||
Account *anchor = view->priv->anchor;
|
// Account *anchor = view->priv->anchor;
|
||||||
char type;
|
char type;
|
||||||
|
|
||||||
ENTER("");
|
ENTER("");
|
||||||
@ -2245,7 +2224,7 @@ gtv_sr_cdf1 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
|
|||||||
|
|
||||||
spath = gtk_tree_model_get_path (GTK_TREE_MODEL (s_model), s_iter);
|
spath = gtk_tree_model_get_path (GTK_TREE_MODEL (s_model), s_iter);
|
||||||
|
|
||||||
depth = gtk_tree_path_get_depth (spath);
|
// depth = gtk_tree_path_get_depth (spath);
|
||||||
|
|
||||||
indices = gtk_tree_path_get_indices (spath);
|
indices = gtk_tree_path_get_indices (spath);
|
||||||
|
|
||||||
@ -2273,7 +2252,7 @@ gtv_sr_cdf1 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
|
|||||||
if (xaccTransIsOpen (trans) && (view->priv->dirty_trans != trans))
|
if (xaccTransIsOpen (trans) && (view->priv->dirty_trans != trans))
|
||||||
{
|
{
|
||||||
read_only = TRUE;
|
read_only = TRUE;
|
||||||
open_edited = TRUE;
|
// open_edited = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test for a transaction type of invoice, always read only */
|
/* Test for a transaction type of invoice, always read only */
|
||||||
@ -2504,17 +2483,18 @@ gtv_sr_transaction_changed_confirm (GncTreeViewSplitReg *view,
|
|||||||
/*###########################################################################
|
/*###########################################################################
|
||||||
vvvvv edit function call backs vvvvvv
|
vvvvv edit function call backs vvvvvv
|
||||||
#############################################################################*/
|
#############################################################################*/
|
||||||
|
#ifdef skip
|
||||||
static void
|
static void
|
||||||
start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
|
start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
|
||||||
const gchar *path_string, gpointer user_data)
|
const gchar *path_string, gpointer user_data)
|
||||||
{
|
{
|
||||||
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
// GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
||||||
GncTreeModelSplitReg *model;
|
// GncTreeModelSplitReg *model;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
//g_print("\n\nstart_edit\n");
|
//g_print("\n\nstart_edit\n");
|
||||||
/*FIXME Not sure if this is required, leave for now ? */
|
/*FIXME Not sure if this is required, leave for now ? */
|
||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
// model = gnc_tree_view_split_reg_get_model_from_view (view);
|
||||||
|
|
||||||
gtv_sr_editable_start_editing_cb (cr, editable, path_string, user_data);
|
gtv_sr_editable_start_editing_cb (cr, editable, path_string, user_data);
|
||||||
/* g_signal_connect(G_OBJECT(editable), "editing-done", (GCallback) editing_done_cb, view); */
|
/* g_signal_connect(G_OBJECT(editable), "editing-done", (GCallback) editing_done_cb, view); */
|
||||||
@ -2528,7 +2508,7 @@ start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Open Transaction for editing */
|
/* Open Transaction for editing */
|
||||||
static void
|
static void
|
||||||
@ -2706,7 +2686,8 @@ gtv_sr_finish_edit (GncTreeViewSplitReg *view)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef skip
|
||||||
|
//FIXME Not used yet
|
||||||
/* This is used in g_idle_add to finish an edit */
|
/* This is used in g_idle_add to finish an edit */
|
||||||
static gboolean
|
static gboolean
|
||||||
gtv_sr_idle_finish_edit (GncTreeViewSplitReg *view)
|
gtv_sr_idle_finish_edit (GncTreeViewSplitReg *view)
|
||||||
@ -2730,6 +2711,7 @@ gtv_sr_idle_cancel_edit (GtkCellRenderer *cr)
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is used in g_idle_add to repopulate the transfer cell */
|
/* This is used in g_idle_add to repopulate the transfer cell */
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -2779,7 +2761,6 @@ gtv_sr_titles (GncTreeViewSplitReg *view, RowDepth depth)
|
|||||||
GList *columns;
|
GList *columns;
|
||||||
GList *column;
|
GList *column;
|
||||||
gint i;
|
gint i;
|
||||||
RowDepth temp_depth;
|
|
||||||
gboolean is_template;
|
gboolean is_template;
|
||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
||||||
@ -3584,7 +3565,6 @@ gtv_sr_button_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
|||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
GtkTreePath *mpath, *spath;
|
GtkTreePath *mpath, *spath;
|
||||||
GtkTreeViewColumn *col;
|
GtkTreeViewColumn *col;
|
||||||
ViewCol viewcol;
|
|
||||||
GtkTreeIter m_iter;
|
GtkTreeIter m_iter;
|
||||||
Split *split = NULL;
|
Split *split = NULL;
|
||||||
Split *rotate_split = NULL;
|
Split *rotate_split = NULL;
|
||||||
@ -3854,11 +3834,9 @@ gtv_sr_key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_data)
|
|||||||
gboolean trans_changed = FALSE;
|
gboolean trans_changed = FALSE;
|
||||||
gint *start_indices;
|
gint *start_indices;
|
||||||
gint *next_indices;
|
gint *next_indices;
|
||||||
gboolean keyup = FALSE;
|
|
||||||
Transaction *btrans, *ctrans, *hetrans;
|
Transaction *btrans, *ctrans, *hetrans;
|
||||||
gboolean goto_blank = FALSE;
|
gboolean goto_blank = FALSE;
|
||||||
gboolean next_trans = TRUE;
|
gboolean next_trans = TRUE;
|
||||||
gint depth;
|
|
||||||
|
|
||||||
// spath is where we are, before key press...
|
// spath is where we are, before key press...
|
||||||
gtk_tree_view_get_cursor (GTK_TREE_VIEW (view), &spath, &col);
|
gtk_tree_view_get_cursor (GTK_TREE_VIEW (view), &spath, &col);
|
||||||
@ -4148,7 +4126,6 @@ gtv_sr_motion_cb (GtkTreeSelection *sel, gpointer user_data)
|
|||||||
{
|
{
|
||||||
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
GtkTreeModel *s_model;
|
|
||||||
GtkTreePath *mpath, *spath;
|
GtkTreePath *mpath, *spath;
|
||||||
Split *split = NULL;
|
Split *split = NULL;
|
||||||
Transaction *trans = NULL;
|
Transaction *trans = NULL;
|
||||||
@ -4162,8 +4139,6 @@ gtv_sr_motion_cb (GtkTreeSelection *sel, gpointer user_data)
|
|||||||
|
|
||||||
ENTER("View is %p and Model is %p", view, model);
|
ENTER("View is %p and Model is %p", view, model);
|
||||||
|
|
||||||
s_model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
|
|
||||||
|
|
||||||
DEBUG("Current trans %p, Split %p, Depth %d and Dirty Trans %p", view->priv->current_trans, view->priv->current_split,
|
DEBUG("Current trans %p, Split %p, Depth %d and Dirty Trans %p", view->priv->current_trans, view->priv->current_split,
|
||||||
view->priv->current_depth, view->priv->dirty_trans);
|
view->priv->current_depth, view->priv->dirty_trans);
|
||||||
|
|
||||||
@ -4683,7 +4658,6 @@ gtv_sr_edited_template_cb (GtkCellRendererText *cell, const gchar *path_string,
|
|||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
gboolean is_trow1, is_trow2, is_split, is_blank;
|
gboolean is_trow1, is_trow2, is_split, is_blank;
|
||||||
ViewCol viewcol;
|
ViewCol viewcol;
|
||||||
char *error_loc = NULL;
|
|
||||||
Account *anchor = view->priv->anchor;
|
Account *anchor = view->priv->anchor;
|
||||||
|
|
||||||
editable = g_object_get_data (G_OBJECT (cell), "cell-editable");
|
editable = g_object_get_data (G_OBJECT (cell), "cell-editable");
|
||||||
@ -5339,7 +5313,7 @@ gtv_sr_ed_key_press_cb (GtkWidget *widget, GdkEventKey *event, gpointer user_dat
|
|||||||
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
GtkTreeViewColumn *col;
|
GtkTreeViewColumn *col;
|
||||||
GtkTreePath *spath, *start_spath;
|
GtkTreePath *spath;
|
||||||
gboolean goto_blank = FALSE;
|
gboolean goto_blank = FALSE;
|
||||||
gboolean next_trans = TRUE;
|
gboolean next_trans = TRUE;
|
||||||
Transaction *btrans, *ctrans;
|
Transaction *btrans, *ctrans;
|
||||||
@ -5541,8 +5515,7 @@ gtv_sr_editable_start_editing_cb (GtkCellRenderer *cr, GtkCellEditable *editable
|
|||||||
{
|
{
|
||||||
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
GtkTreeModel *s_model;
|
GtkTreePath *spath;
|
||||||
GtkTreePath *spath, *mpath, *fpath;
|
|
||||||
GtkEntry *entry = NULL;
|
GtkEntry *entry = NULL;
|
||||||
ViewCol viewcol;
|
ViewCol viewcol;
|
||||||
RowDepth depth;
|
RowDepth depth;
|
||||||
@ -5559,8 +5532,6 @@ gtv_sr_editable_start_editing_cb (GtkCellRenderer *cr, GtkCellEditable *editable
|
|||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
||||||
|
|
||||||
s_model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
|
|
||||||
|
|
||||||
/* Description / Notes / Memo / Accounts Completion Lists */
|
/* Description / Notes / Memo / Accounts Completion Lists */
|
||||||
description_list = gnc_tree_model_split_reg_get_description_list (model);
|
description_list = gnc_tree_model_split_reg_get_description_list (model);
|
||||||
notes_list = gnc_tree_model_split_reg_get_notes_list (model);
|
notes_list = gnc_tree_model_split_reg_get_notes_list (model);
|
||||||
@ -5828,34 +5799,34 @@ gtv_sr_editable_start_editing_cb (GtkCellRenderer *cr, GtkCellEditable *editable
|
|||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef skip
|
||||||
// Handle the "match-selected" signal
|
// Handle the "match-selected" signal
|
||||||
static void
|
static void
|
||||||
gtv_sr_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
|
gtv_sr_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
|
||||||
GtkTreeIter *iter, gpointer user_data)
|
GtkTreeIter *iter, gpointer user_data)
|
||||||
{
|
{
|
||||||
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
// GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
||||||
|
|
||||||
//FIXME g_print("gtv_sr_match_selected_cb\n\n");
|
//FIXME g_print("gtv_sr_match_selected_cb\n\n");
|
||||||
|
|
||||||
/* Not sure what I am going to put in here yet if anything */
|
/* Not sure what I am going to put in here yet if anything */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef skip
|
||||||
// Handle the "changed" signal
|
// Handle the "changed" signal
|
||||||
static void
|
static void
|
||||||
gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
|
gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
|
||||||
GtkTreeIter *iter, gpointer user_data)
|
GtkTreeIter *iter, gpointer user_data)
|
||||||
{
|
{
|
||||||
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
// GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
|
||||||
|
|
||||||
//FIXME g_print("gtv_sr_changed_cb path string is '%s'\n\n", path_string);
|
//FIXME g_print("gtv_sr_changed_cb path string is '%s'\n\n", path_string);
|
||||||
|
|
||||||
/* Not sure what I am going to put in here yet if anything */
|
/* Not sure what I am going to put in here yet if anything */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Handle the "editing-canceled" signal
|
// Handle the "editing-canceled" signal
|
||||||
static void
|
static void
|
||||||
@ -5990,10 +5961,6 @@ gnc_tree_view_split_reg_get_dirty_trans (GncTreeViewSplitReg *view)
|
|||||||
void
|
void
|
||||||
gnc_tree_view_split_reg_set_dirty_trans (GncTreeViewSplitReg *view, Transaction *trans)
|
gnc_tree_view_split_reg_set_dirty_trans (GncTreeViewSplitReg *view, Transaction *trans)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
|
||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
|
||||||
|
|
||||||
if (trans == NULL)
|
if (trans == NULL)
|
||||||
{
|
{
|
||||||
g_object_set_data (G_OBJECT (view), "data-edited", GINT_TO_POINTER (FALSE));
|
g_object_set_data (G_OBJECT (view), "data-edited", GINT_TO_POINTER (FALSE));
|
||||||
@ -6128,10 +6095,6 @@ gnc_tree_view_split_reg_delete_current_trans (GncTreeViewSplitReg *view)
|
|||||||
gboolean
|
gboolean
|
||||||
gnc_tree_view_split_reg_enter (GncTreeViewSplitReg *view)
|
gnc_tree_view_split_reg_enter (GncTreeViewSplitReg *view)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
|
||||||
|
|
||||||
model = gnc_tree_view_split_reg_get_model_from_view (view);
|
|
||||||
|
|
||||||
/* Make sure we have stopped editing */
|
/* Make sure we have stopped editing */
|
||||||
gnc_tree_view_split_reg_finish_edit (view);
|
gnc_tree_view_split_reg_finish_edit (view);
|
||||||
|
|
||||||
@ -6355,11 +6318,12 @@ gnc_tree_view_split_reg_expand_trans (GncTreeViewSplitReg *view, Transaction *tr
|
|||||||
|
|
||||||
if (gtk_tree_view_get_visible_range (GTK_TREE_VIEW (view), &start_path, &end_path))
|
if (gtk_tree_view_get_visible_range (GTK_TREE_VIEW (view), &start_path, &end_path))
|
||||||
{
|
{
|
||||||
gint *indices_start, *indices_end;
|
// gint *indices_start;
|
||||||
|
gint *indices_end;
|
||||||
gint lines = 0;
|
gint lines = 0;
|
||||||
|
|
||||||
/* The first and last visible path */
|
/* The first and last visible path */
|
||||||
indices_start = gtk_tree_path_get_indices (start_path);
|
// indices_start = gtk_tree_path_get_indices (start_path);
|
||||||
indices_end = gtk_tree_path_get_indices (end_path);
|
indices_end = gtk_tree_path_get_indices (end_path);
|
||||||
|
|
||||||
if (model->use_double_line)
|
if (model->use_double_line)
|
||||||
|
@ -677,15 +677,12 @@ static void
|
|||||||
gnc_tree_view_update_visibility (GtkTreeViewColumn *column,
|
gnc_tree_view_update_visibility (GtkTreeViewColumn *column,
|
||||||
GncTreeView *view)
|
GncTreeView *view)
|
||||||
{
|
{
|
||||||
GncTreeViewPrivate *priv;
|
|
||||||
gchar *name, *key;
|
|
||||||
gboolean visible;
|
gboolean visible;
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_TREE_VIEW_COLUMN(column));
|
g_return_if_fail(GTK_IS_TREE_VIEW_COLUMN(column));
|
||||||
g_return_if_fail(GNC_IS_TREE_VIEW(view));
|
g_return_if_fail(GNC_IS_TREE_VIEW(view));
|
||||||
|
|
||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
|
|
||||||
visible = gnc_tree_view_column_visible(view, column, NULL);
|
visible = gnc_tree_view_column_visible(view, column, NULL);
|
||||||
gtk_tree_view_column_set_visible(column, visible);
|
gtk_tree_view_column_set_visible(column, visible);
|
||||||
LEAVE("made %s", visible ? "visible" : "invisible");
|
LEAVE("made %s", visible ? "visible" : "invisible");
|
||||||
@ -704,13 +701,11 @@ gnc_tree_view_update_visibility (GtkTreeViewColumn *column,
|
|||||||
static gchar *
|
static gchar *
|
||||||
gnc_tree_view_get_sort_order (GncTreeView *view)
|
gnc_tree_view_get_sort_order (GncTreeView *view)
|
||||||
{
|
{
|
||||||
GncTreeViewPrivate *priv;
|
|
||||||
GtkTreeModel *s_model;
|
GtkTreeModel *s_model;
|
||||||
GtkSortType order;
|
GtkSortType order;
|
||||||
gint current;
|
gint current;
|
||||||
gchar *order_str = NULL;
|
gchar *order_str = NULL;
|
||||||
|
|
||||||
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
|
|
||||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
||||||
if (!s_model)
|
if (!s_model)
|
||||||
return NULL; /* no model, so sort order doesn't make sense */
|
return NULL; /* no model, so sort order doesn't make sense */
|
||||||
@ -741,7 +736,7 @@ gnc_tree_view_get_sort_column (GncTreeView *view)
|
|||||||
GtkTreeModel *s_model;
|
GtkTreeModel *s_model;
|
||||||
GtkTreeViewColumn *column;
|
GtkTreeViewColumn *column;
|
||||||
GtkSortType order;
|
GtkSortType order;
|
||||||
gint model_column, current;
|
gint current;
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
|
|
||||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
||||||
@ -827,12 +822,10 @@ static void
|
|||||||
gnc_tree_view_set_sort_order (GncTreeView *view,
|
gnc_tree_view_set_sort_order (GncTreeView *view,
|
||||||
const gchar *name)
|
const gchar *name)
|
||||||
{
|
{
|
||||||
GncTreeViewPrivate *priv;
|
|
||||||
GtkTreeModel *s_model;
|
GtkTreeModel *s_model;
|
||||||
GtkSortType order = GTK_SORT_ASCENDING;
|
GtkSortType order = GTK_SORT_ASCENDING;
|
||||||
gint current;
|
gint current;
|
||||||
|
|
||||||
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
|
|
||||||
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
|
||||||
if (!s_model)
|
if (!s_model)
|
||||||
return;
|
return;
|
||||||
@ -907,7 +900,6 @@ gnc_tree_view_set_column_order (GncTreeView *view,
|
|||||||
gchar **column_names,
|
gchar **column_names,
|
||||||
gsize length)
|
gsize length)
|
||||||
{
|
{
|
||||||
GncTreeViewPrivate *priv;
|
|
||||||
GtkTreeViewColumn *column, *prev;
|
GtkTreeViewColumn *column, *prev;
|
||||||
const GSList *tmp;
|
const GSList *tmp;
|
||||||
GSList *columns;
|
GSList *columns;
|
||||||
@ -915,7 +907,6 @@ gnc_tree_view_set_column_order (GncTreeView *view,
|
|||||||
|
|
||||||
/* First, convert from names to pointers */
|
/* First, convert from names to pointers */
|
||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
|
|
||||||
columns = NULL;
|
columns = NULL;
|
||||||
for (idx = 0; idx < length; idx++)
|
for (idx = 0; idx < length; idx++)
|
||||||
{
|
{
|
||||||
@ -1312,15 +1303,11 @@ static void
|
|||||||
gnc_tree_view_update_column_menu_item (GtkCheckMenuItem *checkmenuitem,
|
gnc_tree_view_update_column_menu_item (GtkCheckMenuItem *checkmenuitem,
|
||||||
GncTreeView *view)
|
GncTreeView *view)
|
||||||
{
|
{
|
||||||
GncTreeViewPrivate *priv;
|
|
||||||
gchar *key;
|
|
||||||
gboolean visible;
|
gboolean visible;
|
||||||
|
|
||||||
g_return_if_fail(GTK_IS_CHECK_MENU_ITEM(checkmenuitem));
|
g_return_if_fail(GTK_IS_CHECK_MENU_ITEM(checkmenuitem));
|
||||||
g_return_if_fail(GNC_IS_TREE_VIEW(view));
|
g_return_if_fail(GNC_IS_TREE_VIEW(view));
|
||||||
|
|
||||||
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
|
|
||||||
key = g_object_get_data(G_OBJECT(checkmenuitem), STATE_KEY);
|
|
||||||
if (g_object_get_data(G_OBJECT(checkmenuitem), ALWAYS_VISIBLE))
|
if (g_object_get_data(G_OBJECT(checkmenuitem), ALWAYS_VISIBLE))
|
||||||
{
|
{
|
||||||
visible = TRUE;
|
visible = TRUE;
|
||||||
@ -1627,7 +1614,6 @@ gnc_tree_view_column_properties (GncTreeView *view,
|
|||||||
GtkTreeModel *s_model;
|
GtkTreeModel *s_model;
|
||||||
gboolean visible;
|
gboolean visible;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
gchar *key;
|
|
||||||
|
|
||||||
/* Set data used by other functions */
|
/* Set data used by other functions */
|
||||||
if (pref_name)
|
if (pref_name)
|
||||||
|
@ -561,7 +561,6 @@ gnc_search_param_prepend_compound (GList *list, char const *title,
|
|||||||
GtkJustification justify,
|
GtkJustification justify,
|
||||||
GNCSearchParamKind kind)
|
GNCSearchParamKind kind)
|
||||||
{
|
{
|
||||||
GList *result;
|
|
||||||
GList *p;
|
GList *p;
|
||||||
QofIdTypeConst type = NULL;
|
QofIdTypeConst type = NULL;
|
||||||
GNCSearchParamCompound *param;
|
GNCSearchParamCompound *param;
|
||||||
|
@ -15,6 +15,7 @@ SET(gnome_utils_ui_DIST_local
|
|||||||
gnc-windows-menu-ui.xml
|
gnc-windows-menu-ui.xml
|
||||||
Makefile.am
|
Makefile.am
|
||||||
osx_accel_map
|
osx_accel_map
|
||||||
|
gnucash.css
|
||||||
)
|
)
|
||||||
|
|
||||||
SET_DIST_LIST(gnome_utils_ui_DIST ${gnome_utils_ui_DIST_local})
|
SET_DIST_LIST(gnome_utils_ui_DIST ${gnome_utils_ui_DIST_local})
|
||||||
|
@ -3,6 +3,7 @@ ui_DATA = \
|
|||||||
gnc-main-window-ui.xml \
|
gnc-main-window-ui.xml \
|
||||||
gnc-windows-menu-ui.xml \
|
gnc-windows-menu-ui.xml \
|
||||||
gnc-windows-menu-ui-quartz.xml \
|
gnc-windows-menu-ui-quartz.xml \
|
||||||
osx_accel_map
|
osx_accel_map \
|
||||||
|
gnucash.css
|
||||||
|
|
||||||
EXTRA_DIST = $(ui_DATA) CMakeLists.txt
|
EXTRA_DIST = $(ui_DATA) CMakeLists.txt
|
||||||
|
37
src/gnome-utils/ui/gnucash.css
Normal file
37
src/gnome-utils/ui/gnucash.css
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
/* Note: Widgets obtained from Glade files will not be addressable
|
||||||
|
directly by name as these are not brought in when loaded, only
|
||||||
|
the widget type can be configured unless they are named in code */
|
||||||
|
|
||||||
|
/* Import Matcher # import-main-matcher.*/
|
||||||
|
.color_back_red {
|
||||||
|
background-color: brown1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color_back_yellow {
|
||||||
|
background-color: gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.color_back_green {
|
||||||
|
background-color: DarkSeaGreen1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* label colors # dialog-utils.c */
|
||||||
|
.css_default_color {
|
||||||
|
color: currentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
.css_red_color {
|
||||||
|
color: rgb(75%, 0%, 0%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set the grid lines to be solid # gnc-tree-view-split-reg.c */
|
||||||
|
.treeview_grid_lines {
|
||||||
|
border-color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Increase label size # dialog-account.c */
|
||||||
|
.primary_label_size {
|
||||||
|
font-size: large;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
@ -238,10 +238,7 @@ get_account_info (FindAccountDialog *facc_dialog)
|
|||||||
static void
|
static void
|
||||||
filter_button_cb (GtkButton *button, FindAccountDialog *facc_dialog)
|
filter_button_cb (GtkButton *button, FindAccountDialog *facc_dialog)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW(facc_dialog->view));
|
||||||
const gchar *filter_text = gtk_entry_get_text (GTK_ENTRY(facc_dialog->filter_text_entry));
|
|
||||||
|
|
||||||
model = gtk_tree_view_get_model (GTK_TREE_VIEW(facc_dialog->view));
|
|
||||||
|
|
||||||
// Clear the list store
|
// Clear the list store
|
||||||
gtk_list_store_clear (GTK_LIST_STORE(model));
|
gtk_list_store_clear (GTK_LIST_STORE(model));
|
||||||
|
@ -591,7 +591,6 @@ get_account_info (ImapDialog *imap_dialog)
|
|||||||
Account *root;
|
Account *root;
|
||||||
GList *accts;
|
GList *accts;
|
||||||
GtkTreeModel *model, *filter;
|
GtkTreeModel *model, *filter;
|
||||||
GtkTreeIter iter;
|
|
||||||
|
|
||||||
/* Get list of Accounts */
|
/* Get list of Accounts */
|
||||||
root = gnc_book_get_root_account (gnc_get_current_book());
|
root = gnc_book_get_root_account (gnc_get_current_book());
|
||||||
|
@ -982,9 +982,7 @@ static void
|
|||||||
lv_create (GNCLotViewer *lv)
|
lv_create (GNCLotViewer *lv)
|
||||||
{
|
{
|
||||||
gchar *win_title;
|
gchar *win_title;
|
||||||
gint position;
|
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *widget;
|
|
||||||
|
|
||||||
builder = gtk_builder_new();
|
builder = gtk_builder_new();
|
||||||
gnc_builder_add_from_file (builder, "dialog-lot-viewer.glade", "lot_viewer_dialog");
|
gnc_builder_add_from_file (builder, "dialog-lot-viewer.glade", "lot_viewer_dialog");
|
||||||
|
@ -1606,7 +1606,6 @@ gnc_ui_print_check_dialog_create(GtkWidget *parent,
|
|||||||
PrintCheckDialog *pcd;
|
PrintCheckDialog *pcd;
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *table;
|
GtkWidget *table;
|
||||||
GtkWindow *window;
|
|
||||||
gchar *font;
|
gchar *font;
|
||||||
Transaction *trans = NULL;
|
Transaction *trans = NULL;
|
||||||
|
|
||||||
|
@ -722,11 +722,8 @@ check_transaction_splits (Transaction *txn, gpointer data)
|
|||||||
for ( ; splitList; splitList = splitList->next )
|
for ( ; splitList; splitList = splitList->next )
|
||||||
{
|
{
|
||||||
gnc_commodity *base_cmdty = NULL;
|
gnc_commodity *base_cmdty = NULL;
|
||||||
txnCreditDebitSums *tcds;
|
|
||||||
Split *s = (Split*)splitList->data;
|
Split *s = (Split*)splitList->data;
|
||||||
|
|
||||||
tcds = (txnCreditDebitSums*)g_hash_table_lookup (sd->txns,
|
|
||||||
(gpointer)txn);
|
|
||||||
if (sd->tcds == NULL)
|
if (sd->tcds == NULL)
|
||||||
{
|
{
|
||||||
sd->tcds = tcds_new ();
|
sd->tcds = tcds_new ();
|
||||||
@ -808,7 +805,6 @@ gnc_sxed_check_consistent( GncSxEditorDialog *sxed )
|
|||||||
* right... ]
|
* right... ]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
gboolean multi_commodity = FALSE;
|
|
||||||
gint ttVarCount = 0, splitCount = 0;
|
gint ttVarCount = 0, splitCount = 0;
|
||||||
static const int NUM_ITERS_WITH_VARS = 5;
|
static const int NUM_ITERS_WITH_VARS = 5;
|
||||||
static const int NUM_ITERS_NO_VARS = 1;
|
static const int NUM_ITERS_NO_VARS = 1;
|
||||||
@ -1364,7 +1360,6 @@ schedXact_editor_populate( GncSxEditorDialog *sxed )
|
|||||||
char *name;
|
char *name;
|
||||||
time64 tmpDate;
|
time64 tmpDate;
|
||||||
SplitRegister *splitReg;
|
SplitRegister *splitReg;
|
||||||
struct tm *tmpTm;
|
|
||||||
const GDate *gd;
|
const GDate *gd;
|
||||||
gint daysInAdvance;
|
gint daysInAdvance;
|
||||||
gboolean enabledState, autoCreateState, notifyState;
|
gboolean enabledState, autoCreateState, notifyState;
|
||||||
|
@ -155,7 +155,6 @@ static void gnc_sxed_freq_changed (GncFrequency *gf, gpointer ud);
|
|||||||
static void sxed_excal_update_adapt_cb (GtkWidget *o, gpointer ud);
|
static void sxed_excal_update_adapt_cb (GtkWidget *o, gpointer ud);
|
||||||
static void gnc_sxed_update_cal (GncSxEditorDialog2 *sxed);
|
static void gnc_sxed_update_cal (GncSxEditorDialog2 *sxed);
|
||||||
static void on_sx_check_toggled_cb (GtkWidget *togglebutton, gpointer user_data);
|
static void on_sx_check_toggled_cb (GtkWidget *togglebutton, gpointer user_data);
|
||||||
//void on_sx_check_toggled_cb (GtkWidget *togglebutton, gpointer user_data);
|
|
||||||
static void gnc_sxed_reg_check_close (GncSxEditorDialog2 *sxed);
|
static void gnc_sxed_reg_check_close (GncSxEditorDialog2 *sxed);
|
||||||
static gboolean sxed_delete_event (GtkWidget *widget, GdkEvent *event, gpointer ud);
|
static gboolean sxed_delete_event (GtkWidget *widget, GdkEvent *event, gpointer ud);
|
||||||
static gboolean sxed_confirmed_cancel (GncSxEditorDialog2 *sxed);
|
static gboolean sxed_confirmed_cancel (GncSxEditorDialog2 *sxed);
|
||||||
@ -1325,7 +1324,6 @@ schedXact_editor_populate (GncSxEditorDialog2 *sxed)
|
|||||||
char *name;
|
char *name;
|
||||||
time64 tmpDate;
|
time64 tmpDate;
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
struct tm *tmpTm;
|
|
||||||
const GDate *gd;
|
const GDate *gd;
|
||||||
gint daysInAdvance;
|
gint daysInAdvance;
|
||||||
gboolean enabledState, autoCreateState, notifyState;
|
gboolean enabledState, autoCreateState, notifyState;
|
||||||
|
@ -340,7 +340,6 @@ sxftd_init( SXFromTransInfo *sxfti )
|
|||||||
gint pos;
|
gint pos;
|
||||||
GList *schedule = NULL;
|
GList *schedule = NULL;
|
||||||
time64 start_tt;
|
time64 start_tt;
|
||||||
struct tm *tmpTm;
|
|
||||||
GDate date, nextDate;
|
GDate date, nextDate;
|
||||||
|
|
||||||
if ( ! sxfti->sx )
|
if ( ! sxfti->sx )
|
||||||
@ -579,7 +578,6 @@ sxftd_freq_combo_changed( GtkWidget *w, gpointer user_data )
|
|||||||
SXFromTransInfo *sxfti = (SXFromTransInfo*)user_data;
|
SXFromTransInfo *sxfti = (SXFromTransInfo*)user_data;
|
||||||
GDate date, nextDate;
|
GDate date, nextDate;
|
||||||
time64 tmp_tt;
|
time64 tmp_tt;
|
||||||
struct tm *tmpTm;
|
|
||||||
GList *schedule = NULL;
|
GList *schedule = NULL;
|
||||||
|
|
||||||
tmp_tt = xaccTransGetDate( sxfti->trans );
|
tmp_tt = xaccTransGetDate( sxfti->trans );
|
||||||
@ -676,7 +674,6 @@ gnc_sx_trans_window_response_cb (GtkDialog *dialog,
|
|||||||
static void
|
static void
|
||||||
sxftd_update_example_cal( SXFromTransInfo *sxfti )
|
sxftd_update_example_cal( SXFromTransInfo *sxfti )
|
||||||
{
|
{
|
||||||
struct tm *tmpTm;
|
|
||||||
time64 tmp_tt;
|
time64 tmp_tt;
|
||||||
GDate date, startDate, nextDate;
|
GDate date, startDate, nextDate;
|
||||||
GList *schedule = NULL;
|
GList *schedule = NULL;
|
||||||
|
@ -472,7 +472,6 @@ load_tax_entity_type_list (TaxInfoDialog *ti_dialog)
|
|||||||
{
|
{
|
||||||
TaxTypeInfo *tax_type_info;
|
TaxTypeInfo *tax_type_info;
|
||||||
SCM type_scm;
|
SCM type_scm;
|
||||||
gchar *str = NULL;
|
|
||||||
SCM scm;
|
SCM scm;
|
||||||
|
|
||||||
type_scm = SCM_CAR (tax_types);
|
type_scm = SCM_CAR (tax_types);
|
||||||
|
@ -109,11 +109,14 @@ static void gnc_budget_view_init(GncBudgetView *budget_view);
|
|||||||
static void gnc_budget_view_finalize(GObject *object);
|
static void gnc_budget_view_finalize(GObject *object);
|
||||||
|
|
||||||
static void gbv_create_widget(GncBudgetView *view);
|
static void gbv_create_widget(GncBudgetView *view);
|
||||||
|
#if 0
|
||||||
static gboolean gbv_button_press_cb(
|
static gboolean gbv_button_press_cb(
|
||||||
GtkWidget *widget, GdkEventButton *event, GncBudgetView *view);
|
GtkWidget *widget, GdkEventButton *event, GncBudgetView *view);
|
||||||
|
#endif
|
||||||
|
#if 0
|
||||||
static gboolean gbv_key_press_cb(
|
static gboolean gbv_key_press_cb(
|
||||||
GtkWidget *treeview, GdkEventKey *event, gpointer userdata);
|
GtkWidget *treeview, GdkEventKey *event, gpointer userdata);
|
||||||
|
#endif
|
||||||
static void gbv_row_activated_cb(
|
static void gbv_row_activated_cb(
|
||||||
GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col,
|
GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col,
|
||||||
GncBudgetView *view);
|
GncBudgetView *view);
|
||||||
@ -171,8 +174,6 @@ gnc_budget_view_new(GncBudget *budget, AccountFilterDialog* fd)
|
|||||||
{
|
{
|
||||||
GncBudgetView *budget_view;
|
GncBudgetView *budget_view;
|
||||||
GncBudgetViewPrivate *priv;
|
GncBudgetViewPrivate *priv;
|
||||||
gchar* label;
|
|
||||||
const GList *item;
|
|
||||||
|
|
||||||
g_return_val_if_fail(GNC_IS_BUDGET(budget), NULL);
|
g_return_val_if_fail(GNC_IS_BUDGET(budget), NULL);
|
||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
@ -254,7 +255,6 @@ static void
|
|||||||
gnc_budget_view_finalize(GObject *object)
|
gnc_budget_view_finalize(GObject *object)
|
||||||
{
|
{
|
||||||
GncBudgetView *view;
|
GncBudgetView *view;
|
||||||
GncBudgetViewPrivate *priv;
|
|
||||||
|
|
||||||
ENTER("object %p", object);
|
ENTER("object %p", object);
|
||||||
view = GNC_BUDGET_VIEW(object);
|
view = GNC_BUDGET_VIEW(object);
|
||||||
@ -443,7 +443,6 @@ void
|
|||||||
gnc_budget_view_save(GncBudgetView *view, GKeyFile *key_file, const gchar *group_name)
|
gnc_budget_view_save(GncBudgetView *view, GKeyFile *key_file, const gchar *group_name)
|
||||||
{
|
{
|
||||||
GncBudgetViewPrivate *priv;
|
GncBudgetViewPrivate *priv;
|
||||||
char guid_str[GUID_ENCODING_LENGTH+1];
|
|
||||||
|
|
||||||
g_return_if_fail(view != NULL);
|
g_return_if_fail(view != NULL);
|
||||||
g_return_if_fail(key_file != NULL);
|
g_return_if_fail(key_file != NULL);
|
||||||
@ -573,7 +572,7 @@ gbv_button_press_cb(GtkWidget *widget, GdkEventButton *event,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
/** \brief Key press action for gnc budget view.
|
/** \brief Key press action for gnc budget view.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -605,7 +604,7 @@ gbv_key_press_cb(GtkWidget *treeview, GdkEventKey *event, gpointer userdata)
|
|||||||
gtk_tree_view_set_cursor(tv, path, col, TRUE);
|
gtk_tree_view_set_cursor(tv, path, col, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/** \brief gnc budget view actions for resize of treeview.
|
/** \brief gnc budget view actions for resize of treeview.
|
||||||
*/
|
*/
|
||||||
@ -639,7 +638,8 @@ gbv_treeview_resized_cb(GtkWidget* widget, GtkAllocation* allocation, GncBudgetV
|
|||||||
{
|
{
|
||||||
col_width = gtk_tree_view_column_get_width(tree_view_col);
|
col_width = gtk_tree_view_column_get_width(tree_view_col);
|
||||||
totals_view_col = gtk_tree_view_get_column(priv->totals_tree_view, j);
|
totals_view_col = gtk_tree_view_get_column(priv->totals_tree_view, j);
|
||||||
gtk_tree_view_column_set_fixed_width(totals_view_col, col_width);
|
if(GTK_IS_TREE_VIEW_COLUMN(totals_view_col))
|
||||||
|
gtk_tree_view_column_set_fixed_width(totals_view_col, col_width);
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -652,8 +652,6 @@ static void
|
|||||||
gbv_row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
|
gbv_row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
|
||||||
GtkTreeViewColumn *col, GncBudgetView *view)
|
GtkTreeViewColumn *col, GncBudgetView *view)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
|
||||||
GncPluginPage *new_page;
|
|
||||||
Account *account;
|
Account *account;
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_BUDGET_VIEW(view));
|
g_return_if_fail(GNC_IS_BUDGET_VIEW(view));
|
||||||
@ -909,9 +907,6 @@ totals_col_source(GtkTreeViewColumn *col, GtkCellRenderer *cell,
|
|||||||
gint period_num;
|
gint period_num;
|
||||||
gnc_numeric value; // used to assist in adding and subtracting
|
gnc_numeric value; // used to assist in adding and subtracting
|
||||||
gchar amtbuff[100]; //FIXME: overkill, where's the #define?
|
gchar amtbuff[100]; //FIXME: overkill, where's the #define?
|
||||||
|
|
||||||
gint width; // FIXME: VARIABLE NOT NEEDED?
|
|
||||||
|
|
||||||
gint i;
|
gint i;
|
||||||
gint num_top_accounts;
|
gint num_top_accounts;
|
||||||
|
|
||||||
@ -1098,7 +1093,6 @@ gbv_col_edited_cb(GtkCellRendererText* cell, gchar* path_string, gchar* new_text
|
|||||||
{
|
{
|
||||||
GncBudgetView *view;
|
GncBudgetView *view;
|
||||||
GncBudgetViewPrivate *priv;
|
GncBudgetViewPrivate *priv;
|
||||||
const EventInfo* ei;
|
|
||||||
|
|
||||||
view = GNC_BUDGET_VIEW(user_data);
|
view = GNC_BUDGET_VIEW(user_data);
|
||||||
priv = GNC_BUDGET_VIEW_GET_PRIVATE(view);
|
priv = GNC_BUDGET_VIEW_GET_PRIVATE(view);
|
||||||
|
@ -47,7 +47,6 @@ static void gnc_plugin_account_tree_finalize (GObject *object);
|
|||||||
|
|
||||||
/* Command callbacks */
|
/* Command callbacks */
|
||||||
static void gnc_plugin_account_tree_cmd_new_account_tree (GtkAction *action, GncMainWindowActionData *data);
|
static void gnc_plugin_account_tree_cmd_new_account_tree (GtkAction *action, GncMainWindowActionData *data);
|
||||||
static void gnc_plugin_account_tree_cmd_find_account (GtkAction *action, GncMainWindowActionData *data);
|
|
||||||
|
|
||||||
#define PLUGIN_ACTIONS_NAME "gnc-plugin-account-tree-actions"
|
#define PLUGIN_ACTIONS_NAME "gnc-plugin-account-tree-actions"
|
||||||
#define PLUGIN_UI_FILENAME "gnc-plugin-account-tree-ui.xml"
|
#define PLUGIN_UI_FILENAME "gnc-plugin-account-tree-ui.xml"
|
||||||
|
@ -509,12 +509,6 @@ gnc_main_window_cmd_file_save_as (GtkAction *action, GncMainWindowActionData *da
|
|||||||
static void
|
static void
|
||||||
gnc_main_window_cmd_file_revert (GtkAction *action, GncMainWindowActionData *data)
|
gnc_main_window_cmd_file_revert (GtkAction *action, GncMainWindowActionData *data)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
|
||||||
QofSession *session;
|
|
||||||
QofBook *book;
|
|
||||||
const gchar *filename, *tmp;
|
|
||||||
const gchar *title = _("Reverting will discard all unsaved changes to %s. Are you sure you want to proceed ?");
|
|
||||||
|
|
||||||
g_return_if_fail (data != NULL);
|
g_return_if_fail (data != NULL);
|
||||||
|
|
||||||
if (!gnc_main_window_all_finish_pending())
|
if (!gnc_main_window_all_finish_pending())
|
||||||
|
@ -163,12 +163,14 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
|
|||||||
static guint gnc_plugin_page_budget_n_actions =
|
static guint gnc_plugin_page_budget_n_actions =
|
||||||
G_N_ELEMENTS (gnc_plugin_page_budget_actions);
|
G_N_ELEMENTS (gnc_plugin_page_budget_actions);
|
||||||
|
|
||||||
|
#if 0
|
||||||
static const gchar *actions_requiring_account[] =
|
static const gchar *actions_requiring_account[] =
|
||||||
{
|
{
|
||||||
"OpenAccountAction",
|
"OpenAccountAction",
|
||||||
"OpenSubaccountsAction",
|
"OpenSubaccountsAction",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Short labels for use on the toolbar buttons. */
|
/** Short labels for use on the toolbar buttons. */
|
||||||
static action_toolbar_labels toolbar_labels[] =
|
static action_toolbar_labels toolbar_labels[] =
|
||||||
@ -333,6 +335,7 @@ gnc_plugin_page_budget_init (GncPluginPageBudget *plugin_page)
|
|||||||
priv->fd.visible_types = -1; /* Start with all types */
|
priv->fd.visible_types = -1; /* Start with all types */
|
||||||
priv->fd.show_hidden = FALSE;
|
priv->fd.show_hidden = FALSE;
|
||||||
priv->fd.show_zero_total = TRUE;
|
priv->fd.show_zero_total = TRUE;
|
||||||
|
priv->fd.filter_override = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||||
|
|
||||||
priv->sigFigs = 1;
|
priv->sigFigs = 1;
|
||||||
recurrenceSet(&priv->r, 1, PERIOD_MONTH, NULL, WEEKEND_ADJ_NONE);
|
recurrenceSet(&priv->r, 1, PERIOD_MONTH, NULL, WEEKEND_ADJ_NONE);
|
||||||
@ -346,7 +349,6 @@ static void
|
|||||||
gnc_plugin_page_budget_finalize (GObject *object)
|
gnc_plugin_page_budget_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GncPluginPageBudget *page;
|
GncPluginPageBudget *page;
|
||||||
GncPluginPageBudgetPrivate *priv;
|
|
||||||
|
|
||||||
ENTER("object %p", object);
|
ENTER("object %p", object);
|
||||||
page = GNC_PLUGIN_PAGE_BUDGET (object);
|
page = GNC_PLUGIN_PAGE_BUDGET (object);
|
||||||
@ -409,10 +411,6 @@ gnc_plugin_page_budget_create_widget (GncPluginPage *plugin_page)
|
|||||||
{
|
{
|
||||||
GncPluginPageBudget *page;
|
GncPluginPageBudget *page;
|
||||||
GncPluginPageBudgetPrivate *priv;
|
GncPluginPageBudgetPrivate *priv;
|
||||||
GtkTreeSelection *selection;
|
|
||||||
GtkTreeView *tree_view;
|
|
||||||
GtkWidget *scrolled_window;
|
|
||||||
const gchar *budget_guid_str;
|
|
||||||
|
|
||||||
ENTER("page %p", plugin_page);
|
ENTER("page %p", plugin_page);
|
||||||
page = GNC_PLUGIN_PAGE_BUDGET (plugin_page);
|
page = GNC_PLUGIN_PAGE_BUDGET (plugin_page);
|
||||||
@ -471,6 +469,9 @@ gnc_plugin_page_budget_destroy_widget (GncPluginPage *plugin_page)
|
|||||||
priv->budget_view = NULL;
|
priv->budget_view = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Destroy the filter override hash table
|
||||||
|
g_hash_table_destroy(priv->fd.filter_override);
|
||||||
|
|
||||||
gnc_gui_component_clear_watches (priv->component_id);
|
gnc_gui_component_clear_watches (priv->component_id);
|
||||||
|
|
||||||
if (priv->component_id != NO_COMPONENT)
|
if (priv->component_id != NO_COMPONENT)
|
||||||
|
@ -600,9 +600,6 @@ gnc_plugin_page_register2_new_common (GNCLedgerDisplay2 *ledger)
|
|||||||
GncPluginPageRegister2Private *priv;
|
GncPluginPageRegister2Private *priv;
|
||||||
GncPluginPage *plugin_page;
|
GncPluginPage *plugin_page;
|
||||||
|
|
||||||
GncTreeModelSplitReg *model;
|
|
||||||
GtkTreeView *tv;
|
|
||||||
|
|
||||||
GNCSplitReg2 *gsr;
|
GNCSplitReg2 *gsr;
|
||||||
|
|
||||||
const GList *item;
|
const GList *item;
|
||||||
@ -610,7 +607,6 @@ gnc_plugin_page_register2_new_common (GNCLedgerDisplay2 *ledger)
|
|||||||
gchar *label;
|
gchar *label;
|
||||||
gchar *label_color;
|
gchar *label_color;
|
||||||
QofQuery *q;
|
QofQuery *q;
|
||||||
Account *account;
|
|
||||||
|
|
||||||
/* Is there an existing page? */
|
/* Is there an existing page? */
|
||||||
gsr = gnc_ledger_display2_get_user_data (ledger);
|
gsr = gnc_ledger_display2_get_user_data (ledger);
|
||||||
@ -789,13 +785,11 @@ static void
|
|||||||
gnc_plugin_page_register2_finalize (GObject *object)
|
gnc_plugin_page_register2_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2 *page;
|
GncPluginPageRegister2 *page;
|
||||||
GncPluginPageRegister2Private *priv;
|
|
||||||
|
|
||||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER2 (object));
|
|
||||||
|
|
||||||
ENTER("object %p", object);
|
ENTER("object %p", object);
|
||||||
page = GNC_PLUGIN_PAGE_REGISTER2 (object);
|
page = GNC_PLUGIN_PAGE_REGISTER2 (object);
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
|
||||||
|
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
@ -1079,7 +1073,6 @@ gnc_plugin_page_register2_create_widget (GncPluginPage *plugin_page)
|
|||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
Account *acct;
|
Account *acct;
|
||||||
gchar **filter;
|
gchar **filter;
|
||||||
gchar *order;
|
|
||||||
int filter_changed = 0;
|
int filter_changed = 0;
|
||||||
|
|
||||||
ENTER("page %p", plugin_page);
|
ENTER("page %p", plugin_page);
|
||||||
@ -1434,7 +1427,6 @@ gnc_plugin_page_register2_restore_edit_menu (GncPluginPage *page,
|
|||||||
GKeyFile *key_file,
|
GKeyFile *key_file,
|
||||||
const gchar *group_name)
|
const gchar *group_name)
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
|
||||||
GtkAction *action;
|
GtkAction *action;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
gchar *style_name;
|
gchar *style_name;
|
||||||
@ -1443,7 +1435,6 @@ gnc_plugin_page_register2_restore_edit_menu (GncPluginPage *page,
|
|||||||
gboolean show_extra_dates;
|
gboolean show_extra_dates;
|
||||||
|
|
||||||
ENTER(" ");
|
ENTER(" ");
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
|
||||||
|
|
||||||
/* Convert the style name to an index */
|
/* Convert the style name to an index */
|
||||||
style_name = g_key_file_get_string (key_file, group_name,
|
style_name = g_key_file_get_string (key_file, group_name,
|
||||||
@ -1749,14 +1740,12 @@ void
|
|||||||
gnc_plugin_page_register2_set_filter (GncPluginPage *plugin_page, const gchar *filter )
|
gnc_plugin_page_register2_set_filter (GncPluginPage *plugin_page, const gchar *filter )
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
GncPluginPageRegister2Private *priv;
|
||||||
GNCLedgerDisplay2Type ledger_type;
|
|
||||||
GNCLedgerDisplay2 *ld;
|
GNCLedgerDisplay2 *ld;
|
||||||
Account *leader;
|
Account *leader;
|
||||||
gchar *default_filter;
|
gchar *default_filter;
|
||||||
|
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE(plugin_page);
|
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE(plugin_page);
|
||||||
ld = priv->ledger;
|
ld = priv->ledger;
|
||||||
ledger_type = gnc_ledger_display2_type (ld);
|
|
||||||
leader = gnc_ledger_display2_leader (ld);
|
leader = gnc_ledger_display2_leader (ld);
|
||||||
|
|
||||||
if (leader != NULL)
|
if (leader != NULL)
|
||||||
@ -1968,10 +1957,9 @@ gnc_plugin_page_register2_filter_time2dmy (time64 raw_time)
|
|||||||
{
|
{
|
||||||
struct tm * timeinfo;
|
struct tm * timeinfo;
|
||||||
gchar date_string[11];
|
gchar date_string[11];
|
||||||
gint i;
|
|
||||||
|
|
||||||
timeinfo = gnc_localtime (&raw_time);
|
timeinfo = gnc_localtime (&raw_time);
|
||||||
i = strftime (date_string, 11, "%d-%m-%Y", timeinfo);
|
strftime (date_string, 11, "%d-%m-%Y", timeinfo);
|
||||||
PINFO("Date string is %s", date_string);
|
PINFO("Date string is %s", date_string);
|
||||||
|
|
||||||
gnc_tm_free (timeinfo);
|
gnc_tm_free (timeinfo);
|
||||||
@ -2093,7 +2081,6 @@ static void
|
|||||||
get_filter_times (GncPluginPageRegister2 *page)
|
get_filter_times (GncPluginPageRegister2 *page)
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
GncPluginPageRegister2Private *priv;
|
||||||
GtkWidget *button, *today, *gde;
|
|
||||||
time64 time_val;
|
time64 time_val;
|
||||||
|
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
||||||
@ -2642,7 +2629,7 @@ gnc_plugin_page_register2_cmd_print_check (GtkAction *action,
|
|||||||
}
|
}
|
||||||
else if (ledger_type == LD2_GL && model->type == SEARCH_LEDGER2)
|
else if (ledger_type == LD2_GL && model->type == SEARCH_LEDGER2)
|
||||||
{
|
{
|
||||||
Account *common_acct = NULL, *account;
|
Account *common_acct = NULL;
|
||||||
splits = qof_query_run (gnc_ledger_display2_get_query (priv->ledger));
|
splits = qof_query_run (gnc_ledger_display2_get_query (priv->ledger));
|
||||||
/* Make sure each split is from the same account */
|
/* Make sure each split is from the same account */
|
||||||
for (item = splits; item; item = g_list_next (item))
|
for (item = splits; item; item = g_list_next (item))
|
||||||
@ -2700,15 +2687,11 @@ static void
|
|||||||
gnc_plugin_page_register2_cmd_cut (GtkAction *action,
|
gnc_plugin_page_register2_cmd_cut (GtkAction *action,
|
||||||
GncPluginPageRegister2 *page) //this works
|
GncPluginPageRegister2 *page) //this works
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
|
||||||
GncTreeViewSplitReg *view;
|
|
||||||
GtkWidget *window, *widget;
|
GtkWidget *window, *widget;
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
||||||
|
|
||||||
ENTER("(action %p, page %p)", action, page);
|
ENTER("(action %p, page %p)", action, page);
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
|
||||||
view = gnc_ledger_display2_get_split_view_register (priv->ledger);
|
|
||||||
|
|
||||||
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
|
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
|
||||||
widget = gtk_window_get_focus (GTK_WINDOW (window));
|
widget = gtk_window_get_focus (GTK_WINDOW (window));
|
||||||
@ -2725,15 +2708,11 @@ static void
|
|||||||
gnc_plugin_page_register2_cmd_copy (GtkAction *action,
|
gnc_plugin_page_register2_cmd_copy (GtkAction *action,
|
||||||
GncPluginPageRegister2 *page) //this works
|
GncPluginPageRegister2 *page) //this works
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
|
||||||
GncTreeViewSplitReg *view;
|
|
||||||
GtkWidget *window, *widget;
|
GtkWidget *window, *widget;
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
||||||
|
|
||||||
ENTER("(action %p, page %p)", action, page);
|
ENTER("(action %p, page %p)", action, page);
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
|
||||||
view = gnc_ledger_display2_get_split_view_register (priv->ledger);
|
|
||||||
|
|
||||||
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
|
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
|
||||||
widget = gtk_window_get_focus (GTK_WINDOW (window));
|
widget = gtk_window_get_focus (GTK_WINDOW (window));
|
||||||
@ -2750,15 +2729,11 @@ static void
|
|||||||
gnc_plugin_page_register2_cmd_paste (GtkAction *action,
|
gnc_plugin_page_register2_cmd_paste (GtkAction *action,
|
||||||
GncPluginPageRegister2 *page) //this works
|
GncPluginPageRegister2 *page) //this works
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
|
||||||
GncTreeViewSplitReg *view;
|
|
||||||
GtkWidget *window, *widget;
|
GtkWidget *window, *widget;
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (page));
|
||||||
|
|
||||||
ENTER("(action %p, page %p)", action, page);
|
ENTER("(action %p, page %p)", action, page);
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
|
|
||||||
view = gnc_ledger_display2_get_split_view_register (priv->ledger);
|
|
||||||
|
|
||||||
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
|
window = gnc_plugin_page_get_window (GNC_PLUGIN_PAGE (page));
|
||||||
widget = gtk_window_get_focus (GTK_WINDOW (window));
|
widget = gtk_window_get_focus (GTK_WINDOW (window));
|
||||||
@ -3009,12 +2984,11 @@ gnc_plugin_page_register2_cmd_view_filter_by (GtkAction *action,
|
|||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
GncPluginPageRegister2Private *priv;
|
||||||
GNCLedgerDisplay2Type ledger_type;
|
GNCLedgerDisplay2Type ledger_type;
|
||||||
GtkWidget *dialog, *toggle, *button, *start_date, *end_date, *table, *hbox;
|
GtkWidget *dialog, *toggle, *button, *table, *hbox;
|
||||||
time64 start_time, end_time, time_val;
|
time64 start_time, end_time, time_val;
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
gboolean sensitive, value;
|
gboolean sensitive, value;
|
||||||
Query *query;
|
Query *query;
|
||||||
GList *split_list;
|
|
||||||
gchar *title;
|
gchar *title;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -3257,7 +3231,6 @@ gnc_plugin_page_register2_cmd_style_extra_dates (GtkToggleAction *action,
|
|||||||
GncPluginPageRegister2 *plugin_page) // this works
|
GncPluginPageRegister2 *plugin_page) // this works
|
||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
GncPluginPageRegister2Private *priv;
|
||||||
GncTreeModelSplitReg *model;
|
|
||||||
GncTreeViewSplitReg *view;
|
GncTreeViewSplitReg *view;
|
||||||
gboolean show_extra_dates;
|
gboolean show_extra_dates;
|
||||||
|
|
||||||
@ -3267,7 +3240,6 @@ gnc_plugin_page_register2_cmd_style_extra_dates (GtkToggleAction *action,
|
|||||||
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER2 (plugin_page));
|
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER2 (plugin_page));
|
||||||
|
|
||||||
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (plugin_page);
|
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (plugin_page);
|
||||||
model = gnc_ledger_display2_get_split_model_register (priv->ledger);
|
|
||||||
|
|
||||||
view = gnc_ledger_display2_get_split_view_register (priv->ledger);
|
view = gnc_ledger_display2_get_split_view_register (priv->ledger);
|
||||||
|
|
||||||
@ -3532,7 +3504,6 @@ gnc_plugin_page_register2_cmd_jump (GtkAction *action,
|
|||||||
{
|
{
|
||||||
GncPluginPageRegister2Private *priv;
|
GncPluginPageRegister2Private *priv;
|
||||||
GncPluginPage *new_page;
|
GncPluginPage *new_page;
|
||||||
GncPluginPageRegister2 *new_reg_page;
|
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GNCLedgerDisplay2 *ld;
|
GNCLedgerDisplay2 *ld;
|
||||||
GncTreeViewSplitReg *view, *new_view;
|
GncTreeViewSplitReg *view, *new_view;
|
||||||
|
@ -120,10 +120,12 @@ static void gppsl_row_activated_cb(GtkTreeView *tree_view, GtkTreePath *path, Gt
|
|||||||
|
|
||||||
static void gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page);
|
static void gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page);
|
||||||
static void gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page);
|
static void gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page);
|
||||||
|
#ifdef REGISTER2_ENABLED
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
static void gnc_plugin_page_sx_list_cmd_new2(GtkAction *action, GncPluginPageSxList *page);
|
static void gnc_plugin_page_sx_list_cmd_new2(GtkAction *action, GncPluginPageSxList *page);
|
||||||
static void gnc_plugin_page_sx_list_cmd_edit2(GtkAction *action, GncPluginPageSxList *page);
|
static void gnc_plugin_page_sx_list_cmd_edit2(GtkAction *action, GncPluginPageSxList *page);
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
|
#endif
|
||||||
static void gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page);
|
static void gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page);
|
||||||
|
|
||||||
/* Command callbacks */
|
/* Command callbacks */
|
||||||
@ -234,7 +236,6 @@ gnc_plugin_page_sx_list_init (GncPluginPageSxList *plugin_page)
|
|||||||
{
|
{
|
||||||
GtkActionGroup *action_group;
|
GtkActionGroup *action_group;
|
||||||
GncPluginPage *parent;
|
GncPluginPage *parent;
|
||||||
GncPluginPageSxListClass *klass = GNC_PLUGIN_PAGE_SX_LIST_GET_CLASS (plugin_page);
|
|
||||||
|
|
||||||
/* Init parent declared variables */
|
/* Init parent declared variables */
|
||||||
parent = GNC_PLUGIN_PAGE(plugin_page);
|
parent = GNC_PLUGIN_PAGE(plugin_page);
|
||||||
@ -608,6 +609,7 @@ gnc_plugin_page_sx_list_cmd_new(GtkAction *action, GncPluginPageSxList *page)
|
|||||||
gnc_ui_scheduled_xaction_editor_dialog_create(new_sx, new_sx_flag);
|
gnc_ui_scheduled_xaction_editor_dialog_create(new_sx, new_sx_flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef REGISTER2_ENABLED
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
static void
|
static void
|
||||||
gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
|
gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
|
||||||
@ -631,6 +633,7 @@ gnc_plugin_page_sx_list_cmd_new2 (GtkAction *action, GncPluginPageSxList *page)
|
|||||||
gnc_ui_scheduled_xaction_editor_dialog_create2 (new_sx, new_sx_flag);
|
gnc_ui_scheduled_xaction_editor_dialog_create2 (new_sx, new_sx_flag);
|
||||||
}
|
}
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_edit_sx(gpointer data, gpointer user_data)
|
_edit_sx(gpointer data, gpointer user_data)
|
||||||
@ -638,6 +641,7 @@ _edit_sx(gpointer data, gpointer user_data)
|
|||||||
gnc_ui_scheduled_xaction_editor_dialog_create((SchedXaction*)data, FALSE);
|
gnc_ui_scheduled_xaction_editor_dialog_create((SchedXaction*)data, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef REGISTER2_ENABLED
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
static void
|
static void
|
||||||
_edit_sx2 (gpointer data, gpointer user_data)
|
_edit_sx2 (gpointer data, gpointer user_data)
|
||||||
@ -645,6 +649,7 @@ _edit_sx2 (gpointer data, gpointer user_data)
|
|||||||
gnc_ui_scheduled_xaction_editor_dialog_create2 ((SchedXaction*)data, FALSE);
|
gnc_ui_scheduled_xaction_editor_dialog_create2 ((SchedXaction*)data, FALSE);
|
||||||
}
|
}
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
|
#endif
|
||||||
|
|
||||||
static SchedXaction*
|
static SchedXaction*
|
||||||
_argument_reorder_fn(GtkTreePath* list_path_data, GncTreeViewSxList* user_tree_view)
|
_argument_reorder_fn(GtkTreePath* list_path_data, GncTreeViewSxList* user_tree_view)
|
||||||
@ -678,6 +683,7 @@ gnc_plugin_page_sx_list_cmd_edit(GtkAction *action, GncPluginPageSxList *page)
|
|||||||
g_list_free(selected_paths);
|
g_list_free(selected_paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef REGISTER2_ENABLED
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
static void
|
static void
|
||||||
gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
|
gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
|
||||||
@ -704,7 +710,7 @@ gnc_plugin_page_sx_list_cmd_edit2 (GtkAction *action, GncPluginPageSxList *page)
|
|||||||
g_list_free (selected_paths);
|
g_list_free (selected_paths);
|
||||||
}
|
}
|
||||||
/*################## Added for Reg2 #################*/
|
/*################## Added for Reg2 #################*/
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gppsl_row_activated_cb(GtkTreeView *tree_view,
|
gppsl_row_activated_cb(GtkTreeView *tree_view,
|
||||||
|
@ -189,12 +189,9 @@ static void
|
|||||||
gnc_plugin_register2_finalize (GObject *object)
|
gnc_plugin_register2_finalize (GObject *object)
|
||||||
{
|
{
|
||||||
GncPluginRegister2 *plugin;
|
GncPluginRegister2 *plugin;
|
||||||
GncPluginRegister2Private *priv;
|
|
||||||
|
|
||||||
g_return_if_fail (GNC_IS_PLUGIN_REGISTER2 (object));
|
|
||||||
|
|
||||||
plugin = GNC_PLUGIN_REGISTER2 (object);
|
plugin = GNC_PLUGIN_REGISTER2 (object);
|
||||||
priv = GNC_PLUGIN_REGISTER2_GET_PRIVATE(plugin);
|
g_return_if_fail (GNC_IS_PLUGIN_REGISTER2 (plugin));
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
@ -563,9 +563,6 @@ gsr_redraw_all_cb (GnucashRegister *g_reg, gpointer data)
|
|||||||
QofBook *book = gnc_account_get_book (leader);
|
QofBook *book = gnc_account_get_book (leader);
|
||||||
GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
|
GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
|
||||||
gnc_commodity *currency = gnc_default_currency ();
|
gnc_commodity *currency = gnc_default_currency ();
|
||||||
gnc_numeric currency_value =
|
|
||||||
gnc_pricedb_convert_balance_latest_price(pricedb, amount,
|
|
||||||
commodity, currency);
|
|
||||||
print_info = gnc_commodity_print_info (currency, TRUE);
|
print_info = gnc_commodity_print_info (currency, TRUE);
|
||||||
xaccSPrintAmount (string, amount, print_info);
|
xaccSPrintAmount (string, amount, print_info);
|
||||||
gnc_set_label_color (gsr->value_label, amount);
|
gnc_set_label_color (gsr->value_label, amount);
|
||||||
@ -1090,7 +1087,6 @@ gsr_default_execassociated_handler (GNCSplitReg *gsr, gpointer data)
|
|||||||
SplitRegister *reg = gnc_ledger_display_get_split_register (gsr->ledger);
|
SplitRegister *reg = gnc_ledger_display_get_split_register (gsr->ledger);
|
||||||
Transaction *trans;
|
Transaction *trans;
|
||||||
Split *split = gnc_split_register_get_current_split (reg);
|
Split *split = gnc_split_register_get_current_split (reg);
|
||||||
GtkWidget *dialog;
|
|
||||||
const char *uri;
|
const char *uri;
|
||||||
const char *run_uri;
|
const char *run_uri;
|
||||||
gchar *uri_scheme;
|
gchar *uri_scheme;
|
||||||
|
@ -216,11 +216,12 @@ static
|
|||||||
void
|
void
|
||||||
gsr2_setup_table (GNCSplitReg2 *gsr)
|
gsr2_setup_table (GNCSplitReg2 *gsr)
|
||||||
{
|
{
|
||||||
GncTreeModelSplitReg *model;
|
// GncTreeModelSplitReg *model;
|
||||||
|
|
||||||
ENTER("gsr=%p", gsr);
|
ENTER("gsr=%p", gsr);
|
||||||
|
|
||||||
model = gnc_ledger_display2_get_split_model_register (gsr->ledger);
|
// This dose not do any thing
|
||||||
|
// model = gnc_ledger_display2_get_split_model_register (gsr->ledger);
|
||||||
|
|
||||||
LEAVE(" ");
|
LEAVE(" ");
|
||||||
}
|
}
|
||||||
@ -229,7 +230,6 @@ static
|
|||||||
void
|
void
|
||||||
gsr2_create_table (GNCSplitReg2 *gsr)
|
gsr2_create_table (GNCSplitReg2 *gsr)
|
||||||
{
|
{
|
||||||
GtkWidget *register_widget;
|
|
||||||
GncTreeViewSplitReg *view;
|
GncTreeViewSplitReg *view;
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
GtkTreeModel *s_model;
|
GtkTreeModel *s_model;
|
||||||
@ -243,7 +243,6 @@ gsr2_create_table (GNCSplitReg2 *gsr)
|
|||||||
GKeyFile *state_file = gnc_state_get_current();
|
GKeyFile *state_file = gnc_state_get_current();
|
||||||
const GncGUID * guid;
|
const GncGUID * guid;
|
||||||
Account * account;
|
Account * account;
|
||||||
const gchar *sort_string;
|
|
||||||
|
|
||||||
account = gnc_ledger_display2_leader (gsr->ledger);
|
account = gnc_ledger_display2_leader (gsr->ledger);
|
||||||
guid = xaccAccountGetGUID (account);
|
guid = xaccAccountGetGUID (account);
|
||||||
@ -565,9 +564,6 @@ gsr2_redraw_all_cb (GncTreeViewSplitReg *view, gpointer user_data)
|
|||||||
GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
|
GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
|
||||||
gnc_commodity *commodity = xaccAccountGetCommodity (leader);
|
gnc_commodity *commodity = xaccAccountGetCommodity (leader);
|
||||||
gnc_commodity *currency = gnc_default_currency ();
|
gnc_commodity *currency = gnc_default_currency ();
|
||||||
gnc_numeric currency_value =
|
|
||||||
gnc_pricedb_convert_balance_latest_price(pricedb, amount,
|
|
||||||
commodity, currency);
|
|
||||||
print_info = gnc_commodity_print_info (currency, TRUE);
|
print_info = gnc_commodity_print_info (currency, TRUE);
|
||||||
xaccSPrintAmount (string, amount, print_info);
|
xaccSPrintAmount (string, amount, print_info);
|
||||||
gnc_set_label_color (gsr->value_label, amount);
|
gnc_set_label_color (gsr->value_label, amount);
|
||||||
@ -663,7 +659,6 @@ gsr2_create_balancing_transaction (QofBook *book, Account *account,
|
|||||||
static void
|
static void
|
||||||
gnc_split_reg2_sort_changed_cb (GtkTreeSortable *sortable, gpointer user_data)
|
gnc_split_reg2_sort_changed_cb (GtkTreeSortable *sortable, gpointer user_data)
|
||||||
{
|
{
|
||||||
Query *query;
|
|
||||||
GNCSplitReg2 *gsr = user_data;
|
GNCSplitReg2 *gsr = user_data;
|
||||||
GncTreeViewSplitReg *view;
|
GncTreeViewSplitReg *view;
|
||||||
GncTreeModelSplitReg *model;
|
GncTreeModelSplitReg *model;
|
||||||
@ -679,8 +674,6 @@ gnc_split_reg2_sort_changed_cb (GtkTreeSortable *sortable, gpointer user_data)
|
|||||||
view = gnc_ledger_display2_get_split_view_register (gsr->ledger);
|
view = gnc_ledger_display2_get_split_view_register (gsr->ledger);
|
||||||
model = gnc_ledger_display2_get_split_model_register (gsr->ledger);
|
model = gnc_ledger_display2_get_split_model_register (gsr->ledger);
|
||||||
|
|
||||||
query = gnc_ledger_display2_get_query (gsr->ledger);
|
|
||||||
|
|
||||||
sort_depth = gnc_tree_view_reg_get_selected_row_depth (view);
|
sort_depth = gnc_tree_view_reg_get_selected_row_depth (view);
|
||||||
if (sort_depth != 0)
|
if (sort_depth != 0)
|
||||||
model->sort_depth = sort_depth;
|
model->sort_depth = sort_depth;
|
||||||
@ -966,7 +959,6 @@ void
|
|||||||
gnc_split_reg2_determine_read_only (GNCSplitReg2 *gsr) //this works
|
gnc_split_reg2_determine_read_only (GNCSplitReg2 *gsr) //this works
|
||||||
{
|
{
|
||||||
dialog_args *args = g_malloc (sizeof (dialog_args));
|
dialog_args *args = g_malloc (sizeof (dialog_args));
|
||||||
GncTreeViewSplitReg *view;
|
|
||||||
|
|
||||||
if (qof_book_is_readonly (gnc_get_current_book()))
|
if (qof_book_is_readonly (gnc_get_current_book()))
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.20.0 -->
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.16"/>
|
<requires lib="gtk+" version="3.10"/>
|
||||||
<object class="GtkAdjustment" id="DigitsToRound_Adj">
|
<object class="GtkAdjustment" id="DigitsToRound_Adj">
|
||||||
<property name="lower">1</property>
|
<property name="lower">1</property>
|
||||||
<property name="upper">12</property>
|
<property name="upper">12</property>
|
||||||
|
@ -643,7 +643,6 @@ gnc_reconcile_view_set_list ( GNCReconcileView *view, gboolean reconcile)
|
|||||||
GNCQueryView *qview = GNC_QUERY_VIEW(view);
|
GNCQueryView *qview = GNC_QUERY_VIEW(view);
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
|
||||||
gpointer entry;
|
gpointer entry;
|
||||||
gboolean toggled;
|
gboolean toggled;
|
||||||
GList *node;
|
GList *node;
|
||||||
@ -691,7 +690,6 @@ gnc_reconcile_view_set_toggle (GNCReconcileView *view)
|
|||||||
GNCQueryView *qview = GNC_QUERY_VIEW(view);
|
GNCQueryView *qview = GNC_QUERY_VIEW(view);
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
|
||||||
gboolean toggled;
|
gboolean toggled;
|
||||||
GList *node;
|
GList *node;
|
||||||
GList *list_of_rows;
|
GList *list_of_rows;
|
||||||
@ -732,11 +730,7 @@ gnc_reconcile_view_key_press_cb (GtkWidget *widget, GdkEventKey *event,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GNCReconcileView *view = GNC_RECONCILE_VIEW(user_data);
|
GNCReconcileView *view = GNC_RECONCILE_VIEW(user_data);
|
||||||
GNCQueryView *qview = GNC_QUERY_VIEW(widget);
|
gboolean toggle;
|
||||||
GtkTreeModel *model;
|
|
||||||
GtkTreeIter iter;
|
|
||||||
gpointer entry, pointer;
|
|
||||||
gboolean valid, toggle;
|
|
||||||
|
|
||||||
switch (event->keyval)
|
switch (event->keyval)
|
||||||
{
|
{
|
||||||
|
@ -311,7 +311,6 @@ gnc_save_all_state (gpointer session, gpointer unused)
|
|||||||
QofBook *book;
|
QofBook *book;
|
||||||
gchar guid_string[GUID_ENCODING_LENGTH+1];
|
gchar guid_string[GUID_ENCODING_LENGTH+1];
|
||||||
const GncGUID *guid;
|
const GncGUID *guid;
|
||||||
GError *error = NULL;
|
|
||||||
GKeyFile *keyfile = NULL;
|
GKeyFile *keyfile = NULL;
|
||||||
|
|
||||||
keyfile = gnc_state_get_current ();
|
keyfile = gnc_state_get_current ();
|
||||||
@ -322,7 +321,6 @@ gnc_save_all_state (gpointer session, gpointer unused)
|
|||||||
*/
|
*/
|
||||||
gsize num_groups, curr;
|
gsize num_groups, curr;
|
||||||
gchar **groups = g_key_file_get_groups (keyfile, &num_groups);
|
gchar **groups = g_key_file_get_groups (keyfile, &num_groups);
|
||||||
gchar *group = NULL;
|
|
||||||
for (curr=0; curr < num_groups; curr++)
|
for (curr=0; curr < num_groups; curr++)
|
||||||
{
|
{
|
||||||
if (g_str_has_prefix (groups[curr], "Window ") ||
|
if (g_str_has_prefix (groups[curr], "Window ") ||
|
||||||
|
@ -694,7 +694,6 @@ startRecnWindow(GtkWidget *parent, Account *account,
|
|||||||
gboolean auto_interest_xfer_option;
|
gboolean auto_interest_xfer_option;
|
||||||
GNCPrintAmountInfo print_info;
|
GNCPrintAmountInfo print_info;
|
||||||
gnc_numeric ending;
|
gnc_numeric ending;
|
||||||
gboolean has_uniform_currency;
|
|
||||||
char *title;
|
char *title;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
@ -985,12 +984,9 @@ gnc_reconcile_window_button_press_cb (GtkWidget *widget,
|
|||||||
RecnWindow *recnData)
|
RecnWindow *recnData)
|
||||||
{
|
{
|
||||||
GNCQueryView *qview = GNC_QUERY_VIEW(widget);
|
GNCQueryView *qview = GNC_QUERY_VIEW(widget);
|
||||||
GtkTreeModel *model;
|
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
|
|
||||||
model = gtk_tree_view_get_model(GTK_TREE_VIEW(qview));
|
|
||||||
|
|
||||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1445,7 +1441,6 @@ gnc_get_reconcile_info (Account *account,
|
|||||||
gboolean always_today;
|
gboolean always_today;
|
||||||
GDate date;
|
GDate date;
|
||||||
time64 today;
|
time64 today;
|
||||||
struct tm tm;
|
|
||||||
|
|
||||||
g_date_clear(&date, 1);
|
g_date_clear(&date, 1);
|
||||||
|
|
||||||
|
@ -948,12 +948,9 @@ gnc_reconcile_window_button_press_cb (GtkWidget *widget,
|
|||||||
RecnWindow2 *recnData)
|
RecnWindow2 *recnData)
|
||||||
{
|
{
|
||||||
GNCQueryView *qview = GNC_QUERY_VIEW (widget);
|
GNCQueryView *qview = GNC_QUERY_VIEW (widget);
|
||||||
GtkTreeModel *model;
|
|
||||||
GtkTreeSelection *selection;
|
GtkTreeSelection *selection;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
|
|
||||||
model = gtk_tree_view_get_model (GTK_TREE_VIEW (qview));
|
|
||||||
|
|
||||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1408,7 +1405,6 @@ gnc_get_reconcile_info (Account *account,
|
|||||||
gboolean always_today;
|
gboolean always_today;
|
||||||
GDate date;
|
GDate date;
|
||||||
time64 today;
|
time64 today;
|
||||||
struct tm tm;
|
|
||||||
|
|
||||||
g_date_clear(&date, 1);
|
g_date_clear(&date, 1);
|
||||||
|
|
||||||
|
@ -245,8 +245,15 @@ gnc_html_webkit_dispose( GObject* obj )
|
|||||||
|
|
||||||
if ( priv->web_view != NULL )
|
if ( priv->web_view != NULL )
|
||||||
{
|
{
|
||||||
|
// In Gtk Version 3.20 they relaxed the fact that the widget should be a
|
||||||
|
// direct child of the container otherwise it would be a critical error
|
||||||
|
#if GTK_CHECK_VERSION(3,20,0)
|
||||||
gtk_container_remove( GTK_CONTAINER(priv->base.container),
|
gtk_container_remove( GTK_CONTAINER(priv->base.container),
|
||||||
GTK_WIDGET(priv->web_view) );
|
GTK_WIDGET(priv->web_view) );
|
||||||
|
#else
|
||||||
|
GtkWidget *parent = gtk_widget_get_parent(GTK_WIDGET(priv->web_view));
|
||||||
|
gtk_container_remove( GTK_CONTAINER(priv->base.container), parent);
|
||||||
|
#endif
|
||||||
priv->web_view = NULL;
|
priv->web_view = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,6 @@ gnc_plugin_csv_export_register_cmd (GtkAction *action,
|
|||||||
GncMainWindowActionData *data)
|
GncMainWindowActionData *data)
|
||||||
{
|
{
|
||||||
Query *query;
|
Query *query;
|
||||||
GList *splits;
|
|
||||||
Account *acc;
|
Account *acc;
|
||||||
|
|
||||||
GncPluginPage *page = gnc_main_window_get_current_page (data->window);
|
GncPluginPage *page = gnc_main_window_get_current_page (data->window);
|
||||||
|
@ -39,8 +39,10 @@
|
|||||||
#define IMPORT_FULL_PATH "FullPath"
|
#define IMPORT_FULL_PATH "FullPath"
|
||||||
#define IMPORT_ACCOUNT "Account"
|
#define IMPORT_ACCOUNT "Account"
|
||||||
|
|
||||||
|
#define UNUSED_VAR __attribute__ ((unused))
|
||||||
|
|
||||||
/* This static indicates the debugging module that this .o belongs to. */
|
/* This static indicates the debugging module that this .o belongs to. */
|
||||||
static QofLogModule log_module = G_LOG_DOMAIN;
|
static QofLogModule UNUSED_VAR log_module = G_LOG_DOMAIN;
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
* account_imap_destroy
|
* account_imap_destroy
|
||||||
|
@ -93,7 +93,7 @@ gnumeric_create_popup_menu_list (GSList *elements,
|
|||||||
GdkEventButton *event)
|
GdkEventButton *event)
|
||||||
{
|
{
|
||||||
GtkWidget *menu = gtk_menu_new ();
|
GtkWidget *menu = gtk_menu_new ();
|
||||||
GtkWidget *item, *label;
|
GtkWidget *item;
|
||||||
|
|
||||||
for (; elements != NULL ; elements = elements->next)
|
for (; elements != NULL ; elements = elements->next)
|
||||||
{
|
{
|
||||||
|
@ -239,7 +239,7 @@ Account * gnc_import_select_account(GtkWidget *parent,
|
|||||||
Account * retval = NULL;
|
Account * retval = NULL;
|
||||||
const gchar *retval_name = NULL;
|
const gchar *retval_name = NULL;
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget * online_id_label, *button, *box, *pbox;
|
GtkWidget * online_id_label, *box, *pbox;
|
||||||
gchar account_description_text[ACCOUNT_DESCRIPTION_MAX_SIZE] = "";
|
gchar account_description_text[ACCOUNT_DESCRIPTION_MAX_SIZE] = "";
|
||||||
gboolean ok_pressed_retval = FALSE;
|
gboolean ok_pressed_retval = FALSE;
|
||||||
|
|
||||||
@ -312,7 +312,6 @@ Account * gnc_import_select_account(GtkWidget *parent,
|
|||||||
|
|
||||||
picker->account_tree_sw = GTK_WIDGET(gtk_builder_get_object (builder, "account_tree_sw"));
|
picker->account_tree_sw = GTK_WIDGET(gtk_builder_get_object (builder, "account_tree_sw"));
|
||||||
online_id_label = GTK_WIDGET(gtk_builder_get_object (builder, "online_id_label"));
|
online_id_label = GTK_WIDGET(gtk_builder_get_object (builder, "online_id_label"));
|
||||||
button = GTK_WIDGET(gtk_builder_get_object (builder, "newbutton"));
|
|
||||||
|
|
||||||
//printf("gnc_import_select_account(): Fin get widget\n");
|
//printf("gnc_import_select_account(): Fin get widget\n");
|
||||||
|
|
||||||
|
@ -59,9 +59,6 @@ struct _main_matcher_info
|
|||||||
GtkWidget *assistant;
|
GtkWidget *assistant;
|
||||||
GtkTreeView *view;
|
GtkTreeView *view;
|
||||||
GNCImportSettings *user_settings;
|
GNCImportSettings *user_settings;
|
||||||
GdkRGBA color_back_red;
|
|
||||||
GdkRGBA color_back_green;
|
|
||||||
GdkRGBA color_back_yellow;
|
|
||||||
int selected_row;
|
int selected_row;
|
||||||
GNCTransactionProcessedCB transaction_processed_cb;
|
GNCTransactionProcessedCB transaction_processed_cb;
|
||||||
gpointer user_data;
|
gpointer user_data;
|
||||||
@ -203,23 +200,6 @@ on_matcher_help_close_clicked (GtkButton *button, gpointer user_data)
|
|||||||
gtk_widget_destroy(help_dialog);
|
gtk_widget_destroy(help_dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gnc_override_background_color (GtkWidget *widget,
|
|
||||||
GdkRGBA *rgba)
|
|
||||||
{
|
|
||||||
GtkCssProvider *provider = gtk_css_provider_new();
|
|
||||||
GtkStyleContext *stylectxt = gtk_widget_get_style_context (widget);
|
|
||||||
gchar *col_str = gdk_rgba_to_string (rgba);
|
|
||||||
gchar *widget_css = g_strconcat ("*{\n background-color:", col_str, ";\n}\n", NULL);
|
|
||||||
|
|
||||||
gtk_css_provider_load_from_data (provider, widget_css, -1, NULL);
|
|
||||||
gtk_style_context_add_provider (stylectxt, GTK_STYLE_PROVIDER (provider),
|
|
||||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
|
||||||
g_object_unref (provider);
|
|
||||||
g_free (col_str);
|
|
||||||
g_free (widget_css);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
on_matcher_help_clicked (GtkButton *button, gpointer user_data)
|
on_matcher_help_clicked (GtkButton *button, gpointer user_data)
|
||||||
{
|
{
|
||||||
@ -235,13 +215,13 @@ on_matcher_help_clicked (GtkButton *button, gpointer user_data)
|
|||||||
gnc_builder_add_from_file (builder, "dialog-import.glade", "matcher_help_dialog");
|
gnc_builder_add_from_file (builder, "dialog-import.glade", "matcher_help_dialog");
|
||||||
|
|
||||||
box = GTK_WIDGET(gtk_builder_get_object (builder, "red"));
|
box = GTK_WIDGET(gtk_builder_get_object (builder, "red"));
|
||||||
gnc_override_background_color (box, &info->color_back_red);
|
gnc_widget_set_style_context (GTK_WIDGET(box), "color_back_red");
|
||||||
|
|
||||||
box = GTK_WIDGET(gtk_builder_get_object (builder, "yellow"));
|
box = GTK_WIDGET(gtk_builder_get_object (builder, "yellow"));
|
||||||
gnc_override_background_color (box, &info->color_back_yellow);
|
gnc_widget_set_style_context (GTK_WIDGET(box), "color_back_yellow");
|
||||||
|
|
||||||
box = GTK_WIDGET(gtk_builder_get_object (builder, "green"));
|
box = GTK_WIDGET(gtk_builder_get_object (builder, "green"));
|
||||||
gnc_override_background_color (box, &info->color_back_green);
|
gnc_widget_set_style_context (GTK_WIDGET(box), "color_back_green");
|
||||||
|
|
||||||
help_dialog = GTK_WIDGET(gtk_builder_get_object (builder, "matcher_help_dialog"));
|
help_dialog = GTK_WIDGET(gtk_builder_get_object (builder, "matcher_help_dialog"));
|
||||||
gtk_window_set_transient_for(GTK_WINDOW(help_dialog),
|
gtk_window_set_transient_for(GTK_WINDOW(help_dialog),
|
||||||
@ -568,11 +548,6 @@ GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
|
|||||||
gtk_window_set_transient_for (GTK_WINDOW (info->dialog),
|
gtk_window_set_transient_for (GTK_WINDOW (info->dialog),
|
||||||
GTK_WINDOW (parent));*/
|
GTK_WINDOW (parent));*/
|
||||||
|
|
||||||
/*Initialise the colors */
|
|
||||||
gdk_rgba_parse(&info->color_back_red, COLOR_RED);
|
|
||||||
gdk_rgba_parse(&info->color_back_yellow, COLOR_YELLOW);
|
|
||||||
gdk_rgba_parse(&info->color_back_green, COLOR_GREEN);
|
|
||||||
|
|
||||||
if (heading)
|
if (heading)
|
||||||
gtk_label_set_text (GTK_LABEL (heading_label), heading);
|
gtk_label_set_text (GTK_LABEL (heading_label), heading);
|
||||||
|
|
||||||
@ -631,11 +606,6 @@ GNCImportMainMatcher * gnc_gen_trans_assist_new (GtkWidget *parent,
|
|||||||
heading_label = GTK_WIDGET(gtk_builder_get_object (builder, "heading_label"));
|
heading_label = GTK_WIDGET(gtk_builder_get_object (builder, "heading_label"));
|
||||||
g_assert (heading_label != NULL);
|
g_assert (heading_label != NULL);
|
||||||
|
|
||||||
/*Initialise the colors */
|
|
||||||
gdk_rgba_parse(&info->color_back_red, COLOR_RED);
|
|
||||||
gdk_rgba_parse(&info->color_back_yellow, COLOR_YELLOW);
|
|
||||||
gdk_rgba_parse(&info->color_back_green, COLOR_GREEN);
|
|
||||||
|
|
||||||
if (heading)
|
if (heading)
|
||||||
gtk_label_set_text (GTK_LABEL (heading_label), heading);
|
gtk_label_set_text (GTK_LABEL (heading_label), heading);
|
||||||
|
|
||||||
@ -905,7 +875,6 @@ void gnc_gen_trans_list_add_trans_with_ref_id(GNCImportMainMatcher *gui, Transac
|
|||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GNCImportMatchInfo *selected_match;
|
GNCImportMatchInfo *selected_match;
|
||||||
GncGUID *pending_match_guid;
|
|
||||||
gboolean match_selected_manually;
|
gboolean match_selected_manually;
|
||||||
g_assert (gui);
|
g_assert (gui);
|
||||||
g_assert (trans);
|
g_assert (trans);
|
||||||
|
@ -452,7 +452,6 @@ static void
|
|||||||
init_match_picker_gui(GNCImportMatchPicker * matcher)
|
init_match_picker_gui(GNCImportMatchPicker * matcher)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
gboolean show_reconciled;
|
|
||||||
|
|
||||||
/* DEBUG("Begin..."); */
|
/* DEBUG("Begin..."); */
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ static const char *KEY_ASSOC_INCOME_ACCOUNT = "ofx/associated-income-account";
|
|||||||
|
|
||||||
Account *gnc_ofx_kvp_get_assoc_account(const Account* investment_account)
|
Account *gnc_ofx_kvp_get_assoc_account(const Account* investment_account)
|
||||||
{
|
{
|
||||||
Account *result = NULL;
|
|
||||||
GncGUID *income_guid= NULL;
|
GncGUID *income_guid= NULL;
|
||||||
g_assert(investment_account);
|
g_assert(investment_account);
|
||||||
qof_instance_get (QOF_INSTANCE (investment_account),
|
qof_instance_get (QOF_INSTANCE (investment_account),
|
||||||
|
@ -332,7 +332,6 @@ qif_account_picker_dialog(QIFImportWindow * qif_wind, SCM map_entry)
|
|||||||
SCM orig_acct = scm_call_1(gnc_name, map_entry);
|
SCM orig_acct = scm_call_1(gnc_name, map_entry);
|
||||||
int response;
|
int response;
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *button;
|
|
||||||
|
|
||||||
wind = g_new0(QIFAccountPickerDialog, 1);
|
wind = g_new0(QIFAccountPickerDialog, 1);
|
||||||
|
|
||||||
@ -395,8 +394,6 @@ qif_account_picker_dialog(QIFImportWindow * qif_wind, SCM map_entry)
|
|||||||
G_CALLBACK(gnc_ui_qif_account_picker_map_cb),
|
G_CALLBACK(gnc_ui_qif_account_picker_map_cb),
|
||||||
wind);
|
wind);
|
||||||
|
|
||||||
button = GTK_WIDGET(gtk_builder_get_object (builder, "newbutton"));
|
|
||||||
|
|
||||||
/* this is to get the checkmarks set up right.. it will get called
|
/* this is to get the checkmarks set up right.. it will get called
|
||||||
* again after the window is mapped. */
|
* again after the window is mapped. */
|
||||||
build_acct_tree(wind, wind->qif_wind);
|
build_acct_tree(wind, wind->qif_wind);
|
||||||
|
@ -75,7 +75,10 @@ void gnc_import_gui_type_cb (GtkWidget *widget, gpointer data);
|
|||||||
// utils
|
// utils
|
||||||
static gchar *gnc_input_dialog (GtkWidget *parent, const gchar *title, const gchar *msg, const gchar *default_input);
|
static gchar *gnc_input_dialog (GtkWidget *parent, const gchar *title, const gchar *msg, const gchar *default_input);
|
||||||
static void gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar *msg);
|
static void gnc_info2_dialog (GtkWidget *parent, const gchar *title, const gchar *msg);
|
||||||
static QofLogModule log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
|
|
||||||
|
#define UNUSED_VAR __attribute__ ((unused))
|
||||||
|
|
||||||
|
static QofLogModule UNUSED_VAR log_module = G_LOG_DOMAIN; //G_LOG_BUSINESS;
|
||||||
|
|
||||||
BillImportGui *
|
BillImportGui *
|
||||||
gnc_plugin_bi_import_showGUI(void)
|
gnc_plugin_bi_import_showGUI(void)
|
||||||
|
@ -528,7 +528,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
|
|||||||
gchar *new_id = NULL;
|
gchar *new_id = NULL;
|
||||||
gint64 denom = 0;
|
gint64 denom = 0;
|
||||||
gnc_commodity *currency;
|
gnc_commodity *currency;
|
||||||
Transaction * txn;
|
|
||||||
|
|
||||||
// these arguments are needed
|
// these arguments are needed
|
||||||
g_return_if_fail (store && book);
|
g_return_if_fail (store && book);
|
||||||
|
@ -519,6 +519,8 @@ gnc_ledger_display2_parent (void *user_data)
|
|||||||
return gnc_ledger_display2_get_parent( ld );
|
return gnc_ledger_display2_get_parent( ld );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef skip
|
||||||
|
//FIXME Not used ?
|
||||||
static void
|
static void
|
||||||
gnc_ledger_display2_set_watches (GNCLedgerDisplay2 *ld, GList *splits)
|
gnc_ledger_display2_set_watches (GNCLedgerDisplay2 *ld, GList *splits)
|
||||||
{
|
{
|
||||||
@ -541,6 +543,7 @@ gnc_ledger_display2_set_watches (GNCLedgerDisplay2 *ld, GList *splits)
|
|||||||
QOF_EVENT_MODIFY);
|
QOF_EVENT_MODIFY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
refresh_handler (GHashTable *changes, gpointer user_data)
|
refresh_handler (GHashTable *changes, gpointer user_data)
|
||||||
@ -702,7 +705,7 @@ gnc_ledger_display2_internal (Account *lead_account, Query *q,
|
|||||||
GNCLedgerDisplay2 *ld;
|
GNCLedgerDisplay2 *ld;
|
||||||
gint limit;
|
gint limit;
|
||||||
const char *klass;
|
const char *klass;
|
||||||
GList *splits;
|
// GList *splits;
|
||||||
gboolean display_subaccounts = FALSE;
|
gboolean display_subaccounts = FALSE;
|
||||||
gboolean is_gl = FALSE;
|
gboolean is_gl = FALSE;
|
||||||
|
|
||||||
|
@ -148,7 +148,6 @@ gnc_split_register_save_tnum_cell (BasicCell * cell,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
SRSaveData *sd = save_data;
|
SRSaveData *sd = save_data;
|
||||||
SplitRegister *reg = user_data;
|
|
||||||
const char *value;
|
const char *value;
|
||||||
|
|
||||||
g_return_if_fail (gnc_basic_cell_has_name (cell, TNUM_CELL));
|
g_return_if_fail (gnc_basic_cell_has_name (cell, TNUM_CELL));
|
||||||
@ -727,11 +726,6 @@ gnc_template_register_save_debcred_cell (BasicCell * cell,
|
|||||||
{
|
{
|
||||||
SRSaveData *sd = save_data;
|
SRSaveData *sd = save_data;
|
||||||
SplitRegister *reg = user_data;
|
SplitRegister *reg = user_data;
|
||||||
const char *formula;
|
|
||||||
char *error_loc;
|
|
||||||
gnc_numeric amount;
|
|
||||||
gboolean parse_result;
|
|
||||||
GHashTable *parser_vars = g_hash_table_new(g_str_hash, g_str_equal);
|
|
||||||
|
|
||||||
g_return_if_fail (gnc_basic_cell_has_name (cell, FDEBT_CELL) ||
|
g_return_if_fail (gnc_basic_cell_has_name (cell, FDEBT_CELL) ||
|
||||||
gnc_basic_cell_has_name (cell, FCRED_CELL));
|
gnc_basic_cell_has_name (cell, FCRED_CELL));
|
||||||
|
@ -603,7 +603,6 @@ gnc_split_register_get_fg_color_internal (VirtualLocation virt_loc,
|
|||||||
const guint32 red_color = color_table[COLOR_NEGATIVE];
|
const guint32 red_color = color_table[COLOR_NEGATIVE];
|
||||||
guint32 fg_color;
|
guint32 fg_color;
|
||||||
const char * cell_name;
|
const char * cell_name;
|
||||||
gboolean is_current;
|
|
||||||
gnc_numeric value;
|
gnc_numeric value;
|
||||||
Split *split;
|
Split *split;
|
||||||
|
|
||||||
@ -801,6 +800,8 @@ gnc_split_register_get_associate_entry (VirtualLocation virt_loc,
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// this code is not used yet
|
||||||
static char
|
static char
|
||||||
gnc_split_register_get_associate_value (SplitRegister *reg,
|
gnc_split_register_get_associate_value (SplitRegister *reg,
|
||||||
VirtualLocation virt_loc)
|
VirtualLocation virt_loc)
|
||||||
@ -813,6 +814,7 @@ gnc_split_register_get_associate_value (SplitRegister *reg,
|
|||||||
|
|
||||||
return gnc_recn_cell_get_flag (cell);
|
return gnc_recn_cell_get_flag (cell);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
gnc_split_register_get_type_entry (VirtualLocation virt_loc,
|
gnc_split_register_get_type_entry (VirtualLocation virt_loc,
|
||||||
|
@ -407,7 +407,6 @@ static void
|
|||||||
gnucash_register_configure (GnucashSheet *sheet, gchar * state_section)
|
gnucash_register_configure (GnucashSheet *sheet, gchar * state_section)
|
||||||
{
|
{
|
||||||
GNCHeaderWidths widths;
|
GNCHeaderWidths widths;
|
||||||
GnucashRegister *greg;
|
|
||||||
Table *table;
|
Table *table;
|
||||||
GList *node;
|
GList *node;
|
||||||
gchar *key;
|
gchar *key;
|
||||||
@ -557,11 +556,11 @@ GtkWidget *
|
|||||||
gnucash_register_new (Table *table, gchar *state_section)
|
gnucash_register_new (Table *table, gchar *state_section)
|
||||||
{
|
{
|
||||||
GnucashRegister *reg;
|
GnucashRegister *reg;
|
||||||
GtkWidget *header;
|
// GtkWidget *header;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *sheet;
|
// GtkWidget *sheet;
|
||||||
GtkWidget *scrollbar;
|
// GtkWidget *scrollbar;
|
||||||
GtkWidget *box;
|
// GtkWidget *box;
|
||||||
|
|
||||||
widget = gnucash_register_create_widget(table);
|
widget = gnucash_register_create_widget(table);
|
||||||
reg = GNUCASH_REGISTER(widget);
|
reg = GNUCASH_REGISTER(widget);
|
||||||
|
@ -403,7 +403,7 @@ gnucash_sheet_compute_visible_range (GnucashSheet *sheet)
|
|||||||
gint height;
|
gint height;
|
||||||
gint cy;
|
gint cy;
|
||||||
gint top_block;
|
gint top_block;
|
||||||
gint old_visible_blocks, old_visible_rows;
|
// gint old_visible_blocks, old_visible_rows;
|
||||||
|
|
||||||
g_return_if_fail (sheet != NULL);
|
g_return_if_fail (sheet != NULL);
|
||||||
g_return_if_fail (GNUCASH_IS_SHEET (sheet));
|
g_return_if_fail (GNUCASH_IS_SHEET (sheet));
|
||||||
@ -416,8 +416,8 @@ gnucash_sheet_compute_visible_range (GnucashSheet *sheet)
|
|||||||
|
|
||||||
top_block = gnucash_sheet_y_pixel_to_block (sheet, cy);
|
top_block = gnucash_sheet_y_pixel_to_block (sheet, cy);
|
||||||
|
|
||||||
old_visible_blocks = sheet->num_visible_blocks;
|
// old_visible_blocks = sheet->num_visible_blocks;
|
||||||
old_visible_rows = sheet->num_visible_phys_rows;
|
// old_visible_rows = sheet->num_visible_phys_rows;
|
||||||
sheet->num_visible_blocks = 0;
|
sheet->num_visible_blocks = 0;
|
||||||
sheet->num_visible_phys_rows = 0;
|
sheet->num_visible_phys_rows = 0;
|
||||||
|
|
||||||
@ -1054,10 +1054,11 @@ gnucash_sheet_draw_cb (GtkWidget *widget, cairo_t *cr, G_GNUC_UNUSED gpointer da
|
|||||||
GnucashSheet *sheet = GNUCASH_SHEET (widget);
|
GnucashSheet *sheet = GNUCASH_SHEET (widget);
|
||||||
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
GtkStyleContext *context = gtk_widget_get_style_context (widget);
|
||||||
GtkAllocation alloc;
|
GtkAllocation alloc;
|
||||||
gboolean result;
|
gboolean result; //FIXME
|
||||||
|
|
||||||
gtk_widget_get_allocation(widget, &alloc);
|
gtk_widget_get_allocation(widget, &alloc);
|
||||||
gtk_render_background (context, cr, alloc.x, alloc.y, alloc.width, alloc.height);
|
gtk_render_background (context, cr, alloc.x, alloc.y, alloc.width, alloc.height);
|
||||||
|
//FIXME what should be done with result being TRUE or FALSE
|
||||||
result = gnucash_sheet_draw_internal (sheet, cr, &alloc);
|
result = gnucash_sheet_draw_internal (sheet, cr, &alloc);
|
||||||
gnucash_sheet_draw_cursor (sheet->cursor, cr);
|
gnucash_sheet_draw_cursor (sheet->cursor, cr);
|
||||||
|
|
||||||
@ -1309,7 +1310,7 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
|
|||||||
{
|
{
|
||||||
GnucashSheet *sheet;
|
GnucashSheet *sheet;
|
||||||
VirtualCell *vcell;
|
VirtualCell *vcell;
|
||||||
gboolean changed_cells;
|
gboolean changed_cells; //FIXME
|
||||||
|
|
||||||
VirtualLocation cur_virt_loc;
|
VirtualLocation cur_virt_loc;
|
||||||
VirtualLocation new_virt_loc;
|
VirtualLocation new_virt_loc;
|
||||||
@ -1399,7 +1400,7 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
|
|||||||
|
|
||||||
if (abort_move)
|
if (abort_move)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
//FIXME does something need to be done if changed_cells is true or false ?
|
||||||
changed_cells = gnucash_sheet_cursor_move (sheet, new_virt_loc);
|
changed_cells = gnucash_sheet_cursor_move (sheet, new_virt_loc);
|
||||||
|
|
||||||
if (button_1)
|
if (button_1)
|
||||||
@ -1434,10 +1435,8 @@ gnucash_sheet_clipboard_event (GnucashSheet *sheet, GdkEventKey *event)
|
|||||||
{
|
{
|
||||||
GncItemEdit *item_edit;
|
GncItemEdit *item_edit;
|
||||||
gboolean handled = FALSE;
|
gboolean handled = FALSE;
|
||||||
guint32 time;
|
|
||||||
|
|
||||||
item_edit = GNC_ITEM_EDIT(sheet->item_editor);
|
item_edit = GNC_ITEM_EDIT(sheet->item_editor);
|
||||||
time = event->time;
|
|
||||||
|
|
||||||
switch (event->keyval)
|
switch (event->keyval)
|
||||||
{
|
{
|
||||||
@ -1488,7 +1487,7 @@ gnucash_sheet_direct_event(GnucashSheet *sheet, GdkEvent *event)
|
|||||||
GtkEditable *editable;
|
GtkEditable *editable;
|
||||||
Table *table = sheet->table;
|
Table *table = sheet->table;
|
||||||
VirtualLocation virt_loc;
|
VirtualLocation virt_loc;
|
||||||
gboolean changed;
|
// gboolean changed;
|
||||||
gboolean result;
|
gboolean result;
|
||||||
|
|
||||||
char *new_text = NULL;
|
char *new_text = NULL;
|
||||||
@ -1519,7 +1518,7 @@ gnucash_sheet_direct_event(GnucashSheet *sheet, GdkEvent *event)
|
|||||||
&new_start, &new_end,
|
&new_start, &new_end,
|
||||||
event);
|
event);
|
||||||
|
|
||||||
changed = FALSE;
|
// changed = FALSE;
|
||||||
|
|
||||||
if (new_text != NULL)
|
if (new_text != NULL)
|
||||||
{
|
{
|
||||||
@ -1535,19 +1534,19 @@ gnucash_sheet_direct_event(GnucashSheet *sheet, GdkEvent *event)
|
|||||||
g_signal_handler_unblock (G_OBJECT (sheet->entry),
|
g_signal_handler_unblock (G_OBJECT (sheet->entry),
|
||||||
sheet->insert_signal);
|
sheet->insert_signal);
|
||||||
|
|
||||||
changed = TRUE;
|
// changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (new_position != cursor_position)
|
if (new_position != cursor_position)
|
||||||
{
|
{
|
||||||
gtk_editable_set_position (editable, new_position);
|
gtk_editable_set_position (editable, new_position);
|
||||||
changed = TRUE;
|
// changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((new_start != start_sel) || (new_end != end_sel))
|
if ((new_start != start_sel) || (new_end != end_sel))
|
||||||
{
|
{
|
||||||
gtk_editable_select_region(editable, new_start, new_end);
|
gtk_editable_select_region(editable, new_start, new_end);
|
||||||
changed = TRUE;
|
// changed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -2147,14 +2146,14 @@ void
|
|||||||
gnucash_sheet_set_scroll_region (GnucashSheet *sheet)
|
gnucash_sheet_set_scroll_region (GnucashSheet *sheet)
|
||||||
{
|
{
|
||||||
guint new_h, new_w;
|
guint new_h, new_w;
|
||||||
GtkWidget *widget;
|
// GtkWidget *widget;
|
||||||
GtkAllocation alloc;
|
GtkAllocation alloc;
|
||||||
guint old_h, old_w;
|
guint old_h, old_w;
|
||||||
|
|
||||||
if (!sheet)
|
if (!sheet)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
widget = GTK_WIDGET(sheet);
|
// widget = GTK_WIDGET(sheet);
|
||||||
|
|
||||||
if (!sheet->header_item || !GNC_HEADER(sheet->header_item)->style)
|
if (!sheet->header_item || !GNC_HEADER(sheet->header_item)->style)
|
||||||
return;
|
return;
|
||||||
|
@ -59,8 +59,10 @@
|
|||||||
|
|
||||||
/** Static Globals *****************************************************/
|
/** Static Globals *****************************************************/
|
||||||
|
|
||||||
|
#define UNUSED_VAR __attribute__ ((unused))
|
||||||
|
|
||||||
/* This static indicates the debugging module that this .o belongs to. */
|
/* This static indicates the debugging module that this .o belongs to. */
|
||||||
static QofLogModule log_module = GNC_MOD_REGISTER;
|
static QofLogModule UNUSED_VAR log_module = GNC_MOD_REGISTER;
|
||||||
|
|
||||||
|
|
||||||
/** Implementation *****************************************************/
|
/** Implementation *****************************************************/
|
||||||
|
@ -198,8 +198,6 @@ set_reports_view_and_model(CustomReportDialog *crd)
|
|||||||
{
|
{
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeViewColumn * col;
|
|
||||||
gint colnum;
|
|
||||||
|
|
||||||
crd->namerenderer = gtk_cell_renderer_text_new();
|
crd->namerenderer = gtk_cell_renderer_text_new();
|
||||||
g_signal_connect (G_OBJECT (crd->namerenderer), "edited",
|
g_signal_connect (G_OBJECT (crd->namerenderer), "edited",
|
||||||
@ -227,7 +225,7 @@ set_reports_view_and_model(CustomReportDialog *crd)
|
|||||||
|
|
||||||
renderer = gtk_cell_renderer_pixbuf_new();
|
renderer = gtk_cell_renderer_pixbuf_new();
|
||||||
g_object_set (G_OBJECT (renderer), "icon-name", "edit-delete", NULL);
|
g_object_set (G_OBJECT (renderer), "icon-name", "edit-delete", NULL);
|
||||||
colnum = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (crd->reportview), -1,
|
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (crd->reportview), -1,
|
||||||
"D", renderer,
|
"D", renderer,
|
||||||
NULL);
|
NULL);
|
||||||
crd->delcol = gtk_tree_view_get_column (GTK_TREE_VIEW (crd->reportview), VIEW_COL_DELETE);
|
crd->delcol = gtk_tree_view_get_column (GTK_TREE_VIEW (crd->reportview), VIEW_COL_DELETE);
|
||||||
|
@ -658,7 +658,6 @@ gnc_plugin_page_report_option_change_cb(gpointer data)
|
|||||||
SCM dirty_report = scm_c_eval_string("gnc:report-set-dirty?!");
|
SCM dirty_report = scm_c_eval_string("gnc:report-set-dirty?!");
|
||||||
const gchar *old_name;
|
const gchar *old_name;
|
||||||
gchar *new_name;
|
gchar *new_name;
|
||||||
gchar *new_name_escaped;
|
|
||||||
|
|
||||||
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REPORT(data));
|
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REPORT(data));
|
||||||
report = GNC_PLUGIN_PAGE_REPORT(data);
|
report = GNC_PLUGIN_PAGE_REPORT(data);
|
||||||
@ -1592,6 +1591,7 @@ gnc_plugin_page_report_save_cb( GtkAction *action, GncPluginPageReport *report )
|
|||||||
*/
|
*/
|
||||||
save_func = scm_c_eval_string("gnc:report-to-template-update");
|
save_func = scm_c_eval_string("gnc:report-to-template-update");
|
||||||
rpt_id = scm_call_1(save_func, priv->cur_report);
|
rpt_id = scm_call_1(save_func, priv->cur_report);
|
||||||
|
(void)rpt_id;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1659,12 +1659,6 @@ gnc_plugin_page_report_export_cb( GtkAction *action, GncPluginPageReport *report
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
error_handler(const char *str)
|
|
||||||
{
|
|
||||||
PWARN("Report Error: %s", str);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gnc_plugin_page_report_options_cb( GtkAction *action, GncPluginPageReport *report )
|
gnc_plugin_page_report_options_cb( GtkAction *action, GncPluginPageReport *report )
|
||||||
{
|
{
|
||||||
|
@ -153,7 +153,6 @@ error_handler(const char *str)
|
|||||||
gboolean
|
gboolean
|
||||||
gnc_run_report (gint report_id, char ** data)
|
gnc_run_report (gint report_id, char ** data)
|
||||||
{
|
{
|
||||||
gchar *free_data;
|
|
||||||
SCM scm_text;
|
SCM scm_text;
|
||||||
gchar *str;
|
gchar *str;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user