| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 #--------------------------------------------- | 2 #--------------------------------------------- |
| 3 # xdg-mime | 3 # xdg-mime |
| 4 # | 4 # |
| 5 # Utility script to manipulate MIME related information | 5 # Utility script to manipulate MIME related information |
| 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 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> | 13 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> |
| 12 # | 14 # |
| 13 # LICENSE: | 15 # LICENSE: |
| 14 # | 16 # |
| 15 # Permission is hereby granted, free of charge, to any person obtaining a | 17 # Permission is hereby granted, free of charge, to any person obtaining a |
| 16 # copy of this software and associated documentation files (the "Software"), | 18 # copy of this software and associated documentation files (the "Software"), |
| 17 # to deal in the Software without restriction, including without limitation | 19 # to deal in the Software without restriction, including without limitation |
| 18 # the rights to use, copy, modify, merge, publish, distribute, sublicense, | 20 # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 19 # and/or sell copies of the Software, and to permit persons to whom the | 21 # and/or sell copies of the Software, and to permit persons to whom the |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 application is identified by its *.desktop file. | 78 application is identified by its *.desktop file. |
| 77 | 79 |
| 78 default | 80 default |
| 79 | 81 |
| 80 Ask the desktop environment to make application the default application for | 82 Ask the desktop environment to make application the default application for |
| 81 opening files of type mimetype. An application can be made the default for | 83 opening files of type mimetype. An application can be made the default for |
| 82 several file types by specifying multiple mimetypes. | 84 several file types by specifying multiple mimetypes. |
| 83 | 85 |
| 84 application is the desktop file id of the application and has the form | 86 application is the desktop file id of the application and has the form |
| 85 vendor-name.desktop application must already be installed in the desktop | 87 vendor-name.desktop application must already be installed in the desktop |
| 86 menu before it can be made the default handler. The aplication's desktop | 88 menu before it can be made the default handler. The application's desktop |
| 87 file must list support for all the MIME types that it wishes to be the | 89 file must list support for all the MIME types that it wishes to be the |
| 88 default handler for. | 90 default handler for. |
| 89 | 91 |
| 90 Requests to make an application a default handler may be subject to system | 92 Requests to make an application a default handler may be subject to system |
| 91 policy or approval by the end-user. xdg-mime query can be used to verify | 93 policy or approval by the end-user. xdg-mime query can be used to verify |
| 92 whether an application is the actual default handler for a specific file | 94 whether an application is the actual default handler for a specific file |
| 93 type. | 95 type. |
| 94 | 96 |
| 95 The default option is for use inside a desktop session only. It is not | 97 The default option is for use inside a desktop session only. It is not |
| 96 recommended to use xdg-mime default as root. | 98 recommended to use xdg-mime default as root. |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 rm -f $kde_dir/$x.desktop | 1203 rm -f $kde_dir/$x.desktop |
| 1202 fi | 1204 fi |
| 1203 done | 1205 done |
| 1204 ;; | 1206 ;; |
| 1205 esac | 1207 esac |
| 1206 | 1208 |
| 1207 update_mime_database $xdg_base_dir | 1209 update_mime_database $xdg_base_dir |
| 1208 | 1210 |
| 1209 exit_success | 1211 exit_success |
| 1210 | 1212 |
| OLD | NEW |