[gnome-music] better empty state



commit 968281d8f65bb36c4afce8b4763c06c0ba407a51
Author: amishas157 <amishas157 gmail com>
Date:   Wed Oct 15 01:24:18 2014 +0530

    better empty state
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731392

 data/NoMusic.ui    |   54 ++++++++++++++++++++++++++++++++++++++-------------
 gnomemusic/view.py |    3 --
 2 files changed, 40 insertions(+), 17 deletions(-)
---
diff --git a/data/NoMusic.ui b/data/NoMusic.ui
index 0dc4065..21b85de 100644
--- a/data/NoMusic.ui
+++ b/data/NoMusic.ui
@@ -3,6 +3,7 @@
   <!-- interface-requires gtk+ 3.0 -->
   <object class="GtkBox" id="container">
     <property name="visible">True</property>
+    <property name="orientation">horizontal</property>
     <property name="can_focus">False</property>
     <property name="halign">center</property>
     <property name="valign">center</property>
@@ -10,12 +11,10 @@
       <object class="GtkImage" id="image1">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="xalign">1</property>
-        <property name="yalign">0.20000000298023224</property>
-        <property name="xpad">24</property>
-        <property name="ypad">61</property>
-        <property name="pixel_size">40</property>
+        <property name="valign">center</property>
+        <property name="pixel_size">80</property>
         <property name="icon_name">emblem-music-symbolic</property>
+        <property name="opacity">0.2</property>
         <property name="icon-size">0</property>
       </object>
       <packing>
@@ -25,15 +24,42 @@
       </packing>
     </child>
     <child>
-      <object class="GtkLabel" id="label1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="xalign">0.4699999988079071</property>
-        <property name="yalign">0.46000000834465027</property>
-        <property name="xpad">5</property>
-        <property name="label" translatable="yes">No Music Found</property>
-        <property name="justify">center</property>
-        <property name="ellipsize">middle</property>
+      <object class="GtkBox" id="label">
+        <property name="orientation">vertical</property>
+        <property name="margin">10</property>
+        <child>
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="opacity">0.5</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">No music found</property>
+            <property name="justify">left</property>
+            <property name="xalign">0</property>
+            <attributes>
+              <attribute name="weight" value="bold"/>
+              <attribute name="scale" value="2"/>
+            </attributes>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="opacity">0.5</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">The contents of your music folder will appear 
here.</property>
+            <property name="justify">left</property>
+          </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>
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 7ee34e6..12668de 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -331,10 +331,7 @@ class Empty(Gtk.Stack):
                            transition_type=Gtk.StackTransitionType.CROSSFADE)
         builder = Gtk.Builder()
         builder.add_from_resource('/org/gnome/Music/NoMusic.ui')
-        music_folder_path = GLib.get_user_special_dir(GLib.USER_DIRECTORY_MUSIC)
         widget = builder.get_object('container')
-        label = builder.get_object('label1')
-        label.set_label(_("No Music found!\n Put some files into the folder %s") % music_folder_path)
         self.add(widget)
         self.show_all()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]