[Commits] [SCM] claws branch, master, updated. 3.18.0-347-g0dea882a3

mones at claws-mail.org mones at claws-mail.org
Sat Mar 19 23:55:04 CET 2022


The branch, master has been updated
       via  0dea882a3af437fb71a169445904966a758a7b3e (commit)
      from  3b03982e3d9cc1412319956d9db707f32435631d (commit)

Summary of changes:
 src/plugins/archive/archiver_gtk.c    | 9 +++------
 src/plugins/clamd/clamav_plugin_gtk.c | 2 +-
 src/plugins/fancy/fancy_viewer.c      | 3 ++-
 3 files changed, 6 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit 0dea882a3af437fb71a169445904966a758a7b3e
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Mar 19 23:54:09 2022 +0100

    Use our utils wrapper which already has it
    
    Backport of gtk3 commit 88d5cca731f4067e90f928bb591f94fd4ea723ff

diff --git a/src/plugins/archive/archiver_gtk.c b/src/plugins/archive/archiver_gtk.c
index 452be9280..d4add02cb 100644
--- a/src/plugins/archive/archiver_gtk.c
+++ b/src/plugins/archive/archiver_gtk.c
@@ -935,7 +935,6 @@ static void filesel_cb(GtkWidget *widget, gpointer data)
 	GtkWidget *dialog;
 	gchar* file;
 	gint newpos = 0;
-	const gchar* homedir;
 	struct ArchivePage* page = (struct ArchivePage *) data;
 
 	dialog = gtk_file_chooser_dialog_new(
@@ -945,15 +944,13 @@ static void filesel_cb(GtkWidget *widget, gpointer data)
 			GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 			GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
 			NULL);
-	homedir = g_getenv("HOME");
-	if (!homedir)
-		homedir = g_get_home_dir();
 
 	if (archiver_prefs.save_folder)
-		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), 
+		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
 						    archiver_prefs.save_folder);
 	else
-		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), homedir);
+		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
+						    get_home_dir());
 	if (gtk_dialog_run (GTK_DIALOG(dialog)) == GTK_RESPONSE_APPLY) {
 		file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
 		if (file) {
diff --git a/src/plugins/clamd/clamav_plugin_gtk.c b/src/plugins/clamd/clamav_plugin_gtk.c
index 9d2a9ca8c..bddf9328e 100644
--- a/src/plugins/clamd/clamav_plugin_gtk.c
+++ b/src/plugins/clamd/clamav_plugin_gtk.c
@@ -124,7 +124,7 @@ static void folder_permission_cb(GtkWidget *widget, gpointer data) {
 			".claws-mail/mimetmp",
 			".claws-mail/tmp",
 			NULL};
-	const gchar* home = g_get_home_dir();
+	const gchar* home = get_home_dir();
 	int i;
 
 	check_permission((gchar *) home);
diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index 9bc43459f..a2803b7bb 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -29,6 +29,7 @@
 #include <fancy_prefs.h>
 #include <alertpanel.h>
 #include <file-utils.h>
+#include <utils.h>
 
 #include <printing.h>
 #include <webkit/webkithittestresult.h>
@@ -703,7 +704,7 @@ static void download_file_cb(GtkWidget *widget, FancyViewer *viewer)
 #endif
 	const gchar *link = viewer->cur_link;
 	gchar *filename = g_utf8_strchr(link, -1, g_utf8_get_char("/"));
-	filename = g_strconcat(g_get_home_dir(), filename, NULL);
+	filename = g_strconcat(get_home_dir(), filename, NULL);
 	gchar *fname = filesel_select_file_save(_("Save as"), filename);
 	if (!fname) {
 		g_free(filename);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list