for ($ARGV[$arg]) {
/--help/ && do {
&print_help;
- exit 0;
+ return FALSE;
};
/--verbose/ && do {
$VERBOSE = TRUE;
}
++$arg;
}
+ # eveything continues...
+ return TRUE;
}
# update the hidden preferences status from loaded values
$HPVALUE{${$hash}{$key}[NAME]} = $PREFS{${$hash}{$key}[NAME]};
}
}
+ return TRUE;
}
# load current status from disc
sub load_preferences() {
my $rc = &get_rc_filename;
- &check_rc_file ($rc) or return FALSE;
- &check_claws_not_running or return FALSE;
+ &log_message ("Loading preferences from $rc\n");
+ return FALSE unless &check_rc_file ($rc);
+ return FALSE unless &check_claws_not_running;
open (RCF, "<$rc");
while (<RCF>) {
chomp;
# save current preferences to disc
sub save_preferences() {
my $rc = &get_rc_filename;
- &check_rc_file ($rc) or return FALSE;
- &check_claws_not_running or return FALSE;
+ &log_message ("Saving preferences to $rc\n");
+ return FALSE unless &check_rc_file ($rc);
+ return FALSE unless &check_claws_not_running;
my $rcbak = "$rc.backup";
rename ($rc, $rcbak);
open (RCF, ">$rc");
# initialise
$main_window = Gtk2::Window->new ('toplevel');
-&parse_command_line;
-&load_preferences or exit;
-&init_hidden_preferences or exit;
+exit unless &parse_command_line;
+exit unless &load_preferences;
+exit unless &init_hidden_preferences;
# create main GUI
my $box = Gtk2::VBox->new (FALSE, 5);
$box->set_border_width(3);