diff --git a/src/register/register-gnome/combocell-gnome.c b/src/register/register-gnome/combocell-gnome.c index ebd3e3bae3..181676c802 100644 --- a/src/register/register-gnome/combocell-gnome.c +++ b/src/register/register-gnome/combocell-gnome.c @@ -38,7 +38,6 @@ #include "QuickFill.h" #include "combocell.h" -#include "gnc-engine-util.h" #include "gnc-ui-util.h" #include "gnucash-item-edit.h" #include "gnucash-item-list.h" @@ -87,8 +86,6 @@ static gboolean gnc_combo_cell_enter (BasicCell *bcell, static void gnc_combo_cell_leave (BasicCell *bcell); static void gnc_combo_cell_destroy (BasicCell *bcell); -/* This static indicates the debugging module that this .o belongs to. */ -static short module = MOD_GTK_REG; static gboolean auto_pop_combos = FALSE; @@ -284,8 +281,6 @@ gnc_combo_cell_gui_destroy (BasicCell *bcell) cell->cell.leave_cell = NULL; cell->cell.gui_destroy = NULL; } - - DEBUG("combo destroyed\n"); } static void @@ -423,7 +418,8 @@ gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr) block_list_signals (cell); gnc_item_list_append (box->item_list, menustr); - if (safe_strcmp (menustr, cell->cell.value) == 0) + if (cell->cell.value && + (strcmp (menustr, cell->cell.value) == 0)) gnc_item_list_select (box->item_list, menustr); unblock_list_signals (cell); @@ -688,7 +684,10 @@ ComboHelpValue (BasicCell *bcell) for (node = box->ignore_strings; node; node = node->next, help_node = help_node->next) { - if (safe_strcmp (bcell->value, node->data) != 0) + if (!node->data) + continue; + + if (strcmp (bcell->value, node->data) != 0) continue; if (help_node->data != NULL) @@ -797,17 +796,18 @@ popup_get_width (GnomeCanvasItem *item, static gboolean gnc_combo_cell_enter (BasicCell *bcell, - int *cursor_position, - int *start_selection, - int *end_selection) + int *cursor_position, + int *start_selection, + int *end_selection) { ComboCell *cell = (ComboCell *) bcell; PopBox *box = bcell->gui_private; - GList *find; + GList *find = NULL; - find = g_list_find_custom (box->ignore_strings, - bcell->value, - (GCompareFunc) safe_strcmp); + if (bcell->value) + find = g_list_find_custom (box->ignore_strings, + bcell->value, + (GCompareFunc) strcmp); if (find) return FALSE; @@ -847,17 +847,19 @@ gnc_combo_cell_leave (BasicCell *bcell) if (box->strict) { - GList *find; + GList *find = NULL; - find = g_list_find_custom (box->menustrings, - bcell->value, - (GCompareFunc) safe_strcmp); + if (bcell->value) + find = g_list_find_custom (box->menustrings, + bcell->value, + (GCompareFunc) strcmp); if (find) return; - find = g_list_find_custom (box->ignore_strings, - bcell->value, - (GCompareFunc) safe_strcmp); + if (bcell->value) + find = g_list_find_custom (box->ignore_strings, + bcell->value, + (GCompareFunc) strcmp); if (find) return; @@ -901,6 +903,9 @@ gnc_combo_cell_add_ignore_string (ComboCell *cell, if (cell == NULL) return; + if (!ignore_string) + return; + box = cell->cell.gui_private; box->ignore_strings = g_list_prepend (box->ignore_strings, diff --git a/src/register/register-gnome/datecell-gnome.c b/src/register/register-gnome/datecell-gnome.c index f56845b60e..925abaa6bb 100644 --- a/src/register/register-gnome/datecell-gnome.c +++ b/src/register/register-gnome/datecell-gnome.c @@ -40,7 +40,6 @@ #include #include "datecell.h" -#include "gnc-engine-util.h" #include "gnc-ui-util.h" #include "gnucash-date-picker.h" #include "gnucash-item-edit.h" @@ -90,11 +89,6 @@ static gboolean gnc_date_cell_enter (BasicCell *bcell, int *end_selection); static void gnc_date_cell_leave (BasicCell *bcell); -/* This static indicates the debugging module that this .o belongs to. */ -static short module = MOD_GTK_REG; - - -/* ================================================ */ static void gnc_parse_date (struct tm *parsed, const char * datestr) @@ -368,8 +362,6 @@ gnc_date_cell_gui_destroy (BasicCell *bcell) cell->cell.leave_cell = NULL; cell->cell.gui_destroy = NULL; } - - DEBUG ("date destroyed\n"); } static void diff --git a/src/register/register-gnome/gncmod-register-gnome.c b/src/register/register-gnome/gncmod-register-gnome.c index 5990e442d7..2a09537634 100644 --- a/src/register/register-gnome/gncmod-register-gnome.c +++ b/src/register/register-gnome/gncmod-register-gnome.c @@ -32,14 +32,9 @@ int gnc_module_init(int refcount) { if(refcount == 0) { - if(!gnc_module_load("gnucash/engine", 0)) { - return FALSE; - } if(!gnc_module_load("gnucash/register/register-core", 0)) { return FALSE; } } return TRUE; } - - diff --git a/src/register/register-gnome/gnucash-sheet.c b/src/register/register-gnome/gnucash-sheet.c index 6e1cae6f25..81fe677080 100644 --- a/src/register/register-gnome/gnucash-sheet.c +++ b/src/register/register-gnome/gnucash-sheet.c @@ -38,15 +38,11 @@ #include "gnucash-style.h" #include "gnucash-header.h" #include "gnucash-item-edit.h" -#include "gnc-engine-util.h" #define DEFAULT_REGISTER_HEIGHT 400 #define DEFAULT_REGISTER_WIDTH 630 -/* This static indicates the debugging module that this .o belongs to. */ -static short module = MOD_GTK_REG; - static guint gnucash_register_initial_rows = 15; static void gnucash_sheet_start_editing_at_cursor (GnucashSheet *sheet); @@ -717,7 +713,7 @@ gnucash_sheet_modify_current_cell(GnucashSheet *sheet, const gchar *new_text) new_text_len = gnc_mbstowcs (&new_text_wc, new_text); if (new_text_len < 0) { - PERR ("bad text: %s", new_text ? new_text : "(null)"); + g_warning ("bad text: %s", new_text ? new_text : "(null)"); return NULL; } @@ -814,7 +810,7 @@ gnucash_sheet_insert_cb (GtkWidget *widget, if (change_text_len < 0) { - PERR ("bad change text conversion"); + g_warning ("bad change text conversion"); g_free (change_text_w); return; } @@ -826,7 +822,7 @@ gnucash_sheet_insert_cb (GtkWidget *widget, old_text_len = gnc_mbstowcs (&old_text_w, old_text); if (old_text_len < 0) { - PERR ("bad old text conversion"); + g_warning ("bad old text conversion"); g_free (change_text_w); return; } @@ -865,7 +861,7 @@ gnucash_sheet_insert_cb (GtkWidget *widget, &sheet->input_cancelled); if (retval && - ((safe_strcmp (retval, new_text) != 0) || + ((strcmp (retval, new_text) != 0) || (*position != old_position))) { gtk_signal_handler_block (GTK_OBJECT (sheet->entry), @@ -973,7 +969,7 @@ gnucash_sheet_delete_cb (GtkWidget *widget, &start_sel, &end_sel, &sheet->input_cancelled); - if (retval && (safe_strcmp (retval, new_text) != 0)) + if (retval && (strcmp (retval, new_text) != 0)) { gtk_signal_handler_block (GTK_OBJECT (sheet->entry), sheet->insert_signal);