| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 #--------------------------------------------- | 2 #--------------------------------------------- |
| 3 # xdg-open | 3 # xdg-open |
| 4 # | 4 # |
| 5 # Utility script to open a URL in the registered default application. | 5 # Utility script to open a URL in the registered default application. |
| 6 # | 6 # |
| 7 # Refer to the usage() function below for usage. | 7 # Refer to the usage() function below for usage. |
| 8 # | 8 # |
| 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> | 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> |
| 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> | 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 case "$(uname 2>/dev/null)" in | 391 case "$(uname 2>/dev/null)" in |
| 392 Darwin) | 392 Darwin) |
| 393 DE=darwin; | 393 DE=darwin; |
| 394 ;; | 394 ;; |
| 395 esac | 395 esac |
| 396 fi | 396 fi |
| 397 | 397 |
| 398 if [ x"$DE" = x"gnome" ]; then | 398 if [ x"$DE" = x"gnome" ]; then |
| 399 # gnome-default-applications-properties is only available in GNOME 2.x | 399 # gnome-default-applications-properties is only available in GNOME 2.x |
| 400 # but not in GNOME 3.x | 400 # but not in GNOME 3.x |
| 401 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" | 401 which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome
3" |
| 402 fi | 402 fi |
| 403 } | 403 } |
| 404 | 404 |
| 405 #---------------------------------------------------------------------------- | 405 #---------------------------------------------------------------------------- |
| 406 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 406 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
| 407 # It also always returns 1 in KDE 3.4 and earlier | 407 # It also always returns 1 in KDE 3.4 and earlier |
| 408 # Simply return 0 in such case | 408 # Simply return 0 in such case |
| 409 | 409 |
| 410 kfmclient_fix_exit_code() | 410 kfmclient_fix_exit_code() |
| 411 { | 411 { |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 ;; | 669 ;; |
| 670 | 670 |
| 671 generic) | 671 generic) |
| 672 open_generic "$url" | 672 open_generic "$url" |
| 673 ;; | 673 ;; |
| 674 | 674 |
| 675 *) | 675 *) |
| 676 exit_failure_operation_impossible "no method available for opening '$url'" | 676 exit_failure_operation_impossible "no method available for opening '$url'" |
| 677 ;; | 677 ;; |
| 678 esac | 678 esac |
| OLD | NEW |