#2 Pull in new upstream changes
Closed 2 years ago by yselkowitz. Opened 3 years ago by luk1337.
rpms/ luk1337/transmission-remote-gtk f33  into  f33

@@ -0,0 +1,33 @@ 

+ From 0f5cc8a9942e220ea0f7d0b17db4a78d094e3b65 Mon Sep 17 00:00:00 2001

+ From: Jan Tojnar <jtojnar@gmail.com>

+ Date: Wed, 20 Nov 2019 13:12:25 +0100

+ Subject: [PATCH 1/9] =?UTF-8?q?build:=20Allow=20building=20with=20gettext?=

+  =?UTF-8?q?=20=E2=89=A5=200.20?=

+ MIME-Version: 1.0

+ Content-Type: text/plain; charset=UTF-8

+ Content-Transfer-Encoding: 8bit

+ 

+ Cargo culted from https://gitlab.freedesktop.org/zeitgeist/zeitgeist/commit/b5c00e80189fd59a059a95c4e276728a2492cb89

+ ---

+  configure.ac | 4 +++-

+  1 file changed, 3 insertions(+), 1 deletion(-)

+ 

+ diff --git a/configure.ac b/configure.ac

+ index 699f0a6..2e6be69 100644

+ --- a/configure.ac

+ +++ b/configure.ac

+ @@ -45,8 +45,10 @@ AC_PATH_PROG([POD2MAN], [pod2man])

+  LT_PREREQ([2.2.0])

+  LT_INIT

+  LT_LIB_M

+ -AM_GNU_GETTEXT_VERSION([0.19.6])

+  AM_GNU_GETTEXT([external])

+ +# FIXME: Remove AM_GNU_GETTEXT_VERSION once autoreconf supports REQUIRE_VERSION

+ +AM_GNU_GETTEXT_VERSION([0.19.6])

+ +AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])

+  PKG_PROG_PKG_CONFIG([0.28])

+  DESKTOP_FILE

+  APPSTREAM_XML

+ -- 

+ 2.28.0

+ 

0002-Handle-return-enter-key-press-in-torrent-add-url-dia.patch 0001-Handle-return-enter-key-press-in-torrent-add-url-dia.patch
file renamed
+2 -2
@@ -1,7 +1,7 @@ 

  From 60fc7aa1106d7f72a2671fec093ed54c7aa27f1e Mon Sep 17 00:00:00 2001

  From: BehroozAmoozad <61118947+BehroozAmoozad@users.noreply.github.com>

  Date: Mon, 17 Feb 2020 22:03:57 +0330

- Subject: [PATCH 1/3] Handle return(enter) key press in torrent-add-url dialog

