Author: kitone
Date: Fri Apr 17 15:49:03 2015
New Revision: 910

URL: http://svn.gna.org/viewcvs/subtitleeditor?rev=910&view=rev
Log:
Add the ability to use option #mseconds.

Modified:
    trunk/ChangeLog
    
trunk/plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui
    trunk/plugins/actions/externalvideoplayer/externalvideoplayer.cc

Modified: trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/subtitleeditor/trunk/ChangeLog?rev=910&r1=909&r2=910&view=diff
==============================================================================
--- trunk/ChangeLog     (original)
+++ trunk/ChangeLog     Fri Apr 17 15:49:03 2015
@@ -1,3 +1,9 @@
+2015-04-17  kitone  <[email protected]>
+
+       * 
plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui:
+       * plugins/actions/externalvideoplayer/externalvideoplayer.cc:
+       Add the ability to use option #mseconds.
+
 2015-04-17  kitone  <[email protected]>
 
        * 
plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui:

Modified: 
trunk/plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui
URL: 
http://svn.gna.org/viewcvs/subtitleeditor/trunk/plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui?rev=910&r1=909&r2=910&view=diff
==============================================================================
--- 
trunk/plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui
       (original)
+++ 
trunk/plugins/actions/externalvideoplayer/dialog-external-video-player-preferences.ui
       Fri Apr 17 15:49:03 2015
@@ -261,21 +261,51 @@
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
+                            <property name="top_attach">7</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">&lt;span 
size="small"&gt;the time to the current selected line (format 
hh:mm:ss:ms)&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">2</property>
+                            <property name="top_attach">7</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label17">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label">&lt;span 
size="small"&gt;&lt;b&gt;#mseconds&lt;/b&gt;&lt;/span&gt;</property>
+                            <property name="use_markup">True</property>
+                            <property name="selectable">True</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
                             <property name="top_attach">6</property>
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkLabel" id="label16">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">&lt;span 
size="small"&gt;the time to the current selected line (format 
hh:mm:ss:ms)&lt;/span&gt;</property>
+                          <object class="GtkLabel" id="label18">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">&lt;span 
size="small"&gt;the time in milliseconds to the current selected 
line&lt;/span&gt;</property>
                             <property name="use_markup">True</property>
                           </object>
                           <packing>
                             <property name="left_attach">2</property>
                             <property name="top_attach">6</property>
                           </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
                         </child>
                         <child>
                           <placeholder/>

Modified: trunk/plugins/actions/externalvideoplayer/externalvideoplayer.cc
URL: 
http://svn.gna.org/viewcvs/subtitleeditor/trunk/plugins/actions/externalvideoplayer/externalvideoplayer.cc?rev=910&r1=909&r2=910&view=diff
==============================================================================
--- trunk/plugins/actions/externalvideoplayer/externalvideoplayer.cc    
(original)
+++ trunk/plugins/actions/externalvideoplayer/externalvideoplayer.cc    Fri Apr 
17 15:49:03 2015
@@ -210,6 +210,7 @@
                utility::replace(command, "#subtitle_file", get_tmp_file());
                utility::replace(command, 
"#subtitle_uri",get_tmp_file_as_uri());
                utility::replace(command, "#seconds", 
convert_to_second_string(time));
+               utility::replace(command, "#mseconds", 
convert_to_msecond_string(time));
                utility::replace(command, "#time", 
convert_to_time_string(time));
 
                std::cout << "COMMAND: " << command << std::endl;
@@ -318,6 +319,13 @@
 
        /*
         */
+       Glib::ustring convert_to_msecond_string(const SubtitleTime &time)
+       {
+               return to_string(time.totalmsecs);
+       }
+
+       /*
+        */
        void save_to_temporary_file(Document *document, const Glib::ustring 
&uri)
        {
                Glib::ustring prefered_format = get_prefered_subtitle_format();


_______________________________________________
Subtitleeditor-commits mailing list
[email protected]
https://mail.gna.org/listinfo/subtitleeditor-commits

Reply via email to