[anjuta] Fix bug #580994
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjuta] Fix bug #580994
- Date: Sun, 3 May 2009 16:03:15 -0400 (EDT)
commit 878535949a2c3439a1d669bea3adf56c1c9bdddc
Author: Yuriy Penkin <yuriy penkin gmail com>
Date: Sun May 3 22:02:13 2009 +0200
Fix bug #580994
using DEBUG_PRINT instead of g_print
---
plugins/git/git-vcs-interface.c | 4 ++--
plugins/gtodo/libgtodo.c | 10 ++--------
plugins/gtodo/tasklists.c | 5 +++--
plugins/gtodo/todo_db.c | 3 ++-
4 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/plugins/git/git-vcs-interface.c b/plugins/git/git-vcs-interface.c
index 77c04f1..419c565 100644
--- a/plugins/git/git-vcs-interface.c
+++ b/plugins/git/git-vcs-interface.c
@@ -205,8 +205,8 @@ on_status_command_data_arrived (AnjutaCommand *command,
G_DIR_SEPARATOR_S, path, NULL);
file = g_file_new_for_path (full_path);
- g_print ("Working directory: %s\n", (gchar *) g_object_get_data (G_OBJECT (command), "working-directory"));
- g_print ("File %s Status %i\n", full_path, git_status_get_vcs_status (status));
+ DEBUG_PRINT ("Working directory: %s\n", (gchar *) g_object_get_data (G_OBJECT (command), "working-directory"));
+ DEBUG_PRINT ("File %s Status %i\n", full_path, git_status_get_vcs_status (status));
if (file)
{
diff --git a/plugins/gtodo/libgtodo.c b/plugins/gtodo/libgtodo.c
index 5c3aeb2..e8a6fbc 100644
--- a/plugins/gtodo/libgtodo.c
+++ b/plugins/gtodo/libgtodo.c
@@ -14,12 +14,6 @@
#include <libanjuta/anjuta-debug.h>
#include "libgtodo.h"
-#ifdef DEBUG
-short int debug = 1;
-#else
-short int debug = 0;
-#endif
-
typedef struct _GTodoCategory{
gchar *name;
gint id;
@@ -660,7 +654,7 @@ gboolean gtodo_client_check_file(GTodoClient *cl, GError **error)
else if ((file_error->domain == G_IO_ERROR) && (file_error->code == G_IO_ERROR_NOT_FOUND))
{
xmlNodePtr newn;
- if(debug) g_print("Trying to create new file\n");
+ DEBUG_PRINT ("Trying to create new file\n");
cl->gtodo_doc = xmlNewDoc((xmlChar *)"1.0");
cl->root = xmlNewDocNode(cl->gtodo_doc, NULL, (xmlChar *)"gtodo", NULL);
xmlDocSetRootElement(cl->gtodo_doc, cl->root);
@@ -846,7 +840,7 @@ GTodoClient * gtodo_client_new_from_file(char *filename, GError **error)
GTodoClient *cl = NULL;
/* check if the error is good or wrong. */
g_return_val_if_fail(error == NULL || *error == NULL,FALSE);
- if(debug)g_print("Trying to create a new client %s\n", filename);
+ DEBUG_PRINT ("Trying to create a new client %s\n", filename);
if(filename == NULL)
{
g_set_error(&tmp_error,LIBGTODO_ERROR,LIBGTODO_ERROR_NO_FILENAME,_("No filename supplied.") );
diff --git a/plugins/gtodo/tasklists.c b/plugins/gtodo/tasklists.c
index 71aaa87..43cb66c 100644
--- a/plugins/gtodo/tasklists.c
+++ b/plugins/gtodo/tasklists.c
@@ -1,4 +1,5 @@
#include <gtk/gtk.h>
+#include <libanjuta/anjuta-debug.h>
#include "main.h"
@@ -16,7 +17,7 @@ void open_playlist(void)
{
case GTK_RESPONSE_OK:
path = g_strdup_printf("gtodo \"%s\"",gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selection)));
- g_print("%s\n", path);
+ DEBUG_PRINT ("%s\n", path);
g_spawn_command_line_async(path, NULL);
g_free(path);
default:
@@ -40,7 +41,7 @@ void create_playlist(void)
{
case GTK_RESPONSE_OK:
path = g_strdup_printf("gtodo %s",gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (selection)));
- g_print("%s\n", path);
+ DEBUG_PRINT ("%s\n", path);
g_spawn_command_line_async(path, NULL);
g_free(path);
default:
diff --git a/plugins/gtodo/todo_db.c b/plugins/gtodo/todo_db.c
index 7e7f375..80e2147 100644
--- a/plugins/gtodo/todo_db.c
+++ b/plugins/gtodo/todo_db.c
@@ -1,5 +1,6 @@
#include <gtk/gtk.h>
#include <string.h>
+#include <libanjuta/anjuta-debug.h>
#include "main.h"
int categorys = 0;
@@ -278,7 +279,7 @@ get_all_past_purge (void)
{
if (i < (today - settings.purge_days))
{
- g_print ("auto-purge delete %i\n",
+ DEBUG_PRINT ("auto-purge delete %i\n",
gtodo_todo_item_get_id (item));
gtodo_client_delete_todo_by_id (cl,
gtodo_todo_item_get_id
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]