diff options
author | Krifa75 <yahiaoui.fakhri@gmail.com> | 2022-11-23 00:23:52 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-11-23 21:21:23 +0100 |
commit | da045f699ffe2ff13558db9270d242bebb037785 (patch) | |
tree | 2669beec2dac9138ab3a4649ff922ee2b87adc98 /src | |
parent | 1e0b0b189492f37f5652fd4ce2b1c3c870010977 (diff) | |
download | totem-da045f699ffe2ff13558db9270d242bebb037785.tar.gz |
properties: Use template to create dialogue
Clean up properties dialogue creation by using template and object
properties to fill it in.
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/properties/bacon-video-widget-properties.c | 355 | ||||
-rw-r--r-- | src/plugins/properties/bacon-video-widget-properties.h | 9 | ||||
-rw-r--r-- | src/plugins/properties/properties.ui | 1496 | ||||
-rw-r--r-- | src/plugins/properties/totem-movie-properties.c | 40 |
4 files changed, 1043 insertions, 857 deletions
diff --git a/src/plugins/properties/bacon-video-widget-properties.c b/src/plugins/properties/bacon-video-widget-properties.c index 779ef25b3..53e15d2d7 100644 --- a/src/plugins/properties/bacon-video-widget-properties.c +++ b/src/plugins/properties/bacon-video-widget-properties.c @@ -29,108 +29,324 @@ #include "bacon-video-widget-properties.h" -static void bacon_video_widget_properties_dispose (GObject *object); +static void bacon_video_widget_properties_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec); +static void bacon_video_widget_properties_set_label (GtkLabel *label, const char *text); struct _BaconVideoWidgetProperties { - GtkBox parent; - GtkBuilder *xml; + GtkDialog parent; + + /* General */ + GtkLabel *title; + GtkLabel *artist; + GtkLabel *album; + GtkLabel *year; + GtkLabel *duration; + GtkLabel *comment; + GtkLabel *container; + + /* Video */ + GtkWidget *video_vbox; + GtkWidget *video; + + GtkLabel *dimensions; + GtkLabel *vcodec; + GtkLabel *framerate; + GtkLabel *video_bitrate; + + /* Audio */ + GtkWidget *audio; + + GtkLabel *acodec; + GtkLabel *channels; + GtkLabel *samplerate; + GtkLabel *audio_bitrate; + int time; }; -G_DEFINE_TYPE (BaconVideoWidgetProperties, bacon_video_widget_properties, GTK_TYPE_BOX) +G_DEFINE_TYPE (BaconVideoWidgetProperties, bacon_video_widget_properties, GTK_TYPE_DIALOG) + +enum { + PROP_0, + PROP_TITLE, + PROP_ARITST, + PROP_ALBUM, + PROP_YEAR, + PROP_DURATION, + PROP_COMMENT, + PROP_CONTAINER, + PROP_DIMENSIONS, + PROP_VIDEO_CODEC, + PROP_VIDEO_FRAMERATE, + PROP_VIDEO_BITRATE, + PROP_AUDIO_CODEC, + PROP_AUDIO_CHANNELS, + PROP_AUDIO_SAMPLERATE, + PROP_AUDIO_BITRATE, + N_PROPS +}; + +static GParamSpec *properties [N_PROPS]; static void bacon_video_widget_properties_class_init (BaconVideoWidgetPropertiesClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + + object_class->set_property = bacon_video_widget_properties_set_property; + + /* General */ + properties[PROP_TITLE] = g_param_spec_string ("media-title", + "Title", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_ARITST] = g_param_spec_string ("artist", + "Artist", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_ALBUM] = g_param_spec_string ("album", + "Album", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_YEAR] = g_param_spec_string ("year", + "Year", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_DURATION] = g_param_spec_int ("duration", + "Duration", + "", + 0, + G_MAXINT, + 0, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_COMMENT] = g_param_spec_string ("comment", + "Comment", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_CONTAINER] = g_param_spec_string ("container", + "Container", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); - object_class->dispose = bacon_video_widget_properties_dispose; -} + /* Video */ + properties[PROP_DIMENSIONS] = g_param_spec_string ("dimensions", + "Dimensions", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_VIDEO_CODEC] = g_param_spec_string ("video-codec", + "Video codec", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_VIDEO_FRAMERATE] = g_param_spec_float ("framerate", + "Video frame rate", + "", + 0.f, + G_MAXFLOAT, + 0.f, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_VIDEO_BITRATE] = g_param_spec_string ("video-bitrate", + "Video bit rate", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); -static void -bacon_video_widget_properties_init (BaconVideoWidgetProperties *props) -{ - gtk_orientable_set_orientation (GTK_ORIENTABLE (props), GTK_ORIENTATION_VERTICAL); + /* Audio */ + properties[PROP_AUDIO_CODEC] = g_param_spec_string ("audio-codec", + "Audio bit rate", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_AUDIO_CHANNELS] = g_param_spec_string ("channels", + "Audio channels", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_AUDIO_SAMPLERATE] = g_param_spec_string ("samplerate", + "Audio sample rate", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + properties[PROP_AUDIO_BITRATE] = g_param_spec_string ("audio-bitrate", + "Audio bit rate", + "", + NULL, + G_PARAM_WRITABLE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + g_object_class_install_properties (object_class, N_PROPS, properties); + + gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/totem/properties/properties.ui"); + + /* General */ + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, title); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, artist); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, album); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, year); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, duration); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, comment); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, container); + + /* Video */ + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, video_vbox); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, video); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, dimensions); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, vcodec); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, framerate); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, video_bitrate); + + /* Audio */ + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, audio); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, acodec); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, channels); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, samplerate); + gtk_widget_class_bind_template_child (widget_class, BaconVideoWidgetProperties, audio_bitrate); } static void -bacon_video_widget_properties_dispose (GObject *object) +bacon_video_widget_properties_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) { BaconVideoWidgetProperties *props = BACON_VIDEO_WIDGET_PROPERTIES (object); - g_clear_object (&props->xml); - - G_OBJECT_CLASS (bacon_video_widget_properties_parent_class)->dispose (object); + switch (prop_id) + { + case PROP_TITLE: + bacon_video_widget_properties_set_label (props->title, g_value_get_string (value)); + break; + case PROP_ARITST: + bacon_video_widget_properties_set_label (props->artist, g_value_get_string (value)); + break; + case PROP_ALBUM: + bacon_video_widget_properties_set_label (props->album, g_value_get_string (value)); + break; + case PROP_YEAR: + bacon_video_widget_properties_set_label (props->year, g_value_get_string (value)); + break; + case PROP_DURATION: + bacon_video_widget_properties_set_duration (props, g_value_get_int (value)); + break; + case PROP_COMMENT: + bacon_video_widget_properties_set_label (props->comment, g_value_get_string (value)); + break; + case PROP_CONTAINER: + bacon_video_widget_properties_set_label (props->container, g_value_get_string (value)); + break; + case PROP_DIMENSIONS: + bacon_video_widget_properties_set_label (props->dimensions, g_value_get_string (value)); + break; + case PROP_VIDEO_CODEC: + bacon_video_widget_properties_set_label (props->vcodec, g_value_get_string (value)); + break; + case PROP_VIDEO_FRAMERATE: + bacon_video_widget_properties_set_framerate (props, g_value_get_float (value)); + break; + case PROP_VIDEO_BITRATE: + bacon_video_widget_properties_set_label (props->video_bitrate, g_value_get_string (value)); + break; + case PROP_AUDIO_CODEC: + bacon_video_widget_properties_set_label (props->acodec, g_value_get_string (value)); + break; + case PROP_AUDIO_CHANNELS: + bacon_video_widget_properties_set_label (props->channels, g_value_get_string (value)); + break; + case PROP_AUDIO_SAMPLERATE: + bacon_video_widget_properties_set_label (props->samplerate, g_value_get_string (value)); + break; + case PROP_AUDIO_BITRATE: + bacon_video_widget_properties_set_label (props->audio_bitrate, g_value_get_string (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } } -void -bacon_video_widget_properties_set_label (BaconVideoWidgetProperties *props, - const char *name, - const char *text) +static void +bacon_video_widget_properties_set_label (GtkLabel *label, + const char *text) { - GtkLabel *item; + gtk_label_set_text (label, text); - g_return_if_fail (props != NULL); - g_return_if_fail (BACON_IS_VIDEO_WIDGET_PROPERTIES (props)); - g_return_if_fail (name != NULL); + gtk_widget_set_visible (GTK_WIDGET (label), text != NULL && *text != '\0'); +} - item = GTK_LABEL (gtk_builder_get_object (props->xml, name)); - g_return_if_fail (item != NULL); - gtk_label_set_text (item, text); +static void +bacon_video_widget_properties_init (BaconVideoWidgetProperties *props) +{ + gtk_widget_init_template (GTK_WIDGET (props)); - gtk_widget_set_visible (GTK_WIDGET (item), text != NULL && *text != '\0'); + bacon_video_widget_properties_reset (props); } void bacon_video_widget_properties_reset (BaconVideoWidgetProperties *props) { - GtkWidget *item; - g_return_if_fail (props != NULL); g_return_if_fail (BACON_IS_VIDEO_WIDGET_PROPERTIES (props)); - item = GTK_WIDGET (gtk_builder_get_object (props->xml, "video_vbox")); - gtk_widget_show (item); - item = GTK_WIDGET (gtk_builder_get_object (props->xml, "video")); - gtk_widget_set_sensitive (item, FALSE); - item = GTK_WIDGET (gtk_builder_get_object (props->xml, "audio")); - gtk_widget_set_sensitive (item, FALSE); + gtk_widget_show (props->video_vbox); + gtk_widget_set_sensitive (props->video, FALSE); + gtk_widget_set_sensitive (props->audio, FALSE); /* Title */ - bacon_video_widget_properties_set_label (props, "title", NULL); + bacon_video_widget_properties_set_label (props->title, NULL); /* Artist */ - bacon_video_widget_properties_set_label (props, "artist", NULL); + bacon_video_widget_properties_set_label (props->artist, NULL); /* Album */ - bacon_video_widget_properties_set_label (props, "album", NULL); + bacon_video_widget_properties_set_label (props->album, NULL); /* Year */ - bacon_video_widget_properties_set_label (props, "year", NULL); + bacon_video_widget_properties_set_label (props->year, NULL); /* Duration */ bacon_video_widget_properties_set_duration (props, 0); /* Comment */ - bacon_video_widget_properties_set_label (props, "comment", ""); + bacon_video_widget_properties_set_label (props->comment, ""); /* Container */ - bacon_video_widget_properties_set_label (props, "container", NULL); + bacon_video_widget_properties_set_label (props->container, NULL); /* Dimensions */ - bacon_video_widget_properties_set_label (props, "dimensions", C_("Dimensions", "N/A")); + bacon_video_widget_properties_set_label (props->dimensions, C_("Dimensions", "N/A")); /* Video Codec */ - bacon_video_widget_properties_set_label (props, "vcodec", C_("Video codec", "N/A")); + bacon_video_widget_properties_set_label (props->vcodec, C_("Video codec", "N/A")); /* Video Bitrate */ - bacon_video_widget_properties_set_label (props, "video_bitrate", + bacon_video_widget_properties_set_label (props->video_bitrate, C_("Video bit rate", "N/A")); /* Framerate */ - bacon_video_widget_properties_set_label (props, "framerate", + bacon_video_widget_properties_set_label (props->framerate, C_("Frame rate", "N/A")); /* Audio Bitrate */ - bacon_video_widget_properties_set_label (props, "audio_bitrate", + bacon_video_widget_properties_set_label (props->audio_bitrate, C_("Audio bit rate", "N/A")); /* Audio Codec */ - bacon_video_widget_properties_set_label (props, "acodec", C_("Audio codec", "N/A")); + bacon_video_widget_properties_set_label (props->acodec, C_("Audio codec", "N/A")); /* Sample rate */ - bacon_video_widget_properties_set_label (props, "samplerate", _("0 Hz")); + bacon_video_widget_properties_set_label (props->samplerate, _("0 Hz")); /* Channels */ - bacon_video_widget_properties_set_label (props, "channels", _("0 Channels")); + bacon_video_widget_properties_set_label (props->channels, _("0 Channels")); } static char * @@ -204,7 +420,7 @@ bacon_video_widget_properties_set_duration (BaconVideoWidgetProperties *props, return; string = time_to_string_text (_time); - bacon_video_widget_properties_set_label (props, "duration", string); + bacon_video_widget_properties_set_label (props->duration, string); g_free (string); props->time = _time; @@ -215,20 +431,15 @@ bacon_video_widget_properties_set_has_type (BaconVideoWidgetProperties *props, gboolean has_video, gboolean has_audio) { - GtkWidget *item; - g_return_if_fail (props != NULL); g_return_if_fail (BACON_IS_VIDEO_WIDGET_PROPERTIES (props)); /* Video */ - item = GTK_WIDGET (gtk_builder_get_object (props->xml, "video")); - gtk_widget_set_sensitive (item, has_video); - item = GTK_WIDGET (gtk_builder_get_object (props->xml, "video_vbox")); - gtk_widget_set_visible (item, has_video); + gtk_widget_set_sensitive (props->video, has_video); + gtk_widget_set_visible (props->video_vbox, has_video); /* Audio */ - item = GTK_WIDGET (gtk_builder_get_object (props->xml, "audio")); - gtk_widget_set_sensitive (item, has_audio); + gtk_widget_set_sensitive (props->audio, has_audio); } void @@ -254,35 +465,15 @@ bacon_video_widget_properties_set_framerate (BaconVideoWidgetProperties *props, } else { temp = g_strdup (C_("Frame rate", "N/A")); } - bacon_video_widget_properties_set_label (props, "framerate", temp); + bacon_video_widget_properties_set_label (props->framerate, temp); g_free (temp); } GtkWidget* -bacon_video_widget_properties_new (void) +bacon_video_widget_properties_new (GtkWindow *transient_for) { - BaconVideoWidgetProperties *props; - GtkBuilder *xml; - GtkWidget *vbox; - - xml = gtk_builder_new (); - gtk_builder_set_translation_domain (xml, GETTEXT_PACKAGE); - if (gtk_builder_add_from_resource (xml, "/org/gnome/totem/properties/properties.ui", NULL) == 0) { - g_object_unref (xml); - return NULL; - } - - props = BACON_VIDEO_WIDGET_PROPERTIES (g_object_new - (BACON_TYPE_VIDEO_WIDGET_PROPERTIES, NULL)); - - props->xml = xml; - vbox = GTK_WIDGET (gtk_builder_get_object (props->xml, "sw_properties")); - gtk_box_pack_start (GTK_BOX (props), vbox, TRUE, TRUE, 0); - - bacon_video_widget_properties_reset (props); - - gtk_widget_show (GTK_WIDGET (vbox)); - - return GTK_WIDGET (props); + return g_object_new (BACON_TYPE_VIDEO_WIDGET_PROPERTIES, + "transient-for", transient_for, + NULL); } diff --git a/src/plugins/properties/bacon-video-widget-properties.h b/src/plugins/properties/bacon-video-widget-properties.h index b664a3f98..8abbac51e 100644 --- a/src/plugins/properties/bacon-video-widget-properties.h +++ b/src/plugins/properties/bacon-video-widget-properties.h @@ -22,18 +22,15 @@ #pragma once -#include <gtk/gtk.h> +#include <handy.h> #define BACON_TYPE_VIDEO_WIDGET_PROPERTIES (bacon_video_widget_properties_get_type ()) -G_DECLARE_FINAL_TYPE(BaconVideoWidgetProperties, bacon_video_widget_properties, BACON, VIDEO_WIDGET_PROPERTIES, GtkBox) +G_DECLARE_FINAL_TYPE(BaconVideoWidgetProperties, bacon_video_widget_properties, BACON, VIDEO_WIDGET_PROPERTIES, GtkDialog) GType bacon_video_widget_properties_get_type (void); -GtkWidget *bacon_video_widget_properties_new (void); +GtkWidget *bacon_video_widget_properties_new (GtkWindow *transient_for); void bacon_video_widget_properties_reset (BaconVideoWidgetProperties *props); -void bacon_video_widget_properties_set_label (BaconVideoWidgetProperties *props, - const char *name, - const char *text); void bacon_video_widget_properties_set_duration (BaconVideoWidgetProperties *props, int duration); void bacon_video_widget_properties_set_has_type (BaconVideoWidgetProperties *props, diff --git a/src/plugins/properties/properties.ui b/src/plugins/properties/properties.ui index 9f52fb602..86387f451 100644 --- a/src/plugins/properties/properties.ui +++ b/src/plugins/properties/properties.ui @@ -2,852 +2,860 @@ <!-- Generated with glade 3.20.0 --> <interface> <requires lib="gtk+" version="3.11"/> - <object class="GtkScrolledWindow" id="sw_properties"> - <property name="visible">true</property> - <property name="vexpand">true</property> - <property name="min-content-height">480</property> - <property name="hscrollbar-policy">never</property> - <child> - <object class="HdyClamp"> + <template class="BaconVideoWidgetProperties" parent="GtkDialog"> + <property name="visible">False</property> + <property name="title" translatable="yes">Properties</property> + <property name="destroy-with-parent">True</property> + <property name="modal">True</property> + <child internal-child="vbox"> + <object class="GtkBox"> <property name="visible">True</property> - <property name="margin-bottom">18</property> - <property name="margin-start">18</property> - <property name="margin-end">18</property> - <property name="margin-top">18</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> <child> - <object class="GtkBox" id="vbox1"> - <property name="visible">True</property> - <property name="width_request">375</property> - <property name="can_focus">False</property> - <property name="spacing">18</property> - <property name="orientation">vertical</property> + <object class="GtkScrolledWindow" id="sw_properties"> + <property name="visible">true</property> + <property name="vexpand">true</property> + <property name="min-content-height">480</property> + <property name="hscrollbar-policy">never</property> <child> - <object class="GtkBox" id="general_vbox"> + <object class="HdyClamp"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> + <property name="margin-bottom">18</property> + <property name="margin-start">18</property> + <property name="margin-end">18</property> + <property name="margin-top">18</property> <child> - <object class="GtkLabel"> + <object class="GtkBox" id="vbox1"> <property name="visible">True</property> + <property name="width_request">375</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">General</property> - <property name="use_markup">True</property> - <property name="xalign">0</property> - <style> - <class name="heading"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkListBox"> - <property name="visible">True</property> - <property name="selection-mode">none</property> + <property name="spacing">18</property> + <property name="orientation">vertical</property> <child> - <object class="HdyActionRow"> - <property name="activatable">False</property> - <property name="selectable">False</property> - <property name="visible" bind-source="title" bind-property="visible" bind-flags="default|sync-create"/> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="title_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Title</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="title"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="title"> - <property name="visible">True</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="title_label"/> - </accessibility> - </object> - </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> + <object class="GtkBox" id="general_vbox"> <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <property name="visible" bind-source="artist" bind-property="visible" bind-flags="default|sync-create"/> - <child type="prefix"> - <object class="GtkBox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="artist_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Artist</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="artist"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="artist"> - <property name="visible">True</property> - <property name="label">Unknown</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="artist_label"/> - </accessibility> - </object> - </child> + <property name="can_focus">False</property> + <property name="label" translatable="yes">General</property> + <property name="use_markup">True</property> + <property name="xalign">0</property> + <style> + <class name="heading" /> + </style> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <property name="visible" bind-source="album" bind-property="visible" bind-flags="default|sync-create"/> - <child type="prefix"> - <object class="GtkBox"> + <child> + <object class="GtkListBox"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> + <property name="selection-mode">none</property> <child> - <object class="GtkLabel" id="album_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Album</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="album"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> + <object class="HdyActionRow"> + <property name="activatable">False</property> + <property name="selectable">False</property> + <property name="visible" bind-source="title" bind-property="visible" + bind-flags="default|sync-create" /> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="title_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Title</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="title" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="title"> + <property name="visible">True</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="title_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="album"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">Unknown</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="album_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <property name="visible" bind-source="artist" bind-property="visible" + bind-flags="default|sync-create" /> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="artist_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Artist</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="artist" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="artist"> + <property name="visible">True</property> + <property name="label">Unknown</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="artist_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <property name="visible" bind-source="year" bind-property="visible" bind-flags="default|sync-create"/> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> <child> - <object class="GtkLabel" id="year_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Year</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="year"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> + <property name="activatable">False</property> + <property name="selectable">False</property> + <property name="visible" bind-source="album" bind-property="visible" + bind-flags="default|sync-create" /> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="album_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Album</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="album" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="album"> + <property name="visible">True</property> + <property name="label">Unknown</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="album_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="year"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">Unknown</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="year_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <property name="visible" bind-source="year" bind-property="visible" + bind-flags="default|sync-create" /> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="year_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Year</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="year" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="year"> + <property name="visible">True</property> + <property name="label">Unknown</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="year_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> <child> - <object class="GtkLabel" id="duration_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Duration</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="duration"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="duration_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Duration</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="duration" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="duration"> + <property name="visible">True</property> + <property name="label">0 seconds</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="duration_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="duration"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">0 seconds</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="duration_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <property name="visible" bind-source="comment" bind-property="visible" + bind-flags="default|sync-create" /> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="comment_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Comment</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="comment" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="comment"> + <property name="visible">True</property> + <property name="label">Unknown</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="comment_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <property name="visible" bind-source="comment" bind-property="visible" bind-flags="default|sync-create"/> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> <child> - <object class="GtkLabel" id="comment_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Comment</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="comment"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="comment"> - <property name="visible">True</property> - <property name="label">Unknown</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="comment_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <property name="visible" bind-source="container" bind-property="visible" + bind-flags="default|sync-create" /> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="container_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Container</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="container" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="container"> + <property name="visible">True</property> + <property name="label">Unknown</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="container_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> + <style> + <class name="content" /> + </style> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> <child> - <object class="HdyActionRow"> + <object class="GtkBox" id="video_vbox"> <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <property name="visible" bind-source="container" bind-property="visible" bind-flags="default|sync-create"/> - <child type="prefix"> - <object class="GtkBox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="container_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Container</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="container"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="container"> - <property name="visible">True</property> - <property name="label">Unknown</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="container_label"/> - </accessibility> - </object> - </child> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Video</property> + <property name="use_markup">True</property> + <property name="xalign">0</property> + <style> + <class name="heading" /> + </style> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> - </object> - </child> - <style> - <class name="content"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkBox" id="video_vbox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Video</property> - <property name="use_markup">True</property> - <property name="xalign">0</property> - <style> - <class name="heading"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkListBox" id="video"> - <property name="visible">True</property> - <property name="selection-mode">none</property> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> + <child> + <object class="GtkListBox" id="video"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> + <property name="selection-mode">none</property> <child> - <object class="GtkLabel" id="dimensions_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Dimensions</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="dimensions"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="dimensions_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Dimensions</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="dimensions" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="dimensions"> + <property name="visible">True</property> + <property name="label">0 x 0</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="dimensions_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="dimensions"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">0 x 0</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="dimensions_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="vcodec_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Codec</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="vcodec" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="vcodec"> + <property name="visible">True</property> + <property name="label">N/A</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="vcodec_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="vcodec_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Codec</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="vcodec"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="vcodec"> - <property name="visible">True</property> - <property name="label">N/A</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="vcodec_label"/> - </accessibility> - </object> - </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="framerate_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Framerate</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="framerate"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="framerate"> - <property name="visible">True</property> - <property name="label">0 frames per second</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="framerate_label"/> - </accessibility> - </object> - </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="vbitrate_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Bitrate</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="video_bitrate"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="video_bitrate"> - <property name="visible">True</property> - <property name="label">0 kbps</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="vbitrate_label"/> - </accessibility> - </object> - </child> - </object> - </child> - </object> - </child> - <style> - <class name="content"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> - <child> - <object class="GtkBox" id="audio_vbox"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="orientation">vertical</property> - <property name="spacing">6</property> - <child> - <object class="GtkLabel"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes">Audio</property> - <property name="use_markup">True</property> - <property name="xalign">0</property> - <style> - <class name="heading"/> - </style> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkListBox" id="audio"> - <property name="visible">True</property> - <property name="selection-mode">none</property> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> <child> - <object class="GtkLabel" id="acodec_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Codec</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="acodec"/> - </accessibility> - <style> - <class name="caption"/><class name="dim-label"/> - </style> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="framerate_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Framerate</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="framerate" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="framerate"> + <property name="visible">True</property> + <property name="label">0 frames per second</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="framerate_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="acodec"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">N/A</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="acodec_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="vbitrate_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Bitrate</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="video_bitrate" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="video_bitrate"> + <property name="visible">True</property> + <property name="label">0 kbps</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="vbitrate_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> + <style> + <class name="content" /> + </style> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> <child> - <object class="HdyActionRow"> + <object class="GtkBox" id="audio_vbox"> <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> - <child> - <object class="GtkLabel" id="channels_label"> - <property name="visible">True</property> - <property name="label" translatable="yes">Channels</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="channels"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> - </object> - </child> - <child> - <object class="GtkLabel" id="channels"> - <property name="visible">True</property> - <property name="label">0 Channels</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="channels_label"/> - </accessibility> - </object> - </child> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Audio</property> + <property name="use_markup">True</property> + <property name="xalign">0</property> + <style> + <class name="heading" /> + </style> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> + <child> + <object class="GtkListBox" id="audio"> <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> + <property name="selection-mode">none</property> <child> - <object class="GtkLabel" id="samplerate_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Sample rate</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="samplerate"/> - </accessibility> - <style> - <class name="caption"/><class name="dim-label"/> - </style> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="acodec_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Codec</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="acodec" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="acodec"> + <property name="visible">True</property> + <property name="label">N/A</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="acodec_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="samplerate"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">0 Hz</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="samplerate_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="channels_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Channels</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="channels" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="channels"> + <property name="visible">True</property> + <property name="label">0 Channels</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="channels_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> - </object> - </child> - </object> - </child> - <child> - <object class="HdyActionRow"> - <property name="visible">True</property> - <property name="activatable">False</property> - <property name="selectable">False</property> - <child type="prefix"> - <object class="GtkBox"> - <property name="visible">True</property> - <property name="orientation">vertical</property> - <property name="spacing">3</property> - <property name="halign">start</property> - <property name="valign">center</property> <child> - <object class="GtkLabel" id="abitrate_label"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label" translatable="yes">Bitrate</property> - <property name="halign">start</property> - <property name="xalign">0</property> - <accessibility> - <relation type="label-for" target="audio_bitrate"/> - </accessibility> - <style> - <class name="caption"/> - <class name="dim-label"/> - </style> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="samplerate_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Sample rate</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="samplerate" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="samplerate"> + <property name="visible">True</property> + <property name="label">0 Hz</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="samplerate_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> <child> - <object class="GtkLabel" id="audio_bitrate"> + <object class="HdyActionRow"> <property name="visible">True</property> - <property name="label">0 kbps</property> - <property name="selectable">True</property> - <property name="ellipsize">end</property> - <property name="wrap">True</property> - <property name="wrap-mode">word-char</property> - <property name="lines">3</property> - <property name="halign">start</property> - <accessibility> - <relation type="labelled-by" target="abitrate_label"/> - </accessibility> + <property name="activatable">False</property> + <property name="selectable">False</property> + <child type="prefix"> + <object class="GtkBox"> + <property name="visible">True</property> + <property name="orientation">vertical</property> + <property name="spacing">3</property> + <property name="halign">start</property> + <property name="valign">center</property> + <child> + <object class="GtkLabel" id="abitrate_label"> + <property name="visible">True</property> + <property name="label" translatable="yes">Bitrate</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <accessibility> + <relation type="label-for" target="audio_bitrate" /> + </accessibility> + <style> + <class name="caption" /><class name="dim-label" /> + </style> + </object> + </child> + <child> + <object class="GtkLabel" id="audio_bitrate"> + <property name="visible">True</property> + <property name="label">0 kbps</property> + <property name="selectable">True</property> + <property name="ellipsize">end</property> + <property name="wrap">True</property> + <property name="wrap-mode">word-char</property> + <property name="lines">3</property> + <property name="halign">start</property> + <accessibility> + <relation type="labelled-by" target="abitrate_label" /> + </accessibility> + </object> + </child> + </object> + </child> </object> </child> + <style> + <class name="content" /> + </style> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> </child> </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> </child> - <style> - <class name="content"/> - </style> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> </child> </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> </child> </object> </child> </object> </child> - </object> + </template> </interface> diff --git a/src/plugins/properties/totem-movie-properties.c b/src/plugins/properties/totem-movie-properties.c index 8850cd4d4..33e781456 100644 --- a/src/plugins/properties/totem-movie-properties.c +++ b/src/plugins/properties/totem-movie-properties.c @@ -48,7 +48,6 @@ typedef struct { PeasExtensionBase parent; GtkWidget *props; - GtkWidget *dialog; guint handler_id_stream_length; guint handler_id_main_page; GSimpleAction *props_action; @@ -65,8 +64,8 @@ TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_MOVIE_PROPERTIES_PLUGIN, bacon_video_widget_get_metadata (BACON_VIDEO_WIDGET (bvw), \ type, &value); \ if ((temp = g_value_get_string (&value)) != NULL) { \ - bacon_video_widget_properties_set_label (props, name, \ - temp); \ + g_object_set (G_OBJECT (props), name, \ + temp, NULL); \ } \ g_value_unset (&value); \ } while (0) @@ -81,7 +80,7 @@ TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_MOVIE_PROPERTIES_PLUGIN, g_value_get_int (&value)); \ else \ temp = g_strdup (empty); \ - bacon_video_widget_properties_set_label (props, name, temp); \ + g_object_set (G_OBJECT (props), name, temp, NULL); \ g_free (temp); \ g_value_unset (&value); \ } while (0) @@ -99,7 +98,7 @@ TOTEM_PLUGIN_REGISTER(TOTEM_TYPE_MOVIE_PROPERTIES_PLUGIN, y = g_value_get_int (&value); \ g_value_unset (&value); \ temp = g_strdup_printf (gettext (format), x, y); \ - bacon_video_widget_properties_set_label (props, name, temp); \ + g_object_set (G_OBJECT (props), name, temp, NULL); \ g_free (temp); \ } while (0) @@ -117,7 +116,7 @@ update_properties_from_bvw (BaconVideoWidgetProperties *props, bvw = BACON_VIDEO_WIDGET (widget); /* General */ - UPDATE_FROM_STRING (BVW_INFO_TITLE, "title"); + UPDATE_FROM_STRING (BVW_INFO_TITLE, "media-title"); UPDATE_FROM_STRING (BVW_INFO_ARTIST, "artist"); UPDATE_FROM_STRING (BVW_INFO_ALBUM, "album"); UPDATE_FROM_STRING (BVW_INFO_YEAR, "year"); @@ -148,7 +147,7 @@ update_properties_from_bvw (BaconVideoWidgetProperties *props, { UPDATE_FROM_INT2 (BVW_INFO_DIMENSION_X, BVW_INFO_DIMENSION_Y, "dimensions", N_("%d × %d")); - UPDATE_FROM_STRING (BVW_INFO_VIDEO_CODEC, "vcodec"); + UPDATE_FROM_STRING (BVW_INFO_VIDEO_CODEC, "video-codec"); UPDATE_FROM_INT (BVW_INFO_VIDEO_BITRATE, "video_bitrate", N_("%d kbps"), C_("Stream bit rate", "N/A")); @@ -160,9 +159,9 @@ update_properties_from_bvw (BaconVideoWidgetProperties *props, /* Audio */ if (has_audio != FALSE) { - UPDATE_FROM_INT (BVW_INFO_AUDIO_BITRATE, "audio_bitrate", + UPDATE_FROM_INT (BVW_INFO_AUDIO_BITRATE, "audio-bitrate", N_("%d kbps"), C_("Stream bit rate", "N/A")); - UPDATE_FROM_STRING (BVW_INFO_AUDIO_CODEC, "acodec"); + UPDATE_FROM_STRING (BVW_INFO_AUDIO_CODEC, "audio-codec"); UPDATE_FROM_INT (BVW_INFO_AUDIO_SAMPLE_RATE, "samplerate", N_("%d Hz"), C_("Sample rate", "N/A")); UPDATE_FROM_STRING (BVW_INFO_AUDIO_CHANNELS, "channels"); @@ -182,7 +181,7 @@ main_page_notify_cb (TotemObject *totem, g_object_get (G_OBJECT (totem), "main-page", &main_page, NULL); if (g_strcmp0 (main_page, "player") == 0) - gtk_widget_hide (pi->dialog); + gtk_widget_hide (pi->props); g_free (main_page); } @@ -253,7 +252,7 @@ properties_action_cb (GSimpleAction *simple, totem = g_object_get_data (G_OBJECT (pi), "object"); g_object_get (G_OBJECT (totem), "main-page", &main_page, NULL); if (g_strcmp0 (main_page, "player") == 0) - gtk_widget_show (pi->dialog); + gtk_widget_show (pi->props); g_free (main_page); } @@ -270,24 +269,15 @@ impl_activate (PeasActivatable *plugin) pi = TOTEM_MOVIE_PROPERTIES_PLUGIN (plugin); totem = g_object_get_data (G_OBJECT (plugin), "object"); - pi->props = bacon_video_widget_properties_new (); - gtk_widget_show (pi->props); + parent = totem_object_get_main_window (totem); + + pi->props = bacon_video_widget_properties_new (parent); gtk_widget_set_sensitive (pi->props, FALSE); - parent = totem_object_get_main_window (totem); - pi->dialog = gtk_dialog_new_with_buttons (_("Properties"), - parent, - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR, - NULL, - GTK_RESPONSE_CLOSE, - NULL); g_object_unref (parent); - g_signal_connect (pi->dialog, "delete-event", - G_CALLBACK (gtk_widget_hide_on_delete), NULL); - g_signal_connect (pi->dialog, "response", + + g_signal_connect (pi->props, "delete-event", G_CALLBACK (gtk_widget_hide_on_delete), NULL); - gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (pi->dialog))), - pi->props); /* Properties action */ pi->props_action = g_simple_action_new ("properties", NULL); |