Add the new time format to the "Setup" dialog.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 29 Feb 2008 15:36:06 +0000 (15:36 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 29 Feb 2008 15:36:06 +0000 (15:36 +0000)
git-svn-id: http://svn.voria.com/code@1824 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 4944f57..7e42acb 100644 (file)
@@ -161,6 +161,7 @@ Dialog_Setup::Dialog_Setup():
        ADD_TIMESTAMP("(HHhMMmSSs)FFf",         Time::FORMAT_NORMAL     | Time::FORMAT_NOSPACES );
        ADD_TIMESTAMP("HHh MMm SSs FFf",        Time::FORMAT_NORMAL     | Time::FORMAT_FULL             );
        ADD_TIMESTAMP("HHhMMmSSsFFf",           Time::FORMAT_NORMAL     | Time::FORMAT_NOSPACES | Time::FORMAT_FULL);
+       ADD_TIMESTAMP("FFf",                            Time::FORMAT_FRAMES );
 
        timestamp_optionmenu.set_menu(*timestamp_menu);
 
@@ -549,19 +550,20 @@ void
 Dialog_Setup::set_time_format(synfig::Time::Format x)
 {
        time_format=x;
-       if(x<=Time::FORMAT_VIDEO)
+       if (x <= Time::FORMAT_VIDEO)
                timestamp_optionmenu.set_history(0);
+       else if (x == (Time::FORMAT_NORMAL))
+               timestamp_optionmenu.set_history(1);
+       else if (x == (Time::FORMAT_NORMAL | Time::FORMAT_NOSPACES))
+               timestamp_optionmenu.set_history(2);
+       else if (x == (Time::FORMAT_NORMAL | Time::FORMAT_FULL))
+               timestamp_optionmenu.set_history(3);
+       else if (x == (Time::FORMAT_NORMAL | Time::FORMAT_NOSPACES | Time::FORMAT_FULL))
+               timestamp_optionmenu.set_history(4);
+       else if (x == (Time::FORMAT_FRAMES))
+               timestamp_optionmenu.set_history(5);
        else
-       {
-               if(x==(Time::FORMAT_NOSPACES|Time::FORMAT_FULL))
-                       timestamp_optionmenu.set_history(4);
-               else if(x==(Time::FORMAT_FULL))
-                       timestamp_optionmenu.set_history(3);
-               else if(x==(Time::FORMAT_NOSPACES))
-                       timestamp_optionmenu.set_history(2);
-               else
-                       timestamp_optionmenu.set_history(1);
-       }
+               timestamp_optionmenu.set_history(1);
 }