Free text search to look for better album art
[mussorgsky] / ui / Alternatives.qml
index a92a444..c37b1b2 100644 (file)
@@ -35,7 +35,7 @@ Page {
         id: coversView
         model: coversModel
         anchors.top: titleArea.bottom
-        anchors.bottom : coversAlternativesPage.bottom
+        anchors.bottom : searchBox.top
         anchors.left: coversAlternativesPage.left
         anchors.right: coversAlternativesPage.right
         cellWidth: 160
@@ -68,16 +68,24 @@ Page {
 
               MouseArea {
                    anchors.fill: coverPaintArea
-                   enabled: !loadingIndicator.running
+                   enabled: (!loadingIndicator.running && !model.cover.broken)
                    onClicked: {
-                      console.log ("wohooo")
                       missionControl.save_option_for (coversModel, index)
                       backButton.clicked ()       
                    }
               }
-
         }
       }
     }
 
+    SearchBox { 
+       id: searchBox
+       text: coversModel.searchString
+       anchors.bottom: coversAlternativesPage.bottom 
+       onSelected: {
+           console.log ("Now search:", search_text)
+           missionControl.get_options_for_text (coversModel, search_text)
+       }
+    }
+
 }