Package: saods9 / 8.0.1+repack-2

ds9-Make-the-doc-package-optional-by-disabling-the-help-m.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From: Ole Streicher <debian@liska.ath.cx>
Date: Fri, 16 Dec 2016 09:23:38 +0100
Subject: [ds9] Make the "-doc" package optional by disabling the help menu

---
 ds9/library/mhelp.tcl | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/ds9/library/mhelp.tcl b/ds9/library/mhelp.tcl
index f8ba73f..6b92ad8 100644
--- a/ds9/library/mhelp.tcl
+++ b/ds9/library/mhelp.tcl
@@ -8,6 +8,7 @@ package provide DS9 1.0
 
 proc HelpMainMenu {} {
     global ds9
+    global help
 
     switch $ds9(wm) {
  	x11 -
@@ -20,30 +21,35 @@ proc HelpMainMenu {} {
 	}
     }
 
+    if [ file exists $help(refman) ] {
+      set helpstate normal
+    } else {
+      set helpstate disabled
+    }
     $ds9(mb) add cascade -label [msgcat::mc {Help}] -menu $ds9(mb).help
     menu $ds9(mb).help
     switch $ds9(wm) {
  	x11 -
  	win32 {
 	    $ds9(mb).help add command -label [msgcat::mc {Reference Manual}]\
-		-command HelpRef
+		-command HelpRef -state $helpstate
 	}
  	aqua {}
     }
     $ds9(mb).help add command -label [msgcat::mc {User Manual}]\
-	-command HelpUser
+	-command HelpUser -state $helpstate
     $ds9(mb).help add separator
     $ds9(mb).help add command -label [msgcat::mc {FAQ}] \
-	-command HelpFAQ
+	-command HelpFAQ -state $helpstate
     $ds9(mb).help add command -label [msgcat::mc {Release Notes}] \
-	-command HelpRelease
+	-command HelpRelease -state $helpstate
     $ds9(mb).help add command -label [msgcat::mc {Help Desk}] \
-	-command HelpDesk
+	-command HelpDesk -state $helpstate
     $ds9(mb).help add separator
     $ds9(mb).help add command -label [msgcat::mc {Story of SAOImageDS9}] \
-	-command HelpStory
+	-command HelpStory -state $helpstate
     $ds9(mb).help add command -label [msgcat::mc {Acknowledgment}] \
-	-command HelpAck
+	-command HelpAck -state $helpstate
 
     switch $ds9(wm) {
 	x11 -