Simplify the code a little.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 6 Apr 2008 19:26:41 +0000 (19:26 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 6 Apr 2008 19:26:41 +0000 (19:26 +0000)
git-svn-id: http://svn.voria.com/code@1966 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 5901bcc..5e34cfa 100644 (file)
@@ -73,19 +73,15 @@ int main(int argc, char **argv)
                        cout << "   " << _("synfig studio is already running") << endl << endl;
                        cout << "   " << _("the existing process will be used") << endl << endl;;
 
-                       fprintf(file.get(),"F\n");
-
                        // Hey, another copy of us is open!
                        // don't bother opening us, just go ahead and
                        // tell the other copy to load it all up
-                       if(argc>=1)
-                       {
-                               for(;argc>=1;(argc)--)
-                                       if((argv)[argc] && (argv)[argc][0]!='-')
-                                       {
-                                               fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str());
-                                       }
-                       }
+                       if (argc>1)
+                               fprintf(file.get(),"F\n");
+
+                       while(--argc)
+                               if((argv)[argc] && (argv)[argc][0]!='-')
+                                       fprintf(file.get(),"O %s\n",etl::absolute_path((argv)[argc]).c_str());
 
                        fprintf(file.get(),"F\n");