24 " |
40 " |
25 |
41 |
26 <resource: #image> |
42 <resource: #image> |
27 |
43 |
28 ^Icon |
44 ^Icon |
29 constantNamed:'BookmarksDialog class fileIn22x22Icon' |
45 constantNamed:'BookmarksEditDialog class fileIn22x22Icon' |
30 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
46 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
31 @@@@@@@@GQ4]GQ4]GQ4]GQ4]GQ4]GP@@@@@@@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4]GQ4]GQ4]GQ4]GQ4]@ATUEQTUEQTUEA4]GQ4]GQ4]GQ4]GP@U |
47 GQ4]GQ4]GQ4]GQ4]GQ4]GP@@@@@@@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4]GQ4]GQ4]GQ4]GQ4]@@@@@@@@GQ4]GQ4]GQ4]GQ4]EATUEQTUEQTU@A4] |
32 GQ4]DPP''I!!TTGQ4]GQ4]GQ4]GQ4@EQ4]GP$K@"XUG!!P]GQ4]GQ4]GQ4]@AT]GQ4IDPX&EAPTEA4]GQ4]GQ4]GP@UGQ4]C1DEI!!<)HQP]@A4]GQ4]GQ4@EQ4] |
48 GQ4]GQ4]GQ4]EAT&I0PQGQ4]EP@]GQ4]GQ4]GQ4]EA8UI HKBQ4]GQT@GQ4]GQ4]GQ4]EAPTEBXFDP$]GQ4U@A4]GQ4]GQ4@GQP!!JQ<&AQDOGQ4]EP@]GQ4] |
33 GQLIFQ,)JQ\TGP@@GQ4]GQ4]@AT]GQ4]BRH)JR$)JR$)JR$)GQ4]GP@UGQ4SDPP)JR$)JR$)JR$)JQ4]GQ4@EQ4SC1 )JR$)JR$)JR$)JR$@@A4]@AT]GQDZ |
49 GQ4@@A4TE2$)F1$ID14]GQT@GQ4]GR$)JR$)JR$)JR$"BQ4]GQ4U@A4]GQ4)JR$)JR$)JR$)JPPQD14]EP@]GP@@JR$)JR$)JR$)JR$)F@<SGQT@GQ4@GR$) |
34 F2$)JR$)JR$)JR$)GP@]GQ4UGP<LAPX&JR$)JR$)JR$)JP@@GQ4]EQ4@H TFI 8)JPDTGP@@GQ4]GQ4]GQT]ABHEF!!,NJB$AEA4@@A4]GQ4]GQ4UGRHYF XB |
50 JR$)JR$)JR$)F1(QGQ4U@A4]@@@)JR$)JR$)JR$)I XEC@<]EQ4]GQ4]GQ4@@A4T@R$)C"XFARH@GQT]GQ4]GQ4]@@@]E@D)J@8[F T"AA4UGQ4]GQ4]GQ4] |
35 C!!<J@QP]GQ4]GQ4]GQ4]EP$"H TFI 8(B DTGQ4]GQ4]GQ4]@APTEAPTEAPTEAPTEA4]GQ4]GQ4]GP@@@@@@@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4] |
51 GQPAB!!<N@ XZFRH]EQ4]GQ4]GQ4]GQ4T@P((C"XFARH"BQT]GQ4]GQ4]GQ4]EAPTEAPTEAPTEAPT@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4]GQ4]GQ4] |
36 GQ4]GQ4]GQ4]GQ4]@@@@@@@@@@@@@@@@@A4]GQ4]GQ4]GP@a') ; colorMapFromArray:#[250 250 255 225 225 237 236 236 244 213 213 228 245 245 252 241 241 248 239 239 246 216 216 230 210 210 224 252 252 255 229 229 239 248 248 254 244 244 250 219 219 232 234 234 243 253 253 255 232 232 241 249 249 254 224 224 236 254 254 255 156 156 182 208 208 223 206 206 221 204 204 219 246 246 253 242 242 249 240 240 247 238 238 245 215 215 229 255 255 255 211 211 225 230 230 240 228 228 238 201 201 218 243 243 249 222 222 235 220 220 233 218 218 231 235 235 244 233 233 242 231 231 240 248 0 0]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@_<@@_>@@_?@@_? @_? @_? @_??@_??@_??@_??@_??@_? @_? @_? @_? @_? @@@@@@@@@@@@@') ; yourself); yourself] |
52 GQ4]GQ4]@@@@@@@@GQ4]GQ4]GQ4]@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[250 250 255 225 225 237 236 236 244 213 213 228 245 245 252 241 241 248 239 239 246 216 216 230 210 210 224 252 252 255 229 229 239 248 248 254 244 244 250 219 219 232 234 234 243 253 253 255 232 232 241 249 249 254 224 224 236 254 254 255 156 156 182 208 208 223 206 206 221 204 204 219 246 246 253 242 242 249 240 240 247 238 238 245 215 215 229 255 255 255 211 211 225 230 230 240 228 228 238 201 201 218 243 243 249 222 222 235 220 220 233 218 218 231 235 235 244 233 233 242 231 231 240 248 0 0]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@?8@A?8@C?8@G?8@G?8@G?8C??8C??8C??8C??8C??8@G?8@G?8@G?8@G?8@G?8@@@@@@@@@@@@') ; yourself); yourself] |
|
53 ! |
|
54 |
|
55 fileOut22x22Icon |
|
56 "This resource specification was automatically generated |
|
57 by the ImageEditor of ST/X." |
|
58 |
|
59 "Do not manually edit this!! If it is corrupted, |
|
60 the ImageEditor may not be able to read the specification." |
|
61 |
|
62 " |
|
63 self fileOut22x22Icon inspect |
|
64 ImageEditor openOnClass:self andSelector:#fileOut22x22Icon |
|
65 Icon flushCachedIcons |
|
66 " |
|
67 |
|
68 <resource: #image> |
|
69 |
|
70 ^Icon |
|
71 constantNamed:'BookmarksEditDialog class fileOut22x22Icon' |
|
72 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
73 GQ4]GQ4]GQ4]GQ4]GQ4]GP@@@@@@@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4]GQ4]GQ4]GQ4]GQ4]@@@@@@@@GQ4]GQ4]GQ4]GQ4]EATUEQTUEQTU@A4] |
|
74 GQ4]GQ4]GQ4]EAT&I0PQGQ4]EP@]GQ4]GQ4]GQ4]EA8UI HKBQ4]GQT@GQ4]GQ4]GQ4]EAPTEBXFDP$]GQ4U@A4]GQ4]GQ4@GQP!!JQ<&AQDOGQ4]EP@]GQ4] |
|
75 GQ4@@A4TE2$)F1$ID14]GQT@GQ4]GR$)JR$)JR$)JR$"BQ4]GQ4U@A4]GQ4)JR$)JR$)JR$)JPPQD14]EP@]GP@@JR$)JR$)JR$)JR$)F@<SGQT@GQ4@GR$) |
|
76 JR$)JR$)JR$)F1(QGQ4U@A4]@@@)JR$)JR$)JR$)I XEC@<]EQ4]GQ4]GQ4@@A4T@R$)C"XFARH@GQT]GQ4]GQ4]@@@]E@D)J@8[F T"AA4UGQ4]GQ4]GQ4] |
|
77 GQPAB!!<N@ XZFRH]EQ4]GQ4]GQ4]GQ4T@P((C"XFARH"BQT]GQ4]GQ4]GQ4]EAPTEAPTEAPTEAPT@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4]GQ4]GQ4] |
|
78 GQ4]GQ4]@@@@@@@@GQ4]GQ4]GQ4]@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[250 250 255 225 225 237 236 236 244 213 213 228 245 245 252 241 241 248 239 239 246 216 216 230 210 210 224 252 252 255 229 229 239 248 248 254 244 244 250 219 219 232 234 234 243 253 253 255 232 232 241 249 249 254 224 224 236 254 254 255 156 156 182 208 208 223 206 206 221 204 204 219 246 246 253 242 242 249 240 240 247 238 238 245 215 215 229 255 255 255 211 211 225 230 230 240 228 228 238 201 201 218 243 243 249 222 222 235 220 220 233 218 218 231 235 235 244 233 233 242 231 231 240 248 0 0]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@?8@A?8@C?8@G?8@G?8@G?8C??8C??8C??8C??8C??8@G?8@G?8@G?8@G?8@G?8@@@@@@@@@@@@') ; yourself); yourself] |
37 ! |
79 ! |
38 |
80 |
39 icon |
81 icon |
40 |
82 |
41 ^ ToolbarIconLibrary directoryBookmarksIcon |
83 ^ ToolbarIconLibrary directoryBookmarksIcon |
|
84 ! |
|
85 |
|
86 sort22x22Icon |
|
87 "This resource specification was automatically generated |
|
88 by the ImageEditor of ST/X." |
|
89 |
|
90 "Do not manually edit this!! If it is corrupted, |
|
91 the ImageEditor may not be able to read the specification." |
|
92 |
|
93 " |
|
94 self sort22x22Icon inspect |
|
95 ImageEditor openOnClass:self andSelector:#sort22x22Icon |
|
96 Icon flushCachedIcons |
|
97 " |
|
98 |
|
99 <resource: #image> |
|
100 |
|
101 ^Icon |
|
102 constantNamed:'BookmarksEditDialog class sort22x22Icon' |
|
103 ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' |
|
104 GQ4]GQ4]GQ4]GQ4]GQ4]GP@@@@@@@A4]GQ4]GQ4]GQ4]GQ4]GQ4@@@@@@@@]GQ4*J"(*GQ4TEQTUEQTUEQTUEQT@GQ4*GQ4]J!!4]EATUEQTUEQTUEQTU@A4] |
|
105 J!!4]GR(]GQP&I"X&I0PQGQ4]EP@]GR(]GQ4*GQ4TI"(*I HKBQ4]GQT@GQ4]J"(*J"(]EBX&I"XFDP$]GQ4U@A4]GQ4]GP@@GQPAJ"(*AQDOGQ4]EP@]GQ4] |
|
106 J @@@@@T@PTEF1$ID14]GQT@GQ4]GR()JR$)E@D*J"(*BQ4]GQ4U@A4]@@@*JR$)JQPAAPTEAPPQD14]EP@]GP@]J"$)JR$T@R(*J"(*F@<SGQT@GQ4*J"(* |
|
107 J"$)E@DEAPTEF1(QGQ4UGQ4]GR(*J @@GQPAJ"(*J"(*C@<]EQ4]GQ4]J!!4@@A4T@PTEC"XFARH@GQT]GQ4]GQ4]GQ4]E@D*J"(*J"(*AA4UGQ4]J"(*J"(] |
|
108 GQPAB!!<N@ XZFRH]EQ4]GQ4]GR(@GQ4T@R(*J"(*J"(*GQT@GQ4]GR(@GQ4]E@DJJ@8&A T"H $U@A4]@B(]GQ4]GQPTEAPTEAPTEAPTE@@]GR(*J"(*GQ4] |
|
109 GQ4]GQ4]@@@@@@@@GQ4@@@@@@@@]@@@@@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[250 250 255 225 225 237 236 236 244 213 213 228 245 245 252 241 241 248 239 239 246 216 216 230 210 210 224 252 252 255 229 229 239 248 248 254 244 244 250 219 219 232 234 234 243 253 253 255 232 232 241 249 249 254 224 224 236 254 254 255 156 156 182 208 208 223 206 206 221 204 204 219 246 246 253 242 242 249 240 240 247 238 238 245 215 215 229 255 255 255 211 211 225 230 230 240 228 228 238 201 201 218 243 243 249 222 222 235 220 220 233 218 218 231 235 235 244 233 233 242 231 231 240 248 0 0 0 0 0]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@G @@H''?8H''?8H''?8G7?8@G?8BG?8BG?8BG?8BG?8O''?8GG?8BG?8@G?8O''?8AG?8BG?8DG?8O @@@@@@') ; yourself); yourself] |
42 ! ! |
110 ! ! |
43 |
111 |
44 !BookmarksEditDialog class methodsFor:'interface specs'! |
112 !BookmarksEditDialog class methodsFor:'interface specs'! |
45 |
113 |
46 windowSpec |
114 windowSpec |
155 ) |
223 ) |
156 (MenuItem |
224 (MenuItem |
157 label: '-' |
225 label: '-' |
158 ) |
226 ) |
159 (MenuItem |
227 (MenuItem |
|
228 activeHelpKey: moveUp |
160 enabled: upButtonEnabledHolder |
229 enabled: upButtonEnabledHolder |
161 label: 'Up' |
230 label: 'Up' |
162 itemValue: up |
231 itemValue: up |
163 translateLabel: true |
232 translateLabel: true |
164 labelImage: (ResourceRetriever XPToolbarIconLibrary up22x22Icon) |
233 labelImage: (ResourceRetriever XPToolbarIconLibrary up22x22Icon) |
165 ) |
234 ) |
166 (MenuItem |
235 (MenuItem |
|
236 activeHelpKey: moveDown |
167 enabled: downButtonEnabledHolder |
237 enabled: downButtonEnabledHolder |
168 label: 'Down' |
238 label: 'Down' |
169 itemValue: down |
239 itemValue: down |
170 translateLabel: true |
240 translateLabel: true |
171 labelImage: (ResourceRetriever XPToolbarIconLibrary down22x22Icon) |
241 labelImage: (ResourceRetriever XPToolbarIconLibrary down22x22Icon) |
172 ) |
242 ) |
173 (MenuItem |
243 (MenuItem |
174 label: '-' |
244 label: '-' |
175 ) |
245 ) |
176 (MenuItem |
246 (MenuItem |
|
247 enabled: sortButtonEnabledHolder |
|
248 label: 'Sort' |
|
249 itemValue: sort |
|
250 translateLabel: true |
|
251 labelImage: (ResourceRetriever BookmarksEditDialog sort22x22Icon) |
|
252 ) |
|
253 (MenuItem |
|
254 label: '-' |
|
255 ) |
|
256 (MenuItem |
177 label: 'Import' |
257 label: 'Import' |
178 itemValue: import |
258 itemValue: import |
179 translateLabel: true |
259 translateLabel: true |
180 labelImage: (ResourceRetriever BookmarksEditDialog fileIn22x22Icon) |
260 labelImage: (ResourceRetriever XPToolbarIconLibrary fileIn22x22Icon) |
181 ) |
261 ) |
182 (MenuItem |
262 (MenuItem |
183 label: 'Export' |
263 label: 'Export' |
184 itemValue: export |
264 itemValue: export |
185 translateLabel: true |
265 translateLabel: true |
186 labelImage: (ResourceRetriever XPToolbarIconLibrary fileIn22x22Icon) |
266 labelImage: (ResourceRetriever BookmarksEditDialog fileOut22x22Icon) |
187 ) |
267 ) |
188 ) |
268 ) |
189 nil |
269 nil |
190 nil |
270 nil |
191 ) |
271 ) |
309 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
390 "/ if your app needs to be notified of changes, uncomment one of the lines below: |
310 "/ selectedBookmarksHolder addDependent:self. |
391 "/ selectedBookmarksHolder addDependent:self. |
311 selectedBookmarksHolder onChangeSend:#selectedBookmarksChanged to:self. |
392 selectedBookmarksHolder onChangeSend:#selectedBookmarksChanged to:self. |
312 ]. |
393 ]. |
313 ^ selectedBookmarksHolder. |
394 ^ selectedBookmarksHolder. |
|
395 ! |
|
396 |
|
397 sortButtonEnabledHolder |
|
398 |
|
399 ^ builder valueAspectFor:#'sortButtonEnabledHolder' initialValue:false |
314 ! |
400 ! |
315 |
401 |
316 upButtonEnabledHolder |
402 upButtonEnabledHolder |
317 |
403 |
318 ^ builder valueAspectFor:#'upButtonEnabledHolder' initialValue:false |
404 ^ builder valueAspectFor:#'upButtonEnabledHolder' initialValue:false |
345 export |
431 export |
346 |
432 |
347 | filename bookmarks | |
433 | filename bookmarks | |
348 |
434 |
349 filename := Dialog |
435 filename := Dialog |
350 requestFileName:'Select file to export bookmarks:' |
436 requestFileName:(resources string:'Select file to export bookmarks:') |
351 default:'.fileBrowserBookmarks' |
437 default:'.fileBrowserBookmarks' |
352 fromDirectory:Filename desktopDirectory. |
438 fromDirectory:Filename desktopDirectory. |
353 filename isEmptyOrNil ifTrue:[^ self]. |
439 filename isEmptyOrNil ifTrue:[^ self]. |
354 |
440 |
355 bookmarks := self bookmarkList. |
441 bookmarks := self bookmarkList. |
356 AbstractFileBrowser saveBookmarks: bookmarks in:filename. |
442 AbstractFileBrowser saveBookmarks: bookmarks in:filename. |
357 ! |
443 ! |
358 |
444 |
359 import |
445 import |
360 |
|
361 | answer filename bookmarksFromFile bookmarksToAdd bookmarks| |
446 | answer filename bookmarksFromFile bookmarksToAdd bookmarks| |
362 |
447 |
363 answer := Dialog |
448 answer := Dialog |
364 requestFileName:'Select file to import bookmarks:' |
449 requestFileName:(resources string:'Select file to import bookmarks:') |
365 default:'.fileBrowserBookmarks' |
450 default:'.fileBrowserBookmarks' |
366 fromDirectory:Filename desktopDirectory. |
451 fromDirectory:Filename desktopDirectory. |
367 |
452 |
368 answer isEmptyOrNil ifTrue:[^ self]. |
453 answer isEmptyOrNil ifTrue:[^ self]. |
369 filename := answer asFilename. |
454 filename := answer asFilename. |