+ Subject: [PATCH 2/9] Handle return(enter) key press in torrent-add-url dialog

   (#91)

  

  ---
@@ -34,5 +34,5 @@ 

   

       priv->startCheck =

  -- 

- 2.26.0

+ 2.28.0

  

0003-Enable-curl-gzip-compression.patch 0002-Enable-curl-gzip-compression.patch
file renamed
+2 -2
@@ -1,7 +1,7 @@ 

  From 65d9fe4c01b76aeac7c3bda2e3f2a0267db71e8b Mon Sep 17 00:00:00 2001

  From: Robert Sacks <robert@rmsacks.com>

  Date: Sat, 14 Mar 2020 02:59:05 -0400

- Subject: [PATCH 2/3] Enable curl gzip compression

+ Subject: [PATCH 3/9] Enable curl gzip compression

  

  ---

   src/trg-client.c | 1 +
@@ -20,5 +20,5 @@ 

       g_mutex_unlock(&priv->configMutex);

   

  -- 

- 2.26.0

+ 2.28.0

  

0004-Fix-building-under-GCC-10-fno-common.patch 0003-Fix-building-under-GCC-10-fno-common.patch
file renamed
+2 -2
@@ -1,7 +1,7 @@ 

  From b20655081332847426a7d10189bb1e2369efea42 Mon Sep 17 00:00:00 2001

  From: David Seifert <soap@gentoo.org>

  Date: Fri, 20 Mar 2020 20:30:24 +0100

- Subject: [PATCH 3/3] Fix building under GCC 10 / -fno-common

+ Subject: [PATCH 4/9] Fix building under GCC 10 / -fno-common

  

  * Add a `typedef` to avoid defining a variable.

  
@@ -24,5 +24,5 @@ 

       TRG_COLTYPE_FILEICONTEXT,

       TRG_COLTYPE_WANTED,

  -- 

- 2.26.0

+ 2.28.0

  

0005-link-window-name-to-an-icon-in-app-menu.patch 0001-link-window-name-to-an-icon-in-app-menu.patch
file renamed
+2 -2
@@ -1,7 +1,7 @@ 

  From 2c91f0f76752811fbde98186400ae8c224000e6a Mon Sep 17 00:00:00 2001

  From: galets <git5511@mx1.galets.net>

  Date: Mon, 25 May 2020 19:08:56 -0700

- Subject: [PATCH] link window name to an icon in app menu

+ Subject: [PATCH 5/9] link window name to an icon in app menu

  

  ---

   data/io.github.TransmissionRemoteGtk.desktop.in | 1 +
@@ -17,5 +17,5 @@ 

   Keywords=p2p;bittorrent;transmission;rpc;

  +StartupWMClass=transmission-remote-gtk

  -- 

- 2.26.2

+ 2.28.0

  

@@ -0,0 +1,63 @@ 

+ From afc151446c6a1c8f1921deb668275b0216ab7d8c Mon Sep 17 00:00:00 2001

+ From: Sandro Tosi <morph@debian.org>

+ Date: Thu, 28 May 2020 23:24:20 -0400

+ Subject: [PATCH 6/9] Add Hash information in Torrent Details > General tab

+ 

+ ---

+  src/trg-general-panel.c | 11 +++++++++--

+  1 file changed, 9 insertions(+), 2 deletions(-)

+ 

+ diff --git a/src/trg-general-panel.c b/src/trg-general-panel.c

+ index 7cb2a90..c914dda 100644

+ --- 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,

+      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,

+ -- 

+ 2.28.0

+ 

@@ -0,0 +1,404 @@ 

+ From 3019b71a6795932656b50837d15e01427a684bee Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Johan=20Rast=C3=A9n?= <johan@oljud.se>

+ Date: Tue, 6 Oct 2020 14:54:07 +0200

+ Subject: [PATCH 7/9] Fix some memory potential leaks

+ 

+ ---

+  src/main.c                     |  2 +

+  src/trg-client.c               | 68 +++++++++++++++++++++-------------

+  src/trg-json-widgets.c         |  6 +--

+  src/trg-main-window.c          |  9 ++---

+  src/trg-model.c                |  6 +--

+  src/trg-torrent-model.c        |  6 +--

+  src/trg-torrent-move-dialog.c  |  2 +

+  src/trg-torrent-props-dialog.c | 17 ++++++++-

+  src/trg-trackers-model.c       |  1 +

+  src/trg-tree-view.c            | 27 ++++++++++++++

+  10 files changed, 100 insertions(+), 44 deletions(-)

+ 

+ diff --git a/src/main.c b/src/main.c

+ index df9bce9..ac7ff7d 100644

+ --- a/src/main.c

+ +++ b/src/main.c

+ @@ -195,6 +195,8 @@ int main(int argc, char *argv[])

+      exitCode = trg_gtkapp_init(client, argc, argv);

+  #endif

+  

+ +    g_object_unref(client);

+ +

+      trg_cleanup();

+  

+      return exitCode;

+ diff --git a/src/trg-client.c b/src/trg-client.c

+ index c027fb9..3eb6d30 100644

+ --- a/src/trg-client.c

+ +++ b/src/trg-client.c

+ @@ -120,6 +120,23 @@ static void trg_client_dispose(GObject * object)

+      G_OBJECT_CLASS(trg_client_parent_class)->dispose(object);

+  }

+  

+ +static void trg_client_finalize(GObject * object)

+ +{

+ +    TrgClient *tc = TRG_CLIENT(object);

+ +    TrgClientPrivate *priv = tc->priv;

+ +

+ +    g_free(priv->session_id);

+ +    json_object_unref(priv->session);

+ +    g_free(priv->url);

+ +    g_free(priv->username);

+ +    g_free(priv->password);

+ +    g_free(priv->proxy);

+ +    g_hash_table_unref(priv->torrentTable);

+ +    g_thread_pool_free(priv->pool, TRUE, TRUE);

+ +

+ +    G_OBJECT_CLASS(trg_client_parent_class)->finalize(object);

+ +}

+ +

+  static void trg_client_class_init(TrgClientClass * klass)

