Merge Bob Fewell's 'gtk3-update3' branch.

This commit is contained in:
John Ralls 2017-07-23 16:04:19 -07:00
commit b60057dbeb
93 changed files with 213 additions and 518 deletions

View File

@ -154,7 +154,6 @@ gfec_eval_string(const char *str, gfec_error_handler error_handler)
SCM
gfec_eval_file(const char *file, gfec_error_handler error_handler)
{
char *err_msg = NULL;
gchar *contents = NULL;
GError *save_error = NULL;
SCM result;

View File

@ -60,11 +60,9 @@ static time64 gnc_accounting_period_end_time64 (GncAccountingPeriod which,
static time64
lookup_start_date_option(GDate *fy_end)
{
gchar *choice;
time64 time;
int which;
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);
else

View File

@ -620,7 +620,6 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
xmlChar *newURL;
gchar *tmpdir = g_build_filename (g_get_home_dir (), ".gnc-migration-tmp", NULL);
int i;
const char *lastsegment = URL;
const char *iter = URL;
@ -700,7 +699,7 @@ void gnc_gsettings_migrate_from_gconf (void)
gchar *pkgdatadir, *stylesheet, *input, *output, *command;
gchar *gconf_root, *gconf_apps, *gconf_gnucash;
gchar *base_dir, *iter;
SCM migr_script, result;
SCM migr_script;
xsltStylesheetPtr stylesheetptr = NULL;
xmlDocPtr inputxml, transformedxml;
FILE *outfile;

View File

@ -70,7 +70,7 @@ static void
gnc_state_set_base (const QofSession *session)
{
gchar *basename, *original = NULL, *filename, *file_guid;
gchar *sf_extension = NULL, *newstyle_filename = NULL;
gchar *sf_extension = NULL;
const gchar *uri;
gchar guid_string[GUID_ENCODING_LENGTH+1];
QofBook *book;
@ -200,10 +200,6 @@ gnc_state_set_base (const QofSession *session)
GKeyFile *gnc_state_load (const QofSession *session)
{
GKeyFile *keyfile = NULL;
GError *error = NULL;
/* Drop possible previous state_file first */
if (state_file)
{
@ -221,7 +217,6 @@ GKeyFile *gnc_state_load (const QofSession *session)
TRUE, TRUE, NULL);
return gnc_state_get_current ();
}
void gnc_state_save (const QofSession *session)

View File

@ -1584,7 +1584,6 @@ xaccSPrintAmount (char * bufp, gnc_numeric val, GNCPrintAmountInfo info)
char sign_posn;
gboolean print_sign = TRUE;
gboolean is_shares = FALSE;
gboolean print_absolute = FALSE;
if (!bufp)

View File

@ -57,9 +57,10 @@
#include "guile-util.h"
#include "guile-mappings.h"
/* This static indicates the debugging module this .o belongs to. */
static QofLogModule log_module = GNC_MOD_GUILE;
#define UNUSED_VAR __attribute__ ((unused))
/* This static indicates the debugging module this .o belongs to. */
static QofLogModule UNUSED_VAR log_module = GNC_MOD_GUILE;
struct _setters
{

View File

@ -1726,7 +1726,6 @@ gnc_commit_option(GNCOption *option)
char *section, *name;
const gchar *message;
const gchar *format = _("There is a problem with option %s:%s.\n%s");
char * str;
/* Second element is error message */
oops = SCM_CADR(result);
@ -2619,8 +2618,6 @@ gnc_option_db_set_string_option(GNCOptionDB *odb,
char *
gnc_option_date_option_get_subtype(GNCOption *option)
{
SCM value;
initialize_getters();
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 *
gnc_date_option_value_get_type (SCM option_value)
{
SCM value;
initialize_getters();
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 *
gnc_plot_size_option_value_get_type (SCM option_value)
{
SCM value;
initialize_getters();
return gnc_scm_call_1_symbol_to_string (getters.plot_size_option_value_type, option_value);

View File

@ -613,7 +613,6 @@ inner_main (void *closure, int argc, char **argv)
{
SCM main_mod;
char* fn;
GError *error = NULL;
scm_c_eval_string("(debug-set! stack 200000)");

View File

@ -126,7 +126,9 @@ struct _invoice_select_window
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
* 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;
gnc_commodity *account_currency = (gnc_commodity*)key;
gnc_numeric *amount = (gnc_numeric*)value;
Timespec pricedate;
XferDialog *xfer;
gnc_numeric exch_rate;
@ -2246,7 +2247,6 @@ gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
{
GncInvoice *invoice;
GtkBuilder *builder;
GtkWidget *id_label;
GtkWidget *dialog, *hbox;
GncEntryLedger *entry_ledger = NULL;
GncOwnerType owner_type;
@ -2595,7 +2595,6 @@ gnc_invoice_window_new_invoice (InvoiceDialogType dialog_type, QofBook *bookp,
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"));
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;
gint len;
Timespec ts;
QofQueryCompare comparetype;
static GList *param_list = NULL;
static GNCDisplayViewButton vendorbuttons[] =
{

View File

@ -192,10 +192,8 @@ static gboolean
gnc_payment_window_check_payment (PaymentWindow *pw)
{
const char *conflict_msg = NULL;
Account *post, *acc;
gnc_numeric amount_deb, amount_cred;
gboolean enable_xfer_acct = TRUE;
GtkTreeSelection *selection;
if (!pw)
return FALSE;

View File

@ -923,7 +923,6 @@ gnc_entry_ledger_get_color_internal (VirtualLocation virt_loc,
const guint32 *color_table,
gboolean foreground)
{
const char *cursor_name;
VirtualCell *vcell;
gboolean is_current;
guint32 colorbase = 0; /* By default return background colors */

View File

@ -269,7 +269,6 @@ gnc_path_find_localized_html_file (const gchar *file_name)
gchar *loc_file_name = NULL;
gchar *full_path = NULL;
const gchar * const *lang;
int i;
if (!file_name || *file_name == '\0')
return NULL;

View File

@ -305,7 +305,6 @@ gnc_account_get_property (GObject *object,
Account *account;
AccountPrivate *priv;
const gchar *key;
GValue *temp;
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;
current_token = current_token->next)
{
GValue value = G_VALUE_INIT;
/* 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, which doesn't work in the kvp loopkup later. So we

View File

@ -683,7 +683,6 @@ gnc_transaction_balance_trading (Transaction *trans, Account *root)
gnc_commodity *commodity;
gnc_numeric old_amount, new_amount;
gnc_numeric old_value, new_value, val_imbalance;
Account *account = NULL;
const gnc_commodity *txn_curr = xaccTransGetCurrency (trans);
commodity = gnc_monetary_commodity (*imbal_mon);
@ -697,8 +696,6 @@ gnc_transaction_balance_trading (Transaction *trans, Account *root)
return;
}
account = xaccSplitGetAccount(balance_split);
if (! gnc_commodity_equal (txn_curr, 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_numeric old_value, new_value;
Split *balance_split;
Account *account = NULL;
commodity = xaccAccountGetCommodity(xaccSplitGetAccount(split));
if (!commodity)
@ -772,8 +768,6 @@ gnc_transaction_balance_trading_more_splits (Transaction *trans, Account *root)
LEAVE("");
return;
}
account = xaccSplitGetAccount(balance_split);
xaccTransBeginEdit (trans);
old_value = xaccSplitGetValue (balance_split);
@ -1339,7 +1333,6 @@ void
xaccAccountScrubKvp (Account *account)
{
GValue v = G_VALUE_INIT;
const gchar *str;
gchar *str2;
if (!account) return;

View File

@ -51,7 +51,6 @@ static void
gncScrubInvoiceState (GNCLot *lot)
{
SplitList *ls_iter = NULL;
Transaction *txn = NULL; // ll_txn = "Lot Link Transaction"
GncInvoice *invoice = NULL;
GncInvoice *lot_invoice = gncInvoiceGetInvoiceFromLot (lot);

View File

@ -1568,9 +1568,6 @@ xaccSplitOrderDateOnly (const Split *sa, const Split *sb)
static gboolean
get_corr_account_split(const Split *sa, const Split **retval)
{
const Split *current_split;
*retval = NULL;
g_return_val_if_fail(sa, FALSE);

View File

@ -314,7 +314,6 @@ gnc_transaction_get_property(GObject* object,
{
Transaction* tx;
gchar *key;
GValue *temp;
g_return_if_fail(GNC_IS_TRANSACTION(object));
@ -2676,7 +2675,7 @@ xaccTransGetVoidTime(const Transaction *tr)
{
GValue v = G_VALUE_INIT;
const char *s = NULL;
Timespec void_time = {0, 0}, *ts;
Timespec void_time = {0, 0};
g_return_val_if_fail(tr, void_time);
qof_instance_get_kvp (QOF_INSTANCE (tr), void_time_str, &v);

View File

@ -658,7 +658,6 @@ gnc_query_scm2path (SCM path_scm)
while (!scm_is_null (path_scm))
{
SCM key_scm = SCM_CAR (path_scm);
char *str;
char *key;
if (!scm_is_string (key_scm))

View File

@ -1080,7 +1080,6 @@ gnc_commodity_get_fraction(const gnc_commodity * cm)
static gboolean
gnc_commodity_get_auto_quote_control_flag(const gnc_commodity *cm)
{
const char *str;
GValue v = G_VALUE_INIT;
if (!cm) return FALSE;
@ -1144,7 +1143,6 @@ gnc_commodity_get_quote_tz(const gnc_commodity *cm)
const char*
gnc_commodity_get_user_symbol(const gnc_commodity *cm)
{
const char *str;
GValue v = G_VALUE_INIT;
if (!cm) return NULL;
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*
gnc_commodity_get_default_symbol(const gnc_commodity *cm)
{
const char *str;
if (!cm) return NULL;
return GET_PRIVATE(cm)->default_symbol;
}

View File

@ -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 */
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;
LotPrivate* priv;
gchar *key;
GValue *temp;
g_return_if_fail(GNC_IS_LOT(object));

View File

@ -1539,7 +1539,6 @@ gnc_pricedb_lookup_latest(GNCPriceDB *db,
{
GList *price_list;
GNCPrice *result;
GHashTable *currency_hash;
if (!db || !commodity || !currency) return NULL;
ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
@ -1556,20 +1555,6 @@ gnc_pricedb_lookup_latest(GNCPriceDB *db,
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
{
GList **list;
@ -2029,7 +2014,6 @@ gnc_pricedb_lookup_at_time(GNCPriceDB *db,
{
GList *price_list;
GList *item = NULL;
GHashTable *currency_hash;
if (!db || !c || !currency) return NULL;
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 *result = NULL;
GList *item = NULL;
GHashTable *currency_hash;
if (!db || !c || !currency) return NULL;
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 *result = NULL;*/
GList *item = NULL;
GHashTable *currency_hash;
Timespec price_time;
if (!db || !c || !currency) return NULL;

View File

@ -147,8 +147,6 @@ gnc_search_callback_button_execute (GNCSearchCallbackButton *cb,
{
GNCQueryView *qview = GNC_QUERY_VIEW(sw->result_view);
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
// Sanity check
g_assert(qview);
@ -188,7 +186,6 @@ gnc_search_dialog_result_clicked (GtkButton *button, GNCSearchWindow *sw)
static void
gnc_search_dialog_select_buttons_enable (GNCSearchWindow *sw, gint selected)
{
gint i;
gboolean enable, read_only;
GList *blist;

View File

@ -667,20 +667,10 @@ verify_children_compatible (AccountWindow *aw)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
gnc_label_set_alignment (label, 0.0, 0.0);
{
GtkCssProvider *provider = gtk_css_provider_new();
const gchar *label_css = {
"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);
}
/* make label large */
gnc_widget_set_style_context (GTK_WIDGET(label), "primary_label_size");
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
/* secondary label */

View File

@ -121,7 +121,6 @@ gnc_dup_trans_dialog_create (GtkWidget * parent, DupTransDialog *dt_dialog,
{
GtkWidget *date_edit;
GtkWidget *hbox;
GtkWidget *label;
date_edit = gnc_date_edit_new (date, FALSE, FALSE);
gnc_date_activates_default(GNC_DATE_EDIT(date_edit), TRUE);

View File

@ -2093,7 +2093,6 @@ component_close_handler (gpointer data)
static void
refresh_handler (GHashTable *changes, gpointer user_data)
{
GNCOptionWin *retval = user_data;
gnc_commodity *commodity = NULL;
GtkTreeIter iter;
@ -2887,15 +2886,15 @@ static void
gnc_plot_size_option_set_select_method(GNCOption *option, gboolean set_buttons)
{
GList* widget_list;
GtkWidget *px_button, *p_button, *px_widget, *p_widget;
GtkWidget *px_widget, *p_widget;
GtkWidget *widget;
widget = gnc_option_get_gtk_widget (option);
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);
p_button = g_list_nth_data(widget_list, 2);
// p_button item 2
p_widget = g_list_nth_data(widget_list, 3);
g_list_free(widget_list);
@ -3604,7 +3603,6 @@ gnc_option_set_ui_value_currency_accounting (GNCOption *option,
else
{
GtkWidget *button = NULL;
int i;
gpointer val;
switch (index)
@ -3997,14 +3995,14 @@ static SCM
gnc_option_get_ui_value_plot_size (GNCOption *option, GtkWidget *widget)
{
GList* widget_list;
GtkWidget *px_button, *p_button, *px_widget, *p_widget;
GtkWidget *px_button, *px_widget, *p_widget;
gdouble d_value;
SCM type, val;
widget_list = gtk_container_get_children(GTK_CONTAINER(widget));
px_button = g_list_nth_data(widget_list, 0);
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);
g_list_free(widget_list);

View File

@ -549,7 +549,6 @@ gnc_preferences_build_page (gpointer data,
GtkNotebook *notebook;
addition *add_in;
struct copy_data copydata;
gint rows, cols;
gchar **widgetname;
gint i;
@ -613,7 +612,6 @@ gnc_preferences_build_page (gpointer data,
if (!existing_content)
{
/* No existing content with this name. Create a blank page */
rows = 0;
existing_content = gtk_grid_new();
gtk_container_set_border_width(GTK_CONTAINER(existing_content), 6);
label = gtk_label_new(add_in->tabname);
@ -713,7 +711,6 @@ static void
gnc_prefs_connect_font_button (GtkFontButton *fb)
{
gchar *group, *pref;
gchar *font;
g_return_if_fail(GTK_IS_FONT_BUTTON(fb));
@ -876,16 +873,11 @@ static void
gnc_prefs_connect_radio_button (GtkRadioButton *button)
{
gchar *group, *pref;
gboolean active;
g_return_if_fail(GTK_IS_RADIO_BUTTON(button));
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");
g_free (group);
@ -905,16 +897,11 @@ static void
gnc_prefs_connect_check_button (GtkCheckButton *button)
{
gchar *group, *pref;
gboolean active;
g_return_if_fail(GTK_IS_CHECK_BUTTON(button));
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");
g_free (group);
@ -934,16 +921,11 @@ static void
gnc_prefs_connect_spin_button (GtkSpinButton *spin)
{
gchar *group, *pref;
gdouble value;
g_return_if_fail(GTK_IS_SPIN_BUTTON(spin));
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");
g_free (group);
@ -962,16 +944,11 @@ static void
gnc_prefs_connect_combo_box (GtkComboBox *box)
{
gchar *group, *pref;
gint active;
g_return_if_fail(GTK_IS_COMBO_BOX(box));
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");
g_free (group);
@ -989,9 +966,7 @@ gnc_prefs_connect_combo_box (GtkComboBox *box)
static void
gnc_prefs_connect_currency_edit (GNCCurrencyEdit *gce, const gchar *boxname )
{
gnc_commodity *currency;
gchar *group, *pref;
gchar *mnemonic;
g_return_if_fail(GNC_IS_CURRENCY_EDIT(gce));
@ -1017,17 +992,11 @@ static void
gnc_prefs_connect_entry (GtkEntry *entry)
{
gchar *group, *pref;
gchar *text;
g_return_if_fail(GTK_IS_ENTRY(entry));
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");
g_free (group);
@ -1046,7 +1015,6 @@ static void
gnc_prefs_connect_period_select (GncPeriodSelect *period, const gchar *boxname )
{
gchar *group, *pref;
gchar *mnemonic;
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 )
{
gchar *group, *pref;
gchar *mnemonic;
g_return_if_fail(GNC_IS_DATE_EDIT(gde));
@ -1244,7 +1211,6 @@ gnc_preferences_dialog_create(void)
gnc_commodity *locale_currency;
const gchar *currency_name;
QofBook *book;
gint64 month, day;
GDate fy_end;
gboolean date_is_valid = FALSE;

View File

@ -181,7 +181,7 @@ gnc_dialog_query_view_new (GList *param_list, Query *q)
{
GtkBuilder *builder;
DialogQueryView *dqv;
GtkWidget *result_hbox, *close, *scrollWin, *frame, *but_hbox;
GtkWidget *result_hbox, *close, *scrollWin, *frame;
GList *node;
dqv = g_new0 (DialogQueryView, 1);

View File

@ -1065,7 +1065,6 @@ gnc_xfer_to_amount_update_cb(GtkWidget *widget, GdkEventFocus *event,
{
XferDialog *xferData = data;
gnc_numeric price_value;
Account *account;
gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (xferData->to_amount_edit));
price_value = gnc_xfer_dialog_compute_price_value(xferData);
@ -1799,7 +1798,6 @@ gnc_xfer_dialog_close_cb(GtkDialog *dialog, gpointer data)
void
gnc_xfer_dialog_fetch (GtkButton *button, XferDialog *xferData)
{
GNCPrice *prc;
PriceReq pr;
SCM quotes_func;
SCM book_scm;

View File

@ -50,9 +50,6 @@ static QofLogModule log_module = GNC_MOD_GUI;
#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 *
* sets the color of the label given the value *
@ -65,30 +62,16 @@ void
gnc_set_label_color(GtkWidget *label, gnc_numeric value)
{
gboolean deficit;
GtkStyleContext *stylecontext;
GtkCssProvider *provider;
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_NEGATIVE_IN_RED))
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);
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
gtk_css_provider_load_from_data (provider, css_default_color, -1, NULL);
gnc_widget_set_style_context (GTK_WIDGET(label), "css_default_color");
}

View File

@ -134,7 +134,6 @@ gcrd_init (GncCellRendererDate *date)
GncCellRendererPopup *popup;
GtkWidget *frame;
GtkWidget *vbox;
GtkWidget *bbox;
GtkWidget *button;
popup = GNC_CELL_RENDERER_POPUP (date);
@ -312,7 +311,6 @@ gcrd_show (GncCellRendererPopup *cell,
gint year;
gint month;
gint day;
gint index;
const gchar *text;
if (parent_class->show_popup) {
@ -342,7 +340,6 @@ gcrd_show (GncCellRendererPopup *cell,
gtk_calendar_select_day (GTK_CALENDAR (date->calendar), day);
gtk_calendar_mark_day (GTK_CALENDAR (date->calendar), day);
}
GtkCellRenderer *

View File

@ -223,7 +223,9 @@ gcrp_grab_on_window (GdkWindow *window,
#endif
GdkDevice *device;
#if GTK_CHECK_VERSION(3,22,0)
GdkEvent *event = gtk_get_current_event ();
#endif
#if GTK_CHECK_VERSION(3,20,0)
seat = gdk_display_get_default_seat (display);

View File

@ -453,13 +453,9 @@ gctt_rebuild_menu (GncCombott *combott, GtkTreeModel *model)
static void
gctt_refresh_menu (GncCombott *combott, GtkTreeModel *model)
{
GncCombottPrivate *priv;
g_return_if_fail (GNC_IS_COMBOTT (combott));
g_return_if_fail (model == NULL || GTK_IS_TREE_MODEL (model));
priv = GNC_COMBOTT_GET_PRIVATE (combott);
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 );
if(g_strcmp0(text, "") && (text != NULL))
{
gchar *label = "";
gtk_tooltip_set_text (tooltip, text);
g_free(text);
return TRUE;
@ -699,7 +694,6 @@ gnc_combott_set_active (GncCombott *combott, gint index)
GtkTreeIter iter;
gboolean valid = TRUE;
gint active = 1;
gint num = 1;
g_return_if_fail (GNC_IS_COMBOTT (combott));
g_return_if_fail (index >= -1);

View File

@ -302,7 +302,6 @@ static void gnc_currency_edit_active_changed (GtkComboBox *gobject,
gpointer user_data)
{
GNCCurrencyEdit *self = GNC_CURRENCY_EDIT (gobject);
GNCCurrencyEditPrivate *priv = GET_PRIVATE (self);
gnc_commodity *currency = gnc_currency_edit_get_currency (self);
const gchar *mnemonic = gnc_commodity_get_mnemonic (currency);

View File

@ -893,7 +893,6 @@ create_children (GNCDateEdit *gde)
GtkWidget *frame;
GtkWidget *hbox;
GtkWidget *arrow;
GtkComboBox *combo;
GtkTreeStore *store;
GtkCellRenderer *cell;
@ -1170,7 +1169,6 @@ time64
gnc_date_edit_get_date (GNCDateEdit *gde)
{
struct tm tm;
time64 retval;
g_return_val_if_fail (gde != NULL, 0);
g_return_val_if_fail (GNC_IS_DATE_EDIT (gde), 0);

View File

@ -723,14 +723,12 @@ static void
gdc_reconfig(GncDenseCal *dcal)
{
GtkWidget *widget;
GdkWindow *window;
GtkAllocation alloc;
if (dcal->surface)
cairo_surface_destroy (dcal->surface);
widget = GTK_WIDGET(dcal->cal_drawing_area);
window = gtk_widget_get_window (widget);
gtk_widget_get_allocation (widget, &alloc);
dcal->surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
alloc.width,

View File

@ -950,7 +950,6 @@ RESTART:
QofBook *book = qof_session_get_book (new_session);
gchar *msg = gnc_features_test_unknown (book);
Account *template_root = gnc_book_get_template_root (book);
GList *child = NULL;
if (msg)
{

View File

@ -228,7 +228,6 @@ gnc_frequency_init(GncFrequency *gf)
gf->startDate = GNC_DATE_EDIT(gnc_date_edit_new(time(NULL), FALSE, FALSE));
/* Add the new widget to the table. */
{
gint dont_expand_or_fill = 0;
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_widget_set_vexpand (GTK_WIDGET(gf->startDate), FALSE);

View File

@ -172,26 +172,38 @@ gnc_configure_date_completion (void)
void
gnc_add_css_file (void)
{
GtkCssProvider *provider;
GtkCssProvider *provider_user, *provider_app;
GdkDisplay *display;
GdkScreen *screen;
const gchar *var;
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
gchar *str;
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 ();
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 ();
if (var)
{
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_object_unref (provider);
g_object_unref (provider_user);
g_object_unref (provider_app);
}
#ifdef MAC_INTEGRATION

View File

@ -64,7 +64,6 @@ void
gnc_load_app_icons (void)
{
GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
gchar *file;
const gchar *default_path;
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
gchar* datadir = gnc_path_get_datadir ();

View File

@ -3844,7 +3844,7 @@ gnc_main_window_switch_page (GtkNotebook *notebook,
GncMainWindowPrivate *priv;
GtkWidget *child;
GncPluginPage *page;
gboolean immutable, visible;
gboolean visible;
ENTER("Notebook %p, page, %p, index %d, window %p",
notebook, notebook_page, pos, window);

View File

@ -418,11 +418,7 @@ gnc_query_view_init_view (GNCQueryView *qview)
static void
gnc_query_view_class_init (GNCQueryViewClass *klass)
{
GtkWidgetClass *widget_class;
GtkTreeViewClass *view_class;
widget_class = (GtkWidgetClass*) klass;
view_class = (GtkTreeViewClass*) klass;
GtkWidgetClass *widget_class = (GtkWidgetClass*) klass;
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));
GtkTreeModel *model;
GtkTreeIter iter;
gint number_of_rows;
gpointer entry = NULL;
GList *node;
@ -687,8 +682,6 @@ void
gnc_query_view_refresh (GNCQueryView *qview)
{
GtkTreeModel *model;
GtkTreeIter iter;
GtkTreeSelection *selection;
GList *old_entry;
g_return_if_fail (qview != NULL);

View File

@ -833,7 +833,6 @@ void
gnc_tree_control_split_reg_reinit (GncTreeViewSplitReg *view, gpointer data)
{
Transaction *trans;
Split *split;
GtkWidget *dialog, *window;
gint response;
const gchar *warning;
@ -1082,7 +1081,6 @@ gnc_tree_control_split_reg_reverse_current (GncTreeViewSplitReg *view)
GtkWidget *window;
Transaction *trans = NULL, *new_trans = NULL;
GList *snode = NULL;
gboolean changed = FALSE;
ENTER(" ");
@ -1174,7 +1172,6 @@ gnc_tree_control_split_reg_duplicate_current (GncTreeViewSplitReg *view)
Transaction *trans;
Split *blank_split;
Split *split, *trans_split;
gboolean changed = FALSE;
gboolean use_split_action_for_num_field = FALSE;
ENTER("");
@ -1313,7 +1310,6 @@ gnc_tree_control_split_reg_duplicate_current (GncTreeViewSplitReg *view)
{
Transaction *new_trans;
int trans_split_index;
int split_index;
const char *in_num = NULL;
const char *in_tnum = NULL;
char *out_num;
@ -1649,16 +1645,11 @@ gboolean gnc_tree_control_split_reg_is_current_movable_updown (GncTreeViewSplitR
gboolean
gnc_tree_control_split_reg_save (GncTreeViewSplitReg *view, gboolean reg_closing)
{
GncTreeModelSplitReg *model;
RowDepth depth;
Transaction *dirty_trans;
Transaction *blank_trans;
Transaction *trans;
Account *account;
Split *blank_split;
const char *memo;
const char *desc;
Split *split, *current_trans_split;
// Split *split;
// Split *current_trans_split;
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)
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);
blank_trans = gnc_tree_control_split_reg_get_blank_trans (view);
/* 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);
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)
{
@ -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 *missing = _("The account %s does not exist. "
"Would you like to create it?");
char *account_name;
Account *account;
if (!name || (strlen(name) == 0))
@ -2069,7 +2056,7 @@ gnc_tree_control_split_reg_copy_trans (GncTreeViewSplitReg *view)
{
GncTreeModelSplitReg *model;
Transaction *from_trans;
Account *from_acc, *anchor;
Account *anchor;
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)
{
GncTreeModelSplitReg *model;
Transaction *btrans, *dirty_trans;
Transaction *btrans;
GtkListStore *desc_list;
GtkTreeIter iter;
gboolean valid;

View File

@ -508,7 +508,7 @@ gnc_tree_model_price_get_iter (GtkTreeModel *tree_model,
gnc_commodity_namespace *name_space;
gnc_commodity *commodity = NULL;
GNCPrice *price;
GList *ns_list, *cm_list, *price_list;
GList *ns_list, *cm_list;
guint i, depth;
g_return_val_if_fail (GNC_IS_TREE_MODEL_PRICE (tree_model), FALSE);

View File

@ -366,8 +366,6 @@ gnc_tree_model_split_reg_prefs_changed (gpointer prefs, gchar *pref, gpointer us
static void
gnc_tree_model_split_reg_init (GncTreeModelSplitReg *model)
{
GncTreeModelSplitRegPrivate *priv;
ENTER("model %p", model);
while (model->stamp == 0)
{
@ -391,14 +389,10 @@ gnc_tree_model_split_reg_init (GncTreeModelSplitReg *model)
static void
gnc_tree_model_split_reg_finalize (GObject *object)
{
GncTreeModelSplitReg *model;
ENTER("model split reg %p", object);
g_return_if_fail (object != NULL);
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)
G_OBJECT_CLASS (parent_class)->finalize (object);
LEAVE(" ");
@ -616,8 +610,6 @@ void
gnc_tree_model_split_reg_load (GncTreeModelSplitReg *model, GList *slist, Account *default_account)
{
GncTreeModelSplitRegPrivate *priv;
GList *node;
gint rows = 0;
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);
const GncGUID *guid;
GList *tnode;
gint depth, *indices;
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)
{
GtkTreePath *path;
GList *slist;
gint tpos, spos, number;
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)
{
slist = xaccTransGetSplitList (trans);
/* Level 3 */
spos = xaccTransGetSplitIndex (trans, split);
if (spos == -1)
@ -3022,7 +3011,6 @@ gnc_tree_model_split_reg_update_account_list (GncTreeModelSplitReg *model)
Account *acc;
GtkTreeIter iter;
GList *accts, *accts_cpy, *ptr;
gboolean valid;
const gchar *name;
gchar *fname;
gint i;

View File

@ -425,7 +425,6 @@ gchar *
gnc_tree_util_split_reg_get_date_help (GDate *date)
{
char string[1024];
struct tm tm;
if (g_date_valid (date))
{
@ -824,20 +823,19 @@ gnc_tree_util_split_reg_get_debcred_entry (GncTreeViewSplitReg *view,
void
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;
Account *anchor;
Account *acct = xaccSplitGetAccount (split);
gnc_commodity *currency;
gnc_numeric value, amount, rate;
// Account *anchor;
// Account *acct = xaccSplitGetAccount (split);
// gnc_commodity *currency;
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))
{

View File

@ -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,
const gchar *new_text, gpointer user_data);
static void start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
const gchar *path, gpointer user_data); //FIXME This may not be needed
//static void start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
// const gchar *path, gpointer user_data); //FIXME This may not be needed
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_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
//static void gtv_sr_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
// GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
static void gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
GtkTreeIter *iter, gpointer user_data); //FIXME This may not be needed
//static void gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
// 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);
@ -548,15 +548,11 @@ gnc_tree_view_split_reg_dispose (GObject *object)
static void
gnc_tree_view_split_reg_finalize (GObject *object)
{
GncTreeViewSplitReg *view;
gnc_leave_return_if_fail(object != NULL);
gnc_leave_return_if_fail(GNC_IS_TREE_VIEW_SPLIT_REG (object));
ENTER("split reg view %p", object);
view = GNC_TREE_VIEW_SPLIT_REG (object);
if (G_OBJECT_CLASS(parent_class)->finalize)
(* 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 */
static ViewCol *
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;
GncTreeViewSplitReg *view;
GtkTreeSelection *selection;
GtkCssProvider* provider = gtk_css_provider_new();
view = g_object_new (gnc_tree_view_split_reg_get_type(), 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));
view->help_text = g_strdup ("Help Text");
// This sets up solid lines for the grid line.
gtk_css_provider_load_from_data (provider, css_string, strlen(css_string), NULL);
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);
/* Set the grid lines to be solid */
gnc_widget_set_style_context (GTK_WIDGET(view), "treeview_grid_lines");
/* TreeView Grid lines */
if (view->priv->use_horizontal_lines)
@ -1837,8 +1819,6 @@ gtv_sr_cdf0 (GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *s_mode
{
GNCPrintAmountInfo print_info;
gnc_commodity *split_com = xaccAccountGetCommodity (xaccSplitGetAccount (split));
print_info = gnc_default_price_print_info();
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 editable = FALSE, expanded = FALSE;
gboolean read_only = FALSE;
gboolean open_edited = FALSE;
gnc_numeric num;
// gboolean open_edited = FALSE;
const gchar *s = "";
const gchar *row_color;
RowDepth depth;
// RowDepth depth;
gint *indices;
Account *anchor = view->priv->anchor;
// Account *anchor = view->priv->anchor;
char type;
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);
depth = gtk_tree_path_get_depth (spath);
// depth = gtk_tree_path_get_depth (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))
{
read_only = TRUE;
open_edited = TRUE;
// open_edited = TRUE;
}
/* 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
#############################################################################*/
#ifdef skip
static void
start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
const gchar *path_string, gpointer user_data)
{
GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
GncTreeModelSplitReg *model;
// GncTreeViewSplitReg *view = GNC_TREE_VIEW_SPLIT_REG (user_data);
// GncTreeModelSplitReg *model;
GtkTreePath *path;
//g_print("\n\nstart_edit\n");
/*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);
/* g_signal_connect(G_OBJECT(editable), "editing-done", (GCallback) editing_done_cb, view); */
@ -2528,7 +2508,7 @@ start_edit (GtkCellRenderer *cr, GtkCellEditable *editable,
return;
}
#endif
/* Open Transaction for editing */
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 */
static gboolean
gtv_sr_idle_finish_edit (GncTreeViewSplitReg *view)
@ -2730,6 +2711,7 @@ gtv_sr_idle_cancel_edit (GtkCellRenderer *cr)
return FALSE;
}
#endif
/* This is used in g_idle_add to repopulate the transfer cell */
static gboolean
@ -2779,7 +2761,6 @@ gtv_sr_titles (GncTreeViewSplitReg *view, RowDepth depth)
GList *columns;
GList *column;
gint i;
RowDepth temp_depth;
gboolean is_template;
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;
GtkTreePath *mpath, *spath;
GtkTreeViewColumn *col;
ViewCol viewcol;
GtkTreeIter m_iter;
Split *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;
gint *start_indices;
gint *next_indices;
gboolean keyup = FALSE;
Transaction *btrans, *ctrans, *hetrans;
gboolean goto_blank = FALSE;
gboolean next_trans = TRUE;
gint depth;
// spath is where we are, before key press...
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);
GncTreeModelSplitReg *model;
GtkTreeModel *s_model;
GtkTreePath *mpath, *spath;
Split *split = 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);
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,
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;
gboolean is_trow1, is_trow2, is_split, is_blank;
ViewCol viewcol;
char *error_loc = NULL;
Account *anchor = view->priv->anchor;
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);
GncTreeModelSplitReg *model;
GtkTreeViewColumn *col;
GtkTreePath *spath, *start_spath;
GtkTreePath *spath;
gboolean goto_blank = FALSE;
gboolean next_trans = TRUE;
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);
GncTreeModelSplitReg *model;
GtkTreeModel *s_model;
GtkTreePath *spath, *mpath, *fpath;
GtkTreePath *spath;
GtkEntry *entry = NULL;
ViewCol viewcol;
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);
s_model = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
/* Description / Notes / Memo / Accounts Completion Lists */
description_list = gnc_tree_model_split_reg_get_description_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(" ");
}
#ifdef skip
// Handle the "match-selected" signal
static void
gtv_sr_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
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");
/* Not sure what I am going to put in here yet if anything */
}
#endif
#ifdef skip
// Handle the "changed" signal
static void
gtv_sr_changed_cb (GtkCellRendererCombo *widget, gchar *path_string,
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);
/* Not sure what I am going to put in here yet if anything */
}
#endif
// Handle the "editing-canceled" signal
static void
@ -5990,10 +5961,6 @@ gnc_tree_view_split_reg_get_dirty_trans (GncTreeViewSplitReg *view)
void
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)
{
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
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 */
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))
{
gint *indices_start, *indices_end;
// gint *indices_start;
gint *indices_end;
gint lines = 0;
/* 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);
if (model->use_double_line)

View File

@ -677,15 +677,12 @@ static void
gnc_tree_view_update_visibility (GtkTreeViewColumn *column,
GncTreeView *view)
{
GncTreeViewPrivate *priv;
gchar *name, *key;
gboolean visible;
g_return_if_fail(GTK_IS_TREE_VIEW_COLUMN(column));
g_return_if_fail(GNC_IS_TREE_VIEW(view));
ENTER(" ");
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
visible = gnc_tree_view_column_visible(view, column, NULL);
gtk_tree_view_column_set_visible(column, visible);
LEAVE("made %s", visible ? "visible" : "invisible");
@ -704,13 +701,11 @@ gnc_tree_view_update_visibility (GtkTreeViewColumn *column,
static gchar *
gnc_tree_view_get_sort_order (GncTreeView *view)
{
GncTreeViewPrivate *priv;
GtkTreeModel *s_model;
GtkSortType order;
gint current;
gchar *order_str = NULL;
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
if (!s_model)
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;
GtkTreeViewColumn *column;
GtkSortType order;
gint model_column, current;
gint current;
const gchar *name;
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,
const gchar *name)
{
GncTreeViewPrivate *priv;
GtkTreeModel *s_model;
GtkSortType order = GTK_SORT_ASCENDING;
gint current;
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
s_model = gtk_tree_view_get_model(GTK_TREE_VIEW(view));
if (!s_model)
return;
@ -907,7 +900,6 @@ gnc_tree_view_set_column_order (GncTreeView *view,
gchar **column_names,
gsize length)
{
GncTreeViewPrivate *priv;
GtkTreeViewColumn *column, *prev;
const GSList *tmp;
GSList *columns;
@ -915,7 +907,6 @@ gnc_tree_view_set_column_order (GncTreeView *view,
/* First, convert from names to pointers */
ENTER(" ");
priv = GNC_TREE_VIEW_GET_PRIVATE(view);
columns = NULL;
for (idx = 0; idx < length; idx++)
{
@ -1312,15 +1303,11 @@ static void
gnc_tree_view_update_column_menu_item (GtkCheckMenuItem *checkmenuitem,
GncTreeView *view)
{
GncTreeViewPrivate *priv;
gchar *key;
gboolean visible;
g_return_if_fail(GTK_IS_CHECK_MENU_ITEM(checkmenuitem));
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))
{
visible = TRUE;
@ -1627,7 +1614,6 @@ gnc_tree_view_column_properties (GncTreeView *view,
GtkTreeModel *s_model;
gboolean visible;
int width = 0;
gchar *key;
/* Set data used by other functions */
if (pref_name)

View File

@ -561,7 +561,6 @@ gnc_search_param_prepend_compound (GList *list, char const *title,
GtkJustification justify,
GNCSearchParamKind kind)
{
GList *result;
GList *p;
QofIdTypeConst type = NULL;
GNCSearchParamCompound *param;

View File

@ -15,6 +15,7 @@ SET(gnome_utils_ui_DIST_local
gnc-windows-menu-ui.xml
Makefile.am
osx_accel_map
gnucash.css
)
SET_DIST_LIST(gnome_utils_ui_DIST ${gnome_utils_ui_DIST_local})

View File

@ -3,6 +3,7 @@ ui_DATA = \
gnc-main-window-ui.xml \
gnc-windows-menu-ui.xml \
gnc-windows-menu-ui-quartz.xml \
osx_accel_map
osx_accel_map \
gnucash.css
EXTRA_DIST = $(ui_DATA) CMakeLists.txt

View 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;
}

View File

@ -238,10 +238,7 @@ get_account_info (FindAccountDialog *facc_dialog)
static void
filter_button_cb (GtkButton *button, FindAccountDialog *facc_dialog)
{
GtkTreeModel *model;
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));
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW(facc_dialog->view));
// Clear the list store
gtk_list_store_clear (GTK_LIST_STORE(model));

View File

@ -591,7 +591,6 @@ get_account_info (ImapDialog *imap_dialog)
Account *root;
GList *accts;
GtkTreeModel *model, *filter;
GtkTreeIter iter;
/* Get list of Accounts */
root = gnc_book_get_root_account (gnc_get_current_book());

View File

@ -982,9 +982,7 @@ static void
lv_create (GNCLotViewer *lv)
{
gchar *win_title;
gint position;
GtkBuilder *builder;
GtkWidget *widget;
builder = gtk_builder_new();
gnc_builder_add_from_file (builder, "dialog-lot-viewer.glade", "lot_viewer_dialog");

View File

@ -1606,7 +1606,6 @@ gnc_ui_print_check_dialog_create(GtkWidget *parent,
PrintCheckDialog *pcd;
GtkBuilder *builder;
GtkWidget *table;
GtkWindow *window;
gchar *font;
Transaction *trans = NULL;

View File

@ -722,11 +722,8 @@ check_transaction_splits (Transaction *txn, gpointer data)
for ( ; splitList; splitList = splitList->next )
{
gnc_commodity *base_cmdty = NULL;
txnCreditDebitSums *tcds;
Split *s = (Split*)splitList->data;
tcds = (txnCreditDebitSums*)g_hash_table_lookup (sd->txns,
(gpointer)txn);
if (sd->tcds == NULL)
{
sd->tcds = tcds_new ();
@ -808,7 +805,6 @@ gnc_sxed_check_consistent( GncSxEditorDialog *sxed )
* right... ]
*/
gboolean multi_commodity = FALSE;
gint ttVarCount = 0, splitCount = 0;
static const int NUM_ITERS_WITH_VARS = 5;
static const int NUM_ITERS_NO_VARS = 1;
@ -1364,7 +1360,6 @@ schedXact_editor_populate( GncSxEditorDialog *sxed )
char *name;
time64 tmpDate;
SplitRegister *splitReg;
struct tm *tmpTm;
const GDate *gd;
gint daysInAdvance;
gboolean enabledState, autoCreateState, notifyState;

View File

@ -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 gnc_sxed_update_cal (GncSxEditorDialog2 *sxed);
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 gboolean sxed_delete_event (GtkWidget *widget, GdkEvent *event, gpointer ud);
static gboolean sxed_confirmed_cancel (GncSxEditorDialog2 *sxed);
@ -1325,7 +1324,6 @@ schedXact_editor_populate (GncSxEditorDialog2 *sxed)
char *name;
time64 tmpDate;
GncTreeModelSplitReg *model;
struct tm *tmpTm;
const GDate *gd;
gint daysInAdvance;
gboolean enabledState, autoCreateState, notifyState;

View File

@ -340,7 +340,6 @@ sxftd_init( SXFromTransInfo *sxfti )
gint pos;
GList *schedule = NULL;
time64 start_tt;
struct tm *tmpTm;
GDate date, nextDate;
if ( ! sxfti->sx )
@ -579,7 +578,6 @@ sxftd_freq_combo_changed( GtkWidget *w, gpointer user_data )
SXFromTransInfo *sxfti = (SXFromTransInfo*)user_data;
GDate date, nextDate;
time64 tmp_tt;
struct tm *tmpTm;
GList *schedule = NULL;
tmp_tt = xaccTransGetDate( sxfti->trans );
@ -676,7 +674,6 @@ gnc_sx_trans_window_response_cb (GtkDialog *dialog,
static void
sxftd_update_example_cal( SXFromTransInfo *sxfti )
{
struct tm *tmpTm;
time64 tmp_tt;
GDate date, startDate, nextDate;
GList *schedule = NULL;

View File

@ -472,7 +472,6 @@ load_tax_entity_type_list (TaxInfoDialog *ti_dialog)
{
TaxTypeInfo *tax_type_info;
SCM type_scm;
gchar *str = NULL;
SCM scm;
type_scm = SCM_CAR (tax_types);

View File

@ -109,11 +109,14 @@ static void gnc_budget_view_init(GncBudgetView *budget_view);
static void gnc_budget_view_finalize(GObject *object);
static void gbv_create_widget(GncBudgetView *view);
#if 0
static gboolean gbv_button_press_cb(
GtkWidget *widget, GdkEventButton *event, GncBudgetView *view);
#endif
#if 0
static gboolean gbv_key_press_cb(
GtkWidget *treeview, GdkEventKey *event, gpointer userdata);
#endif
static void gbv_row_activated_cb(
GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col,
GncBudgetView *view);
@ -171,8 +174,6 @@ gnc_budget_view_new(GncBudget *budget, AccountFilterDialog* fd)
{
GncBudgetView *budget_view;
GncBudgetViewPrivate *priv;
gchar* label;
const GList *item;
g_return_val_if_fail(GNC_IS_BUDGET(budget), NULL);
ENTER(" ");
@ -254,7 +255,6 @@ static void
gnc_budget_view_finalize(GObject *object)
{
GncBudgetView *view;
GncBudgetViewPrivate *priv;
ENTER("object %p", object);
view = GNC_BUDGET_VIEW(object);
@ -443,7 +443,6 @@ void
gnc_budget_view_save(GncBudgetView *view, GKeyFile *key_file, const gchar *group_name)
{
GncBudgetViewPrivate *priv;
char guid_str[GUID_ENCODING_LENGTH+1];
g_return_if_fail(view != NULL);
g_return_if_fail(key_file != NULL);
@ -573,7 +572,7 @@ gbv_button_press_cb(GtkWidget *widget, GdkEventButton *event,
}
#endif
#if 0
/** \brief Key press action for gnc budget view.
*/
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);
return TRUE;
}
#endif
/** \brief gnc budget view actions for resize of treeview.
*/
@ -639,6 +638,7 @@ gbv_treeview_resized_cb(GtkWidget* widget, GtkAllocation* allocation, GncBudgetV
{
col_width = gtk_tree_view_column_get_width(tree_view_col);
totals_view_col = gtk_tree_view_get_column(priv->totals_tree_view, j);
if(GTK_IS_TREE_VIEW_COLUMN(totals_view_col))
gtk_tree_view_column_set_fixed_width(totals_view_col, col_width);
j++;
}
@ -652,8 +652,6 @@ static void
gbv_row_activated_cb(GtkTreeView *treeview, GtkTreePath *path,
GtkTreeViewColumn *col, GncBudgetView *view)
{
GtkWidget *window;
GncPluginPage *new_page;
Account *account;
g_return_if_fail(GNC_IS_BUDGET_VIEW(view));
@ -909,9 +907,6 @@ totals_col_source(GtkTreeViewColumn *col, GtkCellRenderer *cell,
gint period_num;
gnc_numeric value; // used to assist in adding and subtracting
gchar amtbuff[100]; //FIXME: overkill, where's the #define?
gint width; // FIXME: VARIABLE NOT NEEDED?
gint i;
gint num_top_accounts;
@ -1098,7 +1093,6 @@ gbv_col_edited_cb(GtkCellRendererText* cell, gchar* path_string, gchar* new_text
{
GncBudgetView *view;
GncBudgetViewPrivate *priv;
const EventInfo* ei;
view = GNC_BUDGET_VIEW(user_data);
priv = GNC_BUDGET_VIEW_GET_PRIVATE(view);

View File

@ -47,7 +47,6 @@ static void gnc_plugin_account_tree_finalize (GObject *object);
/* Command callbacks */
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_UI_FILENAME "gnc-plugin-account-tree-ui.xml"

View File

@ -509,12 +509,6 @@ gnc_main_window_cmd_file_save_as (GtkAction *action, GncMainWindowActionData *da
static void
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);
if (!gnc_main_window_all_finish_pending())

View File

@ -163,12 +163,14 @@ static GtkActionEntry gnc_plugin_page_budget_actions [] =
static guint gnc_plugin_page_budget_n_actions =
G_N_ELEMENTS (gnc_plugin_page_budget_actions);
#if 0
static const gchar *actions_requiring_account[] =
{
"OpenAccountAction",
"OpenSubaccountsAction",
NULL
};
#endif
/** Short labels for use on the toolbar buttons. */
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.show_hidden = FALSE;
priv->fd.show_zero_total = TRUE;
priv->fd.filter_override = g_hash_table_new (g_direct_hash, g_direct_equal);
priv->sigFigs = 1;
recurrenceSet(&priv->r, 1, PERIOD_MONTH, NULL, WEEKEND_ADJ_NONE);
@ -346,7 +349,6 @@ static void
gnc_plugin_page_budget_finalize (GObject *object)
{
GncPluginPageBudget *page;
GncPluginPageBudgetPrivate *priv;
ENTER("object %p", object);
page = GNC_PLUGIN_PAGE_BUDGET (object);
@ -409,10 +411,6 @@ gnc_plugin_page_budget_create_widget (GncPluginPage *plugin_page)
{
GncPluginPageBudget *page;
GncPluginPageBudgetPrivate *priv;
GtkTreeSelection *selection;
GtkTreeView *tree_view;
GtkWidget *scrolled_window;
const gchar *budget_guid_str;
ENTER("page %p", 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;
}
// Destroy the filter override hash table
g_hash_table_destroy(priv->fd.filter_override);
gnc_gui_component_clear_watches (priv->component_id);
if (priv->component_id != NO_COMPONENT)

View File

@ -600,9 +600,6 @@ gnc_plugin_page_register2_new_common (GNCLedgerDisplay2 *ledger)
GncPluginPageRegister2Private *priv;
GncPluginPage *plugin_page;
GncTreeModelSplitReg *model;
GtkTreeView *tv;
GNCSplitReg2 *gsr;
const GList *item;
@ -610,7 +607,6 @@ gnc_plugin_page_register2_new_common (GNCLedgerDisplay2 *ledger)
gchar *label;
gchar *label_color;
QofQuery *q;
Account *account;
/* Is there an existing page? */
gsr = gnc_ledger_display2_get_user_data (ledger);
@ -789,13 +785,11 @@ static void
gnc_plugin_page_register2_finalize (GObject *object)
{
GncPluginPageRegister2 *page;
GncPluginPageRegister2Private *priv;
g_return_if_fail (GNC_IS_PLUGIN_PAGE_REGISTER2 (object));
ENTER("object %p", 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);
LEAVE(" ");
@ -1079,7 +1073,6 @@ gnc_plugin_page_register2_create_widget (GncPluginPage *plugin_page)
GncTreeModelSplitReg *model;
Account *acct;
gchar **filter;
gchar *order;
int filter_changed = 0;
ENTER("page %p", plugin_page);
@ -1434,7 +1427,6 @@ gnc_plugin_page_register2_restore_edit_menu (GncPluginPage *page,
GKeyFile *key_file,
const gchar *group_name)
{
GncPluginPageRegister2Private *priv;
GtkAction *action;
GError *error = NULL;
gchar *style_name;
@ -1443,7 +1435,6 @@ gnc_plugin_page_register2_restore_edit_menu (GncPluginPage *page,
gboolean show_extra_dates;
ENTER(" ");
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE (page);
/* Convert the style name to an index */
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 )
{
GncPluginPageRegister2Private *priv;
GNCLedgerDisplay2Type ledger_type;
GNCLedgerDisplay2 *ld;
Account *leader;
gchar *default_filter;
priv = GNC_PLUGIN_PAGE_REGISTER2_GET_PRIVATE(plugin_page);
ld = priv->ledger;
ledger_type = gnc_ledger_display2_type (ld);
leader = gnc_ledger_display2_leader (ld);
if (leader != NULL)
@ -1968,10 +1957,9 @@ gnc_plugin_page_register2_filter_time2dmy (time64 raw_time)
{
struct tm * timeinfo;
gchar date_string[11];
gint i;
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);
gnc_tm_free (timeinfo);
@ -2093,7 +2081,6 @@ static void
get_filter_times (GncPluginPageRegister2 *page)
{
GncPluginPageRegister2Private *priv;
GtkWidget *button, *today, *gde;
time64 time_val;
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)
{
Account *common_acct = NULL, *account;
Account *common_acct = NULL;
splits = qof_query_run (gnc_ledger_display2_get_query (priv->ledger));
/* Make sure each split is from the same account */
for (item = splits; item; item = g_list_next (item))
@ -2700,15 +2687,11 @@ static void
gnc_plugin_page_register2_cmd_cut (GtkAction *action,
GncPluginPageRegister2 *page) //this works
{
GncPluginPageRegister2Private *priv;
GncTreeViewSplitReg *view;
GtkWidget *window, *widget;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (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));
widget = gtk_window_get_focus (GTK_WINDOW (window));
@ -2725,15 +2708,11 @@ static void
gnc_plugin_page_register2_cmd_copy (GtkAction *action,
GncPluginPageRegister2 *page) //this works
{
GncPluginPageRegister2Private *priv;
GncTreeViewSplitReg *view;
GtkWidget *window, *widget;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (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));
widget = gtk_window_get_focus (GTK_WINDOW (window));
@ -2750,15 +2729,11 @@ static void
gnc_plugin_page_register2_cmd_paste (GtkAction *action,
GncPluginPageRegister2 *page) //this works
{
GncPluginPageRegister2Private *priv;
GncTreeViewSplitReg *view;
GtkWidget *window, *widget;
g_return_if_fail(GNC_IS_PLUGIN_PAGE_REGISTER2 (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));
widget = gtk_window_get_focus (GTK_WINDOW (window));
@ -3009,12 +2984,11 @@ gnc_plugin_page_register2_cmd_view_filter_by (GtkAction *action,
{
GncPluginPageRegister2Private *priv;
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;
GtkBuilder *builder;
gboolean sensitive, value;
Query *query;
GList *split_list;
gchar *title;
int i;
@ -3257,7 +3231,6 @@ gnc_plugin_page_register2_cmd_style_extra_dates (GtkToggleAction *action,
GncPluginPageRegister2 *plugin_page) // this works
{
GncPluginPageRegister2Private *priv;
GncTreeModelSplitReg *model;
GncTreeViewSplitReg *view;
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));
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);
@ -3532,7 +3504,6 @@ gnc_plugin_page_register2_cmd_jump (GtkAction *action,
{
GncPluginPageRegister2Private *priv;
GncPluginPage *new_page;
GncPluginPageRegister2 *new_reg_page;
GtkWidget *window;
GNCLedgerDisplay2 *ld;
GncTreeViewSplitReg *view, *new_view;

View File

@ -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_edit(GtkAction *action, GncPluginPageSxList *page);
#ifdef REGISTER2_ENABLED
/*################## Added for Reg2 #################*/
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);
/*################## Added for Reg2 #################*/
#endif
static void gnc_plugin_page_sx_list_cmd_delete(GtkAction *action, GncPluginPageSxList *page);
/* Command callbacks */
@ -234,7 +236,6 @@ gnc_plugin_page_sx_list_init (GncPluginPageSxList *plugin_page)
{
GtkActionGroup *action_group;
GncPluginPage *parent;
GncPluginPageSxListClass *klass = GNC_PLUGIN_PAGE_SX_LIST_GET_CLASS (plugin_page);
/* Init parent declared variables */
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);
}
#ifdef REGISTER2_ENABLED
/*################## Added for Reg2 #################*/
static void
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);
}
/*################## Added for Reg2 #################*/
#endif
static void
_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);
}
#ifdef REGISTER2_ENABLED
/*################## Added for Reg2 #################*/
static void
_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);
}
/*################## Added for Reg2 #################*/
#endif
static SchedXaction*
_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);
}
#ifdef REGISTER2_ENABLED
/*################## Added for Reg2 #################*/
static void
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);
}
/*################## Added for Reg2 #################*/
#endif
static void
gppsl_row_activated_cb(GtkTreeView *tree_view,

View File

@ -189,12 +189,9 @@ static void
gnc_plugin_register2_finalize (GObject *object)
{
GncPluginRegister2 *plugin;
GncPluginRegister2Private *priv;
g_return_if_fail (GNC_IS_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);
}

View File

@ -563,9 +563,6 @@ gsr_redraw_all_cb (GnucashRegister *g_reg, gpointer data)
QofBook *book = gnc_account_get_book (leader);
GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
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);
xaccSPrintAmount (string, amount, print_info);
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);
Transaction *trans;
Split *split = gnc_split_register_get_current_split (reg);
GtkWidget *dialog;
const char *uri;
const char *run_uri;
gchar *uri_scheme;

View File

@ -216,11 +216,12 @@ static
void
gsr2_setup_table (GNCSplitReg2 *gsr)
{
GncTreeModelSplitReg *model;
// GncTreeModelSplitReg *model;
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(" ");
}
@ -229,7 +230,6 @@ static
void
gsr2_create_table (GNCSplitReg2 *gsr)
{
GtkWidget *register_widget;
GncTreeViewSplitReg *view;
GncTreeModelSplitReg *model;
GtkTreeModel *s_model;
@ -243,7 +243,6 @@ gsr2_create_table (GNCSplitReg2 *gsr)
GKeyFile *state_file = gnc_state_get_current();
const GncGUID * guid;
Account * account;
const gchar *sort_string;
account = gnc_ledger_display2_leader (gsr->ledger);
guid = xaccAccountGetGUID (account);
@ -565,9 +564,6 @@ gsr2_redraw_all_cb (GncTreeViewSplitReg *view, gpointer user_data)
GNCPriceDB *pricedb = gnc_pricedb_get_db (book);
gnc_commodity *commodity = xaccAccountGetCommodity (leader);
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);
xaccSPrintAmount (string, amount, print_info);
gnc_set_label_color (gsr->value_label, amount);
@ -663,7 +659,6 @@ gsr2_create_balancing_transaction (QofBook *book, Account *account,
static void
gnc_split_reg2_sort_changed_cb (GtkTreeSortable *sortable, gpointer user_data)
{
Query *query;
GNCSplitReg2 *gsr = user_data;
GncTreeViewSplitReg *view;
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);
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);
if (sort_depth != 0)
model->sort_depth = sort_depth;
@ -966,7 +959,6 @@ void
gnc_split_reg2_determine_read_only (GNCSplitReg2 *gsr) //this works
{
dialog_args *args = g_malloc (sizeof (dialog_args));
GncTreeViewSplitReg *view;
if (qof_book_is_readonly (gnc_get_current_book()))
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.16"/>
<requires lib="gtk+" version="3.10"/>
<object class="GtkAdjustment" id="DigitsToRound_Adj">
<property name="lower">1</property>
<property name="upper">12</property>

View File

@ -643,7 +643,6 @@ gnc_reconcile_view_set_list ( GNCReconcileView *view, gboolean reconcile)
GNCQueryView *qview = GNC_QUERY_VIEW(view);
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
gpointer entry;
gboolean toggled;
GList *node;
@ -691,7 +690,6 @@ gnc_reconcile_view_set_toggle (GNCReconcileView *view)
GNCQueryView *qview = GNC_QUERY_VIEW(view);
GtkTreeSelection *selection;
GtkTreeModel *model;
GtkTreeIter iter;
gboolean toggled;
GList *node;
GList *list_of_rows;
@ -732,11 +730,7 @@ gnc_reconcile_view_key_press_cb (GtkWidget *widget, GdkEventKey *event,
gpointer user_data)
{
GNCReconcileView *view = GNC_RECONCILE_VIEW(user_data);
GNCQueryView *qview = GNC_QUERY_VIEW(widget);
GtkTreeModel *model;
GtkTreeIter iter;
gpointer entry, pointer;
gboolean valid, toggle;
gboolean toggle;
switch (event->keyval)
{

View File

@ -311,7 +311,6 @@ gnc_save_all_state (gpointer session, gpointer unused)
QofBook *book;
gchar guid_string[GUID_ENCODING_LENGTH+1];
const GncGUID *guid;
GError *error = NULL;
GKeyFile *keyfile = NULL;
keyfile = gnc_state_get_current ();
@ -322,7 +321,6 @@ gnc_save_all_state (gpointer session, gpointer unused)
*/
gsize num_groups, curr;
gchar **groups = g_key_file_get_groups (keyfile, &num_groups);
gchar *group = NULL;
for (curr=0; curr < num_groups; curr++)
{
if (g_str_has_prefix (groups[curr], "Window ") ||

View File

@ -694,7 +694,6 @@ startRecnWindow(GtkWidget *parent, Account *account,
gboolean auto_interest_xfer_option;
GNCPrintAmountInfo print_info;
gnc_numeric ending;
gboolean has_uniform_currency;
char *title;
int result;
@ -985,12 +984,9 @@ gnc_reconcile_window_button_press_cb (GtkWidget *widget,
RecnWindow *recnData)
{
GNCQueryView *qview = GNC_QUERY_VIEW(widget);
GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreePath *path;
model = gtk_tree_view_get_model(GTK_TREE_VIEW(qview));
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
{
@ -1445,7 +1441,6 @@ gnc_get_reconcile_info (Account *account,
gboolean always_today;
GDate date;
time64 today;
struct tm tm;
g_date_clear(&date, 1);

View File

@ -948,12 +948,9 @@ gnc_reconcile_window_button_press_cb (GtkWidget *widget,
RecnWindow2 *recnData)
{
GNCQueryView *qview = GNC_QUERY_VIEW (widget);
GtkTreeModel *model;
GtkTreeSelection *selection;
GtkTreePath *path;
model = gtk_tree_view_get_model (GTK_TREE_VIEW (qview));
if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
{
@ -1408,7 +1405,6 @@ gnc_get_reconcile_info (Account *account,
gboolean always_today;
GDate date;
time64 today;
struct tm tm;
g_date_clear(&date, 1);

View File

@ -245,8 +245,15 @@ gnc_html_webkit_dispose( GObject* obj )
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_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;
}

View File

@ -173,7 +173,6 @@ gnc_plugin_csv_export_register_cmd (GtkAction *action,
GncMainWindowActionData *data)
{
Query *query;
GList *splits;
Account *acc;
GncPluginPage *page = gnc_main_window_get_current_page (data->window);

View File

@ -39,8 +39,10 @@
#define IMPORT_FULL_PATH "FullPath"
#define IMPORT_ACCOUNT "Account"
#define UNUSED_VAR __attribute__ ((unused))
/* 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

View File

@ -93,7 +93,7 @@ gnumeric_create_popup_menu_list (GSList *elements,
GdkEventButton *event)
{
GtkWidget *menu = gtk_menu_new ();
GtkWidget *item, *label;
GtkWidget *item;
for (; elements != NULL ; elements = elements->next)
{

View File

@ -239,7 +239,7 @@ Account * gnc_import_select_account(GtkWidget *parent,
Account * retval = NULL;
const gchar *retval_name = NULL;
GtkBuilder *builder;
GtkWidget * online_id_label, *button, *box, *pbox;
GtkWidget * online_id_label, *box, *pbox;
gchar account_description_text[ACCOUNT_DESCRIPTION_MAX_SIZE] = "";
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"));
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");

View File

@ -59,9 +59,6 @@ struct _main_matcher_info
GtkWidget *assistant;
GtkTreeView *view;
GNCImportSettings *user_settings;
GdkRGBA color_back_red;
GdkRGBA color_back_green;
GdkRGBA color_back_yellow;
int selected_row;
GNCTransactionProcessedCB transaction_processed_cb;
gpointer user_data;
@ -203,23 +200,6 @@ on_matcher_help_close_clicked (GtkButton *button, gpointer user_data)
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
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");
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"));
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"));
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"));
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 (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)
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"));
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)
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;
GtkTreeIter iter;
GNCImportMatchInfo *selected_match;
GncGUID *pending_match_guid;
gboolean match_selected_manually;
g_assert (gui);
g_assert (trans);

View File

@ -452,7 +452,6 @@ static void
init_match_picker_gui(GNCImportMatchPicker * matcher)
{
GtkBuilder *builder;
gboolean show_reconciled;
/* DEBUG("Begin..."); */

View File

@ -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 *result = NULL;
GncGUID *income_guid= NULL;
g_assert(investment_account);
qof_instance_get (QOF_INSTANCE (investment_account),

View File

@ -332,7 +332,6 @@ qif_account_picker_dialog(QIFImportWindow * qif_wind, SCM map_entry)
SCM orig_acct = scm_call_1(gnc_name, map_entry);
int response;
GtkBuilder *builder;
GtkWidget *button;
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),
wind);
button = GTK_WIDGET(gtk_builder_get_object (builder, "newbutton"));
/* this is to get the checkmarks set up right.. it will get called
* again after the window is mapped. */
build_acct_tree(wind, wind->qif_wind);

View File

@ -75,7 +75,10 @@ void gnc_import_gui_type_cb (GtkWidget *widget, gpointer data);
// utils
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 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 *
gnc_plugin_bi_import_showGUI(void)

View File

@ -528,7 +528,6 @@ gnc_bi_import_create_bis (GtkListStore * store, QofBook * book,
gchar *new_id = NULL;
gint64 denom = 0;
gnc_commodity *currency;
Transaction * txn;
// these arguments are needed
g_return_if_fail (store && book);

View File

@ -519,6 +519,8 @@ gnc_ledger_display2_parent (void *user_data)
return gnc_ledger_display2_get_parent( ld );
}
#ifdef skip
//FIXME Not used ?
static void
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);
}
}
#endif
static void
refresh_handler (GHashTable *changes, gpointer user_data)
@ -702,7 +705,7 @@ gnc_ledger_display2_internal (Account *lead_account, Query *q,
GNCLedgerDisplay2 *ld;
gint limit;
const char *klass;
GList *splits;
// GList *splits;
gboolean display_subaccounts = FALSE;
gboolean is_gl = FALSE;

View File

@ -148,7 +148,6 @@ gnc_split_register_save_tnum_cell (BasicCell * cell,
gpointer user_data)
{
SRSaveData *sd = save_data;
SplitRegister *reg = user_data;
const char *value;
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;
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) ||
gnc_basic_cell_has_name (cell, FCRED_CELL));

View File

@ -603,7 +603,6 @@ gnc_split_register_get_fg_color_internal (VirtualLocation virt_loc,
const guint32 red_color = color_table[COLOR_NEGATIVE];
guint32 fg_color;
const char * cell_name;
gboolean is_current;
gnc_numeric value;
Split *split;
@ -801,6 +800,8 @@ gnc_split_register_get_associate_entry (VirtualLocation virt_loc,
return s;
}
#if 0
// this code is not used yet
static char
gnc_split_register_get_associate_value (SplitRegister *reg,
VirtualLocation virt_loc)
@ -813,6 +814,7 @@ gnc_split_register_get_associate_value (SplitRegister *reg,
return gnc_recn_cell_get_flag (cell);
}
#endif
static const char *
gnc_split_register_get_type_entry (VirtualLocation virt_loc,

View File

@ -407,7 +407,6 @@ static void
gnucash_register_configure (GnucashSheet *sheet, gchar * state_section)
{
GNCHeaderWidths widths;
GnucashRegister *greg;
Table *table;
GList *node;
gchar *key;
@ -557,11 +556,11 @@ GtkWidget *
gnucash_register_new (Table *table, gchar *state_section)
{
GnucashRegister *reg;
GtkWidget *header;
// GtkWidget *header;
GtkWidget *widget;
GtkWidget *sheet;
GtkWidget *scrollbar;
GtkWidget *box;
// GtkWidget *sheet;
// GtkWidget *scrollbar;
// GtkWidget *box;
widget = gnucash_register_create_widget(table);
reg = GNUCASH_REGISTER(widget);

View File

@ -403,7 +403,7 @@ gnucash_sheet_compute_visible_range (GnucashSheet *sheet)
gint height;
gint cy;
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 (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);
old_visible_blocks = sheet->num_visible_blocks;
old_visible_rows = sheet->num_visible_phys_rows;
// old_visible_blocks = sheet->num_visible_blocks;
// old_visible_rows = sheet->num_visible_phys_rows;
sheet->num_visible_blocks = 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);
GtkStyleContext *context = gtk_widget_get_style_context (widget);
GtkAllocation alloc;
gboolean result;
gboolean result; //FIXME
gtk_widget_get_allocation(widget, &alloc);
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);
gnucash_sheet_draw_cursor (sheet->cursor, cr);
@ -1309,7 +1310,7 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
{
GnucashSheet *sheet;
VirtualCell *vcell;
gboolean changed_cells;
gboolean changed_cells; //FIXME
VirtualLocation cur_virt_loc;
VirtualLocation new_virt_loc;
@ -1399,7 +1400,7 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
if (abort_move)
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);
if (button_1)
@ -1434,10 +1435,8 @@ gnucash_sheet_clipboard_event (GnucashSheet *sheet, GdkEventKey *event)
{
GncItemEdit *item_edit;
gboolean handled = FALSE;
guint32 time;
item_edit = GNC_ITEM_EDIT(sheet->item_editor);
time = event->time;
switch (event->keyval)
{
@ -1488,7 +1487,7 @@ gnucash_sheet_direct_event(GnucashSheet *sheet, GdkEvent *event)
GtkEditable *editable;
Table *table = sheet->table;
VirtualLocation virt_loc;
gboolean changed;
// gboolean changed;
gboolean result;
char *new_text = NULL;
@ -1519,7 +1518,7 @@ gnucash_sheet_direct_event(GnucashSheet *sheet, GdkEvent *event)
&new_start, &new_end,
event);
changed = FALSE;
// changed = FALSE;
if (new_text != NULL)
{
@ -1535,19 +1534,19 @@ gnucash_sheet_direct_event(GnucashSheet *sheet, GdkEvent *event)
g_signal_handler_unblock (G_OBJECT (sheet->entry),
sheet->insert_signal);
changed = TRUE;
// changed = TRUE;
}
if (new_position != cursor_position)
{
gtk_editable_set_position (editable, new_position);
changed = TRUE;
// changed = TRUE;
}
if ((new_start != start_sel) || (new_end != end_sel))
{
gtk_editable_select_region(editable, new_start, new_end);
changed = TRUE;
// changed = TRUE;
}
return result;
@ -2147,14 +2146,14 @@ void
gnucash_sheet_set_scroll_region (GnucashSheet *sheet)
{
guint new_h, new_w;
GtkWidget *widget;
// GtkWidget *widget;
GtkAllocation alloc;
guint old_h, old_w;
if (!sheet)
return;
widget = GTK_WIDGET(sheet);
// widget = GTK_WIDGET(sheet);
if (!sheet->header_item || !GNC_HEADER(sheet->header_item)->style)
return;

View File

@ -59,8 +59,10 @@
/** Static Globals *****************************************************/
#define UNUSED_VAR __attribute__ ((unused))
/* 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 *****************************************************/

View File

@ -198,8 +198,6 @@ set_reports_view_and_model(CustomReportDialog *crd)
{
GtkCellRenderer *renderer;
GtkTreeModel *model;
GtkTreeViewColumn * col;
gint colnum;
crd->namerenderer = gtk_cell_renderer_text_new();
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();
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,
NULL);
crd->delcol = gtk_tree_view_get_column (GTK_TREE_VIEW (crd->reportview), VIEW_COL_DELETE);

View File

@ -658,7 +658,6 @@ gnc_plugin_page_report_option_change_cb(gpointer data)
SCM dirty_report = scm_c_eval_string("gnc:report-set-dirty?!");
const gchar *old_name;
gchar *new_name;
gchar *new_name_escaped;
g_return_if_fail(GNC_IS_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");
rpt_id = scm_call_1(save_func, priv->cur_report);
(void)rpt_id;
}
else
{
@ -1659,12 +1659,6 @@ gnc_plugin_page_report_export_cb( GtkAction *action, GncPluginPageReport *report
return;
}
static void
error_handler(const char *str)
{
PWARN("Report Error: %s", str);
}
static void
gnc_plugin_page_report_options_cb( GtkAction *action, GncPluginPageReport *report )
{

View File

@ -153,7 +153,6 @@ error_handler(const char *str)
gboolean
gnc_run_report (gint report_id, char ** data)
{
gchar *free_data;
SCM scm_text;
gchar *str;