This is cleaner than needing to set an environment variable before
running unit tests.
Implements #28 (Check if unittest is loaded to determine if we are testing)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For displaying errors in the regex that the user has entered
Implements: Issue #4 (Create common filtering widgets)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We check for an exception coming from Regex.set_pattern(), and use it to
set or clear the "warning" css class to let the user know something is
wrong.
Implements: Issue #4 (Create common filtering widgets)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The intention is to have some common code that can be shared by both the
sidebar and the tracklist so they don't need to re-implement the same
things.
Implements: #4 (Create common filtering widgets)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
lib needs Gtk for some of its widgets, so do the import here to make
sure everything is configured properly. This prevents some warnings at
the very beginning of testing as well.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Implemented new code for scanning files using idle tasks. I keep the
thread-based approach for now, since we're still using the tagdb and not
sqlite yet.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
No real user-facing changes in this release, but I do lay some
groundwork for switching over to sqlite for our data storage.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For use when tracks are manually selected. I use this to wire up a
response to double-clicking the playlist view.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
With increment() and decrement() functions that can be used to change
the GtkAdjustment's value. These functions return None if the value did
not change.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And anything else that needs it. This lets us define all the fields
expected by other parts of the Emmental system without needed to read a
track file.
I also switch over the test_tag.py and test_tagstore.py files while I'm
at it.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This will be called when a tag is added to the tag stack to check if the
current track pointer needs to be reset.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I also provide a can_loop() function that the UI can use to determine
activatability of the loop toogle button.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Sometimes Musicbrainz will give us an albumsort, artistsort, or
albumartistsort field in the tags. We can use this for sorting sidebar
widgets.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>