r272 - trunk/src/target/OM-2007/openmoko-libs/libmokoui

mickey at gta01.hmw-consulting.de mickey at gta01.hmw-consulting.de
Wed Nov 29 16:50:36 CET 2006


Author: mickey
Date: 2006-11-29 15:50:34 +0000 (Wed, 29 Nov 2006)
New Revision: 272

Modified:
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-menu-box.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.h
   trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-window.c
Log:
mokoui: silence debug output


Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -14,11 +14,18 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-alignment.h"
 
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#else
+#define moko_debug(fmt,...)
+#endif
+
 G_DEFINE_TYPE (MokoAlignment, moko_alignment, GTK_TYPE_ALIGNMENT)
 
 #define MOKO_ALIGNMENT_PRIVATE(o)     (G_TYPE_INSTANCE_GET_PRIVATE ((o), MOKO_TYPE_ALIGNMENT, MokoAlignmentPrivate))
@@ -85,10 +92,10 @@
 
 static void moko_alignment_size_request(GtkWidget* widget, GtkRequisition* requisition)
 {
-    g_debug( "moko_alignment_size_request" );
+    moko_debug( "moko_alignment_size_request" );
     GtkBorder* padding = NULL;
 
-    gtk_widget_style_get(GTK_WIDGET (widget),
+    gtk_widget_style_get(widget,
                          "padding", &padding,
                          NULL);
 
@@ -124,7 +131,7 @@
 static void
 moko_alignment_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
 {
-    g_debug( "moko_alignment_size_allocate" );
+    moko_debug( "moko_alignment_size_allocate" );
     GtkAlignment *alignment;
     GtkBin *bin;
     GtkAllocation child_allocation;
@@ -203,7 +210,7 @@
 static void
 moko_alignment_realize(GtkWidget* widget)
 {
-    g_debug( "moko_alignment_realize" );
+    moko_debug( "moko_alignment_realize" );
 
     GdkWindowAttr attributes;
     gint attributes_mask;

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-alignment.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_ALIGNMENT_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-finger-tool-box.h"

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-tool-box.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_FINGER_TOOL_BOX_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-application.h"

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-wheel.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_FINGER_WHEEL_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-finger-window.h"

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-finger-window.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_FINGER_WINDOW_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -14,13 +14,20 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-fixed.h"
 
-G_DEFINE_TYPE (MokoFixed, moko_fixed, GTK_TYPE_FIXED);
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#else
+#define moko_debug(fmt,...)
+#endif
 
+G_DEFINE_TYPE (MokoFixed, moko_fixed, GTK_TYPE_FIXED)
+
 #define PIXMAP_CONTAINER_PRIVATE(o)   (G_TYPE_INSTANCE_GET_PRIVATE ((o), MOKO_TYPE_FIXED, MokoFixedPrivate))
 
 typedef struct _MokoFixedPrivate MokoFixedPrivate;
@@ -32,12 +39,9 @@
 static GtkFixedClass *parent_class = NULL;
 
 /* declare virtual methods */
-static void
-moko_fixed_realize(GtkWidget *widget);
-static void
-moko_fixed_size_request(GtkWidget *widget, GtkRequisition *requisition);
-static void
-moko_fixed_size_allocate(GtkWidget *widget, GtkAllocation *allocation);
+static void moko_fixed_realize(GtkWidget *widget);
+static void moko_fixed_size_request(GtkWidget *widget, GtkRequisition *requisition);
+static void moko_fixed_size_allocate(GtkWidget *widget, GtkAllocation *allocation);
 
 static void
 moko_fixed_dispose (GObject *object)
@@ -86,8 +90,8 @@
 static void
 moko_fixed_init(MokoFixed *self)
 {
-    g_debug( "moko_fixed_init" );
-    gtk_fixed_set_has_window( self, TRUE );
+    moko_debug( "moko_fixed_init" );
+    gtk_fixed_set_has_window( GTK_FIXED(self), TRUE );
 }
 
 GtkWidget*
@@ -99,7 +103,7 @@
 static void
 moko_fixed_realize(GtkWidget *widget)
 {
-    g_debug( "moko_fixed_realize" );
+    moko_debug( "moko_fixed_realize" );
 
     GdkWindowAttr attributes;
     gint attributes_mask;
@@ -135,7 +139,7 @@
 static void
 moko_fixed_size_request(GtkWidget *widget, GtkRequisition *requisition)
 {
-    g_debug( "moko_fixed_size_request" );
+    moko_debug( "moko_fixed_size_request" );
 
     GtkBorder* size_request;
     GtkBorder* cargo_border;
@@ -161,7 +165,7 @@
         if ( cargo_border && cargo_border->left + cargo_border->right + cargo_border->top + cargo_border->bottom
              && child->x == -1 && child->y == -1 )
         {
-            g_warning( "moko_fixed_set_cargo: style requested cargo = '%d, %d x %d, %d'", size_request->left, size_request->top, size_request->right, size_request->bottom );
+            moko_debug( "moko_fixed_set_cargo: style requested cargo = '%d, %d x %d, %d'", size_request->left, size_request->top, size_request->right, size_request->bottom );
             gtk_widget_set_size_request( child->widget, cargo_border->right - cargo_border->left, cargo_border->bottom - cargo_border->top );
             child->x = cargo_border->left;
             child->y = cargo_border->top;
@@ -185,7 +189,7 @@
 
     if ( size_request && size_request->left + size_request->right + size_request->top + size_request->bottom )
     {
-        g_warning( "moko_fixed_size_request: style requested size = '%d x %d'", size_request->right, size_request->bottom );
+        moko_debug( "moko_fixed_size_request: style requested size = '%d x %d'", size_request->right, size_request->bottom );
         requisition->height = MAX( requisition->height, size_request->bottom );
         requisition->width = MAX( requisition->height, size_request->right );
     }
@@ -194,7 +198,7 @@
 static void
 moko_fixed_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
 {
-    g_debug( "moko_fixed_size_allocate" );
+    moko_debug( "moko_fixed_size_allocate" );
     GtkFixed *fixed;
     GtkFixedChild *child;
     GtkAllocation child_allocation;
@@ -206,7 +210,7 @@
 
     widget->allocation = *allocation;
 
-    g_debug( "widget allocation is: %d %d, %d %d", allocation->x,
+    moko_debug( "widget allocation is: %d %d, %d %d", allocation->x,
                                     allocation->y,
                                     allocation->width,
                                     allocation->height);

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-fixed.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -14,7 +14,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_FIXED_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-menu-box.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-menu-box.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-menu-box.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -22,7 +22,12 @@
 #include <gtk/gtkmenubar.h>
 #include <gtk/gtkmenuitem.h>
 
-#include <string.h>
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#else
+#define moko_debug(fmt,...)
+#endif
 
 #define MOKO_MENU_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOKO_TYPE_MENU_BOX, MokoMenuBoxPriv));
 
@@ -66,7 +71,7 @@
 
 static void moko_menu_box_init (MokoMenuBox *self) /* Instance Construction */
 {
-    g_debug( "moko_menu_box_init" );
+    moko_debug( "moko_menu_box_init" );
     MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
 
     priv->menubar_l = NULL;
@@ -88,14 +93,14 @@
 {
     MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE( MOKO_MENU_BOX(widget->parent) );
 
-    g_debug( "menu open forwarder: clicked on %f, %f", event->x, event->y );
-    g_debug( "menu open forwarder: clicked on window %p, whereas our window is %p", event->window, widget->window );
+    moko_debug( "menu open forwarder: clicked on %f, %f", event->x, event->y );
+    moko_debug( "menu open forwarder: clicked on window %p, whereas our window is %p", event->window, widget->window );
 
     if ( event->window != widget->window ) return FALSE;
 
     if ( !GTK_WIDGET_VISIBLE(menu) )
     {
-        g_debug( "menu open forwarder: not yet open -- popping up" );
+        moko_debug( "menu open forwarder: not yet open -- popping up" );
         /* this is kind of funny, if you don't add the grab manually,
            then Gtk+ won't recognize the next click (selection) */
         gtk_grab_add(GTK_WIDGET(widget) );
@@ -104,11 +109,11 @@
     }
     else
     {
-        g_debug( "menu open forwarder: already open -- ignoring" );
+        moko_debug( "menu open forwarder: already open -- ignoring" );
         gtk_menu_popdown( menu );
         return FALSE;
     }
-    g_debug( "menu open forwarder: out of bounds" );
+    moko_debug( "menu open forwarder: out of bounds" );
     return FALSE;
 }
 
@@ -123,14 +128,14 @@
         GtkWidget *child = GTK_BIN(item)->child;
         g_assert( GTK_IS_LABEL(child) );
         gtk_label_get(GTK_LABEL (child), &text);
-        g_debug(" selection done. menu item text: %s", text );
+        moko_debug(" selection done. menu item text: %s", text );
     }
     if (GTK_BIN(priv->filteritem)->child)
     {
         GtkWidget *child = GTK_BIN(priv->filteritem)->child;
         g_assert( GTK_IS_LABEL(child) );
         gtk_label_set(GTK_LABEL (child), text);
-        g_debug(" selection done. menu label updated." );
+        moko_debug(" selection done. menu label updated." );
     }
 
     g_signal_emit( G_OBJECT(self), moko_menu_box_signals[FILTER_CHANGED], 0, text );
@@ -138,7 +143,7 @@
 
 void moko_menu_box_set_application_menu(MokoMenuBox* self, GtkMenu* menu)
 {
-    g_debug( "moko_menu_box_set_application_menu" );
+    moko_debug( "moko_menu_box_set_application_menu" );
 
     MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
     if (!priv->menubar_l )
@@ -161,7 +166,7 @@
 
 void moko_menu_box_set_filter_menu(MokoMenuBox* self, GtkMenu* menu)
 {
-    g_debug( "moko_menu_box_set_filter_menu" );
+    moko_debug( "moko_menu_box_set_filter_menu" );
 
     MokoMenuBoxPriv* priv = MOKO_MENU_BOX_GET_PRIVATE(self);
     if (!priv->menubar_r )
@@ -186,7 +191,7 @@
 moko_menu_box_set_active_filter(MokoMenuBox* self, gchar* text)
 {
     //FIXME this only works with text labels
-    g_debug( "moko_menu_box_set_active_filter" );
+    moko_debug( "moko_menu_box_set_active_filter" );
 
     // wander through all filter menu items, check their labels
     // if one is matching, then select it
@@ -207,10 +212,10 @@
         g_assert( GTK_IS_LABEL(label) );
         gchar* ltext;
         gtk_label_get( GTK_LABEL(label), &ltext );
-        g_debug( "moko_menu_box_set_active_filter: comparing '%s' with '%s'", ltext, text );
-        if ( strcmp( ltext, text ) == 0 )
+        moko_debug( "moko_menu_box_set_active_filter: comparing '%s' with '%s'", ltext, text );
+        if ( g_strcmp( ltext, text ) == 0 )
         {
-            g_debug( "moko_menu_box_set_active_filter: match found" );
+            moko_debug( "moko_menu_box_set_active_filter: match found" );
             //FIXME this is a bit hackish or is it?
             gtk_menu_set_active( GTK_MENU(priv->filtermenu), index );
             cb_filter_menu_update( priv->filtermenu, self ); //need to sync. manually, since we it didn't go through popupmenu

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-paned-window.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -23,6 +23,13 @@
 #include <gtk/gtkvbox.h>
 #include <gtk/gtkvpaned.h>
 
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#else
+#define moko_debug(fmt,...)
+#endif
+
 G_DEFINE_TYPE (MokoPanedWindow, moko_paned_window, MOKO_TYPE_WINDOW)
 
 #define MOKO_PANED_WINDOW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOKO_TYPE_PANED_WINDOW, MokoPanedWindowPriv));
@@ -66,7 +73,7 @@
 
 static void moko_paned_window_init (MokoPanedWindow *self) /* Instance Construction */
 {
-    g_debug( "moko_paned_window_init" );
+    moko_debug( "moko_paned_window_init" );
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
     priv->outerframe = gtk_vpaned_new();
     gtk_container_add( GTK_CONTAINER(self), GTK_WIDGET(priv->outerframe) );
@@ -85,7 +92,7 @@
 
 void moko_paned_window_clear(MokoPanedWindow *self) /* Destruction */
 {
-    g_debug( "moko_paned_window_clear" );
+    moko_debug( "moko_paned_window_clear" );
     /* destruct your widgets here */
 }
 
@@ -99,7 +106,7 @@
 
 void moko_paned_window_set_application_menu(MokoPanedWindow* self, GtkMenu* menu)
 {
-    g_debug( "moko_paned_window_set_application_menu" );
+    moko_debug( "moko_paned_window_set_application_menu" );
 
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
     if (!priv->menubox )
@@ -112,7 +119,7 @@
 
 void moko_paned_window_set_filter_menu(MokoPanedWindow* self, GtkMenu* menu)
 {
-    g_debug( "moko_paned_window_set_filter_menu" );
+    moko_debug( "moko_paned_window_set_filter_menu" );
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
     if (!priv->menubox )
     {
@@ -124,7 +131,7 @@
 
 void moko_paned_window_set_upper_pane(MokoPanedWindow* self, GtkWidget* child)
 {
-    g_debug( "moko_paned_window_set_upper_pane" );
+    moko_debug( "moko_paned_window_set_upper_pane" );
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
 
     priv->upperenclosing = moko_alignment_new();
@@ -137,7 +144,7 @@
 
 void moko_paned_window_set_lower_pane(MokoPanedWindow* self, GtkWidget* child)
 {
-    g_debug( "moko_paned_window_set_lower_pane" );
+    moko_debug( "moko_paned_window_set_lower_pane" );
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
 
 #if 0
@@ -154,7 +161,7 @@
 
 void moko_paned_window_add_toolbox(MokoPanedWindow* self, MokoToolBox* toolbox)
 {
-    g_debug( "moko_paned_window_add_toolbox" );
+    moko_debug( "moko_paned_window_add_toolbox" );
     MokoPanedWindowPriv* priv = MOKO_PANED_WINDOW_GET_PRIVATE(self);
     gtk_box_pack_end( GTK_BOX(priv->upper), toolbox, FALSE, FALSE, 0 );
     gtk_box_reorder_child( GTK_BOX(priv->upper), toolbox, 1 );

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-pixmap-button.h"
@@ -121,7 +121,7 @@
 {
     moko_debug( "moko_pixmap_button_init" );
     gtk_button_set_focus_on_click( GTK_BUTTON(self), FALSE ); //FIXME probably don't need this when focus is invisible
-    g_object_set_property( GTK_BUTTON(self), "can-focus", FALSE ); //FIXME probably don't need this when focus is invisible
+    g_object_set_property( G_OBJECT(self), "can-focus", FALSE ); //FIXME probably don't need this when focus is invisible
 
     g_signal_connect( G_OBJECT(self), "clicked", G_CALLBACK(cb_button_clicked), NULL );
 }
@@ -137,7 +137,7 @@
     gint focus_pad;
 
     //gtk_button_get_props (button, &default_border, NULL, NULL); //FIXME what are we going to do w/ default borders?
-    gtk_widget_style_get (GTK_WIDGET (widget),
+    gtk_widget_style_get (widget,
                           "focus-line-width", &focus_width,
                           "focus-padding", &focus_pad,
                           "size-request", &size_request, // modified

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-pixmap-button.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_PIXMAP_BUTTON_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -14,7 +14,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-search-bar.h"

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-search-bar.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -14,7 +14,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_SEARCH_BAR_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tool-box.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -22,6 +22,13 @@
 #include <gtk/gtkentry.h>
 #include <gtk/gtkvbox.h>
 
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#else
+#define moko_debug(fmt,...)
+#endif
+
 #define MOKO_TOOL_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MOKO_TYPE_TOOL_BOX, MokoToolBoxPriv));
 
 typedef struct _MokoToolBoxPriv
@@ -49,14 +56,14 @@
     MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
     static int current_page = 1;
     gtk_notebook_set_current_page( GTK_NOTEBOOK(self), current_page );
-    g_debug( "moko_tool_box_button_release: current_page is now: %d", current_page );
-    
+    moko_debug( "moko_tool_box_button_release: current_page is now: %d", current_page );
+
     if( current_page == 1 )
         gtk_widget_grab_focus( priv->entry );
-    
+
     current_page = 1 - current_page;
     g_signal_emit( G_OBJECT(self), current_page ? moko_tool_box_signals[SEARCHBOX_INVISIBLE] : moko_tool_box_signals[SEARCHBOX_VISIBLE], 0, NULL );
-    
+
 }
 
 
@@ -128,7 +135,7 @@
 
 static void moko_tool_box_init(MokoToolBox* self) /* Instance Construction */
 {
-    g_debug( "moko_tool_box_init" );
+    moko_debug( "moko_tool_box_init" );
     gtk_notebook_set_show_border( GTK_NOTEBOOK(self), FALSE );
     gtk_notebook_set_show_tabs( GTK_NOTEBOOK(self), FALSE );
 }
@@ -187,9 +194,9 @@
                       self);
     g_signal_connect ((gpointer) priv->entry, "focus_out_event",
                       G_CALLBACK (_entry_focus_out),
-                      self);    
-    
+                      self);
 
+
     return GTK_WIDGET(self);
 }
 
@@ -220,7 +227,7 @@
 
 MokoPixmapButton* moko_tool_box_add_action_button(MokoToolBox* self)
 {
-    g_debug( "moko_tool_box_add_action_button" );
+    moko_debug( "moko_tool_box_add_action_button" );
     MokoToolBoxPriv* priv = MOKO_TOOL_BOX_GET_PRIVATE(self);
 
     MokoPixmapButton* button = moko_pixmap_button_new();

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #include "moko-tree-view.h"

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.h
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.h	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-tree-view.h	2006-11-29 15:50:34 UTC (rev 272)
@@ -13,7 +13,7 @@
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU Public License for more details.
  *
- *  Current Version: $Rev$ ($Date: 2006/10/05 17:38:14 $) [$Author: mickey $]
+ *  Current Version: $Rev$ ($Date) [$Author: mickey $]
  */
 
 #ifndef _MOKO_TREE_VIEW_H_

Modified: trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-window.c
===================================================================
--- trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-window.c	2006-11-29 10:21:32 UTC (rev 271)
+++ trunk/src/target/OM-2007/openmoko-libs/libmokoui/moko-window.c	2006-11-29 15:50:34 UTC (rev 272)
@@ -20,6 +20,13 @@
 #include "moko-application.h"
 #include "moko-window.h"
 
+#undef DEBUG_THIS_FILE
+#ifdef DEBUG_THIS_FILE
+#define moko_debug(fmt,...) g_debug(fmt,##__VA_ARGS__)
+#else
+#define moko_debug(fmt,...)
+#endif
+
 /* add your signals here */
 enum {
     MOKO_WINDOW_SIGNAL,
@@ -47,7 +54,7 @@
 
 static void moko_window_init (MokoWindow *self) /* Instance Construction */
 {
-    g_debug( "moko_window_init" );
+    moko_debug( "moko_window_init" );
     gtk_widget_set_size_request( GTK_WIDGET(self), 480, 640 ); //FIXME get from style
     MokoApplication* app = moko_application_get_instance();
     g_assert( !moko_application_get_main_window( app ) ); // fail if someone creates more than one MokoWindow per application





More information about the commitlog mailing list