diff -crB thunar/thunar-window.c thunar-withFullPathShownTitleBar/thunar-window.c *** thunar/thunar-window.c 2009-09-30 10:23:34.000000000 +1000 --- thunar-withFullPathShownTitleBar/thunar-window.c 2009-10-29 00:33:20.000000000 +1100 *************** *** 2377,2382 **** --- 2377,2436 ---- + gchar *local_thunar_vfs_path_translate_dup_string (ThunarVfsPath *src_path, + ThunarVfsPathScheme dst_scheme, + GError **error) + { + const ThunarVfsPath *p; + gchar *s; + guint stringLength; + guint numberPaths; + guint i; + guint j; + guint stringIndex; + gchar *path; + path = src_path; + + /* determine the number of bytes required to + * store the path's string representation. + */ + + stringLength = 0; + numberPaths = 0; + for (p = path; p != NULL; p = p->parent) + { + stringLength = stringLength + strlen (thunar_vfs_path_get_name (p)) + 1; + numberPaths++; + } + + /* allocate the buffer to store the string */ + s = g_malloc (stringLength); + s[0] = '\0'; + stringIndex = 0; + for (i=0; iparent; + } + + strcat(s, thunar_vfs_path_get_name (p)); + if(i != 0) /*do not record root dir, start at i=1 instead of i=0*/ + { + strcat(s, "/"); + } + + } + + /* return the string buffer */ + return s; + + } + + static void thunar_window_current_directory_changed (ThunarFile *current_directory, ThunarWindow *window) *************** *** 2385,2406 **** GdkPixbuf *icon; gchar *title; _thunar_return_if_fail (THUNAR_IS_WINDOW (window)); _thunar_return_if_fail (THUNAR_IS_FILE (current_directory)); _thunar_return_if_fail (window->current_directory == current_directory); /* update the "Empty Trash" action */ action = gtk_action_group_get_action (window->action_group, "empty-trash"); ! gtk_action_set_sensitive (action, (thunar_file_get_item_count (current_directory) > 0)); gtk_action_set_visible (action, (thunar_file_is_root (current_directory) && thunar_file_is_trashed (current_directory))); /* set window title and icon */ ! title = g_strdup_printf ("%s - %s", thunar_file_get_display_name (current_directory), _("File Manager")); icon = thunar_icon_factory_load_file_icon (window->icon_factory, current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48); gtk_window_set_title (GTK_WINDOW (window), title); gtk_window_set_icon (GTK_WINDOW (window), icon); g_object_unref (G_OBJECT (icon)); g_free (title); } --- 2439,2488 ---- GdkPixbuf *icon; gchar *title; + gchar *absolute_path; + gchar *absolute_path_display_name; + GError * error = NULL; + _thunar_return_if_fail (THUNAR_IS_WINDOW (window)); _thunar_return_if_fail (THUNAR_IS_FILE (current_directory)); _thunar_return_if_fail (window->current_directory == current_directory); /* update the "Empty Trash" action */ action = gtk_action_group_get_action (window->action_group, "empty-trash"); ! gtk_action_set_sensitive (action, (thunar_file_get_size (current_directory) > 0)); gtk_action_set_visible (action, (thunar_file_is_root (current_directory) && thunar_file_is_trashed (current_directory))); /* set window title and icon */ ! if(thunar_file_get_path (current_directory) != NULL) ! { ! absolute_path = local_thunar_vfs_path_translate_dup_string (thunar_file_get_path (current_directory), THUNAR_VFS_PATH_SCHEME_FILE, &error); ! ! if (absolute_path == NULL) ! { ! title = g_strdup_printf ("%s", "_"); ! } ! else ! { ! absolute_path_display_name = g_filename_display_name (absolute_path); ! title = g_strdup_printf ("%s", absolute_path_display_name); ! ! g_free (absolute_path); ! g_free (absolute_path_display_name); ! ! } ! } ! else ! { ! title = g_strdup_printf ("%s", "_"); ! } ! icon = thunar_icon_factory_load_file_icon (window->icon_factory, current_directory, THUNAR_FILE_ICON_STATE_DEFAULT, 48); gtk_window_set_title (GTK_WINDOW (window), title); gtk_window_set_icon (GTK_WINDOW (window), icon); g_object_unref (G_OBJECT (icon)); g_free (title); + + }