If no documents are specified to be loaded on the command line at start-up, create...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 29 Jan 2008 08:41:05 +0000 (08:41 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 29 Jan 2008 08:41:05 +0000 (08:41 +0000)
git-svn-id: http://svn.voria.com/code@1520 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/app.cpp

index 63cb57d..cef305a 100644 (file)
@@ -1186,15 +1186,21 @@ App::App(int *argc, char ***argv):
 
                // Look for any files given on the command line,
                // and load them if found.
+               bool opened_any = false;
                for(;*argc>=1;(*argc)--)
                        if((*argv)[*argc] && (*argv)[*argc][0]!='-')
                        {
                                studio_init_cb.task(_("Loading files..."));
                                about_window.hide();
                                open((*argv)[*argc]);
+                               opened_any = true;
                                about_window.show();
                        }
 
+               // if no file was specified to be opened, create a new document to help new users get started more easily
+               if (!opened_any)
+                       new_instance();
+
                studio_init_cb.task(_("Done."));
                studio_init_cb.amount_complete(10000,10000);