From: dooglus Date: Tue, 29 Jan 2008 08:41:05 +0000 (+0000) Subject: If no documents are specified to be loaded on the command line at start-up, create... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=13fcbdf1c5a0142643f8f73b38ea33c0c4801c28;p=synfig.git If no documents are specified to be loaded on the command line at start-up, create a new empty document to the novice user can get started straight away. synfig.org/Wish_list#Improved_User_Experience_for_First_Contact git-svn-id: http://svn.voria.com/code@1520 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/app.cpp b/synfig-studio/trunk/src/gtkmm/app.cpp index 63cb57d..cef305a 100644 --- a/synfig-studio/trunk/src/gtkmm/app.cpp +++ b/synfig-studio/trunk/src/gtkmm/app.cpp @@ -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);