Skip to content
This repository
Browse code

Merge branch 'issue-fixes' of github.com:zdia/gorilla into issue-fixes

  • Loading branch information...
commit 25fe6d8cafd02a0a49149ee6010d6e0ad92ff669 2 parents 39dcd46 + ff4216c
Zbigniew Diaczyszyn authored

Showing 2 changed files with 30 additions and 5 deletions. Show diff stats Hide diff stats

  1. +25 5 sources/gorilla.tcl
  2. +5 0 sources/help.txt
30 sources/gorilla.tcl
@@ -58,6 +58,24 @@ if {[catch {package require Tk 8.5} oops]} {
58 58 exit 1
59 59 }
60 60
  61 +# Fix the issue of TTk widgets having different default background colors
  62 +# from Tk widgets (esp. toplevel widgets) by automatically placing a TTk
  63 +# frame in each toplevel when the toplevel is created - this way when
  64 +# widgets are positioned in the toplevel, what should show through behind
  65 +# them is the ::ttk::frame background color, not the ::tk::toplevel
  66 +# background color.
  67 +
  68 +rename toplevel _toplevel
  69 +proc toplevel {path args} {
  70 + _toplevel $path {*}$args
  71 + ::ttk::frame $path.ttkbkg
  72 + place $path.ttkbkg -in $path -anchor nw -x 0 -y 0 -bordermode outside \
  73 + -relheight 1.0 -relwidth 1.0
  74 + # this lower should be redundant, but do it just to be sure
  75 + lower $path.ttkbkg
  76 + return $path
  77 +}
  78 +
61 79 option add *Dialog.msg.wrapLength 6i
62 80
63 81 if {[catch {package require Tcl 8.5}]} {
@@ -1920,7 +1938,7 @@ namespace eval ::gorilla::LoginDialog {
1920 1938 password [ mc Password ] entry ] {
1921 1939 grid [ make-label $top $label ] \
1922 1940 [ set widget($child) [ ttk::$w $top.e-$child -width 40 -textvariable ${pvns}::$child ] ] \
1923   - -sticky news -ipady 5
  1941 + -sticky news -pady 5
1924 1942 } ; # end foreach {child label}
1925 1943
1926 1944 # password should show "*" by default
@@ -1941,7 +1959,7 @@ namespace eval ::gorilla::LoginDialog {
1941 1959
1942 1960 grid [ make-label $top [mc Notes] ] \
1943 1961 $textframe \
1944   - -sticky news -ipady 5
  1962 + -sticky news -pady 5
1945 1963
1946 1964 grid rowconfigure $top $textframe -weight 1
1947 1965 grid columnconfigure $top $textframe -weight 1
@@ -1951,7 +1969,7 @@ namespace eval ::gorilla::LoginDialog {
1951 1969 foreach {child label} $lastChangeList {
1952 1970 grid [ make-label $top $label ] \
1953 1971 [ ttk::label $top.e-$child -textvariable ${pvns}::$child -width 40 -anchor w ] \
1954   - -sticky news -ipady 5
  1972 + -sticky news -pady 5
1955 1973 }
1956 1974
1957 1975 # bias the lengths of the labels to a slightly larger size than the average
@@ -7751,7 +7769,9 @@ proc gorilla::get-selected-tree-data { {returninfo {}} } {
7751 7769
7752 7770 proc gorilla::LaunchBrowser { rn } {
7753 7771
7754   - set URL [ dbget url $rn ]
  7772 + # add quotes around the URL value to protect it from most issues
  7773 + # with {*} expansion
  7774 + set URL \"[ dbget url $rn ]\"
7755 7775 if { $URL eq "" } {
7756 7776 set ::gorilla::status [ mc "The selected login does not contain a URL value." ]
7757 7777 } elseif { $::gorilla::preference(browser-exe) eq "" } {
@@ -7766,7 +7786,7 @@ proc gorilla::LaunchBrowser { rn } {
7766 7786 return
7767 7787 }
7768 7788 }
7769   - if { [ catch { exec $::gorilla::preference(browser-exe) $URL & } mesg ] } {
  7789 + if { [ catch { exec $::gorilla::preference(browser-exe) {*}$URL & } mesg ] } {
7770 7790 tk_dialog .errorurl [ mc "Error" ] "[ mc "Error launching browser, the OS error message is:" ]\n\n$mesg" "" "" [ mc "Oh well..." ]
7771 7791 } else {
7772 7792 set ::gorilla::status "[ mc "Launched browser:" ] $::gorilla::preference(browser-exe)"
5 sources/help.txt
@@ -580,6 +580,11 @@ for various browsers is beyond the scope of Password Gorilla. Please
580 580 consult your browser documentation to determine if any special command line
581 581 parameters are required to launch directly to a URL.
582 582
  583 + | If any parameter contains spaces, you must surround that parameter with
  584 +double quotes (") to ensure that the spaces are properly passed through to
  585 +the browser during the launch process. I.e., C:\Documents and Settings\
  586 +would be entered as: "C:\Documents and Settings\".
  587 +
583 588 '''Also copy username to clipboard'''
584 589
585 590 | If this checkbox is selected, then as part of the launch browser sequence

0 comments on commit 25fe6d8

Please sign in to comment.
Something went wrong with that request. Please try again.