[Commits] [SCM] claws branch, gtk3, updated. 4.0.0-431-g88d5cca73

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


The branch, gtk3 has been updated
       via  88d5cca731f4067e90f928bb591f94fd4ea723ff (commit)
      from  58c44fcf5d964a2e6df530bfa8b4318bea53d113 (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 88d5cca731f4067e90f928bb591f94fd4ea723ff
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Mar 19 23:52:48 2022 +0100

    Use our utils wrapper which already has it

diff --git a/src/plugins/archive/archiver_gtk.c b/src/plugins/archive/archiver_gtk.c
index f36027e0b..b352634cc 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)
 			_("_Cancel"), GTK_RESPONSE_CANCEL,
 			_("_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 0b7e20abc..c5b72a638 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 b7d1988ea..49c7769b6 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -31,6 +31,7 @@
 #include <fancy_prefs.h>
 #include <alertpanel.h>
 #include <file-utils.h>
+#include <utils.h>
 
 #include <printing.h>
 
@@ -801,7 +802,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