[Gnucash-changes] r13645 - gnucash/trunk - Treat the file name as utf8 when finding the file name for the window

David Hampton hampton at cvs.gnucash.org
Wed Mar 15 22:43:07 EST 2006


Author: hampton
Date: 2006-03-15 22:43:06 -0500 (Wed, 15 Mar 2006)
New Revision: 13645
Trac: http://svn.gnucash.org/trac/changeset/13645

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome-utils/gnc-main-window.c
Log:
Treat the file name as utf8 when finding the file name for the window
title.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-03-16 02:42:51 UTC (rev 13644)
+++ gnucash/trunk/ChangeLog	2006-03-16 03:43:06 UTC (rev 13645)
@@ -1,5 +1,8 @@
 2006-03-15  David Hampton  <hampton at employees.org>
 
+	* src/gnome-utils/gnc-main-window.c: Treat the file name as utf8
+	when finding the file name for the window title.
+
 	* src/gnome-utils/gnc-main-window.c: Don't create a new window for
 	a page if there's already an open blank window.  Fixes 334672.
 

Modified: gnucash/trunk/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-main-window.c	2006-03-16 02:42:51 UTC (rev 13644)
+++ gnucash/trunk/src/gnome-utils/gnc-main-window.c	2006-03-16 03:43:06 UTC (rev 13645)
@@ -1128,9 +1128,9 @@
     filename = _("<no file>");
   else {
     /* The Gnome HIG 2.0 recommends only the file name (no path) be used. (p15) */
-    ptr = strrchr(filename, '/');
+    ptr = g_utf8_strrchr(filename, -1, G_DIR_SEPARATOR);
     if (ptr != NULL)
-      filename = ptr+1;
+      filename = g_utf8_next_char(ptr);
   }
 
   priv = GNC_MAIN_WINDOW_GET_PRIVATE(window);



More information about the gnucash-changes mailing list