summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-12-12 18:16:51 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-12-12 18:16:51 (GMT)
commit0a56bd1265428cd02a8ce56bad7c3058ba188327 (patch)
tree9495a8a327b2be2cf3bc9b97e500609c1ccaaf99 /ds9
parenta584e8d9f4e196829cc0b2198a0641ad21f5b7b8 (diff)
downloadblt-0a56bd1265428cd02a8ce56bad7c3058ba188327.zip
blt-0a56bd1265428cd02a8ce56bad7c3058ba188327.tar.gz
blt-0a56bd1265428cd02a8ce56bad7c3058ba188327.tar.bz2
add keyboard shortcut ^W
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/3d.tcl5
-rw-r--r--ds9/library/bin.tcl4
-rw-r--r--ds9/library/block.tcl7
-rw-r--r--ds9/library/catcdssrchdialog.tcl4
-rw-r--r--ds9/library/catdialog.tcl4
-rw-r--r--ds9/library/dialog.tcl3
-rw-r--r--ds9/library/ds9.tcl1
7 files changed, 20 insertions, 8 deletions
diff --git a/ds9/library/3d.tcl b/ds9/library/3d.tcl
index f3a9f99..5e4b515 100644
--- a/ds9/library/3d.tcl
+++ b/ds9/library/3d.tcl
@@ -59,7 +59,8 @@ proc 3DDialog {} {
$mb.file add command -label [msgcat::mc {Apply}] -command 3DApplyDialog
$mb.file add command -label [msgcat::mc {Reset}] -command 3DResetDialog
$mb.file add separator
- $mb.file add command -label [msgcat::mc {Close}] -command 3DDestroyDialog
+ $mb.file add command -label [msgcat::mc {Close}] \
+ -command 3DDestroyDialog -accelerator "${ds9(ctrl)}W"
EditMenu $mb ithreed
@@ -137,6 +138,8 @@ proc 3DDialog {} {
pack $w.buttons $w.sep $w.status $w.sep2 -side bottom -fill x
pack $w.param $w.sep3 $w.scale -side top -fill x
+ bind $w <<Close>> 3DDestroyDialog
+
Update3DDialog
}
diff --git a/ds9/library/bin.tcl b/ds9/library/bin.tcl
index f8ec3ec..7df0450 100644
--- a/ds9/library/bin.tcl
+++ b/ds9/library/bin.tcl
@@ -228,7 +228,7 @@ proc BinDialog {} {
-command BinClearFilterDialog
$mb.file add separator
$mb.file add command -label [msgcat::mc {Close}] \
- -command BinDestroyDialog
+ -command BinDestroyDialog -accelerator "${ds9(ctrl)}W"
EditMenu $mb ibin
@@ -358,6 +358,8 @@ proc BinDialog {} {
set dbin(auto) 0
set dbin(minmax) 1
+ bind $w <<Close>> BinDestroyDialog
+
UpdateBinDialog
}
diff --git a/ds9/library/block.tcl b/ds9/library/block.tcl
index e06b447..3d84228 100644
--- a/ds9/library/block.tcl
+++ b/ds9/library/block.tcl
@@ -107,7 +107,7 @@ proc BlockDialog {} {
-command BlockApplyDialog
$mb.file add separator
$mb.file add command -label [msgcat::mc {Close}] \
- -command BlockDestroyDialog
+ -command BlockDestroyDialog -accelerator "${ds9(ctrl)}W"
EditMenu $mb iblock
@@ -141,8 +141,7 @@ proc BlockDialog {} {
# Buttons
set f [ttk::frame $w.buttons]
ttk::button $f.apply -text [msgcat::mc {Apply}] -command BlockApplyDialog
- ttk::button $f.close -text [msgcat::mc {Close}] \
- -command BlockDestroyDialog
+ ttk::button $f.close -text [msgcat::mc {Close}] -command BlockDestroyDialog
pack $f.apply $f.close -side left -expand true -padx 2 -pady 4
# Fini
@@ -152,6 +151,8 @@ proc BlockDialog {} {
$w.param.blockx select range 0 end
+ bind $w <<Close>> BlockDestroyDialog
+
UpdateBlockDialog
}
diff --git a/ds9/library/catcdssrchdialog.tcl b/ds9/library/catcdssrchdialog.tcl
index 6acddac..c581588 100644
--- a/ds9/library/catcdssrchdialog.tcl
+++ b/ds9/library/catcdssrchdialog.tcl
@@ -74,7 +74,7 @@ proc CATCDSSrchDialog {varname} {
-command "CATCDSSrchSaveFile $varname"
$mb.file add separator
$mb.file add command -label [msgcat::mc {Close}] \
- -command "CATCDSSrchDestroy $varname"
+ -command "CATCDSSrchDestroy $varname" -accelerator "${ds9(ctrl)}W"
# edit
AREditMenu $varname
@@ -249,6 +249,8 @@ proc CATCDSSrchDialog {varname} {
$var(listbox,mission) selection set 0
$var(listbox,astro) selection set 0
$w.param.name.source select range 0 end
+
+ bind $w <<Close>> [list CATCDSSrchDestroy $varname]
}
proc CATCDSSrchApply {varname} {
diff --git a/ds9/library/catdialog.tcl b/ds9/library/catdialog.tcl
index 6ceadc9..6470d07 100644
--- a/ds9/library/catdialog.tcl
+++ b/ds9/library/catdialog.tcl
@@ -154,7 +154,7 @@ proc CATDialog {varname format catalog title action} {
-command [list CATPrint $varname]
$mb.file add separator
$mb.file add command -label [msgcat::mc {Close}] \
- -command [list CATDestroy $varname]
+ -command [list CATDestroy $varname] -accelerator "${ds9(ctrl)}W"
# Import
menu $mb.file.import
@@ -471,6 +471,8 @@ proc CATDialog {varname format catalog title action} {
pack $w.cat $w.obj $w.param -side top -fill x
pack $w.tbl -side top -fill both -expand true
+ bind $w <<Close>> [list CATDestroy $varname]
+
# needs to go after sort menu button is defined
CATSortMenu $varname
CATColsMenu $varname
diff --git a/ds9/library/dialog.tcl b/ds9/library/dialog.tcl
index e3a454f..1089faa 100644
--- a/ds9/library/dialog.tcl
+++ b/ds9/library/dialog.tcl
@@ -290,7 +290,7 @@ proc SimpleTextDialog {varname title width height action pos txt
}
$var(mb).file add separator
$var(mb).file add command -label [msgcat::mc {Close}] \
- -command "SimpleTextDestroy $varname"
+ -command "SimpleTextDestroy $varname" -accelerator "${ds9(ctrl)}W"
$var(mb) add cascade -label [msgcat::mc {Edit}] -menu $var(mb).edit
menu $var(mb).edit
@@ -348,6 +348,7 @@ proc SimpleTextDialog {varname title width height action pos txt
bind $var(top) <<Find>> [list SimpleTextFind $varname]
bind $var(top) <<FindNext>> [list SimpleTextFindNext $varname]
+ bind $var(top) <<Close>> [list SimpleTextDestroy $varname]
# some window managers need a hint
raise $var(top)
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl
index d031d80..07efef1 100644
--- a/ds9/library/ds9.tcl
+++ b/ds9/library/ds9.tcl
@@ -423,6 +423,7 @@ event add <<Print>> <${ds9(ctrl)}p>
event add <<SelectAll>> <${ds9(ctrl)}a>
event add <<Find>> <${ds9(ctrl)}f>
event add <<FindNext>> <${ds9(ctrl)}g>
+event add <<Close>> <${ds9(ctrl)}w>
switch $ds9(wm) {
x11 -
win32 {