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"><span
size="small">the time to the current selected line (format
hh:mm:ss:ms)</span></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"><span
size="small"><b>#mseconds</b></span></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"><span
size="small">the time to the current selected line (format
hh:mm:ss:ms)</span></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"><span
size="small">the time in milliseconds to the current selected
line</span></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