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>
- 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
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>
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.
* 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
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.
* 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
* 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
* 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