mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-16 06:18:47 +02:00
Make TkRemind support --version
This commit is contained in:
@@ -18,10 +18,12 @@ binary. If you are using Tcl/Tk 8.5, you may also need either the Img
|
|||||||
or the tkpng extension to handle PNG images.
|
or the tkpng extension to handle PNG images.
|
||||||
|
|
||||||
.SH COMMAND-LINE OPTIONS
|
.SH COMMAND-LINE OPTIONS
|
||||||
\fBTkRemind\fR itself has no command-line options. However, it passes
|
\fBTkRemind\fR itself has only one command-line option:
|
||||||
any command-line argument starting with \fB\-\fR to \fBRemind\fR as an
|
\fB\-\-version\fR, which makes it print the version of \fBTkRemind\fR
|
||||||
option. In addition, \fBTkRemind\fR will respect the \fB\-m\fR and
|
and exit. Any other command-line argument starting with \fB\-\fR to
|
||||||
\fB\-b1\fR options and adjust its appearance accordingly.
|
\fBRemind\fR as an option. In addition, \fBTkRemind\fR will respect
|
||||||
|
the \fB\-m\fR and \fB\-b1\fR options and adjust its appearance
|
||||||
|
accordingly.
|
||||||
.PP
|
.PP
|
||||||
\fIRead_file\fR is the file from which \fBTkRemind\fR reads reminders.
|
\fIRead_file\fR is the file from which \fBTkRemind\fR reads reminders.
|
||||||
It is in standard \fBRemind\fR format. \fIWrite_file\fR is the file
|
It is in standard \fBRemind\fR format. \fIWrite_file\fR is the file
|
||||||
|
|||||||
@@ -442,6 +442,10 @@ proc Initialize {} {
|
|||||||
set PSCmd "$Remind -itkremind=1 -itkprint=1 -pp%WEEKS% -l %EXTRA%"
|
set PSCmd "$Remind -itkremind=1 -itkprint=1 -pp%WEEKS% -l %EXTRA%"
|
||||||
set i 0
|
set i 0
|
||||||
while {$i < $argc} {
|
while {$i < $argc} {
|
||||||
|
if {"[lindex $argv $i]" == "--version"} {
|
||||||
|
puts "tkremind version @VERSION@"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
if {[regexp -- {-[bgxim].*} [lindex $argv $i]]} {
|
if {[regexp -- {-[bgxim].*} [lindex $argv $i]]} {
|
||||||
append CommandLine " [lindex $argv $i]"
|
append CommandLine " [lindex $argv $i]"
|
||||||
append PSCmd " [lindex $argv $i]"
|
append PSCmd " [lindex $argv $i]"
|
||||||
@@ -3602,11 +3606,11 @@ proc main {} {
|
|||||||
font create BoldFont {*}[font actual TkDefaultFont] -weight bold
|
font create BoldFont {*}[font actual TkDefaultFont] -weight bold
|
||||||
|
|
||||||
global AppendFile HighestTagSoFar DayNames
|
global AppendFile HighestTagSoFar DayNames
|
||||||
|
catch { SetFonts }
|
||||||
|
Initialize
|
||||||
catch {
|
catch {
|
||||||
puts "\nTkRemind Copyright (C) 1996-2026 Dianne Skoll"
|
puts "\nTkRemind Copyright (C) 1996-2026 Dianne Skoll"
|
||||||
}
|
}
|
||||||
catch { SetFonts }
|
|
||||||
Initialize
|
|
||||||
|
|
||||||
# If no $ConfigFile file, create an empty one
|
# If no $ConfigFile file, create an empty one
|
||||||
if {![file exists $ConfigFile]} {
|
if {![file exists $ConfigFile]} {
|
||||||
|
|||||||
Reference in New Issue
Block a user