Commit ef71abdf authored by Bastien Nocera's avatar Bastien Nocera Committed by Bastien Nocera

added a time label for the fullscreen controls upd

2004-07-04  Bastien Nocera  <hadess@hadess.net>

	* data/totem.glade: added a time label for the fullscreen controls
	* src/Makefile.am: upd
	* src/bacon-video-widget-xine.c: (bacon_video_widget_open),
	(bacon_video_widget_play), (bacon_video_widget_get_metadata_int),
	(bacon_video_widget_get_metadata):
	* src/bacon-video-widget.h: removed the unused FOURCC metadata, removed
	unused struct members
	* src/rb-ellipsizing-label.c: more G_DEFINE_TYPE
	* src/totem-pl-parser.c: fix a warning
	* src/totem-statusbar.c: (totem_statusbar_update_time): fix an LTR/RTL
	issue with the time display, as well as a possible i18n problem
	* src/totem-time-label.[ch]: new widget to display the current position,
	not quite finished
	* src/totem.c: (on_got_metadata_event), (totem_statusbar_create),
	(totem_time_display_create): cleanups
	* src/totem.h: TotemTimeTable creation
parent 541e60ed
2004-07-04 Bastien Nocera <hadess@hadess.net>
* data/totem.glade: added a time label for the fullscreen controls
* src/Makefile.am: upd
* src/bacon-video-widget-xine.c: (bacon_video_widget_open),
(bacon_video_widget_play), (bacon_video_widget_get_metadata_int),
(bacon_video_widget_get_metadata):
* src/bacon-video-widget.h: removed the unused FOURCC metadata, removed
unused struct members
* src/rb-ellipsizing-label.c: more G_DEFINE_TYPE
* src/totem-pl-parser.c: fix a warning
* src/totem-statusbar.c: (totem_statusbar_update_time): fix an LTR/RTL
issue with the time display, as well as a possible i18n problem
* src/totem-time-label.[ch]: new widget to display the current position,
not quite finished
* src/totem.c: (on_got_metadata_event), (totem_statusbar_create),
(totem_time_display_create): cleanups
* src/totem.h: TotemTimeTable creation
2004-07-03 Bastien Nocera <hadess@hadess.net>
* src/totem-pl-parser.c: (totem_pl_parser_add_ram),
......
......@@ -11,6 +11,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkFrame" id="tefw_frame">
......@@ -24,6 +29,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkAlignment" id="tefw_alignment">
......@@ -32,6 +38,10 @@
<property name="yalign">0.5</property>
<property name="xscale">0</property>
<property name="yscale">0</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="tefw_hbox">
......@@ -95,6 +105,11 @@
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
<property name="icon">media-player-48.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
......@@ -116,6 +131,7 @@
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-7</property>
</widget>
</child>
......@@ -561,6 +577,7 @@
<property name="label" translatable="yes">_No TV-out</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
......@@ -579,6 +596,7 @@
<property name="label" translatable="yes">Tv-out in fullscreen by Nvidia (NTSC)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
......@@ -598,6 +616,7 @@
<property name="label" translatable="yes">Tv-out in fullscreen by Nvidia (PAL)</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
......@@ -617,6 +636,7 @@
<property name="label" translatable="yes">_DXR3 TV-out</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
......@@ -709,6 +729,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<signal name="clicked" handler="on_button1_clicked" last_modification_time="Fri, 18 Apr 2003 09:00:51 GMT"/>
<child>
......@@ -718,6 +739,10 @@
<property name="yalign">0.5</property>
<property name="xscale">0.5</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">0</property>
<property name="left_padding">0</property>
<property name="right_padding">0</property>
<child>
<widget class="GtkHBox" id="tpw_plugins_hbox">
......@@ -881,6 +906,7 @@
<property name="label" translatable="yes">Automatically _resize the window when a new video is loaded</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
......@@ -973,6 +999,7 @@
<property name="label" translatable="yes">Show _visual effects when an audio file is played</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
......@@ -1451,6 +1478,7 @@
<property name="label" translatable="yes">_Reset defaults</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
......@@ -1747,6 +1775,11 @@
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="tcw_vbox">
......@@ -1755,16 +1788,44 @@
<property name="spacing">3</property>
<child>
<widget class="Custom" id="tcw_label_custom">
<widget class="GtkHBox" id="hbox24">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">File name</property>
<property name="creation_function">label_create</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Sun, 09 Jun 2002 23:23:39 GMT</property>
<property name="homogeneous">False</property>
<property name="spacing">3</property>
<child>
<widget class="Custom" id="tcw_time_display_label">
<property name="visible">True</property>
<property name="creation_function">totem_time_display_create</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Sat, 03 Jul 2004 19:41:43 GMT</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="Custom" id="tcw_label_custom">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">File name</property>
<property name="creation_function">label_create</property>
<property name="int1">0</property>
<property name="int2">0</property>
<property name="last_modification_time">Sun, 09 Jun 2002 23:23:39 GMT</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="padding">6</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
......@@ -1836,6 +1897,7 @@
<property name="tooltip" translatable="yes">Previous</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="tcw_previous_button_image">
......@@ -1862,6 +1924,7 @@
<property name="tooltip" translatable="yes">Play/Pause</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="tcw_pp_button_image">
......@@ -1888,6 +1951,7 @@
<property name="tooltip" translatable="yes">Next</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="tcw_next_button_image">
......@@ -1919,6 +1983,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="image10">
......@@ -1962,6 +2027,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="image11">
......@@ -2007,6 +2073,11 @@
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="icon">media-player-48.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
......@@ -2028,6 +2099,7 @@
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-6</property>
</widget>
</child>
......@@ -2040,6 +2112,7 @@
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-5</property>
</widget>
</child>
......@@ -2348,6 +2421,11 @@
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="icon">media-player-48.png</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkVBox" id="vbox23">
......@@ -3328,6 +3406,7 @@
<property name="tooltip" translatable="yes">Previous</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="tmw_previous_button_image">
......@@ -3354,6 +3433,7 @@
<property name="tooltip" translatable="yes">Play/Pause</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="tmw_play_pause_button_image">
......@@ -3380,6 +3460,7 @@
<property name="tooltip" translatable="yes">Next</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="tmw_next_button_image">
......@@ -3405,6 +3486,7 @@
<property name="tooltip" translatable="yes">Show/Hide Playlist</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
......@@ -3449,6 +3531,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="image8">
......@@ -3492,6 +3575,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="relief">GTK_RELIEF_NONE</property>
<property name="focus_on_click">True</property>
<child>
<widget class="GtkImage" id="image9">
......
......@@ -101,6 +101,7 @@ totem_SOURCES = \
totem-playlist.c totem-playlist.h \
totem-screenshot.c \
totem-screenshot.h \
totem-time-label.c totem-time-label.h \
rb-ellipsizing-label.c \
rb-ellipsizing-label.h \
debug.h \
......
......@@ -115,6 +115,7 @@ static int video_props[4] = {
XINE_PARAM_VO_SATURATION,
XINE_PARAM_VO_HUE
};
static char *video_props_str[4] = {
GCONF_PREFIX"/brightness",
GCONF_PREFIX"/contrast",
......@@ -130,7 +131,6 @@ struct BaconVideoWidgetPrivate {
xine_audio_port_t *ao_driver;
xine_event_queue_t *ev_queue;
double display_ratio;
gboolean started;
/* Configuration */
GConfClient *gc;
......@@ -164,7 +164,6 @@ struct BaconVideoWidgetPrivate {
gboolean auto_resize;
int volume;
TvOutType tvout;
guint32 video_fcc, audio_fcc;
gboolean is_live;
GAsyncQueue *queue;
......@@ -1853,9 +1852,6 @@ bacon_video_widget_open (BaconVideoWidget *bvw, const char *mrl,
g_return_val_if_fail (bvw->priv->xine != NULL, FALSE);
g_return_val_if_fail (bvw->priv->mrl == NULL, FALSE);
bvw->priv->video_fcc = 0;
bvw->priv->audio_fcc = 0;
error = xine_open (bvw->priv->stream, mrl);
if (error == 0)
{
......@@ -1871,34 +1867,28 @@ bacon_video_widget_open (BaconVideoWidget *bvw, const char *mrl,
&& xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_HANDLED) == FALSE))
{
char *fourcc_str, *name;
char *name;
g_signal_emit (G_OBJECT (bvw),
bvw_table_signals[GOT_METADATA], 0, NULL);
bvw->priv->video_fcc = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_VIDEO_FOURCC);
fourcc_str = get_fourcc_string (bvw->priv->video_fcc);
name = g_strdup (xine_get_meta_info (bvw->priv->stream,
XINE_META_INFO_VIDEOCODEC));
/* Only change the audio_fcc if we're on x86 */
if (xine_get_stream_info
(bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_HANDLED) == FALSE)
if (name == NULL)
{
bvw->priv->audio_fcc = xine_get_stream_info
(bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_FOURCC);
guint32 video_fcc;
video_fcc = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_VIDEO_FOURCC);
name = get_fourcc_string (video_fcc);
}
bacon_video_widget_close (bvw);
g_set_error (gerror, 0, 0,
_("Video codec '%s' is not handled. You might need to install additional plugins to be able to play some types of movies"),
name ? name : fourcc_str);
name);
g_free (fourcc_str);
g_free (name);
return FALSE;
......@@ -1939,7 +1929,6 @@ bacon_video_widget_play (BaconVideoWidget *bvw, GError **gerror)
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), -1);
g_return_val_if_fail (bvw->priv->xine != NULL, -1);
bvw->priv->started = TRUE;
error = 1;
if (bvw->priv->seeking == 1)
......@@ -3184,9 +3173,6 @@ bacon_video_widget_get_metadata_int (BaconVideoWidget *bvw,
integer = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_VIDEO_HEIGHT);
break;
case BVW_INFO_VIDEO_FOURCC:
integer = (guint32) bvw->priv->video_fcc;
break;
case BVW_INFO_FPS:
if (xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_FRAME_DURATION) != 0)
......@@ -3202,9 +3188,6 @@ bacon_video_widget_get_metadata_int (BaconVideoWidget *bvw,
integer = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_BITRATE) / 1000;
break;
case BVW_INFO_AUDIO_FOURCC:
integer = (guint32) bvw->priv->audio_fcc;
break;
default:
g_assert_not_reached ();
}
......@@ -3268,10 +3251,8 @@ bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
case BVW_INFO_DURATION:
case BVW_INFO_DIMENSION_X:
case BVW_INFO_DIMENSION_Y:
case BVW_INFO_VIDEO_FOURCC:
case BVW_INFO_FPS:
case BVW_INFO_BITRATE:
case BVW_INFO_AUDIO_FOURCC:
bacon_video_widget_get_metadata_int (bvw, type, value);
break;
case BVW_INFO_HAS_VIDEO:
......
......@@ -151,13 +151,11 @@ typedef enum {
BVW_INFO_DIMENSION_X,
BVW_INFO_DIMENSION_Y,
BVW_INFO_VIDEO_CODEC,
BVW_INFO_VIDEO_FOURCC,
BVW_INFO_FPS,
/* Audio */
BVW_INFO_HAS_AUDIO,
BVW_INFO_BITRATE,
BVW_INFO_AUDIO_CODEC,
BVW_INFO_AUDIO_FOURCC
} BaconVideoWidgetMetadataType;
void bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
......
......@@ -115,6 +115,7 @@ static int video_props[4] = {
XINE_PARAM_VO_SATURATION,
XINE_PARAM_VO_HUE
};
static char *video_props_str[4] = {
GCONF_PREFIX"/brightness",
GCONF_PREFIX"/contrast",
......@@ -130,7 +131,6 @@ struct BaconVideoWidgetPrivate {
xine_audio_port_t *ao_driver;
xine_event_queue_t *ev_queue;
double display_ratio;
gboolean started;
/* Configuration */
GConfClient *gc;
......@@ -164,7 +164,6 @@ struct BaconVideoWidgetPrivate {
gboolean auto_resize;
int volume;
TvOutType tvout;
guint32 video_fcc, audio_fcc;
gboolean is_live;
GAsyncQueue *queue;
......@@ -1853,9 +1852,6 @@ bacon_video_widget_open (BaconVideoWidget *bvw, const char *mrl,
g_return_val_if_fail (bvw->priv->xine != NULL, FALSE);
g_return_val_if_fail (bvw->priv->mrl == NULL, FALSE);
bvw->priv->video_fcc = 0;
bvw->priv->audio_fcc = 0;
error = xine_open (bvw->priv->stream, mrl);
if (error == 0)
{
......@@ -1871,34 +1867,28 @@ bacon_video_widget_open (BaconVideoWidget *bvw, const char *mrl,
&& xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_HANDLED) == FALSE))
{
char *fourcc_str, *name;
char *name;
g_signal_emit (G_OBJECT (bvw),
bvw_table_signals[GOT_METADATA], 0, NULL);
bvw->priv->video_fcc = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_VIDEO_FOURCC);
fourcc_str = get_fourcc_string (bvw->priv->video_fcc);
name = g_strdup (xine_get_meta_info (bvw->priv->stream,
XINE_META_INFO_VIDEOCODEC));
/* Only change the audio_fcc if we're on x86 */
if (xine_get_stream_info
(bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_HANDLED) == FALSE)
if (name == NULL)
{
bvw->priv->audio_fcc = xine_get_stream_info
(bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_FOURCC);
guint32 video_fcc;
video_fcc = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_VIDEO_FOURCC);
name = get_fourcc_string (video_fcc);
}
bacon_video_widget_close (bvw);
g_set_error (gerror, 0, 0,
_("Video codec '%s' is not handled. You might need to install additional plugins to be able to play some types of movies"),
name ? name : fourcc_str);
name);
g_free (fourcc_str);
g_free (name);
return FALSE;
......@@ -1939,7 +1929,6 @@ bacon_video_widget_play (BaconVideoWidget *bvw, GError **gerror)
g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), -1);
g_return_val_if_fail (bvw->priv->xine != NULL, -1);
bvw->priv->started = TRUE;
error = 1;
if (bvw->priv->seeking == 1)
......@@ -3184,9 +3173,6 @@ bacon_video_widget_get_metadata_int (BaconVideoWidget *bvw,
integer = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_VIDEO_HEIGHT);
break;
case BVW_INFO_VIDEO_FOURCC:
integer = (guint32) bvw->priv->video_fcc;
break;
case BVW_INFO_FPS:
if (xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_FRAME_DURATION) != 0)
......@@ -3202,9 +3188,6 @@ bacon_video_widget_get_metadata_int (BaconVideoWidget *bvw,
integer = xine_get_stream_info (bvw->priv->stream,
XINE_STREAM_INFO_AUDIO_BITRATE) / 1000;
break;
case BVW_INFO_AUDIO_FOURCC:
integer = (guint32) bvw->priv->audio_fcc;
break;
default:
g_assert_not_reached ();
}
......@@ -3268,10 +3251,8 @@ bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
case BVW_INFO_DURATION:
case BVW_INFO_DIMENSION_X:
case BVW_INFO_DIMENSION_Y:
case BVW_INFO_VIDEO_FOURCC:
case BVW_INFO_FPS:
case BVW_INFO_BITRATE:
case BVW_INFO_AUDIO_FOURCC:
bacon_video_widget_get_metadata_int (bvw, type, value);
break;
case BVW_INFO_HAS_VIDEO:
......
......@@ -151,13 +151,11 @@ typedef enum {
BVW_INFO_DIMENSION_X,
BVW_INFO_DIMENSION_Y,
BVW_INFO_VIDEO_CODEC,
BVW_INFO_VIDEO_FOURCC,
BVW_INFO_FPS,
/* Audio */
BVW_INFO_HAS_AUDIO,
BVW_INFO_BITRATE,
BVW_INFO_AUDIO_CODEC,
BVW_INFO_AUDIO_FOURCC
} BaconVideoWidgetMetadataType;
void bacon_video_widget_get_metadata (BaconVideoWidget *bvw,
......
......@@ -967,7 +967,7 @@ parse_smil_entries (TotemPlParser *parser, char *base, xmlDocPtr doc,
return retval;
}
static gboolean
static TotemPlParserResult
totem_pl_parser_add_smil (TotemPlParser *parser, const char *url, gpointer data)
{
xmlDocPtr doc;
......
......@@ -582,33 +582,7 @@ gul_pango_layout_set_text_ellipsized (PangoLayout *layout,
g_free (s);
}
GType
rb_ellipsizing_label_get_type (void)
{
static GType rb_ellipsizing_label_type = 0;
if (rb_ellipsizing_label_type == 0)
{
static const GTypeInfo our_info =
{
sizeof (RBEllipsizingLabelClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) rb_ellipsizing_label_class_init,
NULL,
NULL, /* class_data */
sizeof (RBEllipsizingLabel),
0, /* n_preallocs */
(GInstanceInitFunc) rb_ellipsizing_label_init
};
rb_ellipsizing_label_type = g_type_register_static (GTK_TYPE_LABEL,
"RBEllipsizingLabel",
&our_info, 0);
}
return rb_ellipsizing_label_type;
}
G_DEFINE_TYPE (RBEllipsizingLabel, rb_ellipsizing_label, GTK_TYPE_LABEL)
static void
rb_ellipsizing_label_init (RBEllipsizingLabel *label)
......
......@@ -967,7 +967,7 @@ parse_smil_entries (TotemPlParser *parser, char *base, xmlDocPtr doc,
return retval;
}
static gboolean
static TotemPlParserResult
totem_pl_parser_add_smil (TotemPlParser *parser, const char *url, gpointer data)
{
xmlDocPtr doc;
......
......@@ -184,11 +184,12 @@ totem_statusbar_update_time (TotemStatusbar *statusbar)
} else {
length = time_to_string (statusbar->length == -1 ? 0 : statusbar->length);
//FIXME LTR/RTL
if (statusbar->seeking == FALSE)
label = g_strdup_printf ("%s / %s", time, length);
/* Elapsed / Total Length */
label = g_strdup_printf (_("%s / %s"), time, length);
else
label = g_strdup_printf ("%s %s / %s", _("Seek to"), time, length);
/* Seeking to Time / Total Length */
label = g_strdup_printf (_("Seek to %s / %s"), time, length);
g_free (length);
}
......
#include "totem-time-label.h"
#include <glib/gi18n.h>
static void totem_time_label_class_init (TotemTimeLabelClass *class);
static void totem_time_label_init (TotemTimeLabel *label);
static GObjectClass *parent_class = NULL;
G_DEFINE_TYPE (TotemTimeLabel, totem_time_label, GTK_TYPE_LABEL)
static void
totem_time_label_init (TotemTimeLabel *label)
{
}
GtkWidget*
totem_time_label_new (void)
{
TotemTimeLabel *label;
label = g_object_new (TOTEM_TYPE_TIME_LABEL, NULL);
gtk_label_set_text (GTK_LABEL (label), _("0:00"));
return GTK_WIDGET (label);
}
static void
totem_time_label_class_init (TotemTimeLabelClass *klass)
{
GtkWidgetClass *widget_class;
parent_class = g_type_class_peek_parent (klass);
widget_class = GTK_WIDGET_CLASS (klass);
}
#ifndef TOTEM_TIME_LABEL_H
#define TOTEM_TIME_LABEL_H
#include <gtk/gtklabel.h>
#define TOTEM_TYPE_TIME_LABEL (totem_time_label_get_type ())
#define TOTEM_TIME_LABEL(obj) (GTK_CHECK_CAST ((obj), TOTEM_TYPE_ELLIPSIZING_LABEL, TotemTimeLabel))
#define TOTEM_TIME_LABEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TOTEM_TYPE_ELLIPSIZING_LABEL, TotemTimeLabelClass))
#define TOTEM_IS_TIME_LABEL(obj) (GTK_CHECK_TYPE ((obj), TOTEM_TYPE_ELLIPSIZING_LABEL))
#define TOTEM_IS_TIME_LABEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TOTEM_TYPE_ELLIPSIZING_LABEL))
typedef struct TotemTimeLabel TotemTimeLabel;
typedef struct TotemTimeLabelClass TotemTimeLabelClass;
struct TotemTimeLabel {
GtkLabel parent;
};
struct TotemTimeLabelClass {
GtkLabelClass parent_class;
};
GtkType totem_time_label_get_type (void);
GtkWidget *totem_time_label_new (void);
void totem_time_label_set_text (TotemTimeLabel *label,
const char *string);
#endif /* TOTEM_TIME_LABEL_H */
......@@ -43,6 +43,7 @@
#include "rb-ellipsizing-label.h"
#include "bacon-cd-selection.h"
#include "totem-statusbar.h"
#include "totem-time-label.h"
#include "totem-screenshot.h"
#include "video-utils.h"
......@@ -1230,12 +1231,13 @@ on_got_metadata_event (BaconVideoWidget *bvw, Totem *totem)
bacon_video_widget_properties_update
(BACON_VIDEO_WIDGET_PROPERTIES (totem->properties),
totem->bvw, FALSE);
name = totem_get_nice_name_for_stream (totem);
name = totem_get_nice_name_for_stream (totem);
if (name == NULL)