Skip to content

Commit

Permalink
v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
aplsimple committed Feb 28, 2024
1 parent 8219d8b commit 6175101
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 7 deletions.
22 changes: 16 additions & 6 deletions aloupe.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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]]}]
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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 _________________________ #

Expand Down
1 change: 1 addition & 0 deletions msgs/de.msg
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
1 change: 1 addition & 0 deletions msgs/es.msg
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
1 change: 1 addition & 0 deletions msgs/ru.msg
Original file line number Diff line number Diff line change
@@ -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} {Закрыть}
Expand Down
1 change: 1 addition & 0 deletions msgs/uk.msg
Original file line number Diff line number Diff line change
@@ -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} {Закрити}
Expand Down
2 changes: 1 addition & 1 deletion pkgIndex.tcl
Original file line number Diff line number Diff line change
@@ -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:)
Expand Down

0 comments on commit 6175101

Please sign in to comment.