From: dooglus Date: Mon, 11 Feb 2008 02:12:14 +0000 (+0000) Subject: Tidying. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c1a1f2acbc7b262e8973f5f15b055136e94ef009;p=synfig.git Tidying. git-svn-id: http://svn.voria.com/code@1666 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/tool/main.cpp b/synfig-core/trunk/src/tool/main.cpp index 238d23a..fa6d785 100644 --- a/synfig-core/trunk/src/tool/main.cpp +++ b/synfig-core/trunk/src/tool/main.cpp @@ -268,9 +268,7 @@ void guid_test() { cout<<"GUID Test"<",_("Set the physical resolution (dots-per-inch)")); Argument("--dpi-x","",_("Set the physical X resolution (dots-per-inch")); Argument("--dpi-y","",_("Set the physical Y resolution (dots-per-inch)")); + Argument("--list-canvases",NULL,_("List the exported canvases in the composition")); Argument("--append","",_("Append layers in to composition")); + Argument("--layer-info","",_("Print out layer's description, parameter info, etc.")); Argument("--layers",NULL,_("Print out the list of available layers")); Argument("--targets",NULL,_("Print out the list of available targets")); @@ -420,7 +420,8 @@ int process_global_flags(arg_list_t &arg_list) Progress p(PACKAGE); synfig::Main synfig_main(dirname(progname),&p); iter=next++; - if (iter==arg_list.end()) { + if (iter==arg_list.end()) + { error("The `%s' flag requires a value. Use --help for a list of options.", "--layer-info"); return SYNFIGTOOL_MISSINGARGUMENT; } @@ -531,7 +532,8 @@ int process_global_flags(arg_list_t &arg_list) } /* true if the given flag takes an extra parameter */ -bool flag_requires_value(String flag) { +bool flag_requires_value(String flag) +{ return (flag=="-a" || flag=="-c" || flag=="-g" || flag=="-h" || flag=="-o" || flag=="-Q" || flag=="-s" || flag=="-t" || flag=="-T" || flag=="-w" || flag=="--append" || flag=="--begin-time" || flag=="--dpi" || flag=="--dpi-x" || flag=="--dpi-y" || @@ -555,7 +557,8 @@ int extract_arg_cluster(arg_list_t &arg_list,arg_list_t &cluster) cluster.push_back(*iter); arg_list.erase(iter); iter=next++; - if (iter==arg_list.end()) { + if (iter==arg_list.end()) + { error("The `%s' flag requires a value. Use --help for a list of options.", cluster.back().c_str()); return SYNFIGTOOL_MISSINGARGUMENT; } @@ -867,6 +870,7 @@ int main(int argc, char *argv[]) cerr<<_("FATAL: Synfig Version Mismatch")<set_threads(threads); - } if(imageargs.size()) { @@ -1139,9 +1138,7 @@ int main(int argc, char *argv[]) return SYNFIGTOOL_RENDERFAILURE; } if(print_benchmarks) - { cout<