diff options
author | Vincent Untz <vuntz@gnome.org> | 2010-09-10 04:22:41 +0200 |
---|---|---|
committer | Vincent Untz <vuntz@gnome.org> | 2010-09-10 04:22:41 +0200 |
commit | 90938d0623031b682734646040fcbd655b3a9652 (patch) | |
tree | f24b8883610e0b1da9acd2f08b23e5256bcbda07 | |
parent | d6e42384c85fe45b8ac058a1606039046213655d (diff) |
Rework help of all tools
Some text was reworded, and the options were re-ordered.
-rw-r--r-- | src/install.c | 123 | ||||
-rw-r--r-- | src/update-desktop-database.c | 9 | ||||
-rw-r--r-- | src/validator.c | 4 |
3 files changed, 69 insertions, 67 deletions
diff --git a/src/install.c b/src/install.c index 4484b44..207073d 100644 --- a/src/install.c +++ b/src/install.c @@ -271,13 +271,12 @@ static gboolean parse_options_callback (const gchar *option_name, static const GOptionEntry options[] = { { -#define OPTION_VENDOR "vendor" - OPTION_VENDOR, + "delete-original", '\0', '\0', - G_OPTION_ARG_CALLBACK, - parse_options_callback, - N_("Specify the vendor prefix to be applied to the desktop file. If the file already has this prefix, nothing happens."), + G_OPTION_ARG_NONE, + &delete_original, + N_("Delete the source desktop files, leaving only the target files (effectively \"renames\" the desktop files)"), NULL }, { @@ -287,17 +286,8 @@ static const GOptionEntry options[] = { '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Specify the directory where files should be installed."), - NULL - }, - { - "delete-original", - '\0', - '\0', - G_OPTION_ARG_NONE, - &delete_original, - N_("Delete the source desktop file, leaving only the target file. Effectively \"renames\" a desktop file."), - NULL + N_("Install desktop files to the DIR directory"), + N_("DIR") }, { #define OPTION_MODE "mode" @@ -306,8 +296,18 @@ static const GOptionEntry options[] = { '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Set the given permissions on the destination file."), - NULL + N_("Set the permissions of the destination files to MODE"), + N_("MODE") + }, + { +#define OPTION_VENDOR "vendor" + OPTION_VENDOR, + '\0', + '\0', + G_OPTION_ARG_CALLBACK, + parse_options_callback, + N_("Add a vendor prefix to the desktop files, if not already present"), + N_("VENDOR") }, { "rebuild-mime-info-cache", @@ -315,7 +315,7 @@ static const GOptionEntry options[] = { '\0', G_OPTION_ARG_NONE, &rebuild_mime_info_cache, - N_("After installing desktop file rebuild the mime-types application database."), + N_("Rebuild the MIME types application database after installing desktop files"), NULL }, { G_OPTION_REMAINING, @@ -332,92 +332,92 @@ static const GOptionEntry options[] = { static const GOptionEntry edit_options[] = { { -#define OPTION_ADD_CATEGORY "add-category" - OPTION_ADD_CATEGORY, + "copy-name-to-generic-name", '\0', '\0', - G_OPTION_ARG_CALLBACK, - parse_options_callback, - N_("Specify a category to be added to the Categories field."), - N_("CATEGORY") + G_OPTION_ARG_NONE, + ©_name_to_generic_name, + N_("Copy the value of the \"Name\" key to the \"GenericName\" key"), + NULL }, { -#define OPTION_REMOVE_CATEGORY "remove-category" - OPTION_REMOVE_CATEGORY, + "copy-generic-name-to-name", '\0', '\0', - G_OPTION_ARG_CALLBACK, - parse_options_callback, - N_("Specify a category to be removed from the Categories field."), - N_("CATEGORY") + G_OPTION_ARG_NONE, + ©_generic_name_to_name, + N_("Copy the value of the \"GenericName\" key to the \"Name\" key"), + NULL }, { -#define OPTION_ADD_ONLY_SHOW_IN "add-only-show-in" - OPTION_ADD_ONLY_SHOW_IN, +#define OPTION_REMOVE_KEY "remove-key" + OPTION_REMOVE_KEY, '\0', '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Specify a product name to be added to the OnlyShowIn field."), - N_("PRODUCT") + N_("Remove the KEY key from the desktop files, if present"), + N_("KEY") }, { -#define OPTION_REMOVE_ONLY_SHOW_IN "remove-only-show-in" - OPTION_REMOVE_ONLY_SHOW_IN, +#define OPTION_ADD_CATEGORY "add-category" + OPTION_ADD_CATEGORY, '\0', '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Specify a product name to be removed from the OnlyShowIn field."), - N_("PRODUCT") + N_("Add CATEGORY to the list of categories"), + N_("CATEGORY") }, { - "copy-name-to-generic-name", +#define OPTION_REMOVE_CATEGORY "remove-category" + OPTION_REMOVE_CATEGORY, '\0', '\0', - G_OPTION_ARG_NONE, - ©_name_to_generic_name, - N_("Copy the contents of the \"Name\" field to the \"GenericName\" field."), - NULL + G_OPTION_ARG_CALLBACK, + parse_options_callback, + N_("Remove CATEGORY from the list of categories"), + N_("CATEGORY") }, { - "copy-generic-name-to-name", +#define OPTION_ADD_MIME_TYPE "add-mime-type" + OPTION_ADD_MIME_TYPE, '\0', '\0', - G_OPTION_ARG_NONE, - ©_generic_name_to_name, - N_("Copy the contents of the \"GenericName\" field to the \"Name\" field."), - NULL + G_OPTION_ARG_CALLBACK, + parse_options_callback, + N_("Add MIME-TYPE to the list of MIME types"), + N_("MIME-TYPE") }, { -#define OPTION_REMOVE_KEY "remove-key" - OPTION_REMOVE_KEY, +#define OPTION_REMOVE_MIME_TYPE "remove-mime-type" + OPTION_REMOVE_MIME_TYPE, '\0', '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Specify a field to be removed from the desktop file."), - N_("KEY") + N_("Remove MIME-TYPE from the list of MIME types"), + N_("MIME-TYPE") }, { -#define OPTION_ADD_MIME_TYPE "add-mime-type" - OPTION_ADD_MIME_TYPE, +#define OPTION_ADD_ONLY_SHOW_IN "add-only-show-in" + OPTION_ADD_ONLY_SHOW_IN, '\0', '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Specify a mime-type to be added to the MimeType field."), - N_("MIME-TYPE") + N_("Add ENVIRONMENT to the list of desktop environment where the desktop files should be displayed"), + N_("ENVIRONMENT") }, { -#define OPTION_REMOVE_MIME_TYPE "remove-mime-type" - OPTION_REMOVE_MIME_TYPE, +#define OPTION_REMOVE_ONLY_SHOW_IN "remove-only-show-in" + OPTION_REMOVE_ONLY_SHOW_IN, '\0', '\0', G_OPTION_ARG_CALLBACK, parse_options_callback, - N_("Specify a mime-type to be removed from the MimeType field."), - N_("MIME-TYPE") + N_("Remove ENVIRONMENT from the list of desktop environment where the desktop files should be displayed"), + N_("ENVIRONMENT") }, { NULL @@ -552,6 +552,7 @@ main (int argc, char **argv) setlocale (LC_ALL, ""); context = g_option_context_new (""); + g_option_context_set_summary (context, _("Install desktop files.")); g_option_context_add_main_entries (context, options, NULL); group = g_option_group_new ("edit", _("Edition options for desktop file"), _("Show desktop file edition options"), NULL, NULL); diff --git a/src/update-desktop-database.c b/src/update-desktop-database.c index 55ea7fd..e2c0d3c 100644 --- a/src/update-desktop-database.c +++ b/src/update-desktop-database.c @@ -414,20 +414,21 @@ main (int argc, const GOptionEntry options[] = { + { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, + N_("Do not display any information about processing and " + "updating progress"), NULL}, + { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, N_("Display more information about processing and updating progress"), NULL}, - { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, - N_("Don't display any information about about processing and " - "updating progress"), NULL}, - { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &desktop_dirs, NULL, N_("[DIRECTORY...]") }, { NULL } }; context = g_option_context_new (""); + g_option_context_set_summary (context, _("Build cache database of MIME types handled by desktop files.")); g_option_context_add_main_entries (context, options, NULL); desktop_dirs = NULL; diff --git a/src/validator.c b/src/validator.c index 584127d..c50157e 100644 --- a/src/validator.c +++ b/src/validator.c @@ -33,8 +33,8 @@ static gboolean no_warn_deprecated = FALSE; static char **filename = NULL; static GOptionEntry option_entries[] = { - { "warn-kde", 0, 0, G_OPTION_ARG_NONE, &warn_kde, "Warn about usage of KDE extensions to the specification", NULL }, { "no-warn-deprecated", 0, 0, G_OPTION_ARG_NONE, &no_warn_deprecated, "Do not warn about usage of deprecated items", NULL }, + { "warn-kde", 0, 0, G_OPTION_ARG_NONE, &warn_kde, "Warn about usage of KDE extensions to the specification", NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filename, NULL, "<desktop-file>" }, { NULL } }; @@ -47,7 +47,7 @@ main (int argc, char *argv[]) context = g_option_context_new (NULL); g_option_context_set_summary (context, "Validate desktop entry files " - "according to the desktop entry " + "according to the Desktop Entry " "specification "CURRENT_SPEC_VERSION ".\n" "For information about this " |