Same as previous commit, but for 'segment tangent' instead of 'bline tangent'. Selec...
[synfig.git] / synfig-core / trunk / src / tool / main.cpp
index fa6d785..77281c8 100644 (file)
@@ -332,7 +332,7 @@ void display_help(int amount)
                Argument("--start-time","<time>",_("Set the starting time"));
                Argument("--end-time","<time>",_("Set the ending time"));
                Argument("--dpi","<res>",_("Set the physical resolution (dots-per-inch)"));
-               Argument("--dpi-x","<res>",_("Set the physical X resolution (dots-per-inch"));
+               Argument("--dpi-x","<res>",_("Set the physical X resolution (dots-per-inch)"));
                Argument("--dpi-y","<res>",_("Set the physical Y resolution (dots-per-inch)"));
 
                Argument("--list-canvases",NULL,_("List the exported canvases in the composition"));
@@ -387,7 +387,7 @@ int process_global_flags(arg_list_t &arg_list)
                if(*iter == "--info")
                {
                        cout<<PACKAGE"-"VERSION<<endl;
-                       cout<<"Compiled on "__DATE__ " at "__TIME__;
+                       cout<<"Compiled on "__DATE__ /* " at "__TIME__ */;
 #ifdef __GNUC__
                        cout<<" with GCC "<<__VERSION__;
 #endif
@@ -845,6 +845,16 @@ int extract_list_canvases(arg_list_t &arg_list,bool &list_canvases)
        return SYNFIGTOOL_OK;
 }
 
+void list_child_canvases(string prefix, Canvas::Handle canvas)
+{
+       Canvas::Children children(canvas->children());
+       for (Canvas::Children::iterator iter = children.begin(); iter != children.end(); iter++)
+       {
+               cout << prefix << ":" << (*iter)->get_id() << endl;
+               list_child_canvases(prefix + ":" + (*iter)->get_id(), *iter);
+       }
+}
+
 /* === M E T H O D S ======================================================= */
 
 /* === E N T R Y P O I N T ================================================= */
@@ -1121,10 +1131,8 @@ int main(int argc, char *argv[])
                }
                else if (job_list.front().list_canvases)
                {
-                       cerr << "Listing Canvases:" << endl;
-                       Canvas::Children children(job_list.front().canvas->children());
-                       for (Canvas::Children::iterator iter = children.begin(); iter != children.end(); iter++)
-                               cout << "  " << job_list.front().filename << "#:" << (*iter)->get_id() << endl;
+                       list_child_canvases(job_list.front().filename + "#", job_list.front().canvas);
+                       cerr << endl;
                }
                else
                {