diff --git a/qbittorrentui/_vendored/__init__.py b/qbittorrentui/_vendored/__init__.py index e69de29..cdfc951 100644 --- a/qbittorrentui/_vendored/__init__.py +++ b/qbittorrentui/_vendored/__init__.py @@ -0,0 +1 @@ +#from qbittorrentui._vendored._attrdict import AttrDict diff --git a/qbittorrentui/_vendored/_directions.txt b/qbittorrentui/_vendored/_directions.txt new file mode 100644 index 0000000..7c91a16 --- /dev/null +++ b/qbittorrentui/_vendored/_directions.txt @@ -0,0 +1,3 @@ +because i will inevitably forget how i did this.... + +https://stackoverflow.com/a/52681711/8549606 diff --git a/qbittorrentui/_vendored/_panwid/.bumpversion.cfg b/qbittorrentui/_vendored/_panwid/.bumpversion.cfg deleted file mode 100644 index 9e7b398..0000000 --- a/qbittorrentui/_vendored/_panwid/.bumpversion.cfg +++ /dev/null @@ -1,18 +0,0 @@ -[bumpversion] -commit = True -tag = True -current_version = 0.3.3.dev3 -parse = (?P\d+)\.(?P\d+)\.(?P\d+)(\.(?P[a-z]+)(?P\d+))? -serialize = - {major}.{minor}.{patch}.{release}{dev} - {major}.{minor}.{patch} - -[bumpversion:part:release] -optional_value = gamma -values = - dev - gamma - -[bumpversion:file:setup.py] - -[bumpversion:file:panwid/__init__.py] diff --git a/qbittorrentui/_vendored/_panwid/.gitignore b/qbittorrentui/_vendored/_panwid/.gitignore deleted file mode 100644 index d520536..0000000 --- a/qbittorrentui/_vendored/_panwid/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -.static_storage/ -.media/ -local_settings.py - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -*.py~ -*.py# diff --git a/qbittorrentui/_vendored/_panwid/.travis.yml b/qbittorrentui/_vendored/_panwid/.travis.yml deleted file mode 100644 index 123d9c9..0000000 --- a/qbittorrentui/_vendored/_panwid/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: python -install: -- pip install . -script: -- python setup.py test -matrix: - include: - - stage: test - python: 3.7 - dist: xenial - - stage: deploy - python: 3.7 - dist: xenial - deploy: - provider: pypi - user: tonycpsu - password: - secure: aXjV+Yc94YdW4Q0vGo2HOp+u29PyRkYTMTxhf8kjWW9eKRNfOhL0LKVF86UXPxxZYMUJUD1Ep/H212ofUqbCL3xvBoMZsMbfzvC3NQMtEfIjMX5rn8pWRloPmJvLZUnNj5j60xR+ku2PLEZMrxtIZrGtAH95BZpKPg3mU6Gn3NIgJY2MHEkrwg1ywfDAiZNhL+hhhIpVyxtwSqd8SZUsh0VmUJ+93pmqmUtqXG7cvYeBy3tPIQkLodh4TmtsGki9brcxcJ3rBRfYxIDEOOfrM83HRSH+ZBHh6x0fV2uJRq7ZdFeea3e0aEdJYdm955K9TvvFzRkZhVUWOj+a0A3++JUzaaQGkFa/jUG+ll01EuN5+LgwwKdPcsi/z3ULhyhdusZrLUqJbGA1eahaSZdZCq7vG57qa6+wReG6pz/aLduayLP/cjAp0RxOqQsyh61e+nvY4CW9F2r+njQiO2UlkqOHp4WxVe4Finlbi1Nm77k+sFIrJFEF8b/LV7teV4QoQlhz+J+ODaA/VEbwqxVx5GAE5AC5fMLMblZufVHT0nw08nwVh59SF7lEAWLkmKAN6X704kp7wSrZAkRPgC/oYHNUx6lgfED0b9YghuGRk8d454ge9nY25wayMli/WuTTng3NoI/Amh13+NaQXLfKDOhqGEPIaQcX97JQv1QuQcM= - on: - tags: true diff --git a/qbittorrentui/_vendored/_panwid/LICENSE b/qbittorrentui/_vendored/_panwid/LICENSE deleted file mode 100644 index 602bfc9..0000000 --- a/qbittorrentui/_vendored/_panwid/LICENSE +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/qbittorrentui/_vendored/_panwid/MANIFEST.in b/qbittorrentui/_vendored/_panwid/MANIFEST.in deleted file mode 100644 index c1a7121..0000000 --- a/qbittorrentui/_vendored/_panwid/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include LICENSE -include README.md diff --git a/qbittorrentui/_vendored/_panwid/README.md b/qbittorrentui/_vendored/_panwid/README.md deleted file mode 100644 index e148fd1..0000000 --- a/qbittorrentui/_vendored/_panwid/README.md +++ /dev/null @@ -1,72 +0,0 @@ -panwid -====== - -A collection of widgets for [Urwid](https://urwid.org/). - -Currently consists of the following sub-modules: - -## autocomplete ## - -Adds autocomplete functionality to a container widget. See `Dropdown` -implementation for how it works until there's proper documentation. - -## datatable ## - -Widget for displaying tabular data. - -Features include: -* Flexible options for column formatting and sorting -* Progressive loading / "infinite scrolling" for paginating large datasets -* Scrollbar with indicator showing position within dataset - -[![asciicast](https://asciinema.org/a/iRbvnuv7DERhZrdKKBfpGtXqw.png)](https://asciinema.org/a/iRbvnuv7DERhZrdKKBfpGtXqw?autoplay=1) - -## dialog ## - -A set of simple classes for implementing pop-up dialogs. - -## dropdown ## - -Dropdown menu widget with autocomplete support. - -[![asciicast](https://asciinema.org/a/m23L8xPJsTQRxzOCwvc1SuduN.png)](https://asciinema.org/a/m23L8xPJsTQRxzOCwvc1SuduN?autoplay=1) - -## highlightable ## - -Adds the ability for text widgets (or any widget with text in them) to have -strings highlighted in them. See `Dropdown` implementation until there's proper -documentation. - -## keymap ## - -Adds ability to define keyboard mappings across multiple widgets in your -application without having to write Urwid `keypress`` methods. See `Dropdown` -implementation until there's proper documentation. - -## progressbar ## - -A configurable horizontal progress bar that uses unicode box drawing characters -for sub-character-width resolution. - -## scroll ## - -Makes any fixed or flow widget vertically scrollable. Copied with permission -from `rndusr/stig`. - -## sparkwidgets ## - -A set of sparkline-ish widgets for displaying data visually using a small number -of screen characters. - -## tabview ## - -A container widget that allows selection of content via tab handles. - -**TODOs**: - -* Documentation -* Make more 16-color and non-unicode friendly -* Add combo box functionality to dropdown -* Update datatable so that footer functions calculate based on the entire - dataset, not just visible rows. - diff --git a/qbittorrentui/_vendored/_panwid/doc/screencast.gif b/qbittorrentui/_vendored/_panwid/doc/screencast.gif deleted file mode 100644 index 3160d01..0000000 Binary files a/qbittorrentui/_vendored/_panwid/doc/screencast.gif and /dev/null differ diff --git a/qbittorrentui/_vendored/_panwid/examples/datatable.py b/qbittorrentui/_vendored/_panwid/examples/datatable.py deleted file mode 100644 index a930a72..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/datatable.py +++ /dev/null @@ -1,593 +0,0 @@ -#!/usr/bin/python - -import logging -logger = logging.getLogger(__name__) -import urwid -from panwid.datatable import * -from panwid.listbox import ScrollingListBox -from urwid_utils.palette import * -from orderedattrdict import AttrDict -import os -import random -import string -from optparse import OptionParser -from dataclasses import * -import typing -from collections.abc import MutableMapping - -screen = urwid.raw_display.Screen() -# screen.set_terminal_properties(1<<24) -screen.set_terminal_properties(256) - -NORMAL_FG_MONO = "white" -NORMAL_FG_16 = "light gray" -NORMAL_BG_16 = "black" -NORMAL_FG_256 = "light gray" -NORMAL_BG_256 = "g0" - -@dataclass -class BaseDataClass(MutableMapping): - - def keys(self): - return self.__dataclass_fields__.keys() - - def get(self, key, default=None): - - try: - return self[key] - except (KeyError, AttributeError): - return default - - def __getitem__(self, key): - return getattr(self, key) - - def __setitem__(self, key, value): - setattr(self, key, value) - - def __delitem__(self, key): - delattr(self, key) - - def __iter__(self): - return iter(self.keys()) - - def __len__(self): - return len(self.keys()) - -@dataclass -class Foo(BaseDataClass): - uniqueid: int - foo: int - bar: float - baz: str - qux: urwid.Widget - xyzzy: str - baz_len: typing.Any - a: dict - d: dict - color: list - # _details: dict = field(default_factory=lambda: {"open": True, "disabled": False}) - # _cls: typing.Optional[type] = None - @property - def _details(self): - return {"open": True, "disabled": False} - -def main(): - - - parser = OptionParser() - parser.add_option("-v", "--verbose", action="count", default=0), - (options, args) = parser.parse_args() - - if options.verbose: - formatter = logging.Formatter( - "%(asctime)s [%(module)16s:%(lineno)-4d] [%(levelname)8s] %(message)s", - datefmt='%Y-%m-%d %H:%M:%S' - ) - fh = logging.FileHandler("datatable.log") - # fh.setLevel(logging.DEBUG) - fh.setFormatter(formatter) - if options.verbose > 0: - logger.setLevel(logging.DEBUG) - logging.getLogger("panwid.datatable").setLevel(logging.DEBUG) - else: - logger.setLevel(logging.INFO) - logging.getLogger("panwid.datatable").setLevel(logging.INFO) - logger.addHandler(fh) - logging.getLogger("panwid.datatable").addHandler(fh) - # logging.getLogger("raccoon.dataframe").setLevel(logging.DEBUG) - # logging.getLogger("raccoon.dataframe").addHandler(fh) - - - attr_entries = {} - for attr in ["dark red", "dark green", "dark blue", "dark cyan"]: - attr_entries[attr.split()[1]] = PaletteEntry( - mono = "white", - foreground = attr, - background = "black" - ) - entries = ScrollingListBox.get_palette_entries() - entries.update(DataTable.get_palette_entries(user_entries=attr_entries)) - # entries.update(attr_entries) - palette = Palette("default", **entries) - - - COLUMNS = [ - DataTableColumn("foo", label="Foo", align="right", - # width=("weight", 1), - width=3, - sort_key = lambda v: (v is None, v), - pack=True, - attr="color", padding=0, - footer_fn = lambda column, values: sum(v for v in values if v is not None) - ), - DataTableDivider(u"\N{DOUBLE VERTICAL LINE}"), - DataTableColumn("bar", label="Bar", width=10, align="right", - format_fn = lambda v: round(v, 2) if v is not None else v, - decoration_fn = lambda v: ("cyan", v), - sort_reverse=True, sort_icon=False, padding=0),# margin=5), - DataTableColumn("baz", label="Baz!", - width=("weight", 5), - # pack=True, - min_width=5, - align="right", - truncate=True), - DataTableColumn( - "qux", - label=urwid.Text([("red", "q"), ("green", "u"), ("blue", "x")]), - width=5, hide=True), - ] - - class BazColumns(urwid.WidgetWrap): - def __init__(self, value): - self.text = DataTableText(value) - super().__init__(urwid.Columns([ - (1, urwid.Text("[")), - ("weight", 1, self.text), - (1, urwid.Text("]")), - ])) - - def truncate(self, width, end_char=None): - self.text.truncate(width-2, end_char=end_char) - - - class ExampleDataTable(DataTable): - - columns = COLUMNS[:] - - index="index" - - with_sidecar = True - - def __init__(self, num_rows = 10, random=False, *args, **kwargs): - self.num_rows = num_rows - # indexes = random.sample(range(self.num_rows*2), num_rows) - if random: - self.randomize_query_data() - else: - self.fixed_query_data() - - self.last_rec = len(self.query_data) - super(ExampleDataTable, self).__init__(*args, **kwargs) - - def fixed_query_data(self): - self.query_data = [ - self.fixed_row(i) for i in range(self.num_rows) - # self.random_row(i) for i in range(self.num_rows) - ] - - def randomize_query_data(self): - indexes = list(range(self.num_rows)) - self.query_data = [ - self.random_row(indexes[i]) for i in range(self.num_rows) - # self.random_row(i) for i in range(self.num_rows) - ] - random.shuffle(self.query_data) - - def fixed_row(self, uniqueid): - # return AttrDict(uniqueid=uniqueid, - f = Foo(uniqueid=uniqueid, - foo=uniqueid, - bar = (random.uniform(0, 1000) - if random.randint(0, 5) - else None), - baz =(''.join(random.choice( - string.ascii_uppercase - + string.ascii_lowercase - + string.digits + ' ' * 10 - ) for _ in range(random.randint(20, 80))) - if random.randint(0, 5) - else None), - qux = urwid.Text([("red", "1"),("green", "2"), ("blue", "3")]), - xyzzy = ( "%0.1f" %(random.uniform(0, 100)) - if random.randint(0, 5) - else None), - baz_len = lambda r: len(r["baz"]) if r.get("baz") else 0, - # xyzzy = random.randint(10, 100), - a = dict(b=dict(c=random.randint(0, 100))), - d = dict(e=dict(f=random.randint(0, 100))), - color = ["red", "green", "blue"][random.randrange(3)], - ) - return f - - - def random_row(self, uniqueid): - return AttrDict(uniqueid=uniqueid, - foo=random.choice(list(range(100)) + [None]*20), - bar = (random.uniform(0, 1000) - if random.randint(0, 5) - else None), - baz =(''.join(random.choice( - string.ascii_uppercase - + string.ascii_lowercase - + string.digits + ' ' * 10 - ) for _ in range(random.randint(5, 80))) - if random.randint(0, 5) - else None), - qux = urwid.Text([("red", "1"),("green", "2"), ("blue", "3")]), - xyzzy = ( "%0.1f" %(random.uniform(0, 100)) - if random.randint(0, 5) - else None), - baz_len = lambda r: len(r["baz"]) if r.get("baz") else 0, - # xyzzy = random.randint(10, 100), - a = dict(b=dict(c=random.randint(0, 100))), - d = dict(e=dict(f=random.randint(0, 100))), - color = ["red", "green", "blue"][random.randrange(3)], - - ) - - - def query(self, sort=(None, None), offset=None, limit=None, load_all=False, **kwargs): - - logger.info("query: offset=%s, limit=%s, sort=%s" %(offset, limit, sort)) - try: - sort_field, sort_reverse = sort - except: - sort_field = sort - sort_reverse = None - - if sort_field: - kwargs = {} - kwargs["key"] = lambda x: (x.get(sort_field) is None, - x.get(sort_field), - x.get(self.index)) - if sort_reverse: - kwargs["reverse"] = sort_reverse - self.query_data.sort( - **kwargs - ) - if offset is not None: - if not load_all: - start = offset - end = offset + limit - r = self.query_data[start:end] - else: - r = self.query_data[offset:] - else: - r = self.query_data - - for d in r: - yield (d, dict(zzzz=1)) - - - def query_result_count(self): - return self.num_rows - - - def keypress(self, size, key): - if key == "r": - self.refresh() - elif key == "meta r": - # self.randomize_query_data() - # self.reset(reset_sort=True) - self.refresh() - elif key == "ctrl r": - self.reset(reset_sort=True) - elif key == "ctrl d": - logger.info(type(self.selection.data)) - self.log_dump(20) - elif key == "meta d": - self.log_dump(20, columns=["foo", "baz"]) - elif key == "ctrl f": - self.focus_position = 0 - elif key == "ctrl t": - logger.info(self.selection.data) - elif key == "ctrl k": - self.selection["foo"] = 123 - logger.info(self.selection.data["foo"]) - self.selection.update() - # self.selection.details_disabled = not self.selection.details_disabled - # logger.info(self.selection.details_disabled) - elif key == "meta i": - logger.info("foo %s, baz: %s" %(self.selection.get("foo"), - self.selection.get("baz"))) - elif self.ui_sort and key.isdigit() and int(key)-1 in range(len(self.columns)): - col = int(key)-1 - self.sort_by_column(col, toggle=True) - elif key == "ctrl l": - self.load("test.json") - elif key == "ctrl s": - self.save("test.json") - elif key == "0": - # self.sort_by_column(self.index, toggle=True) - self.sort_index() - elif key == "a": - self.add_row(self.random_row(self.last_rec)) - self.last_rec += 1 - elif key == "A": - self.add_row(self.random_row(self.last_rec), sort=False) - self.last_rec += 1 - elif key == "d": - if len(self): - self.delete_rows(self.df.index[self.focus_position]) - elif key == "meta a": - name = "".join( random.choice( - string.ascii_uppercase - + string.lowercase - + string.digits - ) for _ in range(5) ) - data = [ "".join( random.choice( - string.ascii_uppercase - + string.lowercase - + string.digits - ) for _ in range(5)) for _ in range(len(self)) ] - col = DataTableColumn(name, label=name, width=6, padding=0) - self.add_columns(col, data=data) - elif key == "t": - self.toggle_columns("qux") - elif key == ";": - self.set_columns(COLUMNS) - elif key == "T": - self.toggle_columns(["foo", "baz"]) - elif key == "D": - self.remove_columns(len(self.columns)-1) - elif key == "f": - self.apply_filters([lambda x: x["foo"] > 20, lambda x: x["bar"] < 800]) - elif key == "F": - self.clear_filters() - elif key == ".": - self.selection.toggle_details() - elif key == "s": - self.selection.set_attr("red") - elif key == "S": - self.selection.clear_attr("red") - elif key == "k": - self.selection[2].set_attr("red") - elif key == "K": - self.selection[2].clear_attr("red") - elif key == "u": - logger.info(self.footer.values) - elif key == "c": - self.toggle_cell_selection() - elif key == "z": - # self.columns[0].width = 12 - self.resize_column("foo", ("given", 12)) - # self.reset() - elif key == "shift left": - self.cycle_sort_column(-1) - elif key == "shift right": - self.cycle_sort_column(1) - elif self.ui_sort and key == "shift up": - self.sort_by_column(reverse=True) - elif self.ui_sort and key == "shift down": - self.sort_by_column(reverse=False) - elif key == "shift end": - self.load_all() - # self.listbox.focus_position = len(self) -1 - elif key == "ctrl up": - if self.focus_position > 0: - self.swap_rows(self.focus_position, self.focus_position-1, "foo") - self.focus_position -= 1 - elif key == "ctrl down": - if self.focus_position < len(self)-1: - self.swap_rows(self.focus_position, self.focus_position+1, "foo") - self.focus_position += 1 - else: - return super(ExampleDataTable, self).keypress(size, key) - - def decorate(self, row, column, value): - # if column.name == "baz": - # return BazColumns(value) - return super().decorate(row, column, value) - - class ExampleDataTableBox(urwid.WidgetWrap): - - def __init__(self, *args, **kwargs): - - self.table = ExampleDataTable(*args, **kwargs) - # urwid.connect_signal( - # self.table, "select", - # lambda source, selection: logger.info("selection: %s" %(selection)) - # ) - label = "sz:%d pgsz:%s sort:%s%s hdr:%s ftr:%s ui_sort:%s cell_sel:%s" %( - self.table.query_result_count(), - self.table.limit if self.table.limit else "-", - "-" if self.table.sort_by[1] - else "+" if self.table.sort_by[0] - else "n", - self.table.sort_by[0] or " ", - - "y" if self.table.with_header else "n", - "y" if self.table.with_footer else "n", - "y" if self.table.ui_sort else "n", - "y" if self.table.cell_selection else "n", - ) - self.pile = urwid.Pile([ - ("pack", urwid.Text(label)), - ("pack", urwid.Divider(u"\N{HORIZONTAL BAR}")), - ("weight", 1, self.table) - ]) - self.box = urwid.BoxAdapter(urwid.LineBox(self.pile), 25) - super(ExampleDataTableBox, self).__init__(self.box) - - def detail_fn(data): - - # return urwid.Padding(urwid.Columns([ - # ("weight", 1, data.get("qux")), - # # ("weight", 1, urwid.Text(str(data.get("baz_len")))), - # ("weight", 2, urwid.Text(str(data.get("xyzzy")))), - # ])) - - # return urwid.Pile([ - # (1, urwid.Filler(urwid.Padding(urwid.Text("adassdda")))), - # (1, urwid.Filler(urwid.Padding(urwid.Text("adassdda")))), - # (1, urwid.Filler(urwid.Padding(urwid.Text("adassdda")))), - # (1, urwid.Filler(urwid.Padding(urwid.Text("adassdda")))), - # ]) - - return urwid.BoxAdapter(ExampleDataTable( - 100, - limit=10, - index="uniqueid", - divider = DataTableDivider(".q", width=3), - # detail_fn=detail_fn, - cell_selection=True, - sort_refocus = True, - with_scrollbar=True, - row_attr_fn = row_attr_fn, - ), 20) - - def row_attr_fn(position, data, row): - if data.baz and "R" in data.baz: - return "red" - elif data.baz and "G" in data.baz: - return "green" - elif data.baz and "B" in data.baz: - return "blue" - return None - - boxes = [ - - ExampleDataTableBox( - 100, - limit=10, - index="uniqueid", - divider = DataTableDivider("."), - # divider = False, - detail_fn=detail_fn, - detail_auto_open=True, - detail_replace=True, - cell_selection=True, - sort_refocus = True, - with_scrollbar=True, - row_attr_fn = row_attr_fn, - detail_selectable = True, - sort_icons=False, - # row_height=2, - # no_load_on_init = True - - ), - - # ExampleDataTableBox( - # 500, - # index="uniqueid", - # sort_by = "foo", - # query_sort=False, - # ui_sort=False, - # ui_resize=False, - # with_footer=True, - # with_scrollbar=True, - # row_height=2, - # ), - - # ExampleDataTableBox( - # 500, - # columns = [DataTableColumn("row", width=7, value="{row}/{rows_total}")] + ExampleDataTable.columns, - # limit=25, - # index="uniqueid", - # sort_by = ("bar", True), - # sort_icons = False, - # query_sort=True, - # with_footer=True, - # with_scrollbar=True, - # cell_selection=True, - # padding=3, - # row_style = "grid" - # ), - # ExampleDataTableBox( - # 5000, - # limit=500, - # index="uniqueid", - # sort_by = ("foo", True), - # query_sort=True, - # with_scrollbar=True, - # with_header=False, - # with_footer=False, - # ), - - ] - - - grid_flow = urwid.GridFlow( - boxes, 60, 1, 1, "left" - ) - - def global_input(key): - if key in ('q', 'Q'): - raise urwid.ExitMainLoop() - else: - return False - - old_signal_keys = screen.tty_signal_keys() - l = list(old_signal_keys) - l[0] = 'undefined' - l[3] = 'undefined' - l[4] = 'undefined' - screen.tty_signal_keys(*l) - - grid_box = urwid.LineBox(grid_flow) - - table = ExampleDataTable( - 100, - columns = [ - DataTableColumn("bar", label="Bar", width=10, align="right", - format_fn = lambda v: round(v, 2) if v is not None else v, - decoration_fn = lambda v: ("cyan", v), - sort_reverse=True, sort_icon=False, padding=0),# margin=5), - DataTableColumn("baz", label="Baz!", - #width="pack", - width=("weight", 5), - pack=True, - min_width=5, - truncate=False), - DataTableColumn( - "qux", - label=urwid.Text([("red", "q"), ("green", "u"), ("blue", "x")]), - width=5, hide=True), - DataTableColumn("foo", label="Foo", align="right", - width=("weight", 1), - sort_key = lambda v: (v is None, v), - pack=True, - attr="color", padding=0, - footer_fn = lambda column, values: sum(v for v in values if v is not None) - ), - ], - limit=10, - index="uniqueid", - divider = DataTableDivider(".", width=3), - detail_fn=detail_fn, - detail_hanging_indent=1, - cell_selection=True, - sort_refocus = True, - with_scrollbar=True, - row_attr_fn = row_attr_fn, - ) - - main = urwid.MainLoop( - urwid.Pile([ - ("pack", grid_box), - ("weight", 1, table), - ("weight", 1, DataTable(columns=[DataTableColumn("a")], data={})), - ]), - palette = palette, - screen = screen, - unhandled_input=global_input - - ) - - try: - main.run() - finally: - screen.tty_signal_keys(*old_signal_keys) - -if __name__ == "__main__": - main() diff --git a/qbittorrentui/_vendored/_panwid/examples/datatable_simple.py b/qbittorrentui/_vendored/_panwid/examples/datatable_simple.py deleted file mode 100644 index d8c1d95..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/datatable_simple.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python3 - -import urwid -from panwid.datatable import * -from panwid.scroll import ScrollBar -from urwid_utils.palette import * - -def unhandled_input(key): - if key in ("q", "Q"): - raise urwid.ExitMainLoop() - -class ExampleScrollBar(ScrollBar): - - _thumb_char = ("light blue", "\u2588") - _trough_char = ("dark blue", "\u2591") - _thumb_indicator_top = ("white inverse", "\u234d") - _thumb_indicator_bottom = ("white inverse", "\u2354") - -def main(): - - data_table = DataTable( - columns = [ - DataTableColumn("num"), - DataTableColumn("char") - ], - data=[ - dict(num=i, char=chr((i%58)+65)) - for i in range(500) - ], - with_scrollbar=ExampleScrollBar - ) - - entries = DataTable.get_palette_entries() - entries["white inverse"] = PaletteEntry( - mono = "black", - foreground = "black", - background = "white" - ) - entries["light blue"] = PaletteEntry( - mono = "white", - foreground = "light blue", - background = "black" - ) - entries["dark blue"] = PaletteEntry( - mono = "white", - foreground = "dark blue", - background = "black" - ) - palette = Palette("default", **entries) - - loop = urwid.MainLoop( - urwid.Frame(data_table), - palette = palette, - unhandled_input=unhandled_input - ) - loop.run() - - -if __name__ == "__main__": - main() diff --git a/qbittorrentui/_vendored/_panwid/examples/datatable_simple_query.py b/qbittorrentui/_vendored/_panwid/examples/datatable_simple_query.py deleted file mode 100644 index 258d56b..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/datatable_simple_query.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python3 - -import urwid -from panwid.datatable import * - - -def unhandled_input(key): - if key in ("q", "Q"): - raise urwid.ExitMainLoop() - -class ExampleDataTable(DataTable): - - columns = [ - DataTableColumn("foo"), - DataTableColumn("bar") - ] - - def query(self, *args, **kwargs): - for i in range(20): - yield(dict(foo=i+1, bar=chr(97+i))) - -def main(): - - data_table = ExampleDataTable() - - loop = urwid.MainLoop( - urwid.Frame(data_table), - unhandled_input=unhandled_input - ) - loop.run() - - -if __name__ == "__main__": - main() diff --git a/qbittorrentui/_vendored/_panwid/examples/dialog.py b/qbittorrentui/_vendored/_panwid/examples/dialog.py deleted file mode 100644 index d37a950..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/dialog.py +++ /dev/null @@ -1,73 +0,0 @@ -import urwid -from panwid.dialog import * - -class QuitDialog(BaseDialog): - - signals = ["message"] - - prompt = "Test Popup" - - def __init__(self, *args, **kwargs): - - def test(n): - self._emit("message", n) - self.parent.close_popup() - - self.choices = { - '1': lambda: test(1), - '2': lambda: test(2), - '3': lambda: test(3), - } - super(QuitDialog, self).__init__(*args, **kwargs) - -class MainView(BaseView): - - def __init__(self): - - self.title = urwid.Text("Press 'o' to open popup.") - self.text = urwid.Text("") - self.pile = urwid.Pile([ - ('pack', self.title), - ('weight', 1, urwid.Filler(self.text)) - ]) - super(MainView, self).__init__(self.pile) - - def selectable(self): - return True - - def open_popup_dialog(self): - dialog = QuitDialog(self) - urwid.connect_signal(dialog, "message", self.on_message) - self.open_popup(dialog, width=20, height=10) - - def on_message(self, source, n): - self.text.set_text("You chose %d" %(n)) - - def keypress(self, size, key): - if key == "o": - self.open_popup_dialog() - - return super(MainView, self).keypress(size, key) - -def main(): - - main_view = MainView() - - def global_input(key): - if key in ["q", "Q"]: - raise urwid.ExitMainLoop() - return - - screen = urwid.raw_display.Screen() - screen.set_terminal_properties(16) - - loop = urwid.MainLoop( - main_view, - screen=screen, - pop_ups=True, - unhandled_input=global_input - ) - loop.run() - -if __name__ == "__main__": - main() diff --git a/qbittorrentui/_vendored/_panwid/examples/dropdown.py b/qbittorrentui/_vendored/_panwid/examples/dropdown.py deleted file mode 100644 index 0877faa..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/dropdown.py +++ /dev/null @@ -1,179 +0,0 @@ -import logging -logger = logging.getLogger() -import os - -import urwid -import urwid.raw_display -from urwid_utils.palette import * -from orderedattrdict import AttrDict - -import panwid.keymap - -panwid.keymap.KEYMAP_GLOBAL = { - "movement": { - "up": "up", - "down": "down", - }, - "dropdown": { - "k": "up", - "j": "down", - "page up": "page up", - "page down": "page down", - "ctrl up": ("cycle", [1]), - "ctrl down": ("cycle", [-1]), - "home": "home", - "end": "end", - "/": "complete prefix", - "?": "complete substring", - "ctrl p": "complete_prev", - "ctrl n": "complete_next", - }, - "auto_complete_edit": { - "enter": "confirm", - "esc": "cancel", - "/": "complete prefix", - "?": "complete substring", - "ctrl p": "complete_prev", - "ctrl n": "complete_next", - } -} - - -from panwid.dropdown import * -from panwid.listbox import * -from panwid.keymap import * - -class TestDropdown(KeymapMovementMixin, Dropdown): - pass - -def main(): - - data = AttrDict([('Adipisci eius dolore consectetur.', 34), - ('Aliquam consectetur velit dolore', 19), - ('Amet ipsum quaerat numquam.', 25), - ('Amet quisquam labore dolore.', 30), - ('Amet velit consectetur.', 20), - ('Consectetur consectetur aliquam voluptatem', 23), - ('Consectetur ipsum aliquam.', 28), - ('Consectetur sit neque est', 15), - ('Dolore voluptatem etincidunt sit', 40), - ('Dolorem porro tempora tempora.', 37), - ('Eius numquam dolor ipsum', 26), - ('Eius tempora etincidunt est', 12), - ('Est adipisci numquam adipisci', 7), - ('Est aliquam dolor.', 38), - ('Etincidunt amet quisquam.', 33), - ('Etincidunt consectetur velit.', 29), - ('Etincidunt dolore eius.', 45), - ('Etincidunt non amet.', 14), - ('Etincidunt velit adipisci labore', 6), - ('Ipsum magnam velit quiquia', 21), - ('Ipsum modi eius.', 3), - ('Labore voluptatem quiquia aliquam', 18), - ('Magnam etincidunt porro magnam', 39), - ('Magnam numquam amet.', 44), - ('Magnam quisquam sit amet.', 27), - ('Magnam voluptatem ipsum neque', 32), - ('Modi est ipsum adipisci', 2), - ('Neque eius voluptatem voluptatem', 42), - ('Neque quisquam ipsum.', 10), - ('Neque quisquam neque.', 48), - ('Non dolore voluptatem.', 41), - ('Non numquam consectetur voluptatem.', 35), - ('Numquam eius dolorem.', 43), - ('Numquam sed neque modi', 9), - ('Porro voluptatem quaerat voluptatem', 11), - ('Quaerat eius quiquia.', 17), - ('Quiquia aliquam etincidunt consectetur.', 0), - ('Quiquia ipsum sit.', 49), - ('Quiquia non dolore quiquia', 8), - ('Quisquam aliquam numquam dolore.', 1), - ('Quisquam dolorem voluptatem adipisci.', 22), - ('Sed magnam dolorem quisquam', 4), - ('Sed tempora modi est.', 16), - ('Sit aliquam dolorem.', 46), - ('Sit modi dolor.', 31), - ('Sit quiquia quiquia non.', 5), - ('Sit quisquam numquam quaerat.', 36), - ('Tempora etincidunt quiquia dolor', 13), - ('Tempora velit etincidunt.', 24), - ('Velit dolor velit.', 47)]) - - NORMAL_FG = 'light gray' - NORMAL_BG = 'black' - - if os.environ.get("DEBUG"): - logger.setLevel(logging.DEBUG) - formatter = logging.Formatter( - "%(asctime)s [%(module)16s:%(lineno)-4d] [%(levelname)8s] %(message)s", - datefmt='%Y-%m-%d %H:%M:%S' - ) - fh = logging.FileHandler("dropdown.log") - fh.setFormatter(formatter) - logger.addHandler(fh) - else: - logger.addHandler(logging.NullHandler()) - - entries = Dropdown.get_palette_entries() - entries.update(ScrollingListBox.get_palette_entries()) - palette = Palette("default", **entries) - screen = urwid.raw_display.Screen() - screen.set_terminal_properties(256) - - boxes = [ - TestDropdown( - data, - label="Foo", - border = True, - scrollbar = True, - right_chars_top = u" \N{BLACK DOWN-POINTING TRIANGLE}", - auto_complete = True, - ), - - TestDropdown( - data, - border = False, - margin = 2, - left_chars = u"\N{LIGHT LEFT TORTOISE SHELL BRACKET ORNAMENT}", - right_chars = u"\N{LIGHT RIGHT TORTOISE SHELL BRACKET ORNAMENT}", - auto_complete = True - ), - TestDropdown( - data, - default = list(data.values())[10], - label="Foo", - border = True, - scrollbar = False, - auto_complete = False, - ), - TestDropdown( - [], - ), - ] - - grid = urwid.GridFlow( - [ urwid.Padding(b) for b in boxes], - 60, 1, 1, "left" - ) - - main = urwid.Frame(urwid.Filler(grid)) - - def global_input(key): - if key in ('q', 'Q'): - raise urwid.ExitMainLoop() - else: - return False - - - loop = urwid.MainLoop(main, - palette, - screen=screen, - unhandled_input=global_input, - pop_ups=True - ) - loop.run() - -if __name__ == "__main__": - main() - -__all__ = ["Dropdown"] diff --git a/qbittorrentui/_vendored/_panwid/examples/progressbar.py b/qbittorrentui/_vendored/_panwid/examples/progressbar.py deleted file mode 100644 index dc7586f..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/progressbar.py +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/env python3 - -import urwid -from urwid_utils.palette import * -import random -from itertools import chain, repeat, islice - -from panwid.sparkwidgets import * -from panwid.progressbar import * - -screen = urwid.raw_display.Screen() -screen.set_terminal_properties(1<<24) - -LABEL_COLOR_DARK = "black" -LABEL_COLOR_LIGHT = "white" - -entries = {} - - -all_colors = [ urwid.display_common._color_desc_256(x) - for x in range(32,224) ] -random_colors = [ random.choice(all_colors) for i in range(16) ] - -label_colors = [ LABEL_COLOR_DARK, LABEL_COLOR_LIGHT ] - -entries.update( - get_palette_entries( - label_colors = label_colors - ) -) - -entries.update( - get_palette_entries( - chart_colors = random_colors, - label_colors = label_colors - ) -) - - -for fcolor in random_colors + label_colors: - - entries.update({ - fcolor: PaletteEntry( - mono = "white", - foreground = (fcolor - if fcolor in urwid.display_common._BASIC_COLORS - else "white"), - background = "black", - foreground_high = fcolor, - background_high = "black" - ), - }) - - for bcolor in random_colors: - - entries.update({ - "%s:%s" %(fcolor, bcolor): PaletteEntry( - mono = "white", - foreground = (fcolor - if fcolor in urwid.display_common._BASIC_COLORS - else "white"), - background = (bcolor - if bcolor in urwid.display_common._BASIC_COLORS - else "black"), - foreground_high = fcolor, - background_high = bcolor - ), - }) - -palette = Palette("default", **entries) - -progress = None - -progress_text = urwid.Filler(urwid.Text("")) -progress_ph = urwid.WidgetPlaceholder(urwid.Text("")) - -def intersperse(delimiter, seq): - return islice(chain.from_iterable(zip(repeat(delimiter), seq)), 1, None) - -def get_random_progress(): - - return ProgressBar( - width=random.randint(10, 100), - maximum=random.randint(200, 300), - value=random.randint(0, 100), - # maximum=90, - # value=0, - progress_color="light red", - remaining_color="light green" - ) - -def randomize_progress(): - global progress - progress = get_random_progress() - filler = urwid.Filler(progress) - # values = list(intersperse(",", [(i.value, "%s" %(i.value)) for i in progress.items])) - progress_text.original_widget.set_text(f"{progress.value}, {progress.maximum}") - progress_ph.original_widget = filler - -def cycle_progress(step): - global progress - # values = list(intersperse(",", [(i.value, "%s" %(i.value)) for i in progress.items])) - value = max(min(progress.value + step, progress.maximum), 0) - progress.set_value(value) - progress_text.original_widget.set_text(f"{progress.value}, {progress.maximum}") - - -def main(): - - pile = urwid.Pile([ - (2, progress_text), - (2, progress_ph), - ]) - - randomize_progress() - - def keypress(key): - - if key == "q": - raise urwid.ExitMainLoop() - elif key == " ": - randomize_progress() - elif key == "left": - cycle_progress(-1) - elif key == "right": - cycle_progress(1) - elif key == "down": - cycle_progress(-10) - elif key == "up": - cycle_progress(10) - else: - return key - - - loop = urwid.MainLoop( - pile, - palette=palette, - screen=screen, - unhandled_input=keypress - ) - - loop.run() - -if __name__ == "__main__": - main() diff --git a/qbittorrentui/_vendored/_panwid/examples/sparkwidgets.py b/qbittorrentui/_vendored/_panwid/examples/sparkwidgets.py deleted file mode 100644 index b3aa810..0000000 --- a/qbittorrentui/_vendored/_panwid/examples/sparkwidgets.py +++ /dev/null @@ -1,226 +0,0 @@ -#!/usr/bin/python - -import urwid -from urwid_utils.palette import * -import random -from itertools import chain, repeat, islice -from panwid.sparkwidgets import * - - -screen = urwid.raw_display.Screen() -screen.set_terminal_properties(1<<24) - -LABEL_COLOR_DARK = "black" -LABEL_COLOR_LIGHT = "white" - -entries = {} - -all_colors = [ urwid.display_common._color_desc_256(x) - for x in range(32,224) ] -random_colors = [ random.choice(all_colors) for i in range(1,15) ] - -label_colors = [ LABEL_COLOR_DARK, LABEL_COLOR_LIGHT ] - -entries.update( - get_palette_entries( - label_colors = label_colors - ) -) - -entries.update( - get_palette_entries( - chart_colors = random_colors, - label_colors = label_colors - ) -) - - -for fcolor in random_colors + label_colors: - - entries.update({ - fcolor: PaletteEntry( - mono = "white", - foreground = (fcolor - if fcolor in urwid.display_common._BASIC_COLORS - else "white"), - background = "black", - foreground_high = fcolor, - background_high = "black" - ), - }) - - for bcolor in random_colors: - - entries.update({ - "%s:%s" %(fcolor, bcolor): PaletteEntry( - mono = "white", - foreground = (fcolor - if fcolor in urwid.display_common._BASIC_COLORS - else "white"), - background = (bcolor - if bcolor in urwid.display_common._BASIC_COLORS - else "black"), - foreground_high = fcolor, - background_high = bcolor - ), - }) - - -def intersperse(delimiter, seq): - return islice(chain.from_iterable(zip(repeat(delimiter), seq)), 1, None) - - -# raise Exception(entries) -palette = Palette("default", **entries) - -spark1 = urwid.Filler(SparkColumnWidget(list(range(0, random.randint(1, 20))))) -spark2 = urwid.Filler(SparkColumnWidget(list(range(0, 100)), color_scheme="rotate_16", scale_min=20, scale_max=90)) -spark3 = urwid.Filler(SparkColumnWidget([5*random.random() for i in range(0, 100)], color_scheme="rotate_true")) -spark4 = urwid.Filler(SparkColumnWidget(list(range(-5, 100)), color_scheme="signed", underline="negative")) -custom_scheme ={ "mode": "rotate", "colors": ["dark cyan", "brown", "dark magenta"]} -spark5 = urwid.Filler(SparkColumnWidget(list(range(1, 20)), color_scheme=custom_scheme)) - -spark_random_text = urwid.Filler(urwid.Text("")) -spark_random_ph = urwid.WidgetPlaceholder(urwid.Text("")) - - - -bark1 = urwid.Filler(SparkBarWidget([30, 30, 30], random.randint(10, 40), color_scheme="rotate_16")) -bark2 = urwid.Filler(SparkBarWidget([40, 30, 20, 10], random.randint(10, 60), color_scheme="rotate_true")) -bark3 = urwid.Filler(SparkBarWidget([0, 0, 0], random.randint(1, 10), color_scheme="rotate_true")) -bark4 = urwid.Filler(SparkBarWidget([19, 42, 17], random.randint(1, 5), color_scheme="rotate_true")) -bark5 = urwid.Filler(SparkBarWidget([ - SparkBarItem(19, bcolor="light red", label="\u2588"*2, fcolor="yellow"), - SparkBarItem(42, bcolor="light green", label="bar", align="^"), - SparkBarItem(17, bcolor="light blue", label="baz", align=">") -], random.randint(1, 60), fit_label=True)) -bark6 = urwid.Filler(SparkBarWidget( - [ - SparkBarItem(0, bcolor="light green", label=0, fcolor="dark red"), - SparkBarItem(6, bcolor="light blue",label=6, fcolor="dark red", align=">") - ], - random.randint(10, 30), color_scheme="rotate_256", min_width=5)) -bark6=urwid.Filler(SparkBarWidget( - [SparkBarItem(value=1, label=' 1', fcolor='black', bcolor='dark green', align='<'), - SparkBarItem(value=13, label='☼ 14', fcolor='black', bcolor='dark blue', align='>'), - SparkBarItem(value=0, label='✓ 0', fcolor='black', bcolor='light blue', align='>'), - SparkBarItem(value=50, label='↓ 50', fcolor='black', bcolor='dark red', align='>'), - SparkBarItem(value=2802, label='🌐2852', fcolor='black', bcolor='dark gray', align='>') - ], width=130, fit_label=True)) -# raise Exception -bark_random_text = urwid.Filler(urwid.Text("")) -bark_random_ph = urwid.WidgetPlaceholder(urwid.Text("")) - - -progress_random_text = urwid.Filler(urwid.Text("")) -progress_random_ph = urwid.WidgetPlaceholder(urwid.Text("")) - - -def get_label_color(color, - dark=DEFAULT_LABEL_COLOR_DARK, - light=DEFAULT_LABEL_COLOR_LIGHT): - # http://jsfiddle.net/cu4z27m7/66/ - (r, g, b) = urwid.AttrSpec(color, color).get_rgb_values()[:3] - colors = [r / 255, g / 255, b / 255] - c = [ (c / 12.92) - if c < 0.03928 - else ((c + 0.055) / 1.055)**2.4 - for c in colors ] - - L = 0.2126 * c[0] + 0.7152 * c[1] + 0.0722 * c[2] - return dark if L > 0.179 else light - - -def get_random_spark(): - return SparkColumnWidget([ - (random_colors[i%len(random_colors)], - random.randint(1, 100), - ) - for i in range(random.randint(2, 32)) - ], underline="min", overline="max") - -def get_random_bark(): - num = random.randint(1, 10) - bcolors = [random_colors[i%len(random_colors)] for i in range(num)] - lcolors = [ - get_label_color(bcolor) - for bcolor in bcolors - ] - # raise Exception(lcolors) - # r, g, b = a.get_rgb_values()[:3] - # lcolor = get_label_color(r, g, b) - randos = [random.randint(50,150) for i in range(0, num)] - return SparkBarWidget([ - SparkBarItem( - randos[i], - bcolor=bcolors[i], - label=("%s {value} ({pct}%%)" %(chr(65+i if i < 26 else 71 + i))), - fcolor=lcolors[i] - ) - for i in range(0, num) - ], fit_label=True, width=random.randint(10, 80), label_color="black", normalize=(1, 100), - min_width=random.randint(0, 5)) - -def randomize_spark(): - spark = get_random_spark() - filler = urwid.Filler(spark) - values = list(intersperse(",", [(i[0], "%s" %(i[1])) for i in spark.items])) - spark_random_text.original_widget.set_text(values) - spark_random_ph.original_widget = filler - -def randomize_bark(): - bark = get_random_bark() - filler = urwid.Filler(bark) - values = list(intersperse(",", [(i.value, "%s" %(i.value)) for i in bark.items])) - bark_random_text.original_widget.set_text(values) - bark_random_ph.original_widget = filler - -def main(): - - pile = urwid.Pile([ - (2, spark1), - (2, spark2), - (2, spark3), - (2, spark4), - (2, spark5), - (2, spark_random_text), - (2, spark_random_ph), - (2, bark1), - (2, bark2), - (2, bark3), - (2, bark4), - (2, bark5), - (2, bark6), - (2, bark_random_text), - (2, bark_random_ph) - ]) - - randomize_bark() - randomize_spark() - - def keypress(key): - - if key == "b": - randomize_bark() - elif key == "s": - randomize_spark() - elif key == " ": - randomize_bark() - randomize_spark() - elif key == "q": - raise urwid.ExitMainLoop() - else: - return key - - - loop = urwid.MainLoop( - pile, - palette = palette, - screen = screen, - unhandled_input = keypress - ) - - loop.run() - -if __name__ == "__main__": - main() diff --git a/qbittorrentui/_vendored/_panwid/setup.cfg b/qbittorrentui/_vendored/_panwid/setup.cfg deleted file mode 100644 index 3c6e79c..0000000 --- a/qbittorrentui/_vendored/_panwid/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/qbittorrentui/_vendored/_panwid/setup.py b/qbittorrentui/_vendored/_panwid/setup.py deleted file mode 100644 index b33c32e..0000000 --- a/qbittorrentui/_vendored/_panwid/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from setuptools import setup, find_packages -import sys -from os import path -from glob import glob - -name = 'panwid' -setup(name=name, - version='0.3.3.dev3', - description='Useful widgets for urwid', - author='Tony Cebzanov', - author_email='tonycpsu@gmail.com', - url='https://github.com/tonycpsu/panwid', - python_requires='>=3.6', - classifiers=[ - 'Environment :: Console', - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', - 'Intended Audience :: Developers' - ], - packages=find_packages(), - data_files=[('share/doc/%s' % name, ['LICENSE','README.md']), - ], - install_requires = [ - "urwid", - "urwid-utils>=0.1.2", - "six", - "raccoon>=3.0.0", - "orderedattrdict" - ], - test_suite="test", - # dependency_links=[ - # "https://github.com/tonycpsu/urwid_utils/tarball/master#egg=urwid_utils-0.0.5dev" - # ], - ) diff --git a/qbittorrentui/_vendored/_panwid/test/__init__.py b/qbittorrentui/_vendored/_panwid/test/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/qbittorrentui/_vendored/_panwid/test/test_datatable.py b/qbittorrentui/_vendored/_panwid/test/test_datatable.py deleted file mode 100644 index f2d7c4d..0000000 --- a/qbittorrentui/_vendored/_panwid/test/test_datatable.py +++ /dev/null @@ -1,45 +0,0 @@ -import unittest - -from panwid.datatable import * -from orderedattrdict import AttrDict - -class TestDataTableWithIndex(unittest.TestCase): - - def setUp(self): - - self.data = [ - dict(a=1, b=2.345, c="foo"), - dict(a=2, b=4.817, c="bar"), - dict(a=3, b=-3.19, c="baz") - ] - self.columns = [ - DataTableColumn("a"), - DataTableColumn("b"), - DataTableColumn("c") - ] - - def test_create(self): - - dt = DataTable(self.columns, data=self.data, index="a") - dt.refresh() - self.assertEqual(len(dt), 3) - - def test_create_without_index(self): - - dt = DataTable(self.columns, data=self.data) - dt.refresh() - self.assertEqual(len(dt), 3) - - def test_add_row_with_index(self): - - dt = DataTable(self.columns, data=self.data, index="a") - dt.refresh() - dt.add_row(dict(a=4, b=7.142, c="qux")) - self.assertEqual(len(dt), 4) - - def test_add_row_without_index(self): - - dt = DataTable(self.columns, data=self.data) - dt.refresh() - dt.add_row(dict(a=4, b=7.142, c="qux")) - self.assertEqual(len(dt), 4) diff --git a/qbittorrentui/_vendored/_panwid/test/test_dropdown.py b/qbittorrentui/_vendored/_panwid/test/test_dropdown.py deleted file mode 100644 index c15d238..0000000 --- a/qbittorrentui/_vendored/_panwid/test/test_dropdown.py +++ /dev/null @@ -1,70 +0,0 @@ -import unittest - -from panwid.dropdown import * -from orderedattrdict import AttrDict - -class TestDropdown(unittest.TestCase): - - def setUp(self): - - self.data = AttrDict([('Adipisci eius dolore consectetur.', 34), - ('Aliquam consectetur velit dolore', 19), - ('Amet ipsum quaerat numquam.', 25), - ('Amet quisquam labore dolore.', 30), - ('Amet velit consectetur.', 20), - ('Consectetur consectetur aliquam voluptatem', 23), - ('Consectetur ipsum aliquam.', 28), - ('Consectetur sit neque est', 15), - ('Dolore voluptatem etincidunt sit', 40), - ('Dolorem porro tempora tempora.', 37), - ('Eius numquam dolor ipsum', 26), - ('Eius tempora etincidunt est', 12), - ('Est adipisci numquam adipisci', 7), - ('Est aliquam dolor.', 38), - ('Etincidunt amet quisquam.', 33), - ('Etincidunt consectetur velit.', 29), - ('Etincidunt dolore eius.', 45), - ('Etincidunt non amet.', 14), - ('Etincidunt velit adipisci labore', 6), - ('Ipsum magnam velit quiquia', 21), - ('Ipsum modi eius.', 3), - ('Labore voluptatem quiquia aliquam', 18), - ('Magnam etincidunt porro magnam', 39), - ('Magnam numquam amet.', 44), - ('Magnam quisquam sit amet.', 27), - ('Magnam voluptatem ipsum neque', 32), - ('Modi est ipsum adipisci', 2), - ('Neque eius voluptatem voluptatem', 42), - ('Neque quisquam ipsum.', 10), - ('Neque quisquam neque.', 48), - ('Non dolore voluptatem.', 41), - ('Non numquam consectetur voluptatem.', 35), - ('Numquam eius dolorem.', 43), - ('Numquam sed neque modi', 9), - ('Porro voluptatem quaerat voluptatem', 11), - ('Quaerat eius quiquia.', 17), - ('Quiquia aliquam etincidunt consectetur.', 0), - ('Quiquia ipsum sit.', 49), - ('Quiquia non dolore quiquia', 8), - ('Quisquam aliquam numquam dolore.', 1), - ('Quisquam dolorem voluptatem adipisci.', 22), - ('Sed magnam dolorem quisquam', 4), - ('Sed tempora modi est.', 16), - ('Sit aliquam dolorem.', 46), - ('Sit modi dolor.', 31), - ('Sit quiquia quiquia non.', 5), - ('Sit quisquam numquam quaerat.', 36), - ('Tempora etincidunt quiquia dolor', 13), - ('Tempora velit etincidunt.', 24), - ('Velit dolor velit.', 47)]) - - def test_create(self): - dropdown = Dropdown(self.data) - - def test_default_label(self): - dropdown = Dropdown(self.data, default=3) - self.assertEqual(dropdown.selected_label, "Ipsum modi eius.") - - def test_default_value(self): - dropdown = Dropdown(self.data, default=37) - self.assertEqual(dropdown.selected_value, 37) diff --git a/qbittorrentui/_vendored/_attrdict.py b/qbittorrentui/_vendored/attrdict.py similarity index 100% rename from qbittorrentui/_vendored/_attrdict.py rename to qbittorrentui/_vendored/attrdict.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/__init__.py b/qbittorrentui/_vendored/panwid/__init__.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/__init__.py rename to qbittorrentui/_vendored/panwid/__init__.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/autocomplete.py b/qbittorrentui/_vendored/panwid/autocomplete.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/autocomplete.py rename to qbittorrentui/_vendored/panwid/autocomplete.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/__init__.py b/qbittorrentui/_vendored/panwid/datatable/__init__.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/__init__.py rename to qbittorrentui/_vendored/panwid/datatable/__init__.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/cells.py b/qbittorrentui/_vendored/panwid/datatable/cells.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/cells.py rename to qbittorrentui/_vendored/panwid/datatable/cells.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/columns.py b/qbittorrentui/_vendored/panwid/datatable/columns.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/columns.py rename to qbittorrentui/_vendored/panwid/datatable/columns.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/common.py b/qbittorrentui/_vendored/panwid/datatable/common.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/common.py rename to qbittorrentui/_vendored/panwid/datatable/common.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/dataframe.py b/qbittorrentui/_vendored/panwid/datatable/dataframe.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/dataframe.py rename to qbittorrentui/_vendored/panwid/datatable/dataframe.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/datatable.py b/qbittorrentui/_vendored/panwid/datatable/datatable.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/datatable.py rename to qbittorrentui/_vendored/panwid/datatable/datatable.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/datatable/rows.py b/qbittorrentui/_vendored/panwid/datatable/rows.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/datatable/rows.py rename to qbittorrentui/_vendored/panwid/datatable/rows.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/dialog/__init__.py b/qbittorrentui/_vendored/panwid/dialog/__init__.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/dialog/__init__.py rename to qbittorrentui/_vendored/panwid/dialog/__init__.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/dropdown.py b/qbittorrentui/_vendored/panwid/dropdown.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/dropdown.py rename to qbittorrentui/_vendored/panwid/dropdown.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/highlightable.py b/qbittorrentui/_vendored/panwid/highlightable.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/highlightable.py rename to qbittorrentui/_vendored/panwid/highlightable.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/keymap.py b/qbittorrentui/_vendored/panwid/keymap.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/keymap.py rename to qbittorrentui/_vendored/panwid/keymap.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/listbox.py b/qbittorrentui/_vendored/panwid/listbox.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/listbox.py rename to qbittorrentui/_vendored/panwid/listbox.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/progressbar.py b/qbittorrentui/_vendored/panwid/progressbar.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/progressbar.py rename to qbittorrentui/_vendored/panwid/progressbar.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/scroll.py b/qbittorrentui/_vendored/panwid/scroll.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/scroll.py rename to qbittorrentui/_vendored/panwid/scroll.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/sparkwidgets.py b/qbittorrentui/_vendored/panwid/sparkwidgets.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/sparkwidgets.py rename to qbittorrentui/_vendored/panwid/sparkwidgets.py diff --git a/qbittorrentui/_vendored/_panwid/panwid/tabview.py b/qbittorrentui/_vendored/panwid/tabview.py similarity index 100% rename from qbittorrentui/_vendored/_panwid/panwid/tabview.py rename to qbittorrentui/_vendored/panwid/tabview.py diff --git a/qbittorrentui/daemon.py b/qbittorrentui/daemon.py index 16da448..add4ad7 100644 --- a/qbittorrentui/daemon.py +++ b/qbittorrentui/daemon.py @@ -5,7 +5,7 @@ from time import time from copy import deepcopy -from qbittorrentui._vendored._attrdict import AttrDict +from qbittorrentui._vendored.attrdict import AttrDict from qbittorrentui.debug import log_timing from qbittorrentui.config import config from qbittorrentui.connector import Connector diff --git a/qbittorrentui/windows/torrent.py b/qbittorrentui/windows/torrent.py index 9015567..97065da 100644 --- a/qbittorrentui/windows/torrent.py +++ b/qbittorrentui/windows/torrent.py @@ -6,7 +6,7 @@ import os -from qbittorrentui._vendored._attrdict import AttrDict +from qbittorrentui._vendored.attrdict import AttrDict from qbittorrentui.debug import log_keypress from qbittorrentui.debug import log_timing from qbittorrentui.config import config diff --git a/qbittorrentui/windows/torrent_list.py b/qbittorrentui/windows/torrent_list.py index 3faf30c..ce8bf87 100644 --- a/qbittorrentui/windows/torrent_list.py +++ b/qbittorrentui/windows/torrent_list.py @@ -2,8 +2,8 @@ import logging from time import time -from qbittorrentui._vendored._attrdict import AttrDict -from qbittorrentui._vendored._panwid import panwid +from qbittorrentui._vendored.attrdict import AttrDict +from qbittorrentui._vendored import panwid from qbittorrentui.windows.torrent import TorrentWindow from qbittorrentui.debug import log_keypress from qbittorrentui.debug import log_timing diff --git a/setup.py b/setup.py index 757dd45..af86d39 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='qbittorrentui', - version='0.2.2', + version='0.2.3', packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), package_data={'': ['default.ini']}, include_package_data=True,