Commit Graph

5144 Commits

Author SHA1 Message Date
Laurent Monin
cd9be58044 InfoDialog: reduce code redundancy, subclassing QWidget 2018-03-04 13:26:52 +01:00
Laurent Monin
54810f497a Merge pull request #857 from zas/saverestore
Generic class to save/restore dialog geometry, code simplification
2018-03-04 10:14:30 +01:00
Laurent Monin
b7d8ce91fd Introduce and use PreserveGeometry class and drop a lot useless code
It also adds save/restore geometry to:
- password dialog
- info dialogs (fix PICARD-1093)
- tags from filenames dialog
- edit tags dialog

Each geometry is saved as "geometry_<class_name>" persist option (ByteArray())
2018-03-04 09:20:25 +01:00
Laurent Monin
5d4f4c82e8 Merge pull request #855 from zas/sslversion
Display SSL version string
2018-03-03 12:35:23 +01:00
Laurent Monin
44e6bcdf0c Display SSL version string
Example: "SSL OpenSSL 1.0.2g  1 Mar 2016"
2018-03-02 10:34:00 +01:00
Laurent Monin
d918c8b52c Fix Exception when removing last script in Options/Scripting
Traceback (most recent call last):
  File "./picard/ui/options/scripting.py", line 258, in <lambda>
    list_widget.set_remove_connection(lambda: self.remove_from_list_of_scripts(self.ui.script_list.row(item)))
  File "./picard/ui/options/scripting.py", line 323, in remove_from_list_of_scripts
    item.setSelected(True)
AttributeError: 'NoneType' object has no attribute 'setSelected'
2018-03-02 09:50:31 +01:00
Laurent Monin
483b8defbe Regenerate picard.pot 2018-03-02 09:33:02 +01:00
Laurent Monin
637657fb1f Use faster string concatenation instead of format to build key
Forgotten in https://github.com/metabrainz/picard/pull/854
2018-03-01 20:49:22 +01:00
Sambhav Kothari
61d55505b2 Merge pull request #854 from sambhav/picard_1204
PICARD-1204: Read and dump values to QSettings only when necessary
2018-03-02 00:04:48 +05:30
Sambhav Kothari
7a95fe4797 Fix variable names and optimize key building 2018-03-01 23:11:47 +05:30
Sambhav Kothari
d620c76ad1 Process modifications to QSettings immediately 2018-03-01 23:03:21 +05:30
Sambhav Kothari
32e02df631 Make sure only relevant keys are loaded 2018-03-01 19:52:58 +05:30
Sambhav Kothari
09e7542f8a PICARD-1204: Read and dump values to QSettings only when necessary
Reading and dumping too often from QSettings causes picard to lock up.
This makes sure we only read on start and dump on change.
2018-03-01 19:52:54 +05:30
Laurent Monin
002b8c0105 Merge pull request #847 from vishichoudhary/two-three
Use python3 super function instead of calling by class name
2018-02-28 17:16:40 +01:00
vishal choudhary
983c183893 use python3 super() 2018-02-28 21:10:13 +05:30
Laurent Monin
8236dedbbd Merge pull request #852 from zas/PICARD-1202
PICARD-1202: only use current item if there's actually one
2018-02-28 11:58:45 +01:00
Laurent Monin
af8af574c6 Merge branch 'master' into PICARD-1202 2018-02-28 11:35:43 +01:00
Laurent Monin
e29ec9712c Merge pull request #851 from zas/no_restore
PICARD-1201: Add -N/--no-restore option to not restore persisted sizes and positions
2018-02-28 10:41:42 +01:00
Laurent Monin
12cc9635f7 PICARD-1202: only use current item if there's actually one
It prevents following error:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/picard/ui/metadatabox.py", line 292, in contextMenuEvent
column = item.column()
AttributeError: 'NoneType' object has no attribute 'column'
2018-02-28 10:38:22 +01:00
Laurent Monin
bd51da2109 Merge branch 'master' into no_restore 2018-02-28 10:29:24 +01:00
Sambhav Kothari
8478b3150a Merge pull request #849 from sambhav/dsfui
PICARD-1203: Do not show un-supported tags in UI
2018-02-28 14:52:28 +05:30
Sambhav Kothari
19940ee8ef Refactor format tests to remove unsupported tags automatically 2018-02-28 13:57:54 +05:30
Sambhav Kothari
4c6e791830 Refactor supports_tag as a class method and update unsupported tags 2018-02-28 13:57:54 +05:30
Laurent Monin
3b01e17923 Add -N/--no-restore option to not restore persisted sizes and positions
It is useful for:
- users having UI issues on startup (too small, too big, out of screen, etc...)
- devs for testing purposes
2018-02-28 09:16:44 +01:00
Sambhav Kothari
23ea30b1d5 Add an ext_to_format function 2018-02-28 12:05:38 +05:30
Sambhav Kothari
9c70a509f4 Do not show un-supported DSF tags in UI 2018-02-28 12:05:38 +05:30
Laurent Monin
2349388ea6 Merge pull request #850 from zas/splitter
PICARD-1200: fix Options tree pane resizing
2018-02-27 21:04:44 +01:00
Laurent Monin
d96080f17e PICARD-1200: fix Options tree pane resizing
Size policy of both panes plus the minimum width enforced for the tree pane are responsible of the issue

