Commit Graph

1150 Commits

Author SHA1 Message Date
Jim Broadus 4dd3233976 organise: Set extension override in OrganiseDialog
If the destination device has a transcode option set, then compute filenames
with updated extensions. This does not cover the case where Organise needs to
transcode due to format support.
2020-06-07 14:45:50 +01:00
Jim Broadus 0271f43cc9 console: Add a Qt debug tab
Add a tab for Qt debug features. Initially provides access to dumpObjectTree() on
Application and MainWindow objects. This dumps the object's child objects to the
log.
2020-05-26 16:57:59 +01:00
Jim Broadus e3fa03e101 console: Refactor console dialog to use tabs 2020-05-26 16:57:59 +01:00
Jim Broadus a4e8d57de0 console: re-enable debug console option
Keep console option hidden by default, but add using CLEMENTINE_DEBUG_CONSOLE
env variable:
CLEMENTINE_DEBUG_CONSOLE=1 clementine
2020-05-26 16:57:59 +01:00
Jim Broadus 96a17c9f40 settings: Only save settings for visited pages
Set a flag when a page is shown. On apply or accept, only save if that flag is
set.
2020-05-12 10:21:44 +01:00
Jim Broadus 77badd37ff settings: Add dialog methods to settings pages
Add Accept, Apply, Reject methods to settings pages to mirror dialog. This will
allow settings pages to handle these events at a more granular level and will
allow common behavor in the base class.
2020-05-12 10:21:44 +01:00
Jim Broadus 7e7d271b30 Properly handle removal of top level items in StandardItemIconLoader
The rowsAboutToBeRemoved signal from the model provides a parent index, but with
QStandardItemModel, top level items are added to an invisible root item that
doesn't have a valid index. This causes the range check to miss top level items
due to a perceived parent mismatch. When the load completes, it attempts to
access an object that has been deleted.
2020-05-04 10:09:51 +01:00
Jim Broadus dc4270076d Change StandardItemIconLoader to require a QStandardItemModel
This should be a safe assumption since the loader operates on QStandardItem
objects.
2020-05-04 10:09:51 +01:00
Jonas Kvinge b762987cd6 Add missing mapToSource() in MainWindow::PlaylistRightClick 2020-03-06 11:10:02 +00:00
Jim Broadus a8f656a933 Shortcut settings page cleanup.
- Group list and settings so they can be enabled/disabled together.
- Make default selection shortcut list. Previous behavior set options
  for the first item, but didn't highlight selection.
