summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-07-07 12:40:50 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-07-07 12:40:50 +0000
commit8cc4fe41ff2a48ee2acb3ac738962ff28020e643 (patch)
treedd105def964a7b4969726794ef6532c419b6214c /gtk/gtkpathbar.c
parentd8c1ea044a4d1933d9decfbc85949027e2a97043 (diff)
downloadgdk-pixbuf-8cc4fe41ff2a48ee2acb3ac738962ff28020e643.tar.gz
Fix #157787, reported by Jonathan Blandford:
2005-07-07 Matthias Clasen <mclasen@redhat.com> Fix #157787, reported by Jonathan Blandford: * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_current_folder): Don't leave a "trail" behind when set_current_folder is called explicitly. (gtk_file_chooser_default_update_current_folder): New function that is called to update the current folder in response to user actions. * gtk/gtkpathbar.c (_gtk_path_bar_set_path): Add a boolean keep_trail argument, and don't leave a "trail" behind unless it is set.
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index 644aa1a1f..ed80304fe 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -1278,6 +1278,7 @@ gtk_path_bar_check_parent_path (GtkPathBar *path_bar,
gboolean
_gtk_path_bar_set_path (GtkPathBar *path_bar,
const GtkFilePath *file_path,
+ const gboolean keep_trail,
GError **error)
{
GtkFilePath *path;
@@ -1294,7 +1295,8 @@ _gtk_path_bar_set_path (GtkPathBar *path_bar,
/* Check whether the new path is already present in the pathbar as buttons.
* This could be a parent directory or a previous selected subdirectory.
*/
- if (gtk_path_bar_check_parent_path (path_bar, file_path, path_bar->file_system))
+ if (keep_trail &&
+ gtk_path_bar_check_parent_path (path_bar, file_path, path_bar->file_system))
return TRUE;
path = gtk_file_path_copy (file_path);
@@ -1395,7 +1397,6 @@ _gtk_path_bar_set_path (GtkPathBar *path_bar,
return result;
}
-
/* FIXME: This should be a construct-only property */
void
_gtk_path_bar_set_file_system (GtkPathBar *path_bar,