Code clean up, remove some static defines and redundant code

This commit is contained in:
Robert Fewell 2017-07-23 12:16:42 +01:00 committed by John Ralls
parent fbd9a36415
commit 64a4e6b1bc
6 changed files with 1 additions and 48 deletions

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)

View File

@ -1555,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;

View File

@ -878,10 +878,6 @@ gnc_prefs_connect_radio_button (GtkRadioButton *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);
@ -906,10 +902,6 @@ gnc_prefs_connect_check_button (GtkCheckButton *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,10 +926,6 @@ gnc_prefs_connect_spin_button (GtkSpinButton *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);
@ -961,10 +949,6 @@ gnc_prefs_connect_combo_box (GtkComboBox *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);
@ -1013,11 +997,6 @@ gnc_prefs_connect_entry (GtkEntry *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);

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);

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

@ -1591,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
{
@ -1658,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 )
{