Commit 715aba65 authored by Matthias Clasen's avatar Matthias Clasen

places sidebar: Add private api to get title

The places sidebar already does all the work to determine the
right label to use for the current location of the filechooser.
We want to use the same label in the headerbar subtitle, so
add some private API to get it.
parent 7e45b09c
......@@ -4416,6 +4416,23 @@ gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar)
return file;
gchar *
gtk_places_sidebar_get_location_title (GtkPlacesSidebar *sidebar)
GtkListBoxRow *selected;
gchar *title;
g_return_val_if_fail (sidebar != NULL, NULL);
title = NULL;
selected = gtk_list_box_get_selected_row (GTK_LIST_BOX (sidebar->list_box));
if (selected)
g_object_get (selected, "label", &title, NULL);
return title;
* gtk_places_sidebar_set_show_recent:
* @sidebar: a places sidebar
......@@ -22,6 +22,7 @@
#include <glib.h>
#include "gtkplacessidebar.h"
......@@ -49,6 +50,8 @@ typedef enum {
} GtkPlacesSidebarPlaceType;
gchar *gtk_places_sidebar_get_location_title (GtkPlacesSidebar *sidebar);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment