| 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> | 10 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 fi | 305 fi |
| 306 | 306 |
| 307 detectDE | 307 detectDE |
| 308 | 308 |
| 309 if [ "$action" = "openfilename" ]; then | 309 if [ "$action" = "openfilename" ]; then |
| 310 case "$DE" in | 310 case "$DE" in |
| 311 kde) | 311 kde) |
| 312 open_kde "$filename" | 312 open_kde "$filename" |
| 313 ;; | 313 ;; |
| 314 | 314 |
| 315 gnome|xfce|lxde) | 315 gnome*|xfce|lxde) |
| 316 open_zenity "$filename" | 316 open_zenity "$filename" |
| 317 ;; | 317 ;; |
| 318 | 318 |
| 319 *) | 319 *) |
| 320 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" |
| 321 ;; | 321 ;; |
| 322 esac | 322 esac |
| 323 elif [ "$action" = "openfilenamelist" ]; then | 323 elif [ "$action" = "openfilenamelist" ]; then |
| 324 case "$DE" in | 324 case "$DE" in |
| 325 kde) | 325 kde) |
| 326 open_multi_kde "$filename" | 326 open_multi_kde "$filename" |
| 327 ;; | 327 ;; |
| 328 | 328 |
| 329 gnome|xfce|lxde) | 329 gnome*|xfce|lxde) |
| 330 open_multi_zenity "$filename" | 330 open_multi_zenity "$filename" |
| 331 ;; | 331 ;; |
| 332 | 332 |
| 333 *) | 333 *) |
| 334 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" |
| 335 ;; | 335 ;; |
| 336 esac | 336 esac |
| 337 elif [ "$action" = "savefilename" ]; then | 337 elif [ "$action" = "savefilename" ]; then |
| 338 case "$DE" in | 338 case "$DE" in |
| 339 kde) | 339 kde) |
| 340 save_kde "$filename" | 340 save_kde "$filename" |
| 341 ;; | 341 ;; |
| 342 | 342 |
| 343 gnome|xfce|lxde) | 343 gnome*|xfce|lxde) |
| 344 save_zenity "$filename" | 344 save_zenity "$filename" |
| 345 ;; | 345 ;; |
| 346 | 346 |
| 347 *) | 347 *) |
| 348 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" |
| 349 ;; | 349 ;; |
| 350 esac | 350 esac |
| 351 elif [ "$action" = "directory" ]; then | 351 elif [ "$action" = "directory" ]; then |
| 352 case "$DE" in | 352 case "$DE" in |
| 353 kde) | 353 kde) |
| 354 directory_kde "$filename" | 354 directory_kde "$filename" |
| 355 ;; | 355 ;; |
| 356 | 356 |
| 357 gnome|xfce|lxde) | 357 gnome*|xfce|lxde) |
| 358 directory_zenity "$filename" | 358 directory_zenity "$filename" |
| 359 ;; | 359 ;; |
| 360 | 360 |
| 361 *) | 361 *) |
| 362 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" |
| 363 ;; | 363 ;; |
| 364 esac | 364 esac |
| 365 fi | 365 fi |
| OLD | NEW |