diff --git a/aloupe.tcl b/aloupe.tcl index fd2dbca..2621d11 100644 --- a/aloupe.tcl +++ b/aloupe.tcl @@ -11,7 +11,7 @@ package require Tk -package provide aloupe 1.3 +package provide aloupe 1.4 namespace eval ::aloupe { variable solo [expr {[info exist ::argv0] && [file normalize $::argv0] eq [file normalize [info script]]}] @@ -157,7 +157,7 @@ proc ::aloupe::my::CreateDisplay {start} { catch {set fg [dict get $opts -foreground]} catch {set bg [dict get $opts -background]} $data(WDISP) configure -background $bg - grid [label $data(WDISP).l -fg $fg -bg $bg] -row 0 -columnspan 2 -sticky we + grid [label $data(WDISP).l -fg $fg -bg $bg] -row 0 -columnspan 3 -sticky we pack [label $data(WDISP).l.lab1 -text " [::msgcat::mc Size]" -fg $fg -bg $bg] -side left -anchor e -expand 1 pack [ttk::spinbox $data(WDISP).l.sp1 -from 8 -to 500 -justify center \ -width 4 -textvariable ::aloupe::my::size -command ::aloupe::my::ShowLoupe] -side left @@ -167,16 +167,18 @@ proc ::aloupe::my::CreateDisplay {start} { pack [label $data(WDISP).l.lab3 -text " [::msgcat::mc Pause]" -fg $fg -bg $bg] -side left -anchor e -expand 1 pack [ttk::spinbox $data(WDISP).l.sp3 -from 0 -to 60 -justify center \ -width 2 -textvariable ::aloupe::my::pause] -side left - grid [ttk::separator $data(WDISP).sep1 -orient horizontal] -row 1 -columnspan 2 -sticky we -pady 2 - grid [ttk::label $data(LABEL) -image $data(IMAGE) -relief flat] -row 2 -columnspan 2 -padx 2 + grid [ttk::separator $data(WDISP).sep1 -orient horizontal] -row 1 -columnspan 3 -sticky we -pady 2 + grid [ttk::label $data(LABEL) -image $data(IMAGE) -relief flat] -row 2 -columnspan 3 -padx 2 set data(BUT2) $data(WDISP).but2 if {[set but2text $data(-commandname)] eq ""} { set but2text [::msgcat::mc "To clipboard"] } + grid [button $data(WDISP).but0 -text [::msgcat::mc "Refresh"] \ + -command ::aloupe::my::Refresh -font TkFixedFont] -row 3 -column 0 -sticky ew grid [button $data(BUT2) -text $but2text \ - -command ::aloupe::my::Button2Click -font TkFixedFont] -row 3 -column 0 -sticky ew + -command ::aloupe::my::Button2Click -font TkFixedFont] -row 3 -column 1 -sticky ew grid [button $data(WDISP).but1 -text [::msgcat::mc Save] \ - -command ::aloupe::my::Save -fg $fg -bg $bg -font TkFixedFont] -row 3 -column 1 -sticky ew + -command ::aloupe::my::Save -fg $fg -bg $bg -font TkFixedFont] -row 3 -column 2 -sticky ew set data(-geometry) [regexp -inline \\+.* $data(-geometry)] if {$data(-geometry) ne ""} { wm geometry $data(WDISP) $data(-geometry) @@ -364,6 +366,14 @@ proc ::aloupe::my::DisplayImage {w} { wm deiconify $data(WLOUP) focus -force $data(WDISP).but2 } +#_______________________ + +proc ::aloupe::my::Refresh {} { + # Refreshes the loupe image without mouse click. + + variable data + ::aloupe::my::DisplayImage $data(WLOUP) +} # ________________________ Geometry _________________________ # diff --git a/msgs/de.msg b/msgs/de.msg index e7bbca6..5c5a536 100644 --- a/msgs/de.msg +++ b/msgs/de.msg @@ -1,5 +1,6 @@ namespace eval ::aloupe { ::msgcat::mcset de {Loupe} {Lupe} + ::msgcat::mcset de {Refresh} {Aktualisieren} ::msgcat::mcset de {To clipboard} {Zu Zwischenablage} ::msgcat::mcset de {Save} {Speichern} ::msgcat::mcset de {Close} {Schließen} diff --git a/msgs/es.msg b/msgs/es.msg index d574b1a..928a516 100644 --- a/msgs/es.msg +++ b/msgs/es.msg @@ -1,5 +1,6 @@ namespace eval ::aloupe { ::msgcat::mcset es {Loupe} {Lupa} + ::msgcat::mcset es {Refresh} {Refrescar} ::msgcat::mcset es {To clipboard} {A portapapeles} ::msgcat::mcset es {Save} {Guardar} ::msgcat::mcset es {Close} {Cerrar} diff --git a/msgs/ru.msg b/msgs/ru.msg index 7720d7a..4b985ca 100644 --- a/msgs/ru.msg +++ b/msgs/ru.msg @@ -1,5 +1,6 @@ namespace eval ::aloupe { ::msgcat::mcset ru {Loupe} {Лупа} + ::msgcat::mcset ru {Refresh} {Обновить} ::msgcat::mcset ru {To clipboard} {В буфер} ::msgcat::mcset ru {Save} {Сохранить} ::msgcat::mcset ru {Close} {Закрыть} diff --git a/msgs/uk.msg b/msgs/uk.msg index 5d2d6e6..2dd2e6a 100644 --- a/msgs/uk.msg +++ b/msgs/uk.msg @@ -1,5 +1,6 @@ namespace eval ::aloupe { ::msgcat::mcset uk {Loupe} {Лупа} + ::msgcat::mcset uk {Refresh} {Оновити} ::msgcat::mcset uk {To clipboard} {До буферу} ::msgcat::mcset uk {Save} {Зберегти} ::msgcat::mcset uk {Close} {Закрити} diff --git a/pkgIndex.tcl b/pkgIndex.tcl index 15e445e..22f949b 100644 --- a/pkgIndex.tcl +++ b/pkgIndex.tcl @@ -1,5 +1,5 @@ -package ifneeded aloupe 1.3 [list source [file join $dir aloupe.tcl]] +package ifneeded aloupe 1.4 [list source [file join $dir aloupe.tcl]] # A short intro (for Ruff! docs generator:)