+  {

+      GObjectClass *object_class = G_OBJECT_CLASS(klass);

+ @@ -129,6 +146,7 @@ static void trg_client_class_init(TrgClientClass * klass)

+      object_class->get_property = trg_client_get_property;

+      object_class->set_property = trg_client_set_property;

+      object_class->dispose = trg_client_dispose;

+ +    object_class->finalize = trg_client_finalize;

+  

+      signals[TC_SESSION_UPDATED] = g_signal_new("session-updated",

+                                                 G_TYPE_FROM_CLASS

+ @@ -160,7 +178,6 @@ TrgClient *trg_client_new(void)

+      trg_prefs_load(prefs);

+  

+      g_mutex_init(&priv->configMutex);

+ -    //priv->tlsKey = g_private_new(NULL);

+      priv->seedRatioLimited = FALSE;

+      priv->seedRatioLimit = 0.00;

+  

+ @@ -235,14 +252,9 @@ int trg_client_populate_with_settings(TrgClient * tc)

+  

+      trg_prefs_set_connection(prefs, trg_prefs_get_profile(prefs));

+  

+ -    g_free(priv->url);

+ -    priv->url = NULL;

+ -

+ -    g_free(priv->username);

+ -    priv->username = NULL;

+ -

+ -    g_free(priv->password);

+ -    priv->password = NULL;

+ +    g_clear_pointer(&priv->url, g_free);

+ +    g_clear_pointer(&priv->username, g_free);

+ +    g_clear_pointer(&priv->password, g_free);

+  

+      port =

+          trg_prefs_get_int(prefs, TRG_PREFS_KEY_PORT, TRG_PREFS_CONNECTION);

+ @@ -253,6 +265,7 @@ int trg_client_populate_with_settings(TrgClient * tc)

+  

+      if (!host || strlen(host) < 1) {

+          g_free(host);

+ +        g_free(path);

+          g_mutex_unlock(&priv->configMutex);

+          return TRG_NO_HOSTNAME_SET;

+      }

+ @@ -279,8 +292,7 @@ int trg_client_populate_with_settings(TrgClient * tc)

+      priv->password = trg_prefs_get_string(prefs, TRG_PREFS_KEY_PASSWORD,

+                                            TRG_PREFS_CONNECTION);

+  

+ -    g_free(priv->proxy);

+ -    priv->proxy = NULL;

+ +    g_clear_pointer(&priv->proxy, g_free);

+  

+  #ifdef HAVE_LIBPROXY

+      if ((pf = px_proxy_factory_new())) {

+ @@ -504,10 +516,9 @@ static trg_tls *trg_tls_new(TrgClient * tc)

+  }

+  

+  static trg_tls *get_tls(TrgClient *tc) {

+ -	TrgClientPrivate *priv = tc->priv;

+ -	gpointer threadLocalStorage = g_private_get(&priv->tlsKey);

+ -	trg_tls *tls;

+ -

+ +    TrgClientPrivate *priv = tc->priv;

+ +    gpointer threadLocalStorage = g_private_get(&priv->tlsKey);

+ +    trg_tls *tls;

+      if (!threadLocalStorage) {

+          tls = trg_tls_new(tc);

+          g_private_set(&priv->tlsKey, tls);

+ @@ -617,10 +628,12 @@ trg_http_perform_inner(TrgClient * tc, trg_request * request,

+      	curl_slist_free_all(headers);

+  

+      if (response->status == CURLE_OK) {

+ -        if (httpCode == HTTP_CONFLICT && recurse == TRUE)

+ +        if (httpCode == HTTP_CONFLICT && recurse == TRUE) {

+ +            g_free(response->raw);

+              return trg_http_perform_inner(tc, request, response, FALSE);

+ -        else if (httpCode != HTTP_OK)

+ +        } else if (httpCode != HTTP_OK) {

+              response->status = (-httpCode) - 100;

+ +        }

+      }

+  

+      return response->status;

+ @@ -631,13 +644,18 @@ int trg_http_perform(TrgClient * tc, trg_request *request, trg_response * rsp)

+      return trg_http_perform_inner(tc, request, rsp, TRUE);

+  }

+  

+ -static void trg_request_free(trg_request *req) {

+ -	g_free(req->body);

+ -	g_free(req->url);

+ -	g_free(req->cookie);

+ +static void trg_request_free(trg_request *req)

+ +{

+ +    if (req) {

+ +        g_free(req->body);

+ +        g_free(req->url);

+ +        g_free(req->cookie);

+ +

+ +        if (req->node)

+ +            json_node_free(req->node);

+  

+ -	if (req->node)

+ -		json_node_free(req->node);

+ +        g_free(req);

+ +    }

+  }

+  

+  /* formerly dispatch.c */

+ @@ -739,7 +757,7 @@ static void dispatch_async_threadfunc(trg_request * req, TrgClient * tc)

+      else

+          trg_response_free(rsp);

+  

+ -    g_free(req);

+ +    trg_request_free(req);

+  }

+  

+  static gboolean

+ @@ -758,7 +776,7 @@ dispatch_async_common(TrgClient * tc,

+      if (error) {

+          g_error("thread creation error: %s\n", error->message);

+          g_error_free(error);

+ -        g_free(trg_req);

+ +        trg_request_free(trg_req);

+          return FALSE;

+      } else {

+          return TRUE;

+ diff --git a/src/trg-json-widgets.c b/src/trg-json-widgets.c

+ index 99ccc44..9d47dd9 100644

+ --- a/src/trg-json-widgets.c

+ +++ b/src/trg-json-widgets.c

+ @@ -53,11 +53,7 @@ void trg_json_widget_desc_free(trg_json_widget_desc * wd)

+  

+  void trg_json_widget_desc_list_free(GList * list)

+  {

+ -    GList *li;

+ -    for (li = list; li; li = g_list_next(li))

+ -        trg_json_widget_desc_free((trg_json_widget_desc *) li->data);

+ -

+ -    g_list_free(list);

+ +    g_list_free_full(list, (GDestroyNotify)trg_json_widget_desc_free);

+  }

+  

+  void toggle_active_arg_is_sensitive(GtkToggleButton * b, gpointer data)

+ diff --git a/src/trg-main-window.c b/src/trg-main-window.c

+ index 5729254..69606a6 100644

+ --- a/src/trg-main-window.c

+ +++ b/src/trg-main-window.c

+ @@ -847,8 +847,7 @@ confirm_action_dialog(GtkWindow * gtk_win,

+                                  firstNode->data);

+          gtk_tree_model_get(GTK_TREE_MODEL(priv->filteredTorrentModel),

+                             &firstIter, TORRENT_COLUMN_NAME, &name, -1);

+ -        g_list_foreach(list, (GFunc) gtk_tree_path_free, NULL);

+ -        g_list_free(list);

+ +        g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free);

+  

+          dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(win),

+                                                      GTK_DIALOG_DESTROY_WITH_PARENT,

+ @@ -1603,8 +1602,7 @@ torrent_selection_changed(GtkTreeSelection * selection,

+          }

+      }

+  

+ -    g_list_foreach(selectionList, (GFunc) gtk_tree_path_free, NULL);

+ -    g_list_free(selectionList);

+ +    g_list_free_full(selectionList, (GDestroyNotify) gtk_tree_path_free);

+  

+      update_selected_torrent_notebook(win, TORRENT_GET_MODE_FIRST, id);

+  

+ @@ -2202,8 +2200,7 @@ static void exec_cmd_cb(GtkWidget * w, TrgMainWindow * win)

+      g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL,

+                    &cmd_error);

+  

+ -    g_list_foreach(selectedRows, (GFunc) gtk_tree_path_free, NULL);

+ -    g_list_free(selectedRows);

+ +    g_list_free_full(selectedRows, (GDestroyNotify) gtk_tree_path_free);

+  

+      if (argv)

+          g_strfreev(argv);

+ diff --git a/src/trg-model.c b/src/trg-model.c

+ index c9ce968..4ba2333 100644

+ --- a/src/trg-model.c

+ +++ b/src/trg-model.c

+ @@ -82,7 +82,7 @@ trg_model_remove_removed(GtkListStore * model, gint serial_column,

+  struct find_existing_item_foreach_args {

+      gint64 id;

+      gint search_column;

+ -    GtkTreeIter *iter;

+ +    GtkTreeIter iter;

+      gboolean found;

+  };

+  

+ @@ -97,7 +97,7 @@ find_existing_item_foreachfunc(GtkTreeModel * model,

+  

+      gtk_tree_model_get(model, iter, args->search_column, &currentId, -1);

+      if (currentId == args->id) {

+ -        args->iter = iter;

+ +        args->iter = *iter;

+          return args->found = TRUE;

+      }

+  

+ @@ -114,6 +114,6 @@ find_existing_model_item(GtkTreeModel * model, gint search_column,

+      args.search_column = search_column;

+      gtk_tree_model_foreach(model, find_existing_item_foreachfunc, &args);

+      if (args.found == TRUE)

+ -        *iter = *(args.iter);

+ +        *iter = args.iter;

+      return args.found;

+  }

+ diff --git a/src/trg-torrent-model.c b/src/trg-torrent-model.c

+ index 8e916f4..87d8b82 100644

+ --- a/src/trg-torrent-model.c

+ +++ b/src/trg-torrent-model.c

+ @@ -644,11 +644,9 @@ update_torrent_iter(TrgTorrentModel * model,

+  

+      trg_torrent_model_count_peers(model, iter, t);

+  

+ -    if (firstTrackerHost)

+ -        g_free(firstTrackerHost);

+ +    g_free(firstTrackerHost);

+  

+ -    if (peerSources)

+ -        g_free(peerSources);

+ +    g_free(peerSources);

+  

+      g_free(lastDownloadDir);

+      g_free(statusString);

+ diff --git a/src/trg-torrent-move-dialog.c b/src/trg-torrent-move-dialog.c

+ index fec1932..6f221bd 100644

+ --- a/src/trg-torrent-move-dialog.c

+ +++ b/src/trg-torrent-move-dialog.c

+ @@ -176,6 +176,8 @@ static GObject *trg_torrent_move_dialog_constructor(GType type,

+                       "response",

+                       G_CALLBACK(trg_torrent_move_response_cb), priv->win);

+  

+ +    g_free(msg);

+ +

+      return object;

+  }

+  

+ diff --git a/src/trg-torrent-props-dialog.c b/src/trg-torrent-props-dialog.c

+ index 5192fda..fd3bf6c 100644

+ --- a/src/trg-torrent-props-dialog.c

+ +++ b/src/trg-torrent-props-dialog.c

+ @@ -174,7 +174,6 @@ static void trg_torrent_props_response_cb(GtkDialog * dialog, gint res_id,

+                  (priv->bandwidthPriorityCombo) ) - 1);

+  

+          trg_json_widgets_save(priv->widgets, args);

+ -        trg_json_widget_desc_list_free(priv->widgets);

+  

+          dispatch_async(priv->client, request, on_generic_interactive_action_response,

+                  priv->parent);

+ @@ -659,6 +658,20 @@ static GObject *trg_torrent_props_dialog_constructor(GType type,

+      return object;

+  }

+  

+ +static void trg_torrent_props_dialog_dispose(GObject * object)

+ +{

+ +    G_OBJECT_CLASS(trg_torrent_props_dialog_parent_class)->dispose(object);

+ +}

+ +

+ +static void trg_torrent_props_dialog_finalize(GObject * object)

+ +{

+ +    TrgTorrentPropsDialogPrivate *priv = GET_PRIVATE(object);

+ +

+ +    trg_json_widget_desc_list_free(priv->widgets);

+ +

+ +    G_OBJECT_CLASS(trg_torrent_props_dialog_parent_class)->finalize(object);

+ +}

+ +

+  static void trg_torrent_props_dialog_class_init(TrgTorrentPropsDialogClass

+                                                  * klass)

+  {

+ @@ -667,6 +680,8 @@ static void trg_torrent_props_dialog_class_init(TrgTorrentPropsDialogClass

+      object_class->constructor = trg_torrent_props_dialog_constructor;

+      object_class->set_property = trg_torrent_props_dialog_set_property;

+      object_class->get_property = trg_torrent_props_dialog_get_property;

+ +    object_class->dispose = trg_torrent_props_dialog_dispose;

+ +    object_class->finalize = trg_torrent_props_dialog_finalize;

+  

+      g_type_class_add_private(klass, sizeof(TrgTorrentPropsDialogPrivate));

+  

+ diff --git a/src/trg-trackers-model.c b/src/trg-trackers-model.c

+ index 2e7fb9b..6cb7d95 100644

+ --- a/src/trg-trackers-model.c

+ +++ b/src/trg-trackers-model.c

+ @@ -151,6 +151,7 @@ trg_trackers_model_update(TrgTrackersModel * model,

+      }

+  

+      g_list_free(trackers);

+ +

+      trg_model_remove_removed(GTK_LIST_STORE(model),

+                               TRACKERCOL_UPDATESERIAL, updateSerial);

+  }

+ diff --git a/src/trg-tree-view.c b/src/trg-tree-view.c

+ index bea3cbf..bb402d1 100644

+ --- a/src/trg-tree-view.c

+ +++ b/src/trg-tree-view.c

+ @@ -90,6 +90,16 @@ gboolean trg_tree_view_is_column_showing(TrgTreeView * tv, gint index)

+      return FALSE;

+  }

+  

+ +static void

+ +trg_column_description_free(trg_column_description * desc)

+ +{

+ +    if (desc) {

+ +        g_free(desc->header);

+ +        g_free(desc->id);

+ +        g_free(desc);

+ +    }

+ +}

+ +

+  static void

+  trg_tree_view_get_property(GObject * object, guint property_id,

+                             GValue * value, GParamSpec * pspec)

+ @@ -766,6 +776,21 @@ GList *trg_tree_view_get_selected_refs_list(GtkTreeView * tv)

+      return refList;

+  }

+  

+ +static void trg_tree_view_dispose(GObject * object)

+ +{

+ +    G_OBJECT_CLASS(trg_tree_view_parent_class)->dispose(object);

+ +}

+ +

+ +static void trg_tree_view_finalize(GObject * object)

+ +{

+ +    TrgTreeViewPrivate *priv = TRG_TREE_VIEW_GET_PRIVATE(object);

+ +

+ +    g_list_free_full(priv->columns, (GDestroyNotify) trg_column_description_free);

+ +    g_free(priv->configId);

+ +

+ +    G_OBJECT_CLASS(trg_tree_view_parent_class)->finalize(object);

+ +}

+ +

+  static void trg_tree_view_class_init(TrgTreeViewClass * klass)

+  {

+      GObjectClass *object_class = G_OBJECT_CLASS(klass);

+ @@ -775,6 +800,8 @@ static void trg_tree_view_class_init(TrgTreeViewClass * klass)

+      object_class->get_property = trg_tree_view_get_property;

+      object_class->set_property = trg_tree_view_set_property;

+      object_class->constructor = trg_tree_view_constructor;

+ +    object_class->dispose = trg_tree_view_dispose;

+ +    object_class->finalize = trg_tree_view_finalize;

+  

+      g_object_class_install_property(object_class,

+                                      PROP_PREFS,

+ -- 

+ 2.28.0

+ 

@@ -0,0 +1,35 @@ 

+ From 90cc86977826a639ca4d72928638cac140ec59c3 Mon Sep 17 00:00:00 2001

+ From: =?UTF-8?q?Johan=20Rast=C3=A9n?= <johan@oljud.se>

+ Date: Thu, 15 Oct 2020 11:31:24 +0200

+ Subject: [PATCH 8/9] Mutex protect trg_client_get_session_id

+ 

+ Writing to priv->session_id was mutex protected so the read ought to be

+ too since it is non-atomic.

+ ---

+  src/trg-client.c | 10 +++++++++-

+  1 file changed, 9 insertions(+), 1 deletion(-)

+ 

+ diff --git a/src/trg-client.c b/src/trg-client.c

+ index 3eb6d30..7cf11e4 100644

+ --- a/src/trg-client.c

+ +++ b/src/trg-client.c

+ @@ -337,7 +337,15 @@ gchar *trg_client_get_url(TrgClient * tc)

+  gchar *trg_client_get_session_id(TrgClient * tc)

+  {

+      TrgClientPrivate *priv = tc->priv;

+ -    return priv->session_id ? g_strdup(priv->session_id) : NULL;

+ +    gchar *ret;

+ +

+ +    g_mutex_lock(&priv->configMutex);

+ +

+ +    ret = priv->session_id ? g_strdup(priv->session_id) : NULL;

+ +

+ +    g_mutex_unlock(&priv->configMutex);

+ +

+ +    return ret;

+  }

+  

+  void trg_client_set_session_id(TrgClient * tc, gchar * session_id)

+ -- 

+ 2.28.0

+ 

@@ -0,0 +1,42 @@ 

+ From c3595e136635c2a0817185c405d1164be3c79959 Mon Sep 17 00:00:00 2001

+ From: Alan F <alan-github@eth0.org.uk>

+ Date: Wed, 1 May 2019 16:39:30 +0100

+ Subject: [PATCH 9/9] Issue #80 - config file can be symlink

+ 

+ ---

+  src/trg-prefs.c | 19 ++++++++++++++++++-

+  1 file changed, 18 insertions(+), 1 deletion(-)

+ 

+ diff --git a/src/trg-prefs.c b/src/trg-prefs.c

+ index ff6b1b8..6010912 100644

+ --- a/src/trg-prefs.c

+ +++ b/src/trg-prefs.c

+ @@ -479,7 +479,24 @@ gboolean trg_prefs_save(TrgPrefs * p)

+      g_object_set(G_OBJECT(gen), "pretty", TRUE, NULL);

+      json_generator_set_root(gen, priv->user);

+  

+ -    success = json_generator_to_file(gen, priv->file, NULL);

+ +    if(g_file_test(priv->file, G_FILE_TEST_IS_SYMLINK)) {

+ +	    gsize len;

+ +	    gchar *realFile;

+ +	    gchar *fileData;

+ +        gchar *linkPath = realFile = g_file_read_link(priv->file, NULL);

+ +        if (!g_path_is_absolute (linkPath)) {

+ +            dirName = g_path_get_dirname (priv->file);

+ +            realFile = g_build_filename (dirName, linkPath, NULL);

+ +            g_free(dirName);

+ +            g_free(linkPath);

+ +        }

+ +        fileData = json_generator_to_data (gen, &len);

+ +        success = g_file_set_contents(realFile, fileData, len, NULL);

+ +        g_free(realFile);

+ +        g_free(fileData);

+ +    } else {

+ +        success = json_generator_to_file(gen, priv->file, NULL);

+ +    }

+  

+      if (!success)

+          g_error("Problem writing configuration file (permissions?) to: %s",

+ -- 

+ 2.28.0

+ 

file modified
+18 -5
@@ -1,6 +1,6 @@ 

  Name:           transmission-remote-gtk

  Version:        1.4.1

- Release:        4%{?dist}

+ Release:        5%{?dist}

  Summary:        GTK remote control for the Transmission BitTorrent client

  

  License:        GPLv2+
@@ -19,10 +19,15 @@ 

  BuildRequires:  git

  

  # Upstream patches

- Patch0: 0001-Handle-return-enter-key-press-in-torrent-add-url-dia.patch

- Patch1: 0002-Enable-curl-gzip-compression.patch

- Patch2: 0003-Fix-building-under-GCC-10-fno-common.patch

- Patch3: 0001-link-window-name-to-an-icon-in-app-menu.patch

+ Patch0: 0001-build-Allow-building-with-gettext-0.20.patch

+ Patch1: 0002-Handle-return-enter-key-press-in-torrent-add-url-dia.patch

+ Patch2: 0003-Enable-curl-gzip-compression.patch

+ Patch3: 0004-Fix-building-under-GCC-10-fno-common.patch

+ Patch4: 0005-link-window-name-to-an-icon-in-app-menu.patch

+ Patch5: 0006-Add-Hash-information-in-Torrent-Details-General-tab.patch

+ Patch6: 0007-Fix-some-memory-potential-leaks.patch

+ Patch7: 0008-Mutex-protect-trg_client_get_session_id.patch

+ Patch8: 0009-Issue-80-config-file-can-be-symlink.patch

  

  %description

  transmission-remote-gtk is a GTK client for remote management of
@@ -50,6 +55,14 @@ 

  %{_mandir}/man1/%{name}.1.gz

  

  %changelog

+ * Fri Oct 23 2020 Łukasz Patron <priv.luk@gmail.com> - 1.4.1-5

+ + transmission-remote-gtk-1.4.1-5

+ - Allow building with gettext ≥ 0.20

+ - Add Hash information in Torrent Details > General tab

+ - Fix some memory potential leaks

+ - Mutex protect trg_client_get_session_id

+ - Issue #80 - config file can be symlink

+ 

  * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.1-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

  

  • Also regenerate existing patches so that they
    are in same order as in upstream repository.

rebased onto 4384a37

3 years ago

Build failed.

rebased onto 03c2cea

3 years ago

Build failed.

rebased onto 537b3f7

3 years ago

Build failed.

rebased onto ed509f8

3 years ago

Build failed.

A new upstream release is forthcoming.

Pull-Request has been closed by yselkowitz

2 years ago