buildertool: Make render an alias for screenshot
Its a more neutral name and will align better with other tools.
This commit is contained in:
@@ -371,11 +371,11 @@ do_screenshot (int *argc,
|
||||
exit (1);
|
||||
}
|
||||
|
||||
g_set_prgname ("gtk4-builder-tool screenshot");
|
||||
g_set_prgname ("gtk4-builder-tool render");
|
||||
context = g_option_context_new (NULL);
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
g_option_context_set_summary (context, _("Take a screenshot of the file."));
|
||||
g_option_context_set_summary (context, _("Render a .ui file to an image."));
|
||||
|
||||
if (!g_option_context_parse (context, argc, (char ***)argv, &error))
|
||||
{
|
||||
@@ -394,7 +394,7 @@ do_screenshot (int *argc,
|
||||
|
||||
if (g_strv_length (filenames) > 2)
|
||||
{
|
||||
g_printerr (_("Can only screenshot a single .ui file and a single output file\n"));
|
||||
g_printerr (_("Can only render a single .ui file to a single output file\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ usage (void)
|
||||
" simplify Simplify the file\n"
|
||||
" enumerate List all named objects\n"
|
||||
" preview Preview the file\n"
|
||||
" render Take a screenshot of the file\n"
|
||||
" screenshot Take a screenshot of the file\n"
|
||||
"\n"));
|
||||
exit (1);
|
||||
@@ -134,7 +135,8 @@ main (int argc, const char *argv[])
|
||||
do_enumerate (&argc, &argv);
|
||||
else if (strcmp (argv[0], "preview") == 0)
|
||||
do_preview (&argc, &argv);
|
||||
else if (strcmp (argv[0], "screenshot") == 0)
|
||||
else if (strcmp (argv[0], "render") == 0 ||
|
||||
strcmp (argv[0], "screenshot") == 0)
|
||||
do_screenshot (&argc, &argv);
|
||||
else
|
||||
usage ();
|
||||
|
||||
Reference in New Issue
Block a user