From 3e8502a934dabd86b9a448ab3544c5d76d6c1ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20H=C3=A4cker?= Date: Sun, 10 Sep 2017 17:40:20 +0200 Subject: [PATCH] release gradio 6.0 --- data/de.haeckerfelix.gradio.appdata.xml.in | 6 ++ de.haeckerfelix.gradio.json | 4 +- meson.build | 2 +- src/gradio-library.vala | 3 +- src/page/gradio-collections-page.vala | 10 +-- src/page/gradio-discover-page.vala | 72 ---------------------- src/page/gradio-library-page.vala | 15 +++-- 7 files changed, 24 insertions(+), 88 deletions(-) delete mode 100644 src/page/gradio-discover-page.vala diff --git a/data/de.haeckerfelix.gradio.appdata.xml.in b/data/de.haeckerfelix.gradio.appdata.xml.in index 9ca1cfc3..02098ec5 100644 --- a/data/de.haeckerfelix.gradio.appdata.xml.in +++ b/data/de.haeckerfelix.gradio.appdata.xml.in @@ -58,6 +58,12 @@ + + +

Group your stations into collections, Everything is now sortable, Extended search page, Stations can be created and edited, New details sidebar, New selection system

+
+
+

New grid/list view, new right click menu, background playback, redesigned discover page

diff --git a/de.haeckerfelix.gradio.json b/de.haeckerfelix.gradio.json index f4ebd21b..f7fa38f5 100644 --- a/de.haeckerfelix.gradio.json +++ b/de.haeckerfelix.gradio.json @@ -1,11 +1,9 @@ { "app-id": "de.haeckerfelix.gradio", "runtime": "org.gnome.Platform", - "runtime-version": "3.20", + "runtime-version": "3.24", "sdk": "org.gnome.Sdk", "command": "gradio", - "tags": ["nightly"], - "desktop-file-name-prefix": "(Development) ", "finish-args": [ "--share=ipc", "--socket=x11", "--socket=wayland", diff --git a/meson.build b/meson.build index 260a514f..1acd9f20 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gradio', ['vala', 'C'], version : '5.9.0') +project('gradio', ['vala', 'C'], version : '6.0') i18n = import('i18n') diff --git a/src/gradio-library.vala b/src/gradio-library.vala index 0585f787..5d49b846 100644 --- a/src/gradio-library.vala +++ b/src/gradio-library.vala @@ -59,6 +59,7 @@ namespace Gradio{ private void open_database(){ message("Open database..."); + message(newdb.get_path()); int return_code = Sqlite.Database.open (newdb.get_path(), out db); if (return_code!= Sqlite.OK) { @@ -412,8 +413,6 @@ namespace Gradio{ }catch(GLib.IOError error){ critical("Could not migrate old database: %s", error.message); } - - } private bool is_old_database (){ diff --git a/src/page/gradio-collections-page.vala b/src/page/gradio-collections-page.vala index 384cda33..a2a81566 100644 --- a/src/page/gradio-collections-page.vala +++ b/src/page/gradio-collections-page.vala @@ -33,7 +33,6 @@ namespace Gradio{ mainbox.set_model(Library.collection_model); mainbox.selection_changed.connect(() => {selection_changed();}); mainbox.selection_mode_request.connect(() => {selection_mode_enabled();}); - ScrollViewport.add(mainbox); mainbox.item_activated.connect((t,a) => { @@ -48,12 +47,15 @@ namespace Gradio{ } }); - Library.collection_model.items_changed.connect(() => { - if(Library.collection_model.get_n_items() == 0) + Library.collection_model.items_changed.connect(update_page); + update_page(); + } + + private void update_page(){ + if(Library.collection_model.get_n_items() == 0) CollectionsStack.set_visible_child_name("empty"); else CollectionsStack.set_visible_child_name("items"); - }); } public void set_selection_mode(bool b){ diff --git a/src/page/gradio-discover-page.vala b/src/page/gradio-discover-page.vala deleted file mode 100644 index f8b71f46..00000000 --- a/src/page/gradio-discover-page.vala +++ /dev/null @@ -1,72 +0,0 @@ -/* This file is part of Gradio. - * - * Gradio is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Gradio is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Gradio. If not, see . - */ - -using Gtk; - -namespace Gradio{ - - [GtkTemplate (ui = "/de/haecker-felix/gradio/ui/page/discover-page.ui")] - public class DiscoverPage : Gtk.Box, Page{ - - [GtkChild] private Box FeaturedBox; - [GtkChild] private Box ClickedStationsBox; - [GtkChild] private Box ChangedStationsBox; - - public DiscoverPage(){ - setup_view(); - } - - private void setup_view(){ - // featured - StationModel featured_stations = new StationModel(); - StationProvider popular_stations_provider = new StationProvider(ref featured_stations); - popular_stations_provider.set_address(RadioBrowser.most_votes(5)); - FeaturedTileStack featured_tile_stack = new FeaturedTileStack(ref featured_stations); - FeaturedBox.pack_start(featured_tile_stack); - - // recently changed - StationModel changed_stations = new StationModel(); - StationProvider changed_stations_provider = new StationProvider(ref changed_stations); - changed_stations_provider.set_address(RadioBrowser.recently_changed(12)); - MainBox changed_stations_box = new MainBox(); - changed_stations_box.set_model(changed_stations); - ChangedStationsBox.pack_start(changed_stations_box); - - // recently clicked - StationModel clicked_stations = new StationModel(); - StationProvider clicked_stations_provider = new StationProvider(ref clicked_stations); - clicked_stations_provider.set_address(RadioBrowser.recently_clicked(12)); - MainBox clicked_stations_box = new MainBox(); - clicked_stations_box.set_model(clicked_stations); - ClickedStationsBox.pack_end(clicked_stations_box); - } - - [GtkCallback] - private void MorePopularStations_clicked(){ - App.window.show_stations_by_adress(RadioBrowser.most_votes(100), "Popular Stations"); - } - - [GtkCallback] - private void MoreRecentlyChanged_clicked(){ - App.window.show_stations_by_adress(RadioBrowser.recently_changed(100), "Recently Changed Stations"); - } - - [GtkCallback] - private void MoreRecentlyClicked_clicked(){ - App.window.show_stations_by_adress(RadioBrowser.recently_clicked(100), "Recently Clicked Stations"); - } - } -} diff --git a/src/page/gradio-library-page.vala b/src/page/gradio-library-page.vala index 02110473..11b96dc4 100644 --- a/src/page/gradio-library-page.vala +++ b/src/page/gradio-library-page.vala @@ -34,12 +34,15 @@ namespace Gradio{ ScrollViewport.add(mainbox); - Library.station_model.items_changed.connect(() => { - if(Library.station_model.get_n_items() == 0) - LibraryStack.set_visible_child_name("empty"); - else - LibraryStack.set_visible_child_name("items"); - }); + Library.station_model.items_changed.connect(update_page); + update_page(); + } + + private void update_page(){ + if(Library.station_model.get_n_items() == 0) + LibraryStack.set_visible_child_name("empty"); + else + LibraryStack.set_visible_child_name("items"); } public void set_selection_mode(bool b){