changeset 16283:5187395d6b78

Debug is not necessary anymore, and don't crash on null text.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 20 Apr 2007 19:14:04 +0000
parents 4a1fc97196c0
children d7f00937b3a4 776bf7979b4f
files finch/libgnt/gntbindable.h finch/libgnt/gntclipboard.h finch/libgnt/gnttree.c
diffstat 3 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntbindable.h	Fri Apr 20 11:53:43 2007 +0000
+++ b/finch/libgnt/gntbindable.h	Fri Apr 20 19:14:04 2007 +0000
@@ -13,7 +13,7 @@
 #define GNT_IS_BINDABLE_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BINDABLE))
 #define GNT_BINDABLE_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BINDABLE, GntBindableClass))
 
-#define	GNTDEBUG	g_printerr("%s\n", __FUNCTION__)
+#define	GNTDEBUG
 
 typedef struct _GntBindable			GntBindable;
 typedef struct _GntBindableClass		GntBindableClass;
--- a/finch/libgnt/gntclipboard.h	Fri Apr 20 11:53:43 2007 +0000
+++ b/finch/libgnt/gntclipboard.h	Fri Apr 20 19:14:04 2007 +0000
@@ -12,8 +12,6 @@
 #define GNT_IS_CLIPBOARD_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_CLIPBOARD))
 #define GNT_CLIPBOARD_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_CLIPBOARD, GntClipboardClass))
 
-#define	GNTDEBUG	g_printerr("%s\n", __FUNCTION__)
-
 typedef struct _GntClipboard			GntClipboard;
 typedef struct _GntClipboardClass		GntClipboardClass;
 
--- a/finch/libgnt/gnttree.c	Fri Apr 20 11:53:43 2007 +0000
+++ b/finch/libgnt/gnttree.c	Fri Apr 20 19:14:04 2007 +0000
@@ -1344,7 +1344,7 @@
 	{
 		col = g_list_nth_data(row->columns, colno);
 		g_free(col->text);
-		col->text = g_strdup(text);
+		col->text = g_strdup(text ? text : "");
 
 		if (get_distance(tree->top, row) >= 0 && get_distance(row, tree->bottom) >= 0)
 			redraw_tree(tree);