diff options
author | rbuj <[email protected]> | 2019-09-11 22:21:31 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-09-15 12:33:45 +0200 |
commit | bab1d6952bb08a70cb8675d83246c2d3b7f61cda (patch) | |
tree | 83a500e80ad3f4e6614d007708b585b91049a0ec /src/dlg-prop.c | |
parent | 3f4c82587df3c7fde79ebb7e546d73321479760a (diff) | |
download | engrampa-bab1d6952bb08a70cb8675d83246c2d3b7f61cda.tar.bz2 engrampa-bab1d6952bb08a70cb8675d83246c2d3b7f61cda.tar.xz |
dlg-prop: allow to open the archive's folder
Based on https://github.com/GNOME/file-roller/commit/9a37eb44a8ec5d0a20ea78c9a44c7c9e50bb508f#diff-41f5e2a364a93ff790f678ba58265d43
Diffstat (limited to 'src/dlg-prop.c')
-rw-r--r-- | src/dlg-prop.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/dlg-prop.c b/src/dlg-prop.c index 86762f6..18ceb1d 100644 --- a/src/dlg-prop.c +++ b/src/dlg-prop.c @@ -81,6 +81,9 @@ dlg_prop (FrWindow *window) GtkWidget *help_button; GtkWidget *label_label; GtkWidget *label; + GFile *parent; + char *uri; + char *markup; char *s; goffset size, uncompressed_size; char *utf8_name; @@ -108,11 +111,16 @@ dlg_prop (FrWindow *window) set_label (label_label, _("Location:")); label = _gtk_builder_get_widget (data->builder, "p_path_label"); - s = remove_level_from_path (fr_window_get_archive_uri (window)); - utf8_name = g_filename_display_name (s); - gtk_label_set_text (GTK_LABEL (label), utf8_name); + uri = remove_level_from_path (fr_window_get_archive_uri (window)); + parent = g_file_new_for_uri (uri); + utf8_name = g_file_get_parse_name (parent); + markup = g_strdup_printf ("<a href=\"%s\">%s</a>", uri, utf8_name); + gtk_label_set_markup (GTK_LABEL (label), markup); + + g_free (markup); g_free (utf8_name); - g_free (s); + g_free (uri); + g_object_unref (parent); /**/ |