r18022 - gnucash/trunk/src/register/register-gnome - Register: Add some gnome-related debugging messages.
Charles Day
cedayiv at code.gnucash.org
Mon Apr 6 12:21:02 EDT 2009
Author: cedayiv
Date: 2009-04-06 12:21:02 -0400 (Mon, 06 Apr 2009)
New Revision: 18022
Trac: http://svn.gnucash.org/trac/changeset/18022
Modified:
gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
gnucash/trunk/src/register/register-gnome/gnucash-style.c
gnucash/trunk/src/register/register-gnome/table-gnome.c
Log:
Register: Add some gnome-related debugging messages.
Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2009-04-06 16:13:21 UTC (rev 18021)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.c 2009-04-06 16:21:02 UTC (rev 18022)
@@ -40,6 +40,7 @@
#include "gnucash-style.h"
#include "gnucash-header.h"
#include "gnucash-item-edit.h"
+#include "gnc-engine.h" // For debugging, e.g. ENTER(), LEAVE()
#define DEFAULT_REGISTER_HEIGHT 400
#define DEFAULT_REGISTER_WIDTH 400
@@ -51,8 +52,28 @@
/* jsled: and 2.9.{0,1}, as per http://bugzilla.gnome.org/show_bug.cgi?id=342182 */
#define GTK_ALLOWED_SELECTION_WITHIN_INSERT_SIGNAL (GTK_MINOR_VERSION < 4)
+/* Register signals */
+enum
+{
+ ACTIVATE_CURSOR,
+ REDRAW_ALL,
+ REDRAW_HELP,
+ LAST_SIGNAL
+};
+
+
+/** Static Globals *****************************************************/
+
+/* This static indicates the debugging module that this .o belongs to. */
+static QofLogModule log_module = GNC_MOD_REGISTER;
static guint gnucash_register_initial_rows = 15;
+static GnomeCanvasClass *sheet_parent_class;
+static GtkTableClass *register_parent_class;
+static guint register_signals[LAST_SIGNAL];
+
+/** Prototypes *********************************************************/
+
static void gnucash_sheet_start_editing_at_cursor (GnucashSheet *sheet);
static gboolean gnucash_sheet_cursor_move (GnucashSheet *sheet,
@@ -64,20 +85,8 @@
static void gnucash_sheet_stop_editing (GnucashSheet *sheet);
-/* Register signals */
-enum
-{
- ACTIVATE_CURSOR,
- REDRAW_ALL,
- REDRAW_HELP,
- LAST_SIGNAL
-};
+/** Implementation *****************************************************/
-static GnomeCanvasClass *sheet_parent_class;
-static GtkTableClass *register_parent_class;
-static guint register_signals[LAST_SIGNAL];
-
-
void
gnucash_register_set_initial_rows (guint num_rows)
{
@@ -674,6 +683,8 @@
GnucashSheet *sheet;
GnomeCanvas *canvas;
+ ENTER("table=%p", table);
+
sheet = g_object_new (GNUCASH_TYPE_SHEET, NULL);
canvas = GNOME_CANVAS (sheet);
@@ -688,6 +699,7 @@
g_signal_connect (G_OBJECT (sheet->hadj), "changed",
G_CALLBACK (gnucash_sheet_hadjustment_changed), sheet);
+ LEAVE("%p", sheet);
return sheet;
}
@@ -1071,13 +1083,18 @@
{
GnucashSheet *sheet = GNUCASH_SHEET(widget);
+ ENTER("widget=%p, allocation=%p", widget, allocation);
+
if (GTK_WIDGET_CLASS(sheet_parent_class)->size_allocate)
(*GTK_WIDGET_CLASS (sheet_parent_class)->size_allocate)
(widget, allocation);
if (allocation->height == sheet->window_height &&
allocation->width == sheet->window_width)
+ {
+ LEAVE("size unchanged");
return;
+ }
if (allocation->width != sheet->window_width)
gnucash_sheet_styles_set_dimensions (sheet, allocation->width);
@@ -1091,6 +1108,7 @@
gnc_item_edit_configure (GNC_ITEM_EDIT(sheet->item_editor));
gnucash_sheet_update_adjustments (sheet);
+ LEAVE(" ");
}
static gboolean
Modified: gnucash/trunk/src/register/register-gnome/gnucash-style.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-style.c 2009-04-06 16:13:21 UTC (rev 18021)
+++ gnucash/trunk/src/register/register-gnome/gnucash-style.c 2009-04-06 16:21:02 UTC (rev 18022)
@@ -31,13 +31,21 @@
#include "gnucash-item-edit.h"
#include "gnucash-style.h"
#include "gnc-gconf-utils.h"
-#include "gnc-engine.h"
+#include "gnc-engine.h" // For debugging, e.g. ENTER(), LEAVE()
/** GLOBALS *********************************************************/
/* This static indicates the debugging module that this .o belongs to. */
#define DEFAULT_STYLE_WIDTH 680
+/** Static Globals *****************************************************/
+
+/* This static indicates the debugging module that this .o belongs to. */
+static QofLogModule log_module = GNC_MOD_REGISTER;
+
+
+/** Implementation *****************************************************/
+
static gpointer
style_get_key (SheetBlockStyle *style)
{
@@ -674,7 +682,11 @@
g_return_if_fail (sheet != NULL);
g_return_if_fail (GNUCASH_IS_SHEET (sheet));
+ ENTER("sheet=%p", sheet);
+
gnucash_sheet_styles_set_dimensions (sheet, DEFAULT_STYLE_WIDTH);
+
+ LEAVE(" ");
}
void
Modified: gnucash/trunk/src/register/register-gnome/table-gnome.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/table-gnome.c 2009-04-06 16:13:21 UTC (rev 18021)
+++ gnucash/trunk/src/register/register-gnome/table-gnome.c 2009-04-06 16:21:02 UTC (rev 18022)
@@ -51,9 +51,19 @@
#include "table-gnome.h"
#include "guile-mappings.h"
#include "gnc-gconf-utils.h"
+#include "gnc-engine.h"
#define GCONF_SECTION "window/pages/register"
+
+/** Static Globals *****************************************************/
+
+/* This static indicates the debugging module that this .o belongs to. */
+static QofLogModule log_module = GNC_MOD_REGISTER;
+
+
+/** Implementation *****************************************************/
+
void
gnc_table_save_state (Table *table)
{
@@ -151,6 +161,8 @@
g_return_if_fail (GNUCASH_IS_REGISTER (widget));
g_return_if_fail (data != NULL);
+ ENTER("widget=%p, data=%p", widget, data);
+
greg = GNUCASH_REGISTER (widget);
sheet = GNUCASH_SHEET (greg->sheet);
table = sheet->table;
@@ -193,6 +205,8 @@
gnucash_sheet_redraw_all (sheet);
gnc_header_widths_destroy (widths);
+
+ LEAVE(" ");
}
void
More information about the gnucash-changes
mailing list