[gnome-games] libgames-support: Remove games-debug.c



commit bcb1896d47df66613fc71cded798f1baa9fba590
Author: Robert Ancell <robert ancell canonical com>
Date:   Sun Jan 1 12:49:12 2012 +1100

    libgames-support: Remove games-debug.c

 libgames-support/Makefile.am      |    2 -
 libgames-support/games-conf.c     |   41 -----------------
 libgames-support/games-debug.c    |   54 ----------------------
 libgames-support/games-debug.h    |   91 -------------------------------------
 libgames-support/games-runtime.c  |    6 ---
 libgames-support/games-settings.c |   33 -------------
 quadrapassel/src/blocks-cache.cpp |   14 ------
 7 files changed, 0 insertions(+), 241 deletions(-)
---
diff --git a/libgames-support/Makefile.am b/libgames-support/Makefile.am
index 6502177..5443127 100644
--- a/libgames-support/Makefile.am
+++ b/libgames-support/Makefile.am
@@ -13,8 +13,6 @@ BUILT_SOURCES = \
 libgames_support_la_SOURCES =		\
 	games-conf.c			\
 	games-conf.h			\
-	games-debug.c			\
-	games-debug.h			\
 	games-help.c			\
 	games-help.h			\
 	games-runtime.c			\
diff --git a/libgames-support/games-conf.c b/libgames-support/games-conf.c
index 717ef71..b006916 100644
--- a/libgames-support/games-conf.c
+++ b/libgames-support/games-conf.c
@@ -29,7 +29,6 @@
 #define ACCELMAP_EXT "accels"
 #endif
 
-#include "games-debug.h"
 #include "games-marshal.h"
 
 #include "games-conf.h"
@@ -111,11 +110,6 @@ window_state_timeout_cb (WindowState *state)
   games_conf_set_integer (state->group, window_state_key_name[STATE_KEY_WIDTH], state->width);
   games_conf_set_integer (state->group, window_state_key_name[STATE_KEY_HEIGHT], state->height);
 
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "[window %p] timeout: persisting width:%d height:%d\n",
-                      state->window,
-                      state->width, state->height);
-
   state->timeout_id = 0;
   return FALSE;
 }
@@ -140,23 +134,11 @@ window_configure_event_cb (GtkWidget *widget,
                            GdkEventConfigure *event,
                            WindowState *state)
 {
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "[window %p] configure event current %dx%d new %dx%d [state: is-maximised:%s is-fullscreen:%s]\n",
-                      state->window,
-                      state->width, state->height,
-                      event->width, event->height,
-                      state->is_maximised ? "t" : "f",
-                      state->is_fullscreen ? "t" : "f");
-
   if (!state->is_maximised && !state->is_fullscreen &&
       (state->width != event->width || state->height != event->height)) {
     state->width = event->width;
     state->height = event->height;
 
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "[window %p] scheduling save of new window size\n",
-                      state->window);
-
     if (state->timeout_id == 0) {
       state->timeout_id = g_timeout_add_seconds (WINDOW_STATE_TIMEOUT,
                                                  (GSourceFunc) window_state_timeout_cb,
@@ -172,13 +154,6 @@ window_state_event_cb (GtkWidget *widget,
                        GdkEventWindowState *event,
                        WindowState *state)
 {
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "[window %p] state event, mask:%x new-state:%x current state: is-maximised:%s is-fullscreen:%s\n",
-                      state->window,
-                      event->changed_mask, event->new_window_state,
-                      state->is_maximised ? "t" : "f",
-                      state->is_fullscreen ? "t" : "f");
-
   if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
     state->is_maximised = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
     games_conf_set_boolean (state->group, window_state_key_name[STATE_KEY_MAXIMISED], state->is_maximised);
@@ -188,12 +163,6 @@ window_state_event_cb (GtkWidget *widget,
     games_conf_set_boolean (state->group, window_state_key_name[STATE_KEY_FULLSCREEN], state->is_fullscreen);
   }
 
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "  > new state: is-maximised:%s is-fullscreen:%s\n",
-                      state->is_maximised ? "t" : "f",
-                      state->is_fullscreen ? "t" : "f");
-
-
   return FALSE;
 }
 
@@ -1296,22 +1265,12 @@ games_conf_add_window (GtkWindow *window,
   height = games_conf_get_integer (group, window_state_key_name[STATE_KEY_HEIGHT], NULL);
 
   if (width > 0 && height > 0) {
-    _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                        "[window %p] restoring size %dx%d\n",
-                        state->window,
-                        width, height);
     gtk_window_set_default_size (GTK_WINDOW (window), width, height);
   }
   if (maximised) {
-    _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                        "[window %p] restoring maximised state\n",
-                        state->window);
     gtk_window_maximize (GTK_WINDOW (window));
   }
   if (fullscreen) {
-    _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                        "[window %p] restoring fullscreen state\n",
-                        state->window);
     gtk_window_fullscreen (GTK_WINDOW (window));
   }
 }
diff --git a/libgames-support/games-runtime.c b/libgames-support/games-runtime.c
index 899a441..002cc57 100644
--- a/libgames-support/games-runtime.c
+++ b/libgames-support/games-runtime.c
@@ -33,7 +33,6 @@
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 
-#include "games-debug.h"
 #include "games-show.h"
 
 #include "games-runtime.h"
