SF.net SVN: geany: [946] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Oct 29 14:44:10 UTC 2006


Revision: 946
          http://svn.sourceforge.net/geany/?rev=946&view=rev
Author:   eht16
Date:     2006-10-29 06:44:04 -0800 (Sun, 29 Oct 2006)

Log Message:
-----------
Fixed bug when setting colour of open files list entry on new, unnamed files.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-10-29 13:48:39 UTC (rev 945)
+++ trunk/ChangeLog	2006-10-29 14:44:04 UTC (rev 946)
@@ -12,6 +12,8 @@
    src/treeviews.c, src/treeviews.h, src/geany.h:
    Moved all treeview related callback functions from callbacks.c to
    msgwindow.c and treeviews.c.
+ * src/document.c: Fixed bug when setting colour of open files list
+                   entry on new, unnamed files.
 
 
 2006-10-28  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-10-29 13:48:39 UTC (rev 945)
+++ trunk/src/document.c	2006-10-29 14:44:04 UTC (rev 946)
@@ -167,7 +167,6 @@
 		// changes the color of the tab text according to the status
 		static GdkColor colorred = {0, 65535, 0, 0};
 		static GdkColor colorblack = {0, 0, 0, 0};
-		gchar *basename = g_path_get_basename(doc_list[idx].file_name);
 
 		gtk_widget_modify_fg(doc_list[idx].tab_label, GTK_STATE_NORMAL,
 					(doc_list[idx].changed) ? &colorred : &colorblack);
@@ -181,8 +180,12 @@
 		ui_save_buttons_toggle(doc_list[idx].changed);
 		ui_set_window_title(idx);
 		ui_update_statusbar(idx, -1);
-		treeviews_openfiles_update(doc_list[idx].iter, basename, doc_list[idx].changed);
-		g_free(basename);
+		if (doc_list[idx].file_name != NULL)
+		{
+			gchar *basename = g_path_get_basename(doc_list[idx].file_name);
+			treeviews_openfiles_update(doc_list[idx].iter, basename, doc_list[idx].changed);
+			g_free(basename);
+		}
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list