From 1dcd782ea9f4e7e194a3e9a1579afc34f5ea91d4 Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Thu, 6 Aug 2020 16:57:34 -0400 Subject: Show torrent hashes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apply a patch from upstream to show torrent hashes in the “torrent details” area. --- debian/patches/series | 1 + debian/patches/show-torrent-hash.diff | 55 +++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 debian/patches/show-torrent-hash.diff (limited to 'debian/patches') diff --git a/debian/patches/series b/debian/patches/series index 066417a..e0d2d69 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ avoidRssGlib.diff appdataContentRating.diff validateAppdata.diff fno-common.diff +show-torrent-hash.diff diff --git a/debian/patches/show-torrent-hash.diff b/debian/patches/show-torrent-hash.diff new file mode 100644 index 0000000..ca07caa --- /dev/null +++ b/debian/patches/show-torrent-hash.diff @@ -0,0 +1,55 @@ +From: Sandro Tosi +Subject: Add Hash information in Torrent Details > General tab +Origin: upstream, https://github.com/transmission-remote-gtk/transmission-remote-gtk/commit/afc151446c6a1c8f1921deb668275b0216ab7d8c +Bug-Debian: https://bugs.debian.org/961767 +Forwarded: https://github.com/transmission-remote-gtk/transmission-remote-gtk/pull/99 +Applied-Upstream: https://github.com/transmission-remote-gtk/transmission-remote-gtk/commit/afc151446c6a1c8f1921deb668275b0216ab7d8c +--- a/src/trg-general-panel.c ++++ b/src/trg-general-panel.c +@@ -70,6 +70,7 @@ struct _TrgGeneralPanelPrivate + GtkLabel *gen_completedat_label; + GtkLabel *gen_downloaddir_label; + GtkLabel *gen_comment_label; ++ GtkLabel *gen_hash_label; + GtkLabel *gen_error_label; + GtkTreeModel *model; + TrgClient *tc; +@@ -97,6 +98,7 @@ void trg_general_panel_clear(TrgGeneralPanel * panel) + gtk_label_clear(priv->gen_completedat_label); + gtk_label_clear(priv->gen_downloaddir_label); + gtk_label_clear(priv->gen_comment_label); ++ gtk_label_clear(priv->gen_hash_label); + gtk_label_clear(priv->gen_error_label); + gtk_label_clear(gen_panel_label_get_key_label + (GTK_LABEL(priv->gen_error_label))); +@@ -165,6 +167,8 @@ trg_general_panel_update(TrgGeneralPanel * panel, JsonObject * t, GtkTreeIter * iter) + trg_strlsize(buf, uploaded); + gtk_label_set_text(GTK_LABEL(priv->gen_uploaded_label), buf); + ++ gtk_label_set_text(GTK_LABEL(priv->gen_hash_label), torrent_get_hash(t)); ++ + haveValid = torrent_get_have_valid(t); + trg_strlsize(buf, torrent_get_downloaded(t)); + gtk_label_set_text(GTK_LABEL(priv->gen_downloaded_label), buf); +@@ -310,7 +314,7 @@ static void trg_general_panel_init(TrgGeneralPanel * self) + int i; + + g_object_set(G_OBJECT(self), "n-columns", +- TRG_GENERAL_PANEL_COLUMNS_TOTAL, "n-rows", 7, NULL); ++ TRG_GENERAL_PANEL_COLUMNS_TOTAL, "n-rows", 8, NULL); + + priv->gen_name_label = + trg_general_panel_add_label_with_width(self, _("Name"), 0, 0, -1); +@@ -356,8 +360,11 @@ static void trg_general_panel_init(TrgGeneralPanel * self) + priv->gen_comment_label = + trg_general_panel_add_label(self, _("Comment"), 0, 7); + ++ priv->gen_hash_label = ++ trg_general_panel_add_label(self, _("Hash"), 0, 8); ++ + priv->gen_error_label = +- trg_general_panel_add_label_with_width(self, "", 0, 8, -1); ++ trg_general_panel_add_label_with_width(self, "", 0, 9, -1); + + for (i = 0; i < TRG_GENERAL_PANEL_COLUMNS_TOTAL; i++) + gtk_table_set_col_spacing(GTK_TABLE(self), i, -- cgit v1.2.3