[Xfce4-commits] <parole:master> Enhanced audiobox widget.

Sean Davis noreply at xfce.org
Thu Nov 29 11:20:02 CET 2012


Updating branch refs/heads/master
         to ad1c5a7ba11fe8b74e018b59f1c073c82f13e66e (commit)
       from 7ce80b05c3015620f70efcef8cee0dabfababd09 (commit)

commit ad1c5a7ba11fe8b74e018b59f1c073c82f13e66e
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Nov 28 06:13:02 2012 -0500

    Enhanced audiobox widget.

 data/interfaces/parole.ui |  138 ++++++++++++++++++++++++++++++++++++++++++---
 src/parole-player.c       |   19 ++++--
 2 files changed, 143 insertions(+), 14 deletions(-)

diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 4bd0e08..8b79613 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -684,14 +684,16 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <object class="GtkVBox" id="audiobox">
-                                    <property name="visible">True</property>
+                                  <object class="GtkHBox" id="audiobox">
                                     <property name="can_focus">False</property>
+                                    <property name="no_show_all">True</property>
                                     <child>
-                                      <object class="GtkImage" id="cover">
+                                      <object class="GtkAlignment" id="alignment2">
+                                        <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="pixel_size">128</property>
-                                        <property name="icon_name">audio-x-generic</property>
+                                        <child>
+                                          <placeholder/>
+                                        </child>
                                       </object>
                                       <packing>
                                         <property name="expand">True</property>
@@ -700,15 +702,135 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <object class="GtkLabel" id="audiotags">
+                                      <object class="GtkVBox" id="vbox2">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <child>
+                                          <object class="GtkAlignment" id="alignment3">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <child>
+                                              <placeholder/>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkHBox" id="hbox2">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="spacing">12</property>
+                                            <child>
+                                              <object class="GtkImage" id="audiobox_cover">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="pixel_size">128</property>
+                                                <property name="icon_name">audio-x-generic</property>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">True</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkVBox" id="vbox3">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">False</property>
+                                                <property name="spacing">6</property>
+                                                <child>
+                                                  <object class="GtkLabel" id="audiobox_title">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes"><b><big>Song Title</big></b></property>
+                                                    <property name="use_markup">True</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">0</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <object class="GtkLabel" id="audiobox_album">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes"><big>Song Album</big></property>
+                                                    <property name="use_markup">True</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">1</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <object class="GtkLabel" id="audiobox_artist">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">False</property>
+                                                    <property name="xalign">0</property>
+                                                    <property name="label" translatable="yes"><big>Song Artist</big></property>
+                                                    <property name="use_markup">True</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="expand">False</property>
+                                                    <property name="fill">True</property>
+                                                    <property name="position">2</property>
+                                                  </packing>
+                                                </child>
+                                              </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="GtkAlignment" id="alignment5">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <child>
+                                              <placeholder/>
+                                            </child>
+                                          </object>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkAlignment" id="alignment4">
                                         <property name="visible">True</property>
                                         <property name="can_focus">False</property>
-                                        <property name="label" translatable="yes">label</property>
+                                        <child>
+                                          <placeholder/>
+                                        </child>
                                       </object>
                                       <packing>
                                         <property name="expand">True</property>
                                         <property name="fill">True</property>
-                                        <property name="position">1</property>
+                                        <property name="position">2</property>
                                       </packing>
                                     </child>
                                   </object>
diff --git a/src/parole-player.c b/src/parole-player.c
index a013f24..25eaf66 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -340,9 +340,12 @@ struct ParolePlayerPrivate
     
     GtkWidget		*main_box;
     GtkWidget		*eventbox_output;
+    
     GtkWidget		*audiobox;
-    GtkWidget		*cover;
-    GtkWidget		*audiotags;
+    GtkWidget		*audiobox_cover;
+    GtkWidget		*audiobox_title;
+    GtkWidget		*audiobox_album;
+    GtkWidget		*audiobox_artist;
     
     GtkWidget		*volume;
     GtkWidget		*menu_bar;
@@ -827,12 +830,12 @@ parole_player_show_audiobox (ParolePlayer *player)
     /* Only show the audiobox if we're sure there's no video playing */
     if (!gst_get_has_video( PAROLE_GST(player->priv->gst) ))
     {
-	gtk_widget_show_all(player->priv->audiobox);
+	gtk_widget_show(player->priv->audiobox);
 	gtk_widget_hide_all(player->priv->eventbox_output);
     }
     else
     {
-	gtk_widget_hide_all(player->priv->audiobox);
+	gtk_widget_hide(player->priv->audiobox);
 	gtk_widget_show_all(player->priv->eventbox_output);
     }
 }
@@ -2630,9 +2633,13 @@ parole_player_init (ParolePlayer *player)
     player->priv->leave_fs = GTK_WIDGET (gtk_builder_get_object (builder, "leave_fs"));
     player->priv->main_box = GTK_WIDGET (gtk_builder_get_object (builder, "main-box"));
     player->priv->eventbox_output = GTK_WIDGET (gtk_builder_get_object (builder, "eventbox_output"));
+    
+    /* Audio box */
     player->priv->audiobox = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox"));
-    player->priv->cover = GTK_WIDGET (gtk_builder_get_object (builder, "cover"));
-    player->priv->audiotags = GTK_WIDGET (gtk_builder_get_object (builder, "audiotags"));
+    player->priv->audiobox_cover = GTK_WIDGET (gtk_builder_get_object (builder, "cover"));
+    player->priv->audiobox_title = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_title"));
+    player->priv->audiobox_album = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_album"));
+    player->priv->audiobox_artist = GTK_WIDGET (gtk_builder_get_object (builder, "audiobox_artist"));
     
     gtk_box_set_child_packing( GTK_BOX(player->priv->control), GTK_WIDGET(player->priv->play_box), TRUE, TRUE, 2, GTK_PACK_START );
     


More information about the Xfce4-commits mailing list