OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 #--------------------------------------------- | 2 #--------------------------------------------- |
3 # xdg-file-dialog | 3 # xdg-file-dialog |
4 # | 4 # |
5 # Utility script to file selection dialogs | 5 # Utility script to file selection dialogs |
6 # on XDG compliant systems. | 6 # on XDG compliant systems. |
7 # | 7 # |
8 # Refer to the usage() function below for usage. | 8 # Refer to the usage() function below for usage. |
9 # | 9 # |
| 10 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> |
| 11 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> |
10 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> | 12 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> |
11 # | 13 # |
12 # LICENSE: | 14 # LICENSE: |
13 # | 15 # |
14 #--------------------------------------------- | 16 #--------------------------------------------- |
15 | 17 |
16 manualpage() | 18 manualpage() |
17 { | 19 { |
18 cat << _MANUALPAGE | 20 cat << _MANUALPAGE |
19 _MANUALPAGE | 21 _MANUALPAGE |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 fi | 305 fi |
304 | 306 |
305 detectDE | 307 detectDE |
306 | 308 |
307 if [ "$action" = "openfilename" ]; then | 309 if [ "$action" = "openfilename" ]; then |
308 case "$DE" in | 310 case "$DE" in |
309 kde) | 311 kde) |
310 open_kde "$filename" | 312 open_kde "$filename" |
311 ;; | 313 ;; |
312 | 314 |
313 gnome|xfce) | 315 gnome|xfce|lxde) |
314 open_zenity "$filename" | 316 open_zenity "$filename" |
315 ;; | 317 ;; |
316 | 318 |
317 *) | 319 *) |
318 exit_failure_operation_impossible "no method available for opening a fil
ename dialog" | 320 exit_failure_operation_impossible "no method available for opening a fil
ename dialog" |
319 ;; | 321 ;; |
320 esac | 322 esac |
321 elif [ "$action" = "openfilenamelist" ]; then | 323 elif [ "$action" = "openfilenamelist" ]; then |
322 case "$DE" in | 324 case "$DE" in |
323 kde) | 325 kde) |
324 open_multi_kde "$filename" | 326 open_multi_kde "$filename" |
325 ;; | 327 ;; |
326 | 328 |
327 gnome|xfce) | 329 gnome|xfce|lxde) |
328 open_multi_zenity "$filename" | 330 open_multi_zenity "$filename" |
329 ;; | 331 ;; |
330 | 332 |
331 *) | 333 *) |
332 exit_failure_operation_impossible "no method available for opening a fil
ename dialog" | 334 exit_failure_operation_impossible "no method available for opening a fil
ename dialog" |
333 ;; | 335 ;; |
334 esac | 336 esac |
335 elif [ "$action" = "savefilename" ]; then | 337 elif [ "$action" = "savefilename" ]; then |
336 case "$DE" in | 338 case "$DE" in |
337 kde) | 339 kde) |
338 save_kde "$filename" | 340 save_kde "$filename" |
339 ;; | 341 ;; |
340 | 342 |
341 gnome|xfce) | 343 gnome|xfce|lxde) |
342 save_zenity "$filename" | 344 save_zenity "$filename" |
343 ;; | 345 ;; |
344 | 346 |
345 *) | 347 *) |
346 exit_failure_operation_impossible "no method available for opening a fil
ename dialog" | 348 exit_failure_operation_impossible "no method available for opening a fil
ename dialog" |
347 ;; | 349 ;; |
348 esac | 350 esac |
349 elif [ "$action" = "directory" ]; then | 351 elif [ "$action" = "directory" ]; then |
350 case "$DE" in | 352 case "$DE" in |
351 kde) | 353 kde) |
352 directory_kde "$filename" | 354 directory_kde "$filename" |
353 ;; | 355 ;; |
354 | 356 |
355 gnome|xfce) | 357 gnome|xfce|lxde) |
356 directory_zenity "$filename" | 358 directory_zenity "$filename" |
357 ;; | 359 ;; |
358 | 360 |
359 *) | 361 *) |
360 exit_failure_operation_impossible "no method available for opening a dir
ectory dialog" | 362 exit_failure_operation_impossible "no method available for opening a dir
ectory dialog" |
361 ;; | 363 ;; |
362 esac | 364 esac |
363 fi | 365 fi |
OLD | NEW |