Hello community, here is the log from the commit of package melody for openSUSE:Factory checked in at 2018-09-17 14:26:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/melody (Old) and /work/SRC/openSUSE:Factory/.melody.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "melody" Mon Sep 17 14:26:17 2018 rev:4 rq:635873 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/melody/melody.changes 2018-08-10 09:50:49.450371155 +0200 +++ /work/SRC/openSUSE:Factory/.melody.new/melody.changes 2018-09-17 14:26:17.539790297 +0200 @@ -1,0 +2,18 @@ +Sat Sep 8 16:51:34 UTC 2018 - Alexei Podvalsky <avvi...@yandex.by> + +- Update to 1.1.1: + * buttons can't grab focus + * improved grabing focus + * fix toggle playing in trackview + * Update README.md + * tracks view: scroll to current song + * new option: Remove Playlist if last Track was removed + [default: true] + * don't reset timer if playing was paused + * Add tracks into Playlists directly from TrackView + * commit edit of radio station by ctrl+enter + * improved initial load + * toggle playing by space + * Update com.github.artemanufrij.playmymusic.appdata.xml.in + +------------------------------------------------------------------- Old: ---- playmymusic-1.1.0.tar.gz New: ---- playmymusic-1.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ melody.spec ++++++ --- /var/tmp/diff_new_pack.8wg7AG/_old 2018-09-17 14:26:18.063789844 +0200 +++ /var/tmp/diff_new_pack.8wg7AG/_new 2018-09-17 14:26:18.067789841 +0200 @@ -17,7 +17,7 @@ Name: melody -Version: 1.1.0 +Version: 1.1.1 Release: 0 Summary: A music player for local files and remote streams License: GPL-3.0-or-later ++++++ playmymusic-1.1.0.tar.gz -> playmymusic-1.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/.travis.yml new/playmymusic-1.1.1/.travis.yml --- old/playmymusic-1.1.0/.travis.yml 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/.travis.yml 2018-09-02 13:12:38.000000000 +0200 @@ -21,14 +21,8 @@ directories: - /tmp/liftoff -matrix: - include: - - env: DIST=loki - - env: DIST=juno - install: - npm install @elementaryos/houston script: - - houston ci - --distribution $DIST \ No newline at end of file + - houston ci \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/README.md new/playmymusic-1.1.1/README.md --- old/playmymusic-1.1.0/README.md 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/README.md 2018-09-02 13:12:38.000000000 +0200 @@ -4,6 +4,8 @@ <p align="center">Designed for <a href="https://elementary.io">elementary OS</a></p> </div> +[![Build Status](https://travis-ci.org/artemanufrij/playmymusic.svg?branch=master)](https://travis-ci.org/artemanufrij/playmymusic) + ### Donate <a href="https://www.paypal.me/ArtemAnufrij">PayPal</a> | <a href="https://liberapay.com/Artem/donate">LiberaPay</a> | <a href="https://www.patreon.com/ArtemAnufrij">Patreon</a> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/data/com.github.artemanufrij.playmymusic.appdata.xml.in new/playmymusic-1.1.1/data/com.github.artemanufrij.playmymusic.appdata.xml.in --- old/playmymusic-1.1.0/data/com.github.artemanufrij.playmymusic.appdata.xml.in 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/data/com.github.artemanufrij.playmymusic.appdata.xml.in 2018-09-02 13:12:38.000000000 +0200 @@ -47,6 +47,26 @@ </screenshot> </screenshots> <releases> + <release version="1.1.1" date="2018-09-05"> + <description> + <p>New:</p> + <ul> + <li>[optional] Delete Playlist if last Track was removed</li> + <li>Toggle playing by Space Key</li> + <li>Add Track into Playlist from Trackview</li> + <li>RadioView: [Ctrl]+[Enter] for accept changes in editor</li> + </ul> + <p>Fixed:</p> + <ul> + <li>Player doesn't show '0' it the timeline if playing is paused</li> + <li>Better focus grabing</li> + </ul> + <p>Improved:</p> + <ul> + <li>Faster start up behaviour</li> + </ul> + </description> + </release> <release version="1.1.0" date="2018-07-24"> <description> Prepare for JUNO diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/schemas/com.github.artemanufrij.playmymusic.gschema.xml new/playmymusic-1.1.1/schemas/com.github.artemanufrij.playmymusic.gschema.xml --- old/playmymusic-1.1.0/schemas/com.github.artemanufrij.playmymusic.gschema.xml 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/schemas/com.github.artemanufrij.playmymusic.gschema.xml 2018-09-02 13:12:38.000000000 +0200 @@ -125,5 +125,11 @@ <summary>Import content into library.</summary> <description>Import content into library.</description> </key> + + <key name="remove-playlist-if-empty" type="b"> + <default>true</default> + <summary>Remove Playlist if last Track was removed.</summary> + <description>Remove Playlist if last Track was removed.</description> + </key> </schema> </schemalist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Dialogs/Preferences.vala new/playmymusic-1.1.1/src/Dialogs/Preferences.vala --- old/playmymusic-1.1.0/src/Dialogs/Preferences.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Dialogs/Preferences.vala 2018-09-02 13:12:38.000000000 +0200 @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2017-2017 Artem Anufrij <artem.anuf...@live.de> + * Copyright (c) 2017-2018 Artem Anufrij <artem.anuf...@live.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by @@ -87,6 +87,10 @@ import_into_library.active = settings.import_into_library; import_into_library.notify["active"].connect (() => { settings.import_into_library = import_into_library.active; }); + var remove_playlist_if_empty = new Gtk.Switch(); + remove_playlist_if_empty.active = settings.remove_playlist_if_empty; + remove_playlist_if_empty.notify["active"].connect (() => { settings.remove_playlist_if_empty = remove_playlist_if_empty.active; }); + grid.attach (label_generator (_ ("Use Dark Theme")), 0, 0); grid.attach (use_dark_theme, 1, 0); grid.attach (new Gtk.Separator (Gtk.Orientation.HORIZONTAL), 0, 1, 2, 1); @@ -104,6 +108,8 @@ grid.attach (new Gtk.Separator (Gtk.Orientation.HORIZONTAL), 0, 8, 2, 1); grid.attach (label_generator (_ ("Copy Imported Files into Library")), 0, 9); grid.attach (import_into_library, 1, 9); + grid.attach (label_generator (_ ("Remove Playlist if last Track was removed")), 0, 10); + grid.attach (remove_playlist_if_empty, 1, 10); content.pack_start (grid, false, false, 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/MainWindow.vala new/playmymusic-1.1.1/src/MainWindow.vala --- old/playmymusic-1.1.0/src/MainWindow.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/MainWindow.vala 2018-09-02 13:12:38.000000000 +0200 @@ -44,7 +44,7 @@ Gtk.MenuItem menu_item_reset; Gtk.Image icon_play; Gtk.Image icon_pause; - Gtk.Stack content; + public Gtk.Stack content; Gtk.MenuButton app_menu; Gtk.Widget audio_cd_widget; @@ -317,6 +317,7 @@ previous_button = new Gtk.Button.from_icon_name ("media-skip-backward-symbolic", Gtk.IconSize.LARGE_TOOLBAR); previous_button.valign = Gtk.Align.CENTER; + previous_button.can_focus = false; previous_button.tooltip_text = _ ("Previous"); previous_button.sensitive = false; previous_button.clicked.connect ( @@ -325,6 +326,7 @@ }); play_button = new Gtk.Button (); + play_button.can_focus = false; play_button.valign = Gtk.Align.CENTER; play_button.image = icon_play; play_button.tooltip_text = _ ("Play"); @@ -336,6 +338,7 @@ next_button = new Gtk.Button.from_icon_name ("media-skip-forward-symbolic", Gtk.IconSize.LARGE_TOOLBAR); next_button.valign = Gtk.Align.CENTER; + next_button.can_focus = false; next_button.tooltip_text = _ ("Next"); next_button.sensitive = false; next_button.clicked.connect ( @@ -365,8 +368,12 @@ view_mode.set_active (1); artists_view.activate_by_track (track); break; - case PlayMyMusic.Services.PlayMode.PLAYLIST : + case PlayMyMusic.Services.PlayMode.TRACKS : view_mode.set_active (2); + tracks_view.activate_by_track (track); + break; + case PlayMyMusic.Services.PlayMode.PLAYLIST : + view_mode.set_active (3); playlists_view.activate_by_track (track); break; case PlayMyMusic.Services.PlayMode.AUDIO_CD : @@ -630,6 +637,8 @@ public override bool key_press_event (Gdk.EventKey e) { if (!search_entry.is_focus && e.str.strip ().length > 0) { search_entry.grab_focus (); + } else if (!search_entry.is_focus && e.keyval == Gdk.Key.space) { + toggle_playing (); } return base.key_press_event (e); } @@ -769,6 +778,7 @@ } } } + tracks_view.init_end (); } private void reset_all_views () { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Objects/Playlist.vala new/playmymusic-1.1.1/src/Objects/Playlist.vala --- old/playmymusic-1.1.0/src/Objects/Playlist.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Objects/Playlist.vala 2018-09-02 13:12:38.000000000 +0200 @@ -45,7 +45,7 @@ construct { track_removed.connect ((track) => { this._tracks.remove (track); - if (this.tracks.length () == 0) { + if (this.tracks.length () == 0 && settings.remove_playlist_if_empty) { db_manager.remove_playlist (this); } }); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Services/Player.vala new/playmymusic-1.1.1/src/Services/Player.vala --- old/playmymusic-1.1.0/src/Services/Player.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Services/Player.vala 2018-09-02 13:12:38.000000000 +0200 @@ -112,7 +112,7 @@ Interfaces.Inhibitor.instance.inhibit (); break; case Gst.State.READY: - stop_progress_signal (); + stop_progress_signal (true); Interfaces.Inhibitor.instance.uninhibit (); break; case Gst.State.PAUSED: @@ -130,9 +130,11 @@ } } - public void stop_progress_signal () { + public void stop_progress_signal (bool reset_timer = false) { pause_progress_signal (); - current_progress_changed (0); + if (reset_timer) { + current_progress_changed (0); + } } public void start_progress_signal () { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Settings.vala new/playmymusic-1.1.1/src/Settings.vala --- old/playmymusic-1.1.0/src/Settings.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Settings.vala 2018-09-02 13:12:38.000000000 +0200 @@ -64,6 +64,7 @@ public bool save_custom_covers { get; set; } public bool save_id3_tags { get; set; } public bool import_into_library { get; set; } + public bool remove_playlist_if_empty { get; set; } private Settings () { base ("com.github.artemanufrij.playmymusic"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Widgets/Views/AlbumView.vala new/playmymusic-1.1.1/src/Widgets/Views/AlbumView.vala --- old/playmymusic-1.1.0/src/Widgets/Views/AlbumView.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Widgets/Views/AlbumView.vala 2018-09-02 13:12:38.000000000 +0200 @@ -104,6 +104,9 @@ if ((child as Widgets.Track).track.ID == track.ID) { only_mark = true; child.activate (); + if (PlayMyMusicApp.instance.mainwindow.content.visible_child_name == "albums") { + child.grab_focus (); + } only_mark = false; return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Widgets/Views/ArtistView.vala new/playmymusic-1.1.1/src/Widgets/Views/ArtistView.vala --- old/playmymusic-1.1.0/src/Widgets/Views/ArtistView.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Widgets/Views/ArtistView.vala 2018-09-02 13:12:38.000000000 +0200 @@ -213,6 +213,9 @@ if ((child as Widgets.Track).track.ID == track.ID) { only_mark = true; child.activate (); + if (PlayMyMusicApp.instance.mainwindow.content.visible_child_name == "artists") { + child.grab_focus (); + } only_mark = false; return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Widgets/Views/RadiosView.vala new/playmymusic-1.1.1/src/Widgets/Views/RadiosView.vala --- old/playmymusic-1.1.0/src/Widgets/Views/RadiosView.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Widgets/Views/RadiosView.vala 2018-09-02 13:12:38.000000000 +0200 @@ -135,21 +135,9 @@ }); new_station.attach (new_station_url, 1, 1); - new_station_cover = new Gtk.Image (); - new_station_cover.get_style_context ().add_class ("card"); - new_station_cover.width_request = 64; - new_station_cover.height_request = 64; - new_station.attach (new_station_cover, 0, 0, 1, 2); - var new_station_controls = new Gtk.Grid (); - new_station_controls.column_spacing = 6; - new_station_controls.margin_top = 6; - new_station_controls.column_homogeneous = true; - new_station_controls.hexpand = true; - - var new_station_choose_cover = new Gtk.Button.with_label (_ ("Choose a Cover")); - new_station_choose_cover.hexpand = true; - new_station_choose_cover.clicked.connect ( + var new_station_cover_event_box = new Gtk.EventBox (); + new_station_cover_event_box.button_press_event.connect ( () => { var new_cover = library_manager.choose_new_cover (); if (new_cover != null) { @@ -159,12 +147,26 @@ warning (err.message); } } + return false; }); - new_station_controls.attach (new_station_choose_cover, 0, 0); + new_station_cover = new Gtk.Image (); + new_station_cover.tooltip_text = _("Click to choose a new cover…"); + new_station_cover.get_style_context ().add_class ("card"); + new_station_cover.width_request = 64; + new_station_cover.height_request = 64; + new_station_cover.margin = 8; + new_station_cover_event_box.add (new_station_cover); + new_station.attach (new_station_cover_event_box, 0, 0, 1, 2); + + var new_station_controls = new Gtk.Grid (); + new_station_controls.column_spacing = 6; + new_station_controls.margin_top = 6; + new_station_controls.column_homogeneous = true; + new_station_controls.hexpand = true; new_station_save = new Gtk.Button (); new_station_save.sensitive = false; - new_station_save.hexpand = true; + new_station_save.halign = Gtk.Align.END; new_station_save.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION); new_station_save.clicked.connect ( () => { @@ -176,6 +178,12 @@ add_new_station_popover = new Gtk.Popover (null); add_new_station_popover.add (new_station); + add_new_station_popover.key_press_event.connect ((event) => { + if ((event.keyval == Gdk.Key.Return || event.keyval == Gdk.Key.KP_Enter) && Gdk.ModifierType.CONTROL_MASK in event.state && valid_new_station ()) { + save_new_station (); + } + return false; + }); add_button.clicked.connect ( () => { add_new_station_popover.set_relative_to (add_button); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/playmymusic-1.1.0/src/Widgets/Views/TracksView.vala new/playmymusic-1.1.1/src/Widgets/Views/TracksView.vala --- old/playmymusic-1.1.0/src/Widgets/Views/TracksView.vala 2018-07-22 20:30:20.000000000 +0200 +++ new/playmymusic-1.1.1/src/Widgets/Views/TracksView.vala 2018-09-02 13:12:38.000000000 +0200 @@ -39,6 +39,8 @@ Gtk.Image album; Gtk.Grid header; Granite.Widgets.AlertView alert_view; + Gtk.Menu menu = null; + Gtk.Menu playlists; Gtk.Label title_name; Gtk.Label album_title; @@ -157,7 +159,7 @@ album_title.use_markup = true; header.attach (album_title, 1, 1); - alert_view = new Granite.Widgets.AlertView (_("Choose a Track"), _("No track selected"), "view-list-symbolic"); + alert_view = new Granite.Widgets.AlertView (_ ("Choose a Track"), _ ("No track selected"), "view-list-symbolic"); alert_view.vexpand = false; var overlay = new Gtk.Overlay (); @@ -166,18 +168,14 @@ overlay.add_overlay (header); overlay.add_overlay (alert_view); - modelfilter = new Gtk.TreeModelFilter (listmodel, null); - modelfilter.set_visible_func (tracks_filter_func); - - modelsort = new Gtk.TreeModelSort.with_model (modelfilter); - view = new Gtk.TreeView (); view.activate_on_single_click = true; - view.set_model (modelsort); + view.row_activated.connect ( (path, column) => { show_track (get_track_by_path (path)); }); + view.button_press_event.connect (show_context_menu); view.insert_column_with_attributes (-1, "object", new Gtk.CellRendererText ()); @@ -219,6 +217,14 @@ this.attach (scroll, 0, 2); } + public void init_end () { + modelfilter = new Gtk.TreeModelFilter (listmodel, null); + modelfilter.set_visible_func (tracks_filter_func); + + modelsort = new Gtk.TreeModelSort.with_model (modelfilter); + view.set_model (modelsort); + } + private void setup_columns () { var col = view.get_column (columns.OBJECT); col.visible = false; @@ -248,6 +254,68 @@ view.get_column (columns.DURATION).sort_column_id = columns.DURATION_SORT; } + private bool show_context_menu (Gtk.Widget sender, Gdk.EventButton evt) { + if (evt.type == Gdk.EventType.BUTTON_PRESS && evt.button == 3) { + if (menu == null) { + build_context_menu (); + } + + // GET SELECTED TRACK + Gtk.TreePath path = null; + PlayMyMusic.Objects.Track ? track = null; + int cell_x, cell_y; + view.get_path_at_pos ((int)evt.x, (int)evt.y, out path, null, out cell_x, out cell_y); + + if (path == null) { + return false; + } + + track = get_track_by_path (path); + + if (track == null) { + return false; + } + + foreach (var child in playlists.get_children ()) { + child.destroy (); + } + var item = new Gtk.MenuItem.with_label (_ ("Create New Playlist")); + item.activate.connect ( + () => { + var new_playlist = library_manager.create_new_playlist (); + library_manager.add_track_into_playlist (new_playlist, track.ID); + }); + playlists.add (item); + if (library_manager.playlists.length () > 0) { + playlists.add (new Gtk.SeparatorMenuItem ()); + } + foreach (var playlist in library_manager.playlists) { + item = new Gtk.MenuItem.with_label (playlist.title); + item.activate.connect ( + () => { + library_manager.add_track_into_playlist (playlist, track.ID); + }); + playlists.add (item); + } + playlists.show_all (); + + + menu.popup (null, null, null, evt.button, evt.time); + } + return false; + } + + private void build_context_menu () { + menu = new Gtk.Menu (); + var menu_add_into_playlist = new Gtk.MenuItem.with_label (_ ("Add into Playlist")); + menu.add (menu_add_into_playlist); + + playlists = new Gtk.Menu (); + menu_add_into_playlist.set_submenu (playlists); + + menu.show_all (); + } + public void add_track (Objects.Track track) { Gtk.TreeIter iter; listmodel.append (out iter); @@ -295,14 +363,28 @@ return; } - int i = 0; + var i = activate_by_track (track); + if (settings.shuffle_mode) { + shuffle_index.append (i); + } else if (shuffle_index.length () > 0) { + shuffle_index = new GLib.List<int> (); + } + } + + public int activate_by_track (Objects.Track track) { + int i = 0; + if (PlayMyMusicApp.instance.mainwindow.content.visible_child_name == "tracks") { + view.grab_focus (); + } modelfilter.@foreach ( (model, path, iter) => { var item_track = get_track_by_path (path); if (item_track.ID == track.ID) { only_mark = true; view.get_selection ().select_path (path); + view.scroll_to_cell (path, null, false, 0, 0); + view.set_cursor (path, null, false); show_track (track); only_mark = false; return true; @@ -310,12 +392,7 @@ i++; return false; }); - - if (settings.shuffle_mode) { - shuffle_index.append (i); - } else if (shuffle_index.length () > 0) { - shuffle_index = new GLib.List<int> (); - } + return i; } private void change_cover () {