diff options
-rw-r--r-- | ChangeLog | 17 | ||||
-rw-r--r-- | data/properties.glade | 65 | ||||
-rw-r--r-- | src/backend/bacon-video-widget-gst-0.10.c | 8 | ||||
-rw-r--r-- | src/backend/bacon-video-widget-xine.c | 5 | ||||
-rw-r--r-- | src/backend/bacon-video-widget.h | 1 | ||||
-rw-r--r-- | src/plugins/properties/bacon-video-widget-properties.c | 10 |
6 files changed, 102 insertions, 4 deletions
@@ -1,3 +1,20 @@ +2007-06-15 Philip Withnall <pwithnall@svn.gnome.org> + + * data/properties.glade: + * src/backend/bacon-video-widget-gst-0.10.c: + (bacon_video_widget_get_metadata_string), + (bacon_video_widget_get_metadata): + * src/backend/bacon-video-widget-xine.c: + (bacon_video_widget_get_metadata_string), + (bacon_video_widget_get_metadata): + * src/backend/bacon-video-widget.h: + * src/plugins/properties/bacon-video-widget-properties.c: + (bacon_video_widget_properties_reset), + (bacon_video_widget_properties_update), + (bacon_video_widget_properties_new): Patch from Przemysław Grzegorczyk + <pgrzegorczyk@gmail.com> to add support for displaying MP3/Vorbis + comment tags in the properties view. (Closes: #430984) + 2007-06-12 Bastien Nocera <hadess@hadess.net> * configure.in: Fix distcheck by adding the test python and vala diff --git a/data/properties.glade b/data/properties.glade index b46341234..729f3a42f 100644 --- a/data/properties.glade +++ b/data/properties.glade @@ -105,7 +105,7 @@ <child> <widget class="GtkTable" id="general"> <property name="visible">True</property> - <property name="n_rows">5</property> + <property name="n_rows">6</property> <property name="n_columns">2</property> <property name="homogeneous">False</property> <property name="row_spacing">6</property> @@ -425,6 +425,69 @@ <property name="y_options"></property> </packing> </child> + + <child> + <widget class="GtkLabel" id="comment_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Comment:</property> + <property name="use_underline">False</property> + <property name="use_markup">True</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + <accessibility> + <atkrelation target="comment" type="label-for"/> + </accessibility> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="comment"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Unknown</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="ellipsize">PANGO_ELLIPSIZE_END</property> + <property name="width_chars">-1</property> + <property name="single_line_mode">False</property> + <property name="angle">0</property> + <accessibility> + <atkrelation target="comment_label" type="labelled-by"/> + </accessibility> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">expand|shrink|fill</property> + <property name="y_options"></property> + </packing> + </child> </widget> </child> </widget> diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c index 32bded72b..9e0042b9b 100644 --- a/src/backend/bacon-video-widget-gst-0.10.c +++ b/src/backend/bacon-video-widget-gst-0.10.c @@ -4013,6 +4013,7 @@ static struct _metadata_map_info { { BVW_INFO_TITLE, "title" }, { BVW_INFO_ARTIST, "artist" }, { BVW_INFO_YEAR, "year" }, + { BVW_INFO_COMMENT, "comment" }, { BVW_INFO_ALBUM, "album" }, { BVW_INFO_DURATION, "duration" }, { BVW_INFO_TRACK_NUMBER, "track-number" }, @@ -4164,6 +4165,12 @@ bacon_video_widget_get_metadata_string (BaconVideoWidget * bvw, } } break; + case BVW_INFO_COMMENT: + if (bvw->priv->tagcache != NULL) { + res = gst_tag_list_get_string_index (bvw->priv->tagcache, + GST_TAG_COMMENT, 0, &string); + } + break; case BVW_INFO_ALBUM: if (bvw->priv->tagcache != NULL) { res = gst_tag_list_get_string_index (bvw->priv->tagcache, @@ -4411,6 +4418,7 @@ bacon_video_widget_get_metadata (BaconVideoWidget * bvw, case BVW_INFO_TITLE: case BVW_INFO_ARTIST: case BVW_INFO_YEAR: + case BVW_INFO_COMMENT: case BVW_INFO_ALBUM: case BVW_INFO_VIDEO_CODEC: case BVW_INFO_AUDIO_CODEC: diff --git a/src/backend/bacon-video-widget-xine.c b/src/backend/bacon-video-widget-xine.c index 08d9194a0..4c5db460c 100644 --- a/src/backend/bacon-video-widget-xine.c +++ b/src/backend/bacon-video-widget-xine.c @@ -3658,6 +3658,10 @@ bacon_video_widget_get_metadata_string (BaconVideoWidget *bvw, BaconVideoWidgetM string = xine_get_meta_info (bvw->priv->stream, XINE_META_INFO_YEAR); break; + case BVW_INFO_COMMENT: + string = xine_get_meta_info (bvw->priv->stream, + XINE_META_INFO_COMMENT); + break; case BVW_INFO_VIDEO_CODEC: string = xine_get_meta_info (bvw->priv->stream, XINE_META_INFO_VIDEOCODEC); @@ -3825,6 +3829,7 @@ bacon_video_widget_get_metadata (BaconVideoWidget *bvw, case BVW_INFO_ARTIST: case BVW_INFO_ALBUM: case BVW_INFO_YEAR: + case BVW_INFO_COMMENT: case BVW_INFO_VIDEO_CODEC: case BVW_INFO_AUDIO_CODEC: case BVW_INFO_AUDIO_CHANNELS: diff --git a/src/backend/bacon-video-widget.h b/src/backend/bacon-video-widget.h index f06dfee19..074eced74 100644 --- a/src/backend/bacon-video-widget.h +++ b/src/backend/bacon-video-widget.h @@ -190,6 +190,7 @@ typedef enum { BVW_INFO_TITLE, BVW_INFO_ARTIST, BVW_INFO_YEAR, + BVW_INFO_COMMENT, BVW_INFO_ALBUM, BVW_INFO_DURATION, BVW_INFO_TRACK_NUMBER, diff --git a/src/plugins/properties/bacon-video-widget-properties.c b/src/plugins/properties/bacon-video-widget-properties.c index c2fce01a6..b6c907c1b 100644 --- a/src/plugins/properties/bacon-video-widget-properties.c +++ b/src/plugins/properties/bacon-video-widget-properties.c @@ -149,6 +149,8 @@ bacon_video_widget_properties_reset (BaconVideoWidgetProperties *props) bacon_video_widget_properties_set_label (props, "year", _("Unknown")); /* Duration */ bacon_video_widget_properties_from_time (props, 0); + /* Comment */ + bacon_video_widget_properties_set_label (props, "comment", _("Unknown")); /* Dimensions */ bacon_video_widget_properties_set_label (props, "dimensions", _("N/A")); @@ -209,6 +211,7 @@ bacon_video_widget_properties_update (BaconVideoWidgetProperties *props, UPDATE_FROM_STRING (BVW_INFO_ARTIST, "artist"); UPDATE_FROM_STRING (BVW_INFO_ALBUM, "album"); UPDATE_FROM_STRING (BVW_INFO_YEAR, "year"); + UPDATE_FROM_STRING (BVW_INFO_COMMENT, "comment"); bacon_video_widget_get_metadata (BACON_VIDEO_WIDGET (bvw), BVW_INFO_DURATION, &value); @@ -288,9 +291,10 @@ bacon_video_widget_properties_new (void) GtkWidget *vbox; GtkSizeGroup *group; const char *labels[] = { "title_label", "artist_label", "album_label", - "year_label", "duration_label", "dimensions_label", "vcodec_label", - "framerate_label", "vbitrate_label", "abitrate_label", - "acodec_label", "samplerate_label", "channels_label" }; + "year_label", "duration_label", "comment_label", + "dimensions_label", "vcodec_label", "framerate_label", + "vbitrate_label", "abitrate_label", "acodec_label", + "samplerate_label", "channels_label" }; const char *bold_labels[] = { "bvwp_general_label", "bvwp_video_label", |