[gnome-music/wip/jfelder/xdg-music-dir-not-set: 2/3] emptyview: Display a message if xdg music dir is not set



commit aca47850ce96928534e8246de31d4e84b0cd8f0b
Author: Jean Felder <jfelder src gnome org>
Date:   Fri Nov 8 23:18:27 2019 +0100

    emptyview: Display a message if xdg music dir is not set
    
    If the XDG Music dir, the EmptyView needs to be displayed. However,
    this results in a crash because the _content_text attribute has not
    been set.
    
    This issue is fixed, by setting the _content_text to display a message
    if the XDG music directory is not set.
    
    closes: #338

 gnomemusic/views/emptyview.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/views/emptyview.py b/gnomemusic/views/emptyview.py
index 27d4c95c..c43712c9 100644
--- a/gnomemusic/views/emptyview.py
+++ b/gnomemusic/views/emptyview.py
@@ -70,6 +70,7 @@ class EmptyView(Gtk.Stack):
             assert music_folder is not None
         except (TypeError, AssertionError):
             print("XDG Music dir is not set")
+            self._content_text = _("Your XDG Music directory is not set.")
             return
 
         music_folder = Tracker.sparql_escape_string(


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