| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 #--------------------------------------------- | 2 #--------------------------------------------- |
| 3 # xdg-settings | 3 # xdg-settings |
| 4 # | 4 # |
| 5 # Utility script to get various settings from the desktop environment. | 5 # Utility script to get various settings from the desktop environment. |
| 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, Google Inc. | 9 # Copyright 2009, Google Inc. |
| 10 # | 10 # |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 case "$(uname 2>/dev/null)" in | 334 case "$(uname 2>/dev/null)" in |
| 335 Darwin) | 335 Darwin) |
| 336 DE=darwin; | 336 DE=darwin; |
| 337 ;; | 337 ;; |
| 338 esac | 338 esac |
| 339 fi | 339 fi |
| 340 | 340 |
| 341 if [ x"$DE" = x"gnome" ]; then | 341 if [ x"$DE" = x"gnome" ]; then |
| 342 # gnome-default-applications-properties is only available in GNOME 2.x | 342 # gnome-default-applications-properties is only available in GNOME 2.x |
| 343 # but not in GNOME 3.x | 343 # but not in GNOME 3.x |
| 344 which gnome-default-applications-properties 2> /dev/null || DE="gnome3" | 344 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" |
| 345 fi | 345 fi |
| 346 } | 346 } |
| 347 | 347 |
| 348 #---------------------------------------------------------------------------- | 348 #---------------------------------------------------------------------------- |
| 349 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 349 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
| 350 # It also always returns 1 in KDE 3.4 and earlier | 350 # It also always returns 1 in KDE 3.4 and earlier |
| 351 # Simply return 0 in such case | 351 # Simply return 0 in such case |
| 352 | 352 |
| 353 kfmclient_fix_exit_code() | 353 kfmclient_fix_exit_code() |
| 354 { | 354 { |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 ;; | 945 ;; |
| 946 | 946 |
| 947 generic) | 947 generic) |
| 948 dispatch_generic "$@" | 948 dispatch_generic "$@" |
| 949 ;; | 949 ;; |
| 950 | 950 |
| 951 *) | 951 *) |
| 952 exit_failure_operation_impossible "unknown desktop environment" | 952 exit_failure_operation_impossible "unknown desktop environment" |
| 953 ;; | 953 ;; |
| 954 esac | 954 esac |
| OLD | NEW |