logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: 828e2e38e092a8ccc11a57b66baa14e2291f59e6
parent: ed40d74fdde65134365334b8d0d2b5593c121b89
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri, 12 Jun 2020 01:50:39 +0200

downloads: Ellipsize destination file path

Diffstat:

Mconfig.h12++++++++++++
Mdownloads.c1+
Mpo/messages.pot14+++++++-------
3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/config.h b/config.h @@ -93,4 +93,16 @@ */ #define BADWOLF_STATUSLABEL_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE +/* BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE: pango ellipsize mode of the download destination path, + * can be one of: + * - PANGO_ELLIPSIZE_NONE + * - PANGO_ELLIPSIZE_START + * - PANGO_ELLIPSIZE_MIDDLE + * - PANGO_ELLIPSIZE_END + * + * See https://developer.gnome.org/pango/stable/pango-Layout-Objects.html#PangoEllipsizeMode + */ +#define BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE PANGO_ELLIPSIZE_MIDDLE + + #endif /* CONFIG_H_INCLUDED */ diff --git a/downloads.c b/downloads.c @@ -42,6 +42,7 @@ download_new_entry(WebKitDownload *webkit_download, struct Download *download) download->stop_icon = gtk_button_new_from_icon_name("process-stop", GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_progress_bar_set_show_text(GTK_PROGRESS_BAR(download->progress), TRUE); + gtk_label_set_ellipsize(GTK_LABEL(download->file_path), BADWOLF_DOWNLOAD_FILE_PATH_ELLIPSIZE); g_signal_connect( download->stop_icon, "clicked", G_CALLBACK(download_stop_iconCb_clicked), webkit_download); diff --git a/po/messages.pot b/po/messages.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: Badwolf 1.0.0+g6880bf7.develop\n" +"Project-Id-Version: Badwolf 1.0.0+ged40d74.develop\n" "Report-Msgid-Bugs-To: contact+badwolf-msgid@hacktivis.me\n" -"POT-Creation-Date: 2020-05-29 23:52+0200\n" +"POT-Creation-Date: 2020-06-12 01:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,27 +17,27 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: downloads.c:117 +#: downloads.c:118 #, c-format msgid "%02i:%02i:%02i Download cancelled" msgstr "" -#: downloads.c:119 +#: downloads.c:120 #, c-format msgid "%02i:%02i:%02i Download error" msgstr "" -#: downloads.c:141 +#: downloads.c:142 #, c-format msgid "%02i:%02i:%02i Download finished" msgstr "" -#: downloads.c:167 +#: downloads.c:168 #, c-format msgid "%02i:%02i:%02i Downloading…" msgstr "" -#: downloads.c:195 downloads.c:212 downloads.c:215 +#: downloads.c:196 downloads.c:213 downloads.c:216 msgid "Badwolf Downloads" msgstr ""