OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 #--------------------------------------------- | 2 #--------------------------------------------- |
3 # xdg-email | 3 # xdg-email |
4 # | 4 # |
5 # Utility script to open the users favorite email program, using the | 5 # Utility script to open the users favorite email program, using the |
6 # RFC 2368 mailto: URI spec | 6 # RFC 2368 mailto: URI spec |
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 case "$(uname 2>/dev/null)" in | 379 case "$(uname 2>/dev/null)" in |
380 Darwin) | 380 Darwin) |
381 DE=darwin; | 381 DE=darwin; |
382 ;; | 382 ;; |
383 esac | 383 esac |
384 fi | 384 fi |
385 | 385 |
386 if [ x"$DE" = x"gnome" ]; then | 386 if [ x"$DE" = x"gnome" ]; then |
387 # gnome-default-applications-properties is only available in GNOME 2.x | 387 # gnome-default-applications-properties is only available in GNOME 2.x |
388 # but not in GNOME 3.x | 388 # but not in GNOME 3.x |
389 which gnome-default-applications-properties 2> /dev/null || DE="gnome3" | 389 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" |
390 fi | 390 fi |
391 } | 391 } |
392 | 392 |
393 #---------------------------------------------------------------------------- | 393 #---------------------------------------------------------------------------- |
394 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 394 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
395 # It also always returns 1 in KDE 3.4 and earlier | 395 # It also always returns 1 in KDE 3.4 and earlier |
396 # Simply return 0 in such case | 396 # Simply return 0 in such case |
397 | 397 |
398 kfmclient_fix_exit_code() | 398 kfmclient_fix_exit_code() |
399 { | 399 { |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 ;; | 773 ;; |
774 | 774 |
775 generic|lxde) | 775 generic|lxde) |
776 open_generic "${mailto}" | 776 open_generic "${mailto}" |
777 ;; | 777 ;; |
778 | 778 |
779 *) | 779 *) |
780 exit_failure_operation_impossible "no method available for opening '${mailto
}'" | 780 exit_failure_operation_impossible "no method available for opening '${mailto
}'" |
781 ;; | 781 ;; |
782 esac | 782 esac |
OLD | NEW |