Revision: 1242 http://svn.sourceforge.net/geany/?rev=1242&view=rev Author: ntrel Date: 2007-02-01 09:07:52 -0800 (Thu, 01 Feb 2007)
Log Message: ----------- Show file path on window title after file name.
Modified Paths: -------------- trunk/ChangeLog trunk/src/ui_utils.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2007-02-01 15:43:13 UTC (rev 1241) +++ trunk/ChangeLog 2007-02-01 17:07:52 UTC (rev 1242) @@ -1,3 +1,9 @@ +2007-02-01 Nick Treleaven nick.treleaven@btinternet.com + + * src/ui_utils.c: + Show file path on window title after file name. + + 2007-02-01 Enrico Tröger enrico.troeger@uvena.de
* src/build.c: Prevent compiling or executing of files without a
Modified: trunk/src/ui_utils.c =================================================================== --- trunk/src/ui_utils.c 2007-02-01 15:43:13 UTC (rev 1241) +++ trunk/src/ui_utils.c 2007-02-01 17:07:52 UTC (rev 1242) @@ -140,11 +140,23 @@
if (index >= 0) { - gchar *basename = g_path_get_basename(DOC_FILENAME(index)); - title = g_strdup_printf("%s%s - Geany", - doc_list[index].changed ? "*" : "", - basename); - g_free(basename); + if (doc_list[index].file_name == NULL) + { + title = g_strdup_printf("%s%s - Geany", + doc_list[index].changed ? "*" : "", + DOC_FILENAME(index)); + } + else + { + gchar *basename = g_path_get_basename(DOC_FILENAME(index)); + gchar *dirname = g_path_get_dirname(DOC_FILENAME(index)); + + title = g_strdup_printf("%s%s - %s - Geany", + doc_list[index].changed ? "*" : "", + basename, dirname ? dirname : ""); + g_free(basename); + g_free(dirname); + } gtk_window_set_title(GTK_WINDOW(app->window), title); g_free(title); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.