]> git.pld-linux.org Git - packages/WindowMaker.git/blob - WindowMaker-dockit.patch
- rel 19; fix build
[packages/WindowMaker.git] / WindowMaker-dockit.patch
1 --- WindowMaker-0.61.1/WindowMaker/Defaults/WMState.in  Wed Jan  6 16:22:40 1999
2 +++ WindowMaker-0.61.1.dockit/WindowMaker/Defaults/WMState.in   Mon Oct 11 15:40:36 1999
3 @@ -2,7 +2,7 @@
4    Dock = {
5      Applications = (
6        {
7 -        Command = "-";
8 +        Command = dockit;
9          Name = Logo.WMDock;
10          AutoLaunch = No;
11          Forced = No;
12 --- WindowMaker-0.61.1/contrib/dockit   Thu Jan  1 01:00:00 1970
13 +++ WindowMaker-0.61.1.dockit/contrib/dockit    Sun Jan 24 13:33:28 1999
14 @@ -0,0 +1,247 @@
15 +#!/bin/sh
16 +# Only run the following line once \
17 +exec wish -f $0 $@
18 +
19 +##########################################
20 +#Copyright 1998 Kenneth W. Persinger Jr. #
21 +#       Written for WindowMaker                 #
22 +##########################################
23 +
24 +
25 +# You can add the full path for Xprop here.
26 +set xprop xprop
27 +
28 +###############################
29 +# DO NOT EDIT BELOW THIS LINE #
30 +###############################
31 +global xprop;
32 +global instance;set instance "" 
33 +global class;set class ""
34 +global command; set command ""
35 +global Version;set Version V1.2
36 +
37 +
38 +    global Version
39 +    global instance
40 +    global class
41 +    global command
42 +    wm withdraw .
43 +    wm group . .
44 +
45 +    toplevel .dockit -class Dockit
46 +    wm group .dockit .dockit
47 +    wm command .dockit "$argv0 $argv"
48 +    wm iconname .dockit "Dockit   ${Version}"
49 +    wm protocol .dockit WM_DELETE_WINDOW {exit} 
50 +    wm focusmodel .dockit passive
51 +    wm title .dockit "Dockit ${Version}"
52 +    wm geometry .dockit 309x157+440+412
53 +    wm maxsize .dockit 1265 994
54 +    wm minsize .dockit 1 1
55 +    wm overrideredirect .dockit 0
56 +    wm resizable .dockit 0 0
57 +    wm deiconify .dockit
58 +
59 +    label .dockit.msgbar \
60 +        -anchor nw -borderwidth 1 -justify left -relief raised \
61 +        -text "" 
62 +    label .dockit.instlbl \
63 +        -borderwidth 1 -relief raised -text Instance 
64 +    label .dockit.cllbl \
65 +        -borderwidth 1 -relief raised -text Class 
66 +    label .dockit.comlbl \
67 +        -borderwidth 1 -relief raised -text Command 
68 +    entry .dockit.instent -textvariable instance
69 +    entry .dockit.clent -textvariable class
70 +    entry .dockit.coment -textvariable command
71 +    button .dockit.create \
72 +        -padx 9 -pady 3 -text {Create Icon} -command {docreate} 
73 +    button .dockit.exit \
74 +        -padx 9 -pady 3 -text Quit -command exit
75 +    button .dockit.grab \
76 +        -padx 9 -pady 3 -text Grab -command {dograb}
77 +    button .dockit.help \
78 +        -padx 9 -pady 3 -text Help -command {dohelp}
79 +    ###################
80 +    # SETTING GEOMETRY
81 +    ###################
82 +    place .dockit.msgbar \
83 +        -x 5 -y 120 -width 296 -height 33 -anchor nw -bordermode ignore 
84 +    place .dockit.instlbl \
85 +        -x 5 -y 5 -width 76 -height 23 -anchor nw -bordermode ignore 
86 +    place .dockit.cllbl \
87 +        -x 5 -y 30 -width 76 -height 23 -anchor nw -bordermode ignore 
88 +    place .dockit.comlbl \
89 +        -x 5 -y 55 -width 76 -height 23 -anchor nw -bordermode ignore 
90 +    place .dockit.instent \
91 +        -x 85 -y 5 -width 216 -height 22 -anchor nw -bordermode ignore 
92 +    place .dockit.clent \
93 +        -x 85 -y 30 -width 216 -height 22 -anchor nw -bordermode ignore 
94 +    place .dockit.coment \
95 +        -x 85 -y 55 -width 216 -height 22 -anchor nw -bordermode ignore 
96 +    place .dockit.create \
97 +        -x 5 -y 80 -width 77 -height 36 -anchor nw -bordermode ignore 
98 +    place .dockit.exit \
99 +        -x 230 -y 80 -width 72 -height 36 -anchor nw -bordermode ignore 
100 +    place .dockit.grab \
101 +        -x 80 -y 80 -width 77 -height 36 -anchor nw -bordermode ignore 
102 +    place .dockit.help \
103 +        -x 155 -y 80 -width 77 -height 36 -anchor nw -bordermode ignore 
104 +############
105 +# Bindings #
106 +############
107 +    bind all <Leave> {message ""}
108 +    bind .dockit.instlbl <Enter> {message "Instance name goes here.
109 +(the 1st string of WM_CLASS)"}
110 +    bind .dockit.instent <Enter> {message "Instance name goes here.
111 +(the 1st string of WM_CLASS)"}
112 +    bind .dockit.cllbl <Enter> {message "Class name goes here.
113 +(the 2nd string of WM_CLASS)"}
114 +    bind .dockit.clent <Enter> {message "Class name goes here.
115 +(the 2nd string of WM_CLASS)"}
116 +    bind .dockit.comlbl <Enter> {message "The command to execute goes here.
117 +(all of WM_COMMAND)"}
118 +    bind .dockit.coment <Enter> {message "The command to execute goes here.
119 +(all of WM_COMMAND)"}
120 +    bind .dockit.create <Enter> {message "Create you custom AppIcon."}
121 +    bind .dockit.exit <Enter> {message "Exit Dockit!"}
122 +    bind .dockit.help <Enter> {message "Help with creating AppIcons,
123 +and for these commands."}
124 +    bind .dockit.grab <Enter> {message "Grab AppInfo from a running App."} 
125 +
126 +
127 +###################
128 +#   Actual Code   #
129 +###################
130 +
131 +proc message {message} {
132 +    .dockit.msgbar configure -text $message
133 +}
134 +
135 +proc docreate {} {
136 +    global Version
137 +    global instance
138 +    global class
139 +    global command
140 +
141 +    if {$command == ""} {
142 +        tk_dialog .error "DockIt ${Version}: ERROR" \
143 +       "You must supply a command line. Otherwise your icon would do nothing!" \
144 +       "" "" "Doh!"
145 +    } else {
146 +       set insttmp $instance
147 +       set classtmp $class
148 +       set commandtmp $command
149 +
150 +    if {$insttmp == ""} { set insttmp "dockit" }
151 +    if {$classtmp == ""} { set classtmp "DockedApp" }
152 +
153 +    toplevel .$insttmp -class $classtmp
154 +    wm command .$insttmp "$commandtmp"
155 +    wm group .$insttmp .$insttmp
156 +    label .$insttmp.l1 -text "
157 +Great! Your new App-Icon should be finished now.
158 +once you have dragged it to the Dock, Click Finish.
159 +If your Icon doesn't Dock, or does not appear,
160 +Try again. If problems persist, see Dockit's Help."
161 +    button .$insttmp.b1 -text "Finish" -command "destroy .$insttmp"
162 +    pack .$insttmp.l1
163 +    pack .$insttmp.b1
164 +    wm title .$insttmp "Dockit ${Version}: Confirmation"
165 + }
166 +}
167 +
168 +proc dohelp {} {
169 +     global Version
170 +
171 +set HLPTXT { Dockit V1.2
172 +
173 +General Info:
174 +
175 +        Dockit is a tool designed to provide the ability to Dock
176 +        poorly coded programs within WindowMaker.
177 +
178 +        This is not a 100% accurate solution. It was not designed to be.
179 +        It will however, generate a dockable icon 99% of the time.
180 +        for that other 1%, you will need to edit by hand.
181 +
182 +Troubleshooting:
183 +
184 +Error: 'window name starts with an upper-case letter':
185 +
186 +        This is a limitation of Tcl/Tk.
187 +        window/pathnames cannot start with an uppercase letter.
188 +        This behavior is most noticable in Netscape's Navigator.
189 +        It's instance is 'Navigator'
190 +        A work-around to this limitation, is to double-define your App
191 +        settings. (ex:'navigator', and 'Navigator')
192
193 +
194 +Error: couldn't execute "xprop": no such file or directory
195 +
196 +        This means that /usr/X11R6/bin (or its equivilent) 
197 +        is not defined in your path.
198 +        You must add this to your path.
199 +
200 +
201 +
202 +AppIcon does not appear as it should:
203 +
204 +        This could happen for a number of reasons.
205 +        A: You have NoAppIcon defined for that particular App.
206 +        B: One word: El Ni~no
207 +
208 +
209 +
210 +App Closes, but Dots do not appear/ Cannot remove Icon from the Dock:
211 +
212 +        This is the result of a VERY poorly coded App.
213 +        As far as WIndowMaker can tell, the program is still running.
214 +        The only real fix for this, is CTRL + ALT + BACKSPACE
215 +
216 +}
217 +
218 +
219 +   toplevel .userhelp -class Dockit
220 +    wm group .userhelp .dockit
221 +    wm iconname .userhelp "Dockit HELP"
222 +    wm focusmodel .userhelp passive
223 +    wm geometry .userhelp 456x635
224 +    wm maxsize .userhelp 1265 1265
225 +    wm minsize .userhelp 1 1
226 +    wm overrideredirect .userhelp 0
227 +    wm resizable .userhelp 1 1
228 +    wm deiconify .userhelp
229 +    wm title .userhelp "Dockit ${Version}: HELP"
230 +    label .userhelp.text \
231 +        -anchor nw -justify left -borderwidth 1 \
232 +        -text $HLPTXT 
233 +    place .userhelp.text \
234 +        -x 0 -y 0 -anchor nw -bordermode ignore 
235 +
236 +
237 +
238 +}
239 +
240 +proc dograb {} {
241 +   global xprop
242 +   global class
243 +   global instance
244 +   global command
245 +
246 +   catch "open /tmp/xprop1 w+" m1
247 +   exec ${xprop} >@ $m1
248 +   seek $m1 0
249 +   set tmpmsg [read $m1]
250 +   set tmpmsg [split $tmpmsg \n]
251 +   set tclass [lindex $tmpmsg [lsearch -glob $tmpmsg *WM_CLASS*]]
252 +   set tclass [split $tclass ,]
253 +   set class [string trim [lindex $tclass 1] \ \"]
254 +   set instance [string tolower [string trim [lindex [lindex $tclass 0] 2] \ \"]]
255 +   set tcom [lindex $tmpmsg [lsearch -glob $tmpmsg *WM_COMMAND*]]
256 +   set tcom [split [lindex $tcom 2] \,]
257 +   set tcom [split [join $tcom] \"]
258 +   set command [join [join $tcom]]
259 +   close $m1
260 +}
261 +
262 --- WindowMaker-0.61.1/contrib/dockit.1 Thu Jan  1 01:00:00 1970
263 +++ WindowMaker-0.61.1.dockit/contrib/dockit.1  Mon Oct 11 15:39:32 1999
264 @@ -0,0 +1,47 @@
265 +.TH DOCKIT 1 "October 1999" "Window Maker utilities"
266 +.SH NAME
267 +dockit \- Dock 'undockable' applications
268 +.SH SYNOPSIS
269 +.B dockit
270 +.SH DESCRIPTION
271 +.B dockit
272 +is a tool designed to provide the ability to Dock poorly coded programs within 
273 +WindowMaker. 
274 +This is not a 100% accurate solution. It was not designed to be. It will 
275 +however, generate a dockable icon 99% of the time. For that other 1%, you will 
276 +need to edit by hand.
277 +.br
278 +To run dockit you can also double-click on the Dock's main icon.
279 +.SH TROUBLESHOOTING
280 +.TP 
281 +.B Error: window name starts with an upper-case letter
282 +This is a limitation of Tcl/Tk. window/pathnames cannot start with an 
283 +uppercase letter. This behavior is most noticable in Netscape's Navigator.
284 +It's instance is 'Navigator'. A work-around to this limitation, is to 
285 +double-define your App settings (ex:'navigator', and 'Navigator').
286 +.TP 
287 +.B Error: could not execute "xprop": no such file or directory
288 +This means that /usr/X11R6/bin (or its equivilent) is not defined in your 
289 +path. You must add this to your path.
290 +.TP
291 +.B AppIcon does not appear as it should
292 +This could happen for a number of reasons.
293 +.br
294 +A: You have NoAppIcon defined for that particular App.
295 +.br
296 +B: One word: El Ni~no
297 +.TP
298 +.B App Closes, but Dots do not appear / Cannot remove Icon from the Dock
299 +This is the result of a VERY poorly coded App. As far as WindowMaker can tell,
300 +the program is still running. 
301 +The only real fix for this, is CTRL + ALT + BACKSPACE.
302 +.SH FILES
303 +.TP
304 +.B ~/GNUstep/Defaults/WMState
305 +Information about the Dock and Clip. This is the actual file that gets
306 +written. DON'T edit this while running Window Maker. It will be overwritten.
307 +.SH AUTHOR
308 +Dockit was written by Kenneth W. Persinger Jr.
309 +.PP
310 +Man page was written by Piotr Czerwinski <pius@pld.org.pl> for the
311 +PLD/Linux system.
This page took 0.09727 seconds and 3 git commands to generate.