@@ -306,8 +305,6 @@ games_runtime_init (const char *name)
 #endif
   /* May call any glib function after this point */
 
-  _games_debug_init ();
-
   app_name = g_strdup (name);
 
   bindtextdomain (GETTEXT_PACKAGE, games_runtime_get_directory (GAMES_RUNTIME_LOCALE_DIRECTORY));
@@ -321,9 +318,6 @@ games_runtime_init (const char *name)
   /* Now check that we can get the module installation directory */
   path = games_runtime_get_directory (GAMES_RUNTIME_PREFIX);
 
-  _games_debug_print (GAMES_DEBUG_RUNTIME,
-                      "Relocation path: %s\n", path ? path : "(null)");
-
   retval = path != NULL;
 }
 #else /* !ENABLE_BINRELOC */
diff --git a/libgames-support/games-settings.c b/libgames-support/games-settings.c
index 084bb23..a232190 100644
--- a/libgames-support/games-settings.c
+++ b/libgames-support/games-settings.c
@@ -22,8 +22,6 @@
 
 #include <gtk/gtk.h>
 
-#include "games-debug.h"
-
 #define I_(string) g_intern_static_string (string)
 
 #define SCHEMA_NAME           I_("org.gnome.Games.WindowState")
@@ -63,14 +61,6 @@ window_configure_event_cb (GtkWidget *widget,
                            GdkEventConfigure *event,
                            WindowState *state)
 {
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "[window %p] configure event current %dx%d new %dx%d [state: is-maximised:%s is-fullscreen:%s]\n",
-                      state->window,
-                      state->width, state->height,
-                      event->width, event->height,
-                      state->is_maximised ? "t" : "f",
-                      state->is_fullscreen ? "t" : "f");
-
   if (!state->is_maximised && !state->is_fullscreen) {
     state->width = event->width;
     state->height = event->height;
@@ -84,13 +74,6 @@ window_state_event_cb (GtkWidget *widget,
                        GdkEventWindowState *event,
                        WindowState *state)
 {
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "[window %p] state event, mask:%x new-state:%x current state: is-maximised:%s is-fullscreen:%s\n",
-                      state->window,
-                      event->changed_mask, event->new_window_state,
-                      state->is_maximised ? "t" : "f",
-                      state->is_fullscreen ? "t" : "f");
-
   if (event->changed_mask & GDK_WINDOW_STATE_MAXIMIZED) {
     state->is_maximised = (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) != 0;
   }
@@ -98,12 +81,6 @@ window_state_event_cb (GtkWidget *widget,
     state->is_fullscreen = (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0;
   }
 
-  _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                      "  > new state: is-maximised:%s is-fullscreen:%s\n",
-                      state->is_maximised ? "t" : "f",
-                      state->is_fullscreen ? "t" : "f");
-
-
   return FALSE;
 }
 
@@ -322,22 +299,12 @@ games_settings_bind_window_state (const char *path,
   height = g_settings_get_int (state->settings, STATE_KEY_HEIGHT);
 
   if (width > 0 && height > 0) {
-    _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                        "[window %p] restoring size %dx%d\n",
-                        state->window,
-                        width, height);
     gtk_window_set_default_size (GTK_WINDOW (window), width, height);
   }
   if (maximised) {
-    _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                        "[window %p] restoring maximised state\n",
-                        state->window);
     gtk_window_maximize (GTK_WINDOW (window));
   }
   if (fullscreen) {
-    _games_debug_print (GAMES_DEBUG_WINDOW_STATE,
-                        "[window %p] restoring fullscreen state\n",
-                        state->window);
     gtk_window_fullscreen (GTK_WINDOW (window));
   }
 }
diff --git a/quadrapassel/src/blocks-cache.cpp b/quadrapassel/src/blocks-cache.cpp
index 81bf13e..9068578 100644
--- a/quadrapassel/src/blocks-cache.cpp
+++ b/quadrapassel/src/blocks-cache.cpp
@@ -27,8 +27,6 @@
 #include "renderer.h"
 #include "blocks-cache.h"
 
-#include <libgames-support/games-debug.h>
-
 struct _BlocksCachePrivate
 {
   guint theme;
@@ -85,9 +83,6 @@ blocks_cache_clear (BlocksCache *cache)
   BlocksCachePrivate *priv = cache->priv;
   int i;
 
-  _games_debug_print (GAMES_DEBUG_BLOCKS_CACHE,
-                      "blocks_cache_clear\n");
-
   for (i = 0; i < NCOLOURS; i++) {
     CoglHandle handle = priv->colours[i];
 
@@ -143,15 +138,6 @@ blocks_cache_finalize (GObject *object)
 
   g_free (priv->colours);
 
-#ifdef GNOME_ENABLE_DEBUG
-  _GAMES_DEBUG_IF (GAMES_DEBUG_BLOCKS_CACHE) {
-    _games_debug_print (GAMES_DEBUG_BLOCKS_CACHE,
-                        "BlocksCache %p statistics: %u calls with %u hits and %u misses for a hit/total of %.3f\n",
-                        cache, priv->n_calls, priv->cache_hits, priv->n_calls - priv->cache_hits,
-                        priv->n_calls > 0 ? (double) priv->cache_hits / (double) priv->n_calls : 0.0);
-  }
-#endif
-
   G_OBJECT_CLASS (blocks_cache_parent_class)->finalize (object);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]