Set horizontal policies to Ignored, and use QSplitter.setSizes() to set a smart default.
After this change, it is possible to move the splitter smoothly.
2018-02-27 13:42:21 +01:00
Laurent Monin
a8e416a9f4 Merge pull request #835 from zas/dsf
PICARD-1187: Add DSF file support
2018-02-26 15:04:36 +01:00
Laurent Monin
a678d540dc Add DSF test 2018-02-26 14:10:24 +01:00
Laurent Monin
374849faef PICARD-1187: Add DSF file support 2018-02-26 14:08:48 +01:00
Laurent Monin
9013dc1a23 Merge pull request #848 from zas/cleanuptests
Cleanup format tests
2018-02-26 13:57:24 +01:00
Laurent Monin
940b216f09 Drop useless wrapper 2018-02-26 13:33:08 +01:00
Laurent Monin
a8e2d39271 Introduce a simple decorator and reduce code redundancy 2018-02-26 12:48:38 +01:00
Laurent Monin
28bcf6535d Reduce code redundancy: use addCleanup(), get rid of tearDown() 2018-02-26 12:31:17 +01:00
Laurent Monin
9f8ea36c95 Remove left-over debug code 2018-02-26 12:11:11 +01:00
Laurent Monin
442331cf6c Wrap common test classes in CommonTests to prevent unittest to pick tests in those 2018-02-26 12:11:11 +01:00
Laurent Monin
6a5ef767d2 Raise SkipTest where appropriate, instead of silently returning
- replace `original` with more explicit `testfile`
- build the full path once
- extract extension and store it in a property
2018-02-26 00:26:12 +01:00
Laurent Monin
00ea9375ae Do not repeat tags declaration, just modify one dict depending on format
Provides few methods:
- FormatsTest.setup_tags()
- FormatsTest.set_tags()
- FormatsTest.remove_tags()
2018-02-25 23:52:34 +01:00
Laurent Monin
e51d998fda Merge pull request #846 from zas/stdpaths
Set default paths to standard locations
2018-02-25 15:08:31 +01:00
Laurent Monin
f8d27e8fca Set default paths to standard locations 2018-02-23 19:38:36 +01:00
Laurent Monin
99ef1b28a2 Merge pull request #845 from vishichoudhary/use_super
Use python super function instead of calling by class name
2018-02-22 10:44:12 +01:00
vishal choudhary
3d2b8a6da3 use python super instead of calling with class name 2018-02-22 03:26:34 +05:30
Laurent Monin
270d832b99 Merge pull request #843 from zas/codacy_fixes
Codacy fixes
2018-02-20 23:05:42 +01:00
Laurent Monin
a535413264 Fix warning: Lambda may not be necessary 2018-02-20 21:14:44 +01:00
Laurent Monin
a84837dd71 Fix warning: Redefining built-in 'SyntaxError' 2018-02-20 21:08:01 +01:00
Laurent Monin
a981943157 Fix warning: Redefining built-in 'format' 2018-02-20 20:51:44 +01:00
Laurent Monin
3baaebbeaf Fix warning: Redefining built-in 'id' 2018-02-20 20:50:03 +01:00
Laurent Monin
6981f5bad3 file -> file_ 2018-02-20 20:41:22 +01:00
Laurent Monin
ac0a001415 Use super() 2018-02-20 20:39:04 +01:00