diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-01-18 17:13:12 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-01-18 17:13:12 -0500 |
commit | 8133e7e624f63afb3a99de67590d874b6b57ba65 (patch) | |
tree | df7d4046e6582b0a4f2f862d23afc05a068b2254 /gtk/gtkfilechooserwidget.c | |
parent | 6a7b549608ad0c6e294368996de165a1ccc2d979 (diff) | |
download | gtk+-8133e7e624f63afb3a99de67590d874b6b57ba65.tar.gz |
file chooser: Ensure the path bar is initialized
There are some cases where we can end up showing the path
bar without ever setting a file on it. One example is:
1) Open file chooser
2) Hit ~
3) Hit Ctrl-L
While this is a bit of a workaround, at least it makes sure
that we never end up with an empty space where the path bar
is supposed to be.
Diffstat (limited to 'gtk/gtkfilechooserwidget.c')
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 9ed0e5d4f4..1681e08492 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -7456,6 +7456,7 @@ post_process_ui (GtkFileChooserWidget *impl) GtkTreeSelection *selection; GtkCellRenderer *cell; GList *cells; + GFile *file; /* Some qdata, qdata can't be set with GtkBuilder */ g_object_set_data (G_OBJECT (impl->priv->browse_files_tree_view), "fmq-name", "file_list"); @@ -7501,6 +7502,9 @@ post_process_ui (GtkFileChooserWidget *impl) /* Set the GtkPathBar file system backend */ _gtk_path_bar_set_file_system (GTK_PATH_BAR (impl->priv->browse_path_bar), impl->priv->file_system); + file = g_file_new_for_path ("/"); + _gtk_path_bar_set_file (GTK_PATH_BAR (impl->priv->browse_path_bar), file, FALSE); + g_object_unref (file); /* Set the fixed size icon renderer, this requires * that priv->icon_size be already setup. |