[Commits] [SCM] clawsker branch, master, updated. 1.1.1-3-g566c553
mones at claws-mail.org
mones at claws-mail.org
Thu Jul 12 00:11:25 CEST 2018
The branch, master has been updated
via 566c5535b6faceb69ff2d81cf7a7fa4f61189b74 (commit)
from b805274264e103348ae887f2b2f1b18b9dd846d1 (commit)
Summary of changes:
clawsker | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 566c5535b6faceb69ff2d81cf7a7fa4f61189b74
Author: Ricardo Mones <ricardo at mones.org>
Date: Thu Jul 12 00:10:53 2018 +0200
Don't clear modifications when saving fails
diff --git a/clawsker b/clawsker
index 67adb42..b25168c 100755
--- a/clawsker
+++ b/clawsker
@@ -2632,7 +2632,7 @@ sub load_preferences {
}
# save current preferences to disc
-sub save_preferences {
+sub save_rc_preferences {
my $rc = get_rc_filename ();
log_message ("Saving preferences to $rc\n");
return FALSE unless check_rc_file ($rc);
@@ -2684,6 +2684,14 @@ sub save_hk_preferences {
return TRUE;
}
+sub save_preferences {
+ my $result = save_rc_preferences ()
+ and save_ac_preferences ()
+ and save_hk_preferences ();
+ $MODIFIED = 0 if $result;
+ return $result;
+}
+
# create notebook
sub new_notebook {
my $nb = Gtk2::Notebook->new;
@@ -2775,13 +2783,7 @@ sub new_button_box {
# signal handlers
$b_exit->signal_connect (clicked => sub { exit_handler($parent) });
$b_apply->set_sensitive (not $READONLY);
- $b_apply->signal_connect (clicked => sub {
- save_preferences ($parent);
- save_ac_preferences ($parent);
- save_hk_preferences ($parent);
- $MODIFIED = 0;
- return TRUE;
- });
+ $b_apply->signal_connect (clicked => sub { save_preferences($parent) });
# $b_undo->signal_connect (clicked => sub { undo_current_changes });
$b_about->signal_connect (clicked => sub { $adlg->run; $adlg->hide });
# package them
-----------------------------------------------------------------------
hooks/post-receive
--
Hidden preferences editor for Claws Mail
More information about the Commits
mailing list