- Rename ItemClicked to CurrentItemChanged to reflect correct signal.
2020-02-23 16:08:05 +00:00
Jim Broadus 18a08e87c2 Add a directory_model accessor to Application class. 2020-02-11 08:09:22 +00:00
Pavel Liavonau 3f4c788339 Fixed lastfm workflow with "now playing" and scrobbling feature
(Maybe Issue #2672)
2020-01-07 22:29:23 +00:00
Jim Broadus 39e75071bf Remove unhelpful debug message.
Message contains no context and appears to be a remnant of a debug session.
2020-01-05 16:51:11 -08:00
Jonas Kvinge 1b23417a93 Use QWidget::screen() to fix compile with Qt 5.14 2020-01-05 02:51:08 +01:00
John Maguire 7d2c622d0f
Merge pull request #6507 from jonaski/sprintf
Replace use of QString::sprintf with QString::asprintf
2020-01-05 00:40:43 +00:00
Jonas Kvinge f81a3aa8d8 Replace use of QString::sprintf with QString::asprintf 2020-01-05 00:12:32 +01:00
Jonas Kvinge 9e3461f818 Fix formatting 2020-01-04 21:24:31 +01:00
Jonas Kvinge 6a8f70285f Replace all uses of QDesktopWidget with QScreen 2020-01-04 21:18:12 +01:00
Thor Merlin Lervik 715da8909f Fix resuming playback position on startup 2019-12-14 17:22:16 +01:00
John Maguire 8b765a5257 Remove qtsparkle support 2019-11-14 20:53:46 +00:00
Jonas Kvinge e985bd780a Fix edit tag dialog 2019-11-13 20:47:14 +01:00
Mattias Andersson cd3d481eda Remove an unused file that had been left in the qt5 branch 2019-11-13 09:48:34 +01:00
John Maguire b7c3173001
Merge pull request #6439 from jonaski/signalmapper
Replace all uses of QSignalMapper with C++11 lambda expressions
2019-11-10 19:13:31 +00:00
Jonas Kvinge 344023e6dd Fix formatting 2019-11-10 15:16:39 +01:00
Jonas Kvinge ba31c755ef Replace all uses of QSignalMapper with C++11 lambda expressions 2019-11-10 15:07:12 +01:00
John Maguire 21da802630
Merge pull request #6438 from jonaski/remove-extra-semicolon
Remove extra ';'
2019-11-10 00:53:37 +00:00
Jonas Kvinge d09c27f719 Remove extra ';' 2019-11-10 00:30:18 +01:00
Jonas Kvinge 0da490a5e1 Replace QString::null with QString() 2019-11-09 23:45:28 +01:00
John Maguire cb6cd7c485 Merge remote-tracking branch 'origin/master' into qt5 2019-10-04 16:51:43 +01:00
Antonio Russo c5c294ba14 fancytabwidget.cpp: reuse QSettings object
avoid excessive locking by reusing a common QSettings object in
loadSettings.
2019-09-10 18:41:18 -06:00
Antonio Russo ccaa59cc66 Periodically save current playlist tab
Building on the previous commit, we save the current playlist (tab)
periodically as well.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2019-09-10 18:41:18 -06:00
Antonio Russo e66fdd86da Periodically save settings
Instead of immediately saving, which leads to poor performance,
and possible hardware damage (see #6057), limit saves to once
per second (similar to how KDE does it).  It also guarantees
that only one save is required per second, by sharing a QSettings
object, and establishes a signaling framework to put other
setting save events into (but only uses this for the two major
offenders: playlist tab switching and window resizing).

This is in contrast to 6a312e7, which simply deferred the save
until program exit, and caused problems for some people (see #6217
and #6209).

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2019-09-10 18:41:18 -06:00
luz.paz fb93ae4b02 Fix misc. source comment typos
Typos found via `codespell`
2019-08-21 23:43:16 -04:00
John Maguire 75f18dab23
Merge pull request #6374 from jonaski/qt5-update
Qt5 update
2019-07-24 11:51:48 +01:00
John Maguire 3694bcfc82
Merge pull request #6371 from areading/limit_tagclient_procs
Introduce limit for number of tag client processes.
2019-07-22 10:56:03 +01:00
Andrew Reading c76697b42c Introduce limit for number of tag client processes.
Previously, the number of processes spawned was always
QThread::idealThreadCount() (returning the number of logical CPU
cores). On new systems with many cores, however, this can result
in 12, 16, 24, or ... processes being spawned, which is a bit
excessive.

This establishes a new config variable,
'max_numprocs_tagclients' within the Settings group, in order
to limit the maximum number of tag client processes that get
spawned. It also adds a means of setting this via the Behavior
page in Settings. It can be set to any integer in the interval
[1, QThread::idealThreadCount()]; it defaults to the maximal value
so as to emulate the old behavior.
2019-07-21 10:53:13 -07:00
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02:00
lordlethis c9800a4dc9 Fix blank window when restoring from systray (#6351)
* Fix blank window when restoring from systray

This applies the fix qBittorrent used for this same issue:
https://github.com/qbittorrent/qBittorrent/issues/9240,
so credit goes to those guys

* Fix whitespace
2019-07-13 12:57:27 +01:00
John Maguire e3609b27cd
Merge pull request #6296 from ShFil119/impr/simplify
Simplify some statements
2019-04-10 11:12:09 +01:00
Jim Broadus cc295a4c4c Set non-zero minimum for fade times.
QTimeLine duration must be greater than 0. If set to 0, a default of 1000ms will
be used. To avoid this, enforce a minimum of 1ms for pause and cross fade values
if those fades are enabled.
2019-04-07 21:31:30 -07:00
Filip Gawin be827f4f7f Simplify some statements 2019-02-22 18:49:48 +01:00
Jonas Kvinge c277cc5f6c Merge remote-tracking branch 'upstream/master' into qt5-update 2019-01-27 19:44:28 +01:00
Jonas Kvinge 3256e81414 Update about 2019-01-27 14:55:50 +00:00
Jonas Kvinge 1d17bee44a Merge with master and fix conflicts 2019-01-18 01:38:12 +01:00
Jonas Kvinge 16bdd39c03 Merge remote-tracking branch 'upstream/master' into qt5-update 2018-11-29 23:21:54 +01:00
Jonas Kvinge 2d1f6cd239 Replace Q_OS_MACOS with Q_OS_MAC (#6223) 2018-11-29 22:11:55 +00:00
Jonas Kvinge 9f946a2898 Improvements to makefiles and make components optional (#6221) 2018-11-29 21:32:12 +00:00
Jonas Kvinge 289ea31f8c Fix saving geometry and fancytab settings (#6217) 2018-11-28 20:08:23 +00:00
Jonas Kvinge 8c198a99a5 Qt 5 fixes 2018-11-21 10:31:17 +00:00
Jonas Kvinge d4fab4a2ea Merge remote-tracking branch 'upstream/master' into qt5-update 2018-11-11 22:46:07 +01:00
Victor Parmar f4d84bc05a Split last.fm scrobbling and play count calculation, closes #5771 (#6179)
Also add a configurable option to increment the play count if song has played for a shorter duration.
2018-10-20 12:57:49 +01:00
Amish Naidu 107e945872 Convert uses of QtAlgorithms to std:: algorithms 2018-10-09 19:17:54 +01:00
Amish Naidu 34e007f2b8 Port 'Allow ignoring prefixes when sorting playlist' to master (#6166)
* Allow ignoring prefixes when sorting playlist

This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".

* Change QStringLiteral to QString for compatbility with Qt 4.8
2018-10-08 16:24:36 +01:00
Amish Naidu fb00835468 Allow ignoring prefixes when sorting playlist
This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".
2018-10-05 10:56:49 +01:00
Jonas Kvinge 159d3c6ba6 Merge remote-tracking branch 'upstream/master' into qt5-update 2018-10-01 22:54:05 +02:00
John Maguire 5511583966 Remove SoundCloud support
Closes #5766, closes #5538, closes #6114, closes #5914
2018-10-01 17:46:24 +01:00
Jonas Kvinge 25ef0ff211 Only use system tray if it's available on the system (#6154) 2018-10-01 01:40:31 -07:00
Jonas Kvinge 6432a9c399 Make systray settings available only if there is a systray on the system (#6153) 2018-10-01 01:39:37 -07:00
Jonas Kvinge c29c2e95cc Fixed merge conflicts 2018-09-30 15:11:06 +02:00
Kerem Seyhan 4ac2dedefa Added mouse forward and back button actions. 2018-08-14 17:09:55 +01:00
David Guillen Fandos 4a1236f8da Reduce some CPU load by disabling/fixing some UI stuff
- Disabling playlist row glow by default
 - Track slider popup visible by default, add hide()
    to ensure not visible by default (no more repaints)
 - Set kTrackSliderUpdateTimeMs to 500. IMO 40 is too low

This should partially fix issue #1079
2018-08-08 22:39:54 +01:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
vaterlangen fcf96cb6ff Queue size and duration is now displayed in queue manager && Album Cover Popup fixes (#6086) 2018-06-18 14:21:44 +01:00
Jonas Kvinge a397871123 Fix loading output/device setting 2018-06-14 21:39:16 +01:00
Antonio Russo 6a312e7459 Limit both QSettings reads and writes (#6057)
Any access, read or write, via QSettings requires locking
`Clementine.conf`. On some devices, this can be slow. Moreover, it also
increases power use and wear on devices such as SSDs.

To improve the situation, defer QSettings updates until program close
for window resize, current playlist tab, and playlist geometry, i.e.
`PlaylistView::SaveGeometry`.

Also, limit `PlaylistView::LoadGeometry` to once per program run.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2018-05-22 11:18:54 +01:00
Chocobozzz 16b4f9a991
Merge remote-tracking branch 'upstream/master' into qt5 2018-05-14 08:25:27 +02:00
Mark Furneaux d28a318437 Clang format 2018-04-14 16:57:06 -04:00
Jonas Kvinge 804168edc7 Bring back album cover fetching from discogs. (#6028)
* Bring back cover fetching from discogs.
2018-03-19 14:18:56 +00:00
Mark Furneaux 3626d84964 Add play next from library 2018-03-18 22:44:00 -04:00
Mark Furneaux a789ce82ca Allow playing of tracks already in queue 2018-03-18 22:03:04 -04:00
Mark Furneaux 6e387c2578 Initial playlist implementation 2018-03-18 14:43:44 -04:00
Andreas Sturmlechner 55a39a9609 Fix build with Qt 5.11 (#6029) 2018-03-17 02:16:49 -04:00
Valeriy Malov 2d7894915d Accept closeEvent() for mainwindow when closing to tray
There's no difference between close() and hide() if WA_DeleteOnClose is not set, so if we're going to hide the window we might as well accept the event.
Ignoring the event may interrupt shutdowns since it signals that the application doesn't want to close the window, at least this happens on Plasma 5.11 when Clementine is not minimized to tray.
2018-03-13 15:04:12 -04:00
Jonas Kvinge de23c3181f Fix resume playback on start not working. 2018-03-12 07:55:59 -04:00
Jonas Kvinge c9d954f8a3 Fix bug in covermanager not saving album cover to DB. (#6011)
* Fix bug in covermanager not saving album cover to DB.
2018-03-04 14:13:34 +00:00
Chocobozzz 70f68b1926
Merge remote-tracking branch 'upstream/master' into qt5 2018-02-01 09:50:42 +01:00
Vikram Ambrose 790fc2ff28 Replace Nokia based FancyTabWidget with standard QTabWidget (#5956)
* Replace Nokia sidebar widget with QTabWidget

The old sidebar widget was written by Nokia 10 years ago
and was a hand made hardcoded mess of widgets trying to
emulate a QTabWidget.

This commit completely replaces it with a widget of the
same name (FancyTabWidget) but is a much simpler subclass
of the standard QTabWidget allowing for a 50% code reduction.

There is still some manual draw code copied over to get the
exact same look of the previous widget but this is not strictly
necessary and can be later refactored with simpler drawControl
code based on styling preferences.

Benefits:
 - 50% code reduction
 - Easier to understand standard QTabWidget mechanics
 - Built-in support for re-arranging and closing tabs

* Save and restore sidebar tab order

Allow the user to rearrange the tab order by dragging
tabs to a new location. Tab order is saved on exit and restored
on start

* Fix some code formatting issues
2018-01-10 09:22:05 +00:00
vikramambrose 2e4a67b8da Add appearance option to hide playlist filter toolbar (#5942)
Gives the user the option of a cleaner looking interface if the
filter toolbar isn't used.
2018-01-03 15:24:56 +00:00
Mattias Andersson b724291ef9 Ensure that the correct playlist is played (#5929)
When the playlist doubleclick behavior is set to add songs to the queue,
the playback of the queue also starts if no song is currently
playing. To play the queue from the current playlist, we must set the
active playlist to the current one before starting the playback.

Fixes #5714.
2017-12-14 21:48:03 +00:00
Victor Parmar eab875c46d Add support for deleting the currently playing track via the commandline (#5899) 2017-11-21 10:02:36 +00:00
Adrian Garcia 27fc915921 Add settings option to stop playback if song fails to play (#5905) 2017-11-21 10:00:36 +00:00
Allan Nordhøy b581f2454a Spelling: Hip Hop (#5843)
https://en.wikipedia.org/wiki/Hip_hop Though inconsistent, this never uses "HipHop". While that could be perceived as the name of the equalizer, "Hip Hop" is at least consistent with the other EQs.
2017-08-29 02:09:05 +02:00
Krzysztof Sobiecki dad0c8f314 [win32] Fix build in src/ui/ (#5784)
It looks like there is a problem with build of src/ui/appearancesettingspage.cpp
It might fix it.
2017-08-16 15:09:55 +01:00
Jacob Henner 203ec76973 Add contextual searches to playlists, library and global search. (#5649)
* Closes #5567: Contextual album/artist search in library search, global search, and playlists.

* Change artist/album search to 'search for this' in globalsearch

* Change artist/album search to 'search for this' in library

* Applying patch from @Fat-Zer to allow search incl year

* Re-adding missing schema definition
2017-08-09 14:12:36 +01:00
David Roeca 49876536a5 Resolve #3693 (#5790)
* bring in playlist updates for potential fix

* define signal to handle organise playlist bugs

* work in progress

* fix wrong signal/slot

* next push forward on handling new song creation

* Reorganize signals/slots; still need to figure out why not all signals are being handled

* Get playlists to work when they're in memory

* more changes to playlist updates

* revert unnecessary changes and finalize fix
2017-07-22 18:57:33 +01:00
Chocobozzz fc517ce7a5 Merge remote-tracking branch 'upstream/master' into qt5 2017-06-05 21:28:05 +02:00
Alex Bikadorov 8953227c65 New shortcut: remove current playing song from playlist (#5723) 2017-05-31 17:59:36 +01:00
Yan Pashkovsky 583eb25cfc Gtkicons (#5742)
* sys icons tick in settings

* system icons loading support

* system icons loading, style fixes
2017-05-30 21:25:24 +01:00
Elias Lattash f854bc5deb Simpler iconloader::Load() logic (#5706)
This fixes a bug when clementine uses an icon from the system, even though it exists in it the *data* folder.

For example: the icons at the top of *playlistlistview.ui*, and at the top of *fileview.ui*
2017-05-08 12:07:59 +01:00
Grace Dolphy 52f1982353 Delete Undo Fix Attempt - Should Solve Issue #5701 Using Clementine to delete a song from disk should not be added to the undo stack (#5702)
* Fix delete functionality. Skips to next song if deleted song is also currently playing.

* Added in a bool to determine if the song being deleted is meant to be deleted from the disk or just from the playlist. Took advantage of the unused variable located in removeRows to distinguish between the two options. No longer adds delete from disk to the undo stack, and deleting from the playlist goes to undo stack as it should.

* Added in a bool to determine if the song being deleted is meant to be deleted from the disk or just from the playlist. Took advantage of the unused variable located in removeRows to distinguish between the two options. No longer adds delete from disk to the undo stack, and deleting from the playlist goes to undo stack as it should.

* Update mainwindow.cpp

* Formatting Changes

* Update playlist.cpp

Simplified condition statement.

* Added in a missed boolean for RemoveSelected

* Update playlistview.cpp
2017-04-18 14:29:25 +01:00
Grace Dolphy 672d00be05 Fixes the issue "Seek instead of navigation with arrow keys #5550". Now allows the leaf to be closed by arrow left at any point of the leaf, not only the parent, and if the library is focused and arrow keys are pressed and there is nothing to open or close, the request is ignored (no seek) (#5684) 2017-03-30 18:02:49 +01:00
Santiago Gil 0b34586e52 Fix some warnings shown on start-up (#5679)
* Fix 'RGB parameters out of range' with psychedelic colors

* Fix 'edit-find' icon name

* BlockAnalyzer::drawBackground(): do not attempt to paint on a null background

* Use qBound()
2017-03-27 12:57:24 +01:00
Santiago Gil 62bc647cbc Roll back to the cache naming conventions for covers (#5651) 2017-03-07 11:46:54 +00:00
santigl 99ad5dcd2d Refactor EffectiveAlbumArtistName() 2017-03-06 18:47:34 +00:00
santigl f5bd7ef5c0 ItemHasCover(): Replace pointer with reference 2017-03-06 18:21:27 +00:00
santigl 82f0d261fa Use the 'effective_album' title when searching for a track's cover 2017-03-06 18:21:27 +00:00
santigl 2c643513e2 Refactor icon handling. Make empty-cover filtering work again. 2017-03-06 18:21:27 +00:00
santigl deb7c33c64 Add support for 'album artist' field in the LibraryBackendInterface 2017-03-06 18:21:27 +00:00
santigl 58b7c62f25 Make Cover Manager aware of 'album artist' field 2017-03-06 18:21:27 +00:00
santigl 62cec8cf28 Prioritize album artist in cover search and manager 2017-03-06 18:21:27 +00:00