pax_global_header00006660000000000000000000000064134352401500014507gustar00rootroot0000000000000052 comment=f609f4074fda52dfee4a8de72f332565ae92c8a3 pragha-1.3.4/000077500000000000000000000000001343524015000127565ustar00rootroot00000000000000pragha-1.3.4/.gitignore000066400000000000000000000002521343524015000147450ustar00rootroot00000000000000compile config.* configure INSTALL *.cache *.m4 /depcomp /install-sh /libtool /Makefile /Makefile.in /missing /mkinstalldirs /ltmain.sh /stamp-h1 *.tar.bz2 *.in *Makefilepragha-1.3.4/AUTHORS000066400000000000000000000000001343524015000140140ustar00rootroot00000000000000pragha-1.3.4/COPYING000066400000000000000000001052051343524015000140140ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, 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 them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If 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 convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state 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 program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . License: This program is released under the GPL v2 with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. You may provide binary packages linked to the OpenSSL libraries, provided that all other requirements of the GPL are met. See file COPYING for details. pragha-1.3.4/ChangeLog000066400000000000000000000651241343524015000145400ustar00rootroot000000000000002010-05-12 16:12 mati86dl@gmail.com * src/menu.c: Add files when double-clicking or pressing enter in filechooser. 2010-05-12 15:52 mati86dl@gmail.com * src/librarytree.c: Unsensitive library tree when updating. 2010-05-07 20:36 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/sv.po, po/uk.po: Update po files. It is the Prerealese1 of Pragha 0.7.5 2010-05-07 16:30 mati86dl@gmail.com * src/librarytree.c: Add confirmation dialog. to "Delete from..", menu entries. 2010-05-07 15:24 mati86dl@gmail.com * src/gui.c, src/pref.c: Use GTK_STOCK_LEAVE_FULLSCREEN button adding text and translations. Capitalise "When Pragha start" label. 2010-05-05 22:11 mati86dl@gmail.com * src/gui.c, src/init.c: Fix Issue 10. Several critical warning when first init. Use software_mixer and minimize to systray by default. 2010-05-05 17:01 mati86dl@gmail.com * po/cs.po, po/pragha.pot, src/init.c: Update Czeec translation thanks to Alois. Capitalise and translate window title. 2010-04-28 16:25 mati86dl@gmail.com * src/tags.c: Leave the checkbox automatically when change a tag. Adds an icon to clear the tags entry. 2010-04-23 19:59 mati86dl@gmail.com * configure.ac, po/sv.po, src/librarytree.c: 0.7.5svn Add initial Swedish language. Thanks to Zwopper. Expand all row in library tree when double click. 2010-04-23 00:40 mati86dl@gmail.com * NEWS, configure.ac, data/pragha.1: Pragha 0.7.4 released. 2010-04-23 00:39 mati86dl@gmail.com * FAQ, po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/pragha.h, src/statusicon.c: Now works notification actions. Fixes a memory leak. Update po files. 2010-04-22 23:00 mati86dl@gmail.com * configure.ac, src/statusicon.c: Use AM_SILENT_RULES if available. Hide sidebar when restore mainwindow and originally it no showed. 2010-04-22 22:36 mati86dl@gmail.com * src/pragha.h, src/statusicon.c, src/tags.c: New Layout of edit track dialog. Fix memory leak. Remobe unused glib header. 2010-04-09 13:12 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/audio.c, src/cdda.h, src/cmdline.c, src/current_playlist.c, src/db.c, src/dbus.c, src/filetree.c, src/flac.h, src/gui.c, src/init.c, src/lastfm.c, src/librarytree.c, src/menu.c, src/mod.h, src/mp3.h, src/musicobject.c, src/oggvorbis.h, src/panel.c, src/playback_cdda.c, src/playback_flac.c, src/playback_modplug.c, src/playback_mp3.c, src/playback_oggvorbis.c, src/playback_wav.c, src/playlist.c, src/pragha.c, src/pragha.h, src/pref.c, src/statusicon.c, src/tags.c, src/threads.c, src/utils.c, src/wav.h: Old years in Copyrighs and the About dialog. Update po files. 2010-04-08 15:45 mati86dl@gmail.com * src/current_playlist.c, src/statusicon.c: Hide album art when restore mainwindow if set to no show. No show leave fullscreen button when restore mainwindow in normal state. Now work queue list when sequential playlist. Try add next action to notifications. (In the previous commits) 2010-04-08 00:01 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/init.c, src/menu.c, src/panel.c, src/pragha.c, src/pragha.h, src/pref.c, src/statusicon.c: Add option to start pragha minimized, fullscreen, or remember the last window state. Add button in panel to leave fullscreen. Add next track action to notification. 2010-03-31 15:27 mati86dl@gmail.com * configure.ac, src/menu.c: Improved time library indexing, and 0.7.4svn 2010-03-12 14:16 mati86dl@gmail.com * NEWS, configure.ac, po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po: Pragha 0.7.3 released. 2010-03-11 22:23 mati86dl@gmail.com * src/current_playlist.c, src/tags.c: OK/Cancel buttons in Edit Tags and Save Playlist dialog are inverted. 2010-03-11 21:43 mati86dl@gmail.com * src/gui.c: D'Oh!. 2010-03-11 15:58 mati86dl@gmail.com * src/gui.c, src/librarytree.c, src/playlist.c, src/pragha.h: Middle click on the library/playlists view append songs to current playlist. Inspired in http://bugs.kde.org/show_bug.cgi?id=197423 2010-03-11 13:49 mati86dl@gmail.com * src/gui.c: D'Oh!. Restore track.png pixbuf in libraytree. 2010-03-11 00:39 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/menu.c: Add option to add folders recursively or not in file chooser. Update po files. 2010-03-11 00:09 mati86dl@gmail.com * src/current_playlist.c, src/filetree.c, src/gui.c, src/init.c, src/menu.c, src/panel.c, src/playlist.c, src/pragha.c, src/pragha.h, src/pref.c, src/utils.c: Drop File Pane. 2010-02-26 15:20 mati86dl@gmail.com * src/current_playlist.c: Queue and dequeue pressing 'Q'. 2010-02-25 21:45 mati86dl@gmail.com * Makefile.am, configure.ac, data/album.png, src/gui.c: Drop album.png in favor of the icon theme instaled. And 0.7.3svn 2010-02-25 16:54 mati86dl@gmail.com * src/current_playlist.c, src/statusicon.c: If pragha minimized or without focus, when clicked statusicon restore mainwindow 2010-02-25 00:01 mati86dl@gmail.com * src/menu.c: Adds support for adding folders recursively in file chooser. Now remember last folder used. Based on Audacius code. /src/ui_fileopen.c 2010-02-24 00:40 mati86dl@gmail.com * src/init.c: Use g_get_user_config_dir() instead of g_get_home_dir() and then concatenating "/.config". 2010-02-24 00:32 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/menu.c: Adds support for recent files in file chooser. Update po files. 2010-02-20 14:44 mati86dl@gmail.com * NEWS, configure.ac, data/pragha.1, src/statusicon.c: Pragha 0.7.2 released. Notifications, more consistent at the systray tooltips. 2010-02-19 23:49 mati86dl@gmail.com * Makefile.am, data/pragha.desktop, src/Makefile.am, src/current_playlist.c, src/gui.c, src/init.c, src/panel.c: Restore AudioVideo categorie to desktop file. Use shared files XDG compliant. Thanks to Christoph. Now reset the previous songs when adds a song to queue list. 2009-12-21 13:08 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/filetree.c, src/gui.c, src/init.c, src/menu.c, src/pragha.h, src/pref.c: Remove 'Show Hidden Files in File View' preferences option, and add 'show hidden files' menu item, to popup menu of file pane. Update po files. 2009-12-21 00:39 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/statusicon.c: D'Oh!. Fix my BAD English. And update Portuguese translation thanks to Lyceuhns. 2009-12-20 13:01 mati86dl@gmail.com * configure.ac, po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/gui.c, src/statusicon.c: Add tooltips to shuffle and repeat button. Notifications were made more consistent at the systray tooltips. Update po lifes. 2009-12-20 12:00 mati86dl@gmail.com * data/pragha.desktop: Desktop file updates. Thanks to Christoph. 2009-12-19 20:57 mati86dl@gmail.com * src/gui.c: Use Control+space to play and pause. 2009-12-19 20:44 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po: Update po files 2009-12-19 20:43 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/init.c, src/menu.c, src/panel.c, src/pragha.h, src/pref.c, src/statusicon.c: Add 'Current play time' in the systray tooltip. Restore 'Shuffle' and 'Repeat' options in the panel. Move 'Add the library' menu item to 'Tools' menu. Move 'Connect to CDDB server' option to 'General' tab. 2009-10-30 15:14 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/pragha.h: Add romove track to queue List. Queue and enqueue mutiple tracks. Fixs GDK_Delete no work in search entry. 2009-10-30 00:07 mati86dl@gmail.com * src/current_playlist.c, src/panel.c: Fix reactivate colums. Fix Crash when play and no selected song. 2009-10-29 22:57 mati86dl@gmail.com * configure.ac, src/Makefile.am, src/current_playlist.c, src/gtkcellrendererbubble.c, src/gtkcellrendererbubble.h, src/gui.c, src/init.c, src/panel.c, src/pragha.h: Basic Queue List!-) 2009-10-28 12:35 mati86dl@gmail.com * NEWS, configure.ac, po/fr.po: Pragha 0.7.1.1 released. Update french translation thanks to Aloïs Halel. 2009-10-27 22:12 mati86dl@gmail.com * NEWS, configure.ac, po/cs.po, po/de.po, po/es.po, po/fr.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/gui.c: Pragha 0.7.1 released. 2009-10-25 01:24 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/pragha.h: Clear Sort in Current playlist header_context_menu. Use betters icon. * ADD instead COPY, when add music. * NULL instead PLAY when replace playlist. Add betters accelerators. * Y, to search lyrics. * etc. 2009-10-24 12:39 mati86dl@gmail.com * src/gui.c, src/statusicon.c: When create search entry, no sensitive claer icon. 2009-10-22 15:07 mati86dl@gmail.com * po/pragha.pot, po/ru.po: Updated rusian translation thanks to Evgen 2009-10-21 15:48 mati86dl@gmail.com * src/gui.c, src/init.c, src/menu.c, src/pragha.h, src/pref.c: Remove Show/Hide Menu option and now coordinate with fullscreen option. 2009-10-20 23:50 mati86dl@gmail.com * po/cs.po, po/fr.po, po/ja.po, src/gui.c, src/statusicon.c: Restore "Search in playlist" menu item. Add "Properties" in syatray menu. Updated cs.po thanks to alois.nespor. Updated ja.po thanks to Masato Hashimoto. 2009-10-16 23:59 mati86dl@gmail.com * NEWS, configure.ac, data/pragha.png, po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/pragha.h, src/tags.c: 0.7.1Pre1 Add new Icon. Remove unseles comment tag. 2009-10-16 22:19 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/gui.c: Rework playlist popup menu. Update pragha.pot file. 2009-10-16 19:29 mati86dl@gmail.com * src/gui.c: Add more tooltips. 2009-10-16 14:59 mati86dl@gmail.com * src/gui.c, src/init.c, src/menu.c, src/pragha.h, src/pref.c: Add hide status bar option. 2009-10-16 14:00 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/filetree.c, src/gui.c, src/librarytree.c, src/playlist.c, src/pragha.h: More reworks on popups menus. * "Add to playlist" instead "Equeque" and "Replace playlist" instead "Play" Update pragha.pot file. 2009-10-16 02:10 mati86dl@gmail.com * src/gui.c, src/menu.c, src/panel.c, src/pragha.h, src/tags.c: Now activate panels from the menu. Add comment tag (Useless even). 2009-10-16 00:15 mati86dl@gmail.com * src/current_playlist.c: No show track no, when is zero. Show file name when unknown title. 2009-10-15 23:36 mati86dl@gmail.com * src/gui.c: Restore Expand library and Collapse library in popup library menu. 2009-10-15 22:13 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/init.c, src/menu.c, src/pragha.h, src/pref.c: Option to hide menu bar. Properties playing song in menu bar. 2009-10-05 15:12 mati86dl@gmail.com * src/menu.c, src/pref.c: Save Fullscreen option and window size correctly. 2009-10-05 13:58 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/current_playlist.c, src/gui.c, src/init.c, src/menu.c, src/pragha.h, src/pref.c: Rework main menu. (Everything does not work) Add Fullscreen Option. Sorry. Many translations have changed. 2009-10-04 19:02 mati86dl@gmail.com * src/current_playlist.c: Show "track" (Before show "tracks") in statusbar when inique song in playlist. 2009-10-04 14:51 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/gui.c, src/menu.c, src/pragha.h: Add option to search lyric, using http://www.lyricsplugin.com. Update po files. 2009-10-03 00:45 mati86dl@gmail.com * ChangeLog, FAQ, configure.ac: Pragha 0.7.0 "Great Like House" released. 2009-10-03 00:26 mati86dl@gmail.com * ChangeLog, NEWS, po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/current_playlist.c, src/gui.c, src/menu.c, src/pragha.h, src/utils.c: Prepare to Pragha 0.7.0 "Great Like House". Use gtk_show_uri to lauch Browser. Remove useless "Edit tag in the selected tracks" menu item. Update po files. 2009-10-02 15:52 mati86dl@gmail.com * src/gui.c, src/librarytree.c, src/menu.c: D'Oh!. (GSourceFunc) always returns gbolean. 2009-10-02 14:59 mati86dl@gmail.com * po/cs.po, po/de.po, po/es.po, po/ja.po, po/no.po, po/pl.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/librarytree.c, src/pragha.h: Fix headers Warnigs. Update pragha.pot and Polish Translation. 2009-10-02 14:22 mati86dl@gmail.com * src/librarytree.c, src/pragha.h: Optimization when search library_tree. Add g_timeout_add. 2009-10-01 23:10 mati86dl@gmail.com * src/pref.c, src/statusicon.c: Better layout of Preferences Dialog. (Simil xfce preferences dialogs, thank to midori web browser) Fix status tooltips warning when song info use & character. (D'Oh!. Use g_markup_printf_escaped instead of g_strdup_printf) 2009-09-29 23:36 mati86dl@gmail.com * src/current_playlist.c, src/pref.c: Fix Warnings when playlist is empty and restore pragha. More efficient. 2009-09-29 23:25 mati86dl@gmail.com * src/current_playlist.c, src/pref.c: Fix Warnings when playlist is empty and restore pragha. 2009-09-29 22:54 mati86dl@gmail.com * src/pref.c: Better layout of Preferences Dialog 2009-09-29 00:05 mati86dl@gmail.com * src/pref.c: Fixs CRITICALS when not reproduce music and close pragha. 2009-09-28 23:56 mati86dl@gmail.com * configure.ac, po/no.po: Add norwegian language, thanks to Kim. 2009-09-28 23:51 mati86dl@gmail.com * src/audio.c, src/init.c, src/pragha.h, src/pref.c: Save and retrieve software mixer volume. 2009-09-18 20:13 mati86dl@gmail.com * src/current_playlist.c, src/init.c, src/pragha.h, src/pref.c: FIX Segment Violation when click button "go to current track" 2009-09-12 14:21 mati86dl@gmail.com * configure.ac, po/pl.po: Add Polish translation thanks to Krzysztof Komorowski 2009-09-12 13:54 mati86dl@gmail.com * data/pragha.1, po/es.po, po/pragha.pot, src/current_playlist.c, src/dbus.c, src/gui.c, src/init.c: "pragha -t", now Play, Pause and resume the song. 2009-09-12 00:58 mati86dl@gmail.com * po/es.po, po/pragha.pot, src/menu.c: Add translator-credits to about dialog. 2009-09-11 22:39 mati86dl@gmail.com * src/statusicon.c: Better tooltip in systray. 2009-09-11 21:03 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/pragha.h, src/statusicon.c, src/threads.c: Show OSD on mouse over on StatusIcon Fix warnings when compiling. 2009-09-11 20:00 mati86dl@gmail.com * src/gui.c: Remove "Library View Menu" 2009-09-11 17:58 mati86dl@gmail.com * src/Makefile.am, src/gui.c, src/librarytree.c, src/pragha.h, src/sexy-icon-entry.c, src/sexy-icon-entry.h, src/sexy-marshal.c, src/sexy-marshal.h: Drop SexyIconEntry 2009-09-11 17:05 mati86dl@gmail.com * configure.ac, data/pragha.desktop, src/Makefile.am, src/current_playlist.c, src/eggtrayicon.c, src/eggtrayicon.h, src/gui.c, src/init.c, src/pragha.h, src/statusicon.c: Now depends of GTK>=2.16,=> Drop eggtrayicon. Fix pragha.desktop file, reported in http://pragha.wikispaces.com/Bugs. Add (Useless) "Edit tag <Title> in the selected tracks" menu item in playlist. 2009-09-09 21:19 mati86dl@gmail.com * configure.ac, po/cs.po, po/fr.po, src/librarytree.c: V0.6.3.1 Fix bug (Great like a house) in Libraryview. Add French translation, thanks to Alois Halel. 2009-08-08 21:42 mati86dl@gmail.com * ChangeLog, configure.ac: V0.6.3 Add remaining time mode to panel. Pragha remeber and showed last played song. Small optimization in library_tree. Fixs critical warnings. Updated czech translation by Alois Nespor. 2009-08-08 21:30 mati86dl@gmail.com * src/gui.c, src/panel.c, src/pragha.h: Add remaining time mode to panel. 2009-08-08 20:18 mati86dl@gmail.com * src/current_playlist.c, src/gui.c, src/init.c, src/librarytree.c, src/panel.c, src/pragha.h, src/pref.c: Pragha remeber and showed last played song. 2009-08-05 21:54 mati86dl@gmail.com * src/gui.c: Fixs critical warnings when initiating pragha. 2009-07-20 20:34 mati86dl@gmail.com * src/librarytree.c: Purge residual code 2009-07-20 20:24 mati86dl@gmail.com * src/librarytree.c: Small optimization. 2009-07-20 19:33 mati86dl@gmail.com * po/cs.po: Updated czech translation by Alois Nespor 2009-07-09 16:34 mati86dl@gmail.com * po/de.po: Update pot 2009-07-08 22:20 mati86dl@gmail.com * configure.ac, po/cs.po, po/de.po, po/es.po, po/ja.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po, src/gui.c, src/init.c, src/librarytree.c, src/playlist.c, src/pragha.h: 0.6.2.2: Add German translation, thanks to PhotonX!-) and drops some strings "Tracks" confused. 2009-07-08 17:02 mati86dl@gmail.com * configure.ac, po/cs.po, po/es.po, po/ja.po, po/pragha.pot, po/pt.po, po/ru.po, po/uk.po: 0.6.2.1: Add russian and ukrainian language, thanks to Evgen. 2009-07-03 15:38 mati86dl@gmail.com * ChangeLog, configure.ac: V0.6.2 Pargha is 100% translatable one. Add Japanese translation. - Tanks Masato hashimoto, Xfce-i18n team_ja. Add czech translation. - Tanks alois.nespor. Add Portuguese-Brazil. - Tanks Lyceuhns. Add option to resize album art in preferences. 2009-07-02 18:26 mati86dl@gmail.com * po/cs.po, po/es.po, po/ja.po, po/pragha.pot, po/pt.po, src/gui.c, src/menu.c: Pargha is 100% translatable one.! ¿? 2009-07-02 16:55 mati86dl@gmail.com * po/cs.po, po/es.po, po/ja.po, po/pragha.pot, po/pt.po, src/current_playlist.c: Pargha is 100% translatable one.!-) 2009-07-02 16:31 mati86dl@gmail.com * po/POTFILES.in, po/cs.po, po/es.po, po/ja.po, po/pragha.pot, po/pt.po, src/gui.c, src/menu.c, src/panel.c, src/playlist.c, src/pragha.c, src/pragha.h, src/pref.c, src/statusicon.c, src/utils.c: Pargha is 100% translatable one. I eliminate preview of the album while the size changes. Many fixes and clean the code. 2009-07-01 22:53 mati86dl@gmail.com * configure.ac, src/Makefile.am: Add Japanese translation.. Tanks Masato hashimoto, (Xfce-i18n team_ja) Purge "Snyder" remains 2009-07-01 22:52 mati86dl@gmail.com * po/ja.po: Add Japanese translation.. Tanks Masato hashimoto, (Xfce-i18n team_ja) 2009-07-01 16:31 mati86dl@gmail.com * src/panel.c: change GTK_SHADOW_IN 2009-07-01 16:19 mati86dl@gmail.com * po/cs.po, po/es.po, po/pragha.pot, po/pt.po: Update pot files 2009-07-01 16:17 mati86dl@gmail.com * src/init.c, src/panel.c, src/pragha.c, src/pragha.h, src/pref.c, src/statusicon.c: More Resize album art in preferences Fix warnings 2009-06-30 22:21 mati86dl@gmail.com * src/init.c, src/panel.c, src/pragha.h, src/pref.c: Resize album art in preferences 2009-06-29 20:25 mati86dl@gmail.com * configure.ac: Add czech translation.. Tanks alois.nespor!-) 2009-06-29 20:23 mati86dl@gmail.com * po/cs.po: Add czech translation.. Tanks alois.nespor!-) 2009-06-29 19:56 mati86dl@gmail.com * configure.ac: Add Portuguese (Brazil) 2009-06-29 19:55 mati86dl@gmail.com * po/pt.po: Add Portuguese (Brazil) 2009-06-23 16:21 mati86dl@gmail.com * Makefile.am: Add objetive distclean-local and try rpm: 2009-06-23 15:44 mati86dl@gmail.com * src/Makefile.am: Fix make distcheck (consonance.h remain) 2009-06-23 15:21 mati86dl@gmail.com * po/es.po: Fix es.po 2009-06-23 15:15 mati86dl@gmail.com * AUTHORS, COPYING, NEWS, autogen.sh: Add News, Copying and Autors 2009-06-23 15:11 mati86dl@gmail.com * autogen.sh: New autogen.sh with Xfce Developer Tools 2009-06-23 15:05 mati86dl@gmail.com * autogen.sh: New autogen.sh with Xfce Developer Tools 2009-06-23 15:00 mati86dl@gmail.com * po, po/ChangeLog, po/LINGUAS, po/POTFILES.in, po/es.po, po/pragha.pot: International Support 2009-06-23 14:57 mati86dl@gmail.com * src/Makefile.am, src/current_playlist.c, src/gui.c, src/librarytree.c, src/menu.c, src/panel.c, src/pragha.c, src/pragha.h, src/pref.c, src/statusicon.c, src/tags.c: International Support 2009-06-23 14:56 mati86dl@gmail.com * ChangeLog, Makefile.am, README, configure.ac: International Support 2009-06-18 21:34 mati86dl@gmail.com * src/statusicon.c: fix notify text 2009-06-18 00:25 mati86dl@gmail.com * ChangeLog, Makefile.am, configure.ac: First Pragha realese 2009-06-18 00:21 mati86dl@gmail.com * src/Makefile.am, src/audio.c, src/cdda.h, src/cmdline.c, src/consonance.c, src/consonance.h, src/current_playlist.c, src/db.c, src/dbus.c, src/filetree.c, src/flac.h, src/gui.c, src/init.c, src/lastfm.c, src/librarytree.c, src/menu.c, src/mod.h, src/mp3.h, src/musicobject.c, src/oggvorbis.h, src/panel.c, src/playback_cdda.c, src/playback_flac.c, src/playback_modplug.c, src/playback_mp3.c, src/playback_oggvorbis.c, src/playback_wav.c, src/playlist.c, src/pragha.c, src/pragha.h, src/pref.c, src/statusicon.c, src/tags.c, src/threads.c, src/utils.c, src/wav.h: Prepare /src to first Pragha realese 2009-06-18 00:18 mati86dl@gmail.com * data/bookmark_starred.png, data/bookmark_unstarred.png, data/consonance.1, data/consonance.desktop, data/consonance.png, data/pragha.1, data/pragha.desktop, data/pragha.png: Prepare data to first Pragha realese 2009-05-28 16:31 mati86dl@gmail.com * ChangeLog: Changelog 2009-05-28 15:35 mati86dl@gmail.com * Makefile.am, configure.ac: Fixed consonance.png in gnome_main_menu and xfce_menu (gtk_update_icon_cache) 2009-05-28 13:46 mati86dl@gmail.com * src/statusicon.c: Sync systray and panel volume 2009-05-28 13:38 mati86dl@gmail.com * ChangeLog, configure.ac: Little fixes 2009-05-28 13:37 mati86dl@gmail.com * src/statusicon.c: Little fixes 2009-05-28 13:19 mati86dl@gmail.com * src/gui.c, src/librarytree.c, src/panel.c: Little fixes 2009-05-27 16:56 mati86dl@gmail.com * src/eggtrayicon.c, src/init.c: Problem of the panel background image fixed 2009-05-27 15:58 mati86dl@gmail.com * src/current_playlist.c, src/gui.c: More Spanish! 2009-05-27 15:19 mati86dl@gmail.com * configure.ac: consonance 0.5.90.2 2009-05-27 15:19 mati86dl@gmail.com * src/gui.c, src/panel.c: Drop spanish! 2009-05-27 14:59 mati86dl@gmail.com * configure.ac: ups.. Drop spanish remains 2009-05-27 14:59 mati86dl@gmail.com * src/panel.c, src/statusicon.c: ups.. Drop spanish remains 2009-05-27 14:28 mati86dl@gmail.com * ChangeLog, configure.ac: Commits Changelog and configure.ac 2009-05-27 14:28 mati86dl@gmail.com * src/audio.c, src/consonance.h, src/gui.c, src/init.c, src/menu.c, src/statusicon.c, src/utils.c: Incress and decress 5% vol with whell. New text layout of notifications. Notifications only are if consonance not this in first plane and new text layout. In help menu show links to Consonance homepage, a Nonofficial wiki and forum..(Work!-) Completely in English. etc. 2009-05-26 15:24 mati86dl@gmail.com * data/bookmark_starred.png, data/bookmark_unstarred.png: add Bookmark_starred/_unstarred icon 2009-05-26 15:22 mati86dl@gmail.com * src/gui.c: Put bookmark icon.. (Crazy idea) 2009-05-26 15:21 mati86dl@gmail.com * Makefile.am, configure.ac: Dependences of intrepid fixed. ¿? 2009-05-25 20:46 mati86dl@gmail.com * configure.ac: Now need libcurl >= 7.18 2009-05-25 18:51 mati86dl@gmail.com * configure.ac: Now need libcurl >= 7.18.2 and libcdio >= 0.78.. 2009-05-25 15:22 mati86dl@gmail.com * configure.ac: Purge xfce libs 2009-05-25 15:22 mati86dl@gmail.com * src/consonance.h, src/pref.c: Purge xfce libs 2009-05-25 01:18 mati86dl@gmail.com * src/gui.c, src/init.c: Add murrine RGBA support 2009-05-23 23:31 mati86dl@gmail.com * configure.ac: Fix configure.ac 2009-05-23 23:27 mati86dl@gmail.com * configure.ac: Fix configure.ac 2009-05-23 23:19 mati86dl@gmail.com * src/consonance: CleanIV 2009-05-23 23:18 mati86dl@gmail.com * Makefile.am: Add /data/cover.png to Makefile.am 2009-05-23 23:17 mati86dl@gmail.com * Makefile, Makefile.in, aclocal.m4, depcomp, install-sh, libtool, ltmain.sh, missing, stamp-h1: Clean!!! 2009-05-23 23:17 mati86dl@gmail.com * config.guess, config.h, config.h.in, config.log, config.status, config.sub, configure: Clean!! 2009-05-23 23:16 mati86dl@gmail.com * configure.ac: Clean! 2009-05-23 23:14 mati86dl@gmail.com * data/album.png, data/artist.png, data/consonance.1, data/consonance.desktop, data/consonance.png, data/cover.png, data/genre.png, data/track.png: Add data 2009-05-23 23:12 mati86dl@gmail.com * src/Makefile, src/Makefile.in: Clean 2009-05-23 23:05 mati86dl@gmail.com * src, src/Makefile, src/Makefile.am, src/Makefile.in, src/audio.c, src/cdda.h, src/cmdline.c, src/consonance, src/consonance.c, src/consonance.h, src/current_playlist.c, src/db.c, src/dbus.c, src/eggtrayicon.c, src/eggtrayicon.h, src/filetree.c, src/flac.h, src/gui.c, src/init.c, src/lastfm.c, src/librarytree.c, src/md5.c, src/md5.h, src/menu.c, src/mod.h, src/mp3.h, src/musicobject.c, src/oggvorbis.h, src/panel.c, src/playback_cdda.c, src/playback_flac.c, src/playback_modplug.c, src/playback_mp3.c, src/playback_oggvorbis.c, src/playback_wav.c, src/playlist.c, src/pref.c, src/sexy-icon-entry.c, src/sexy-icon-entry.h, src/sexy-marshal.c, src/sexy-marshal.h, src/statusicon.c, src/tags.c, src/threads.c, src/utils.c, src/wav.h: Changes in gui. 2009-05-23 22:53 mati86dl@gmail.com * ChangeLog, FAQ, Makefile, Makefile.am, Makefile.in, README, aclocal.m4, autogen.sh, autom4te.cache, config.guess, config.h, config.h.in, config.log, config.status, config.sub, configure, configure.ac, data, depcomp, install-sh, libtool, ltmain.sh, missing, src, stamp-h1: Initial import of consonance git 2009-05-23 22:39 * .: Initial directory structure. ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/FAQ������������������������������������������������������������������������������������0000664�0000000�0000000�00000001002�13435240150�0013301�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Frequently Answered Questions ============================= Q. Pragha does not play certain audio file. A. Pragha adds new audio formats on a par with taglib. If compiled with taglib = 1.4, pragha support ogg, flac, mpeg, wav and all variants. If taglib = 1.6 add support to asf, wma and m4a. If taglib >= 1.7 also support ape files. Then you need to install the gstreamer codecs needed to play them. In general installing gstreamer-plugins-bad and gstreamer-plugins-ugly you can play all files.������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/Makefile.am����������������������������������������������������������������������������0000664�0000000�0000000�00000001220�13435240150�0015005�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������SUBDIRS = \ data \ po \ src if HAVE_LIBPEAS SUBDIRS += plugins endif AUTOMAKE_OPTIONS = \ 1.8 \ dist-bzip2 doc_DATA = ChangeLog FAQ NEWS README EXTRA_DIST = \ $(text_DATA) \ $(doc_DATA) transifex-setup: tx init tx set --auto-remote https://www.transifex.com/projects/p/Pragha/ tx set --auto-local -r Pragha.Pragha 'po/<lang>.po' --source-lang en --source-file po/pragha.pot --execute transifex-pull: tx pull -a -f @echo "You can now git commit -a -m 'Transfix pull, *.po update'" transifex-push: tx push -s @echo "You can now git commit -a -m 'Transfix push, pragha.pot update'" distclean-local: rm -rf *.cache *~ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/NEWS�����������������������������������������������������������������������������������0000664�0000000�0000000�00000143666�13435240150�0013475�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������============================================================== Overview of changes between Pragha 1.3.4 and 1.3.3 ============================================================== V1.3.4 Codename: "Cherry, cherry, cherry pick..." News: Fixes some border, spacing and margin in all gui. Various improvements to the tag editor dialog. Others Changes: Implement emit CanNext/Prev/Play/Pause/Seek. Issue #123 Use Alt+Return shortcut to edit the selected song. Some backport of improvents to MTP plugin Allow build with grilo-0.2 and grilo-0.3. Set user-agent and ssl strict ssl to gstreamer on internet music. Fix second sidebar dont show with accel. Issue #73 Allow apply a custom css. Related to Issue #64, #87 Allows to customize the styles to the distro packagers. Bugs fixed: Fix Incorrect Can* properties of the MPRIS Specification #123 Fix wrong Wiki address. Issue #138 Fix segmentation fault when close deactivate mpris plugin. Remove use-hint preferences that was removed.. Fix GtkDialog mapped without a transient parent.. Dont use keybinder plugin on wayland. Issue #118 Dont use X11 session on wayland. Use same accel -Shift-F9- to show second sidebar that gnome-builder. Issue #73 Align to center the toolbar icons instead vertical fill. Issue #10 Fix toolbar shows 00:60 instead of 01:00. Issue #103 Remove custom invisible char of lastfm password Update dlna-renderer plugin. Issue #94 Update dlna plugin to rygel 2.6. Prefer non symbolic icons. Fix blured menu icon.. Issue #85 Avoid opening unknown files on Taglib. Fix TuneIn when it offers many results. Updates Translations: Nothing here since transifex dont use versions and change so much. ============================================================== OTHERS REALESES: ============================================================== V1.3.3 Codename: "Just a preamp..." News: Rework the interface of equalizer and adds the preamplifier. Add a switch for disabling the equalizer preset easily. Add option to use small icons on tool/headerbar. Others Changes: Change "Use Gnome 3 HIG" option to "Use system title bar and borders" Don't use icons on menubar. Bugs fixed: Fixes undefined symbols of devices plugin. Use uri instead filename to save playlist with TotemPlPlarser. Add all songs when import online playlists. Issue #81 Expand widgets if added as wide control. Updates Translations: New Lithuanian translation thanks to Moo. New Polish translation thanks to m_szymczak. Update French translation thanks to Pingax. Update German translation thanks to Atalanttore. Update Portuguese translation thanks to smarquespt. Update Russian translation thanks to Lazy_Kent. Update Bulgarian translation thanks to lyubomirv. Update Swedish translation thanks to monotux. V1.3.2.2 Codename: "Gtk 3.14: Que cunda el panico. haha. ;)" Bugs fixed: Not save state album_art_in_osd=false. See issue #77 Provide more app icons size. See issue #80 Set expand comment entry on tag dialog. Ensure menu size and fallback to 16 on library and playlist icons. Updates Translations: New Bulgarian translation thanks to lyubomirv. Update German translation thanks to Zijj. Update Ukrainian translation thanks to Koljan1970. Update Czech translation thanks to anespor. Update German translation thanks to Aru21. V1.3.2.1 Codename: "Gtk 3.14: Que cunda el panico. haha. ;)" Bugs fixed: Add Castillan translation to install list. Disable libtool versioning for plugins. See issue #74 Not remember visibility of the second siderbar when init. Issue #73 Fix icon size on preferences dialog on Gtk 3.14 [1]. Try to fix the small progress bar on gtk 3.14, but finally just center it. [1] Disable popover on gear menu!. It is just horrible!!, and pior on 3.14. Fix size of Gear menu. Updates Translations: Update Russian translation thanks to Lazy_Kent. Update Korean (Korea) translation thanks to Smallsnail. Update French translation thanks to Pingax. Note [1]: It worked correctly in at least 13 versions!. (Gtk 2.10 -> 2.24 and 3.0 to 3.13), 7 years!!. Why sh*** did they get changed in gtk 3.14!? V1.3.2 Codename: "Que no cunda el panico. ;)" News: Add optional client-side-decorators support trying to follow Gnome3 HIG. Can hide menubar and then append a gear menu on toolbar. Add a infobar when some change on prefrences need restart. Others Changes: Except activation of plugins must accept the preferences dialog for the changes to take effect. A lot of margins and sizes were stylized to improve the design. Acrivate mpris2 and show lyrics sidebar by default. Remove windows installer from source. Moves to its own repository. Bugs fixed: Devices plugin: Fix remove library and drop database when eject any usb mass storage. Devices plugin: Show a message when fails to mount a usb. Devices plugin: Properly handles devices that are mounted by the desktop before than by Pragha. Devices plugin: Fix format not a string literal and no format arguments [-Werror=format-security] Check existence of the files before import any playlist. So.. never more import empty playlists. Fix change library when old list is empty. Insensitive some playback actions on toolbar, menubar and systray when startup. Lastfm: Be a little more careful with PraghaMusicobject references. Remove useless option to setting gstreamer version con configure.ac. Remove preferences (including passwords) when plugins are deactivated. Don't use deprecated GtkArrow. Updates Translations: New Castillan translation thanks To Jordi Mas. Update German translation thanks to Atalanttore. Update Czech translation thanks to anespor. Update Portuguese thanks to Smarquespt. Sorry. I lost another author. Update Russian translation thanks to Lazy_Kent. Update Korean (Korea) translation thanks to Smallsnail. Update Spanish translation thanks to Fitoschido. Fix typo thanks to Atalanttore. V1.3.1 News: New TuneIn plugin. Allow search on TuneIn and append first radio. New DLNA server plugin. Allow share playlist to a DLNA server using Rygel. New DLNA renderer plugin. Allow play music on a DLNA server using Grilo. New AcousticId plugin. Get metadata of current song on AcoustID service. D'Oh!. Port to GtkApplication. Return a basic support to MOD files. Allow playback music on MTP devices. First basic port to Windows. Others Changes: The CD-ROM support became a plugin. The Last.fm support became a plugin. * Better protect tags and time_t on threads. * Use diferents time_id to scrobble and update now playing. * Fix submits multiple entries of one song to LastFM. * Betters function names and declare a lot as static. Song-info plugin: don't delay searching and cancel if song was changed. Allow recursive playlist disabled since https://bugzilla.redhat.com/show_bug.cgi?id=1013020 Reduce track progress bar size. (A regresion since Gtk+-2) Split Devices plugin. Devices, MTP, Renovable, and CDROM. PraghaMusicobject/Database: file_type coverted to mime_type. PraghaMusicobject: Add source property, to differentiate local files, of http, or plugins. Gui: Show Mimetype on Playlist and tags properties dialog. Set <Control>O as acceletator to open files dialog. Enable the Notify and Song Info plugins on first run Bugs fixed: Fix Segfault when edit song tags from systray menu. Playlist: fix memory leak. Fix compilation without libpeas. Issue #60 Fix some segfault when use Glib >= 2.40. Create cache folders when init it. NOT IN THE SONGINFO PLUGIN!!!. Show album arts in cache to all songs. Not import empty playlists when scan the library. Update the menubar and playlist submenu when change any playlists saved. Fix never change album on playlist when update tags. Fix bad update of title on playlist when update tags. Notify Plugin: Remove custom timeout. Notify plugin: Check new song before sending a notification. Lastfm Plugin: Fix warning when user or password in empty.. Lastfm Plugin: No start new sessions every time that close the configuration dialog. Add licence to xml_helper.c/.h files. Fix opening folder with images. Updates Translations: Some improvements to English source file strings. Thanks to @smarquespt. See #67 Update Chinese (China) translation thanks to chunyang. Update Czech translation thanks to anespor. Update French translation thanks to Pingax. Update Portuguese translation thanks to smarquespt. V1.3.0 News: Depends completely on Gtk+3 >= 3.2 and Glib >= 2.32, Gstreamer1 and libcdio_paranoia >= 0.90 [1] Add support to plugins, depending on libpeas >= 1.2 - Port gnome-media-keys, keybinder, mpris2, notify, and song-info. - Still pending rewrite the lastfm plugin. - Add SOO-EXPERIMENTAL and INCOMPLET devices plugin. Add a second sidebar on right. - Just used by the plugin song-info to show lyrics. Others Changes: Continued with the cleaning, writing, and conversion to GObjects - PraghaArtCache, PraghaSidebar, and and every plugins. - PraghaApplication now is based on GtkApplication. Fix many bugs in gtk+3 interface, and fixes deprecations prior 3.10 NOTE: [0] Seems little, but 99% of the work in 1.2 was done here, and then backported. [1] Support to Gtk+2 and libcdio_paranoia = 0.83 was removed completely. V1.2 Bugs fixed: Fix thread safety when reading tags. Explicitly specified use normal fonts in the library. Fix seg fault when disable and enable again mpris2. Updates Translations: New Korean (Korea) translation thanks to Smallsnail. New Vietnamese translation thanks to Ppanhh. Many other updates. Thanks to all. V1.2.rc News: Highlight the headers on library view. Disable all video features of playbin. Add support for embedded album art when gstreamer >= 1.0 Add simple appdata.xml to gnome-software. Others Changes: Continued with the cleaning, writing, and conversion to GObjects * PraghaToolbar, PraghaLibraryPane, PraghaPlaylist, etc. * PraghaApplication is based on GApplication, controlling single instance, and dbus messages. All preferences have been ported to PraghaPreferences Better support to GTK3, and prepare wayland support Require by default Gstreamer >= 1.0 Bugs fixed: (Sumary: The most relevant to the user.) Fix unable to automatically play another song in pragha. Art-cache: fix for case artist or album cointains slash Fix regression on 1.1.2: Return to import playlists. Fix save fuse_folders option when not set folder structure view. No insensitive albumart_in_osd toggle button when change show sytray option. Fix wrong min glib version. g_thread_unref need 2.31 Fix updating library view after rescan. Dbus: fix crash on get current state. Fix some coverity defects: * Unused pointer value (UNUSED_VALUE) * Uninitialized scalar variable (UNINIT) * Division or modulo by zero (DIVIDE_BY_ZERO) * Unchecked return value (CHECKED_RETURN) * Unchecked return value from library (CHECKED_RETURN) * Dereference before null check (REVERSE_INULL) * Resource leak (RESOURCE_LEAK) * Explicit null dereferenced (FORWARD_NULL) NOTE: Gstreamer >= 1.0 is needed by default. * Set the previous version with: ./configure --with-gstreamer=0.10 Still depends on libcdio >= 0.83 by default. * To compile with libcdio >= 0.90 use: ./configure CPPFLAGS="-DHAVE_PARANOIA_NEW_INCLUDES" Remove dbus-1 and dbus-glib-1 requirements. V1.1.2 News: Improved indexing of the library. Also allows continue listening music while analyzing. [1] The database uses prepared statements, improving the general performance of Pragha. Others Changes: A general cleaning of the code, but there is much to be done. * First rewrites using GObjects as PraghaBackend, PraghaAlbumArt, PraghaMusicobject, PraghaPreferences, PraghaDatabase, and PraghaStatusbar. * Many other rewrites as PraghaLibraryPane and PraghaPlaylist. * Many changes to work with threads safes. Now add, remove or rename playlist and radios is super fast. Now select the content of the "Track No" and "Year" in "Edit tags" window after focusing or clicking into them. Now you can drag songs from the library to any file manager to copy or burn with brasero. Now you can add playlists using command line or file managers. Save and restore menu accelerators edited. Now whenever you add songs, select the first song added. Translations: use intltool for desktop file Bugs fixed: (Sumary: The most relevant to the user.) Try to fix issue #46: Header moved location in libcdio-paranoia-0.90. [2] Update Autotools, and fix a warning when use autogen.sh due to cdda.h glyr-related.c: Use lang autodetection to get artist bio. See issue #39 mpris: fix problems with long tracks translations: fix plural forms gtk3: fix minor bugs add workaround for crash in taglib fix a deadlock on adding to current playlist Updates Translations: Update Czech translation thanks to anespor, and petr.simacek. Update Dutch translation thanks to Vistaus. Update German translation thanks to cwickert. Update Hungarian translation thanks to Polesz. Update Portuguese translation thanks to smarquespt. Update Portuguese (Brazil) translation thanks to rafaelff1. Update Russian translation thanks to Lazy_Kent, and 4glitch. Update Turkish translation thanks to fatihmalakci, necdetyucel, and emfi. Update Ukrainian translation thanks to paul.rufous. Notes: [1] Sorry, but also adds a regression. Stop importing playlists. [2] To compile, have to comment the line 23 of Pragha.h V1.1.1 News: Add a button to close the sidebar. Use toolbar style to playback controls. Better Gnome HIG complain in preferences, inspired on transmision code. Adds an option to hide the icon in the notification area. Others Changes: Depend on gtk+2.24 and glib 2.28. * Both was released a year and a half ago. Nobody should have problems. Modularization/Refactoring/Cleanup of a lot of code thank to Pavel Vasin. Always compile support to gnome-media-keys. * First check gnome-settings-daemon and when not found, use keybinder. Support global hotkeys with keybinder and gtk3 if detect keybinder-3.0. Various improvements in gstreamer. * Check if seeking is allowed and inform it in mpris2. * No buffering live streams and get a new clock if lost it. Enable MusicBrainz to download cover art. Bugs fixed: (Sumary: The most relevant to the user.) Sanitize artist and title when append from lastfm. Fix equalizer dialog in gtk3 interface. Fix tag dialog in gtk3 interface. equalizer: fix GObject leak. Not refresh the library view if the radio added is not saved. Fix read after free. See Github issue #20. Not forget the previous songs when queue songs. Not forget the previous songs when play songs activating playlist. Removes a lot of unused variables and functions. Thanks to Pavel Vasin. Updates Translations: Equalizer pressets now are translateable. V1.1.0.1 Bugs fixed: Fix crash when try to crop playlist with accelerator!. * And probably many other crashs. gui: take ownership of images in the right way. fix build on i586. See github issue #31 mpris: fix crash in Player.Seek mpris: don't use constants from libdbus. Updates Translations: Update german translation thanks to cwickert. V1.1.0 News: Suggest import XDG_MUSIC_DIR to library on first start thanks to Pavel Vasin. Merge playlist and radios on unique library view pane. Add option to make aproximate searchs using a levenshtein distance. Add a new menu option to copy tags of selection in current playlist. mpris: partially implement AddTrack thanks to Pavel Vasin. Add support for gstreamer 1.0 thanks to Pavel Vasin. F9 to show/hide the sidepane. Add --log-file/ -l command line option to log debug to a file. Others Changes: Depend on gtk 2.22 and glib 2.26 * Remove some hackings to prevent deprecations. * This to remove dbus-glib-1 soon maked as obsolted. * Until now: Only migrate utils to gdbus thanks to Pavel Vasin. Follow fdo Icon Naming Specification thanks to Pavel Vasin. Reorganization of the main menu (Love and hate here;). * File menu change to Playback and adds the random and repeat options. * Edit menu change to Playlist, and adds the options to add files, audio CD and locations. * Preferences are now found in tools. The initial window size and cols width is set dynamically according to the screen size. Bugs fixed: Don't use gnome media keys if keybinder available. Remove unnecessary execution permissions. Utils: remove another redundant cast. Fix xdt-autogen warning. Close the dialog "Open files"immediately, and do not block gui when adding many files. Fix cmdline description. mpris: fix setting Shuffle property. mpris: fix setting LoopStatus property. Don't store unused reference to GOptionContext. Free some strings at exit. backend: a bit simplify volume code. Build: don't use deprecated AM_CONFIG_HEADER. Now anything that you drop to the playlist remain where it was dropped. Use more generic function to avoid duplicate code. Unref notify osd when close it. Remove unnecessary g_strdup. mpris: fix yet another memory leak. mpris: save a few bytes. tags: fix rarely crash in edit dialog. menu: simplify show_controls_below_action(). librarytree: assert prefix found. librarytree: Use the numerated node_type directly. Also set bold the year label on tag edit dialog. init: fix potential memory corruption. menu: fix memory leak on opening files. menu: don't delay add_recent_file. menu: fix another memory leak on opening files. Ensure some functions don't modify their args. Fix passing libraries in wrong order to the linker. See issue #29 Free struct con_gst at exit. backend: fix gobject runtime warning. Center the main window if no have saved a potition. Insensitive correctly some options of radio and playlists menus. Fix disable libxfce4ui on configure.ac. Updates Translations: Update Rusian translation thanks to Lazy_Kent. Update Czech translation thanks to anespor. Update some others tranlations in transifex. * Excuse the translators, who lost their names, but thank you very much!. V1.0.2 News: EXPERIMENTAL support to gtk3 thanks to Pavel Vasin. Add support for gnome media keys thanks to Pavel Vasin. Use totem-pl-parser to open playlists when is available. * With this can open internet radios playlist. * Support many more formats Imports playlists when update the library Others Changes: Use the same minimum requeriemientos that Xfce 4.10. A tiny caprice. =) * Need gtk+-2.0 >= 2.20, glib-2.0 >= 2.24, dbus-1 >= 1.1 and dbus-glib-1 >= 0.84. Use libxfce4ui instad libexo-1 to session management. * Better behavior and less dependence. In/Sensitive menus acording playback and lastfm status. Allow displaying length and progress of remote files Many changes in the start of gtk, gstreamer and glib threads. Use PRAGMA synchronous=OFF on db. Remove old check dependency of libcurl. Remove unused dependency on xlib. Bugs fixed: No close the notify when activate actions. Only update this. Fix bad current track position in mpris2, and emit Player.Seeked signal. See github issue #12 Fix expand playlists and radios tree view when update it. Fix compilation with libcdio 0.84 and bad pragha about dialog. See github issue #4. Fix some issues in github opened by ssuominengentoo. * Issue 8: Stop setting docdir= $(pkgdatadir)/doc in Makefile.am since it breaks --docdir switch. * Issue 7: Stop forcing -O3 optimization. * Issue 6: Release tarballs should not set -Werror. * Issue 5: Multiple issues in the pragha.desktop file D'Oh!. Add audio device in preferences. Fixed many memory leaks and some optimizations thanks to Pavel Vasin. Use g_object_set to set audio device. Fix select of audio device. Updates Translations: Update Rusian translation thanks to lazy.kent.suse. Update some tranlations in transifex. * Excuse the translators, who lost their names, but thank you very much!. V1.0.1 News: Add Get lyrics, Get artist info to the selection on current playlist. Add Love, Unlove, and Get similar options to the selection on current playlist. Add an icon in the panel to suggest tag corrections of lastfm when update now_playing. [1] Others Changes: Add tootips to show equalizer bands values. Select last track when append new songs. Also append radios when restore session. Append Hz, kbps, and Channels string to file properties dialog. Check status of network manager when launch pragha. If is online, init lastfm, otherwise wait 30 seconds. Remove search album art option in menu. Any objection..? I never use it. Only search covers art in lastfm temporarily. Returns better results. Bugs fixed: Fix search album art option is always enabled. Not jump to the next song when have selected several songs. Grab focus on entry name when save playlist and save when press enter. D'Oh!. Use mpris:artUrl instead xesam:art, and emit a full uri format. Add a playlist_change flag to avoid errors when remove the model to gain speed. Also set busy cursor when add similar song, clear/crop current playlist, or import/export playlist. Always show "Custom" presset on equalizer on error. Fix frizee when buffering internet radios. Inform stop playback to mpris2 when close pragha. Save preferences changes when pressing enter. Update some years copyright. Never add duplicate songs. D'Oh!. Fix never add songs of the lasts page of favorites songs. Fix some warnings when first init. Set disable when first usage of equlizaser. Better function to search song on db with only the artist and title info. Use more generic functions to remove some duplicate code. Romove some unused code. Updates Translations: Fix Bad space on message of error playback dialog. Update German translation thanks to Cwickert. Update Portuguese translation thanks to smarquespt. Update Italian translation thanks to bersil. Update Rusian translation thanks to lazy.kent.suse. [1] Note: For this, depend now on libclastfm >= 0.5. Sorry packagers. V1.0 "Good news, or aberration?." News: Add a classic 10-band software equalizer. Others Changes: Save the m3u playlists with relative paths when stored in the same directory that the audio files. Add basic Static Quicklist entries on desktop file to control pragha on unity. Bugs fixed: Emit album art url on mpris2 when is available. Emit new metadata when edit tag of current track. Fix try to edit some tags of radio stream with taglib. Add playlists mime on desktop file. Use autoaudiosink as default audiosink. Update notifications instead of show one for each song change. Set Next as default button when show a playback error. Do not allow change song from mpris/keybinder/systray when show a playback error. Can open playlists with relative paths. Save radio stream when press enter on name. Fix compilation without exo-1. Comfirm with an dialog before delete any radio/playlist item. Fixes some memory leaks. Updates Translations: Add Italian translation thanks to Stribianese91. Update German translation thanks to Cwickert. Update Rusian translation thanks to lazy.kent.suse. Update Portuguese translation thanks to smarquespt. Sorry if I lost any translation. Transifex does not show the entire history. Please. Contact me. V1.0.RC3 News: Add option to show the playback controls below. Can select a name when add radio streams to save on db and append to playlist tree. Others Changes: Fix/Change somes strings. Sorry. Init pragha with focus on play button. Add the new stream with the uri/name as title. Better layout of rename and add location dialog. Add a new popup menu with "New playlist" and a list of saved playlist to "Save playlist" like the "Add selection" popup. Also append boths pupups submenus to main menu. Properly set the title in save playlist dialogs. Edit track information when double click on the track label of the panel. When playback is stopped and no has selected any track, play a random track if shuffle has activated. Bugs fixed: Remove useless warning "Everything is fine" when no found a cover. No search artist information when missing the artist name. No search lyrics when missing the title or artist name. Init the threads conditionally depending on the version of glibc, removing g_thread_init deprecated in 2.31 Remove unused code, that remove g_strncasecmp deprecated function. Better buffering streaming. Prevent that it refuse to stop the playback. Better buffering. Not update mpris, lastfm or get album art. D'Oh!. Fix Segmentation fault when the stream update the tags on RC1/2 No update playlist view when cancel the rename action. V1.0.RC2 News: Better session managament support when exo-1 >= 0.6 is available. * Now save current playlist when save session. * Now save last posicion when save session. * etc, etc. Rename playlist. Add support to playing streams over a network. Others Changes: When just run Pragha init lastfm with a timeuout of 30 sec, but with a simple thread when change preferences. Set width of queue/pixbuf column fixed to 32px. Set queue bubble size fixed to 12px. Bugs fixed: Implement lost Seek an SetPosition on mpris2. Fix main toolbar items use GTK_ICON_SIZE_LARGE_TOOLBAR, volume button uses _SMALL_TOOLBAR. Use some un/likely optimization. Remove unused code. V1.0.RC1 News: Now use libglyr to search lyrics, cover art, and artist info if available. [1] Use the cache of libglyr to save the downloaded artist info and lyrics in a Metadata.db file. Others Changes: Tiny reorganization of the menu. Change cache folder from pragha-album-art to pragha. Now append "album-" string to covers in cache. Quasi simplified MediaArtStorageSpec, except md5. jah. Adds some debug messages in mpris.c and avoid bad spaces. Select the next row to the last selected when remove tracks in current playlist. Remeber window position when restart pragha. Thanks to carlosjosepita. Allow to use relative paths to add files with command line. Open the image when double click on the cover in the panel. Updates Translations: Update German translation thanks to cwickert. Update Czech translation thanks to anespor. Update Portuguese translation thanks to smarquespt. Update Portuguese brazilian translation thanks to valtern. Bugs fixed: Fix show all options when use any commands line option. Allow to use relative paths to add files with command line. D'Oh!. Not can edit multiple files from the library. Since when?. Reduce padding on playlist view, leave this for the GTK+ theme to figure out. Check if are in current playlist before add duplicate songs when search similar songs from lastfm. Not change the model when Remove tracks in current playlist. Fixes bad array of string in mpris metadata when string has apostrophes. Fixes two segmentation faults when use ubuntu soundmenu and pragha has not playlists. Fix bad folder estucture view entries because a bad conversion of filenames to UTF. Fix that not add the duplicated songs when use the library view based on metadata. Not sensitive "Osd in systray" option if libnotify >= 0.7.0 Not sensitive the "Add action in OSD" option when the notification daemon no support it. Grab focus on current playlist when press Up or Down and move between controls with Left or Right. Not update the panel when download album art but change the current song. Use key-press-event intead key_press_event. Use more strlen to test NULL strings. Fix pragha freezes when select a playlist with mpris2. Even emit _("Playlists") like current playlist in mpri2. Inhibit global hotkey when parse a error in playback. Better initiation of variables that establish the current status. Fix a segfault when close pragha. Fix a few memory leak. [1] https://github.com/sahib/glyr: Is a very new library, an the author defines it as "GlyR is a searchengine for musicrelated metadata" Many thanks to Chris for writing to me, offering his library when asked for a alternative to chartyrics. V0.99.0 News: Show a busy mouse icon when running a slow function. Search artist info, album art, and lyrics into a thread. Add structure to read new playlists formats. Until now PLS, XPSF and WAX. Add a button on the save playlist dialogs to export the playlists. Implement "Add to playback queue" in search dialog. Implement "Import a XPSF playlist", useful when exporting playlists in last.fm, that not use the location tag. First attempt to restore the configuration of the audio device. Implement a basic cache for downloaded cover art in "(home)/.cache/pragha-album-art". Add option to search the album art automatically in lastfm. Others Changes: Preselect the (playlist_name).m3u filename to export dialog. Eliminate the option to play track in search dialog. Set "jump to track" by default in search dialog. Displays a message with the number of songs added when import playlist. Add "Playlists" filter on open file chooser. Improved panel audio settings layout in preferences. Updates Translations: Update German translation thanks to cwickert. Update Czech translation thanks to anespor. Update Portuguese translation thanks to smarquespt. Bugs fixed: Fix "All files" filter in open file chooser. Fuse audio_alsa_device and audio_oss_device in audio_device. Only set audio_cd_device when playback a audio cd. Update about dialog year. Update MimeTypes on desktop file. V0.98.0 News: A new menu "Add to playlist" that replaces "Save selection" on current playlist. More speed when Clear, Remove, and Crop tracks on current playlist. More speed to add tracks to the current playlist from popup menu. More speed to add playlists to the current playlist. Others Changes: Change "Play Audio CD" menu item to "Add Audio CD". Only sensitive the options clear and save playlist in the menu of current playlist when there is no selection. Minor code cleanup to coordinate with subversion code. Updates Translations: Update French tranlations thanks to raphaelh. Changed many strings to translate. Please help to update your native language. Bugs fixed: Use cddb_query to search audio cd info. Fix poor results of cddb. Fix possible memory leak when save tags. Fix warning when to year < 0 on tag editor. D'Oh!. Fix add recent files. V0.97.0 News: Return the playback status icon on current playlist. Thanks to Brett Kleinschmidt. Add a popup menu on file entry of tag editor, to open folder and copy selection to title tag, artist tag, etc. Add option to hint current_playlist. Thanks to Brett Kleinschmidt. Add option to activate instant filter or search only when press enter. Add option to sort Albums in library view by release-year. Thanks to Fabian Köster. Others Changes: Save changes when press enter on tag editor. Init gdk_threads and use it to update progress of reproduction. Highlight matches on jump dialog. Minor reformat of jump dialog. Updates Translations: Updated Czech translation thanks to Alois Nespor. Bugs fixed: Remove curl/types.h deprecated header. Immediately update the progress when seek track. No restart the lastfm thread when seek track. No send dbus update signal when seek track. No send dbus update signal when set use sofware volume. Fix pragha ignore audio cd device settings. Always free the path when edit tracks of current playlist. Fix no update current playlist song when change the tags from menu. First update music objects and window, and later the files. Directly compares the pointers to find current tack when edit tags. Use gdk_threads_enter/leave to add files with dbus. Use gdk_threads_enter/leave to show playback error dialog. Show track_no and year only if are positive. Improve the speed of the library view. Update progress bar only when track position > 0. Only jump to tack droped when change the model, and scroll to the same position. Select and set cursor on new song when drop a tack on current playlist. Fix somes memory leaks and occasional cleanup. V0.96.1 Wooow.. Search, jump and play on current playlist dialog implemened. V0.96.0.1 Recontra D'Oh!. Fixs gdk_threads_enter()/gdk_threads_leave() usage. V0.96.0 News: Init Lastfm into (More smooth) thread. Implement Lastfm get similar and add favorites into (More smooth) thread. Better (More smooth) insert tracks from file manager. Better (Much more faster) insert tracks from library tree. Others Changes: Returns the icon in current playlist to show errors. Use Structure Folder view by default. Emit volumes changes on mpris2. Use folder-music to folder structure view. Set cursor when jump to current track. Betters debug messages on lastfm and chartlyrics and comment everything necessary on the status bar. Add recent files info on a idle func. Updates Translations: Add a new translation to Simplified Chinese thanks to ifree. Add a new translation to Greek thanks to koleoptero. Update Dutch translation thanks to tuxmachine. Update Ukrainian thanslation thanks to Sergiy_Gavrylov. Bugs fixed: Remove lastfm connected flag. Use seesion_id instead. Insensitive tree views when change the model. Artist and Comment are array on mpris2 metadata. Fix potential memory leak on mpris2. Change the condition to refresh the saved_title (Fix Metadata emision). Fix lastfm start every time that enter in preferences unnecessarily. Fix calcule midle song lenght minus 5 seconds. Fix add recurive folder with command line. Test realloc on chartlyrics. Remove some unuseles gtk_widget_show/hide_all. V0.95.0.1 Prepend interfece string to PropertiesChanged signal. V0.95.0 News: Add support for MonkeyAudio songs. Now difference between oss4 and oss3. Adds another option to use the default sink. Bugs fixed: Wait 5 seconds to update the current song on lastfm. => Fix crash when rapidly changing songs. => Uses less network when rapidly changing songs. Fix never init Mpris2 interface when init. Start pragha with file arguments. Better debugs messages on playbin constructs. Fix Typos. V0.94.1 News: Implement a dialog to skip tracks if fails playback. Bugs fixed: Compile with Gcc 4.6, with all that this implies. Use _tree_row_references to edit track. Get the files to change quickly, to prevent when finished the song and change the selection. Always check the current song to prevent when finished and change the song. V0.94.0 Special thanks to Vikram Ambrose and Hakan Erduman for answering all my questions. News: Add various demonstration features over Lastfm sevices. * Love track. * Unlove track. * Add favorites. * Artist info. * Get album art. * Add similar. Complete MPRIS2 track list interface. Add option to init MPRIS2 in preferences. Restore Search Lyrics with a dialog using Chartlyrics.com. Add a new popup menu when current playlist is emply. Others Changes: Now depend on external libclastfm >= 0.4 (Optional). Updates Translations: Add Turkisk translation thanks to Hakan. Update Czech translation thanks to Anespor. Bugs fixed: Much more faster when you start with many songs, or add the complete library. Fix bad editing of current playlist items when it is sorted (Issue 21). Fix Segfault after clear playlist and play (Issue 23 and 24). No erase user info when no connect to lastfm. Never init pragha witch -p,-s,-t, -r, -n, -t... command options. Better update album art. Drop unused vars. Note: http://liblastfm.sourceforge.net now is libclastfm due to incompatibility with the official library. V0.93.1: Any change on pragha. But use liblastfm 0.4, that does not depend on libopenssl, incompatible with the GPL So fix Issee 22. :) V0.93 News: Add MPRIS2 control support and emit a dbus signal named 'update_state' thanks to Hakan Erduman. Added a DBus message to toggle the visibility of the player thanks to Hakan Erduman. Restore lastfm scrobbling support thanks to http://liblastfm.sourceforge.net/. * Use Scrobbling API 2.0. * Now is correctly identified like Pragha. Bugs fixed: Fix regression on generation of recently-used data introduced in 241. Support to libnotify 0.7. (Hate it with all my heart.) Again, change notifications according to the standard. (xfce4-notifyd follows strictly) Updates Translations: Updated Czech translation thank to Alois. Note: Temporarily disables search lyrics, by license change of http://www.lyricsplugin.com. V0.92 News: Use cubic volume if available (Need gstreamer-plugins-base-devel). Sink volume with audio backend changes. "Restore" replace and play option. Others Changes: Depend on external libkeybinder (Optional). Bugs fixed: Disable "Add actions.." options if the notifier does not support it. Updates Translations: Add Hungiran translatiton. Update others translation. V0.91 News: Ported to use gstreamer. Benefit? :) * Add support for new formats: So far wma and m4a. Please checks support to m4a. I no have any m4a file to test. ;) * Add a new pulseaudio backend. * Now it's free!. Can be packaged for fedora for example, since not depend directly of libmad. Regressions: :( * Lastfm not working. Soon fix it using https://github.com/felipec/libscrobbler. Adding librefm and love support. * Lost Mod file support. Sorry.. but someone used it? In fact very easy to add support for this. Maybe fix it later. Then, everything else should work. :) ========================================================== OTHERS REALESES BASED ON ORIGINAL CONSONANCE AUDIO ENGINE: ========================================================== V0.8.3 News: Move to trash instead remove tracks in library view. Add dialog to Skip, Skip all, or delete all tracks if fails move to trash. Remember last sidebar pane used. Others Changes: Delete folders in library preferences pressing Delete Key. Delete track from library items in library view pressing Delete Key. Changed design of notifications, now more in line to pragha panel. Add GTK_STOCK_JUMP_TO icon to open folders in tag editor dialog. Use GTK_STOCK_EDIT icon to Edit tags menu. Updates Translations: Update Swedish thanks to monotux. Update German thanks to Cwickert. Update po files. Bugs fixed: Remove unnecessary gtk_widget_add_events. Romove unnesessary validate entry to year and track gtk_spins. Use GTK_DIALOG_DESTROY_WITH_PARENT in dialogs. Place the cursor at the end of the filename entry. No save fuse option if not folders view is activate. Fix tiny memory leak. V0.8.2 News: Add filename entry to tag editor dialog with a open folder icon. Add Details button to tag editor dialog that open the properties dialog. Update current playlist when edit tags. => No More eliminate the edited tracks => Not more lost in queue list when you edit a file!, & NOT lose the currently played song!, and a tiny more speed. Others Changes: Add VERY basic session management support. Add spinner when update/rescan music db if Gtk >= 2.20. Add folder label to properties dialog. Grab focus when clear entrys. Updates Translations: Update de, es, and ru tranlations. Update po files. Bugs fixed: Fix small spelling mistake. thank to c_k...@gmx.de. D'Oh!. Add Dutch translatition in subversion. Initialized pointers!. Remove unused vars. V0.8.1 News: Add Translate Pragha (Link to Transifex) in Help menu. New "Associate notifications to system tray" option. New "Show Album art in notifications" option. New "Add actions to change track to notifications" option. Others Changes: Rework preferences dialog. Reformat Notifications like rythombox, amarok, clementine, etc, etc. Updates Translations: Add Dutch translatition. Thanks to Zenlord. Update Brazilian Portuguese translation. Thanks to Secipolla. Update Rusian translation. Thanks to Pendalf. Update Czech translation. Thanks to Alois Nešpor. Update German translation. Thanks to Cwickert. Update po files. Bugs fixed: Fix typo thanks to Timm Bäder. Expand only comment field when change window size in edit tag dialog. V0.8.0.2 Update German translation. Thanks to Christoph Wickert. Disable Global keybindings if gtk < 2.20. Add "Pragha Music Player" to the sumary of notifications and so displayed correctly. In notify-osd for example. Eliminate previous incompatible db only if minor to 0.8.0. Drop "Folder structure" bad string. V0.8.0.1 Eliminate previous incompatible db. Show message dialog to rescand libray. V0.8.0 News: Folder / Files library view replaced by Foders Estructure. (like in foobar2000) (1) Add option to merge folders in folders estructure view. Add support for comments. Optimizations. Use gtk_tree_store_prepend rather than gtk_tree_store_append. Use fixed size in cell renderers of current playlist. Use g_timeout_add_seconds to update progress when scan the library. Prepend refs to crop playlist. Others Changes: Now is Pragha Music Player instead Pragha Music Manager. When change songs not scroll to the new path if already visible. When you drag songs where they are dropped. Use gnome-mime-audio icon to library_tree, and playlist_tree if exitst. Bugs fixed: Order with case insensitive in library view. Preventing incomplete icon themes, restore Album png. Check system tray before sending notifications. Use correct PULSE_PROP_media.role audio, instead music. Use Singly-Linked List in queue list. Remove useless compilation flag in db. (1) Again thank you very much to Roberto DMD. A new feature that everyone loved. Update po files. V0.7.7.1 Fix Issue 14: Pragha can not remember the starting position. Remember correctly window position when click status icon or close window. Never add files recursively with dbus and command line. Freeze Pragha. V0.7.7 News: Global keybindings thanks to keybinder. Inspired on osdlyrics Updates Translations: Add Brazilian Portuguese translation. Thanks to Sergio Cipolla. Bugs fixed: Fix display files with non-utf8 locale. Thanks to Roberto DMD. Fix open urls without gvfs. Thanks to Roberto DMD. Add files recursively with dbus and command line according to preferences. Shows album art when playing audio cd D'Oh!. No remember Close to tray option. V0.7.6 News: Drag'n drop several items in Library/Playlist/Current_playlist. Very thanks to Guillaume Royer. Add files to the current playlist by dragging them from file browser. Very thanks to Guillaume Royer. Drag files over current playlist to any file browser to copy this. Others Changes: Add option to add files recurvively in preferences dialogs. Use <Alt>Right" and "<Alt>Left", as default keyboard shortcuts for Previous/Next. Remember sidebar size when restart. Bugs fixed: Refilter library view according to search entry, when switching library order. Only insensitive search entry when switching library order. Remove the redundant Save Playlist/Clear/Jump To/Searchbar toolbar. Insensitive Properties menu entry, instead hide it when several items are selected. Unselect all when click over when click over no song. No resize panel, when change windows size. Make NEWS Distributable. Remove unused variables. V0.7.5.2 Update Polish translation. Thanks to Sid. V0.7.5.1 Update German translation. Thanks to PhotonX. New album unknown icon. Provisory.(Does not look good with dark themes) V0.7.5 News: Add confirmation dialog. to "Delete from..", menu entries. Leave the checkbox automatically when change a tag in edit track dialog. Adds an icon to clear the tags entry in edit track dialog. Hack in the representation of album art. Others Changes: Expand all row in library tree when double click Use GTK_STOCK_LEAVE_FULLSCREEN button adding text and translations. Unsensitive librarytree and search_entry when updating. Updates Translations: Add initial Swedish language. Thanks to Zwopper. Update Czech translation. Thanks to Alois. Bugs fixed: Fix Issue 10. Several critical warnings when first init. Add files when double-clicking or pressing enter in filechooser. Keep the open file dialog on top of the main window, Do not use gtk_tree_view_column_set_cell_data_func(). Performance problem. No more play/pause pixbuf in currente playlist. No update song information all the time. Capitalise and translate window title. Rework toogle_main_window. Unref notification when close it. Unref Cover in unset_album_art Fix memleak in panel. V0.7.4 Add next action to notifications. Improved time library indexing. Add option to start pragha minimized, fullscreen, or remember the last window state. Inspired in Nathan Wayde patch. Thanks!. Add option to minimize pragha when close window. Add button in panel to leave fullscreen. Others Changes: Set the labels to wrap on display properties dialog. Thanks to Nathan Wayde. New Layout of edit track dialog. Use AM_SILENT_RULES if available. Updates Translations: German translation thanks to PhotonX. Polish translation thanks to Sid. Update po files. Bugs fixed: Now work queue list when sequential playlist. Hide sidebar when restore mainwindow and originally no showed. Hide album art when restore mainwindow if set to no show. Fixes some memory leaks. V0.7.3 Drop File Pane in favor of gtk-file-chooser. Support for adding folders recursively in file chooser. (Based on Audacius code. /src/ui_fileopen.c) Support for recent files in file chooser. Now remember last folder used. Others Changes: Middle click on the library/playlists view append songs to current playlist. Queue and dequeue pressing 'Q'. If pragha minimized or without focus, when clicked statusicon restore mainwindow focus. Now the second panel is the playlists. Drop album.png in favor of the icon theme instaled. Updates Translations: Spanish translation thanks to msdelos. Polish translation thanks to Sid. Update po files. Bugs fixed: Use g_get_user_config_dir() instead of g_get_home_dir() and then concatenating "/.config". Thanks to Sebcactus. OK/Cancel buttons in Edit Tags and Save Playlist dialog are inverted. When move around the library with the keyboard, this does not advance. V0.7.2 Basic queue playlist support!-) Now you can add and remove multiple songs to be played. (Special thanks to Christian Hergert by gtkcellrendererbubble.) Others Changes: Use Desktop file XDG compliant. Thanks to Christoph. Use shared files XDG compliant. Thanks to Christoph. Restore 'Shuffle' and 'Repeat' options in the panel. Add 'Current play time' in the systray tooltip. Notifications, more consistent at the systray tooltips. Move 'Add the library' menu item to 'Tools' menu. Move 'Connect to CDDB server' option to 'General' tab. Use Control+space to play and pause. Remove 'Show Hidden Files in File View' preferences option, and add 'show hidden files' menu item, to popup menu of file pane. Updates Translations: Portuguese translation thanks to Lyceuhns. Spanish translation thanks to msdelos. Bugs fixed: Fixs GDK_Delete no work in search entry. Note: When playing songs from the play queue, deletes references to previous songs. V0.7.1.1: Update of french translation thank to Aloïs Halel. V0.7.1 Rework all menus. Use more advisable names: "Add to playlist" instead "Equeque", "Replace playlist" instead "Play", etc. Use betters icon: GTK_STOCK_ADD instead GTK_STOCK_COPY when add music, NULL instead GTK_STOCK_PLAY when replace playlist, etc. Add betters accelerators: <Control>R to repeat, <Control>Y to search lyrics, etc. Now activate the panels from the menu bar. New properties of current song in menu bar and status icon. Clear Sort in Current playlist header_context_menu. Others Changes: Add option to search lyrics using http://www.lyricsplugin.com. Add more tooltips. Add Fullscreen option. Add Options to hide status bar. A new icon of pragha. Updates Translations: Rusian translation thanks to Evgen. Czech translation thanks to alois.nespor. Japanese translation thanks to Masato Hashimoto. Spanish translation thanks to msdelos. German translation thanks to PhotonX. Bugs fixed: When create search entry, no sensitive claer icon. Show "track" (Before show "tracks") in statusbar when unique song in playlist. No show track no in playlist, when is zero. Show filename in playlist when unknown title tag. V0.7.0 Now depends on gtk >= 2.16. Thank to this: * Eliminate eggtrayicon and sexyentry. * Add new tooltip in statusicon with the album art of the reproduced song. * The executable, and the memory consumption one was reduced. Others Changes: Command "pragha -t", play pause and resume. Save and restore software mixer volume. Better layout of Preferences Dialog. Optimization when search library_tree. Use gtk_show_uri to lauch Browser. Remove "Library View Menu". Updates Translations: Add Polish translation thanks to Krzysztof Komorowski. Add Norwegian language, thanks to Kim. Add translator-credits to About Dialog. Bugs fixed: Fix crash when click "go to current track". Fix criticals warnings when run and compile pragha. Fix pragha.desktop file. V0.6.3.1 Fix bug (Great like a house) in Libraryview. Add French translation, thanks to Alois Halel. V0.6.3 Add remaining time mode to panel. Pragha remeber and showed last played song. Small optimization in library_tree. Fixs critical warnings. Updated czech translation by Alois Nespor. 0.6.2.2 Add German translation, thanks to PhotonX Drops some strings "Tracks" confused. 0.6.2.1 Add russian and ukrainian language, thanks to Evgen. V0.6.2 Pargha is 100% translatable one. Add Japanese translation. - Tanks Masato hashimoto, Xfce-i18n team_ja. Add czech translation. - Tanks alois.nespor. Add Portuguese-Brazil. - Tanks Lyceuhns. Add option to resize album art in preferences. V0.6.1 International Support (ES) V0.6.0 Now is Pragha Music Manager!-) v0.5.93 Sync systray and panel volume. Fix icon of consonance in gnome_main_menu and xfce menu. Small adjustments in the language. v0.5.92 Problem of the panel background image fixed. Elimine Spanish. v0.5.91 / v0.5.90 Other gui Incress and decress volume level in systray, Play/Pasue/Resume with central click of mouse... notifications only are if consonance not this in first plane and new text layout A new button "jump to now playing" In help menu show link to Consonance homepage, a Nonofficial wiki and forum.. v0.5.1 Support for deleting library entries. v0.5 Audio CD playback / CDDB support. Audio device selection (ALSA/OSS). Last.fm submission. Playlist Export (M3U) v0.4.1 Fix a Gthread initialization bug v0.4 Modplug support ( By woolf.linux@bumiller.com ) Tag Editing. UTF-8 support. Command line option to choose audio backend. DnD on 64-bit platforms ( Bugfix ) A new manpage ( By Martin Zelaia <martintxo@sindominio.net ) v0.3.1 OSS support. Software mixer support. Current playlist search. Save/Restore current playlist. Command line option (consonance -c) to get player state. Library updation feature. User defined album art file pattern. v0.3 Add FLAC, WAV, OGG support. (FLAC support by Jared Casper <jaredcasper@gmail.com>) DnD support. Playlist management. Search through library (simple). v0.2 0.2 released. v0.1 0.1 released. ��������������������������������������������������������������������������pragha-1.3.4/README���������������������������������������������������������������������������������0000664�0000000�0000000�00000005065�13435240150�0013644�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������Pragha is a Lightweight Music Player for GNU/Linux, based on Gtk, sqlite, and completely written in C, constructed to be fast, light, and simultaneously tries to be complete without obstructing the daily work. ;) A tiny history of the project.? Consonance, An excellent player emerged in the archlinux forums, was discontinued. The author, Sacamano said in his blog: "Which doesn't mean that it won't be maintained. I would still be fixing bugs, but major feature additions are not in the pipeline, because I have completed all that I wanted to see in Consonance. It has been a fun project. :)" Well.. Dissonance is the project to continue developing Consonance, and its result is Pragha Music Player. A New reproducer of music.. ;) Main features: * Full integration with GTK+3, but always completely independent of gnome or xfce. * Two panel desing inspired on Amarok 1.4. Library and current playlist. * Library with multiple views, according tags or folder structure. * Search, filtering and queue songs on current playlist. * Playing and edit tag of mp3, m4a, ogg, flac, asf, wma, and ape files. Limited only by codecs installed and taglib version used. * Playlist management: Exporting M3U and read M3U, PLS, XSPF and WAX playlists. * Playback control with command line. Extensible by plugins: * AcoustID: Get metadata on AcoustID service. * CD-ROM: Play audio CDs and identifies this with CDDB. * DLNA Server: Share your playlist on a DLNA server. * DLNA Renderer: Play music of a DLNA server. * Gnome-Media-Keys: Control pragha with gnome-media-keys daemon. * Global Hotkeys: Control pragha with multimedia keys. * Last.fm: Scrobbling, love, unlove song, and append similar song to get related playlists. * MPRIS2: Control pragha with mpris2 interface. * Mtp Devices: Basic Management of MTP devices. * Notification: Show notification when change songs. * Removable media: Detect removable media and scan it. * Song-info: Get Artist info, Lyrics and Album arts of yours songs. * Get radios: Search radios on TuneIn service. Requirements: * gtk+-3.0 >= 3.8, glib-2.0 >= 2.36 * gstreamer-1.0 >= 1.0, gstreamer-base-1.0 >= 1.0 * taglib >= 1.8 * sqlite3 >= 3.4 Optional: * libpeas-1.0 >= 1.0.0 and libpeas-gtk-1.0 >= 1.0.0: Required for all plugins. * libxfce4ui >= 4.11.0: Better session managament support. Save the current playlist, last posicion when save session, etc. * totem-plparser >= 2.26: Support to open many more format and internet radios playlist. * gstreamer-plugins-base-devel >= 1.0: Use cubic volume to a better control of volume. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/autogen.sh�����������������������������������������������������������������������������0000775�0000000�0000000�00000000272�13435240150�0014760�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/bin/sh echo "Running Xfce Developer Tools..." xdt-autogen $@ if [ $? -ne 0 ]; then echo "xdt-autogen Failed" echo "Prease, install xfce4-dev-tools" echo "or verify Errors" fi ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/configure.ac���������������������������������������������������������������������������0000664�0000000�0000000�00000025047�13435240150�0015254�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl configure.ac dnl dnl Pragha - A Lightweight Music Player for GNU/Linux dnl dnl Version information m4_define([pragha_version_major], [1]) m4_define([pragha_version_minor], [3]) m4_define([pragha_version_micro], [4]) m4_define([pragha_version], [pragha_version_major().pragha_version_minor().pragha_version_micro()]) dnl Initialize autoconf AC_COPYRIGHT([Copyright (c) 2009-2019 Matias De lellis <mati86dl@gmail.com>]) AC_INIT([pragha], [pragha_version()], [mati86dl@gmail.com]) AC_CONFIG_HEADERS([config.h]) dnl Initialize automake AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2]) AM_MAINTAINER_MODE() dnl Set required and max glib/gdk versions AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_8, [Ignore post 3.10 deprecations]) AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_10, [Ignore post 3.10 deprecations]) dnl ********************* dnl * Debugging support * dnl ********************* AC_ARG_ENABLE(debug,[ --enable-debug Turn on debugging],[ case "${enableval}" in yes) debug=true ; CFLAGS="$CFLAGS -DDEBUG -D_DEBUG -g -ggdb -O0 -fno-inline -fno-inline-functions" ;; no) debug=false ; CFLAGS="$CFLAGS -DNDEBUG" ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; esac ],[ debug=false CFLAGS="$CFLAGS -DNDEBUG" ]) case "${host}" in i[[3456789]]86-mingw32*) WIN32="yes" ;; *cygwin*) WIN32="yes" ;; *) WIN32="no" ;; esac AM_CONDITIONAL([WIN32], test "$WIN32" = "yes") if test x"$WIN32" = x"yes"; then AC_CHECK_TOOL(WINDRES, windres) fi AC_SUBST(CFLAGS) PLUGIN_LIBTOOL_FLAGS="-avoid-version -module -shared -export-dynamic -no-undefined" AC_SUBST(PLUGIN_LIBTOOL_FLAGS) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Check for basic programs AC_PROG_CC() AM_PROG_CC_C_O() AC_PROG_INSTALL() IT_PROG_INTLTOOL() dnl Initialize libtool LT_PREREQ([2.2.6]) LT_INIT([disable-static]) dnl Check for i18n support XDT_I18N([bg ca_ES cs de es el fr hu it ja ko_KR lt nl no pl pt pt_BR ru sv tr uk vi zh_CN]) GSTREAMER_REQUIRED=0.11.90 dnl Check for required packages XDT_CHECK_PACKAGE([GSTREAMER], [gstreamer-1.0], [$GSTREAMER_REQUIRED]) XDT_CHECK_PACKAGE([GSTREAMER_BASE], [gstreamer-base-1.0], [$GSTREAMER_REQUIRED]) XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.36]) XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.8.0]) XDT_CHECK_PACKAGE([SQLITE3], [sqlite3], [3.4]) XDT_CHECK_PACKAGE([TAGLIB_C], [taglib_c], [1.8]) dnl Check peas library to plugins support LIBPEAS_FOUND="no" XDT_CHECK_OPTIONAL_PACKAGE([LIBPEAS], [libpeas-1.0], [1.0.0], [libpeas-1.0], [libpeas-1.0 library], [yes]) if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_PACKAGE([LIBPEAS_GTK], [libpeas-gtk-1.0], [1.0.0]) fi dnl Check notify support LIBNOTIFY_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBNOTIFY], [libnotify], [0.7.5], [libnotify], [libnotify library], [yes]) else AM_CONDITIONAL([HAVE_LIBNOTIFY], 0) fi dnl Check global keyboard shortcuts support LIBKEYBINDER_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBKEYBINDER], [keybinder-3.0], [0.2.0], [keybinder], [keybinder library], [yes]) else AM_CONDITIONAL([HAVE_LIBKEYBINDER], 0) fi dnl Check libglyr LIBGLYR_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBGLYR], [libglyr], [1.0.1], [libglyr], [libglyr library], [yes]) else AM_CONDITIONAL([HAVE_LIBGLYR], 0) fi GUDEV_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([GUDEV], [gudev-1.0], [145], [gudev-1.0], [gudev-1.0 library], [yes]) else AM_CONDITIONAL([HAVE_GUDEV], 0) fi LIBMTP_FOUND="no" if test x"$GUDEV_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBMTP], [libmtp], [1.1.0], [libmtp], [libmtp library], [yes]) else AM_CONDITIONAL([HAVE_LIBMTP], 0) fi dnl Check libpsuop LIBSOUP_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBSOUP], [libsoup-2.4], [2.38], [libsoup-2.4], [libsoup-2.4 library], [yes]) else AM_CONDITIONAL([HAVE_LIBSOUP], 0) fi dnl Check rygel RYGEL_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([RYGEL], [rygel-server-2.6], [0.20.0], [rygel-server-2.6], [rygel-server-2.6 library], [yes]) else AM_CONDITIONAL([HAVE_RYGEL], 0) fi dnl Check grilo GRILO_FOUND="no" GRILO3_FOUND="no" GRILO2_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([GRILO3], [grilo-0.3], [0.3.0], [grilo-0.3], [grilo-0.3 library], [yes]) if test x"$GRILO3_FOUND" = x"no"; then XDT_CHECK_OPTIONAL_PACKAGE([GRILO2], [grilo-0.2], [0.2.11], [grilo-0.2], [grilo-0.2 library], [yes]) else AM_CONDITIONAL([HAVE_GRILO2], 0) fi else AM_CONDITIONAL([HAVE_GRILO3], 0) AM_CONDITIONAL([HAVE_GRILO2], 0) fi if test x"$GRILO3_FOUND" = x"yes"; then GRILO_FOUND="yes" fi if test x"$GRILO2_FOUND" = x"yes"; then GRILO_FOUND="yes" fi dnl Check libclastfm LIBCLASTFM_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBCLASTFM], [libclastfm], [0.5], [libclastfm], [libclastfm library], [yes]) else AM_CONDITIONAL([HAVE_LIBCLASTFM], 0) fi dnl Check libcdio, libcdio_paranoia and libcddb LIBCDIO_FOUND="no" LIBCDIO_PARANOIA_FOUND="no" LIBCDDB_FOUND="no" if test x"$LIBPEAS_FOUND" = x"yes"; then XDT_CHECK_OPTIONAL_PACKAGE([LIBCDIO], [libcdio], [0.80], [libcdio], [libcdio library], [yes]) XDT_CHECK_OPTIONAL_PACKAGE([LIBCDIO_PARANOIA], [libcdio_paranoia], [0.90], [libcdio_paranoia], [libcdio_paranoia library], [yes]) XDT_CHECK_OPTIONAL_PACKAGE([LIBCDDB], [libcddb], [1.3.0], [libcddb], [libcddb library], [yes]) else AM_CONDITIONAL([HAVE_LIBCDIO], 0) AM_CONDITIONAL([HAVE_LIBCDIO_PARANOIA], 0) AM_CONDITIONAL([HAVE_LIBCDDB], 0) fi CDROM_SUPPORT="no" if test x"$LIBCDIO_FOUND" = x"yes"; then if test x"$LIBCDIO_PARANOIA_FOUND" = x"yes"; then if test x"$LIBCDDB_FOUND" = x"yes"; then CDROM_SUPPORT="yes" fi fi fi dnl Check gstreamer-audio GSTREAMER_AUDIO_FOUND="no" XDT_CHECK_OPTIONAL_PACKAGE([GSTREAMER_AUDIO], [gstreamer-audio-1.0], [$GSTREAMER_REQUIRED], [gstreamer-audio], [gstreamer-audio], [yes]) dnl Check libxfce4ui LIBXFCE4UI_FOUND="no" XDT_CHECK_OPTIONAL_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0], [libxfce4ui], [libxfce4ui library], [yes]) dnl Check totem-pl-parser PLPARSER_FOUND="no" XDT_CHECK_OPTIONAL_PACKAGE([PLPARSER], [totem-plparser], [2.26], [totem-plparser], [totem-plparser library], [yes]) dnl Output files AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([data/Makefile]) AC_CONFIG_FILES([data/icons/Makefile]) AC_CONFIG_FILES([data/icons/16x16/Makefile]) AC_CONFIG_FILES([data/icons/24x24/Makefile]) AC_CONFIG_FILES([data/icons/32x32/Makefile]) AC_CONFIG_FILES([data/icons/48x48/Makefile]) AC_CONFIG_FILES([data/icons/64x64/Makefile]) AC_CONFIG_FILES([data/icons/128x128/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) AC_CONFIG_FILES([src/Makefile]) if test x"$LIBPEAS_FOUND" = x"yes"; then AC_CONFIG_FILES([plugins/Makefile]) AC_CONFIG_FILES([plugins/acoustid/Makefile]) AC_CONFIG_FILES([plugins/mpris2/Makefile]) AC_CONFIG_FILES([plugins/keybinder/Makefile]) AC_CONFIG_FILES([plugins/gnome-media-keys/Makefile]) AC_CONFIG_FILES([plugins/song-info/Makefile]) AC_CONFIG_FILES([plugins/notify/Makefile]) AC_CONFIG_FILES([plugins/devices/Makefile]) AC_CONFIG_FILES([plugins/mtp/Makefile]) AC_CONFIG_FILES([plugins/removable-media/Makefile]) AC_CONFIG_FILES([plugins/tunein/Makefile]) AC_CONFIG_FILES([plugins/dlna/Makefile]) AC_CONFIG_FILES([plugins/dlna-renderer/Makefile]) AC_CONFIG_FILES([plugins/cdrom/Makefile]) AC_CONFIG_FILES([plugins/lastfm/Makefile]) fi AC_OUTPUT echo "" echo "Build Configuration for $PACKAGE version $VERSION" echo "" echo " Gtk version used......: $GTK_VERSION" echo " Prefix................: ${prefix}" echo " Debug enabled.........: $debug" echo "" echo " Plugins enabled.......: $LIBPEAS_FOUND" echo " * Show notification when change songs..........(Need libnotify >= 0.7.5).: $LIBNOTIFY_FOUND" echo " * Controls Pragha using Mpris2 interface.................................: $LIBPEAS_FOUND" echo " * Controls Pragha using gnome-media-keys interface.......................: $LIBPEAS_FOUND" echo " * Play Audio cds...............(Need libcdio, libcdio_paranoia, libcddb).: $CDROM_SUPPORT" echo " * Controls Pragha using multimedia keys....(Need keybinder-3.0 >= 0.2.0).: $LIBKEYBINDER_FOUND" echo " * Search lyrics, artists info and albums art.....(Need libglyr >= 1.0.1).: $LIBGLYR_FOUND" echo " * Search metadata on AcoustID.....................(Need libsoup >= 2.38).: $LIBSOUP_FOUND" echo " * Search radios on TuneIn.........................(Need libsoup >= 2.38).: $LIBSOUP_FOUND" echo " * Share music library on DLNA............(Need rygel-server-2.6 >= 0.20).: $RYGEL_FOUND" echo " * Play songs on DLNA Servers......................(Need grilo >= 0.2.11).: $GRILO_FOUND" echo " * Lastfm scroble, and add similar songs support (Need libclastfm >= 0.5).: $LIBCLASTFM_FOUND" echo " * EXPERIMENTAL management of removable devices..........(Need gudev-1.0).: $GUDEV_FOUND" echo " * EXPERIMENTAL management of mtp devices....:(Need gudev-1.0 and libmtp).: $LIBMTP_FOUND" echo "" echo " Others build options..:" echo " * Cubic volume support.....................(Need gstreamer-plugins-base).: $GSTREAMER_AUDIO_FOUND" echo " * Better session management support........(Need libxfce4ui-2 >= 4.11.0).: $LIBXFCE4UI_FOUND" echo " * Use totem-pl-parser to open playlists....(Need totem-plparser >= 2.26).: $PLPARSER_FOUND" echo ""�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/����������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0013667�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/.gitignore������������������������������������������������������������������������0000664�0000000�0000000�00000000017�13435240150�0015655�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha.desktop �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/Makefile.am�����������������������������������������������������������������������0000664�0000000�0000000�00000000767�13435240150�0015735�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������SUBDIRS = icons appdatadir = $(datadir)/appdata dist_appdata_DATA = pragha.appdata.xml desktopdir=$(datadir)/applications desktop_in_files = pragha.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ imagedir = $(datadir)/pixmaps/pragha image_DATA = \ album.png \ artist.png \ track.png \ cover.png \ genre.png man_MANS = pragha.1 EXTRA_DIST = \ $(desktop_in_files) \ $(image_DATA) \ $(man_MANS) CLEANFILES = \ $(desktop_DATA) ���������pragha-1.3.4/data/album.png�������������������������������������������������������������������������0000664�0000000�0000000�00000041164�13435240150�0015503�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������Lr���sBIT|d��� pHYs��=��=U���tEXtSoftware�www.inkscape.org<�� �IDATxyeYzlC8Aш02.z8^^u;(nxuTe q f!$1鄤;KwsQԩӝSzk9uުS<nBQ"  !�Z* H   i`�-'sK7pX<(ʶbW$gJQ\ \ ]5*T@o��/)[伌jE XBGŨ6G5 Ey9@zSPA`7SEQ֖6;"J1X LG-)�Pl6K6-j> 4&4p([KDB�_'IH$b1,LF[i_Vԙi@t)!Dp;I`XYYTTTPV-T{o*2P̌E :H!6gL/++c̘1דH$r&.ػEyԙΊ@4b2oP�رcvvn( )uf"uB~\@NOASS455('Q$31EQ^/ufp\২'�555L<k\bZ!\}fH� !^>(+%S5AB\ #3k,Z[[,Z:4\`biEQ^.uJQ *�hlldܹ4PZ?\T�/ !�>(SP5@B~ LƍimmkVก- (GS VQͥP4*@\E2t+nbE5j*I(w.QqԪJcrWj0Xb[E)|�xVEQ/u D!T`%@L2K/e…Zp '(öfEV1OO_�)*N;1^cZ̙3KR]]WPn Q !π[E9i/:&-[ƴi�tx taX(pcj !>(Jtڀ(XH$Xd /FEBj ZFeE[B<(Rg& xs]�fΜ?A#�*HQq p2»^h3A x{ҥK57T~܂Ug$`fe !n�hhhV4V^bP"5*rc3G#D!D0w\>Ohݒ�BmkYE׺!^(J{3E# D!čɹ_=y{ByސW0\V2hp\i"KEQ*ufjĀ(.6о[9묳4+;`fX`F$Bq(/ufhD(5A~6͝3d](.G9YE_G!EQ>X8i؃(x uTlwr-(Wi† f$_%EQ.+uF4lAjWY�_=˗/2WÄ aYEߺT:0O=9%B`"8}{_B;.kdCLي+uf9R\ !&?>(ӧ4;/ vrH4؝{džկ*�g.rg>f@9m[@/R ;rڰѰQ#*jkk׿΂ �|eN0ʵ^-cdCU. _T H455o|3g-#9(^;:Y*ܻWrDf6wy''N̋yk1qõmNP+ut)*͹w*)Bx +//+_֠0 _PP;.5�8wq3fN?! ~F6R*0j<PK ! $p/j殆Ub[=-BT_^:^�G]gji?b@gu~t7⢃(>�^{-\sMtk|ئ`ss3nVFV NbiQAB|{+nixz�݂ T' 2ssNKY!NJEQ͊7og3M2hپbl{SelH3[o!D^#n:A+FSt*;Zwʵf#8�^BLTھ(Q=b1nVjjj,瓷Av|ۦBO h xϸ !>Hn뮻3fXg̀skjmdw3N$7pu!UPT O,[,{NUnٍĒB W2O}S(7 XhWf_ʠeG}~�Tp%QˋӕM~S0TLB;*.|e ~_eG}fEPϻ Q�W_}V.st`er5�=Yn;ݓW(%#M~> U\�ӧO]zW`@4a/rJc:Rs!D(:BDn!\h9-TvAr7ܫs"L(! P{;pWب?d^07^9~ʎ ݳ')t}u|PE|566rWXN `,Gfy.V2RB(` D6>`ٲe!gg}.omLd^B'L(#Ds ! E D!D7YfqgAhlF+i -VXABA4CF*<BaY_Ud2/J*T#e;Tn_x//eE/B3 J``` t+)UB%`50Bt%h 톪wn].'統x.՟>d8~8ǎĉHEu<!+Aޗ0,y睧YC7ZYGREY-< �|n(x70 `ɒ%(bj x_ Ͷĉs!Dv GL06SkEMQ§1mum;9r7|.74w'_ӾQq p&… 2<D'ͶDM5q(tttsNvE _Qa|^C#E1@ss3--- ƴ~ ;r3Z%:;;ٴiǏx#@}X~Bs�sLF:Yu=z*ؼy3vX#| #X*466jeC#^ˉah媺lP*@޽M6Jy3tzxAB 0wܼ(qm]K:EQT(Tk^Q",-D"; hmmuFhUI9(n7 �>/Loo4@W*zQ16؂'[Ͷ[gbk׿M6 Hˀ!^VѫE! M nW,|^rm%䥗^b߾}]Q$|uQWV5Bn)ShB3ʈ^ST1.T{CCQb@q6y�UB5sI +*nիWsQ,%I*++rחk9]IT-.Z۸Qo�MMMqS\0ZڄEkĉ<y\%VZ[[ihhرcs:;;rmEU=QQ娝sΥEs/cX^lm厚~뵬6jժCL&?~<---P^^[*:rH$yK<}R):::8p�ea=Ðn]ӿx!R%tcʎ^,bXQT62J3ٳgܬ=l6uu ?X6&TUUQUUEee%&MbĉdY:ĶmJrŁ DG(g6773cƌ!V:^`tr]U^~Umm-gϦ!t~g~!/k&IE^{~(ԛ|] @ ̙CCC\PT?1$7l6?]_ۭ*++9s&'N$188K3z$l}}BxRP+bYuMsA�LCo9n]BhR͡CX^^ә2e:vX_K/cjCsQUUE]]'N={sΨlp �(H[>[(:Ǐ-zpOݔrg 5Ȃ (++CQzzzJfqn6ON:f͚5<>|X;^]]MMM XT*ƍ,I^O#uSQSs̜9!giZ*T7qҤI̞=X,Foo/'O,i>/^LYY7n䩧b޽ %Lm۶i"B`(u +//34a]Z/(L8pqٳg3qDE_(�PWWɓ3f ں.8z޳g'NrjJJ۶m=wTw}m۶ҿ~Ur*0+n,-mI}뭷Xnꨲ2͛q 2^N4. /9sYu,k֬aڵٳgH>/RoF:OrJ,xzb]]]꫁PF^.@q`b9p(?~<Q쀴[a}o?O>d(/XMM sUUUizzz<Yɓ'sWsڪ~ 5kXjUx .k�ϡCBP[[K2W^yhN# �@(C"` ?ϜH$,Ae5w,jkkY`dT*) 3~xnf,Y29A(\o3rSbƌ:}͛A֯_9z`-*y@IJKX ~/0vvv /xzf*++cѢETTTں666r7wd2 kZ j*z!mX,_;N@uU_/j>֭[�DO@,ӫ2B "ZY ' E3 hx�b,_믿ݧ](3KOMS<+VКӝwy|ZtuժUwՕq16mM^oFOO+@�DCCC\Ѡ^\\.iٰagzJ3gԆtVWWswp¼<qi+9՗ʵ>a.NT'7jkkӟ4ƍ??yǴ{8p۷;'7mzEjZb1m 09~Z0>X}F?eZYڸܹ3mkkcdYW&L; ,0>wWW.\w]&L�Twu۶m]z^z)6Wp h}5f N0a L6 EQs.\oڋVVPYyn?o6h"@?Z|9gֺ)ӵhk$G݄Xޏ25͕w$nˇn1nܸk H$w'\lrv_vyqK,?OXr%FTc7M8@<t:͆ PN4q۫u3sF+f=urM;;;?er-,![ �?TTT|d2L$L2%G.Ea-< N�:ggEUUdY'N _{UNĉ8x ?OPqƱl2�4lf $PDEA Z!vf~4uT�Gkjj򗿬 [(Sm;嫲/�}v^z%�.]A*|6lur QQ'tzuO:t萣+iZfx1fbvm8^ӯ%/ujiioZ7ѣb1nfb1s6Z_E¸aQ�P%47ԬhvpI*ZtM̟?pq 馛�mC= 3ƅE4}zuOM@CC}V?~<}Q^-_XҨkyf6n.u h)6"5qԚS魣 xNA+ԋ{t^e˗kW79nA^,Y|ԑ?| *+[D[^vUNy ^ U:Z)SpeyB~Vg/^USkn.]WU[[k ݒb euq*'= Ғ B }myA'ʊ�O=�}g$Y!,Tb0".zE+)>d%`ԗtّ="fҚb5E1k,�^um<ŋG>#"Rl,BW㮺 ҉5HP__O6mOfƭÔ^׮] Drl6K}}=O{ h5갫Rc32|1c򏕒ɤ /Z)_H8ϟud޺u+v9s&BƌS<p`tMsMmbMoO1[kUV eguu(( LokS̛78"R5@Bhuԋiicf(\$;Z)h$ fܹ (ʋJ^(HYd&aݡ7et,v&L:~> DɲR-#{7Ўg2$ZH*k |8_fHpSyy+<D1(-4xhnnv:::;_[^^8TzXIJB 4H B$_ .;vhѨ3gnzL>3 # ʅfuQa{- ;v- :P̂5&#. q[ÔݽG *" D); p H O)vME樈@< M?R ZNØwS?kzc_bF8_y=Ї>Ĺ{*?o|fcy0Zn]Ӱ-jbO}L <\}EGd}+5}=bxͤ운mi_N.jTA|"'OEtD K\EY( BJBQVqKrp& .޹sg`Qww3D"1P_1i640V4?3pjmIӦPA ث7tS6U*EQsolY;ݻ"P=n<2$DD"A2O.x\[ As_-XVTWWkU =z)βҍ7;v _|�=z R+6|VQ)T_D $_"c8qc浤{ fկNzWRh�1[Bg3s�)#-ba\V, 9riӦ_&ErqE,4z -lvz0K�� �IDATP4P0D9gss3dt:2z) eY Ea3Pϩw/8+D%MdP]Vٓ7uCmS:,{ &!Q dS)FMc}i&L={غu+E0Yw�2Xcb?qszɓ(Sw^,' e˖!Pe-[B&]J]bfeYX5ag6K+f *f#'N~l6˛o Y~}Qc* X?uYO8K24 H L+`H=kyQAm VQB0aoÆ  {sΏ[jfZC7jBV/ʈC,b;OS�l"E-GѦvR }wȑ#峒ΏlVpx/R?zXr:~Gػw/�ࢋ.{<_;Hӏ;VD^c6=U9 !;EMQꧫBh.ך5k�x;ޡMOrŜˈf煩.x E ,b .2r�@5U}?\Œ &ǹbunׁ~_a&?cZY ]ծhw (G~?b$ĉlڴ P ^zhfP5FuttzjBfߪ 7KчuPUh QTlvP+WDQjjjXd b w*YNװq;Xq!BhPtWܐ2Ns߿t:Y𗿨KRU/[oi+d0˃Nܵk/5L߿w>4ԲߥځdQ[gP9LdػwoU@&뮻P_o}[":nݻ78Aƍ3uArOݺvDCtu'xTc uttJȑ#<�\ve̙3PgַJ_=uso}[ ڟS* \F?~�nofNLA="fٳgpjtXsQ7l>X|3X:6bϞ=ʆԘ=[;kܧ>bj ⛜jiDD"A,#Nfihho}GlUb!n?t./#<by:D"A__=I---�=:�o_F1[z=\k.@m)`Ϟ=Z ;/oF{7xWƍ[عs'sBf׮],r"ԊuOZBkx|,-i9rb ꫹K_moKn:/9%A;::l۞ɓz:]S;75rtu SOzDoǏ'HP^^N6Ӭ 7 �5xwq󂸥acG__$ ?7/qL`11(HaTW8]_E^ @tUtd2… t:MMM ~;ƍ#Ͳb ^~T+}s%5Nf-eCڭEa``}{<~֯_hRiӦ1{lcn.f8~[ƴv:֏xIEQR0tDi*Oqt:֭[fTTT>G!qM7q5hy\9Yo?;rv+8UUUdYlX,H;hTNE1DnɢPDUK=Qqqgݍ(q뭷2i$�֮]ˊ+rWee%_OeeItdZ*ɮI^~裏<@:lٲ~3N9s&fru]3>'贘YC7"vvvʑ�7sipGMƔ)SPuL&Cyy9rw^sp ,[Lk(�nQ܌끁qz!׍8555b1vڥ D,Y|^`t jҏ{~Y9bˠD)Q uY!NЇ>ŋ?ΓO>W=n8nft2>Ny/~ɚi.ˎ;UUH]r%477N$tr>,'N pp IWKoR^|=Q6fϞM,Ws>l>S__o3<Ú5k *++Yp!\p>cƌJ߶//a\P2mlyQ[[6[@r_gg\j PRpmb*Ufo$y9IR( UUU,_Ei /q̘1 /SHSSZst:MWW]]]tvvk.֮]z`YYTM66@YYW]u-Ơ[�ͬ޽{pDQZrFҫs=:2 ǎ\љ3giӦig2֭[ի]u#IuX:;;-xpƍ-.&Lˍ =888oE7䃨e D}9 i^Hy;AKK Z?9h1ykHرc;v`۷/а^$*͛uk2jƌ,X 䆛(N@qQ%rMGQZK 1�9P+!#ԩS1cdEQр_̹k:uoo/崊 ***(//Kwww{UNAuuMر#sjlldҥZKa)'k(^[aLرCz)�"UZ(+H$G%I<LNJ" ݝ7$}ee%wsӧOT{ձcǸ;\[SSCmmV[oo7whuAAP Ze:]&?PW ,b%-***1cֶrppn\X,ĉ1c'O&lI=]we9ܽlS[[K" Ͳ{noߞ7-yX,YDK> "qOe>TRB(-b^MA=YQ܋j#jf͚ĉ9ײCYYH7رc2ڷob$`L8qn4^K Fa<>)ye#@Bcce&ѠLd2$ 8d*mPtuuqC .ଳ B;=5n[~n}v0DY!a\5=9Rh*//VZZZB|pp0D"*_A:::hoo)ϟܹs˞v@i39nf߷}v-.5!yl(JF1: {O"R`R)vݻbq;****!&UrΉ>8|0kNWh !Xh3g,X(%`PGcԯp!OpA`Yݸ==DtHVY�9)q%0yd ځv N@:tHu�=iL+dgtq`0T*5lJ&,^K`* F+�<ؤ[@cZi{PSقhiT.LknqSi㶙w=gM=q_ydRp8~ 20""M4?_aoDQݖXCG?;X-T=vH@Xs=:6"L5~mLɋ{j6jaww8e 6R(ٜ{* @g#ުϧњ_kYMrk�Iں"g#fJ$̙3:x</gP7՘_ 4O?lȇ6H=Sǻ@ ڤs'QMEڈ4Ƽy󨪪Ҭ[.E^AnRv@!4_e>T#wKS9ĽES˂�H#XMMM̜938cHC'hߏEtrOVAvc.xI^uy_ψ8 *~0\FgqӧOiz1zm N\Sڋ*[n PG[p7kEQD~f�xXFbƍcʔ)̽RV`UL7U6r Hj~l"/*zkb2qm^'0T}}=477SVVfAT3ng4SXD]5nA\e�* <ʐo^ix(QSSC}}=gqsAdZZH[Y_;yqOeDi <ȫ*/y?X4Vh)Y2EDmi+QQQAMM uuur3-_խj'?3SO6LO]]<hb+^+RxҿҪ%I(//d-0 km({jtQ7m$G|K*\zմV.1m%s`1cmT'Og_ ld5</sVq�uDn{ϨU(xnIv.rcn] ȧ~ZFm]fߏ'$ک A\3YJ}ƴ)7zuS嶕¸{n6n(?v#zQQzE=+n$r-N 2_ɍ{do+�~ WP*P(i2%]8p+(ѐE]V` ư7Nz/~z53O FE"Ɓ!\; 9AfgoN'Yh75`{zcʕP6E (B[/ AYnr-OZmrW7՘6˷yqǁ �^a5MQFRiDr%2bvgmL!7e>;o$WXÇA | Hq @*+HuB }5 l'h(r ]!Kmd~q"[/"ׯY>T<5k+8*�W�= >s̎{Yۥdf5$o>~a{jTJ4 ^b,x(ouM*Kair(FmbtGh Mw 'YY TJ}ƴWytrMMc<4:$IZCsIB(L)+H²fײۧ_[˳\W}K HcO(ibh4 gZBsgD YaXA/Fƴ`ss_ c۶m_*j?C{a`?* O喏 Yf :YC7z-7qS={e}1TT%*X( uQOס;)$zqQ K>׿u٫]钆O!l[CySb)ӆj`Pz[�P'Wʱc@}'?˅zܿ>II MvW(iJv2g咦R)# ]GK 7?S* e01Qń,m\;AύʍN,wu*_'jo{{Zr^Ei7ba4 N])Vnjy[7~o0 *ZlE_ԷH75L)y>n4/r{y�fh,c�aQOx�ðtc=19dq2}f(k;9dY~SVP JEQQEB| PHFizPʴ1m'3J)VР0]TS EI#{,YEژv|+z::Üa$sV(c)7PGOU/Y3':ZYK(f;j+s{sKOd()?EKn [7rڍswrP!S p*g?{?*,N: ; unx1u: *7/A՝;wtww:?aaB`:_Dmrt?фeTKR}n->qFR݂:Z^%.]B;DQ>-M�.7@YY0˗aYH;(yGYrߋ:^% (.`@[6UkEx@ŏ~#v!o�1U`&Рaj؀(~�βdp�/VaYJyfPQ^}U~ӟ#o{p'捷% ESP[Kfr!/ =fP.l6OF~t%ӰzFcՆ:>:O\UG_|;X0XG`vuuzK \ 6Kahtg6W[n/Kz{{=|S;G,j5/ B^T _$UTWD+^C?~+Wi6Y <Vb/08\!a"j ☕f^`R:&hqslv*š5kXz؇: =R !斌.|�u<'j�`*.jPk@<r8 P7Yaӈ"F P=ڪ)(taN z7&j_A2[a]4ӈ8fVQ|87Ǹvx)Eƺ[n_F$G`(2}r$F8ABDS_Am)F-7eBYK?ݻwn::::dVQ?9rE/�X[ (p4^[k-]v+ A6pS L1\QF4EUs@iL+I„ 8ݻٲeWjp778_~5ARԉR%ꁔ r`&*Ja /eE/P:eko ̭%Ƶoˍ%HI%LE\v.0*S鷝+y7A5� `7*`g\FtYJ%�BZX q4lQLAb8q:D&_�ZvT/UcD)!D:+2EuY/ܕJaX=R)>Ç-a@-2Ü*.-ni JU=Iu9\-%rQetQB( Ǐ'O/èP2<::8iԀ/ځ(-ih>\;ŒfR)zzz.�/�?C~iNY?7 hy?GR9 nD= ށ 9f=UQA:&N/g+~ >b=H+*ף@Q z0 4:duNFr@ $`^෨%lz0˨PjT(Ro�tյyXk>}zr^Rlͬv��IDAT~[VgG{S4ZD4#ʘܙs!0;Hr5زu7Aݶ:@D =,E4(U"gYAjY*ͣ㿼 Amjflǫ~m3(^:"s[S=n;foL@ɨ5†TAu=nCxtçPFFd(KQcЭ7l'Pr:TXk9Uғ[Ncpy2m#z$fLQ|DBԻz.D# ]!JYL$`484P#T h FVÑ#J_0E \Uڕ3fzfѺF CVL4sUh6A-bF<zW H>#!-&AWtE #�k4eMt<:aH~����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/artist.png������������������������������������������������������������������������0000664�0000000�0000000�00000003723�13435240150�0015710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz��� pHYs�� �� ���/iCCPPhotoshop ICC profile��xڭJPGmE!7 .1iKjI5ɥ6\?:>oPq|7A"dp3uncF5Aϗa˙Gi -oE3i]l>L)u ;ڂH[Wk6;V>1axa�p] =6+7Z"Qrw\Z5*VFf`UTݞJ=%bY դ'[x `npͺ-//P=���gAMA����� cHRM��z%����%����m_��l��<��Xx��IDATxĖm\gٙ$nttl 1!b(?dV XS)*Q)Jj$Cژdwɾܹo3wfʮ-}<3̜ssȲs�B7/Y=89"Rn_nv۱Y d"uttY8V/f㗫pRű\`t5AiZ(XE}k˕l;? 2j5Vu=agO-�N|?*IV ~^(pjǭy]pW dOo?!ժznƾ_,l[HT(Vy`s>P)ժ76$A @#A~$2^{,GޤZU}D|�8񞻰R@iPR?vpO9 $Y@V s}>!gߗ M]3=5썫<󧘞\`no >hͶtc-[oF4b1T�@ M rѶ@.\?OzW b}$ˆj9HԂ` Hc4Y_$^h IHj>\r%�S7^OB7U4$$ Pzݯu's:HD $䍫#/~3yKq{}PNP 3:6Υk{>y%+Jccs;ybOK[v'4ꡞU}#?k-Ň֬1z:z{:zGݴKW&Rzsktӓ.<Rp*==vu{nv0JcPÝCcvF)J _ƅ:7&xso;W =c`Mѱ 5XFBiR-cRm4qG/hf[^~ig[ M&Xf-c0VctnZ)R!,͐RU>ɒѱ\us@hc)X+`4Z+V(%R"M仐8NR?FZ޽$rVӒݶe*<%Z+H%B $>\保'׮O3;c}"�b[$8N.1ۂh؅^"@ @oe! M3^&n̒$)BT�Q>y|vNAX'7YZct dfF{aK)EOoydY iR^�  kB<ﴮ4Mɩu/@Jъ8QY,Eq<Jyk)QjXs0($)aB&B$ILPJ۳sQ�-EQJI�B抴@nV"ˠѸ9XkȲ$UıjJ"dcw(mys.l4E$F)|-gF%WqL3NㄸqB$;ߵoYv� ,����IENDB`���������������������������������������������pragha-1.3.4/data/cover.png�������������������������������������������������������������������������0000664�0000000�0000000�00000001646�13435240150�0015522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������>a���sRGB����bKGD������ pHYs�� �� B(x���tIME 7:=��&IDATxQN@ D7G}zޥw ?T!I{mϛ Bz:.������ue+4|m6|~{G~׋x� r�g^n P#�#`j YGs �r>F�  [׍y:u#} ycKw}׿8jT_!(� |S? Z#91<5�s�a^[V5�%yUzq=Hb-׽#lYO0c:A; YE ̻O6#D#)#$�JrwD^Q]"�E @Isv�|,̹,l,,>W pL"S^Qsܣ1 >N N@Ij8]_N = ),r $˯X8Y|&c|T/l'c "'XeL�20w e`,\t}@Y_N sp,ܨI g,'D ŅX`,<wLas>1. !=,*W " hl.c2..*EE'P\TVW `묏p@ nd Z{ױiCAe  0@xѪ @0w0\6\- sܥ,.voczcuDVH������ o2*G����IENDB`������������������������������������������������������������������������������������������pragha-1.3.4/data/genre.png�������������������������������������������������������������������������0000664�0000000�0000000�00000010230�13435240150�0015471�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���Q������s텼���sBIT|d��� pHYs����7|G���tEXtSoftware�www.inkscape.org<��IDATx]ypTǙu9t!` ¸ؠP1,bl6xJb:[Pq\$Kub c ^N'el8��9$4ht9^̻F3o$Uf~>#@'Zi4I@$ Mb&1 0)B*AXN)�D�>�(BR+K`?(o26?2A@ sB9\*L*L9 ppB(<7ƀ@:`xtpp١Fhtz/)%�W2H %Y-S.hXڼ^qp$yNg'.W`eeMMQ-2B 1^+Xu7!qu1H$JoݺQZZhLWN3W/!,F7TH8裦~rҢ|-:paB ι_'GPĠՔ9s=%JZ0O/iuסp&֬ʃ:U%L&_¼ ͝[[P0XibSU5˼jՒGf'L@w&ۅ ??\QQl?qOxbU$\DOjY]=كf6\{ K vRڂGO<yE\^҂6޺/R^ж!m&$P9ŪUٳ+"-V[zO688MFbhgngl)+ELia�`oT޽?C~h:AKFvunSO=VNG?8g׮}G !!Id $Hk$X~eɾ}/^6dIҔ>(irV?;wz4`qs%F[b7YWw-//G"M/ɍ-(ݻ{�봩 CšXT^^bZ`W8oұ2)}&Rׅ 6oGJ:M4t8ۑEc={o]~T4^KY]]}ߩ*u$I ` <%~W}}CM?iu$۴k3]m%%-NgIDrv={~׽k?Z,fPJ!FXp,id&lTqggߋ6͡Cv*rβeg;v=0SD 0Gc ,|Y<B"2 e>? ~cD7#:τorR"Jc<V-9k,۳}[r8~gvdTfkSƱewЩ&ֱP5K+[oP{r`Ưa֬]JV[ƥK`˖o&G4;)$rec(l]JL6ddXWl9!n2Ewk}Z!`%^v;.l4g}XRb1  i ǡ{UCtQ DjVg%ZSJҏa㓰X(~Ƹ6p;6 WQfpM1ꝊÝjXլNX~E" E}C[0=5n牷D*:IdhZ-H5{,+C ``U_DX}duT)#VmreFp`pI�8DQ_CB`wWFF C ohE>?!RK7Fh;+)թ(Eqfmu'34DOÙ߇I^'=QP!Qc_'Po2@%�'<g``^�ݞ :gLf,\0 vPJ@)!@u7]u…r}-'cIu7L|B`"TTTB0$0r6YF}k'zAi&A]]U逆pAf&@0 ͒Z^(fVf#3# I T@ᜃ1 ~5!}A\p'{D'Ͷ=@`hbxJ(( P "P0&{Qd(*H.FΔ̙mМk+t;jNOap8U1b ژd"-|p+T,HM%hN)-н)Ci'.аD-1%&q C?y85jJ_qzBJjUUs+5eEK )E)t66ѭTEK~1Htvb柅&A)U1Mb'Ь_{&\ X\ @tɪq%z>8]-<h5+ d FQ$-HcAdI+ b(L%O@(W cER-"47;= e9x[ O1cÖ-;n_kk(rl\g;02 żyٳ8w"ɱ,pLIVc^H-<َk?L ֯'=Up1Â? 0u\%+W>?hqO^,lj';v�VlL�og_9%D׶ ?r5k.itW1#<=f'oo9.6bQXS1pKsbʤQ)<"6>O;6l0f3yǡ92L!0p}qM\P@) BF�Xn=N4D@wlX3 s*g]mS BcƂyhFvv&PUvT1BW 8ĖE %W3v">;pt pG<e"ȓ|= FGG_kjլi(L-Z=D9۳~ptP[[mնDCY0!?;wO \zS 2< t7zź>09ld(8aF J"7c;w̙Si;5�� \|i6LMg|/έGm[ߘn㏧(+5h^%|o;+--ĵkI}Ԥ.Sqۻ~آbEs' ^oI%t9y?׭[lH3;~ؙVy~8tȥ(3աDι=(,CEEF'޻ C18y2[[ BaA8]?9raO?Vŋʕfx<ݺ ]fd``+W̑s?KW3@0iǨ w >nt`wsɺƑѲc_5/~G}Q?9el]22* <>VZFGDݝzz&"�:;;r?x`Rf_-�Ԡ�P^700dgVZ,L65 vዢ_H,x/YqYWUAkfsbSR֔Ȕ HƜ 1!/G6tOd@v2a\$7:u(N^{ps_n]wa$Cw͒;Ǎ_i$&J{oI[b3s=Rh*"iGGޗ_>kCcD~J a9^˗oRɱʕ[x5Uw oks=w-Ǐ.d*"a8CUUG`x*1qE�gϕ6fY0ƱzwkOVu I#s[ZZҺu<"B:@<qd9Y4j+! ?2)9T֙ $_}`dbSNgd-I_B)J8)'n9&1 HIL$&i:yW;A6i����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/����������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015002�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/128x128/��������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015737�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/128x128/Makefile.am���������������������������������������������������������0000664�0000000�0000000�00000000170�13435240150�0017771�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������iconsdir = $(datadir)/icons/hicolor/128x128/apps icons_DATA = \ pragha.png EXTRA_DIST = \ $(icons_DATA)��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/128x128/pragha.png����������������������������������������������������������0000664�0000000�0000000�00000033426�13435240150�0017717�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������>a���sBIT|d��� pHYs����ɣ���tEXtSoftware�www.inkscape.org<�� �IDATx%uɪk/}` �I-#a8H�_Ǔp<[^HDB$E1 l={k<!uߞ!)'tvUsd9p?R|[ .{ˍJ.[9\k-E~BR;Ks4:^9ZFq%[O aSJo|;BI)?+ęG*"ڽf>IpRHŮ(-a~Waalx{&Dzl0 i8$B�WO,C @RDmn+Djվo豞y�o|ieVOr/"\I?OȤ: " lD}^wuԒob>ꫯg"?R`YB9kp]*+B){*#yȎhXD@D^"FOp\nY?}#W(lv`(.S@g~w"9sDѣw)]<{ez?6___3LH}ha_$gE>AOC!҆8bmMocZ:"JxAxᅈ!4T�>o&:+Q\� ((x%c" 3Ef&r.Ait^V)/N$̳kzg{@$A> ;}}ۯ\Kdc1BiZcؠMMBknğ7W �~ P :w(uJ9ϕXY(Sȓϻx(Vr6`;fږ ;=m}4Wdr4أyˎA^3 $Ak!5vL+IsϿwߌP�o疴XWȹ,9w|"{{|oxZQ} |g<5ЖDD41ATu7q =2R -EW'"\肯(\9r97C�f&q >@ ~?�<OQVJ)hBkD$\pE} S^;ګJ2P�I;=BHS=Zo7+B-sAL%M2e_; 1IYaIHϤ�h2!sM2MJAdLLw :$kפ×dQżd#9B Jӯu;ޅLgPL ˉNN13q9]#ՎJ}e3F%*WBΥTcTҽ ? /Bb^}5iVWA$Y깮|T&(J|ZM@άe_-EO@2V! �b^eJ.}e{dj&hZ^(\9è Өk.$ ewJ]H JD3yx@cFiVFjb[ShY>{=g_jI6ŚVMiJ"bDj|zc-A۽(.)G] AQJ)ʥ)y_sX-8S渎$gۆν}m3/ѢeK<߯}3aVv[g}cosVv46+ 9N%Ps"<ҔRJy|KտXP+<N+S*Xktu/{0ML_Oiր%ɼt* kh_ l_ô3(c-=ھO!px0^q rVO+kyfJgșY%kWk,i% p<圕0i;/v~yvgAD` cTk Ʌ)^~?ɝmKk0#k'Zľ:(�%yeWW{kRN1*l="3>{= B>yH{*d|wn͸&i3 $n @5O$}c^9N,pgFF+HS^wǵ T`N)%mX[s^,͜KO(rDq4q�ga~Sh�-(6aLńqDiPG9(GPb°4[ |e.9Tznj=+zRx xTx"s>;DA3OE (I j~뀃u`13Y`z:Ă6xG!\pYEV,)=bm$5&1&k iSFU坼صyQ*#>{Ø.}!bMzMF<.qOMs4f96]dR2p]EzQQ8Bac9Ru*Y.;L<'Sw~೿Hٝ:\R)8%8_RBT]!̌ |zaM~6C?i-6qv;$Wxj˳M(= u\q2R࢘*y1Um F0`$sMq};GG.3} am(3}m#O+6Ann qP*,/Ux<y~|;Q ) |cÈx{V:|9]#=g�,ٍa86^mGFÈz*fXYSO%NR.P,圌Y@~"NڝO>}/0Sw;dovzddLq޸g9ݝFC@27.}mI|#%B-6M1'MӧY^\y.b-$j:xRxk{vYP)KW7nsnx zz8=c=ٺ23Q�yA![ 6v#</<~W>} +LO�nԛ1u?Ə QbQ rK0]3?gf2O)&J)rYLmPkjsr^aNi _g(m f;{|z #'* ?f׌6k!Հz;$5qrBE.dS \:3ùLr8QsWlǦ/orcE~C߿gSagߴ2F @`Aɺ�-҆jŽ-&3E> _{"gxͶffswnͧDŽ5d9fDHWǖ/Yl_|Wf(&I)tO]17S޼Û:Cz<cjƞ S�|ajKn4qlح6Is4_}Q~ST&K46;>wiQkfaD2|ٿű*+LrYYu].Xr1#+LP*=gacoD:n @Td/3>{M^OH[kpo}tvW_yKpv[u>^kۤk={RjG|("^ef=d$ծďpsՠV!pXW^Xwh16^3xM1ҙ ~1t `asL܎p!1:w'.= CÝW6^ Z;*' dGDPoV\ƙg%?6BjRe~@hbƲqrKϝ$ ?xo?v8&5Rh$@rh }x?<Ͼ_sX[c}c( yʓ=9F5ڽWT ubwƷM0 jJXYP�6Cx_ܪ2;穳s;^fz`$tBS̗i?p?4rLRJ-~~@?~"EkḥK|㕧X^$g;X#V2} 8co۴&qqqKϞf\0v}޽G{ l4E>?T;%�l�bW^8 o_&z3Yy'c9EڳZ無fkʽ-ļ 헟ı w|޾͵M|0} $}gKRBEW>s s�Zh1{>[~>v|s\v'˹as^,i:^~p>}}dak&2< ʓ,Nsk;v^' ]e3!Έls&' = jc`mEvVXmsO,17U`}$l$DYⳗ ؎G0ٗCĐ`Ev GF뇆 6tժZ.b4~<nox78 pkknm0_sgXU{Xت cc5![Ѷ: "*fy.s<ezxˡ5? s~s|6# ,Yiy;{O_'*n]n 8+#d2;N}W i5[8b;.PCN=`cDH`jO^&Oo<RIL"\afW:Z ژNaiHD-}n ıaZ^kp|^~ ۵oոVǏb$ H@P(jYKs=Ǭﴩ{gb 7[@gB"m Sp,9\#K-@:@0rGeȧD/vwk<sg|aFŭ*Vi+j9hn3'*piG{Z?eӲ9O+6ZXx=jP(lϱ0]QN2כ640r4!5;Qr_x,qvh4Lb*:x)$5f;ba&MGNJƍ{5"oJs\X)EF�< gj L6BkL|sL]-dai"dnuęӼpiR~�c?6C(b1ưQ ;CKSΞ$_pAԳsAZ8<rj'/\[f(J4!&R1h-&/?{_j5C 8"x >W#ƪ$Y6MofrG hY &j0l1=gOS.بFXoNPeQ\Ǘ@(beaO_Za:&vN:I3M͏J$pn|nHU"ȳϘQ&XlpDKau^#H4ᦏ(|?s~83O)ֆmDƌbqx;m 8JS&yT<z x^l"ֆFES< &k7[Aw2g? _D Z ~3Ytyw,XCQoFtZl?]T]  bs 9NΕ(đ=H1vyHl`ufMlSOr~@v0@Lc9>M!7;ns$ 5M?03=fK6nlcTGed5Pi䥒_{L= - Fzo|A W*LRkǬniD6A 9./,05Q:ǚFH6AtH_CAoQm,MjɦA0Q8 mTμ%})_⻀ Y>&ox '\z^86a=K4b(҆(K ? ٰlH:xeXtm�n5ld-%e_~ >hܯM0h0w9sr@lEh3|9zZ |2fY( 1Z[TjMdi@fH)B-Z#�HYh.s }פ& Q12z+"b=V{'& <ቋ#5~iC;wst+ elkUAHe0@`Q>awڲL|GX$[4G+05"¸�g{3%.,Q^m~m^W X'Xݨ[_GO=S WuJ>AM m4yG0EshVj |Qvp t7�c^&WAi:s ^ Ob$i_<ڍ 0(L ~hh#SAK链*YDqHu|~kCH -{}(u",Gi =4ɍmK %fʈY*I9�/_AG!ySslHvch8O92}vS-&1A2F5:;7? 3|ts(XD/< ]R qLXY"72 VDu=}J "pRMd2bvLQFf#4˚=&Jy\3}fw &c͉ &˅6dƆ%'>$>2JB1;D]*W!˰�ÎF;xmCL-p*q}=w Ø)MF&9K/J"?0$C^#i?Wy DeGRRZMC&�<tO*:s͟PXG1vN|5ss8Z3d}Mr:, mC^B"J:P}r~eqHrja|oA()SI9J,Vx;` blV7:3/.ibOP& Ix:( 0%c RKi{mȴr sl\F sS&v i1Z.%h�118wrS  _볱[8B1HMh9XR4P;<7-˷?2|*h%\pr{()5Oy/Ȑ{DBѠڶf n ~ #RFwh#Lrpg0?3GG ?=.m ők}}9`"b'g) �Mn1>ٔ>52(CzA<尺 ֆDyOu? x@vx\+YhmyOJ$G,V*%+cD0j͘uwZGna JB }!]_kM0sY)1=O6j~{ hM1X^I"ҶBawaUR9ίQ.u�[[M>U?04:, j~vz@yc3EMZ#|Z/پF do �,b)pjT& &O;/BFջ5kn Q ȩ&gPPomE0Y!ϒ t H_J.EQNm Q“xF;f+7Ԛ0 1Á&xXOwOTlS''9wb:ա嫏S!L=x&ic\P>SE>Yfh#f*߫*��IDAT>4?N0{b咋;PzJ)+E0KezzC7}3bȡ.ˍv2?*p}rE._06#>Uk;ԚFfʳOA>k󶽆$H~5ɢ#'tz|{@4ҳA˻New,ٸUR{XbNxh]n61776vyH[Ƴn(OHmq^,%,.8x ݢ ڤٻI110[wK-cS6 @p$ Z>̓~mlٹ=ލ][k .Fˀ&fVf�4"~mj6EGxEf W;xw"m`I!btyl `sGBC21Q$$ ql<";o*?pz< :g?~g/FZMֶ P#xL5gZj'4CiC2Y;ZR'lx( &h.=V \Aٮ\]GWֹ CA:v}Zgoa4:0͛۫\]!"rL/>s/<sg?`ZdnءMWG03YH>5N 0lP=LD7Q:SsOrЀ,y >׉exZ>`5];t3FV#DI(x QmNE,{~dKj*{Ӽ5+&D<vz?ʓp$Bnt Ȱ vϯPoEcQ1YSѰp@!HXy++ewP(l#C\꼑Ƀc�eZXp*{~j*)h~W'?fwZ0f?\MhZ#i~J#2{^ӟY! x)(o7 6Ǧ _X,u )\VϜb{??2c$e= q9^x;57?ܢ۸<%1:􉣐<\:Iikimv}m5?( ps/;Y PfgM4 m4'M3xyy<t >XmuYH칾ֶCX�.ylrAmRmб+ |OFkh1۵nVѕ ޹MF֑ҾS9 I0%y= [ (`f2N{s UJk3Sy>SoOGQ:R)DZ!׷mK+TJx $6Ǧxg _l[*?&ܥ>0Ҁ�4Yrx^I>Y(![M1\X_|</=sŹ yo}i+&KPiV(2 엳sSEQ@#qBs'+,͕ gK#}ZvGZ3zƇ[ި`r4h-\wHϾ4J&fx _}"O_dzb|@ ˣ+Sk>[6˕% 6>,,Lj3c6Vx>rrh�#Iuμd$:Hv@:;sx8h3;ϭԒȹ<GQL[6&ʒJ]<t)kZA^#Vnx674ZF�i(V7ug�4iYsE * XY? _RT& ,Ζn:D \K5AŒc8.ݪ$42Tkm>;\Sc&ޱҾ 6 ƞR _CG_8+8j2wxceZ.3$l�(PA4Z!7pu@Z3drs^ ?xCJᙋW? g&H�'SST&�v{Zjhа ٮnvkwlV mƠC \GP&D눕IңZ>2i'ERɎCyۧԨ~z 6CM٭lk>vhqwn= 4׀\�\cǗ_8g; Xj@c:nL-1bGN+tVیXi/nYjf֦jHw9ё "C?3KϞ29:~H 4} ͖1̎R8J(,Msl<v9I],lNoT`5 tBn/V�A㈩KOfi,يݚz{ul։l+: )y,OߪW6y;{A'Z?C( 9.UМZ01 GQwEr٬|p;vlU L%}Ȉ-uw[T[am g^.td�b>)*eMlE6&C>]'ors>$P]Sri@ÏjZ3<Һ<Nt oT/, %#b<L=t7VPoFiscɻ]7 QT=Bex8;-kCH�Ac8>7ty։t!z;֌-ai6ָQgFz FBԏ⩹@naQ 8t4oɻ�B8�ꭐkXٲq-D]~ѻjI &(Rܓ+b"Xl݀ o*�mȹ3Cv ΦϏ?WYIIr1 HJ; pCN/K�O҂ /#4WIG;cuӬϛ׶rwAl.ACgn*ϗ_8G`ac':Aa #Z',nhVڼuuV74M >%>X} m5\$PyCn @F3?P #$X-{aގw\CG4؁V(;06ZavM?3aB^ӧ|aq)Q5#>^kpn-,oZ�P=5Hh=&b6߿sN_ 5v|pNݖm#= 5{vJۀM2|<gN6C{s{50~8r aDs+(*CKeWa(j8S_|/>4ݏFlWG o"�H0겶&d\rP۳D)p$&n7/>^|?giEך\[oo(@d߭zdX.X9V)3$u@8K/_+sIPꭘ.-?CG Lp{u6ӀR6|ea]^\q&db nx\:?Ͽڳg/`ÀMcCnw˴8 Dּu}'+T&zM8T&<qj$nS켛n&/iT8 1]c'7_|-P.eIbvj6{ W󫠣�l+h:Tt̬pX)OP)nroˆvu01:Q&K+ sSg',ãتvջ pխf[@mtAb z}BD E?}G7IQDGp<C~ }b/.87T»bcw#nyiS\A\Pd7 ~ؙ@Nurǹ2n& s|rJDњnj%ۼs}Pk=J\^%ʸx l QFUfK+ɖłe.a':E c =~&;MC|7QЄƓ" .$wlr 'LRnh �&o�:uxwѽ?+bQR%D$=H'BΆjmZCçHꭐ?߿} 2ӟ�ĂDvdi숺! o"3L&QugƆz;?Ïl/w.KG"mqJn;r~zIPPG2fNR*{=G(v$B@Y hΏ5 =�z׸_Yw99920qѰl ||PP�q")o6Bnnx.n׶kvR*'b|N sQN)M"َ`}׷W;]iLcøcmnW6yQoE6V4nW{W}Qja!o]zS<~z3%f' .9/lB* 8R,͐z^:cmE'?V"cɯ-�:C0K yl @u(=+EsSyJEb%5Ţ8Fv/T}VZnU"0[O:r^ޅVk/0!MXZ!M~MER\(ss6Hk06k?͏78Hh''\K;_%Ex( }2f-ML;5C7x& #JPIQ*3*WRRw-ԳMWkπk_*B'^V~dT;Z! "״gr_af= q&  rp~SI1 Aq}GoLj؎ا܄vQce: @a_K~I8՟,P�+i ߉0C^|BL+}pa>�ꫯg"?R`Y]}B.$Q6**x}wg �6Η6_n4*(*e`(NU^xЀO RRDA�4mW"뮮ZM](�)kcicC]6RRP!]V<R| J Ew7czbUO{ycQ7l.,t>B⺋JyYQ"BY? Ve]7,67ۯCz(Q)ŷಷܨ¸vlR}bs<G8jWb-9 Y@O����IENDB`������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/16x16/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015567�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/16x16/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000000166�13435240150�0017626�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������iconsdir = $(datadir)/icons/hicolor/16x16/apps icons_DATA = \ pragha.png EXTRA_DIST = \ $(icons_DATA)����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/16x16/pragha.png������������������������������������������������������������0000664�0000000�0000000�00000001517�13435240150�0017543�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a���bKGD������ pHYs����ɣ���tIME$<e��IDAT8E=oU{w^?18|`ķDPP AB (�h\B EQd#`eAI?{8̙3Ggƽp`ea8*j!j!b腴ߍze3{B,$!&%DAԎeBZϩ~r>fN(cExȽA(<t{Iet0csgNpb7x͏kwbR͓E�H"DN0:`}VA7^dgGY߭(!)ehչJ?>`׻| 7xi!)"@NGٸa8fN"5{4j^z|P&QFf=g>@p g'URQɲnIE^pFQU6 $I) /h1�F9�fs"!EԘ>9īOOs6ܓA[FDk<45/({bL<wԹ)>[{[nnluxIquuB[Opg_t}{�W`w?P͔Ϸ9^yr ӣ.ɅOX8Gk))zƛ/cM*ѡ*#UpiA0މIo?:흂/nj�0@ax_/M}����IENDB`���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/24x24/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015565�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/24x24/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000000166�13435240150�0017624�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������iconsdir = $(datadir)/icons/hicolor/24x24/apps icons_DATA = \ pragha.png EXTRA_DIST = \ $(icons_DATA)����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/24x24/pragha.png������������������������������������������������������������0000664�0000000�0000000�00000002654�13435240150�0017544�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������w=���bKGD������ pHYs����ɣ���tIME%�i��9IDATH}[]Uk93S:әg.HBJL,F >/ƇI/DMH�oUb @ 0e̙skagZ+Yٗ.s>e[ǪhZ�P rsU~TMzyyxtPSG>6H @BͯEȂPqBzZSNuh/=^m z{d^Q JN$-2J)"Bͳ惐9!<vcz+D J@E"xl,$ږh\;rxr'('1}__c'#(J|t d^JQưHÔX|Q}q߿4C  J8/"TQ[t9A{}߽r<tl?#LC~J7`lǞ<9&@"X\գ7&,bP?}4g/.sY-a ܸ ^zk`UK`r\_ND:N hzDs_ΕVѶ6ԇv cUh3uu&j4t༐XOm_?A^Qevœ~ )EqŽ!b|\ 3.�I|>?2F::؇5S} RF{کgx`�$1™@ [-Js{&yU!HQ]yF�Vz˥hMĥ`3 9y%cYw:{n!zHR('xRp~+󮦝Y T ~`o{m BKFiV ;1&?I|p _f]VieKMjZXm]S!)9~+qd{ud[{;"~y<|P Σ1n ~[\lE̕ϼoZkX]Oj%>G� V8T;ߘǿ}Tp!\|:?yN/溶c!>>rqᖉ ^诖卌5N[C.Q@b?zUrH] 䍻̴L=~8rg]j8=2jnU6ZܻDxn*"ۤYDrH"kyxs3,"G q^0�lg2E$g ݐ����IENDB`������������������������������������������������������������������������������������pragha-1.3.4/data/icons/32x32/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015563�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/32x32/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000000166�13435240150�0017622�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������iconsdir = $(datadir)/icons/hicolor/32x32/apps icons_DATA = \ pragha.png EXTRA_DIST = \ $(icons_DATA)����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/32x32/pragha.png������������������������������������������������������������0000664�0000000�0000000�00000004151�13435240150�0017534�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ���szz���bKGD������ pHYs����ɣ���tIME)��IDATXÕYl7s};88�iR)Qh U[T7 y@*Bע-�EEBA<FQ@ 4lٲ:˵63wNf|';3gs\;UC|X>O�SFAUr5F$" r=>j-Ͽ[i1q�mEE(^sQ(S*qB.EՀxQ.V(V!sg`̎~k5+; ` `LCj(׍N8+Bb'D'JyZ0�+њ;5GxDϢ\4y%vB;ffgm_<DŘ,jw{ Q\?lˇzZb3] f;c\ $aYGkصm5+PerĻM"I:a] xZe1jUT QTfh[Jill督X[CņFQ֍Iҡj819_[{vN.terY-g3U /(*$ԢЋ3g'm\}f1.TȅoXǶ>Ul;9`n~'?>UFUjՂW ~F.gGxQ13_Tg�~=~7ם硻iχTOX!vuħwSeC'xǘ] Q,W:|9~\)79au'wg"e< ާNL^,pW1xkLJJY`X⪵Ĉ@.X\R{q+zښYDRM>Z`LֻA{$bƕ`Ht^t?q+;8)=ᩱIV^}eѸdQN im "r9^bf, ,Wu8YVxēe"T3fRWufS.q)q9/̖cfY^.q@j+7DD̀TW(hyWRէ5ՒS(4A`l}؆i%l^w'/jl{<wuCRgS` L1¨.e9iPJ2!4a=ޮsuB[>Wp<aTF!J0Z f-ﰁuВıԘ+{m7qnDC ؀ -[ґQ~Uw C57?b+<ipl-zHD:Ii}:kV}C6n؄�LTy&"BD5rT]"}C^Z3 &eWvYEܽζ6:pBk'H0_NTW 膡tKl#8!q05WjR6<˲�yq,a`/簾f\&}3=_:5XPX]33 l4ڇŏ"\n{[Bo;'B%5% Wm�S~uG9B_<im8ceut8O8U#K:/㉿cɷX)l008Q04W }?祷�Bk.Xb\y<iqBZJT]kޮ͗0<cзd yق1! �*J5r8+:_*_<S<XeIm7,x(7Ϥ9r�SU : v .ƑIFFg9|rRLXeC;!17<g1;�ZZB:Z�Xx|}њ0o د!Q=حE`'R*rj@[m,wx#'.bP4QJ>{>vk񿧳����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/48x48/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015601�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/48x48/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000000166�13435240150�0017640�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������iconsdir = $(datadir)/icons/hicolor/48x48/apps icons_DATA = \ pragha.png EXTRA_DIST = \ $(icons_DATA)����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/48x48/pragha.png������������������������������������������������������������0000664�0000000�0000000�00000006427�13435240150�0017562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���0���0���W���bKGD������ pHYs����ɣ���tIMEϨ�� IDATh͚\y?33;3ޛǻ]{1 861@(ǠD M4"UTTJX*i*17im@޵9}p.3^difg9~ٿx~p�ŔV^50&'y(3"gbƾ?]Ŭv<۞xV<!bRJu6%bc@j/fO[k𴠍ǰR{w}Uh;(]Ml\F%Rb0` HMt{HfAEڐ/{*Z'T#};02f_m)<1Ub" "a!x4<pMGPHU9W3+Qqe ŃۿJQ?1Gֶso: HB@2oB C+TZxX1+8# 5/DZb=:Sܰ=Ҙ5K5Ac�y"F0FQq<ΏmM֎KҌ,KN]zlL?Vb OBUA`Z͇"G#p1_@Eo%Pk-T;ḡmmKx1y-%$�]H@Áf eff(Y֚d K,i 6Yr}7m-i|+1U/Kݚ>&c1+^j$r^�1ÍW(V8=8BoG/\֍,mNӔ֢;)04QӸ'ۡ+rNx~`!F'r<�oYC*181't"FoGl @LȿtwOϢ^(H4Cֵ;?t֤`DM epx;m[!Cf c_\ Zaisz&^yk?CVbp= ݦPȧ#U5iN}8̗v㺾n}\8c=42S/wOX۽lK2Rp֕Xŏ_8E%J41aցtZ ^@O 6ϗ'?8Xs22Y/X'yM0E?T1Kq|~{/Zk{Ɵq|U�J�;fhds=W[C*y;=s�9=Mp4OJGO%q4gY6�XDf^zNj4k߷7�Ph`*ss 2M6ZCR8FkމixDtfnnmWT\1&Dͯ e}6�F="c)h�4 (Q� krsv7+V#T9mwNVc�J=\9xx-ZnNi^ T`Lazz;?cE{#Ze`rBM8Z3O7p4Ų[.nΦ,r*!ms<w'5עDZXb}oґ)S|6Ѹ3r=8 ;DiuRrt:HqaS۾X3w<ƖS͕˗4]^HZU3yɔi:ҔM9Km3 ґp0D3\�F`rys9 nTGIZmHT6Uk u][J<!wטythG1,R KזxR_ߢ(=Zj}p++ly:Z4uFs%N_[BU7x/ȉS ,mNЖI{FW`(hqκO(9aUGL5/od<WZ) w"qiD yMXac_{SIuւq$aCOn1B3 m8.6vєmx71[ S�˜E.ҷzhn)C{ yLTS}Od^RXMѪX<,y,BaD"p}FVEo$wt\-ɗh2qR<GuUqu9_~eK3^}{_<u]M j~5@Qp8ܹB xRmN[ m;�B\ |A֩)~. :U -قO7_Ovjl{tђ|u+{vc'Qߎ02U"� < +X.x>}K[AbkI&bóG~mlؼ5ȗwN,mI0Spx8pًb֕7c80wB*Ê)?J E{#;A;nZ04Dz Ky ͈Efx7g݉1(@fj=8uł#a+Z2 d`b E'gy)?lmYn/ښ8m؇& OW\2tg=6{<(P,Qq_V�+<ͤkamialO_9lL̲yka3yaf_�ͩ[k\QƦx0s`#B˺ ;okWlO$H*NCQ4 [!$Kۙq&rQ2QȐJ#_>+ƱFU̦eܲie,}0E!{Evjc$)vДI_oP,{$Wa&h:ugg-Nfyv6<{4=1qb.*@$_o_lh'L\hyRowaղc~) % `r۲,m]7 M|O?c8=UNV8}~{bϘa3qaLl۴޸fW'ykPLzoJU s)!&*9s Րh1`_^c=;f1j?"1grݿqcRV.Мы=Щ `Y\c̒ u알 ¶-N \Q}�ܻ)�408z 6e1Fu)#6FYRfL.'u]%>����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/64x64/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015575�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/64x64/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000000166�13435240150�0017634�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������iconsdir = $(datadir)/icons/hicolor/64x64/apps icons_DATA = \ pragha.png EXTRA_DIST = \ $(icons_DATA)����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/64x64/pragha.png������������������������������������������������������������0000664�0000000�0000000�00000011103�13435240150�0017541�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���@���@���iq���bKGD������ pHYs����ɣ���tIME0��IDATxkuggg+iڕv'XFK!`aLlƤpp8Wr*C*v> +l%vآ o,d!sv}<z=33]9<tUܾ}9s{[Pqwp̺.VZ7Z ~ %6Hc1}NRQUX4}C SL�yP@??63x3OYu{5@/a  B^{(]]M:xtZ]JJOIUnD 7y1\}cVr@0_ʊz_`JQkoR:t.xmTHJmv^2)]�3{[a|(|c usK7RB-<,>XS:<蠍*/TBmʟVkDŽ' :ShM" ˁ٣}kP z-n|%մXPX%r UDH*V#6r3iУuz?rҘ {\a[@2l֊YuUnSln[NDPl+5RA&qed\{dy2ܧۘLLʽoBR~A w6ss7BPGU" [JV|:9:ZM, *{ev[ }! V6NU$*C&+D)t64vH6SU[Q6a!M_܈mii-H,k~\c>c3Qp 8Դ55DJVIZ&)-\LJ?<+AƙJ%Q S+e t>aa_ RCE/l9簱aEjaYK e*!@3x-<")f CԆ&K,S�o9fgjSwx>dIJ^U먳 nڃm;<o!/Gi `2V)峸 hYN9՛w Ojs.fT:Ӡ1Agk=:ca%$ v_?@F#d$h�R>(@EvדE:y3b>f.9f3\O&hJ%T!Wob]OۼTu"F !")2hl%z̻ sQw#yxϟs299[[H7} ?R-&|+$rǥ|gҙR.#4>U+q]:�S]py)>S<B>WR5t_6~2,v<^|k-I.o2X&W_gqk$O>JR.� 5 o |~v~(NNRePU &''WcZÙ<<=zܱ[^eƑP0wZ^;<^d@(~_CGO.>m<Gg"L69NP#gZCk 477yf2h>>OqoU<?ٵ9gy{xF9{9ORLOOqϭIXlGrphJk<M֬u6;WrOT4 ^# ]y4o JLR έkJh+p|t޷b4߇潪XVђ[2³ W"3up/E2}D2=fnvOߺ:+ilgt!hMi )gFբ`@vA&x.D Z tsց+IU, $v: |y~ Lk6xgCÕv!\Q0Kp\D6F51ꡳ5Hl\F*i.Ra4hIg2p ͒{~y+ʢD[I)lHƦ=~ tpxRX׿ ^*5N)֭^g|02O(D P\ JJLFWeUUl;Ǯ&ax6͹%Ň٨ ɳKsC҆!%*8p2TAU_GgvA2s:B1kfxNWx ei1 y'Z]�Qh0 1B6*SYЊ: .mLp,'1A;&iSge=f2%" **7Ae0 _! /puCym%bTb+VG&dlg�]ier)Z48n PтR19$ZתH걬Tw<~utzA[]A �.a̦RIzSJych@F =KVi:5P˥u0z& qbj˨Q&LO/HQNDEM1Tå&Twl6 tą rs\+J^?:dv )*S\9lN13;D+ESɲT\Zx2Gs=츼?s~d ~p^芌ڲVV_?ÖY W$S|B+EFL#ĤҸ^u|MWGsvD`QixzhYFt=/<)5T8R"GW{CiLEji ÛqC*<5=;$WU0|>n"wqXO oT.RӠhr^�f}׳%AD}(DsEQ>3<0Bhv_]2<z:HA{wKz#h'sm1“Ht$E.=G.Tn7]/@V߽$mUJm493Wﻎ]T{g,8m. F9R$22sS\?m%N& ek|3ؐƤ-c?@O;~ì/sS wp,sA (B4D."A_{X_Z G띗0g{|cMd҆$5u›[fǫ\U]3L*Ew_$MkR75;6\ގ!3eG.kW997; 4ӯ,/)"mJmi1UPozԉ<_/ I3`*n6?jzl^22xWOg<ꑸ54I=[ٸfŢ:wC�aۥzTCcY8>3M3Η inuذRiN:-ڥ+Sp%/53C੠HmB] C Oްj^iEW*L|\!|[o|G8;+ o][bV._<E84<_?ۧCAQJ(v]3<9pbx -طTܕC_ q|d>Xy;X -/5W}Jx R7\`Ugsypn&Ϸ}7OL7##[G|9=əw}FBE+ͱyϞWxx<캌Ճ(~,*u&Vp 6M5{ͩs;QwVMKES c˃ϱo￉UcRwMJ3`]0{[t=FXMiU]j}b'_9;�)-]km~6b e(L<p!?ПGk8;cN05XEy'bǖ^RI[fz`;>{çIZ}f-+;/m<=2>-A<q�/s1 �Z|-ZCv(>w{d{4d a?y'^[Jk3?z =L6J ԍ<`bn;o dlژDۑ ey38==8uc>S{'5NY,$YgbYXO1q9q6O_r&|籇v={ij :Sl\Fg{:Av͹xp_{h;|shM qA]@ Fr<m޳Gc ocL\xSJIBk-28((-j%}JJ[Lj@N=vy ^^mIDh^rys����IENDB`�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/icons/Makefile.am�����������������������������������������������������������������0000664�0000000�0000000�00000001222�13435240150�0017033�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������SUBDIRS = \ 16x16 \ 24x24 \ 32x32 \ 48x48 \ 64x64 \ 128x128 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor update-icon-cache: @-if test -z "$(DESTDIR)"; then \ echo "Updating Gtk icon cache."; \ $(gtk_update_icon_cache); \ else \ echo "*** Icon cache not updated. Remember to run:"; \ echo "***"; \ echo "*** $(gtk_update_icon_cache)"; \ echo "***"; \ fi install-data-hook: update-icon-cache uninstall-hook: update-icon-cache distuninstallcheck_listfiles = \ find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/pragha.1��������������������������������������������������������������������������0000664�0000000�0000000�00000005433�13435240150�0015220�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������.TH "pragha" "1" "1.3.3" "Matias De lellis" "" .SH "NAME" .LP pragha \- A lightweight music player, forked of Consonance Music Manager .SH "SYNTAX" .LP pragha [OPTION...] [FILE1 [FILE2...]] .SH "DESCRIPTION" .LP pragha is a lightweight music player that aims to be fast, bloat\-free, and light on memory consumption. It is written completely in C and GTK+. Some of the features are: .LP .br * Library management using sqlite3 .br * Multiple views .br * OSD support .br * asf, ape, flac, mp3, mp4, ogg, wav, wma, and CDDA support .LP pragha is released under the GNU General Public Licence version 3 (GPLv3). .SH "OPTIONS" .LP .TP \fB\-?, \-\-help\fR Output help information and exit. .TP \fB\-\-help\-all\fR Output all help options and exit. .TP \fB\-\-help\-gtk\fR Output GTK+ Options and exit. .TP \fB\-v, \-\-version\fR Output version information and exit. .TP \fB\-e, \-\-debug\fR Enable Debug ( Levels: 1,2,3,4 ) .TP \fB\-l, \-\-log\-file\fR Log Debug to a file. .TP \fB\-p, \-\-play\fR Start playing. .TP \fB\-s, \-\-stop\fR Stop playing. .TP \fB\-t, \-\-pause\fR Play/Pause/Resume the current song. .TP \fB\-r, \-\-prev\fR Play the previous song in the playlist. .TP \fB\-n, \-\-next\fR Play the next song in the playlist. .TP \fB\-f, \-\-shuffle\fR Toggle shuffle mode. .TP \fB\-u, \-\-repeat\fR Toggle repeat mode. .TP \fB\-i, \-\-inc_vol\fR Increase the volume by 1. .TP \fB\-d, \-\-dec_vol\fR Decrease the volume by 1. .TP \fB\-o, \-\-show_osd\fR Show OSD notification (a popup window with info about the current song). .TP \fB\-x, \-\-toggle_view\fR Toggle player visibility .TP \fB\-c, \-\-current_state\fR Get current player state. .TP \fB\-a, \-\-audio_backend\fR Audio backend (valid options: alsa/oss) .TP \fB\-g, \-\-audio_device\fR Audio Device (For ALSA: hw:0,0 etc.., For OSS: /dev/dsp etc..) .TP \fB\-m, \-\-audio_mixer\fR Mixer Element (For ALSA: Master, PCM, etc.., For OSS: /dev/mixer, etc...) .TP \fB\-\-display=DISPLAY\fR Set the X display to use. .SH "USAGE" .LP * Add a library location in menu Edit \- Preferences. .br * Rescan Library from menu Tools. .br * Start using. :-) .SH "FILES" .TP $HOME/.config/pragha/pragha.db Library database (in sqlite3 format) .TP $HOME/.config/pragha/config personal settings (use the GUI interface to change them, Edit \- Preferences) .TP $HOME/.cache/pragha-album-art Basic cache for downloaded cover art saved as artist \- album.jpeg .SH "AUTHORS" .nf Pragha was originally a fork of Consonance written by Sujith <m.sujith@gmail.com> At the moment developed by Matias De lellis. <mati86dl@gmail.com> Man page written by Martin Zelaia <martintxo@sindominio.net> .SH "SEE ALSO" .LP http://pragha-music-player.github.io and http://sites.google.com/site/consonancemanager �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/pragha.appdata.xml����������������������������������������������������������������0000664�0000000�0000000�00000003424�13435240150�0017267�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2014-2015 Matias De lellis --> <application> <id type="desktop">pragha.desktop</id> <metadata_license>CC0-1.0</metadata_license> <project_license>GPL-3.0+</project_license> <name>Pragha Mucic Player</name> <summary>Manage and listen to music</summary> <description> <p> Pragha is a Lightweight Music Player for GNU/Linux, based on Gtk, sqlite, and completely written in C, constructed to be fast, light, and simultaneously tries to be complete without obstructing the daily work. </p> <p>Features:</p> <ul> <li>Full integration with GTK+3 support, but always completely independent of gnome or xfce</li> <li>Two panel desing inspired on Amarok 1.4. Library and current playlist</li> <li>Library with multiple views, according tags or folder structure</li> <li>Search, filtering and queue songs on current playlist</li> <li>Playing and edit tag of mp3, m4a, ogg, flac, asf, wma, and ape files. Of course you need codecs</li> <li>Playlist management. Exporting M3U and read M3U, PLS, XSPF and WAX playlists</li> <li>Play audio CDs and identifies this with CDDB</li> <li>Playback control with command line and MPRIS2</li> <li>Native desktop notifications with libnotify</li> </ul> </description> <url type="homepage">http://pragha-music-player.github.io</url> <screenshots> <screenshot type="default">http://pragha-music-player.github.io/images/Pragha-Xfce-HIG.png</screenshot> <screenshot>http://pragha-music-player.github.io/images/Pragha-Gnome3-HIG.png</screenshot> <screenshot>http://pragha-music-player.github.io/images/Pragha-W7.jpg</screenshot> </screenshots> <updatecontact>mati86dl_at_gmail.com</updatecontact> </application> ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/pragha.desktop.in�����������������������������������������������������������������0000664�0000000�0000000�00000001133�13435240150�0017127�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Desktop Entry] Version=1.0 Type=Application Name=Pragha _GenericName=Music Player _Comment=Manage and listen to music Icon=pragha Categories=GTK;AudioVideo;Player; Exec=pragha %F TryExec=pragha Terminal=false StartupNotify=true MimeType=application/x-ape;audio/ape;audio/x-ape;audio/x-m4a;video/x-ms-asf;audio/x-ms-wma;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/mpeg3;audio/mp3;application/ogg;application/x-ogg;audio/vorbis;audio/x-vorbis;audio/ogg;audio/x-ogg;audio/x-flac;application/x-flac;audio/flac;audio/x-wav;audio/mpegurl;audio/x-mpegurl;audio/x-scpls;application/xspf+xml;audio/x-ms-wax; �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/data/track.png�������������������������������������������������������������������������0000664�0000000�0000000�00000002114�13435240150�0015477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���4���a���;���sRGB����bKGD������ pHYs�� �� B(x���tIME1AK��IDATxmUEnJAFJAADZBQ&ETDHԇ,J) PSߢȒW%w(>4.{<0823FMts* * FXtV܉fK`ft2VqtI@pGI@p/ l( 4OⲒ`cm�-½%5풒BH3�z聒gWQx9DE�)i܍=Mڭ#mH(UMr،OۄsrC>Qx#A܏Fbdvr,hW=q%6wѹ[C%|BsO\G,džۂrop9ߧⱜ`vtREsZ5}8w}ϻ'we8#wh,i9K}os#}i @a3�-h.0Q]O,K. hfl J�Z_�4"}W @=n @KhjD~f;ZХN@]"OVSe8J} 8;PSDIx%�n<>bZ0sUy+{h5kcUCcl*f۽%�uY\d^pJ+GNwU{24 7d�;BXݎ]>7@lVPjl4X)OWaf�ZZ2{ԯ*<y(++֬,O338˜T@K'�z3[ `FBT,H;C)bΐw$xp/ ZH;J .3=P3vS5|¤zM0L*`:rCDr"_ps${W) 6f2 W�0>U}wpIj Rѝ^ ����IENDB`����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/�������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0014437�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/.gitignore���������������������������������������������������������������������0000664�0000000�0000000�00000000035�13435240150�0016425�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*.deps* *.libs* *.la *.lo *~ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/Makefile.am��������������������������������������������������������������������0000664�0000000�0000000�00000001611�13435240150�0016472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIB_PEAS_GTK_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) pluginincludedir = $(includedir)/pragha/plugins plugininclude_HEADERS = pragha-plugin-macros.h SUBDIRS = \ mpris2 \ gnome-media-keys if HAVE_LIBGLYR SUBDIRS += song-info endif if HAVE_LIBKEYBINDER SUBDIRS += keybinder endif if HAVE_LIBNOTIFY SUBDIRS += notify endif if HAVE_GUDEV SUBDIRS += devices SUBDIRS += removable-media endif if HAVE_LIBMTP SUBDIRS += mtp endif if HAVE_LIBSOUP SUBDIRS += acoustid SUBDIRS += tunein endif if HAVE_RYGEL SUBDIRS += dlna endif if HAVE_GRILO3 SUBDIRS += dlna-renderer endif if HAVE_GRILO2 SUBDIRS += dlna-renderer endif if HAVE_LIBCDIO if HAVE_LIBCDIO_PARANOIA if HAVE_LIBCDDB SUBDIRS += cdrom endif endif endif if HAVE_LIBCLASTFM SUBDIRS += lastfm endif �����������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/acoustid/����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0016252�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/acoustid/Makefile.am�����������������������������������������������������������0000664�0000000�0000000�00000002225�13435240150�0020307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/acoustid AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libacoustid.la libacoustid_la_SOURCES = \ pragha-acoustid-plugin.c libacoustid_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libacoustid_la_CFLAGS = \ $(LIBSOUP_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libacoustid_la_LIBADD = \ $(LIBSOUP_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libacoustid_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libacoustid_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libacoustid_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libacoustid_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = acoustid.plugin EXTRA_DIST = $(plugin_DATA) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/acoustid/acoustid.plugin�������������������������������������������������������0000664�0000000�0000000�00000000417�13435240150�0021307�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=acoustid Name=AcoustID Description=Get metadata on AcoustID service Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/acoustid/pragha-acoustid-plugin.c����������������������������������������������0000664�0000000�0000000�00000035341�13435240150�0022773�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <gst/gst.h> #include <libsoup/soup.h> #include <libpeas/peas.h> #include "src/pragha.h" #include "src/pragha-menubar.h" #include "src/pragha-playlist.h" #include "src/pragha-playlists-mgmt.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-hig.h" #include "src/pragha-utils.h" #include "src/xml_helper.h" #include "src/pragha-window.h" #include "src/pragha-tagger.h" #include "src/pragha-tags-dialog.h" #include "plugins/pragha-plugin-macros.h" #define PRAGHA_TYPE_ACOUSTID_PLUGIN (pragha_acoustid_plugin_get_type ()) #define PRAGHA_ACOUSTID_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_ACOUSTID_PLUGIN, PraghaAcoustidPlugin)) #define PRAGHA_ACOUSTID_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_ACOUSTID_PLUGIN, PraghaAcoustidPlugin)) #define PRAGHA_IS_ACOUSTID_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_ACOUSTID_PLUGIN)) #define PRAGHA_IS_ACOUSTID_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_ACOUSTID_PLUGIN)) #define PRAGHA_ACOUSTID_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_ACOUSTID_PLUGIN, PraghaAcoustidPluginClass)) struct _PraghaAcoustidPluginPrivate { PraghaApplication *pragha; PraghaMusicobject *mobj; GtkActionGroup *action_group_main_menu; guint merge_id_main_menu; }; typedef struct _PraghaAcoustidPluginPrivate PraghaAcoustidPluginPrivate; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_ACOUSTID_PLUGIN, PraghaAcoustidPlugin, pragha_acoustid_plugin) /* * Prototypes */ static void pragha_acoustid_get_metadata_dialog (PraghaAcoustidPlugin *plugin); /* * Popups */ static void pragha_acoustid_plugin_get_metadata_action (GtkAction *action, PraghaAcoustidPlugin *plugin) { PraghaBackend *backend; PraghaAcoustidPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Get Metadata action"); backend = pragha_application_get_backend (priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; pragha_acoustid_get_metadata_dialog (plugin); } static const GtkActionEntry main_menu_actions [] = { {"Search metadata", NULL, N_("Search tags on AcoustID"), "", "Search metadata", G_CALLBACK(pragha_acoustid_plugin_get_metadata_action)} }; static const gchar *main_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"> \ <menuitem action=\"Search metadata\"/> \ <separator/> \ </placeholder> \ </menu> \ </menubar> \ </ui>"; /* * Gear menu. */ static void pragha_gmenu_search_metadata_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { pragha_acoustid_plugin_get_metadata_action (NULL, PRAGHA_ACOUSTID_PLUGIN(user_data)); } /* * AcoustID Handlers */ static void pragha_acoustid_dialog_response (GtkWidget *dialog, gint response_id, PraghaAcoustidPlugin *plugin) { PraghaBackend *backend; PraghaPlaylist *playlist; PraghaToolbar *toolbar; PraghaMusicobject *nmobj, *current_mobj; PraghaTagger *tagger; gint changed = 0; PraghaAcoustidPluginPrivate *priv = plugin->priv; if (response_id == GTK_RESPONSE_HELP) { nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); pragha_track_properties_dialog(nmobj, pragha_application_get_window(priv->pragha)); return; } if (response_id == GTK_RESPONSE_OK) { changed = pragha_tags_dialog_get_changed(PRAGHA_TAGS_DIALOG(dialog)); if (changed) { backend = pragha_application_get_backend (priv->pragha); nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); if (pragha_backend_get_state (backend) != ST_STOPPED) { current_mobj = pragha_backend_get_musicobject (backend); if (pragha_musicobject_compare (nmobj, current_mobj) == 0) { toolbar = pragha_application_get_toolbar (priv->pragha); /* Update public current song */ pragha_update_musicobject_change_tag (current_mobj, changed, nmobj); /* Update current song on playlist */ playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_update_current_track (playlist, changed, nmobj); pragha_toolbar_set_title(toolbar, current_mobj); } } if (G_LIKELY(pragha_musicobject_is_local_file (nmobj))) { tagger = pragha_tagger_new(); pragha_tagger_add_file (tagger, pragha_musicobject_get_file(nmobj)); pragha_tagger_set_changes (tagger, nmobj, changed); pragha_tagger_apply_changes (tagger); g_object_unref(tagger); } } } gtk_widget_destroy (dialog); } static void pragha_acoustid_plugin_get_metadata_done (SoupSession *session, SoupMessage *msg, gpointer user_data) { GtkWidget *dialog; GtkWidget *window; PraghaStatusbar *statusbar; XMLNode *xml = NULL, *xi; gchar *otitle = NULL, *oartist = NULL, *oalbum = NULL; gchar *ntitle = NULL, *nartist = NULL, *nalbum = NULL; gint prechanged = 0; PraghaAcoustidPlugin *plugin = user_data; PraghaAcoustidPluginPrivate *priv = plugin->priv; window = pragha_application_get_window (priv->pragha); remove_watch_cursor (window); if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) return; g_object_get (priv->mobj, "title", &otitle, "artist", &oartist, "album", &oalbum, NULL); xml = tinycxml_parse ((gchar *)msg->response_body->data); xi = xmlnode_get (xml, CCA{"response", "results", "result", "recordings", "recording", "title", NULL }, NULL, NULL); if (xi && string_is_not_empty(xi->content)) { ntitle = unescape_HTML (xi->content); if (g_strcmp0(otitle, ntitle)) { pragha_musicobject_set_title (priv->mobj, ntitle); prechanged |= TAG_TITLE_CHANGED; } g_free (ntitle); } xi = xmlnode_get (xml, CCA{"response", "results", "result", "recordings", "recording", "artists", "artist", "name", NULL }, NULL, NULL); if (xi && string_is_not_empty(xi->content)) { nartist = unescape_HTML (xi->content); if (g_strcmp0(oartist, nartist)) { pragha_musicobject_set_artist (priv->mobj, nartist); prechanged |= TAG_ARTIST_CHANGED; } g_free (nartist); } xi = xmlnode_get (xml, CCA{"response", "results", "result", "recordings", "recording", "releasegroups", "releasegroup", "title", NULL }, NULL, NULL); if (xi && string_is_not_empty(xi->content)) { nalbum = unescape_HTML (xi->content); if (g_strcmp0(oalbum, nalbum)) { pragha_musicobject_set_album (priv->mobj, nalbum); prechanged |= TAG_ALBUM_CHANGED; } g_free (nalbum); } if (prechanged) { dialog = pragha_tags_dialog_new (); gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(pragha_application_get_window(priv->pragha))); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_acoustid_dialog_response), plugin); pragha_tags_dialog_set_musicobject (PRAGHA_TAGS_DIALOG(dialog), priv->mobj); pragha_tags_dialog_set_changed (PRAGHA_TAGS_DIALOG(dialog), prechanged); gtk_widget_show (dialog); } else { statusbar = pragha_statusbar_get (); pragha_statusbar_set_misc_text (statusbar, _("AcoustID not found any similar song")); g_object_unref (statusbar); } g_free (otitle); g_free (oartist); g_free (oalbum); g_object_unref (priv->mobj); xmlnode_free (xml); } static void pragha_acoustid_plugin_get_metadata (PraghaAcoustidPlugin *plugin, gint duration, const gchar *fingerprint) { SoupSession *session; SoupMessage *msg; gchar *query = NULL; query = g_strdup_printf ("http://api.acoustid.org/v2/lookup?client=%s&meta=%s&format=%s&duration=%d&fingerprint=%s", "yPvUXBmO", "recordings+releasegroups+compress", "xml", duration, fingerprint); session = soup_session_sync_new (); msg = soup_message_new ("GET", query); soup_session_queue_message (session, msg, pragha_acoustid_plugin_get_metadata_done, plugin); g_free (query); } static void error_cb (GstBus *bus, GstMessage *msg, void *data) { GError *err; gchar *debug_info; /* Print error details on the screen */ gst_message_parse_error (msg, &err, &debug_info); g_printerr ("Error received from element %s: %s\n", GST_OBJECT_NAME (msg->src), err->message); g_printerr ("Debugging information: %s\n", debug_info ? debug_info : "none"); g_clear_error (&err); g_free (debug_info); } static gboolean pragha_acoustid_get_fingerprint (const gchar *filename, gchar **fingerprint) { GstElement *pipeline, *chromaprint; GstBus *bus; GstMessage *msg; gchar *uri, *pipestring = NULL; uri = g_filename_to_uri(filename, NULL, NULL); pipestring = g_strdup_printf("uridecodebin uri=%s ! audioconvert ! chromaprint name=chromaprint0 ! fakesink", uri); g_free (uri); pipeline = gst_parse_launch (pipestring, NULL); bus = gst_element_get_bus (pipeline); g_signal_connect (G_OBJECT (bus), "message::error", (GCallback)error_cb, NULL); gst_element_set_state (pipeline, GST_STATE_PLAYING); msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS); if (msg != NULL) gst_message_unref (msg); gst_object_unref (bus); gst_element_set_state (pipeline, GST_STATE_NULL); chromaprint = gst_bin_get_by_name (GST_BIN(pipeline), "chromaprint0"); g_object_get (chromaprint, "fingerprint", fingerprint, NULL); gst_object_unref (pipeline); g_free (pipestring); return TRUE; } /* * AcoustID dialog */ static void pragha_acoustid_get_metadata_dialog (PraghaAcoustidPlugin *plugin) { GtkWidget *window; PraghaBackend *backend = NULL; PraghaMusicobject *mobj = NULL; const gchar *file = NULL; gchar *fingerprint = NULL; gint duration = 0; PraghaAcoustidPluginPrivate *priv = plugin->priv; backend = pragha_application_get_backend (priv->pragha); mobj = pragha_backend_get_musicobject (backend); priv->mobj = pragha_musicobject_dup (mobj); file = pragha_musicobject_get_file (mobj); duration = pragha_musicobject_get_length (mobj); window = pragha_application_get_window (priv->pragha); set_watch_cursor (window); if (pragha_acoustid_get_fingerprint (file, &fingerprint)) pragha_acoustid_plugin_get_metadata (plugin, duration, fingerprint); else remove_watch_cursor (window); g_free (fingerprint); } static void backend_changed_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data) { GtkWindow *window; GtkAction *action; PraghaBackendState state = 0; PraghaAcoustidPlugin *plugin = user_data; PraghaAcoustidPluginPrivate *priv = plugin->priv; state = pragha_backend_get_state (backend); action = gtk_action_group_get_action (priv->action_group_main_menu, "Search metadata"); gtk_action_set_sensitive (action, state != ST_STOPPED); window = GTK_WINDOW(pragha_application_get_window(priv->pragha)); pragha_menubar_set_enable_action (window, "search-metadata", state != ST_STOPPED); } /* * AcoustID plugin */ static void pragha_plugin_activate (PeasActivatable *activatable) { GMenuItem *item; GSimpleAction *action; PraghaAcoustidPlugin *plugin = PRAGHA_ACOUSTID_PLUGIN (activatable); PraghaAcoustidPluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); CDEBUG(DBG_PLUGIN, "AcustId plugin %s", G_STRFUNC); /* Attach main menu */ priv->action_group_main_menu = gtk_action_group_new ("PraghaAcoustidPlugin"); gtk_action_group_set_translation_domain (priv->action_group_main_menu, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_main_menu, main_menu_actions, G_N_ELEMENTS (main_menu_actions), plugin); priv->merge_id_main_menu = pragha_menubar_append_plugin_action (priv->pragha, priv->action_group_main_menu, main_menu_xml); /* Gear Menu */ action = g_simple_action_new ("search-metadata", NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_gmenu_search_metadata_action), plugin); item = g_menu_item_new (_("Search tags on AcoustID"), "win.search-metadata"); pragha_menubar_append_action (priv->pragha, "pragha-plugins-placeholder", action, item); /* Connect playback signals */ g_signal_connect (pragha_application_get_backend (priv->pragha), "notify::state", G_CALLBACK (backend_changed_state_cb), plugin); backend_changed_state_cb (pragha_application_get_backend (priv->pragha), NULL, plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaAcoustidPlugin *plugin = PRAGHA_ACOUSTID_PLUGIN (activatable); PraghaAcoustidPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "AcustID plugin %s", G_STRFUNC); /* Disconnect playback signals */ g_signal_handlers_disconnect_by_func (pragha_application_get_backend (priv->pragha), backend_changed_state_cb, plugin); /* Remove menu actions */ pragha_menubar_remove_plugin_action (priv->pragha, priv->action_group_main_menu, priv->merge_id_main_menu); priv->merge_id_main_menu = 0; pragha_menubar_remove_action (priv->pragha, "pragha-plugins-placeholder", "search-metadata"); }�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/cdrom/�������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015543�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/cdrom/Makefile.am��������������������������������������������������������������0000664�0000000�0000000�00000002540�13435240150�0017600�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/cdrom AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libcdrom.la libcdrom_la_SOURCES = \ pragha-cdrom-plugin.c \ pragha-cdrom-plugin.h libcdrom_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libcdrom_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ $(LIBCDIO_CFLAGS) \ $(LIBCDDB_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libcdrom_la_LIBADD = \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) \ $(LIBCDIO_LIBS) \ $(LIBCDIO_PARANOIA_LIBS) \ $(LIBCDDB_LIBS) if HAVE_GSTREAMER_AUDIO libcdrom_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libcdrom_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libcdrom_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libcdrom_la_LIBADD += $(LIBXFCE4UI_LIBS) endif if HAVE_GUDEV libcdrom_la_CFLAGS += $(GUDEV_CFLAGS) libcdrom_la_LIBADD += $(GUDEV_LIBS) \ ../devices/libdeviceclient.la endif plugin_DATA = cdrom.plugin EXTRA_DIST = $(plugin_DATA) ����������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/cdrom/cdrom.plugin�������������������������������������������������������������0000664�0000000�0000000�00000000413�13435240150�0020065�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=cdrom Name=Play cdrom Description=Play audios cds Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha Depends=devices�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/cdrom/pragha-cdrom-plugin.c����������������������������������������������������0000664�0000000�0000000�00000061536�13435240150�0021562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2015 matias <mati86dl@gmail.com> */ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <cdio/paranoia/cdda.h> #include <cdio/cd_types.h> #include <cddb/cddb.h> #include <libpeas/peas.h> #include "src/pragha.h" #include "src/pragha-hig.h" #include "src/pragha-utils.h" #include "src/pragha-menubar.h" #include "src/pragha-musicobject.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-plugins-engine.h" #include "src/pragha-statusicon.h" #include "src/pragha-music-enum.h" #include "src/pragha-window.h" #if HAVE_GUDEV #include "plugins/devices/pragha-devices-plugin.h" #include "plugins/devices/pragha-device-client.h" #endif #include "plugins/pragha-plugin-macros.h" #define PRAGHA_TYPE_CDROM_PLUGIN (pragha_cdrom_plugin_get_type ()) #define PRAGHA_CDROM_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_CDROM_PLUGIN, PraghaCdromPlugin)) #define PRAGHA_CDROM_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_CDROM_PLUGIN, PraghaCdromPlugin)) #define PRAGHA_IS_CDROM_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_CDROM_PLUGIN)) #define PRAGHA_IS_CDROM_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_CDROM_PLUGIN)) #define PRAGHA_CDROM_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_CDROM_PLUGIN, PraghaCdromPluginClass)) struct _PraghaCdromPluginPrivate { PraghaApplication *pragha; GtkWidget *device_setting_widget; GtkWidget *audio_cd_device_w; GtkWidget *cddb_setting_widget; GtkWidget *use_cddb_w; gchar *audio_cd_device; gboolean use_cddb; GtkActionGroup *action_group_main_menu; guint merge_id_main_menu; guint merge_id_syst_menu; }; typedef struct _PraghaCdromPluginPrivate PraghaCdromPluginPrivate; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_CDROM_PLUGIN, PraghaCdromPlugin, pragha_cdrom_plugin) /* * CDROM plugin. */ #define KEY_USE_CDDB "use_cddb" #define KEY_AUDIO_CD_DEVICE "audio_cd_device" static gboolean pragha_preferences_get_use_cddb (PraghaPreferences *preferences) { gchar *plugin_group = NULL; gboolean use_cddb = FALSE; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "cdrom"); use_cddb = pragha_preferences_get_boolean (preferences, plugin_group, KEY_USE_CDDB); g_free (plugin_group); return use_cddb; } static void pragha_preferences_set_use_cddb (PraghaPreferences *preferences, gboolean use_cddb) { gchar *plugin_group = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "cdrom"); pragha_preferences_set_boolean (preferences, plugin_group, KEY_USE_CDDB, use_cddb); g_free (plugin_group); } static gchar * pragha_preferences_get_audio_cd_device (PraghaPreferences *preferences) { gchar *plugin_group = NULL, *audio_cd_device = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "cdrom"); audio_cd_device = pragha_preferences_get_string (preferences, plugin_group, KEY_AUDIO_CD_DEVICE); g_free (plugin_group); return audio_cd_device; } static void pragha_preferences_set_audio_cd_device (PraghaPreferences *preferences, const gchar *device) { gchar *plugin_group = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "cdrom"); if (string_is_not_empty(device)) pragha_preferences_set_string (preferences, plugin_group, KEY_AUDIO_CD_DEVICE, device); else pragha_preferences_remove_key (preferences, plugin_group, KEY_AUDIO_CD_DEVICE); g_free (plugin_group); } static PraghaMusicobject * new_musicobject_from_cdda (PraghaApplication *pragha, cdrom_drive_t *cdda_drive, cddb_disc_t *cddb_disc, gint track_no) { PraghaPreferences *preferences; PraghaMusicEnum *enum_map = NULL; PraghaMusicobject *mobj = NULL; gint channels, start, end; gchar *ntitle = NULL, *nfile = NULL; CDEBUG(DBG_PLUGIN, "Creating new musicobject from cdda: %d", track_no); channels = cdio_get_track_channels(cdda_drive->p_cdio, track_no); start = cdio_cddap_track_firstsector(cdda_drive, track_no); end = cdio_cddap_track_lastsector(cdda_drive, track_no); mobj = g_object_new (PRAGHA_TYPE_MUSICOBJECT, NULL); preferences = pragha_application_get_preferences (pragha); if (pragha_preferences_get_use_cddb (preferences) && cddb_disc) { cddb_track_t *track; const gchar *title, *artist, *album, *genre; gint year; track = cddb_disc_get_track(cddb_disc, track_no - 1); if (track) { title = cddb_track_get_title(track); if (title) ntitle = g_strdup(title); artist = cddb_track_get_artist(track); if(artist) pragha_musicobject_set_artist(mobj, artist); album = cddb_disc_get_title(cddb_disc); if(album) pragha_musicobject_set_album(mobj, album); year = cddb_disc_get_year(cddb_disc); if(year) pragha_musicobject_set_year(mobj, year); genre = cddb_disc_get_genre(cddb_disc); if(genre) pragha_musicobject_set_genre(mobj, genre); } } enum_map = pragha_music_enum_get (); pragha_musicobject_set_source (mobj, pragha_music_enum_map_get(enum_map, "FILE_CDDA")); g_object_unref (enum_map); nfile = g_strdup_printf("cdda://%d", track_no); pragha_musicobject_set_file(mobj, nfile); pragha_musicobject_set_track_no(mobj, track_no); if (!ntitle) ntitle = g_strdup_printf("Track %d", track_no); pragha_musicobject_set_title(mobj, ntitle); pragha_musicobject_set_length(mobj, (end - start) / CDIO_CD_FRAMES_PER_SEC); pragha_musicobject_set_channels(mobj, (channels > 0) ? channels : 0); g_free(nfile); g_free(ntitle); return mobj; } static gint cddb_add_tracks (cdrom_drive_t *cdda_drive, cddb_disc_t *cddb_disc) { cddb_track_t *track; lba_t lba; gint num_tracks, first_track, i = 0; num_tracks = cdio_cddap_tracks(cdda_drive); if (!num_tracks) return -1; first_track = cdio_get_first_track_num(cdda_drive->p_cdio); for (i = first_track; i <= num_tracks; i++) { track = cddb_track_new(); if (!track) return -1; lba = cdio_get_track_lba(cdda_drive->p_cdio, i); if (lba == CDIO_INVALID_LBA) return -1; cddb_disc_add_track(cddb_disc, track); cddb_track_set_frame_offset(track, lba); } return 0; } static void add_audio_cd_tracks (PraghaApplication *pragha, cdrom_drive_t *cdda_drive, cddb_disc_t *cddb_disc) { PraghaPlaylist *playlist; PraghaMusicobject *mobj; gint num_tracks = 0, i = 0; GList *list = NULL; num_tracks = cdio_cddap_tracks(cdda_drive); if (!num_tracks) return; for (i = 1; i <= num_tracks; i++) { mobj = new_musicobject_from_cdda(pragha, cdda_drive, cddb_disc, i); if (G_LIKELY(mobj)) list = g_list_append(list, mobj); pragha_process_gtk_events (); } if (list) { playlist = pragha_application_get_playlist (pragha); pragha_playlist_append_mobj_list(playlist, list); g_list_free (list); } } static cdrom_drive_t* find_audio_cd (PraghaApplication *pragha) { cdrom_drive_t *drive = NULL; gchar **cdda_devices = NULL; PraghaPreferences *preferences; preferences = pragha_application_get_preferences (pragha); const gchar *audio_cd_device = pragha_preferences_get_audio_cd_device(preferences); if (!audio_cd_device) { cdda_devices = cdio_get_devices_with_cap(NULL, CDIO_FS_AUDIO, FALSE); if (!cdda_devices || (cdda_devices && !*cdda_devices)) { g_warning("No Audio CD found"); return NULL; } CDEBUG(DBG_PLUGIN, "Trying Audio CD Device: %s", *cdda_devices); drive = cdio_cddap_identify(*cdda_devices, 0, NULL); if (!drive) { g_warning("Unable to identify Audio CD"); goto exit; } } else { CDEBUG(DBG_PLUGIN, "Trying Audio CD Device: %s", audio_cd_device); drive = cdio_cddap_identify(audio_cd_device, 0, NULL); if (!drive) { g_warning("Unable to identify Audio CD"); return NULL; } } exit: if (cdda_devices) cdio_free_device_list(cdda_devices); return drive; } void pragha_application_append_audio_cd (PraghaApplication *pragha) { lba_t lba; gint matches; cddb_disc_t *cddb_disc = NULL; cddb_conn_t *cddb_conn = NULL; PraghaPreferences *preferences; cdrom_drive_t *cdda_drive = find_audio_cd(pragha); if (!cdda_drive) return; if (cdio_cddap_open(cdda_drive)) { g_warning("Unable to open Audio CD"); return; } preferences = pragha_application_get_preferences (pragha); if (pragha_preferences_get_use_cddb (preferences)) { cddb_conn = cddb_new (); if (!cddb_conn) goto add; cddb_disc = cddb_disc_new(); if (!cddb_disc) goto add; lba = cdio_get_track_lba(cdda_drive->p_cdio, CDIO_CDROM_LEADOUT_TRACK); if (lba == CDIO_INVALID_LBA) goto add; cddb_disc_set_length(cddb_disc, FRAMES_TO_SECONDS(lba)); if (cddb_add_tracks(cdda_drive, cddb_disc) < 0) goto add; if (!cddb_disc_calc_discid(cddb_disc)) goto add; cddb_disc_set_category(cddb_disc, CDDB_CAT_MISC); matches = cddb_query(cddb_conn, cddb_disc); if (matches == -1) goto add; if (!cddb_read(cddb_conn, cddb_disc)) { cddb_error_print(cddb_errno(cddb_conn)); goto add; } CDEBUG(DBG_PLUGIN, "Successfully initialized CDDB"); goto add; } add: add_audio_cd_tracks(pragha, cdda_drive, cddb_disc); CDEBUG(DBG_PLUGIN, "Successfully opened Audio CD device"); if (cdda_drive) cdio_cddap_close(cdda_drive); if (cddb_disc) cddb_disc_destroy(cddb_disc); if (cddb_conn) cddb_destroy(cddb_conn); } static gboolean pragha_musicobject_is_cdda_type (PraghaMusicobject *mobj) { PraghaMusicEnum *enum_map = NULL; PraghaMusicSource file_source = FILE_NONE; enum_map = pragha_music_enum_get (); file_source = pragha_music_enum_map_get(enum_map, "FILE_CDDA"); g_object_unref (enum_map); return (file_source == pragha_musicobject_get_source (mobj)); } static void pragha_cdrom_plugin_set_device (PraghaBackend *backend, GObject *obj, gpointer user_data) { PraghaMusicobject *mobj = NULL; GObject *source; PraghaCdromPlugin *plugin = user_data; PraghaCdromPluginPrivate *priv = plugin->priv; mobj = pragha_backend_get_musicobject (backend); if (!pragha_musicobject_is_cdda_type (mobj)) return; g_object_get (obj, "source", &source, NULL); if (source) { PraghaPreferences *preferences = pragha_application_get_preferences (priv->pragha); const gchar *audio_cd_device = pragha_preferences_get_audio_cd_device (preferences); if (audio_cd_device) { g_object_set (source, "device", audio_cd_device, NULL); } g_object_unref (source); } } static void pragha_cdrom_plugin_prepare_source (PraghaBackend *backend, gpointer user_data) { PraghaMusicobject *mobj; const gchar *uri = NULL; mobj = pragha_backend_get_musicobject (backend); if (!pragha_musicobject_is_cdda_type (mobj)) return; uri = pragha_musicobject_get_file (mobj); pragha_backend_set_playback_uri (backend, uri); } /* * GUDEV signals. */ #ifdef HAVE_GUDEV static void pragha_cdrom_plugin_device_added_response (GtkWidget *dialog, gint response, gpointer user_data) { PraghaCdromPlugin *plugin = user_data; PraghaCdromPluginPrivate *priv = plugin->priv; switch (response) { case PRAGHA_DEVICE_RESPONSE_PLAY: pragha_application_append_audio_cd (priv->pragha); break; case PRAGHA_DEVICE_RESPONSE_NONE: default: break; } gtk_widget_destroy (dialog); } static void pragha_cdrom_plugin_device_added (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device, gpointer user_data) { GtkWidget *dialog; PraghaCdromPlugin *plugin = user_data; if (device_type != PRAGHA_DEVICE_AUDIO_CD) return; dialog = pragha_gudev_dialog_new (NULL, _("Audio/Data CD"), "media-optical", _("An audio CD was inserted"), NULL, _("Add Audio _CD"), PRAGHA_DEVICE_RESPONSE_PLAY); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_cdrom_plugin_device_added_response), plugin); gtk_widget_show_all (dialog); } void pragha_cdrom_plugin_device_removed (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device, gpointer user_data) { if (device_type != PRAGHA_DEVICE_AUDIO_CD) return; g_print ("CDROM REMOVEDDDDD.. Cri cri.. never detect it.. .\n"); } #endif /* * Menubar */ static void pragha_cdrom_plugin_append_action (GtkAction *action, PraghaCdromPlugin *plugin) { PraghaCdromPluginPrivate *priv = plugin->priv; pragha_application_append_audio_cd (priv->pragha); } static void pragha_gmenu_add_cdrom_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { pragha_cdrom_plugin_append_action (NULL, PRAGHA_CDROM_PLUGIN(user_data)); } static const GtkActionEntry main_menu_actions [] = { {"Add Audio CD", NULL, N_("Add Audio _CD"), "", "Append a Audio CD", G_CALLBACK(pragha_cdrom_plugin_append_action)} }; static const gchar *main_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"PlaylistMenu\"> \ <placeholder name=\"pragha-append-music-placeholder\"> \ <menuitem action=\"Add Audio CD\"/> \ </placeholder> \ </menu> \ </menubar> \ </ui>"; static const gchar *syst_menu_xml = "<ui> \ <popup> \ <placeholder name=\"pragha-append-music-placeholder\"> \ <menuitem action=\"Add Audio CD\"/> \ </placeholder> \ </popup> \ </ui>"; /* * Cdrom Settings */ static void pragha_cdrom_preferences_dialog_response (GtkDialog *dialog_w, gint response_id, PraghaCdromPlugin *plugin) { PraghaPreferences *preferences; const gchar *audio_cd_device; PraghaCdromPluginPrivate *priv = plugin->priv; preferences = pragha_preferences_get(); switch(response_id) { case GTK_RESPONSE_CANCEL: pragha_gtk_entry_set_text(GTK_ENTRY(priv->audio_cd_device_w), priv->audio_cd_device); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->use_cddb_w), priv->use_cddb); break; case GTK_RESPONSE_OK: audio_cd_device = gtk_entry_get_text (GTK_ENTRY(priv->audio_cd_device_w)); if (audio_cd_device) { pragha_preferences_set_audio_cd_device (preferences, audio_cd_device); g_free (priv->audio_cd_device); priv->audio_cd_device = g_strdup(audio_cd_device); } priv->use_cddb = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->use_cddb_w)); pragha_preferences_set_use_cddb (preferences, priv->use_cddb); break; default: break; } g_object_unref (preferences); } static void pragha_cdrom_init_settings (PraghaCdromPlugin *plugin) { PraghaPreferences *preferences; gchar *plugin_group = NULL; PraghaCdromPluginPrivate *priv = plugin->priv; preferences = pragha_preferences_get(); plugin_group = pragha_preferences_get_plugin_group_name (preferences, "cdrom"); if (pragha_preferences_has_group (preferences, plugin_group)) { priv->audio_cd_device = pragha_preferences_get_audio_cd_device (preferences); priv->use_cddb = pragha_preferences_get_use_cddb(preferences); } else { priv->audio_cd_device = NULL; priv->use_cddb = TRUE; } pragha_gtk_entry_set_text(GTK_ENTRY(priv->audio_cd_device_w), priv->audio_cd_device); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->use_cddb_w), priv->use_cddb); g_object_unref (preferences); g_free (plugin_group); } static void pragha_cdrom_plugin_append_setting (PraghaCdromPlugin *plugin) { PreferencesDialog *dialog; GtkWidget *table; GtkWidget *audio_cd_device_label,*audio_cd_device_entry, *use_cddb; guint row = 0; PraghaCdromPluginPrivate *priv = plugin->priv; /* Cd Device */ table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("Audio CD")); audio_cd_device_label = gtk_label_new(_("Audio CD Device")); gtk_misc_set_alignment (GTK_MISC (audio_cd_device_label), 0, 0); audio_cd_device_entry = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(audio_cd_device_entry), AUDIO_CD_DEVICE_ENTRY_LEN); gtk_entry_set_activates_default (GTK_ENTRY(audio_cd_device_entry), TRUE); pragha_hig_workarea_table_add_row (table, &row, audio_cd_device_label, audio_cd_device_entry); /* Store references */ priv->device_setting_widget = table; priv->audio_cd_device_w = audio_cd_device_entry; /* CDDB Option */ row = 0; table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title (table, &row, "CDDB"); use_cddb = gtk_check_button_new_with_label (_("Connect to CDDB server")); pragha_hig_workarea_table_add_wide_control (table, &row, use_cddb); priv->cddb_setting_widget = table; priv->use_cddb_w = use_cddb; /* Append panes */ dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_append_audio_setting (dialog, priv->device_setting_widget, FALSE); pragha_preferences_append_services_setting (dialog, priv->cddb_setting_widget, FALSE); /* Configure handler and settings */ pragha_preferences_dialog_connect_handler (dialog, G_CALLBACK(pragha_cdrom_preferences_dialog_response), plugin); pragha_cdrom_init_settings (plugin); } static void pragha_cdrom_plugin_remove_setting (PraghaCdromPlugin *plugin) { PreferencesDialog *dialog; PraghaCdromPluginPrivate *priv = plugin->priv; dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_dialog_disconnect_handler (dialog, G_CALLBACK(pragha_cdrom_preferences_dialog_response), plugin); pragha_preferences_remove_audio_setting (dialog, priv->device_setting_widget); pragha_preferences_remove_services_setting (dialog, priv->cddb_setting_widget); } /* * Cdrom plugin */ static void pragha_plugin_activate (PeasActivatable *activatable) { GMenuItem *item; GSimpleAction *action; PraghaBackend *backend; PraghaStatusIcon *status_icon = NULL; PraghaMusicEnum *enum_map = NULL; PraghaCdromPlugin *plugin = PRAGHA_CDROM_PLUGIN (activatable); PraghaCdromPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN,"CDROM plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); /* Attach main menu */ priv->action_group_main_menu = gtk_action_group_new ("PraghaCdromPlugin"); gtk_action_group_set_translation_domain (priv->action_group_main_menu, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_main_menu, main_menu_actions, G_N_ELEMENTS (main_menu_actions), plugin); priv->merge_id_main_menu = pragha_menubar_append_plugin_action (priv->pragha, priv->action_group_main_menu, main_menu_xml); /* Systray */ status_icon = pragha_application_get_status_icon(priv->pragha); priv->merge_id_syst_menu = pragha_systray_append_plugin_action (status_icon, priv->action_group_main_menu, syst_menu_xml); g_object_ref (priv->action_group_main_menu); /* Gear Menu */ action = g_simple_action_new ("add-cdrom", NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_gmenu_add_cdrom_action), plugin); item = g_menu_item_new (_("Add Audio _CD"), "win.add-cdrom"); pragha_menubar_append_action (priv->pragha, "pragha-plugins-append-music", action, item); /* Connect signals */ backend = pragha_application_get_backend (priv->pragha); g_signal_connect (backend, "set-device", G_CALLBACK(pragha_cdrom_plugin_set_device), plugin); g_signal_connect (backend, "prepare-source", G_CALLBACK(pragha_cdrom_plugin_prepare_source), plugin); #ifdef HAVE_GUDEV PraghaDeviceClient *device_client; device_client = pragha_device_client_get(); g_signal_connect (G_OBJECT(device_client), "device-added", G_CALLBACK(pragha_cdrom_plugin_device_added), plugin); g_signal_connect (G_OBJECT(device_client), "device-removed", G_CALLBACK(pragha_cdrom_plugin_device_removed), plugin); g_object_unref (device_client); #endif enum_map = pragha_music_enum_get (); pragha_music_enum_map_get (enum_map, "FILE_CDDA"); g_object_unref (enum_map); /* Settings */ pragha_cdrom_plugin_append_setting (plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaBackend *backend; PraghaPreferences *preferences; PraghaStatusIcon *status_icon = NULL; PraghaMusicEnum *enum_map = NULL; gchar *plugin_group = NULL; PraghaCdromPlugin *plugin = PRAGHA_CDROM_PLUGIN (activatable); PraghaCdromPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN,"CDROM plugin %s", G_STRFUNC); pragha_menubar_remove_plugin_action (priv->pragha, priv->action_group_main_menu, priv->merge_id_main_menu); priv->merge_id_main_menu = 0; status_icon = pragha_application_get_status_icon(priv->pragha); pragha_systray_remove_plugin_action (status_icon, priv->action_group_main_menu, priv->merge_id_syst_menu); priv->merge_id_syst_menu = 0; pragha_menubar_remove_action (priv->pragha, "pragha-plugins-append-music", "add-cdrom"); backend = pragha_application_get_backend (priv->pragha); g_signal_handlers_disconnect_by_func (backend, pragha_cdrom_plugin_set_device, plugin); g_signal_handlers_disconnect_by_func (backend, pragha_cdrom_plugin_prepare_source, plugin); #ifdef HAVE_GUDEV PraghaDeviceClient *device_client; device_client = pragha_device_client_get(); g_signal_handlers_disconnect_by_func (device_client, pragha_cdrom_plugin_device_added, plugin); g_signal_handlers_disconnect_by_func (device_client, pragha_cdrom_plugin_device_removed, plugin); g_object_unref (device_client); #endif pragha_cdrom_plugin_remove_setting (plugin); preferences = pragha_application_get_preferences (priv->pragha); plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); if (!pragha_plugins_is_shutdown(pragha_application_get_plugins_engine(priv->pragha))) { pragha_preferences_remove_group (preferences, plugin_group); } g_free (plugin_group); enum_map = pragha_music_enum_get (); pragha_music_enum_map_remove (enum_map, "FILE_CDDA"); g_object_unref (enum_map); libcddb_shutdown (); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/cdrom/pragha-cdrom-plugin.h����������������������������������������������������0000664�0000000�0000000�00000002574�13435240150�0021564�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_CDROM_PLUGIN_H #define PRAGHA_CDROM_PLUGIN_H #include "pragha.h" void pragha_application_append_audio_cd (PraghaApplication *pragha); #endif /* PRAGHA_CDROM_PLUGIN_H */ ������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/�����������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0016061�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/Makefile.am������������������������������������������������������������0000664�0000000�0000000�00000003217�13435240150�0020120�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Device library. deviceclientdir = $(libdir)/pragha/plugins/devices deviceclient_LTLIBRARIES = libdeviceclient.la libdeviceclient_la_SOURCES = \ pragha-device-client.c \ pragha-device-client.h #libdeviceclient_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libdeviceclient_la_CFLAGS = \ $(GTK_CFLAGS) \ $(GUDEV_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libdeviceclient_la_LIBADD = \ $(GTK_LIBS) \ $(GUDEV_LIBS) # Fake plugin plugindir = $(libdir)/pragha/plugins/devices AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libdevices.la libdevices_la_SOURCES = \ pragha-devices-plugin.c \ pragha-devices-plugin.h libdevices_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libdevices_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ $(GUDEV_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libdevices_la_LIBADD = \ libdeviceclient.la \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) \ $(GUDEV_LIBS) if HAVE_GSTREAMER_AUDIO libdevices_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libdevices_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libdevices_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libdevices_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = devices.plugin EXTRA_DIST = $(plugin_DATA) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/devices.plugin���������������������������������������������������������0000664�0000000�0000000�00000000423�13435240150�0020722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=devices Name=Devices Description=Management removable devices Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha Hidden=true���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/pragha-device-client.c�������������������������������������������������0000664�0000000�0000000�00000020164�13435240150�0022203�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014-2015 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include "pragha-device-client.h" struct _PraghaDeviceClient { GObject _parent; GUdevClient *gudev_client; }; enum { SIGNAL_DEVICE_ADDED, SIGNAL_DEVICE_REMOVED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(PraghaDeviceClient, pragha_device_client, G_TYPE_OBJECT) static const gchar * gudev_subsystems[] = { "block", "usb", NULL, }; /* * Publics functions. */ GtkWidget * pragha_gudev_dialog_new (GtkWidget *parent, const gchar *title, const gchar *icon, const gchar *primary_text, const gchar *secondary_text, const gchar *first_button_text, gint first_button_response) { GtkWidget *dialog; GtkWidget *image; dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, NULL); if (title != NULL) gtk_window_set_title (GTK_WINDOW (dialog), title); gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), primary_text); gtk_dialog_add_button (GTK_DIALOG (dialog), _("Ignore"), PRAGHA_DEVICE_RESPONSE_NONE); if (first_button_text != NULL) gtk_dialog_add_button (GTK_DIALOG (dialog), first_button_text, first_button_response); if(icon != NULL) { image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_DIALOG); gtk_message_dialog_set_image(GTK_MESSAGE_DIALOG (dialog), image); } if (secondary_text != NULL) gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG (dialog), "%s", secondary_text); gtk_dialog_set_default_response (GTK_DIALOG (dialog), PRAGHA_DEVICE_RESPONSE_NONE); return dialog; } /* Helper */ gint pragha_gudev_get_property_as_int (GUdevDevice *device, const gchar *property, gint base) { const char *strvalue; strvalue = g_udev_device_get_property (device, property); if (strvalue == NULL) { return 0; } return strtol (strvalue, NULL, base); } /* Identify devices.*/ static gint pragha_gudev_get_device_type (GUdevDevice *device) { const gchar *devtype; const gchar *id_type; const gchar *id_fs_usage; gboolean is_cdrom; gboolean is_partition; gboolean is_volume; guint64 audio_tracks = 0; guint64 data_tracks = 0; guint64 is_mtpdevice = 0; /* collect general devices information */ id_type = g_udev_device_get_property (device, "ID_TYPE"); is_cdrom = (g_strcmp0 (id_type, "cd") == 0); if (is_cdrom) { /* silently ignore CD drives without media */ if (g_udev_device_get_property_as_boolean (device, "ID_CDROM_MEDIA")) { audio_tracks = g_udev_device_get_property_as_uint64 (device, "ID_CDROM_MEDIA_TRACK_COUNT_AUDIO"); data_tracks = g_udev_device_get_property_as_uint64 (device, "ID_CDROM_MEDIA_TRACK_COUNT_DATA"); if (audio_tracks > 0) return PRAGHA_DEVICE_AUDIO_CD; } } devtype = g_udev_device_get_property (device, "DEVTYPE"); id_fs_usage = g_udev_device_get_property (device, "ID_FS_USAGE"); is_partition = (g_strcmp0 (devtype, "partition") == 0); is_volume = (g_strcmp0 (devtype, "disk") == 0) && (g_strcmp0 (id_fs_usage, "filesystem") == 0); if (is_partition || is_volume || data_tracks) return PRAGHA_DEVICE_MOUNTABLE; is_mtpdevice = g_udev_device_get_property_as_uint64 (device, "ID_MTP_DEVICE"); if (is_mtpdevice) return PRAGHA_DEVICE_MTP; return PRAGHA_DEVICE_UNKNOWN; } /* Functions that manage to "add" "change" and "remove" devices events. */ static void pragha_gudev_device_added (PraghaDeviceClient *client, GUdevDevice *device) { PraghaDeviceType device_type = PRAGHA_DEVICE_UNKNOWN; device_type = pragha_gudev_get_device_type (device); if (device_type != PRAGHA_DEVICE_UNKNOWN) g_signal_emit (client, signals[SIGNAL_DEVICE_ADDED], 0, device_type, device); } static void pragha_gudev_device_changed (PraghaDeviceClient *client, GUdevDevice *device) { PraghaDeviceType device_type = PRAGHA_DEVICE_UNKNOWN; device_type = pragha_gudev_get_device_type (device); if (device_type == PRAGHA_DEVICE_AUDIO_CD) g_signal_emit (client, signals[SIGNAL_DEVICE_ADDED], 0, device_type, device); } static void pragha_gudev_device_removed (PraghaDeviceClient *client, GUdevDevice *device) { PraghaDeviceType device_type = PRAGHA_DEVICE_UNKNOWN; device_type = pragha_gudev_get_device_type (device); if (device_type != PRAGHA_DEVICE_UNKNOWN) g_signal_emit (client, signals[SIGNAL_DEVICE_REMOVED], 0, device_type, device); } static void gudev_uevent_cb (GUdevClient *uclient, const char *action, GUdevDevice *device, PraghaDeviceClient *client) { if (g_str_equal(action, "add")) { pragha_gudev_device_added (client, device); } else if (g_str_equal(action, "change")) { pragha_gudev_device_changed (client, device); } else if (g_str_equal (action, "remove")) { pragha_gudev_device_removed (client, device); } } /* Pragha device client object */ static void pragha_device_client_dispose (GObject *object) { PraghaDeviceClient *client = PRAGHA_DEVICE_CLIENT (object); if (client->gudev_client) { g_object_unref (client->gudev_client); client->gudev_client = NULL; } (*G_OBJECT_CLASS (pragha_device_client_parent_class)->dispose) (object); } static void pragha_device_client_class_init (PraghaDeviceClientClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->dispose = pragha_device_client_dispose; signals[SIGNAL_DEVICE_ADDED] = g_signal_new ("device-added", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaDeviceClientClass, device_added), NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER); signals[SIGNAL_DEVICE_REMOVED] = g_signal_new ("device-removed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaDeviceClientClass, device_removed), NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER); } static void pragha_device_client_init (PraghaDeviceClient *device_client) { device_client->gudev_client = g_udev_client_new(gudev_subsystems); g_signal_connect (device_client->gudev_client, "uevent", G_CALLBACK(gudev_uevent_cb), device_client); } PraghaDeviceClient * pragha_device_client_get (void) { static PraghaDeviceClient *device_client = NULL; if (G_UNLIKELY (device_client == NULL)) { device_client = g_object_new (PRAGHA_TYPE_DEVICE_CLIENT, NULL); g_object_add_weak_pointer (G_OBJECT (device_client), (gpointer) &device_client); } else { g_object_ref (G_OBJECT(device_client)); } return device_client; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/pragha-device-client.h�������������������������������������������������0000664�0000000�0000000�00000007040�13435240150�0022206�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_DEVICE_CLIENT_H #define PRAGHA_DEVICE_CLIENT_H #include <glib.h> #include <glib-object.h> #include <gtk/gtk.h> #include <gudev/gudev.h> G_BEGIN_DECLS /* Device types */ typedef enum { PRAGHA_DEVICE_NONE = 0, PRAGHA_DEVICE_MOUNTABLE, PRAGHA_DEVICE_AUDIO_CD, PRAGHA_DEVICE_MTP, PRAGHA_DEVICE_UNKNOWN } PraghaDeviceType; #define PRAGHA_TYPE_DEVICE_CLIENT (pragha_device_client_get_type()) #define PRAGHA_DEVICE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_DEVICE_CLIENT, PraghaDeviceClient)) #define PRAGHA_DEVICE_CLIENT_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_DEVICE_CLIENT, PraghaDeviceClient const)) #define PRAGHA_DEVICE_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_DEVICE_CLIENT, PraghaDeviceClientClass)) #define PRAGHA_IS_DEVICE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_DEVICE_CLIENT)) #define PRAGHA_IS_DEVICE_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_DEVICE_CLIENT)) #define PRAGHA_DEVICE_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_DEVICE_CLIENT, PraghaDeviceClientClass)) typedef struct _PraghaDeviceClient PraghaDeviceClient; typedef struct _PraghaDeviceClientClass PraghaDeviceClientClass; struct _PraghaDeviceClientClass { GObjectClass parent_class; void (*device_added) (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device); void (*device_removed) (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device); }; /* Dialog when add device */ enum { PRAGHA_DEVICE_RESPONSE_NONE, PRAGHA_DEVICE_RESPONSE_PLAY, PRAGHA_DEVICE_RESPONSE_BROWSE, }; GtkWidget * pragha_gudev_dialog_new (GtkWidget *parent, const gchar *title, const gchar *icon, const gchar *primary_text, const gchar *secondary_text, const gchar *first_button_text, gint first_button_response); gint pragha_gudev_get_property_as_int (GUdevDevice *device, const gchar *property, gint base); /* Create a new instance of PraghaDeviceClient* */ PraghaDeviceClient *pragha_device_client_get (void); G_END_DECLS #endif /* PRAGHA_DEVICE_CLIENT_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/pragha-devices-plugin.c������������������������������������������������0000664�0000000�0000000�00000006411�13435240150�0022405�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2015 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "plugins/pragha-plugin-macros.h" #include "pragha-device-client.h" #include "pragha-devices-plugin.h" #include "src/pragha-utils.h" #include "src/pragha.h" #define PRAGHA_TYPE_DEVICES_PLUGIN (pragha_devices_plugin_get_type ()) #define PRAGHA_DEVICES_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_DEVICES_PLUGIN, PraghaDevicesPlugin)) #define PRAGHA_DEVICES_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_DEVICES_PLUGIN, PraghaDevicesPlugin)) #define PRAGHA_IS_DEVICES_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_DEVICES_PLUGIN)) #define PRAGHA_IS_DEVICES_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_DEVICES_PLUGIN)) #define PRAGHA_DEVICES_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_DEVICES_PLUGIN, PraghaDevicesPluginClass)) struct _PraghaDevicesPluginPrivate { PraghaApplication *pragha; PraghaDeviceClient *device_client; }; typedef struct _PraghaDevicesPluginPrivate PraghaDevicesPluginPrivate; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_DEVICES_PLUGIN, PraghaDevicesPlugin, pragha_devices_plugin) static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaDevicesPlugin *plugin = PRAGHA_DEVICES_PLUGIN (activatable); PraghaDevicesPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Devices plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); priv->device_client = pragha_device_client_get (); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaDevicesPlugin *plugin = PRAGHA_DEVICES_PLUGIN (activatable); PraghaDevicesPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Devices plugin %s", G_STRFUNC); g_object_unref (priv->device_client); priv->pragha = NULL; }�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/devices/pragha-devices-plugin.h������������������������������������������������0000664�0000000�0000000�00000002652�13435240150�0022415�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_DEVICES_PLUGIN_H__ #define __PRAGHA_DEVICES_PLUGIN_H__ #include <glib.h> #include <glib-object.h> #include <gtk/gtk.h> #include <gudev/gudev.h> G_BEGIN_DECLS G_END_DECLS #endif /* __PRAGHA_DEVICES_PLUGIN_H__ */ ��������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna-renderer/�����������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0017161�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna-renderer/Makefile.am������������������������������������������������������0000664�0000000�0000000�00000002630�13435240150�0021216�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/dlna-renderer AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libpdlnarenderer.la libpdlnarenderer_la_SOURCES = \ pragha-dlna-renderer-plugin.h \ pragha-dlna-renderer-plugin.c libpdlnarenderer_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libpdlnarenderer_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libpdlnarenderer_la_LIBADD = \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GRILO3 libpdlnarenderer_la_CFLAGS += $(GRILO3_CFLAGS) libpdlnarenderer_la_LIBADD += $(GRILO3_LIBS) endif if HAVE_GRILO2 libpdlnarenderer_la_CFLAGS += $(GRILO2_CFLAGS) libpdlnarenderer_la_LIBADD += $(GRILO2_LIBS) endif if HAVE_GSTREAMER_AUDIO libpdlnarenderer_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libpdlnarenderer_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libpdlnarenderer_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libpdlnarenderer_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = dlna-renderer.plugin EXTRA_DIST = $(plugin_DATA) ��������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna-renderer/dlna-renderer.plugin���������������������������������������������0000664�0000000�0000000�00000000424�13435240150�0023123�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=pdlnarenderer Name=DLNA Renderer Description=Play music on a DLNA server Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna-renderer/pragha-dlna-renderer-plugin.c������������������������������������0000664�0000000�0000000�00000022412�13435240150�0024604�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <gio/gio.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include <grilo.h> #include "pragha-dlna-renderer-plugin.h" #include "src/pragha.h" #include "src/pragha-utils.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-playlist.h" #include "src/pragha-menubar.h" #include "src/pragha-musicobject.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-window.h" #include "plugins/pragha-plugin-macros.h" typedef struct _PraghaDlnaRendererPluginPrivate PraghaDlnaRendererPluginPrivate; struct _PraghaDlnaRendererPluginPrivate { PraghaApplication *pragha; GtkActionGroup *action_group_main_menu; guint merge_id_main_menu; }; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPlugin, pragha_dlna_renderer_plugin) /* * */ static void pragha_dlna_renderer_plugin_search_music (PraghaDlnaRendererPlugin *plugin); /* * Popups */ static void pragha_dlna_renderer_plugin_search_music_action (GtkAction *action, PraghaDlnaRendererPlugin *plugin) { pragha_dlna_renderer_plugin_search_music (plugin); } static void pragha_gmenu_dlna_renderer_plugin_search_music_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { pragha_dlna_renderer_plugin_search_music (PRAGHA_DLNA_RENDERER_PLUGIN(user_data)); } static const GtkActionEntry main_menu_actions [] = { {"Search dlna music", NULL, N_("Search music on DLNA server"), "", "Search dlna music", G_CALLBACK(pragha_dlna_renderer_plugin_search_music_action)} }; static const gchar *main_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"> \ <menuitem action=\"Search dlna music\"/> \ <separator/> \ </placeholder> \ </menu> \ </menubar> \ </ui>"; static GList * pragha_dlna_renderer_append_media (GList *list, GrlMedia *media) { PraghaMusicobject *mobj; const gchar *title = NULL, *url = NULL; guint seconds = 0; url = grl_media_get_url (media); title = grl_media_get_title (media); seconds = grl_media_get_duration (media); mobj = g_object_new (PRAGHA_TYPE_MUSICOBJECT, "file", url, "source", FILE_HTTP, "title", title, "length", seconds, NULL); if (G_LIKELY(mobj)) list = g_list_prepend (list, mobj); return list; } static GList * pragha_dlna_renderer_append_source (GList *list, GrlSource *source, GrlMedia *container) { GrlOperationOptions *options; GrlCaps *caps; GrlMedia *media; GList *keys = NULL; GList *medias = NULL, *media_iter; keys = grl_metadata_key_list_new (GRL_METADATA_KEY_TITLE, GRL_METADATA_KEY_DURATION, GRL_METADATA_KEY_URL, GRL_METADATA_KEY_CHILDCOUNT, GRL_METADATA_KEY_INVALID); caps = grl_source_get_caps (source, GRL_OP_BROWSE); options = grl_operation_options_new (caps); #ifdef HAVE_GRILO3 grl_operation_options_set_resolution_flags (options, GRL_RESOLVE_IDLE_RELAY); #endif #ifdef HAVE_GRILO2 grl_operation_options_set_flags (options, GRL_RESOLVE_IDLE_RELAY); #endif medias = grl_source_browse_sync (source, container, keys, options, NULL); for (media_iter = medias; media_iter; media_iter = g_list_next (media_iter)) { if (media_iter->data == NULL) continue; media = GRL_MEDIA (media_iter->data); #ifdef HAVE_GRILO3 if (grl_media_is_container (media)) { #endif #ifdef HAVE_GRILO2 if (GRL_IS_MEDIA_BOX (media)) { #endif list = pragha_dlna_renderer_append_source (list, source, media); } #ifdef HAVE_GRILO3 else if (grl_media_is_audio (media)) { #endif #ifdef HAVE_GRILO2 else if (GRL_IS_MEDIA_AUDIO (media)) { #endif list = pragha_dlna_renderer_append_media (list, media); } pragha_process_gtk_events (); g_object_unref (media); } g_object_unref (options); g_list_free (keys); g_list_free (medias); return list; } static void pragha_dlna_renderer_plugin_search_music (PraghaDlnaRendererPlugin *plugin) { PraghaPlaylist *playlist; PraghaStatusbar *statusbar; GList *sources = NULL, *sources_iter; GrlRegistry *registry; GList *list = NULL; CDEBUG(DBG_PLUGIN, "DLNA Renderer plugin %s", G_STRFUNC); registry = grl_registry_get_default (); sources = grl_registry_get_sources_by_operations (registry, GRL_OP_BROWSE, FALSE); for (sources_iter = sources; sources_iter; sources_iter = g_list_next (sources_iter)) { list = pragha_dlna_renderer_append_source (list, GRL_SOURCE(sources_iter->data), NULL); if (list) break; } statusbar = pragha_statusbar_get (); if (list) { playlist = pragha_application_get_playlist (plugin->priv->pragha); pragha_playlist_append_mobj_list (playlist, list); g_list_free (list); const gchar *server = grl_source_get_name (GRL_SOURCE(sources_iter->data)); gchar *msge = g_strdup_printf (_("Music of the %s server was added."), server); pragha_statusbar_set_misc_text (statusbar, msge); g_free (msge); } else { pragha_statusbar_set_misc_text (statusbar, _("Could not find any DLNA server.")); } g_object_unref (statusbar); g_list_free (sources); } /* * Plugin. */ static void pragha_plugin_activate (PeasActivatable *activatable) { GrlRegistry *registry; GMenuItem *item; GSimpleAction *action; GError *error = NULL; PraghaDlnaRendererPlugin *plugin = PRAGHA_DLNA_RENDERER_PLUGIN (activatable); PraghaDlnaRendererPluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); CDEBUG(DBG_PLUGIN, "DLNA Renderer plugin %s", G_STRFUNC); grl_init (NULL, NULL); registry = grl_registry_get_default (); #ifdef HAVE_GRILO3 if (!grl_registry_load_all_plugins (registry, FALSE, &error) || !grl_registry_activate_plugin_by_id (registry, "grl-dleyna", &error)) { #endif #ifdef HAVE_GRILO2 if (!grl_registry_load_plugin_by_id (registry, "grl-dleyna", &error)) { #endif g_print ("Failed to load plugins: %s\n\n", error->message); } /* Attach main menu */ priv->action_group_main_menu = gtk_action_group_new ("PraghaDlnaPlugin"); gtk_action_group_set_translation_domain (priv->action_group_main_menu, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_main_menu, main_menu_actions, G_N_ELEMENTS (main_menu_actions), plugin); priv->merge_id_main_menu = pragha_menubar_append_plugin_action (priv->pragha, priv->action_group_main_menu, main_menu_xml); /* Gear Menu */ action = g_simple_action_new ("search-dlna", NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_gmenu_dlna_renderer_plugin_search_music_action), plugin); item = g_menu_item_new (_("Search music on DLNA server"), "win.search-dlna"); pragha_menubar_append_action (priv->pragha, "pragha-plugins-placeholder", action, item); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaDlnaRendererPlugin *plugin = PRAGHA_DLNA_RENDERER_PLUGIN (activatable); PraghaDlnaRendererPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "DLNA Renderer plugin %s", G_STRFUNC); pragha_menubar_remove_plugin_action (priv->pragha, priv->action_group_main_menu, priv->merge_id_main_menu); priv->merge_id_main_menu = 0; pragha_menubar_remove_action (priv->pragha, "pragha-plugins-placeholder", "search-dlna"); grl_deinit (); }������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna-renderer/pragha-dlna-renderer-plugin.h������������������������������������0000664�0000000�0000000�00000004346�13435240150�0024617�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_DLNA_RENDERER_PLUGIN_H__ #define __PRAGHA_DLNA_RENDERER_PLUGIN_H__ #include <gtk/gtk.h> #include <libpeas/peas.h> #include "src/pragha.h" G_BEGIN_DECLS #define PRAGHA_TYPE_DLNA_RENDERER_PLUGIN (pragha_dlna_renderer_plugin_get_type ()) #define PRAGHA_DLNA_RENDERER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPlugin)) #define PRAGHA_DLNA_RENDERER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPlugin)) #define PRAGHA_IS_DLNA_RENDERER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN)) #define PRAGHA_IS_DLNA_RENDERER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN)) #define PRAGHA_DLNA_RENDERER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPluginClass)) GType pragha_dlna_renderer_plugin_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* __PRAGHA_DLNA_RENDERER_PLUGIN_H__ */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna/��������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015355�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna/Makefile.am���������������������������������������������������������������0000664�0000000�0000000�00000002171�13435240150�0017412�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/dlna AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libdlna.la libdlna_la_SOURCES = \ pragha-dlna-plugin.h \ pragha-dlna-plugin.c libdlna_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libdlna_la_CFLAGS = \ $(RYGEL_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libdlna_la_LIBADD = \ $(RYGEL_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libdlna_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libdlna_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libdlna_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libdlna_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = dlna.plugin EXTRA_DIST = $(plugin_DATA) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna/dlna.plugin���������������������������������������������������������������0000664�0000000�0000000�00000000422�13435240150�0017511�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=dlna Name=DLNA Server Description=Share your playlist on a DLNA server Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/dlna/pragha-dlna-plugin.c������������������������������������������������������0000664�0000000�0000000�00000020752�13435240150�0021201�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <sys/types.h> #include <ifaddrs.h> #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <gio/gio.h> #include <rygel-server.h> #include <rygel-core.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "pragha-dlna-plugin.h" #include "src/pragha.h" #include "src/pragha-utils.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-playlist.h" #include "plugins/pragha-plugin-macros.h" typedef struct _PraghaDlnaPluginPrivate PraghaDlnaPluginPrivate; struct _PraghaDlnaPluginPrivate { PraghaApplication *pragha; RygelMediaServer *server; RygelSimpleContainer *container; }; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPlugin, pragha_dlna_plugin) static void pragha_dlna_plugin_append_track (PraghaDlnaPlugin *plugin, PraghaMusicobject *mobj, gint id) { RygelMusicItem *item = NULL; gchar *uri = NULL, *u_title = NULL, *item_id = NULL, *content_type = NULL; const gchar *file = NULL, *title = NULL; gboolean uncertain; PraghaDlnaPluginPrivate *priv = plugin->priv; title = pragha_musicobject_get_title (mobj); u_title = string_is_not_empty(title) ? g_strdup(title) : get_display_name (mobj); item_id = g_strdup_printf ("%06d", id); item = rygel_music_item_new (item_id, RYGEL_MEDIA_CONTAINER(priv->container), u_title, RYGEL_MUSIC_ITEM_UPNP_CLASS); if (item != NULL) { file = pragha_musicobject_get_file (mobj); uri = g_filename_to_uri (file, NULL, NULL); rygel_media_object_add_uri (RYGEL_MEDIA_OBJECT (item), uri); g_free (uri); rygel_audio_item_set_duration (RYGEL_AUDIO_ITEM(item), (glong)pragha_musicobject_get_length(mobj)); content_type = g_content_type_guess (file, NULL, 0, &uncertain); rygel_media_file_item_set_mime_type (RYGEL_MEDIA_FILE_ITEM (item), content_type); g_free(content_type); rygel_music_item_set_track_number (item, pragha_musicobject_get_track_no(mobj)); rygel_audio_item_set_album (RYGEL_AUDIO_ITEM(item), pragha_musicobject_get_album(mobj)); rygel_audio_item_set_duration (RYGEL_AUDIO_ITEM(item), (glong)pragha_musicobject_get_length(mobj)); rygel_media_object_set_artist (RYGEL_MEDIA_OBJECT(item), pragha_musicobject_get_artist(mobj)); rygel_simple_container_add_child_item (priv->container, RYGEL_MEDIA_ITEM(item)); g_object_unref (item); } g_free(u_title); g_free(item_id); } static void pragha_dlna_plugin_share_library (PraghaDlnaPlugin *plugin) { PraghaDatabase *cdbase; PraghaMusicobject *mobj; gint i = 0; PraghaDlnaPluginPrivate *priv = plugin->priv; /* Query and insert entries */ set_watch_cursor (pragha_application_get_window(priv->pragha)); cdbase = pragha_application_get_database (priv->pragha); const gchar *sql = "SELECT id FROM LOCATION"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); while (pragha_prepared_statement_step (statement)) { gint location_id = pragha_prepared_statement_get_int (statement, 0); mobj = new_musicobject_from_db (cdbase, location_id); if (G_LIKELY(mobj)) { pragha_dlna_plugin_append_track (plugin, mobj, i++); g_object_unref (mobj); } pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); remove_watch_cursor (pragha_application_get_window(priv->pragha)); } static void pragha_dlna_plugin_database_changed (PraghaDatabase *cdbase, PraghaDlnaPlugin *plugin) { PraghaDlnaPluginPrivate *priv = plugin->priv; if (TRUE) return; rygel_simple_container_clear (priv->container); pragha_dlna_plugin_share_library (plugin); } static void pragha_dlna_plugin_share_playlist (PraghaDlnaPlugin *plugin) { PraghaPlaylist *playlist; GList *list = NULL, *i; PraghaMusicobject *mobj; gint id = 0; PraghaDlnaPluginPrivate *priv = plugin->priv; playlist = pragha_application_get_playlist (priv->pragha); set_watch_cursor (pragha_application_get_window(priv->pragha)); list = pragha_playlist_get_mobj_list (playlist); for (i = list; i != NULL; i = i->next) { mobj = i->data; if (mobj == NULL) continue; if (pragha_musicobject_is_local_file(mobj)) pragha_dlna_plugin_append_track (plugin, mobj, id++); pragha_process_gtk_events (); } remove_watch_cursor (pragha_application_get_window(priv->pragha)); } static void pragha_dlna_plugin_playlist_changed (PraghaPlaylist *playlist, PraghaDlnaPlugin *plugin) { PraghaDlnaPluginPrivate *priv = plugin->priv; if (FALSE) return; rygel_simple_container_clear (priv->container); pragha_dlna_plugin_share_playlist (plugin); } static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaDatabase *cdbase; PraghaPlaylist *playlist; GError *error = NULL; struct ifaddrs *addrs,*tmp; PraghaDlnaPlugin *plugin = PRAGHA_DLNA_PLUGIN (activatable); PraghaDlnaPluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); CDEBUG(DBG_PLUGIN, "DLNA plugin %s", G_STRFUNC); rygel_media_engine_init (&error); if (error != NULL) { g_print ("Could not initialize media engine: %s\n", error->message); g_error_free (error); } priv->container = rygel_simple_container_new_root (_("Pragha Music Player")); priv->server = rygel_media_server_new (_("Pragha Music Player"), RYGEL_MEDIA_CONTAINER(priv->container), RYGEL_PLUGIN_CAPABILITIES_NONE); getifaddrs (&addrs); tmp = addrs; while (tmp) { if (tmp->ifa_addr && tmp->ifa_addr->sa_family == AF_PACKET) rygel_media_device_add_interface (RYGEL_MEDIA_DEVICE (priv->server), tmp->ifa_name); tmp = tmp->ifa_next; } freeifaddrs (addrs); cdbase = pragha_application_get_database (priv->pragha); g_signal_connect (cdbase, "TracksChanged", G_CALLBACK(pragha_dlna_plugin_database_changed), plugin); playlist = pragha_application_get_playlist (priv->pragha); g_signal_connect (playlist, "playlist-changed", G_CALLBACK(pragha_dlna_plugin_playlist_changed), plugin); if (FALSE) pragha_dlna_plugin_share_library (plugin); else pragha_dlna_plugin_share_playlist (plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaDatabase *cdbase; PraghaPlaylist *playlist; PraghaDlnaPlugin *plugin = PRAGHA_DLNA_PLUGIN (activatable); PraghaDlnaPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "DLNA plugin %s", G_STRFUNC); cdbase = pragha_application_get_database (priv->pragha); g_signal_handlers_disconnect_by_func (cdbase, pragha_dlna_plugin_database_changed, plugin); playlist = pragha_application_get_playlist (priv->pragha); g_signal_handlers_disconnect_by_func (playlist, pragha_dlna_plugin_playlist_changed, plugin); rygel_simple_container_clear (priv->container); g_object_unref (priv->container); g_object_unref (priv->server); }����������������������pragha-1.3.4/plugins/dlna/pragha-dlna-plugin.h������������������������������������������������������0000664�0000000�0000000�00000004117�13435240150�0021203�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_DLNA_PLUGIN_H__ #define __PRAGHA_DLNA_PLUGIN_H__ #include <gtk/gtk.h> #include <libpeas/peas.h> #include "src/pragha.h" G_BEGIN_DECLS #define PRAGHA_TYPE_DLNA_PLUGIN (pragha_dlna_plugin_get_type ()) #define PRAGHA_DLNA_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPlugin)) #define PRAGHA_DLNA_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPlugin)) #define PRAGHA_IS_DLNA_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_DLNA_PLUGIN)) #define PRAGHA_IS_DLNA_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_DLNA_PLUGIN)) #define PRAGHA_DLNA_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPluginClass)) GType pragha_dlna_plugin_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* __PRAGHA_DLNA_PLUGIN_H__ */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/gnome-media-keys/��������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0017572�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/gnome-media-keys/Makefile.am���������������������������������������������������0000664�0000000�0000000�00000001720�13435240150�0021626�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/gnome-media-keys AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libgnome-media-keys.la libgnome_media_keys_la_SOURCES = \ pragha-gnome-media-keys-plugin.c \ pragha-gnome-media-keys-plugin.h libgnome_media_keys_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libgnome_media_keys_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libgnome_media_keys_la_LIBADD = \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) plugin_DATA = gnome-media-keys.plugin EXTRA_DIST = $(plugin_DATA) ������������������������������������������������pragha-1.3.4/plugins/gnome-media-keys/gnome-media-keys.plugin���������������������������������������0000664�0000000�0000000�00000000453�13435240150�0024147�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=gnome-media-keys Name=Global Hotkeys with gnome-media-keys daemon Description=Control pragha with gnome-media-keys daemon Authors=Pavel Vasin Copyright=Copyright © 2012-2013 Pavel Vasin Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/gnome-media-keys/pragha-gnome-media-keys-plugin.c������������������������������0000664�0000000�0000000�00000017346�13435240150�0025640�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007 Jan Arne Petersen <jap@gnome.org> */ /* Copyright (C) 2012-2013 Pavel Vasin */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "pragha-gnome-media-keys-plugin.h" #include "src/pragha.h" #include "src/pragha-playback.h" #define PLAYER_NAME "Pragha" #include "plugins/pragha-plugin-macros.h" PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN, PraghaGnomeMediaKeysPlugin, pragha_gnome_media_keys_plugin) static void on_media_player_key_pressed (PraghaGnomeMediaKeysPlugin *plugin, const gchar *key) { PraghaBackend *backend; PraghaPreferences *preferences; PraghaApplication *pragha = plugin->priv->pragha; backend = pragha_application_get_backend (pragha); preferences = pragha_application_get_preferences (pragha); if (pragha_backend_emitted_error (backend)) return; if (g_strcmp0("Play", key) == 0) pragha_playback_play_pause_resume(pragha); else if (g_strcmp0("Pause", key) == 0) pragha_backend_pause (backend); else if (g_strcmp0("Stop", key) == 0) pragha_playback_stop(pragha); else if (g_strcmp0("Previous", key) == 0) pragha_playback_prev_track(pragha); else if (g_strcmp0("Next", key) == 0) pragha_playback_next_track(pragha); else if (g_strcmp0("Repeat", key) == 0) { gboolean repeat = pragha_preferences_get_repeat (preferences); pragha_preferences_set_repeat (preferences, !repeat); } else if (g_strcmp0("Shuffle", key) == 0) { gboolean shuffle = pragha_preferences_get_shuffle (preferences); pragha_preferences_set_shuffle (preferences, !shuffle); } //XXX missed buttons: "Rewind" and "FastForward" } static void grab_media_player_keys_cb (GDBusProxy *proxy, GAsyncResult *res, PraghaGnomeMediaKeysPlugin *plugin) { GVariant *variant; GError *error = NULL; variant = g_dbus_proxy_call_finish(proxy, res, &error); if (variant == NULL) { if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) g_warning("Failed to call \"GrabMediaPlayerKeys\": %s", error->message); g_error_free(error); return; } g_variant_unref(variant); } static void grab_media_player_keys (PraghaGnomeMediaKeysPlugin *plugin) { if (plugin->priv->proxy == NULL) return; g_dbus_proxy_call (plugin->priv->proxy, "GrabMediaPlayerKeys", g_variant_new("(su)", PLAYER_NAME, 0), G_DBUS_CALL_FLAGS_NONE, -1, NULL, (GAsyncReadyCallback) grab_media_player_keys_cb, plugin); } static gboolean on_window_focus_in_event (GtkWidget *window, GdkEventFocus *event, PraghaGnomeMediaKeysPlugin *plugin) { grab_media_player_keys (plugin); return FALSE; } static void key_pressed (GDBusProxy *proxy, gchar *sender_name, gchar *signal_name, GVariant *parameters, PraghaGnomeMediaKeysPlugin *plugin) { char *app, *cmd; if (g_strcmp0(signal_name, "MediaPlayerKeyPressed") != 0) return; g_variant_get(parameters, "(ss)", &app, &cmd); if (g_strcmp0(app, PLAYER_NAME) == 0) on_media_player_key_pressed (plugin, cmd); g_free(app); g_free(cmd); } static void got_proxy_cb (GObject *source_object, GAsyncResult *res, PraghaGnomeMediaKeysPlugin *plugin) { GError *error = NULL; plugin->priv->proxy = g_dbus_proxy_new_for_bus_finish (res, &error); if (plugin->priv->proxy == NULL) { if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) g_warning("Failed to contact settings daemon: %s", error->message); g_error_free(error); return; } grab_media_player_keys (plugin); g_signal_connect (G_OBJECT(plugin->priv->proxy), "g-signal", G_CALLBACK(key_pressed), plugin); } static void name_appeared_cb (GDBusConnection *connection, const gchar *name, const gchar *name_owner, PraghaGnomeMediaKeysPlugin *plugin) { g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START, NULL, "org.gnome.SettingsDaemon", "/org/gnome/SettingsDaemon/MediaKeys", "org.gnome.SettingsDaemon.MediaKeys", NULL, (GAsyncReadyCallback) got_proxy_cb, plugin); } static void name_vanished_cb (GDBusConnection *connection, const gchar *name, PraghaGnomeMediaKeysPlugin *plugin) { if (plugin->priv->proxy != NULL) { g_object_unref(plugin->priv->proxy); plugin->priv->proxy = NULL; } } static void pragha_plugin_activate (PeasActivatable *activatable) { GtkWidget *window; PraghaGnomeMediaKeysPlugin *plugin = PRAGHA_GNOME_MEDIA_KEYS_PLUGIN (activatable); CDEBUG(DBG_PLUGIN, "Gnome-Media-Keys plugin %s", G_STRFUNC); PraghaGnomeMediaKeysPluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); plugin->priv->watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION, "org.gnome.SettingsDaemon", G_BUS_NAME_WATCHER_FLAGS_NONE, (GBusNameAppearedCallback) name_appeared_cb, (GBusNameVanishedCallback) name_vanished_cb, plugin, NULL); window = pragha_application_get_window (plugin->priv->pragha); plugin->priv->handler_id = g_signal_connect (G_OBJECT(window), "focus-in-event", G_CALLBACK(on_window_focus_in_event), plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { GtkWidget *window; PraghaGnomeMediaKeysPlugin *plugin = PRAGHA_GNOME_MEDIA_KEYS_PLUGIN (activatable); CDEBUG(DBG_PLUGIN, "Gnome-Media-Keys plugin %s", G_STRFUNC); g_bus_unwatch_name (plugin->priv->watch_id); window = pragha_application_get_window (plugin->priv->pragha); if (plugin->priv->handler_id != 0) g_signal_handler_disconnect (G_OBJECT(window), plugin->priv->handler_id); if (plugin->priv->proxy != NULL) g_object_unref(plugin->priv->proxy); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/gnome-media-keys/pragha-gnome-media-keys-plugin.h������������������������������0000664�0000000�0000000�00000005212�13435240150�0025632�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007 Jan Arne Petersen <jap@gnome.org> */ /* Copyright (C) 2012-2013 Pavel Vasin */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_GNOME_MEDIA_KEYS_PLUGIN_H__ #define __PRAGHA_GNOME_MEDIA_KEYS_PLUGIN_H__ #include <gtk/gtk.h> #include <libpeas/peas.h> #include "src/pragha.h" G_BEGIN_DECLS #define PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN (pragha_gnome_media_keys_plugin_get_type ()) #define PRAGHA_GNOME_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN, PraghaGnomeMediaKeysPlugin)) #define PRAGHA_GNOME_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN, PraghaGnomeMediaKeysPlugin)) #define PRAGHA_IS_GNOME_MEDIA_KEYS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN)) #define PRAGHA_IS_GNOME_MEDIA_KEYS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN)) #define PRAGHA_GNOME_MEDIA_KEYS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_GNOME_MEDIA_KEYS_PLUGIN, PraghaGnomeMediaKeysPluginClass)) typedef struct _PraghaGnomeMediaKeysPluginPrivate PraghaGnomeMediaKeysPluginPrivate; struct _PraghaGnomeMediaKeysPluginPrivate { PraghaApplication *pragha; gint watch_id; guint handler_id; GDBusProxy *proxy; }; GType pragha_gnome_media_keys_plugin_get_type (void) G_GNUC_CONST; G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); G_END_DECLS #endif /* __PRAGHA_GNOME_MEDIA_KEYS_PLUGIN_H__ */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/keybinder/���������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0016413�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/keybinder/Makefile.am����������������������������������������������������������0000664�0000000�0000000�00000002310�13435240150�0020443�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/keybinder AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libkeybinder.la libkeybinder_la_SOURCES = \ pragha-keybinder-plugin.h \ pragha-keybinder-plugin.c libkeybinder_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libkeybinder_la_CFLAGS = \ $(LIBKEYBINDER_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libkeybinder_la_LIBADD = \ $(LIBKEYBINDER_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libkeybinder_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libkeybinder_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libkeybinder_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libkeybinder_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = keybinder.plugin EXTRA_DIST = $(plugin_DATA) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/keybinder/keybinder.plugin�����������������������������������������������������0000664�0000000�0000000�00000000431�13435240150�0021605�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=keybinder Name=Global Hotkeys Description=Control pragha with multimedia keys Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2013 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/keybinder/pragha-keybinder-plugin.c��������������������������������������������0000664�0000000�0000000�00000010630�13435240150�0023267�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2017 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <keybinder.h> #include <gdk/gdkx.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "pragha-keybinder-plugin.h" #include "src/pragha.h" #include "src/pragha-playback.h" #include "src/pragha-window.h" #include "plugins/pragha-plugin-macros.h" PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPlugin, pragha_keybinder_plugin) static void keybind_prev_handler (const char *keystring, gpointer data) { PraghaBackend *backend; PraghaApplication *pragha = data; backend = pragha_application_get_backend (pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_prev_track(pragha); } static void keybind_play_handler (const char *keystring, gpointer data) { PraghaBackend *backend; PraghaApplication *pragha = data; backend = pragha_application_get_backend (pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_play_pause_resume(pragha); } static void keybind_stop_handler (const char *keystring, gpointer data) { PraghaBackend *backend; PraghaApplication *pragha = data; backend = pragha_application_get_backend (pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_stop(pragha); } static void keybind_next_handler (const char *keystring, gpointer data) { PraghaBackend *backend; PraghaApplication *pragha = data; backend = pragha_application_get_backend (pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_next_track(pragha); } static void keybind_media_handler (const char *keystring, gpointer data) { PraghaApplication *pragha = data; pragha_window_toggle_state (pragha, FALSE); } static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaKeybinderPlugin *plugin = PRAGHA_KEYBINDER_PLUGIN (activatable); if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ())) return; PraghaKeybinderPluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); keybinder_init (); CDEBUG(DBG_PLUGIN, "Keybinder plugin %s", G_STRFUNC); keybinder_bind("XF86AudioPlay", (KeybinderHandler) keybind_play_handler, priv->pragha); keybinder_bind("XF86AudioStop", (KeybinderHandler) keybind_stop_handler, priv->pragha); keybinder_bind("XF86AudioPrev", (KeybinderHandler) keybind_prev_handler, priv->pragha); keybinder_bind("XF86AudioNext", (KeybinderHandler) keybind_next_handler, priv->pragha); keybinder_bind("XF86AudioMedia", (KeybinderHandler) keybind_media_handler, priv->pragha); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { CDEBUG(DBG_PLUGIN, "Keybinder plugin %s", G_STRFUNC); if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ())) return; keybinder_unbind("XF86AudioPlay", (KeybinderHandler) keybind_play_handler); keybinder_unbind("XF86AudioStop", (KeybinderHandler) keybind_stop_handler); keybinder_unbind("XF86AudioPrev", (KeybinderHandler) keybind_prev_handler); keybinder_unbind("XF86AudioNext", (KeybinderHandler) keybind_next_handler); keybinder_unbind("XF86AudioMedia", (KeybinderHandler) keybind_media_handler); } ��������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/keybinder/pragha-keybinder-plugin.h��������������������������������������������0000664�0000000�0000000�00000004501�13435240150�0023274�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_KEYBINDER_PLUGIN_H__ #define __PRAGHA_KEYBINDER_PLUGIN_H__ #include <gtk/gtk.h> #include <libpeas/peas.h> #include "src/pragha.h" G_BEGIN_DECLS #define PRAGHA_TYPE_KEYBINDER_PLUGIN (pragha_keybinder_plugin_get_type ()) #define PRAGHA_KEYBINDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPlugin)) #define PRAGHA_KEYBINDER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPlugin)) #define PRAGHA_IS_KEYBINDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_KEYBINDER_PLUGIN)) #define PRAGHA_IS_KEYBINDER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_KEYBINDER_PLUGIN)) #define PRAGHA_KEYBINDER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPluginClass)) typedef struct _PraghaKeybinderPluginPrivate PraghaKeybinderPluginPrivate; struct _PraghaKeybinderPluginPrivate { PraghaApplication *pragha; }; GType pragha_keybinder_plugin_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* __PRAGHA_KEYBINDER_PLUGIN_H__ */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/lastfm/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015725�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/lastfm/Makefile.am�������������������������������������������������������������0000664�0000000�0000000�00000002207�13435240150�0017762�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/lastfm AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libplastfm.la libplastfm_la_SOURCES = \ pragha-lastfm-plugin.c libplastfm_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libplastfm_la_CFLAGS = \ $(LIBCLASTFM_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libplastfm_la_LIBADD = \ $(LIBCLASTFM_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libplastfm_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libplastfm_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libplastfm_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libplastfm_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = lastfm.plugin EXTRA_DIST = $(plugin_DATA) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/lastfm/lastfm.plugin�����������������������������������������������������������0000664�0000000�0000000�00000000400�13435240150�0020425�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=plastfm Name=Last.fm Description=Scrobble on Last.fm Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/lastfm/pragha-lastfm-plugin.c��������������������������������������������������0000664�0000000�0000000�00000164242�13435240150�0022124�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <cdio/paranoia/cdda.h> #include <cdio/cd_types.h> #include <cddb/cddb.h> #include <libpeas/peas.h> #include "src/pragha.h" #include "src/pragha-hig.h" #include "src/pragha-utils.h" #include "src/pragha-menubar.h" #include "src/pragha-musicobject.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-plugins-engine.h" #include "src/pragha-statusicon.h" #include "src/pragha-tagger.h" #include "src/pragha-simple-async.h" #include "src/pragha-utils.h" #include "src/pragha-tags-dialog.h" #include "src/pragha-tags-mgmt.h" #include "src/pragha-window.h" #include "src/xml_helper.h" #include "plugins/pragha-plugin-macros.h" #include <clastfm.h> #define PRAGHA_TYPE_LASTFM_PLUGIN (pragha_lastfm_plugin_get_type ()) #define PRAGHA_LASTFM_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_LASTFM_PLUGIN, PraghaLastfmPlugin)) #define PRAGHA_LASTFM_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_LASTFM_PLUGIN, PraghaLastfmPlugin)) #define PRAGHA_IS_LASTFM_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_LASTFM_PLUGIN)) #define PRAGHA_IS_LASTFM_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_LASTFM_PLUGIN)) #define PRAGHA_LASTFM_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_LASTFM_PLUGIN, PraghaLastfmPluginClass)) struct _PraghaLastfmPluginPrivate { PraghaApplication *pragha; /* Last session status. */ LASTFM_SESSION *session_id; enum LASTFM_STATUS_CODES status; gboolean has_user; gboolean has_pass; /* Settings widgets */ GtkWidget *setting_widget; GtkWidget *enable_w; GtkWidget *lastfm_uname_w; GtkWidget *lastfm_pass_w; GtkWidget *ntag_lastfm_button; /* Song status */ GMutex data_mutex; time_t playback_started; PraghaMusicobject *current_mobj; PraghaMusicobject *updated_mobj; /* Menu options */ GtkActionGroup *action_group_main_menu; guint merge_id_main_menu; GtkActionGroup *action_group_playlist; guint merge_id_playlist; guint update_timeout_id; guint scrobble_timeout_id; }; typedef struct _PraghaLastfmPluginPrivate PraghaLastfmPluginPrivate; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_LASTFM_PLUGIN, PraghaLastfmPlugin, pragha_lastfm_plugin) /* * Some useful definitions */ #define LASTFM_API_KEY "ecdc2d21dbfe1139b1f0da35daca9309" #define LASTFM_SECRET "f3498ce387f30eeae8ea1b1023afb32b" #define KEY_LASTFM_SCROBBLE "scrobble" #define KEY_LASTFM_USER "lastfm_user" #define KEY_LASTFM_PASS "lastfm_pass" #define WAIT_UPDATE 5 typedef enum { LASTFM_NONE = 0, LASTFM_GET_SIMILAR, LASTFM_GET_LOVED } LastfmQueryType; /* * Some structs to handle threads. */ typedef struct { GList *list; LastfmQueryType query_type; guint query_count; PraghaLastfmPlugin *plugin; } AddMusicObjectListData; typedef struct { PraghaLastfmPlugin *plugin; PraghaMusicobject *mobj; } PraghaLastfmAsyncData; static PraghaLastfmAsyncData * pragha_lastfm_async_data_new (PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaLastfmAsyncData *data; PraghaLastfmPluginPrivate *priv = plugin->priv; backend = pragha_application_get_backend (priv->pragha); data = g_slice_new (PraghaLastfmAsyncData); data->plugin = plugin; data->mobj = pragha_musicobject_dup (pragha_backend_get_musicobject (backend)); return data; } static void pragha_lastfm_async_data_free (PraghaLastfmAsyncData *data) { g_object_unref (data->mobj); g_slice_free (PraghaLastfmAsyncData, data); } /* * Menubar Prototypes */ static void lastfm_add_favorites_action (GtkAction *action, PraghaLastfmPlugin *plugin); static void lastfm_get_similar_action (GtkAction *action, PraghaLastfmPlugin *plugin); static void lastfm_import_xspf_action (GtkAction *action, PraghaLastfmPlugin *plugin); static void lastfm_track_love_action (GtkAction *action, PraghaLastfmPlugin *plugin); static void lastfm_track_unlove_action (GtkAction *action, PraghaLastfmPlugin *plugin); static const GtkActionEntry main_menu_actions [] = { {"Lastfm", NULL, N_("_Lastfm")}, {"Love track", NULL, N_("Love track"), "", "Love track", G_CALLBACK(lastfm_track_love_action)}, {"Unlove track", NULL, N_("Unlove track"), "", "Unlove track", G_CALLBACK(lastfm_track_unlove_action)}, {"Import a XSPF playlist", NULL, N_("Import a XSPF playlist"), "", "Import a XSPF playlist", G_CALLBACK(lastfm_import_xspf_action)}, {"Add favorites", NULL, N_("Add favorites"), "", "Add favorites", G_CALLBACK(lastfm_add_favorites_action)}, {"Add similar", NULL, N_("Add similar"), "", "Add similar", G_CALLBACK(lastfm_get_similar_action)}, }; static const gchar *main_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"> \ <menu action=\"Lastfm\"> \ <menuitem action=\"Love track\"/> \ <menuitem action=\"Unlove track\"/> \ <separator/> \ <menuitem action=\"Import a XSPF playlist\"/> \ <menuitem action=\"Add favorites\"/> \ <menuitem action=\"Add similar\"/> \ </menu> \ <separator/> \ </placeholder> \ </menu> \ </menubar> \ </ui>"; /* * Playlist Prototypes. */ static void lastfm_get_similar_current_playlist_action (GtkAction *action, PraghaLastfmPlugin *plugin); static void lastfm_track_current_playlist_love_action (GtkAction *action, PraghaLastfmPlugin *plugin); static void lastfm_track_current_playlist_unlove_action (GtkAction *action, PraghaLastfmPlugin *plugin); static const GtkActionEntry playlist_actions [] = { {"Love track", NULL, N_("Love track"), "", "Love track", G_CALLBACK(lastfm_track_current_playlist_love_action)}, {"Unlove track", NULL, N_("Unlove track"), "", "Unlove track", G_CALLBACK(lastfm_track_current_playlist_unlove_action)}, {"Add similar", NULL, N_("Add similar"), "", "Add similar", G_CALLBACK(lastfm_get_similar_current_playlist_action)}, }; static const gchar *playlist_xml = "<ui> \ <popup name=\"SelectionPopup\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"> \ <menuitem action=\"Love track\"/> \ <menuitem action=\"Unlove track\"/> \ <separator/> \ <menuitem action=\"Add similar\"/> \ <separator/> \ </placeholder> \ </menu> \ </popup> \ </ui>"; /* * Gear Menu Prototypes */ static void pragha_gmenu_lastfm_add_favorites_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); static void pragha_gmenu_lastfm_get_similar_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); static void pragha_gmenu_lastfm_import_xspf_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); static void pragha_gmenu_lastfm_track_love_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); static void pragha_gmenu_lastfm_track_unlove_action (GSimpleAction *action, GVariant *parameter, gpointer user_data); static GActionEntry lastfm_entries[] = { { "lastfm-love", pragha_gmenu_lastfm_track_love_action, NULL, NULL, NULL }, { "lastfm-unlove", pragha_gmenu_lastfm_track_unlove_action, NULL, NULL, NULL }, { "lastfm-import", pragha_gmenu_lastfm_import_xspf_action, NULL, NULL, NULL }, { "lastfm-favorities", pragha_gmenu_lastfm_add_favorites_action, NULL, NULL, NULL }, { "lastfm-similar", pragha_gmenu_lastfm_get_similar_action, NULL, NULL, NULL } }; static const gchar *lastfm_menu_ui = \ NEW_MENU("menubar") \ OPEN_PLACEHOLDER("pragha-plugins-placeholder") \ NEW_NAMED_SUBMENU("lastfm-sudmenu", "_Lastfm") \ NEW_ITEM("Love track", "win", "lastfm-love") \ NEW_ITEM("Unlove track", "win", "lastfm-unlove") \ SEPARATOR \ NEW_ITEM("Import a XSPF playlist", "win", "lastfm-import") \ NEW_ITEM("Add favorites", "win", "lastfm-favorities") \ NEW_ITEM("Add similar", "win", "lastfm-similar") \ CLOSE_SUBMENU \ CLOSE_PLACEHOLDER \ CLOSE_MENU; /* Save a get the lastfm password. * TODO: Implement any basic crypto. */ static void pragha_lastfm_plugin_set_password (PraghaPreferences *preferences, const gchar *pass) { gchar *plugin_group = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); if (string_is_not_empty(pass)) pragha_preferences_set_string (preferences, plugin_group, KEY_LASTFM_PASS, pass); else pragha_preferences_remove_key (preferences, plugin_group, KEY_LASTFM_PASS); g_free (plugin_group); } static gchar * pragha_lastfm_plugin_get_password (PraghaPreferences *preferences) { gchar *plugin_group = NULL, *string = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); string = pragha_preferences_get_string (preferences, plugin_group, KEY_LASTFM_PASS); g_free (plugin_group); return string; } static void pragha_lastfm_plugin_set_user (PraghaPreferences *preferences, const gchar *user) { gchar *plugin_group = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); if (string_is_not_empty(user)) pragha_preferences_set_string (preferences, plugin_group, KEY_LASTFM_USER, user); else pragha_preferences_remove_key (preferences, plugin_group, KEY_LASTFM_USER); g_free (plugin_group); } static gchar * pragha_lastfm_plugin_get_user (PraghaPreferences *preferences) { gchar *plugin_group = NULL, *string = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); string = pragha_preferences_get_string (preferences, plugin_group, KEY_LASTFM_USER); g_free (plugin_group); return string; } static void pragha_lastfm_plugin_set_scrobble_support (PraghaPreferences *preferences, gboolean supported) { gchar *plugin_group = NULL; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); pragha_preferences_set_boolean (preferences, plugin_group, KEY_LASTFM_SCROBBLE, supported); g_free (plugin_group); } static gboolean pragha_lastfm_plugin_get_scrobble_support (PraghaPreferences *preferences) { gchar *plugin_group = NULL; gboolean scrobble = FALSE; plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); scrobble = pragha_preferences_get_boolean (preferences, plugin_group, KEY_LASTFM_SCROBBLE); g_free (plugin_group); return scrobble; } /* Upadate lastfm menubar acording lastfm state */ static void pragha_action_group_set_sensitive (GtkActionGroup *group, const gchar *name, gboolean sensitive) { GtkAction *action; action = gtk_action_group_get_action (group, name); gtk_action_set_sensitive (action, sensitive); } static void pragha_lastfm_update_menu_actions (PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaBackendState state = 0; GtkWindow *window; PraghaLastfmPluginPrivate *priv = plugin->priv; backend = pragha_application_get_backend (priv->pragha); state = pragha_backend_get_state (backend); gboolean playing = (state != ST_STOPPED); gboolean logged = (priv->status == LASTFM_STATUS_OK); gboolean lfm_inited = (priv->session_id != NULL); gboolean has_user = (lfm_inited && priv->has_user); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Love track", playing && logged); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Unlove track", playing && logged); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Add favorites", has_user); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Add similar", playing && lfm_inited); pragha_action_group_set_sensitive (priv->action_group_playlist, "Love track", logged); pragha_action_group_set_sensitive (priv->action_group_playlist, "Unlove track", logged); pragha_action_group_set_sensitive (priv->action_group_playlist, "Add similar", lfm_inited); window = GTK_WINDOW(pragha_application_get_window(priv->pragha)); pragha_menubar_set_enable_action (window, "lastfm-love", playing && logged); pragha_menubar_set_enable_action (window, "lastfm-unlove", playing && logged); pragha_menubar_set_enable_action (window, "lastfm-favorities", has_user); pragha_menubar_set_enable_action (window, "lastfm-similar", playing && lfm_inited); } /* * Advise not connect with lastfm. */ static void pragha_lastfm_no_connection_advice (void) { PraghaStatusbar *statusbar = pragha_statusbar_get (); pragha_statusbar_set_misc_text (statusbar, _("Unable to establish conection with Last.fm")); g_object_unref (statusbar); } /* Find a song with the artist and title independently of the album and adds it to the playlist */ static GList * prepend_song_with_artist_and_title_to_mobj_list (PraghaLastfmPlugin *plugin, const gchar *artist, const gchar *title, GList *list) { PraghaPlaylist *playlist; PraghaDatabase *cdbase; PraghaMusicobject *mobj = NULL; gint location_id = 0; PraghaLastfmPluginPrivate *priv = plugin->priv; playlist = pragha_application_get_playlist (priv->pragha); if (pragha_mobj_list_already_has_title_of_artist (list, title, artist) || pragha_playlist_already_has_title_of_artist (playlist, title, artist)) return list; cdbase = pragha_application_get_database (priv->pragha); const gchar *sql = "SELECT TRACK.title, ARTIST.name, LOCATION.id " "FROM TRACK, ARTIST, LOCATION " "WHERE ARTIST.id = TRACK.artist AND LOCATION.id = TRACK.location " "AND TRACK.title = ? COLLATE NOCASE " "AND ARTIST.name = ? COLLATE NOCASE " "ORDER BY RANDOM() LIMIT 1;"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); pragha_prepared_statement_bind_string (statement, 1, title); pragha_prepared_statement_bind_string (statement, 2, artist); if (pragha_prepared_statement_step (statement)) { location_id = pragha_prepared_statement_get_int (statement, 2); mobj = new_musicobject_from_db (cdbase, location_id); list = g_list_prepend (list, mobj); } pragha_prepared_statement_free (statement); return list; } /* Set correction basedm on lastfm now playing segestion.. */ static void pragha_corrected_by_lastfm_dialog_response (GtkWidget *dialog, gint response_id, PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaPlaylist *playlist; PraghaToolbar *toolbar; PraghaMusicobject *nmobj, *current_mobj; PraghaTagger *tagger; gint changed = 0; PraghaLastfmPluginPrivate *priv = plugin->priv; if (response_id == GTK_RESPONSE_HELP) { nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); pragha_track_properties_dialog(nmobj, pragha_application_get_window(priv->pragha)); return; } if (response_id == GTK_RESPONSE_OK) { changed = pragha_tags_dialog_get_changed(PRAGHA_TAGS_DIALOG(dialog)); if (changed) { backend = pragha_application_get_backend (priv->pragha); nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); if (pragha_backend_get_state (backend) != ST_STOPPED) { current_mobj = pragha_backend_get_musicobject (backend); if (pragha_musicobject_compare(nmobj, current_mobj) == 0) { toolbar = pragha_application_get_toolbar (priv->pragha); /* Update public current song */ pragha_update_musicobject_change_tag(current_mobj, changed, nmobj); /* Update current song on playlist */ playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_update_current_track (playlist, changed, nmobj); pragha_toolbar_set_title(toolbar, current_mobj); } } if (G_LIKELY(pragha_musicobject_is_local_file (nmobj))) { tagger = pragha_tagger_new(); pragha_tagger_add_file (tagger, pragha_musicobject_get_file(nmobj)); pragha_tagger_set_changes(tagger, nmobj, changed); pragha_tagger_apply_changes (tagger); g_object_unref(tagger); } } } gtk_widget_hide (priv->ntag_lastfm_button); gtk_widget_destroy (dialog); } static void pragha_lastfm_tags_corrected_dialog (GtkButton *button, PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaMusicobject *tmobj, *nmobj; gchar *otitle = NULL, *oartist = NULL, *oalbum = NULL; gchar *ntitle = NULL, *nartist = NULL, *nalbum = NULL; gint prechanged = 0; GtkWidget *dialog; PraghaLastfmPluginPrivate *priv = plugin->priv; backend = pragha_application_get_backend (priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; /* Get all info of current track */ tmobj = pragha_musicobject_dup (pragha_backend_get_musicobject (backend)); g_object_get(tmobj, "title", &otitle, "artist", &oartist, "album", &oalbum, NULL); /* Get all info of suggestions * Temp Musicobject to not block tag edit dialog */ g_mutex_lock (&priv->data_mutex); nmobj = pragha_musicobject_dup(priv->updated_mobj); g_mutex_unlock (&priv->data_mutex); g_object_get(nmobj, "title", &ntitle, "artist", &nartist, "album", &nalbum, NULL); /* Compare original mobj and suggested from lastfm */ if (g_ascii_strcasecmp(otitle, ntitle)) { pragha_musicobject_set_title(tmobj, ntitle); prechanged |= TAG_TITLE_CHANGED; } if (g_ascii_strcasecmp(oartist, nartist)) { pragha_musicobject_set_artist(tmobj, nartist); prechanged |= TAG_ARTIST_CHANGED; } if (g_ascii_strcasecmp(oalbum, nalbum)) { pragha_musicobject_set_album(tmobj, nalbum); prechanged |= TAG_ALBUM_CHANGED; } dialog = pragha_tags_dialog_new(); gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(pragha_application_get_window (priv->pragha))); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_corrected_by_lastfm_dialog_response), plugin); pragha_tags_dialog_set_musicobject(PRAGHA_TAGS_DIALOG(dialog), tmobj); pragha_tags_dialog_set_changed(PRAGHA_TAGS_DIALOG(dialog), prechanged); gtk_widget_show (dialog); } static GtkWidget* pragha_lastfm_tag_suggestion_button_new (PraghaLastfmPlugin *plugin) { GtkWidget* ntag_lastfm_button, *image; ntag_lastfm_button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(ntag_lastfm_button), GTK_RELIEF_NONE); image = gtk_image_new_from_icon_name ("tools-check-spelling", GTK_ICON_SIZE_MENU); gtk_button_set_image(GTK_BUTTON(ntag_lastfm_button), image); gtk_widget_set_tooltip_text(GTK_WIDGET(ntag_lastfm_button), _("Last.fm suggested a tag correction")); g_signal_connect(G_OBJECT(ntag_lastfm_button), "clicked", G_CALLBACK(pragha_lastfm_tags_corrected_dialog), plugin); pragha_hig_set_tiny_button (ntag_lastfm_button); gtk_image_set_pixel_size (GTK_IMAGE(image), 12); return ntag_lastfm_button; } /* Love and unlove music object */ gpointer do_lastfm_love_mobj (PraghaLastfmPlugin *plugin, const gchar *title, const gchar *artist) { gint rv; CDEBUG(DBG_PLUGIN, "Love mobj on thread"); PraghaLastfmPluginPrivate *priv = plugin->priv; rv = LASTFM_track_love (priv->session_id, title, artist); if (rv != LASTFM_STATUS_OK) return _("Love song on Last.fm failed."); else return NULL; } gpointer do_lastfm_unlove_mobj (PraghaLastfmPlugin *plugin, const gchar *title, const gchar *artist) { gint rv; CDEBUG(DBG_PLUGIN, "Unlove mobj on thread"); PraghaLastfmPluginPrivate *priv = plugin->priv; rv = LASTFM_track_unlove (priv->session_id, title, artist); if (rv != LASTFM_STATUS_OK) return _("Unlove song on Last.fm failed."); else return NULL; } /* Functions related to current playlist. */ gpointer do_lastfm_current_playlist_love (gpointer data) { PraghaPlaylist *playlist; PraghaMusicobject *mobj = NULL; const gchar *title, *artist; PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; playlist = pragha_application_get_playlist (priv->pragha); mobj = pragha_playlist_get_selected_musicobject (playlist); title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); return do_lastfm_love_mobj (plugin, title, artist); } static void lastfm_track_current_playlist_love_action (GtkAction *action, PraghaLastfmPlugin *plugin) { CDEBUG(DBG_PLUGIN, "Love handler to current playlist"); PraghaLastfmPluginPrivate *priv = plugin->priv; if (priv->status != LASTFM_STATUS_OK) { pragha_lastfm_no_connection_advice (); return; } pragha_async_launch (do_lastfm_current_playlist_love, pragha_async_set_idle_message, plugin); } gpointer do_lastfm_current_playlist_unlove (gpointer data) { PraghaPlaylist *playlist; PraghaMusicobject *mobj = NULL; const gchar *title, *artist; PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; playlist = pragha_application_get_playlist (priv->pragha); mobj = pragha_playlist_get_selected_musicobject (playlist); title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); return do_lastfm_unlove_mobj (plugin, title, artist); } static void lastfm_track_current_playlist_unlove_action (GtkAction *action, PraghaLastfmPlugin *plugin) { CDEBUG(DBG_PLUGIN, "Unlove Handler to current playlist"); PraghaLastfmPluginPrivate *priv = plugin->priv; if (priv->status != LASTFM_STATUS_OK) { pragha_lastfm_no_connection_advice (); return; } pragha_async_launch (do_lastfm_current_playlist_unlove, pragha_async_set_idle_message, plugin); } static gboolean append_mobj_list_current_playlist_idle(gpointer user_data) { PraghaPlaylist *playlist; PraghaStatusbar *statusbar; gchar *summary = NULL; guint songs_added = 0; AddMusicObjectListData *data = user_data; GList *list = data->list; PraghaLastfmPlugin *plugin = data->plugin; PraghaLastfmPluginPrivate *priv = plugin->priv; if (list != NULL) { playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_append_mobj_list (playlist, list); songs_added = g_list_length(list); g_list_free(list); } else { remove_watch_cursor (pragha_application_get_window(priv->pragha)); } switch(data->query_type) { case LASTFM_GET_SIMILAR: if (data->query_count > 0) summary = g_strdup_printf(_("Added %d tracks of %d suggested from Last.fm"), songs_added, data->query_count); else summary = g_strdup_printf(_("Last.fm doesn't suggest any similar track")); break; case LASTFM_GET_LOVED: if (data->query_count > 0) summary = g_strdup_printf(_("Added %d songs of the last %d loved on Last.fm."), songs_added, data->query_count); else summary = g_strdup_printf(_("You don't have favorite tracks on Last.fm")); break; case LASTFM_NONE: default: break; } if (summary != NULL) { statusbar = pragha_statusbar_get (); pragha_statusbar_set_misc_text (statusbar, summary); g_object_unref (statusbar); g_free(summary); } g_slice_free (AddMusicObjectListData, data); return FALSE; } gpointer do_lastfm_get_similar (PraghaLastfmPlugin *plugin, const gchar *title, const gchar *artist) { LFMList *results = NULL, *li; LASTFM_TRACK_INFO *track = NULL; guint query_count = 0; GList *list = NULL; gint rv; AddMusicObjectListData *data; PraghaLastfmPluginPrivate *priv = plugin->priv; if (string_is_not_empty(title) && string_is_not_empty(artist)) { rv = LASTFM_track_get_similar (priv->session_id, title, artist, 50, &results); for (li=results; li && rv == LASTFM_STATUS_OK; li=li->next) { track = li->data; list = prepend_song_with_artist_and_title_to_mobj_list (plugin, track->artist, track->name, list); query_count += 1; } } data = g_slice_new (AddMusicObjectListData); data->list = list; data->query_type = LASTFM_GET_SIMILAR; data->query_count = query_count; data->plugin = plugin; LASTFM_free_track_info_list (results); return data; } gpointer do_lastfm_get_similar_current_playlist_action (gpointer user_data) { PraghaPlaylist *playlist; PraghaMusicobject *mobj = NULL; const gchar *title, *artist; AddMusicObjectListData *data; PraghaLastfmPlugin *plugin = user_data; PraghaLastfmPluginPrivate *priv = plugin->priv; playlist = pragha_application_get_playlist (priv->pragha); mobj = pragha_playlist_get_selected_musicobject (playlist); title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); data = do_lastfm_get_similar (plugin, title, artist); return data; } static void lastfm_get_similar_current_playlist_action (GtkAction *action, PraghaLastfmPlugin *plugin) { PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Get similar action to current playlist"); if (priv->session_id == NULL) { pragha_lastfm_no_connection_advice (); return; } set_watch_cursor (pragha_application_get_window(priv->pragha)); pragha_async_launch (do_lastfm_get_similar_current_playlist_action, append_mobj_list_current_playlist_idle, plugin); } /* Functions that respond to menu options. */ static void lastfm_import_xspf_response (GtkDialog *dialog, gint response, PraghaLastfmPlugin *plugin) { PraghaPlaylist *playlist; PraghaStatusbar *statusbar; XMLNode *xml = NULL, *xi, *xc, *xt; gchar *contents, *summary; gint try = 0, added = 0; GList *list = NULL; GFile *file; gsize size; PraghaLastfmPluginPrivate *priv = plugin->priv; if (response != GTK_RESPONSE_ACCEPT) goto cancel; file = gtk_file_chooser_get_file(GTK_FILE_CHOOSER(dialog)); if (!g_file_load_contents (file, NULL, &contents, &size, NULL, NULL)) { goto out; } if (g_utf8_validate (contents, -1, NULL) == FALSE) { gchar *fixed; fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL); if (fixed != NULL) { g_free (contents); contents = fixed; } } xml = tinycxml_parse(contents); xi = xmlnode_get(xml,CCA { "playlist","trackList","track",NULL},NULL,NULL); for(;xi;xi= xi->next) { try++; xt = xmlnode_get(xi,CCA {"track","title",NULL},NULL,NULL); xc = xmlnode_get(xi,CCA {"track","creator",NULL},NULL,NULL); if (xt && xc) list = prepend_song_with_artist_and_title_to_mobj_list (plugin, xc->content, xt->content, list); } if (list) { playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_append_mobj_list (playlist, list); g_list_free (list); } summary = g_strdup_printf(_("Added %d songs from %d of the imported playlist."), added, try); statusbar = pragha_statusbar_get (); pragha_statusbar_set_misc_text (statusbar, summary); g_object_unref (statusbar); g_free(summary); xmlnode_free(xml); g_free (contents); out: g_object_unref (file); cancel: gtk_widget_destroy (GTK_WIDGET(dialog)); } static void lastfm_import_xspf_action (GtkAction *action, PraghaLastfmPlugin *plugin) { GtkWidget *dialog; GtkFileFilter *media_filter; PraghaLastfmPluginPrivate *priv = plugin->priv; dialog = gtk_file_chooser_dialog_new (_("Import a XSPF playlist"), GTK_WINDOW(pragha_application_get_window(priv->pragha)), GTK_FILE_CHOOSER_ACTION_OPEN, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Open"), GTK_RESPONSE_ACCEPT, NULL); media_filter = gtk_file_filter_new(); gtk_file_filter_set_name(GTK_FILE_FILTER(media_filter), _("Supported media")); gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), "application/xspf+xml"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), GTK_FILE_FILTER(media_filter)); g_signal_connect (G_OBJECT(dialog), "response", G_CALLBACK(lastfm_import_xspf_response), plugin); gtk_widget_show_all (dialog); } gpointer do_lastfm_add_favorites_action (gpointer user_data) { PraghaPreferences *preferences; LFMList *results = NULL, *li; LASTFM_TRACK_INFO *track; gint rpages = 0, cpage = 0; AddMusicObjectListData *data; guint query_count = 0; GList *list = NULL; gchar *user = NULL; PraghaLastfmPlugin *plugin = user_data; PraghaLastfmPluginPrivate *priv = plugin->priv; preferences = pragha_application_get_preferences (priv->pragha); user = pragha_lastfm_plugin_get_user (preferences); do { rpages = LASTFM_user_get_loved_tracks (priv->session_id, user, cpage, &results); for (li=results; li; li=li->next) { track = li->data; list = prepend_song_with_artist_and_title_to_mobj_list (plugin, track->artist, track->name, list); query_count += 1; } LASTFM_free_track_info_list (results); cpage++; } while (rpages != 0); data = g_slice_new (AddMusicObjectListData); data->list = list; data->query_type = LASTFM_GET_LOVED; data->query_count = query_count; data->plugin = plugin; g_free (user); return data; } static void lastfm_add_favorites_action (GtkAction *action, PraghaLastfmPlugin *plugin) { PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Add Favorites action"); if ((priv->session_id == NULL) || !priv->has_user) { pragha_lastfm_no_connection_advice (); return; } set_watch_cursor (pragha_application_get_window(priv->pragha)); pragha_async_launch (do_lastfm_add_favorites_action, append_mobj_list_current_playlist_idle, plugin); } static gpointer do_lastfm_get_similar_action (gpointer user_data) { AddMusicObjectListData *data; PraghaLastfmAsyncData *lastfm_async_data = user_data; PraghaLastfmPlugin *plugin = lastfm_async_data->plugin; PraghaMusicobject *mobj = lastfm_async_data->mobj; const gchar *title = pragha_musicobject_get_title (mobj); const gchar *artist = pragha_musicobject_get_artist (mobj); data = do_lastfm_get_similar (plugin, title, artist); pragha_lastfm_async_data_free(lastfm_async_data); return data; } static void lastfm_get_similar_action (GtkAction *action, PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Get similar action"); backend = pragha_application_get_backend (priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; if (priv->session_id == NULL) { pragha_lastfm_no_connection_advice (); return; } set_watch_cursor (pragha_application_get_window(priv->pragha)); pragha_async_launch (do_lastfm_get_similar_action, append_mobj_list_current_playlist_idle, pragha_lastfm_async_data_new (plugin)); } static gpointer do_lastfm_current_song_love (gpointer data) { gpointer msg_data = NULL; PraghaLastfmAsyncData *lastfm_async_data = data; PraghaLastfmPlugin *plugin = lastfm_async_data->plugin; PraghaMusicobject *mobj = lastfm_async_data->mobj; const gchar *title = pragha_musicobject_get_title (mobj); const gchar *artist = pragha_musicobject_get_artist (mobj); msg_data = do_lastfm_love_mobj (plugin, title, artist); pragha_lastfm_async_data_free(lastfm_async_data); return msg_data; } static void lastfm_track_love_action (GtkAction *action, PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Love Handler"); backend = pragha_application_get_backend (priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; if (priv->status != LASTFM_STATUS_OK) { pragha_lastfm_no_connection_advice (); return; } pragha_async_launch (do_lastfm_current_song_love, pragha_async_set_idle_message, pragha_lastfm_async_data_new (plugin)); } static gpointer do_lastfm_current_song_unlove (gpointer data) { gpointer msg_data = NULL; PraghaLastfmAsyncData *lastfm_async_data = data; PraghaLastfmPlugin *plugin = lastfm_async_data->plugin; PraghaMusicobject *mobj = lastfm_async_data->mobj; const gchar *title = pragha_musicobject_get_title (mobj); const gchar *artist = pragha_musicobject_get_artist (mobj); msg_data = do_lastfm_unlove_mobj (plugin, title, artist); pragha_lastfm_async_data_free(lastfm_async_data); return msg_data; } static void lastfm_track_unlove_action (GtkAction *action, PraghaLastfmPlugin *plugin) { PraghaBackend *backend; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Unlove Handler"); backend = pragha_application_get_backend (priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; if (priv->status != LASTFM_STATUS_OK) { pragha_lastfm_no_connection_advice (); return; } pragha_async_launch (do_lastfm_current_song_unlove, pragha_async_set_idle_message, pragha_lastfm_async_data_new (plugin)); } /* * Gear menu actions. */ static void pragha_gmenu_lastfm_add_favorites_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { lastfm_add_favorites_action (NULL, PRAGHA_LASTFM_PLUGIN(user_data)); } static void pragha_gmenu_lastfm_get_similar_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { lastfm_get_similar_action (NULL, PRAGHA_LASTFM_PLUGIN(user_data)); } static void pragha_gmenu_lastfm_import_xspf_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { lastfm_import_xspf_action (NULL, PRAGHA_LASTFM_PLUGIN(user_data)); } static void pragha_gmenu_lastfm_track_love_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { lastfm_track_love_action (NULL, PRAGHA_LASTFM_PLUGIN(user_data)); } static void pragha_gmenu_lastfm_track_unlove_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { lastfm_track_unlove_action (NULL, PRAGHA_LASTFM_PLUGIN(user_data)); } /* * Handlers */ static gpointer pragha_lastfm_scrobble_thread (gpointer data) { gchar *title = NULL, *artist = NULL, *album = NULL; gint track_no, length, rv; time_t last_time; PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Scrobbler thread"); g_mutex_lock (&priv->data_mutex); g_object_get (priv->current_mobj, "title", &title, "artist", &artist, "album", &album, "track-no", &track_no, "length", &length, NULL); last_time = priv->playback_started; g_mutex_unlock (&priv->data_mutex); rv = LASTFM_track_scrobble (priv->session_id, title, album, artist, last_time, length, track_no, 0, NULL); g_free(title); g_free(artist); g_free(album); if (rv != LASTFM_STATUS_OK) return _("Last.fm submission failed"); else return _("Track scrobbled on Last.fm"); } static gboolean pragha_lastfm_show_corrrection_button (gpointer user_data) { PraghaToolbar *toolbar; PraghaBackend *backend; gchar *cfile = NULL, *nfile = NULL; PraghaLastfmPlugin *plugin = user_data; PraghaLastfmPluginPrivate *priv = plugin->priv; /* Hack to safe!.*/ if (!priv->ntag_lastfm_button) { toolbar = pragha_application_get_toolbar (priv->pragha); priv->ntag_lastfm_button = pragha_lastfm_tag_suggestion_button_new (plugin); pragha_toolbar_add_extention_widget (toolbar, priv->ntag_lastfm_button); } backend = pragha_application_get_backend (priv->pragha); g_object_get(pragha_backend_get_musicobject (backend), "file", &cfile, NULL); g_mutex_lock (&priv->data_mutex); g_object_get (priv->updated_mobj, "file", &nfile, NULL); g_mutex_unlock (&priv->data_mutex); if (g_ascii_strcasecmp(cfile, nfile) == 0) gtk_widget_show (priv->ntag_lastfm_button); g_free(cfile); g_free(nfile); return FALSE; } static gpointer pragha_lastfm_now_playing_thread (gpointer data) { LFMList *list = NULL; LASTFM_TRACK_INFO *ntrack = NULL; gchar *title = NULL, *artist = NULL, *album = NULL; gint track_no, length, changed = 0, rv; PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Update now playing thread"); g_mutex_lock (&priv->data_mutex); g_object_get (priv->current_mobj, "title", &title, "artist", &artist, "album", &album, "track-no", &track_no, "length", &length, NULL); g_mutex_unlock (&priv->data_mutex); rv = LASTFM_track_update_now_playing (priv->session_id, title, album, artist, length, track_no, 0, &list); if (rv == LASTFM_STATUS_OK) { /* Fist check lastfm response, and compare tags. */ if (list != NULL) { ntrack = list->data; if (ntrack->name && g_ascii_strcasecmp(title, ntrack->name)) changed |= TAG_TITLE_CHANGED; if (ntrack->artist && g_ascii_strcasecmp(artist, ntrack->artist)) changed |= TAG_ARTIST_CHANGED; if (ntrack->album && g_ascii_strcasecmp(album, ntrack->album)) changed |= TAG_ALBUM_CHANGED; } if (changed) { g_mutex_lock (&priv->data_mutex); if (priv->updated_mobj) g_object_unref (priv->updated_mobj); priv->updated_mobj = pragha_musicobject_dup (priv->current_mobj); if (changed & TAG_TITLE_CHANGED) pragha_musicobject_set_title (priv->updated_mobj, ntrack->name); if (changed & TAG_ARTIST_CHANGED) pragha_musicobject_set_artist (priv->updated_mobj, ntrack->artist); if (changed & TAG_ALBUM_CHANGED) pragha_musicobject_set_album (priv->updated_mobj, ntrack->album); g_mutex_unlock (&priv->data_mutex); g_idle_add (pragha_lastfm_show_corrrection_button, plugin); } } LASTFM_free_track_info_list(list); g_free(title); g_free(artist); g_free(album); if (rv != LASTFM_STATUS_OK) return _("Update current song on Last.fm failed."); else return NULL; } static gboolean pragha_lastfm_now_playing_handler (gpointer data) { PraghaBackend *backend; PraghaMusicobject *mobj = NULL; PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; priv->update_timeout_id = 0; CDEBUG(DBG_PLUGIN, "Update now playing Handler"); /* Set current song info */ backend = pragha_application_get_backend (priv->pragha); mobj = pragha_backend_get_musicobject (backend); g_mutex_lock (&priv->data_mutex); if (priv->current_mobj) g_object_unref (priv->current_mobj); priv->current_mobj = pragha_musicobject_dup (mobj); if (priv->updated_mobj) g_object_unref (priv->updated_mobj); priv->updated_mobj = NULL; time(&priv->playback_started); g_mutex_unlock (&priv->data_mutex); /* Launch tread */ pragha_async_launch (pragha_lastfm_now_playing_thread, pragha_async_set_idle_message, plugin); return FALSE; } static gboolean pragha_lastfm_scrobble_handler (gpointer data) { PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Scrobbler Handler"); priv->scrobble_timeout_id = 0; if (priv->status != LASTFM_STATUS_OK) { pragha_lastfm_no_connection_advice (); return FALSE; } pragha_async_launch (pragha_lastfm_scrobble_thread, pragha_async_set_idle_message, plugin); return FALSE; } static void backend_changed_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data) { PraghaPreferences *preferences; PraghaMusicobject *mobj = NULL; PraghaMusicSource file_source = FILE_NONE; PraghaBackendState state = 0; gint length = 0, dalay_time = 0; PraghaLastfmPlugin *plugin = user_data; PraghaLastfmPluginPrivate *priv = plugin->priv; state = pragha_backend_get_state (backend); CDEBUG(DBG_PLUGIN, "Configuring thread to update Lastfm"); /* Update gui. */ pragha_lastfm_update_menu_actions (plugin); /* Update thread. */ if (priv->update_timeout_id) { g_source_remove (priv->update_timeout_id); priv->update_timeout_id = 0; } if (priv->scrobble_timeout_id) { g_source_remove (priv->scrobble_timeout_id); priv->scrobble_timeout_id = 0; } if (state != ST_PLAYING) { if (priv->ntag_lastfm_button) gtk_widget_hide (priv->ntag_lastfm_button); return; } /* * Check settings, status, file-type, title, artist and length before update. */ preferences = pragha_application_get_preferences (priv->pragha); if (!pragha_lastfm_plugin_get_scrobble_support (preferences)) return; if (!priv->has_user || !priv->has_pass) return; if (priv->status != LASTFM_STATUS_OK) return; mobj = pragha_backend_get_musicobject (backend); file_source = pragha_musicobject_get_source (mobj); if (file_source == FILE_NONE || file_source == FILE_HTTP) return; length = pragha_musicobject_get_length (mobj); if (length < 30) return; if (string_is_empty(pragha_musicobject_get_title(mobj))) return; if (string_is_empty(pragha_musicobject_get_artist(mobj))) return; /* Now playing delayed handler */ priv->update_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE, WAIT_UPDATE, pragha_lastfm_now_playing_handler, plugin, NULL); /* Scrobble delayed handler */ dalay_time = ((length / 2) > 240) ? 240 : (length / 2); priv->scrobble_timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE, dalay_time, pragha_lastfm_scrobble_handler, plugin, NULL); } static void pragha_menubar_append_lastfm (PraghaLastfmPlugin *plugin) { PraghaPlaylist *playlist; GtkWindow *window; GActionMap *map; PraghaLastfmPluginPrivate *priv = plugin->priv; /* * Menubar */ priv->action_group_main_menu = gtk_action_group_new ("PraghaLastfmMainMenuActions"); gtk_action_group_set_translation_domain (priv->action_group_main_menu, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_main_menu, main_menu_actions, G_N_ELEMENTS (main_menu_actions), plugin); priv->merge_id_main_menu = pragha_menubar_append_plugin_action (priv->pragha, priv->action_group_main_menu, main_menu_xml); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Love track", FALSE); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Unlove track", FALSE); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Add favorites", FALSE); pragha_action_group_set_sensitive (priv->action_group_main_menu, "Add similar", FALSE); /* * Playlist */ priv->action_group_playlist = gtk_action_group_new ("PraghaLastfmPlaylistActions"); gtk_action_group_set_translation_domain (priv->action_group_playlist, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_playlist, playlist_actions, G_N_ELEMENTS (playlist_actions), plugin); playlist = pragha_application_get_playlist (priv->pragha); priv->merge_id_playlist = pragha_playlist_append_plugin_action (playlist, priv->action_group_playlist, playlist_xml); /* * Gear Menu */ pragha_menubar_append_submenu (priv->pragha, "pragha-plugins-placeholder", lastfm_menu_ui, "lastfm-sudmenu", _("_Lastfm"), plugin); map = G_ACTION_MAP (pragha_application_get_window(priv->pragha)); g_action_map_add_action_entries (G_ACTION_MAP (map), lastfm_entries, G_N_ELEMENTS(lastfm_entries), plugin); window = GTK_WINDOW(pragha_application_get_window(priv->pragha)); pragha_menubar_set_enable_action (window, "lastfm-love", FALSE); pragha_menubar_set_enable_action (window, "lastfm-unlove", FALSE); pragha_menubar_set_enable_action (window, "lastfm-favorities", FALSE); pragha_menubar_set_enable_action (window, "lastfm-similar", FALSE); } static void pragha_menubar_remove_lastfm (PraghaLastfmPlugin *plugin) { PraghaPlaylist *playlist; PraghaLastfmPluginPrivate *priv = plugin->priv; if (!priv->merge_id_main_menu) return; pragha_menubar_remove_plugin_action (priv->pragha, priv->action_group_main_menu, priv->merge_id_main_menu); priv->merge_id_main_menu = 0; if (!priv->merge_id_playlist) return; playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_remove_plugin_action (playlist, priv->action_group_playlist, priv->merge_id_playlist); priv->merge_id_playlist = 0; pragha_menubar_remove_by_id (priv->pragha, "pragha-plugins-placeholder", "lastfm-sudmenu"); } static gboolean pragha_lastfm_connect_idle(gpointer data) { PraghaPreferences *preferences; gchar *user = NULL, *pass = NULL; gboolean scrobble = FALSE; PraghaLastfmPlugin *plugin = data; PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Connecting LASTFM"); priv->session_id = LASTFM_init (LASTFM_API_KEY, LASTFM_SECRET); preferences = pragha_application_get_preferences (priv->pragha); scrobble = pragha_lastfm_plugin_get_scrobble_support (preferences); user = pragha_lastfm_plugin_get_user (preferences); pass = pragha_lastfm_plugin_get_password (preferences); priv->has_user = string_is_not_empty(user); priv->has_pass = string_is_not_empty(pass); if (scrobble && priv->has_user && priv->has_pass) { priv->status = LASTFM_login (priv->session_id, user, pass); if (priv->status != LASTFM_STATUS_OK) { pragha_lastfm_no_connection_advice (); CDEBUG(DBG_PLUGIN, "Failure to login on lastfm"); } } pragha_lastfm_update_menu_actions (plugin); g_free(user); g_free(pass); return FALSE; } /* Init lastfm with a simple thread when change preferences and show error messages. */ static void pragha_lastfm_connect (PraghaLastfmPlugin *plugin) { g_idle_add (pragha_lastfm_connect_idle, plugin); } static void pragha_lastfm_disconnect (PraghaLastfmPlugin *plugin) { PraghaLastfmPluginPrivate *priv = plugin->priv; if (priv->session_id != NULL) { CDEBUG(DBG_PLUGIN, "Disconnecting LASTFM"); LASTFM_dinit(priv->session_id); priv->session_id = NULL; priv->status = LASTFM_STATUS_INVALID; priv->has_user = FALSE; priv->has_pass = FALSE; } pragha_lastfm_update_menu_actions (plugin); } /* * Lastfm Settings */ static void pragha_lastfm_preferences_dialog_response (GtkDialog *dialog, gint response_id, PraghaLastfmPlugin *plugin) { PraghaPreferences *preferences; const gchar *entry_user = NULL, *entry_pass = NULL; gchar *test_user = NULL, *test_pass = NULL; gboolean changed = FALSE, test_scrobble = FALSE, toggle_scrobble = FALSE; PraghaLastfmPluginPrivate *priv = plugin->priv; preferences = pragha_preferences_get (); test_user = pragha_lastfm_plugin_get_user (preferences); test_pass = pragha_lastfm_plugin_get_password (preferences); switch(response_id) { case GTK_RESPONSE_CANCEL: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(priv->enable_w), pragha_lastfm_plugin_get_scrobble_support (preferences)); pragha_gtk_entry_set_text (GTK_ENTRY(priv->lastfm_uname_w), test_user); pragha_gtk_entry_set_text (GTK_ENTRY(priv->lastfm_pass_w), test_pass); break; case GTK_RESPONSE_OK: toggle_scrobble = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(priv->enable_w)); entry_user = gtk_entry_get_text (GTK_ENTRY(priv->lastfm_uname_w)); entry_pass = gtk_entry_get_text (GTK_ENTRY(priv->lastfm_pass_w)); test_scrobble = pragha_lastfm_plugin_get_scrobble_support (preferences); if (test_scrobble != toggle_scrobble) { pragha_lastfm_plugin_set_scrobble_support (preferences, toggle_scrobble); changed = TRUE; } if (g_strcmp0 (test_user, entry_user)) { pragha_lastfm_plugin_set_user (preferences, entry_user); changed = TRUE; } if (g_strcmp0 (test_pass, entry_pass)) { pragha_lastfm_plugin_set_password (preferences, entry_pass); changed = TRUE; } if (changed) { pragha_lastfm_disconnect (plugin); pragha_lastfm_connect (plugin); } break; default: break; } g_object_unref (preferences); g_free (test_user); g_free (test_pass); } static void toggle_lastfm (GtkToggleButton *button, PraghaLastfmPlugin *plugin) { gboolean is_active; PraghaLastfmPluginPrivate *priv = plugin->priv; is_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->enable_w)); gtk_widget_set_sensitive (priv->lastfm_uname_w, is_active); gtk_widget_set_sensitive (priv->lastfm_pass_w, is_active); if (!is_active) { gtk_entry_set_text (GTK_ENTRY(priv->lastfm_uname_w), ""); gtk_entry_set_text (GTK_ENTRY(priv->lastfm_pass_w), ""); } } static void pragha_lastfm_init_settings (PraghaLastfmPlugin *plugin) { PraghaPreferences *preferences; gchar *user = NULL, *pass = NULL; PraghaLastfmPluginPrivate *priv = plugin->priv; preferences = pragha_preferences_get (); if (pragha_lastfm_plugin_get_scrobble_support (preferences)) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(priv->enable_w), TRUE); user = pragha_lastfm_plugin_get_user (preferences); if (string_is_not_empty(user)) gtk_entry_set_text (GTK_ENTRY(priv->lastfm_uname_w), user); g_free(user); pass = pragha_lastfm_plugin_get_password (preferences); if (string_is_not_empty(pass)) gtk_entry_set_text (GTK_ENTRY(priv->lastfm_pass_w), pass); g_free(pass); } else { gtk_widget_set_sensitive (priv->lastfm_uname_w, FALSE); gtk_widget_set_sensitive (priv->lastfm_pass_w, FALSE); } g_object_unref (preferences); } static void pragha_lastfm_plugin_append_setting (PraghaLastfmPlugin *plugin) { PreferencesDialog *dialog; GtkWidget *table; GtkWidget *lastfm_check, *lastfm_uname, *lastfm_pass, *lastfm_ulabel, *lastfm_plabel; guint row = 0; PraghaLastfmPluginPrivate *priv = plugin->priv; table = pragha_hig_workarea_table_new (); pragha_hig_workarea_table_add_section_title (table, &row, "Last.fm"); lastfm_check = gtk_check_button_new_with_label (_("Scrobble on Last.fm")); pragha_hig_workarea_table_add_wide_control (table, &row, lastfm_check); lastfm_ulabel = gtk_label_new (_("Username")); lastfm_uname = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(lastfm_uname), LASTFM_UNAME_LEN); gtk_entry_set_activates_default (GTK_ENTRY(lastfm_uname), TRUE); pragha_hig_workarea_table_add_row (table, &row, lastfm_ulabel, lastfm_uname); lastfm_plabel = gtk_label_new (_("Password")); lastfm_pass = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(lastfm_pass), LASTFM_PASS_LEN); gtk_entry_set_visibility (GTK_ENTRY(lastfm_pass), FALSE); gtk_entry_set_activates_default (GTK_ENTRY(lastfm_pass), TRUE); pragha_hig_workarea_table_add_row (table, &row, lastfm_plabel, lastfm_pass); /* Store references. */ priv->enable_w = lastfm_check; priv->lastfm_uname_w = lastfm_uname; priv->lastfm_pass_w = lastfm_pass; priv->setting_widget = table; /* Append panes */ dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_append_services_setting (dialog, priv->setting_widget, FALSE); /* Configure handler and settings */ pragha_preferences_dialog_connect_handler (dialog, G_CALLBACK(pragha_lastfm_preferences_dialog_response), plugin); g_signal_connect (G_OBJECT(lastfm_check), "toggled", G_CALLBACK(toggle_lastfm), plugin); pragha_lastfm_init_settings (plugin); } static void pragha_lastfm_plugin_remove_setting (PraghaLastfmPlugin *plugin) { PreferencesDialog *dialog; PraghaLastfmPluginPrivate *priv = plugin->priv; dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_remove_services_setting (dialog, priv->setting_widget); pragha_preferences_dialog_disconnect_handler (dialog, G_CALLBACK(pragha_lastfm_preferences_dialog_response), plugin); } /* * Lastfm plugin */ static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaLastfmPlugin *plugin = PRAGHA_LASTFM_PLUGIN (activatable); PraghaLastfmPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Lastfm plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); /* Init plugin flags */ priv->session_id = NULL; priv->status = LASTFM_STATUS_INVALID; g_mutex_init (&priv->data_mutex); priv->updated_mobj = NULL; priv->current_mobj = NULL; priv->ntag_lastfm_button = NULL; priv->has_user = FALSE; priv->has_pass = FALSE; priv->update_timeout_id = 0; priv->scrobble_timeout_id = 0; /* Append menu and settings */ pragha_menubar_append_lastfm (plugin); pragha_lastfm_plugin_append_setting (plugin); /* Test internet and launch threads.*/ if (g_network_monitor_get_network_available (g_network_monitor_get_default ())) { g_idle_add (pragha_lastfm_connect_idle, plugin); } else { g_timeout_add_seconds_full (G_PRIORITY_DEFAULT_IDLE, 30, pragha_lastfm_connect_idle, plugin, NULL); } /* Connect playback signals */ g_signal_connect (pragha_application_get_backend (priv->pragha), "notify::state", G_CALLBACK (backend_changed_state_cb), plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaPreferences *preferences; PraghaLastfmPlugin *plugin = PRAGHA_LASTFM_PLUGIN (activatable); PraghaLastfmPluginPrivate *priv = plugin->priv; gchar *plugin_group = NULL; CDEBUG(DBG_PLUGIN, "Lastfm plugin %s", G_STRFUNC); /* Disconnect playback signals */ g_signal_handlers_disconnect_by_func (pragha_application_get_backend (priv->pragha), backend_changed_state_cb, plugin); pragha_lastfm_disconnect (plugin); /* Settings */ preferences = pragha_application_get_preferences (priv->pragha); plugin_group = pragha_preferences_get_plugin_group_name (preferences, "lastfm"); if (!pragha_plugins_is_shutdown(pragha_application_get_plugins_engine(priv->pragha))) { pragha_preferences_remove_group (preferences, plugin_group); } g_free (plugin_group); /* Remove menu and settings */ pragha_menubar_remove_lastfm (plugin); pragha_lastfm_plugin_remove_setting (plugin); /* Clean */ if (priv->updated_mobj) g_object_unref (priv->updated_mobj); if (priv->current_mobj) g_object_unref (priv->current_mobj); g_mutex_clear (&priv->data_mutex); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mpris2/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015653�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mpris2/Makefile.am�������������������������������������������������������������0000664�0000000�0000000�00000002144�13435240150�0017710�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/mpris2 AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libmpris2.la libmpris2_la_SOURCES = \ pragha-mpris2-plugin.h \ pragha-mpris2-plugin.c libmpris2_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libmpris2_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libmpris2_la_LIBADD = \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libmpris2_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libmpris2_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libmpris2_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libmpris2_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = mpris2.plugin EXTRA_DIST = $(plugin_DATA) ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mpris2/mpris2.plugin�����������������������������������������������������������0000664�0000000�0000000�00000000417�13435240150�0020311�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=mpris2 Name=Mpris2 Description=Control pragha with mpris2 interface Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2013 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mpris2/pragha-mpris2-plugin.c��������������������������������������������������0000664�0000000�0000000�00000144671�13435240150�0022004�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2017 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <stdio.h> #include <string.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "pragha-mpris2-plugin.h" #include "src/pragha-playback.h" #include "src/pragha-menubar.h" #include "src/pragha-file-utils.h" #include "src/pragha-utils.h" #include "src/pragha-playlists-mgmt.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha.h" #include "plugins/pragha-plugin-macros.h" PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2Plugin, pragha_mpris2_plugin) /* * Mpris2 debus implementation. */ static const gchar mpris2xml[] = "<node>" " <interface name='org.mpris.MediaPlayer2'>" " <method name='Raise'/>" " <method name='Quit'/>" " <property name='CanQuit' type='b' access='read'/>" " <property name='CanRaise' type='b' access='read'/>" " <property name='HasTrackList' type='b' access='read'/>" " <property name='Identity' type='s' access='read'/>" " <property name='DesktopEntry' type='s' access='read'/>" " <property name='SupportedUriSchemes' type='as' access='read'/>" " <property name='SupportedMimeTypes' type='as' access='read'/>" " </interface>" " <interface name='org.mpris.MediaPlayer2.Player'>" " <method name='Next'/>" " <method name='Previous'/>" " <method name='Pause'/>" " <method name='PlayPause'/>" " <method name='Stop'/>" " <method name='Play'/>" " <method name='Seek'>" " <arg direction='in' name='Offset' type='x'/>" " </method>" " <method name='SetPosition'>" " <arg direction='in' name='TrackId' type='o'/>" " <arg direction='in' name='Position' type='x'/>" " </method>" " <method name='OpenUri'>" " <arg direction='in' name='Uri' type='s'/>" " </method>" " <signal name='Seeked'><arg name='Position' type='x'/></signal>" " <property name='PlaybackStatus' type='s' access='read'/>" " <property name='LoopStatus' type='s' access='readwrite'/>" " <property name='Rate' type='d' access='readwrite'/>" " <property name='Shuffle' type='b' access='readwrite'/>" " <property name='Metadata' type='a{sv}' access='read'/>" " <property name='Volume' type='d' access='readwrite'/>" " <property name='Position' type='x' access='read'/>" " <property name='MinimumRate' type='d' access='read'/>" " <property name='MaximumRate' type='d' access='read'/>" " <property name='CanGoNext' type='b' access='read'/>" " <property name='CanGoPrevious' type='b' access='read'/>" " <property name='CanPlay' type='b' access='read'/>" " <property name='CanPause' type='b' access='read'/>" " <property name='CanSeek' type='b' access='read'/>" " <property name='CanControl' type='b' access='read'/>" " </interface>" " <interface name='org.mpris.MediaPlayer2.Playlists'>" " <method name='ActivatePlaylist'>" " <arg direction='in' name='PlaylistId' type='o'/>" " </method>" " <method name='GetPlaylists'>" " <arg direction='in' name='Index' type='u'/>" " <arg direction='in' name='MaxCount' type='u'/>" " <arg direction='in' name='Order' type='s'/>" " <arg direction='in' name='ReverseOrder' type='b'/>" " <arg direction='out' name='Playlists' type='a(oss)'/>" " </method>" " <property name='PlaylistCount' type='u' access='read'/>" " <property name='Orderings' type='as' access='read'/>" " <property name='ActivePlaylist' type='(b(oss))' access='read'/>" " </interface>" " <interface name='org.mpris.MediaPlayer2.TrackList'>" " <method name='GetTracksMetadata'>" " <arg direction='in' name='TrackIds' type='ao'/>" " <arg direction='out' name='Metadata' type='aa{sv}'/>" " </method>" " <method name='AddTrack'>" " <arg direction='in' name='Uri' type='s'/>" " <arg direction='in' name='AfterTrack' type='o'/>" " <arg direction='in' name='SetAsCurrent' type='b'/>" " </method>" " <method name='RemoveTrack'>" " <arg direction='in' name='TrackId' type='o'/>" " </method>" " <method name='GoTo'>" " <arg direction='in' name='TrackId' type='o'/>" " </method>" " <signal name='TrackListReplaced'>" " <arg name='Tracks' type='ao'/>" " <arg name='CurrentTrack' type='o'/>" " </signal>" " <signal name='TrackAdded'>" " <arg name='Metadata' type='a{sv}'/>" " <arg name='AfterTrack' type='o'/>" " </signal>" " <signal name='TrackRemoved'>" " <arg name='TrackId' type='o'/>" " </signal>" " <signal name='TrackMetadataChanged'>" " <arg name='TrackId' type='o'/>" " <arg name='Metadata' type='a{sv}'/>" " </signal>" " <property name='Tracks' type='ao' access='read'/>" " <property name='CanEditTracks' type='b' access='read'/>" " </interface>" "</node>"; /* some MFCisms */ #define BEGIN_INTERFACE(x) \ if(g_quark_try_string(interface_name)==plugin->priv->interface_quarks[x]) { #define MAP_METHOD(x,y) \ if(!g_strcmp0(#y, method_name)) { \ mpris_##x##_##y(invocation, parameters, plugin); return; } #define PROPGET(x,y) \ if(!g_strcmp0(#y, property_name)) \ return mpris_##x##_get_##y(error, plugin); #define PROPPUT(x,y) \ if(g_quark_try_string(property_name)==g_quark_from_static_string(#y)) \ mpris_##x##_put_##y(value, error, plugin); #define END_INTERFACE } /* * Mpris2 implementation. */ static PraghaMusicobject * get_mobj_at_mpris2_track_id (const gchar *track_id) { gchar *base = NULL; void *mobj_request = NULL; base = g_strdup_printf("%s/TrackList/", MPRIS_PATH); if(g_str_has_prefix(track_id, base)) sscanf(track_id + strlen(base), "%p", &mobj_request); g_free(base); return mobj_request; } /* * org.mpris.MediaPlayer2 */ static void mpris_Root_Raise (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { gtk_window_present(GTK_WINDOW(pragha_application_get_window (plugin->priv->pragha))); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Root_Quit (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { pragha_application_quit (plugin->priv->pragha); g_dbus_method_invocation_return_value (invocation, NULL); } static GVariant * mpris_Root_get_CanQuit (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_boolean(TRUE); } static GVariant * mpris_Root_get_CanRaise (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_boolean(TRUE); } static GVariant * mpris_Root_get_HasTrackList (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_boolean(TRUE); } static GVariant * mpris_Root_get_Identity (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_string("Pragha Music Player"); } static GVariant * mpris_Root_get_DesktopEntry (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_string("pragha"); } static GVariant * mpris_Root_get_SupportedUriSchemes (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_parse(G_VARIANT_TYPE("as"), "['file', 'cdda']", NULL, NULL, NULL); } static GVariant * mpris_Root_get_SupportedMimeTypes (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_parse(G_VARIANT_TYPE("as"), "['audio/x-mp3', 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', " "'audio/mp3', 'application/ogg', 'application/x-ogg', 'audio/vorbis', " "'audio/x-vorbis', 'audio/ogg', 'audio/x-ogg', 'audio/x-flac', " #if defined(TAGLIB_WITH_ASF) && (TAGLIB_WITH_ASF==1) "'video/x-ms-asf', 'audio/x-ms-wma', " #endif #if defined(TAGLIB_WITH_MP4) && (TAGLIB_WITH_MP4==1) "'audio/x-m4a', " #endif "'application/x-ape', 'audio/ape', 'audio/x-ape', " "'application/x-flac', 'audio/flac', 'audio/x-wav']", NULL, NULL, NULL); } /* * org.mpris.MediaPlayer2.Player */ static void mpris_Player_Play (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_play_pause_resume (plugin->priv->pragha); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_Next (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_next_track (plugin->priv->pragha); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_Previous (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_prev_track (plugin->priv->pragha); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_Pause (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_backend_pause (backend); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_PlayPause (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_play_pause_resume (plugin->priv->pragha); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_Stop (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_stop (plugin->priv->pragha); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_Seek (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; backend = pragha_application_get_backend (plugin->priv->pragha); if(pragha_backend_get_state (backend) == ST_STOPPED) { g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "Nothing to seek"); return; } gint64 param; g_variant_get(parameters, "(x)", ¶m); gint64 curr_pos = pragha_backend_get_current_position (backend) / GST_USECOND; gint64 seek = (curr_pos + param) / GST_MSECOND; seek = CLAMP (seek, 0, pragha_musicobject_get_length (pragha_backend_get_musicobject (backend))); pragha_backend_seek (backend, seek); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_Player_SetPosition (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; PraghaMusicobject *current_mobj = NULL; gint64 param; PraghaMusicobject *mobj = NULL; gchar *track_id = NULL; g_variant_get(parameters, "(ox)", &track_id, ¶m); mobj = get_mobj_at_mpris2_track_id (track_id); g_free(track_id); /* FIXME: Ugly hack... */ backend = pragha_application_get_backend (plugin->priv->pragha); current_mobj = pragha_backend_get_musicobject (backend); if(mobj != NULL && mobj == current_mobj) { gint seek = (param / 1000000); if (seek >= pragha_musicobject_get_length(current_mobj)) seek = pragha_musicobject_get_length(current_mobj); pragha_backend_seek(backend, seek); } g_dbus_method_invocation_return_value (invocation, NULL); } static void seeked_cb (PraghaBackend *backend, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; if(NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ CDEBUG(DBG_PLUGIN, "MPRIS emit seeked signal.."); backend = pragha_application_get_backend (plugin->priv->pragha); gint64 position = pragha_backend_get_current_position (backend); g_dbus_connection_emit_signal(plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.mpris.MediaPlayer2.Player", "Seeked", g_variant_new ("(x)", GST_TIME_AS_USECONDS (position)), NULL); } static void mpris_Player_OpenUri (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaPlaylist *playlist; gchar *uri = NULL, *path = NULL; PraghaMusicobject *mobj = NULL; gboolean happened = FALSE; g_variant_get(parameters, "(s)", &uri); CDEBUG(DBG_PLUGIN, "MPRIS Player OpenUri"); if(uri) { // TODO: Translate "cdda://sr0/Track 01.wav" URIs for new_musicobject_from_cdda() // If there is such a convention on other players path = g_filename_from_uri(uri, NULL, NULL); if(path && is_playable_file(path)) { mobj = new_musicobject_from_file(path); if(mobj) { playlist = pragha_application_get_playlist (plugin->priv->pragha); pragha_playlist_append_mobj_and_play(playlist, mobj); happened = TRUE; } } g_free(uri); g_free(path); } if(happened) g_dbus_method_invocation_return_value (invocation, NULL); else g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_FILE_CONTENT, "This file does not play here."); } static GVariant * mpris_Player_get_PlaybackStatus (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend = pragha_application_get_backend (plugin->priv->pragha); switch (pragha_backend_get_state (backend)) { case ST_PLAYING: return g_variant_new_string("Playing"); case ST_PAUSED: return g_variant_new_string("Paused"); default: return g_variant_new_string("Stopped"); } } static GVariant * mpris_Player_get_LoopStatus (GError **error, PraghaMpris2Plugin *plugin) { PraghaPreferences *preferences; gboolean repeat; preferences = pragha_application_get_preferences (plugin->priv->pragha); repeat = pragha_preferences_get_repeat (preferences); return g_variant_new_string(repeat ? "Playlist" : "None"); } static void mpris_Player_put_LoopStatus (GVariant *value, GError **error, PraghaMpris2Plugin *plugin) { PraghaPreferences *preferences; const gchar *new_loop = g_variant_get_string(value, NULL); gboolean repeat = g_strcmp0("Playlist", new_loop) ? FALSE : TRUE; preferences = pragha_application_get_preferences (plugin->priv->pragha); pragha_preferences_set_repeat (preferences, repeat); } static GVariant * mpris_Player_get_Rate (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_double(1.0); } static void mpris_Player_put_Rate (GVariant *value, GError **error, PraghaMpris2Plugin *plugin) { g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "This is not alsaplayer."); } static GVariant * mpris_Player_get_Shuffle (GError **error, PraghaMpris2Plugin *plugin) { PraghaPreferences *preferences; gboolean shuffle; preferences = pragha_application_get_preferences (plugin->priv->pragha); shuffle = pragha_preferences_get_shuffle (preferences); return g_variant_new_boolean(shuffle); } static void mpris_Player_put_Shuffle (GVariant *value, GError **error, PraghaMpris2Plugin *plugin) { PraghaPreferences *preferences; gboolean shuffle = g_variant_get_boolean(value); preferences = pragha_application_get_preferences (plugin->priv->pragha); pragha_preferences_set_shuffle (preferences, shuffle); } static GVariant * handle_get_trackid (PraghaMusicobject *mobj) { gchar *o = alloca(260); if(NULL == mobj) return g_variant_new_object_path("/"); g_snprintf(o, 260, "%s/TrackList/%p", MPRIS_PATH, mobj); return g_variant_new_object_path(o); } static void handle_strings_request (GVariantBuilder *b, const gchar *tag, const gchar *val) { GVariant *vval = g_variant_new_string(val); GVariant *vvals = g_variant_new_array(G_VARIANT_TYPE_STRING, &vval, 1); g_variant_builder_add (b, "{sv}", tag, vvals); } static void handle_get_metadata (PraghaMusicobject *mobj, GVariantBuilder *b) { const gchar *title, *artist, *album, *genre, *comment, *file; gint track_no, year, length, bitrate, channels, samplerate; gchar *date = NULL, *url = NULL; CDEBUG(DBG_PLUGIN, "MPRIS handle get metadata"); file = pragha_musicobject_get_file(mobj); title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); album = pragha_musicobject_get_album(mobj); genre = pragha_musicobject_get_genre(mobj); track_no = pragha_musicobject_get_track_no(mobj); year = pragha_musicobject_get_year(mobj); comment = pragha_musicobject_get_comment(mobj); length = pragha_musicobject_get_length(mobj); bitrate = pragha_musicobject_get_bitrate(mobj); channels = pragha_musicobject_get_channels(mobj); samplerate = pragha_musicobject_get_samplerate(mobj); date = g_strdup_printf("%d", year); url = (pragha_musicobject_is_local_file(mobj)) ? g_filename_to_uri(file, NULL, NULL) : g_strdup(file); g_variant_builder_add (b, "{sv}", "mpris:trackid", handle_get_trackid(mobj)); g_variant_builder_add (b, "{sv}", "xesam:url", g_variant_new_string(url)); g_variant_builder_add (b, "{sv}", "xesam:title", g_variant_new_string(title)); handle_strings_request(b, "xesam:artist", artist); g_variant_builder_add (b, "{sv}", "xesam:album", g_variant_new_string(album)); handle_strings_request(b, "xesam:genre", genre); g_variant_builder_add (b, "{sv}", "xesam:contentCreated", g_variant_new_string(date)); g_variant_builder_add (b, "{sv}", "xesam:trackNumber", g_variant_new_int32(track_no)); handle_strings_request(b, "xesam:comment", comment); g_variant_builder_add (b, "{sv}", "mpris:length", g_variant_new_int64((gint64)length * 1000000)); g_variant_builder_add (b, "{sv}", "audio-bitrate", g_variant_new_int32(bitrate)); g_variant_builder_add (b, "{sv}", "audio-channels", g_variant_new_int32(channels)); g_variant_builder_add (b, "{sv}", "audio-samplerate", g_variant_new_int32(samplerate)); g_free(date); g_free(url); } static GVariant * mpris_Player_get_Metadata (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; PraghaToolbar *toolbar; PraghaAlbumArt *albumart; gchar *artUrl_uri = NULL; GVariantBuilder b; const gchar *arturl; CDEBUG(DBG_PLUGIN, "MPRIS Player get Metadata"); g_variant_builder_init(&b, G_VARIANT_TYPE ("a{sv}")); backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_get_state (backend) != ST_STOPPED) { handle_get_metadata(pragha_backend_get_musicobject(backend), &b); toolbar = pragha_application_get_toolbar (plugin->priv->pragha); albumart = pragha_toolbar_get_album_art (toolbar); arturl = pragha_album_art_get_path(albumart); if (string_is_not_empty(arturl)) { artUrl_uri = g_filename_to_uri(arturl, NULL, NULL); g_variant_builder_add (&b, "{sv}", "mpris:artUrl", g_variant_new_string(artUrl_uri)); g_free(artUrl_uri); } } else { g_variant_builder_add (&b, "{sv}", "mpris:trackid", handle_get_trackid(NULL)); } return g_variant_builder_end(&b); } static GVariant * mpris_Player_get_Volume (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend = pragha_application_get_backend (plugin->priv->pragha); return g_variant_new_double(pragha_backend_get_volume (backend)); } static void mpris_Player_put_Volume (GVariant *value, GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend = pragha_application_get_backend (plugin->priv->pragha); gdouble volume = g_variant_get_double(value); pragha_backend_set_volume (backend, volume); } static GVariant * mpris_Player_get_Position (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return g_variant_new_int64(0); else return g_variant_new_int64(pragha_backend_get_current_position(backend) / 1000); } static GVariant * mpris_Player_get_MinimumRate (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_double(1.0); } static GVariant * mpris_Player_get_MaximumRate (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_double(1.0); } static GVariant * mpris_Player_get_CanGoNext (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_boolean(pragha_playback_can_go_next(plugin->priv->pragha)); } static GVariant * mpris_Player_get_CanGoPrevious (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_boolean(pragha_playback_can_go_prev(plugin->priv->pragha)); } static GVariant * mpris_Player_get_CanPlay (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; gboolean can_play = FALSE; backend = pragha_application_get_backend (plugin->priv->pragha); can_play = ((pragha_backend_get_state (backend) != ST_STOPPED) || (pragha_playback_get_no_tracks(plugin->priv->pragha) > 0)); return g_variant_new_boolean (can_play); } static GVariant * mpris_Player_get_CanPause (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend = pragha_application_get_backend (plugin->priv->pragha); return g_variant_new_boolean(pragha_backend_get_state (backend) != ST_STOPPED); } static GVariant * mpris_Player_get_CanSeek (GError **error, PraghaMpris2Plugin *plugin) { PraghaBackend *backend = pragha_application_get_backend (plugin->priv->pragha); return g_variant_new_boolean (pragha_backend_can_seek (backend)); } static GVariant * mpris_Player_get_CanControl (GError **error, PraghaMpris2Plugin *plugin) { // always? return g_variant_new_boolean(TRUE); } /* * org.mpris.MediaPlayer2.Playlists */ static void mpris_Playlists_ActivatePlaylist (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; PraghaDatabase *cdbase; PraghaPlaylist *playlist; gchar *get_playlist = NULL, *test_playlist = NULL, *found_playlist = NULL; gchar **db_playlists = NULL; gint i = 0; CDEBUG(DBG_PLUGIN, "MPRIS Playlists ActivatePlaylist"); g_variant_get(parameters, "(o)", &get_playlist); if(get_playlist && g_str_has_prefix(get_playlist, MPRIS_PATH)) { cdbase = pragha_application_get_database (plugin->priv->pragha); db_playlists = pragha_database_get_playlist_names (cdbase); if(db_playlists) { while(db_playlists[i]) { test_playlist = g_strdup_printf("%s/Playlists/%d", MPRIS_PATH, i); if(0 == g_strcmp0(test_playlist, get_playlist)) found_playlist = g_strdup(db_playlists[i]); g_free(test_playlist); i++; } g_strfreev(db_playlists); } } if(found_playlist) { playlist = pragha_application_get_playlist (plugin->priv->pragha); pragha_playlist_remove_all (playlist); add_playlist_current_playlist(found_playlist, plugin->priv->pragha); backend = pragha_application_get_backend (plugin->priv->pragha); if(pragha_backend_get_state (backend) != ST_STOPPED) pragha_playback_next_track (plugin->priv->pragha); else pragha_playback_play_pause_resume (plugin->priv->pragha); g_free(found_playlist); g_dbus_method_invocation_return_value (invocation, NULL); } else { g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "Unknown or malformed playlist object path."); } g_free (get_playlist); } static void mpris_Playlists_GetPlaylists (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaDatabase *cdbase; GVariantBuilder builder; guint i = 0, start, max; const gchar *order; gchar ** lists = NULL; gchar *listpath = NULL; gboolean reverse; gint imax = 0; CDEBUG(DBG_PLUGIN, "MPRIS Playlists GetPlaylists"); g_variant_builder_init(&builder, G_VARIANT_TYPE("(a(oss))")); g_variant_builder_open(&builder, G_VARIANT_TYPE("a(oss)")); cdbase = pragha_application_get_database (plugin->priv->pragha); lists = pragha_database_get_playlist_names (cdbase); if (lists) { g_variant_get (parameters, "(uu&sb)", &start, &max, &order, &reverse); imax = max; while(lists[i]) { if(i >= start && imax > 0) { listpath = g_strdup_printf("%s/Playlists/%d", MPRIS_PATH, i); g_variant_builder_add (&builder, "(oss)", listpath, lists[i], ""); g_free(listpath); imax--; } i++; } g_strfreev(lists); } g_variant_builder_close(&builder); g_dbus_method_invocation_return_value (invocation, g_variant_builder_end (&builder)); } static GVariant * mpris_Playlists_get_ActivePlaylist (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new("(b(oss))", FALSE, "/", _("Tracks"), _("Tracks")); /* Formally this is correct, but in the practice only is used to display a confuse message "invalid" in the ubuntu-soundmenu. return g_variant_new("(b(oss))", FALSE, "/", "invalid", "invalid");*/ } static GVariant * mpris_Playlists_get_Orderings (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_parse(G_VARIANT_TYPE("as"), "['UserDefined']", NULL, NULL, NULL); } static GVariant * mpris_Playlists_get_PlaylistCount (GError **error, PraghaMpris2Plugin *plugin) { PraghaDatabase *cdbase; cdbase = pragha_application_get_database (plugin->priv->pragha); return g_variant_new_uint32 (pragha_database_get_playlist_count (cdbase)); } /* * prg.mpris.MediaPlayer2.TrackList */ static void mpris_TrackList_GetTracksMetadata (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { /* In: (ao) out: aa{sv} */ GVariant *param1 = g_variant_get_child_value(parameters, 0); gsize i, length; GVariantBuilder b; const gchar *track_id; CDEBUG(DBG_PLUGIN, "MPRIS Tracklist GetTracksMetada"); g_variant_builder_init(&b, G_VARIANT_TYPE("(aa{sv})")); g_variant_builder_open(&b, G_VARIANT_TYPE("aa{sv}")); length = g_variant_n_children(param1); for(i = 0; i < length; i++) { g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}")); PraghaMusicobject *mobj= NULL; track_id = g_variant_get_string(g_variant_get_child_value(param1, i), NULL); mobj = get_mobj_at_mpris2_track_id (track_id); if (mobj) { handle_get_metadata(mobj, &b); } else { g_variant_builder_add (&b, "{sv}", "mpris:trackid", g_variant_new_object_path(track_id)); } g_variant_builder_close(&b); } g_variant_builder_close(&b); g_dbus_method_invocation_return_value (invocation, g_variant_builder_end (&b)); } static void mpris_TrackList_AddTrack (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaPlaylist *playlist; gchar *uri; gchar *after_track; //TODO use this gboolean set_as_current; //TODO use this GList *mlist = NULL; g_variant_get(parameters, "(sob)", &uri, &after_track, &set_as_current); gchar *file = g_filename_from_uri(uri, NULL, NULL); if (!file) { g_warning("Invalid uri: %s", uri); goto exit; } mlist = append_mobj_list_from_unknown_filename(mlist, file); if (mlist) { playlist = pragha_application_get_playlist (plugin->priv->pragha); pragha_playlist_append_mobj_list(playlist, mlist); g_list_free (mlist); } g_free(file); exit: g_free(uri); g_free(after_track); g_dbus_method_invocation_return_value (invocation, NULL); } static void mpris_TrackList_RemoveTrack (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_NOT_SUPPORTED, "TrackList is read-only."); } static void mpris_TrackList_GoTo (GDBusMethodInvocation *invocation, GVariant *parameters, PraghaMpris2Plugin *plugin) { PraghaPlaylist *playlist; PraghaMusicobject *mobj = NULL; gchar *track_id = NULL; g_variant_get(parameters, "(o)", &track_id); CDEBUG(DBG_PLUGIN, "MPRIS Tracklist GoTo"); mobj = get_mobj_at_mpris2_track_id (track_id); if (mobj) { playlist = pragha_application_get_playlist (plugin->priv->pragha); pragha_playlist_activate_unique_mobj (playlist, mobj); g_dbus_method_invocation_return_value (invocation, NULL); } else g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "Unknown or malformed playlist object path."); g_free (track_id); } static GVariant * mpris_TrackList_get_Tracks (GError **error, PraghaMpris2Plugin *plugin) { PraghaPlaylist *playlist; GVariantBuilder builder; PraghaMusicobject *mobj = NULL; GList *list = NULL, *i; CDEBUG(DBG_PLUGIN, "MPRIS Tracklist get Tracks"); g_variant_builder_init(&builder, G_VARIANT_TYPE("ao")); playlist = pragha_application_get_playlist (plugin->priv->pragha); list = pragha_playlist_get_mobj_list (playlist); if(list != NULL) { list = g_list_reverse(list); for (i=list; i != NULL; i = i->next) { mobj = i->data; g_variant_builder_add_value(&builder, handle_get_trackid(mobj)); } g_list_free(list); } return g_variant_builder_end(&builder); } static GVariant * mpris_TrackList_get_CanEditTracks (GError **error, PraghaMpris2Plugin *plugin) { return g_variant_new_boolean(FALSE); } /* dbus callbacks */ static void handle_method_call (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *method_name, GVariant *parameters, GDBusMethodInvocation *invocation, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; /* org.mpris.MediaPlayer2 */ BEGIN_INTERFACE(0) MAP_METHOD(Root, Raise) MAP_METHOD(Root, Quit) END_INTERFACE /* org.mpris.MediaPlayer2.Player */ BEGIN_INTERFACE(1) MAP_METHOD(Player, Next) MAP_METHOD(Player, Previous) MAP_METHOD(Player, Pause) MAP_METHOD(Player, PlayPause) MAP_METHOD(Player, Stop) MAP_METHOD(Player, Play) MAP_METHOD(Player, Seek) MAP_METHOD(Player, SetPosition) MAP_METHOD(Player, OpenUri) END_INTERFACE /* org.mpris.MediaPlayer2.Playlists */ BEGIN_INTERFACE(2) MAP_METHOD(Playlists, ActivatePlaylist) MAP_METHOD(Playlists, GetPlaylists) END_INTERFACE /* org.mpris.MediaPlayer2.TrackList */ BEGIN_INTERFACE(3) MAP_METHOD(TrackList, GetTracksMetadata) MAP_METHOD(TrackList, AddTrack) MAP_METHOD(TrackList, RemoveTrack) MAP_METHOD(TrackList, GoTo) END_INTERFACE } static GVariant * handle_get_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GError **error, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; /* org.mpris.MediaPlayer2 */ BEGIN_INTERFACE(0) PROPGET(Root, CanQuit) PROPGET(Root, CanRaise) PROPGET(Root, HasTrackList) PROPGET(Root, Identity) PROPGET(Root, DesktopEntry) PROPGET(Root, SupportedUriSchemes) PROPGET(Root, SupportedMimeTypes) END_INTERFACE /* org.mpris.MediaPlayer2.Player */ BEGIN_INTERFACE(1) PROPGET(Player, PlaybackStatus) PROPGET(Player, LoopStatus) PROPGET(Player, Rate) PROPGET(Player, Shuffle) PROPGET(Player, Metadata) PROPGET(Player, Volume) PROPGET(Player, Position) PROPGET(Player, MinimumRate) PROPGET(Player, MaximumRate) PROPGET(Player, CanGoNext) PROPGET(Player, CanGoPrevious) PROPGET(Player, CanPlay) PROPGET(Player, CanPause) PROPGET(Player, CanSeek) PROPGET(Player, CanControl) END_INTERFACE /* org.mpris.MediaPlayer2.Playlists */ BEGIN_INTERFACE(2) PROPGET(Playlists, PlaylistCount) PROPGET(Playlists, Orderings) PROPGET(Playlists, ActivePlaylist) END_INTERFACE /* org.mpris.MediaPlayer2.TrackList */ BEGIN_INTERFACE(3) PROPGET(TrackList, Tracks) PROPGET(TrackList, CanEditTracks) END_INTERFACE return NULL; } static gboolean handle_set_property (GDBusConnection *connection, const gchar *sender, const gchar *object_path, const gchar *interface_name, const gchar *property_name, GVariant *value, GError **error, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; /* org.mpris.MediaPlayer2 */ BEGIN_INTERFACE(0) /* all properties readonly */ END_INTERFACE /* org.mpris.MediaPlayer2.Player */ BEGIN_INTERFACE(1) PROPPUT(Player, LoopStatus) PROPPUT(Player, Rate) PROPPUT(Player, Shuffle) PROPPUT(Player, Volume) END_INTERFACE /* org.mpris.MediaPlayer2.Playlists */ BEGIN_INTERFACE(2) /* all properties readonly */ END_INTERFACE /* org.mpris.MediaPlayer2.TrackList */ BEGIN_INTERFACE(3) /* all properties readonly */ END_INTERFACE return (NULL == *error); } static const GDBusInterfaceVTable interface_vtable = { handle_method_call, handle_get_property, handle_set_property }; static void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data) { gint i; guint registration_id; PraghaMpris2Plugin *plugin = user_data; for (i = 0; i < N_OBJECTS; i++) { plugin->priv->interface_quarks[i] = g_quark_from_string(plugin->priv->introspection_data->interfaces[i]->name); registration_id = g_dbus_connection_register_object (connection, MPRIS_PATH, plugin->priv->introspection_data->interfaces[i], &interface_vtable, plugin, /* user_data */ NULL, /* user_data_free_func */ NULL); /* GError** */ plugin->priv->registration_object_ids[i] = registration_id; g_assert (registration_id > 0); } plugin->priv->dbus_connection = connection; g_object_ref(G_OBJECT(plugin->priv->dbus_connection)); } static void on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data) { CDEBUG(DBG_PLUGIN, "Acquired DBus name %s", name); } static void on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; if(NULL != plugin->priv->dbus_connection) { g_object_unref(G_OBJECT(plugin->priv->dbus_connection)); plugin->priv->dbus_connection = NULL; } CDEBUG(DBG_PLUGIN, "Lost DBus name %s", name); } /* pragha callbacks */ static void pragha_mpris_update_any (PraghaMpris2Plugin *plugin) { PraghaBackend *backend; PraghaBackendState playback_state = ST_STOPPED; PraghaPreferences *preferences; gboolean new_song = FALSE, change_detected = FALSE; gboolean shuffle, repeat, can_next, can_prev, can_play, can_pause, can_seek; GVariantBuilder b; const gchar *current_title = NULL; gdouble curr_vol; gint has_tracks = 0; if(NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ CDEBUG(DBG_PLUGIN, "MPRIS update any"); g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}")); backend = pragha_application_get_backend (plugin->priv->pragha); playback_state = pragha_backend_get_state (backend); if (playback_state != ST_STOPPED) { current_title = pragha_musicobject_get_file (pragha_backend_get_musicobject (backend)); } if (g_strcmp0(plugin->priv->saved_title, current_title)) { new_song = TRUE; change_detected = TRUE; if (plugin->priv->saved_title) g_free(plugin->priv->saved_title); if (string_is_not_empty(current_title)) plugin->priv->saved_title = g_strdup(current_title); else plugin->priv->saved_title = NULL; g_variant_builder_add (&b, "{sv}", "Metadata", mpris_Player_get_Metadata (NULL, plugin)); } preferences = pragha_application_get_preferences (plugin->priv->pragha); shuffle = pragha_preferences_get_shuffle (preferences); if (new_song || (plugin->priv->saved_shuffle != shuffle)) { change_detected = TRUE; plugin->priv->saved_shuffle = shuffle; g_variant_builder_add (&b, "{sv}", "Shuffle", mpris_Player_get_Shuffle (NULL, plugin)); } if (new_song || (plugin->priv->state != playback_state)) { change_detected = TRUE; plugin->priv->state = playback_state; g_variant_builder_add (&b, "{sv}", "PlaybackStatus", mpris_Player_get_PlaybackStatus (NULL, plugin)); } repeat = pragha_preferences_get_repeat (preferences); if (new_song || (plugin->priv->saved_playbackstatus != repeat)) { change_detected = TRUE; plugin->priv->saved_playbackstatus = repeat; g_variant_builder_add (&b, "{sv}", "LoopStatus", mpris_Player_get_LoopStatus (NULL, plugin)); } curr_vol = pragha_backend_get_volume (backend); if (new_song || (plugin->priv->volume != curr_vol)) { change_detected = TRUE; plugin->priv->volume = curr_vol; g_variant_builder_add (&b, "{sv}", "Volume", mpris_Player_get_Volume (NULL, plugin)); } can_next = pragha_playback_can_go_next (plugin->priv->pragha); if (new_song || (plugin->priv->saved_can_next != can_next)) { change_detected = TRUE; plugin->priv->saved_can_next = can_next; g_variant_builder_add (&b, "{sv}", "CanGoNext", mpris_Player_get_CanGoNext (NULL, plugin)); } can_prev = pragha_playback_can_go_prev (plugin->priv->pragha); if (new_song || (plugin->priv->saved_can_prev != can_prev)) { change_detected = TRUE; plugin->priv->saved_can_prev = can_prev; g_variant_builder_add (&b, "{sv}", "CanGoPrevious", mpris_Player_get_CanGoPrevious (NULL, plugin)); } has_tracks = pragha_playback_get_no_tracks(plugin->priv->pragha); can_play = (playback_state != ST_STOPPED) || has_tracks; if (new_song || (plugin->priv->saved_can_play != can_play)) { change_detected = TRUE; plugin->priv->saved_can_play = can_play; g_variant_builder_add (&b, "{sv}", "CanPlay", mpris_Player_get_CanPlay (NULL, plugin)); } can_pause = (playback_state != ST_STOPPED); if (new_song || (plugin->priv->saved_can_pause != can_pause)) { change_detected = TRUE; plugin->priv->saved_can_pause = can_pause; g_variant_builder_add (&b, "{sv}", "CanPause", mpris_Player_get_CanPause (NULL, plugin)); } can_seek = pragha_backend_can_seek (backend); if (new_song || (plugin->priv->saved_can_seek != can_seek)) { change_detected = TRUE; plugin->priv->saved_can_seek = can_seek; g_variant_builder_add (&b, "{sv}", "CanSeek", mpris_Player_get_CanSeek (NULL, plugin)); } if (change_detected) { GVariant * tuples[] = { g_variant_new_string("org.mpris.MediaPlayer2.Player"), g_variant_builder_end(&b), g_variant_new_strv(NULL, 0) }; g_dbus_connection_emit_signal(plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.freedesktop.DBus.Properties", "PropertiesChanged", g_variant_new_tuple(tuples, 3) , NULL); } else { g_variant_builder_clear(&b); } } static void pragha_mpris_update_metadata_changed (PraghaMpris2Plugin *plugin) { GVariantBuilder b; if (NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ CDEBUG(DBG_PLUGIN, "MPRIS update metadata of current track."); g_variant_builder_init(&b, G_VARIANT_TYPE("a{sv}")); g_variant_builder_add (&b, "{sv}", "Metadata", mpris_Player_get_Metadata (NULL, plugin)); GVariant * tuples[] = { g_variant_new_string("org.mpris.MediaPlayer2.Player"), g_variant_builder_end(&b), g_variant_new_strv(NULL, 0) }; g_dbus_connection_emit_signal(plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.freedesktop.DBus.Properties", "PropertiesChanged", g_variant_new_tuple(tuples, 3) , NULL); } static void pragha_mpris_update_mobj_remove(PraghaMpris2Plugin *plugin, PraghaMusicobject *mobj) { GVariant * tuples[1]; if(NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ CDEBUG(DBG_PLUGIN, "MPRIS update mobj remove"); tuples[0] = handle_get_trackid(mobj); g_dbus_connection_emit_signal (plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.mpris.MediaPlayer2.TrackList", "TrackRemoved", g_variant_new_tuple(tuples, 1), NULL); } static void pragha_mpris_update_mobj_added (PraghaMpris2Plugin *plugin, PraghaMusicobject *mobj, GtkTreeIter *iter) { PraghaPlaylist *playlist; GtkTreeModel *model; GtkTreePath *path = NULL; PraghaMusicobject *prev = NULL; GVariantBuilder b; if(NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ playlist = pragha_application_get_playlist (plugin->priv->pragha); model = pragha_playlist_get_model (playlist); CDEBUG(DBG_PLUGIN, "MPRIS update mobj added"); g_variant_builder_init(&b, G_VARIANT_TYPE ("(a{sv}o)")); path = gtk_tree_model_get_path(model, iter); if (gtk_tree_path_prev(path)) { prev = current_playlist_mobj_at_path(path, playlist); } gtk_tree_path_free(path); g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}")); handle_get_metadata(mobj, &b); g_variant_builder_close(&b); g_variant_builder_add_value(&b, (prev) ? handle_get_trackid(prev) : g_variant_new_object_path("/")); // or use g_variant_new_string(""); ? // "/" is the only legal empty object path, but // the spec wants an empty string. What do the others do? g_dbus_connection_emit_signal (plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.mpris.MediaPlayer2.TrackList", "TrackAdded", g_variant_builder_end(&b), NULL); } static void pragha_mpris_update_mobj_changed(PraghaMpris2Plugin *plugin, PraghaMusicobject *mobj, gint bitmask) { GVariantBuilder b; if(NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ CDEBUG(DBG_PLUGIN, "MPRIS update mobj changed"); g_variant_builder_init(&b, G_VARIANT_TYPE ("(a{sv})")); g_variant_builder_open(&b, G_VARIANT_TYPE("a{sv}")); // should we only submit the changed metadata here? The spec is not clear. // If yes, use the portions in the bitmask parameter only. handle_get_metadata(mobj, &b); g_variant_builder_close(&b); g_dbus_connection_emit_signal(plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.mpris.MediaPlayer2.TrackList", "TrackChanged", g_variant_builder_end(&b), NULL); } static void pragha_mpris_update_tracklist_replaced (PraghaMpris2Plugin *plugin) { PraghaPlaylist *playlist; PraghaBackend *backend; GVariantBuilder b; PraghaMusicobject *mobj = NULL; GList *list = NULL, *i; if (NULL == plugin->priv->dbus_connection) return; /* better safe than sorry */ CDEBUG(DBG_PLUGIN, "MPRIS update tracklist changed"); g_variant_builder_init(&b, G_VARIANT_TYPE ("(aoo)")); g_variant_builder_open(&b, G_VARIANT_TYPE("ao")); playlist = pragha_application_get_playlist (plugin->priv->pragha); list = pragha_playlist_get_mobj_list (playlist); if(list != NULL) { list = g_list_reverse(list); for (i=list; i != NULL; i = i->next) { mobj = i->data; g_variant_builder_add_value(&b, handle_get_trackid(mobj)); } g_list_free(list); } backend = pragha_application_get_backend (plugin->priv->pragha); g_variant_builder_close(&b); g_variant_builder_add_value(&b, handle_get_trackid(pragha_backend_get_musicobject(backend))); g_dbus_connection_emit_signal (plugin->priv->dbus_connection, NULL, MPRIS_PATH, "org.mpris.MediaPlayer2.TrackList", "TrackListReplaced", g_variant_builder_end(&b), NULL); } static void any_notify_cb (GObject *gobject, GParamSpec *pspec, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; pragha_mpris_update_any (plugin); } static void playlist_any_notify_cb (PraghaPlaylist *playlist, gpointer user_data) { PraghaMpris2Plugin *plugin = user_data; pragha_mpris_update_any (plugin); } static void pragha_art_cache_changed_handler (PraghaArtCache *cache, PraghaMpris2Plugin *plugin) { PraghaBackend *backend; PraghaMusicobject *mobj = NULL; gchar *album_art_path = NULL; const gchar *artist = NULL, *album = NULL; backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_get_state (backend) != ST_STOPPED) { mobj = pragha_backend_get_musicobject (backend); artist = pragha_musicobject_get_artist (mobj); album = pragha_musicobject_get_album (mobj); album_art_path = pragha_art_cache_get_uri (cache, artist, album); if (album_art_path) { pragha_mpris_update_metadata_changed (plugin); g_free (album_art_path); } } } /* * PLugin Inteface */ static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaPreferences *preferences; PraghaBackend *backend; PraghaPlaylist *playlist; PraghaArtCache *art_cache; PraghaMpris2Plugin *plugin = PRAGHA_MPRIS2_PLUGIN (activatable); PraghaMpris2PluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); CDEBUG(DBG_PLUGIN, "Mpris2 plugin %s", G_STRFUNC); priv->saved_shuffle = FALSE; priv->saved_playbackstatus = FALSE; priv->saved_title = NULL; priv->volume = 0; priv->saved_can_next = FALSE; priv->saved_can_prev = FALSE; priv->saved_can_play = FALSE; priv->saved_can_pause = FALSE; priv->saved_can_seek = FALSE; priv->introspection_data = g_dbus_node_info_new_for_xml (mpris2xml, NULL); g_assert (priv->introspection_data != NULL); priv->owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, MPRIS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, on_name_acquired, on_name_lost, plugin, NULL); preferences = pragha_application_get_preferences (priv->pragha); g_signal_connect (preferences, "notify::shuffle", G_CALLBACK (any_notify_cb), plugin); g_signal_connect (preferences, "notify::repeat", G_CALLBACK (any_notify_cb), plugin); backend = pragha_application_get_backend (priv->pragha); g_signal_connect (backend, "notify::volume", G_CALLBACK (any_notify_cb), plugin); g_signal_connect (backend, "notify::state", G_CALLBACK (any_notify_cb), plugin); g_signal_connect (backend, "seeked", G_CALLBACK (seeked_cb), plugin); playlist = pragha_application_get_playlist (priv->pragha); g_signal_connect (playlist, "playlist-changed", G_CALLBACK(playlist_any_notify_cb), plugin); art_cache = pragha_application_get_art_cache (priv->pragha); g_signal_connect (art_cache, "cache-changed", G_CALLBACK(pragha_art_cache_changed_handler), plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaBackend *backend; PraghaPlaylist *playlist; PraghaArtCache *art_cache; PraghaPreferences *preferences; gint i; PraghaMpris2Plugin *plugin = PRAGHA_MPRIS2_PLUGIN (activatable); PraghaMpris2PluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Mpris2 plugin %s", G_STRFUNC); if (NULL == priv->dbus_connection) return; for (i = 0; i < N_OBJECTS; i++) { g_dbus_connection_unregister_object (priv->dbus_connection, priv->registration_object_ids[i]); } preferences = pragha_application_get_preferences (priv->pragha); g_signal_handlers_disconnect_by_func (preferences, any_notify_cb, plugin); backend = pragha_application_get_backend (priv->pragha); g_signal_handlers_disconnect_by_func (backend, seeked_cb, plugin); g_signal_handlers_disconnect_by_func (backend, any_notify_cb, plugin); playlist = pragha_application_get_playlist (priv->pragha); g_signal_handlers_disconnect_by_func (playlist, playlist_any_notify_cb, plugin); art_cache = pragha_application_get_art_cache (priv->pragha); g_signal_handlers_disconnect_by_func (art_cache, pragha_art_cache_changed_handler, plugin); g_bus_unown_name (priv->owner_id); if (NULL != priv->introspection_data) { g_dbus_node_info_unref (priv->introspection_data); priv->introspection_data = NULL; } g_object_unref (G_OBJECT (priv->dbus_connection)); priv->dbus_connection = NULL; g_free (priv->saved_title); } �����������������������������������������������������������������������pragha-1.3.4/plugins/mpris2/pragha-mpris2-plugin.h��������������������������������������������������0000664�0000000�0000000�00000005651�13435240150�0022003�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2017 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_MPRIS2_PLUGIN_H__ #define __PRAGHA_MPRIS2_PLUGIN_H__ #include <gtk/gtk.h> #include <libpeas/peas.h> #include "src/pragha.h" G_BEGIN_DECLS #define PRAGHA_TYPE_MPRIS2_PLUGIN (pragha_mpris2_plugin_get_type ()) #define PRAGHA_MPRIS2_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2Plugin)) #define PRAGHA_MPRIS2_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2Plugin)) #define PRAGHA_IS_MPRIS2_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_MPRIS2_PLUGIN)) #define PRAGHA_IS_MPRIS2_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_MPRIS2_PLUGIN)) #define PRAGHA_MPRIS2_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2PluginClass)) #define N_OBJECTS 4 #define MPRIS_NAME "org.mpris.MediaPlayer2.pragha" #define MPRIS_PATH "/org/mpris/MediaPlayer2" typedef struct _PraghaMpris2PluginPrivate PraghaMpris2PluginPrivate; struct _PraghaMpris2PluginPrivate { PraghaApplication *pragha; guint owner_id; GDBusNodeInfo *introspection_data; GDBusConnection *dbus_connection; GQuark interface_quarks[N_OBJECTS]; guint registration_object_ids[N_OBJECTS]; gboolean saved_playbackstatus; gboolean saved_shuffle; gchar *saved_title; gdouble volume; gboolean saved_can_next; gboolean saved_can_prev; gboolean saved_can_play; gboolean saved_can_pause; gboolean saved_can_seek; PraghaBackendState state; }; GType pragha_mpris2_plugin_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* __PRAGHA_MPRIS2_PLUGIN_H__ */ ���������������������������������������������������������������������������������������pragha-1.3.4/plugins/mtp/���������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015237�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mtp/Makefile.am����������������������������������������������������������������0000664�0000000�0000000�00000002354�13435240150�0017277�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/mtp AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libpmtp.la libpmtp_la_SOURCES = \ pragha-devices-mtp.c \ pragha-mtp-musicobject.c \ pragha-mtp-musicobject.h libpmtp_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libpmtp_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ $(GUDEV_CFLAGS) \ $(LIBMTP_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libpmtp_la_LIBADD = \ ../devices/libdeviceclient.la \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) \ $(GUDEV_LIBS) \ $(LIBMTP_LIBS) if HAVE_GSTREAMER_AUDIO libpmtp_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libpmtp_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libpmtp_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libpmtp_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = mtp.plugin EXTRA_DIST = $(plugin_DATA) ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mtp/mtp.plugin�����������������������������������������������������������������0000664�0000000�0000000�00000000422�13435240150�0017255�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=pmtp Name=Mtp Devices Description=Management MTP devices Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha Depends=devices����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mtp/pragha-devices-mtp.c�������������������������������������������������������0000664�0000000�0000000�00000060103�13435240150�0021063�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib/gstdio.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <gudev/gudev.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "plugins/pragha-plugin-macros.h" #include "plugins/devices/pragha-devices-plugin.h" #include "plugins/devices/pragha-device-client.h" #include "pragha-mtp-musicobject.h" #include "src/pragha-music-enum.h" #include "src/pragha-menubar.h" #include "src/pragha-utils.h" #include "src/pragha-simple-widgets.h" #include "src/pragha-window.h" #include "src/pragha-hig.h" #include "src/pragha.h" #define PRAGHA_TYPE_MTP_PLUGIN (pragha_mtp_plugin_get_type ()) #define PRAGHA_MTP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_MTP_PLUGIN, PraghaMtpPlugin)) #define PRAGHA_MTP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_MTP_PLUGIN, PraghaMtpPlugin)) #define PRAGHA_IS_MTP_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_MTP_PLUGIN)) #define PRAGHA_IS_MTP_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_MTP_PLUGIN)) #define PRAGHA_MTP_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_MTP_PLUGIN, PraghaMtpPluginClass)) typedef struct _PraghaMtpPluginPrivate PraghaMtpPluginPrivate; struct _PraghaMtpPluginPrivate { PraghaApplication *pragha; gint bus_hooked; gint device_hooked; GUdevDevice *u_device; LIBMTP_mtpdevice_t *mtp_device; GHashTable *tracks_table; GtkActionGroup *action_group_menu; guint merge_id_menu; GtkActionGroup *action_group_playlist; guint merge_id_playlist; }; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_MTP_PLUGIN, PraghaMtpPlugin, pragha_mtp_plugin) /* * Menu Actions. */ static void pragha_mtp_action_send_to_device (GtkAction *action, PraghaMtpPlugin *plugin); static void pragha_mtp_action_append_songs (GtkAction *action, PraghaMtpPlugin *plugin); static void pragha_mtp_action_show_device_info (GtkAction *action, PraghaMtpPlugin *plugin); static const GtkActionEntry mtp_sendto_actions [] = { {"Send to MTP", NULL, "Fake MTP device", "", "Send to MTP", G_CALLBACK(pragha_mtp_action_send_to_device)}, }; static const gchar *mtp_sendto_xml = "<ui> \ <popup name=\"SelectionPopup\"> \ <menu action=\"SendToMenu\"> \ <placeholder name=\"pragha-sendto-placeholder\"> \ <menuitem action=\"Send to MTP\"/> \ <separator/> \ </placeholder> \ </menu> \ </popup> \ </ui>"; static const GtkActionEntry mtp_menu_actions [] = { {"MtpDevice", "multimedia-player", "Fake MTP device"}, {"Add MTP library", "list-add", N_("_Add the library"), "", "Add all the library", G_CALLBACK(pragha_mtp_action_append_songs)}, {"Show device info", "dialog-information", N_("Show device info"), "", "Show device info", G_CALLBACK(pragha_mtp_action_show_device_info)}, }; static const gchar *mtp_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"> \ <menu action=\"MtpDevice\"> \ <menuitem action=\"Add MTP library\"/> \ <separator/> \ <menuitem action=\"Show device info\"/> \ </menu> \ <separator/> \ </placeholder> \ </menu> \ </menubar> \ </ui>"; /* * Gear Menu. */ static void pragha_gmenu_mtp_add_library_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { pragha_mtp_action_append_songs (NULL, PRAGHA_MTP_PLUGIN(user_data)); } static void pragha_gmenu_mtp_show_device_info_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { pragha_mtp_action_show_device_info (NULL, PRAGHA_MTP_PLUGIN(user_data)); } static GActionEntry mtp_entries[] = { { "mtp-library", pragha_gmenu_mtp_add_library_action, NULL, NULL, NULL }, { "mtp-info", pragha_gmenu_mtp_show_device_info_action, NULL, NULL, NULL } }; static const gchar *mtp_menu_ui = \ NEW_MENU("menubar") \ OPEN_PLACEHOLDER("pragha-plugins-placeholder") \ NEW_NAMED_SUBMENU("mtp-sudmenu", "Unknown MTP device") \ NEW_ITEM("Add MTP library", "win", "mtp-library") \ NEW_ITEM("Show device info", "win", "mtp-info") \ CLOSE_SUBMENU \ CLOSE_PLACEHOLDER \ CLOSE_MENU; /* * Basic Cache.. */ static void pragha_mtp_plugin_append_cache (PraghaMtpPlugin *plugin) { PraghaPlaylist *playlist; GHashTableIter iter; gpointer key, value; PraghaMusicobject *mobj = NULL; GList *list = NULL; PraghaMtpPluginPrivate *priv = plugin->priv; g_hash_table_iter_init (&iter, priv->tracks_table); while (g_hash_table_iter_next (&iter, &key, &value)) { mobj = value; if (G_LIKELY(mobj)) { list = g_list_append (list, mobj); g_object_ref (mobj); } /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_append_mobj_list (playlist, list); g_list_free(list); } static void pragha_mtp_cache_clear (PraghaMtpPlugin *plugin) { PraghaMtpPluginPrivate *priv = plugin->priv; g_hash_table_remove_all (priv->tracks_table); } static void pragha_mtp_cache_insert_track (PraghaMtpPlugin *plugin, PraghaMusicobject *mobj) { PraghaMtpPluginPrivate *priv = plugin->priv; const gchar *file = pragha_musicobject_get_file(mobj); if (string_is_empty(file)) return; g_hash_table_insert (priv->tracks_table, g_strdup(file), mobj); } static void pragha_mtp_plugin_cache_storage_recursive (LIBMTP_mtpdevice_t *device, guint storageid, gint leaf, PraghaMtpPlugin *plugin) { PraghaMusicobject *mobj = NULL; LIBMTP_file_t *folders = NULL, *lfolder = NULL, *audios = NULL, *laudio = NULL; LIBMTP_file_t *files, *file, *tmp; gboolean nomedia = FALSE; files = LIBMTP_Get_Files_And_Folders (device, storageid, leaf); if (files == NULL) return; file = files; while (file != NULL) { if (file->filetype == LIBMTP_FILETYPE_FOLDER) { if (folders == NULL) folders = lfolder = file; else { lfolder->next = file; lfolder = lfolder->next; } } else if (LIBMTP_FILETYPE_IS_AUDIO(file->filetype)) { if (audios == NULL) audios = laudio = file; else { laudio->next = file; laudio = laudio->next; } } else { if (g_ascii_strcasecmp(file->filename, ".nomedia") == 0) { nomedia = TRUE; break; } } pragha_process_gtk_events (); file = file->next; } if (nomedia == FALSE) { /* Add folders recursively */ file = folders; while (file != NULL) { pragha_mtp_plugin_cache_storage_recursive (device, storageid, file->item_id, plugin); pragha_process_gtk_events (); file = file->next; } /* Add music files */ file = audios; while (file != NULL) { LIBMTP_track_t *track; track = LIBMTP_Get_Trackmetadata(device, file->item_id); if (G_LIKELY(track)) { mobj = pragha_musicobject_new_from_mtp_track (track); if (G_LIKELY(mobj)) { pragha_mtp_cache_insert_track (plugin, mobj); } LIBMTP_destroy_track_t(track); } pragha_process_gtk_events (); file = file->next; } } /* Clean memory. */ file = files; while (file != NULL) { tmp = file; file = file->next; LIBMTP_destroy_file_t(tmp); } } /* * Menu actions */ static void pragha_mtp_action_send_to_device (GtkAction *action, PraghaMtpPlugin *plugin) { PraghaPlaylist *playlist; PraghaMusicobject *mobj = NULL; LIBMTP_track_t *mtp_track; LIBMTP_error_t *stack; const gchar *file; gint ret; PraghaMtpPluginPrivate *priv = plugin->priv; playlist = pragha_application_get_playlist (priv->pragha); mobj = pragha_playlist_get_selected_musicobject (playlist); if (!mobj) return; file = pragha_musicobject_get_file (mobj); mtp_track = mtp_track_new_from_pragha_musicobject (priv->mtp_device, mobj); ret = LIBMTP_Send_Track_From_File (priv->mtp_device, file, mtp_track, NULL, NULL); if (ret != 0) { stack = LIBMTP_Get_Errorstack (priv->mtp_device); CDEBUG(DBG_INFO, "unable to send track: %s", stack->error_text); if (stack->errornumber == LIBMTP_ERROR_STORAGE_FULL) { CDEBUG(DBG_PLUGIN, "No space left on MTP device"); } else { CDEBUG(DBG_PLUGIN, "Unable to send file to MTP device: %s", file); } LIBMTP_Dump_Errorstack(priv->mtp_device); LIBMTP_Clear_Errorstack(priv->mtp_device); } else { mobj = pragha_musicobject_new_from_mtp_track (mtp_track); if (G_LIKELY(mobj)) pragha_mtp_cache_insert_track (plugin, mobj); CDEBUG(DBG_INFO, "Added %s to MTP device", file); } LIBMTP_destroy_track_t(mtp_track); } static void pragha_mtp_action_append_songs (GtkAction *action, PraghaMtpPlugin *plugin) { pragha_mtp_plugin_append_cache (plugin); } static void pragha_mtp_action_show_device_info (GtkAction *action, PraghaMtpPlugin *plugin) { PraghaHeader *header; GtkWidget *dialog, *table, *label; LIBMTP_devicestorage_t *storage; gchar *friend_label = NULL; gchar *storage_size = NULL; gchar *storage_free = NULL; gchar *storage_string = NULL; guint row = 0; PraghaMtpPluginPrivate *priv = plugin->priv; friend_label = LIBMTP_Get_Friendlyname (priv->mtp_device); if (!friend_label) friend_label = LIBMTP_Get_Modelname (priv->mtp_device); dialog = gtk_dialog_new_with_buttons (friend_label, GTK_WINDOW(pragha_application_get_window (priv->pragha)), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Ok"), GTK_RESPONSE_OK, NULL); header = pragha_header_new (); pragha_header_set_title (header, friend_label); pragha_header_set_icon_name (header, "multimedia-player"); table = pragha_hig_workarea_table_new (); LIBMTP_Get_Storage (priv->mtp_device, LIBMTP_STORAGE_SORTBY_FREESPACE); for (storage = priv->mtp_device->storage; storage != 0; storage = storage->next) { pragha_hig_workarea_table_add_section_title (table, &row, storage->StorageDescription); storage_free = g_format_size (storage->FreeSpaceInBytes); storage_size = g_format_size (storage->MaxCapacity); storage_string = g_strdup_printf (_("%s free of %s (%d%% used)"), storage_free, storage_size, (gint) ((storage->MaxCapacity - storage->FreeSpaceInBytes) * 100 / storage->MaxCapacity)); label = gtk_label_new_with_mnemonic (storage_string); pragha_hig_workarea_table_add_wide_control (table, &row, label); g_free (storage_free); g_free (storage_size); g_free (storage_string); } gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), GTK_WIDGET(header), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, TRUE, TRUE, 0); g_signal_connect (G_OBJECT(dialog), "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show_all (dialog); g_free (friend_label); } /* * MTP plugin. */ static void pragha_mtp_plugin_append_menu_action (PraghaMtpPlugin *plugin) { PraghaPlaylist *playlist; GtkActionGroup *action_group; GtkAction *action; GActionMap *map; gchar *friend_label = NULL; PraghaMtpPluginPrivate *priv = plugin->priv; friend_label = LIBMTP_Get_Friendlyname (priv->mtp_device); if (!friend_label) friend_label = LIBMTP_Get_Modelname (priv->mtp_device); /* Menubar tools. */ action_group = gtk_action_group_new ("PraghaMenubarMtpActions"); gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions (action_group, mtp_menu_actions, G_N_ELEMENTS (mtp_menu_actions), plugin); action = gtk_action_group_get_action (action_group, "MtpDevice"); gtk_action_set_label(GTK_ACTION(action), friend_label); priv->merge_id_menu = pragha_menubar_append_plugin_action (priv->pragha, action_group, mtp_menu_xml); priv->action_group_menu = action_group; /* Gear Menu */ pragha_menubar_append_submenu (priv->pragha, "pragha-plugins-placeholder", mtp_menu_ui, "mtp-sudmenu", friend_label, plugin); map = G_ACTION_MAP (pragha_application_get_window(priv->pragha)); g_action_map_add_action_entries (G_ACTION_MAP (map), mtp_entries, G_N_ELEMENTS(mtp_entries), plugin); /* Playlist sendto */ action_group = gtk_action_group_new ("PraghaPlaylistMtpActions"); gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); gtk_action_group_add_actions (action_group, mtp_sendto_actions, G_N_ELEMENTS (mtp_sendto_actions), plugin); action = gtk_action_group_get_action (action_group, "Send to MTP"); gtk_action_set_label(GTK_ACTION(action), friend_label); playlist = pragha_application_get_playlist (priv->pragha); priv->merge_id_playlist = pragha_playlist_append_plugin_action (playlist, action_group, mtp_sendto_xml); priv->action_group_playlist = action_group; g_free(friend_label); } void pragha_mtp_plugin_clean_source (PraghaBackend *backend, gpointer user_data) { PraghaMusicobject *mobj; gchar *tmp_filename = NULL; mobj = pragha_backend_get_musicobject (backend); if (!pragha_musicobject_is_mtp_file (mobj)) return; tmp_filename = pragha_mtp_plugin_get_temp_filename(mobj); g_unlink (tmp_filename); g_free (tmp_filename); } void pragha_mtp_plugin_prepare_source (PraghaBackend *backend, gpointer user_data) { PraghaMusicobject *mobj; gchar *tmp_filename = NULL, *uri = NULL; gint track_id, ret = -1; PraghaMtpPlugin *plugin = user_data; PraghaMtpPluginPrivate *priv = plugin->priv; mobj = pragha_backend_get_musicobject (backend); if (!pragha_musicobject_is_mtp_file (mobj)) return; tmp_filename = pragha_mtp_plugin_get_temp_filename(mobj); track_id = pragha_mtp_plugin_get_track_id(mobj); ret = LIBMTP_Get_Track_To_File (priv->mtp_device, track_id, tmp_filename, NULL, NULL); if (ret == 0) { uri = g_filename_to_uri (tmp_filename, NULL, NULL); pragha_backend_set_playback_uri (backend, uri); g_free(uri); } g_free (tmp_filename); } static void pragha_mtp_plugin_remove_menu_action (PraghaMtpPlugin *plugin) { PraghaPlaylist *playlist; PraghaMtpPluginPrivate *priv = plugin->priv; if (!priv->merge_id_menu) return; pragha_menubar_remove_plugin_action (priv->pragha, priv->action_group_menu, priv->merge_id_menu); priv->merge_id_menu = 0; if (!priv->merge_id_playlist) return; playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_remove_plugin_action (playlist, priv->action_group_playlist, priv->merge_id_playlist); priv->merge_id_playlist = 0; pragha_menubar_remove_by_id (priv->pragha, "pragha-plugins-placeholder", "mtp-sudmenu"); } static void pragha_mtp_plugin_cache_tracks (PraghaMtpPlugin *plugin) { LIBMTP_devicestorage_t *storage; PraghaMtpPluginPrivate *priv = plugin->priv; for (storage = priv->mtp_device->storage; storage != 0; storage = storage->next) { pragha_mtp_plugin_cache_storage_recursive (priv->mtp_device, storage->id, 0xffffffff, plugin); } } static void pragha_mtp_clear_hook_device (PraghaMtpPlugin *plugin) { PraghaMtpPluginPrivate *priv = plugin->priv; if (priv->bus_hooked) priv->bus_hooked = 0; if (priv->device_hooked) priv->device_hooked = 0; if (priv->u_device) { g_object_unref (priv->u_device); priv->u_device = NULL; } if (priv->mtp_device) { LIBMTP_Release_Device (priv->mtp_device); priv->mtp_device = NULL; } } static void pragha_mtp_detected_ask_action_response (GtkWidget *dialog, gint response, gpointer user_data) { PraghaMtpPlugin *plugin = user_data; switch (response) { case PRAGHA_DEVICE_RESPONSE_PLAY: gtk_widget_set_sensitive (dialog, FALSE); set_watch_cursor (dialog); pragha_mtp_plugin_cache_tracks (plugin); pragha_mtp_plugin_append_menu_action (plugin); remove_watch_cursor(dialog); pragha_mtp_plugin_append_cache (plugin); break; case PRAGHA_DEVICE_RESPONSE_NONE: default: pragha_mtp_clear_hook_device (plugin); break; } gtk_widget_destroy (dialog); } static void pragha_mtp_detected_ask_action (PraghaMtpPlugin *plugin) { GtkWidget *dialog; dialog = pragha_gudev_dialog_new (NULL, _("MTP Device"), "multimedia-player", _("Was inserted an MTP Device"), NULL, _("Append songs of device"), PRAGHA_DEVICE_RESPONSE_PLAY); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_mtp_detected_ask_action_response), plugin); gtk_widget_show_all (dialog); } static void pragha_mtp_plugin_device_added (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device, gpointer user_data) { LIBMTP_raw_device_t *device_list, *raw_device = NULL; LIBMTP_mtpdevice_t *mtp_device; LIBMTP_devicestorage_t *storage; gint busnum = 0, devnum = 0, numdevs = 0, i = 0; guint64 freeSpace = 0; PraghaMtpPlugin *plugin = user_data; PraghaMtpPluginPrivate *priv = plugin->priv; if (priv->mtp_device != NULL) return; if (device_type != PRAGHA_DEVICE_MTP) return; /* Get devices.. */ if (LIBMTP_Detect_Raw_Devices (&device_list, &numdevs) != LIBMTP_ERROR_NONE) return; busnum = g_udev_device_get_property_as_int (u_device, "BUSNUM"); devnum = pragha_gudev_get_property_as_int (u_device, "DEVNUM", 10); for (i = 0; i < numdevs; i++) { if (device_list[i].bus_location == busnum && device_list[i].devnum == devnum) { raw_device = &device_list[i]; break; } } if (!raw_device) { g_warning("No mach any mtp device with bus, testing first."); raw_device = &device_list[0]; } if (!raw_device) { g_free (device_list); return; } /* Get device and reorder by free space. */ mtp_device = LIBMTP_Open_Raw_Device_Uncached (raw_device); if (!LIBMTP_Get_Storage (mtp_device, LIBMTP_STORAGE_SORTBY_FREESPACE)) { LIBMTP_Dump_Errorstack (mtp_device); LIBMTP_Clear_Errorstack (mtp_device); } for (storage = mtp_device->storage; storage != 0; storage = storage->next) { freeSpace += storage->FreeSpaceInBytes; } if (!freeSpace) { LIBMTP_Release_Device (mtp_device); return; } /* Hook device */ priv->bus_hooked = busnum; priv->device_hooked = devnum; priv->u_device = g_object_ref (u_device); priv->mtp_device = mtp_device; pragha_mtp_detected_ask_action (plugin); g_free (device_list); } void pragha_mtp_plugin_device_removed (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device, gpointer user_data) { PraghaMusicEnum *enum_map = NULL; gint busnum = 0, devnum = 0; PraghaMtpPlugin *plugin = user_data; PraghaMtpPluginPrivate *priv = plugin->priv; if (device_type != PRAGHA_DEVICE_MTP) return; busnum = g_udev_device_get_property_as_int (u_device, "BUSNUM"); devnum = pragha_gudev_get_property_as_int (u_device, "DEVNUM", 10); if (busnum == priv->bus_hooked && devnum == priv->device_hooked) { pragha_mtp_plugin_remove_menu_action (plugin); pragha_mtp_cache_clear (plugin); pragha_mtp_clear_hook_device (plugin); enum_map = pragha_music_enum_get (); pragha_music_enum_map_remove (enum_map, "FILE_MTP"); g_object_unref (enum_map); } } static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaDeviceClient *device_client; PraghaBackend *backend; PraghaMtpPlugin *plugin = PRAGHA_MTP_PLUGIN (activatable); PraghaMtpPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Mtp plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); priv->tracks_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); backend = pragha_application_get_backend (priv->pragha); g_signal_connect (backend, "prepare-source", G_CALLBACK(pragha_mtp_plugin_prepare_source), plugin); g_signal_connect (backend, "clean-source", G_CALLBACK(pragha_mtp_plugin_clean_source), plugin); device_client = pragha_device_client_get(); g_signal_connect (G_OBJECT(device_client), "device-added", G_CALLBACK(pragha_mtp_plugin_device_added), plugin); g_signal_connect (G_OBJECT(device_client), "device-removed", G_CALLBACK(pragha_mtp_plugin_device_removed), plugin); g_object_unref (device_client); LIBMTP_Init (); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaDeviceClient *device_client; PraghaBackend *backend; PraghaMtpPlugin *plugin = PRAGHA_MTP_PLUGIN (activatable); PraghaMtpPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Mtp plugin %s", G_STRFUNC); pragha_mtp_plugin_remove_menu_action (plugin); pragha_mtp_cache_clear (plugin); pragha_mtp_clear_hook_device (plugin); g_hash_table_destroy (priv->tracks_table); backend = pragha_application_get_backend (priv->pragha); g_signal_handlers_disconnect_by_func (backend, pragha_mtp_plugin_prepare_source, plugin); g_signal_handlers_disconnect_by_func (backend, pragha_mtp_plugin_clean_source, plugin); device_client = pragha_device_client_get(); g_signal_handlers_disconnect_by_func (device_client, pragha_mtp_plugin_device_added, plugin); g_signal_handlers_disconnect_by_func (device_client, pragha_mtp_plugin_device_removed, plugin); g_object_unref (device_client); priv->pragha = NULL; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mtp/pragha-mtp-musicobject.c���������������������������������������������������0000664�0000000�0000000�00000012421�13435240150�0021750�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include <stdlib.h> #include <string.h> #include <glib/gstdio.h> #include "src/pragha-utils.h" #include "src/pragha-file-utils.h" #include "src/pragha-music-enum.h" #include "src/pragha-debug.h" #include "pragha-mtp-musicobject.h" static gboolean is_valid_mime(const gchar *mime, const gchar **mlist) { gint i = 0; while (mlist[i]) { if (g_content_type_equals(mime, mlist[i])) return TRUE; i++; } return FALSE; } LIBMTP_track_t * mtp_track_new_from_pragha_musicobject (LIBMTP_mtpdevice_t *mtp_device, PraghaMusicobject *mobj) { LIBMTP_track_t *tr; LIBMTP_filetype_t filetype; gchar *filename; const gchar *mime_type; struct stat sbuf; mime_type = pragha_musicobject_get_mime_type (mobj); if (is_valid_mime(mime_type, mime_flac)) filetype = LIBMTP_FILETYPE_FLAC; else if (is_valid_mime(mime_type, mime_mpeg)) filetype = LIBMTP_FILETYPE_MP3; else if (is_valid_mime(mime_type, mime_ogg)) filetype = LIBMTP_FILETYPE_OGG; else if (is_valid_mime(mime_type, mime_wav)) filetype = LIBMTP_FILETYPE_WAV; else if (is_valid_mime(mime_type, mime_asf)) filetype = LIBMTP_FILETYPE_WMA; else if (is_valid_mime(mime_type, mime_mp4)) filetype = LIBMTP_FILETYPE_MP4; else filetype = LIBMTP_FILETYPE_UNKNOWN; if (filetype == LIBMTP_FILETYPE_UNKNOWN) return NULL; filename = g_strdup(pragha_musicobject_get_file(mobj)); if (g_stat(filename, &sbuf) == -1) { g_free(filename); return NULL; } tr = LIBMTP_new_track_t(); /* Minimun data. */ tr->filesize = (uint64_t) sbuf.st_size; tr->filename = get_display_name(mobj); tr->filetype = filetype; /* Metadata. */ tr->title = g_strdup(pragha_musicobject_get_title(mobj)); tr->artist = g_strdup(pragha_musicobject_get_artist(mobj)); tr->album = g_strdup(pragha_musicobject_get_album(mobj)); tr->duration = (1000 * pragha_musicobject_get_length(mobj)); tr->genre = g_strdup(pragha_musicobject_get_genre (mobj)); tr->date = g_strdup_printf("%d", pragha_musicobject_get_year (mobj)); /* Storage data. */ tr->parent_id = mtp_device->default_music_folder; tr->storage_id = 0; g_free(filename); return tr; } PraghaMusicobject * pragha_musicobject_new_from_mtp_track (LIBMTP_track_t *track) { PraghaMusicEnum *enum_map = NULL; PraghaMusicobject *mobj = NULL; gchar *uri = NULL; uri = g_strdup_printf ("mtp://%i-%s", track->item_id, track->filename); CDEBUG(DBG_MOBJ, "Creating new musicobject to MTP: %s", uri); enum_map = pragha_music_enum_get(); mobj = g_object_new (PRAGHA_TYPE_MUSICOBJECT, "file", uri, "source", pragha_music_enum_map_get(enum_map, "FILE_MTP"), NULL); g_object_unref (enum_map); if (track->title) pragha_musicobject_set_title (mobj, track->title); if (track->artist) pragha_musicobject_set_artist (mobj, track->artist); if (track->album) pragha_musicobject_set_album (mobj, track->album); if (track->genre) pragha_musicobject_set_genre (mobj, track->genre); if (track->duration) pragha_musicobject_set_length (mobj, track->duration/1000); if (track->tracknumber) pragha_musicobject_set_track_no (mobj, track->tracknumber); if (track->samplerate) pragha_musicobject_set_samplerate (mobj, track->samplerate); if (track->nochannels) pragha_musicobject_set_channels (mobj, track->nochannels); g_free(uri); return mobj; } gint pragha_mtp_plugin_get_track_id (PraghaMusicobject *mobj) { const gchar *track_id, *file; file = pragha_musicobject_get_file (mobj); track_id = file + strlen ("mtp://"); return atoi(track_id); } gchar * pragha_mtp_plugin_get_temp_filename (PraghaMusicobject *mobj) { const gchar *track_id, *file; file = pragha_musicobject_get_file (mobj); track_id = file + strlen ("mtp://"); return g_strdup_printf ("/tmp/%s", track_id); } gboolean pragha_musicobject_is_mtp_file (PraghaMusicobject *mobj) { PraghaMusicEnum *enum_map = NULL; PraghaMusicSource file_source = FILE_NONE; enum_map = pragha_music_enum_get (); file_source = pragha_music_enum_map_get(enum_map, "FILE_MTP"); g_object_unref (enum_map); return (file_source == pragha_musicobject_get_source (mobj)); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/mtp/pragha-mtp-musicobject.h���������������������������������������������������0000664�0000000�0000000�00000003477�13435240150�0021770�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_MTP_PLUGIN_H__ #define __PRAGHA_MTP_PLUGIN_H__ #include <libmtp.h> #include "src/pragha-musicobject.h" G_BEGIN_DECLS LIBMTP_track_t *mtp_track_new_from_pragha_musicobject (LIBMTP_mtpdevice_t *mtp_device, PraghaMusicobject *mobj); PraghaMusicobject *pragha_musicobject_new_from_mtp_track (LIBMTP_track_t *track); gint pragha_mtp_plugin_get_track_id (PraghaMusicobject *mobj); gchar *pragha_mtp_plugin_get_temp_filename (PraghaMusicobject *mobj); gboolean pragha_musicobject_is_mtp_file (PraghaMusicobject *mobj); G_END_DECLS #endif /* __PRAGHA_MTP_PLUGIN_H__ */�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/notify/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015747�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/notify/Makefile.am�������������������������������������������������������������0000664�0000000�0000000�00000002272�13435240150�0020006�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/notify AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libnotify.la libnotify_la_SOURCES = \ pragha-notify-plugin.c libnotify_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libnotify_la_CFLAGS = \ $(LIBGLYR_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBNOTIFY_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libnotify_la_LIBADD = \ $(LIBGLYR_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBNOTIFY_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libnotify_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libnotify_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libnotify_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libnotify_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = notify.plugin EXTRA_DIST = $(plugin_DATA) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/notify/notify.plugin�����������������������������������������������������������0000664�0000000�0000000�00000000433�13435240150�0020477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=notify Name=Notification Plugin Description=Show notification when change songs Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/notify/pragha-notify-plugin.c��������������������������������������������������0000664�0000000�0000000�00000030114�13435240150�0022156�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include <libnotify/notify.h> #include "plugins/pragha-plugin-macros.h" #include "src/pragha.h" #include "src/pragha-hig.h" #include "src/pragha-playback.h" #include "src/pragha-utils.h" #include "src/pragha-preferences-dialog.h" #define PRAGHA_TYPE_NOTIFY_PLUGIN (pragha_notify_plugin_get_type ()) #define PRAGHA_NOTIFY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_NOTIFY_PLUGIN, PraghaNotifyPlugin)) #define PRAGHA_NOTIFY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_NOTIFY_PLUGIN, PraghaNotifyPlugin)) #define PRAGHA_IS_NOTIFY_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_NOTIFY_PLUGIN)) #define PRAGHA_IS_NOTIFY_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_NOTIFY_PLUGIN)) #define PRAGHA_NOTIFY_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_NOTIFY_PLUGIN, PraghaNotifyPluginClass)) typedef struct { PraghaApplication *pragha; GtkWidget *setting_widget; NotifyNotification *notify; GtkWidget *album_art_in_osd_w; GtkWidget *actions_in_osd_w; gboolean album_art_in_osd; gboolean actions_in_osd; } PraghaNotifyPluginPrivate; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_NOTIFY_PLUGIN, PraghaNotifyPlugin, pragha_notify_plugin) static gboolean can_support_actions (void) { static gboolean supported; static gboolean have_checked = FALSE; if( !have_checked ){ GList * c; GList * caps = notify_get_server_caps( ); have_checked = TRUE; for( c=caps; c && !supported; c=c->next ) supported = !strcmp( "actions", (char*)c->data ); g_list_free_full( caps, g_free ); } return supported; } static void notify_closed_cb (NotifyNotification *osd, PraghaNotifyPlugin *plugin) { g_object_unref (G_OBJECT(osd)); if (plugin->priv->notify == osd) { plugin->priv->notify = NULL; } } static void notify_Prev_Callback (NotifyNotification *osd, const char *action, PraghaNotifyPlugin *plugin) { PraghaBackend *backend; g_assert (action != NULL); PraghaApplication *pragha = plugin->priv->pragha; backend = pragha_application_get_backend (pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_prev_track(pragha); } static void notify_Next_Callback (NotifyNotification *osd, const char *action, PraghaNotifyPlugin *plugin) { PraghaBackend *backend; g_assert (action != NULL); PraghaApplication *pragha = plugin->priv->pragha; backend = pragha_application_get_backend (pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_next_track(pragha); } void pragha_notify_plugin_show_new_track (PraghaPlaylist *playlist, PraghaMusicobject *mobj, PraghaNotifyPlugin *plugin) { PraghaNotifyPluginPrivate *priv = NULL; PraghaToolbar *toolbar; gchar *summary, *body, *slength; GError *error = NULL; priv = plugin->priv; if (NULL == mobj) return; if (gtk_window_is_active(GTK_WINDOW (pragha_application_get_window(priv->pragha)))) return; const gchar *file = pragha_musicobject_get_file (mobj); const gchar *title = pragha_musicobject_get_title (mobj); const gchar *artist = pragha_musicobject_get_artist (mobj); const gchar *album = pragha_musicobject_get_album (mobj); gint length = pragha_musicobject_get_length (mobj); if(string_is_not_empty(title)) summary = g_strdup(title); else summary = g_path_get_basename(file); slength = convert_length_str(length); body = g_markup_printf_escaped(_("by <b>%s</b> in <b>%s</b> <b>(%s)</b>"), string_is_not_empty(artist) ? artist : _("Unknown Artist"), string_is_not_empty(album) ? album : _("Unknown Album"), slength); /* Create notification instance */ if (priv->notify == NULL) { priv->notify = notify_notification_new(summary, body, NULL); if (can_support_actions() && priv->actions_in_osd) { notify_notification_add_action( priv->notify, "media-skip-backward", _("Previous track"), NOTIFY_ACTION_CALLBACK(notify_Prev_Callback), plugin, NULL); notify_notification_add_action( priv->notify, "media-skip-forward", _("Next track"), NOTIFY_ACTION_CALLBACK(notify_Next_Callback), plugin, NULL); } notify_notification_set_hint (priv->notify, "transient", g_variant_new_boolean (TRUE)); g_signal_connect (priv->notify, "closed", G_CALLBACK (notify_closed_cb), plugin); } else { notify_notification_update (priv->notify, summary, body, NULL); if (!priv->actions_in_osd) notify_notification_clear_actions (priv->notify); } /* Add album art if set */ if (priv->album_art_in_osd) { toolbar = pragha_application_get_toolbar (priv->pragha); notify_notification_set_image_from_pixbuf (priv->notify, pragha_album_art_get_pixbuf (pragha_toolbar_get_album_art(toolbar))); } /* Show OSD */ if (!notify_notification_show (priv->notify, &error)) { g_warning("Unable to show OSD notification: %s", error->message); g_error_free (error); } /* Cleanup */ g_free(summary); g_free(body); g_free(slength); } static void pragha_notify_preferences_dialog_response (GtkDialog *dialog, gint response_id, PraghaNotifyPlugin *plugin) { PraghaPreferences *preferences; gchar *plugin_group = NULL; PraghaNotifyPluginPrivate *priv = plugin->priv; switch(response_id) { case GTK_RESPONSE_CANCEL: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(priv->album_art_in_osd_w), priv->album_art_in_osd); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(priv->actions_in_osd_w), priv->actions_in_osd); break; case GTK_RESPONSE_OK: priv->album_art_in_osd = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->album_art_in_osd_w)); priv->actions_in_osd = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->actions_in_osd_w)); preferences = pragha_preferences_get (); plugin_group = pragha_preferences_get_plugin_group_name(preferences, "notify"); pragha_preferences_set_boolean (preferences, plugin_group, "album_art_in_osd", priv->album_art_in_osd); pragha_preferences_set_boolean (preferences, plugin_group, "actions_in_osd", priv->actions_in_osd); g_object_unref (preferences); g_free (plugin_group); break; default: break; } } static void pragha_notify_plugin_append_setting (PraghaNotifyPlugin *plugin) { PreferencesDialog *dialog; GtkWidget *table, *albumart_in_osd, *actions_in_osd; guint row = 0; PraghaNotifyPluginPrivate *priv = plugin->priv; table = pragha_hig_workarea_table_new (); pragha_hig_workarea_table_add_section_title(table, &row, _("Notifications")); albumart_in_osd = gtk_check_button_new_with_label(_("Show Album art in notifications")); pragha_hig_workarea_table_add_wide_control(table, &row, albumart_in_osd); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(albumart_in_osd), priv->album_art_in_osd); actions_in_osd = gtk_check_button_new_with_label(_("Add actions to change track in notifications")); pragha_hig_workarea_table_add_wide_control(table, &row, actions_in_osd); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(actions_in_osd), priv->actions_in_osd); if (!can_support_actions()) gtk_widget_set_sensitive (actions_in_osd, FALSE); priv->setting_widget = table; priv->album_art_in_osd_w = albumart_in_osd; priv->actions_in_osd_w = actions_in_osd; dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_append_desktop_setting (dialog, table, FALSE); /* Configure handler and settings */ pragha_preferences_dialog_connect_handler (dialog, G_CALLBACK(pragha_notify_preferences_dialog_response), plugin); } static void pragha_notify_plugin_remove_setting (PraghaNotifyPlugin *plugin) { PreferencesDialog *dialog; PraghaNotifyPluginPrivate *priv = plugin->priv; dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_dialog_disconnect_handler (dialog, G_CALLBACK(pragha_notify_preferences_dialog_response), plugin); pragha_preferences_remove_desktop_setting (dialog, priv->setting_widget); } static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaPreferences *preferences; PraghaPlaylist *playlist; gchar *plugin_group = NULL; PraghaNotifyPlugin *plugin = PRAGHA_NOTIFY_PLUGIN (activatable); PraghaNotifyPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Notify plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); notify_init (PACKAGE_NAME); preferences = pragha_application_get_preferences (priv->pragha); plugin_group = pragha_preferences_get_plugin_group_name (preferences, "notify"); if (pragha_preferences_has_group (preferences, plugin_group)) { priv->actions_in_osd = pragha_preferences_get_boolean (preferences, plugin_group, "actions_in_osd"); priv->album_art_in_osd = pragha_preferences_get_boolean (preferences, plugin_group, "album_art_in_osd"); } else { priv->actions_in_osd = TRUE; priv->album_art_in_osd = TRUE; } /* Fix for nofify-osd users */ if (!can_support_actions()) priv->actions_in_osd = FALSE; playlist = pragha_application_get_playlist (priv->pragha); g_signal_connect (playlist, "playlist-set-track", G_CALLBACK(pragha_notify_plugin_show_new_track), plugin); pragha_notify_plugin_append_setting (plugin); g_free (plugin_group); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaPlaylist *playlist; PraghaNotifyPlugin *plugin = PRAGHA_NOTIFY_PLUGIN (activatable); PraghaNotifyPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Notify plugin %s", G_STRFUNC); notify_uninit (); playlist = pragha_application_get_playlist (priv->pragha); g_signal_handlers_disconnect_by_func (playlist, pragha_notify_plugin_show_new_track, plugin); pragha_notify_plugin_remove_setting (plugin); priv->pragha= NULL; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/pragha-plugin-macros.h���������������������������������������������������������0000664�0000000�0000000�00000024043�13435240150�0020633�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- * * Plugin engine for Totem, adapted to Pragha, heavily based on the code from * Rhythmbox, which is based heavily on the code from totem. * * Copyright (C) 2002-2005 Paolo Maggi * 2006 James Livingston <jrl@ids.org.au> * 2007 Bastien Nocera <hadess@hadess.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA. * * Sunday 13th May 2007: Bastien Nocera: Add exception clause. * See license_change file for details. * */ #ifndef __PRAGHA_PLUGIN_H__ #define __PRAGHA_PLUGIN_H__ #include <libpeas/peas-extension-base.h> #include <libpeas/peas-object-module.h> #include <libpeas/peas-activatable.h> #include <libpeas-gtk/peas-gtk-configurable.h> G_BEGIN_DECLS /** * _REGISTER_PUBLIC_HEADER: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * @TYPE_CODE: code to go in the fifth parameter to %G_DEFINE_DYNAMIC_TYPE_EXTENDED * @REGISTER_CODE: code to go in the peas_register_types() exported function * * Registers a plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate and * deactivate functions. **/ #define _REGISTER_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name, TYPE_CODE, REGISTER_CODE) \ typedef struct { \ PeasExtensionBaseClass parent_class; \ } TypeName##Class; \ typedef struct { \ PeasExtensionBase parent; \ TypeName##Private *priv; \ } TypeName; \ GType type_name##_get_type (void) G_GNUC_CONST; /** * _REGISTER_PRIVATE_CODE: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * @TYPE_CODE: code to go in the fifth parameter to %G_DEFINE_DYNAMIC_TYPE_EXTENDED * @REGISTER_CODE: code to go in the peas_register_types() exported function * * Registers a plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate and * deactivate functions. **/ #define _REGISTER_PRIVATE_CODE(TYPE_NAME, TypeName, type_name, TYPE_CODE, REGISTER_CODE) \ static void pragha_plugin_activate (PeasActivatable *plugin); \ static void pragha_plugin_deactivate (PeasActivatable *plugin); \ G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); \ static void peas_activatable_iface_init (PeasActivatableInterface *iface); \ enum { \ PROP_0, \ PROP_OBJECT \ }; \ G_DEFINE_DYNAMIC_TYPE_EXTENDED (TypeName, \ type_name, \ PEAS_TYPE_EXTENSION_BASE, \ 0, \ G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_TYPE_ACTIVATABLE, \ peas_activatable_iface_init) \ TYPE_CODE) \ static void \ peas_activatable_iface_init (PeasActivatableInterface *iface) \ { \ iface->activate = pragha_plugin_activate; \ iface->deactivate = pragha_plugin_deactivate; \ } \ static void \ set_property (GObject *object, \ guint prop_id, \ const GValue *value, \ GParamSpec *pspec) \ { \ switch (prop_id) { \ case PROP_OBJECT: \ g_object_set_data(object, "object", \ g_value_get_object (value)); \ break; \ default: \ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); \ break; \ } \ } \ static void \ get_property (GObject *object, \ guint prop_id, \ GValue *value, \ GParamSpec *pspec) \ { \ switch (prop_id) { \ case PROP_OBJECT: \ g_value_take_object (value, g_object_get_data (object, "object")); \ break; \ default: \ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); \ break; \ } \ } \ static void \ type_name##_class_init (TypeName##Class *klass) \ { \ GObjectClass *object_class = G_OBJECT_CLASS (klass); \ \ object_class->set_property = set_property; \ object_class->get_property = get_property; \ \ g_object_class_override_property (object_class, PROP_OBJECT, "object"); \ g_type_class_add_private (klass, sizeof (TypeName##Private)); \ } \ static void \ type_name##_class_finalize (TypeName##Class *klass) \ { \ } \ static void \ type_name##_init (TypeName *plugin) \ { \ plugin->priv = G_TYPE_INSTANCE_GET_PRIVATE (plugin, TYPE_NAME, TypeName##Private); \ } \ G_MODULE_EXPORT void \ peas_register_types (PeasObjectModule *module) \ { \ type_name##_register_type (G_TYPE_MODULE (module)); \ peas_object_module_register_extension_type (module, \ PEAS_TYPE_ACTIVATABLE, \ TYPE_NAME); \ REGISTER_CODE \ } /** * PRAGHA_PLUGIN_REGISTER_PUBLIC_HEADER: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * * Registers a plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate and * deactivate functions. **/ #define PRAGHA_PLUGIN_REGISTER_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name) \ _REGISTER_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name,,) /** * PRAGHA_PLUGIN_REGISTER_PRIVATE_CODE: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * * Registers a plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate and * deactivate functions. **/ #define PRAGHA_PLUGIN_REGISTER_PRIVATE_CODE(TYPE_NAME, TypeName, type_name) \ _REGISTER_PRIVATE_CODE(TYPE_NAME, TypeName, type_name,,) /** * PRAGHA_PLUGIN_REGISTER: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * * Registers a plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate and * deactivate functions. **/ #define PRAGHA_PLUGIN_REGISTER(TYPE_NAME, TypeName, type_name) \ _REGISTER_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name,,) \ _REGISTER_PRIVATE_CODE(TYPE_NAME, TypeName, type_name,,) /** * PRAGHA_PLUGIN_REGISTER_CONFIGURABLE_PUBLIC_HEADER: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * * Registers a configurable plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate * and deactivate and widget creation functions. **/ #define _REGISTER_CONFIGURABLE_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name) \ _REGISTER_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name, \ (G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE, peas_gtk_configurable_iface_init)), \ peas_object_module_register_extension_type (module, PEAS_GTK_TYPE_CONFIGURABLE, TYPE_NAME);) #define PRAGHA_PLUGIN_REGISTER_CONFIGURABLE_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name) \ _REGISTER_CONFIGURABLE_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name) /** * PRAGHA_PLUGIN_REGISTER_CONFIGURABLE_PRIVATE_CODE: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * * Registers a configurable plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate * and deactivate and widget creation functions. **/ #define _REGISTER_CONFIGURABLE_PRIVATE_CODE(TYPE_NAME, TypeName, type_name) \ static GtkWidget *pragha_plugin_create_configure_widget (PeasGtkConfigurable *configurable); \ static void peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface); \ _REGISTER_PRIVATE_CODE(TYPE_NAME, TypeName, type_name, \ (G_IMPLEMENT_INTERFACE_DYNAMIC (PEAS_GTK_TYPE_CONFIGURABLE, peas_gtk_configurable_iface_init)), \ peas_object_module_register_extension_type (module, PEAS_GTK_TYPE_CONFIGURABLE, TYPE_NAME);) \ static void \ peas_gtk_configurable_iface_init (PeasGtkConfigurableInterface *iface) \ { \ iface->create_configure_widget = pragha_plugin_create_configure_widget; \ } #define PRAGHA_PLUGIN_REGISTER_CONFIGURABLE_PRIVATE_CODE(TYPE_NAME, TypeName, type_name) \ _REGISTER_CONFIGURABLE_PRIVATE_CODE(TYPE_NAME, TypeName, type_name) /** * PRAGHA_PLUGIN_REGISTER_CONFIGURABLE: * @TYPE_NAME: the name of the plugin type, in UPPER_CASE * @TypeName: the name of the plugin type, in CamelCase * @type_name: the name of the plugin type, in lower_case * * Registers a configurable plugin with the Pragha plugin system, including registering the type specified in the parameters and declaring its activate * and deactivate and widget creation functions. **/ #define PRAGHA_PLUGIN_REGISTER_CONFIGURABLE(TYPE_NAME, TypeName, type_name) \ _REGISTER_CONFIGURABLE_PUBLIC_HEADER(TYPE_NAME, TypeName, type_name) \ _REGISTER_CONFIGURABLE_PRIVATE_CODE(TYPE_NAME, TypeName, type_name) G_END_DECLS #endif /* __PRAGHA_PLUGIN_H__ */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/removable-media/���������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0017470�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/removable-media/Makefile.am����������������������������������������������������0000664�0000000�0000000�00000002300�13435240150�0021517�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/removable AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libremovable.la libremovable_la_SOURCES = \ pragha-devices-removable.c libremovable_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libremovable_la_CFLAGS = \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ $(GUDEV_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libremovable_la_LIBADD = \ ../devices/libdeviceclient.la \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) \ $(GUDEV_LIBS) if HAVE_GSTREAMER_AUDIO libremovable_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libremovable_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libremovable_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libremovable_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = removable.plugin EXTRA_DIST = $(plugin_DATA) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/removable-media/pragha-devices-removable.c�������������������������������������0000664�0000000�0000000�00000031743�13435240150�0024500�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <gudev/gudev.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "plugins/pragha-plugin-macros.h" #include "plugins/devices/pragha-devices-plugin.h" #include "plugins/devices/pragha-device-client.h" #include "src/pragha-playback.h" #include "src/pragha-utils.h" #include "src/pragha.h" #define PRAGHA_TYPE_REMOVABLE_PLUGIN (pragha_removable_plugin_get_type ()) #define PRAGHA_REMOVABLE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_REMOVABLE_PLUGIN, PraghaRemovablePlugin)) #define PRAGHA_REMOVABLE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_REMOVABLE_PLUGIN, PraghaRemovablePlugin)) #define PRAGHA_IS_REMOVABLE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_REMOVABLE_PLUGIN)) #define PRAGHA_IS_REMOVABLE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_REMOVABLE_PLUGIN)) #define PRAGHA_REMOVABLE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_REMOVABLE_PLUGIN, PraghaRemovablePluginClass)) typedef struct _PraghaRemovablePluginPrivate PraghaRemovablePluginPrivate; struct _PraghaRemovablePluginPrivate { PraghaApplication *pragha; /* Gudev devie */ guint64 bus_hooked; guint64 device_hooked; GUdevDevice *u_device; /* Gio Volume */ GVolume *volume; /* Mount point. */ gchar *mount_path; }; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_REMOVABLE_PLUGIN, PraghaRemovablePlugin, pragha_removable_plugin) static void pragha_removable_clear_hook_device (PraghaRemovablePlugin *plugin) { PraghaRemovablePluginPrivate *priv = plugin->priv; priv->bus_hooked = 0; priv->device_hooked = 0; if (priv->u_device) { g_object_unref (priv->u_device); priv->u_device = NULL; } if (priv->volume) { g_object_unref (priv->volume); priv->volume = NULL; } if (priv->mount_path) { g_free(priv->mount_path); priv->mount_path = NULL; } } static void pragha_block_device_add_to_library (PraghaRemovablePlugin *plugin, GMount *mount) { PraghaPreferences *preferences; PraghaScanner *scanner; GSList *library_dir = NULL; GFile *mount_point; gchar *mount_path; PraghaRemovablePluginPrivate *priv = plugin->priv; mount_point = g_mount_get_root (mount); mount_path = g_file_get_path (mount_point); preferences = pragha_application_get_preferences (priv->pragha); library_dir = pragha_preferences_get_library_list (preferences); if (!is_present_str_list (mount_path, library_dir)) { library_dir = g_slist_append (library_dir, g_strdup(mount_path)); pragha_preferences_set_filename_list (preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR, library_dir); } priv->mount_path = g_strdup(mount_path); scanner = pragha_application_get_scanner (priv->pragha); pragha_scanner_update_library (scanner); g_object_unref (mount_point); free_str_list(library_dir); g_free (mount_path); } static void pragha_removable_drop_device_from_library (PraghaRemovablePlugin *plugin) { PraghaPreferences *preferences; PraghaScanner *scanner; GSList *library_dir = NULL; PraghaRemovablePluginPrivate *priv = plugin->priv; preferences = pragha_application_get_preferences (priv->pragha); library_dir = pragha_preferences_get_library_list (preferences); if (is_present_str_list (priv->mount_path, library_dir)) { library_dir = delete_from_str_list (priv->mount_path, library_dir); pragha_preferences_set_filename_list (preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR, library_dir); scanner = pragha_application_get_scanner (priv->pragha); pragha_scanner_update_library (scanner); } free_str_list(library_dir); } /* * Some functions to mount block removable. */ /* Decode the ID_FS_LABEL_ENC of block device. * Extentions copy of Thunar-volman code. * http://git.xfce.org/xfce/thunar-volman/tree/thunar-volman/tvm-gio-extensions.c */ static GVolume * tvm_g_volume_monitor_get_volume_for_kind (GVolumeMonitor *monitor, const gchar *kind, const gchar *identifier) { GVolume *volume = NULL; GList *volumes; GList *lp; gchar *value; g_return_val_if_fail (G_IS_VOLUME_MONITOR (monitor), NULL); g_return_val_if_fail (kind != NULL && *kind != '\0', NULL); g_return_val_if_fail (identifier != NULL && *identifier != '\0', NULL); volumes = g_volume_monitor_get_volumes (monitor); for (lp = volumes; volume == NULL && lp != NULL; lp = lp->next) { value = g_volume_get_identifier (lp->data, kind); if (value == NULL) continue; if (g_strcmp0 (value, identifier) == 0) volume = g_object_ref (lp->data); g_free (value); } g_list_foreach (volumes, (GFunc)g_object_unref, NULL); g_list_free (volumes); return volume; } static void pragha_block_device_mount_finish (GVolume *volume, GAsyncResult *result, PraghaRemovablePlugin *plugin) { GtkWidget *dialog; GMount *mount; GError *error = NULL; gchar *name = NULL, *primary = NULL; g_return_if_fail (G_IS_VOLUME (volume)); g_return_if_fail (G_IS_ASYNC_RESULT (result)); /* finish mounting the volume */ if (!g_volume_mount_finish (volume, result, &error)) { if (error->code != G_IO_ERROR_FAILED_HANDLED && error->code != G_IO_ERROR_ALREADY_MOUNTED) { name = g_volume_get_name (G_VOLUME (volume)); primary = g_strdup_printf (_("Unable to access \"%s\""), name); g_free (name); dialog = pragha_gudev_dialog_new (NULL, _("Removable Device"), "media-removable", primary, error->message, NULL, PRAGHA_DEVICE_RESPONSE_NONE); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_widget_show_all (dialog); g_free (primary); } g_error_free (error); } /* get the moint point of the volume */ mount = g_volume_get_mount (volume); if (mount != NULL) { pragha_block_device_add_to_library (plugin, mount); g_object_unref (mount); } g_object_unref (volume); } static void pragha_block_device_mount_device (PraghaRemovablePlugin *plugin) { GMountOperation *mount_operation; PraghaRemovablePluginPrivate *priv = plugin->priv; /* try to mount the volume asynchronously */ mount_operation = gtk_mount_operation_new (NULL); g_volume_mount (priv->volume, G_MOUNT_MOUNT_NONE, mount_operation, NULL, (GAsyncReadyCallback) pragha_block_device_mount_finish, plugin); g_object_unref (mount_operation); } static void pragha_block_device_detected_response (GtkWidget *dialog, gint response, gpointer user_data) { PraghaRemovablePlugin *plugin = user_data; switch (response) { case PRAGHA_DEVICE_RESPONSE_BROWSE: pragha_block_device_mount_device (plugin); break; case PRAGHA_DEVICE_RESPONSE_NONE: pragha_removable_clear_hook_device (plugin); default: break; } gtk_widget_destroy (dialog); } static gboolean pragha_block_device_detected (gpointer data) { GtkWidget *dialog; GVolumeMonitor *monitor; GVolume *volume; gchar *name = NULL, *primary = NULL; PraghaRemovablePlugin *plugin = data; PraghaRemovablePluginPrivate *priv = plugin->priv; /* determine the GVolume corresponding to the udev removable */ monitor = g_volume_monitor_get (); volume = tvm_g_volume_monitor_get_volume_for_kind (monitor, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE, g_udev_device_get_device_file (priv->u_device)); g_object_unref (monitor); /* check if we have a volume */ priv->volume = volume; if (volume == NULL || !g_volume_can_mount (volume)) { pragha_removable_clear_hook_device (plugin); return FALSE; } name = g_volume_get_name (G_VOLUME (volume)); primary = g_strdup_printf (_("Want to manage \"%s\" volume?"), name); g_free (name); dialog = pragha_gudev_dialog_new (NULL, _("Removable Device"), "media-removable", primary, NULL, _("_Update library"), PRAGHA_DEVICE_RESPONSE_BROWSE); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_block_device_detected_response), plugin); gtk_widget_show_all (dialog); g_free (primary); return FALSE; } static void pragha_removable_plugin_device_added (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device, gpointer user_data) { PraghaRemovablePlugin *plugin = user_data; PraghaRemovablePluginPrivate *priv = plugin->priv; if (device_type != PRAGHA_DEVICE_MOUNTABLE) return; priv->bus_hooked = g_udev_device_get_property_as_uint64 (u_device, "BUSNUM"); priv->device_hooked = g_udev_device_get_property_as_uint64 (u_device, "DEVNUM"); priv->u_device = g_object_ref (u_device); priv->volume = NULL; /* * HACK: We're listening udev. Then wait 2 seconds, to ensure that GVolume also detects the device. */ g_timeout_add_seconds(2, pragha_block_device_detected, plugin); } void pragha_removable_plugin_device_removed (PraghaDeviceClient *device_client, PraghaDeviceType device_type, GUdevDevice *u_device, gpointer user_data) { guint64 busnum = 0; guint64 devnum = 0; PraghaRemovablePlugin *plugin = user_data; PraghaRemovablePluginPrivate *priv = plugin->priv; if (!priv->u_device || !priv->mount_path) return; if (device_type != PRAGHA_DEVICE_MOUNTABLE) return; busnum = g_udev_device_get_property_as_uint64(u_device, "BUSNUM"); devnum = g_udev_device_get_property_as_uint64(u_device, "DEVNUM"); if (busnum == priv->bus_hooked && devnum == priv->device_hooked) { pragha_removable_drop_device_from_library (plugin); pragha_removable_clear_hook_device (plugin); } } static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaDeviceClient *device_client; PraghaRemovablePlugin *plugin = PRAGHA_REMOVABLE_PLUGIN (activatable); PraghaRemovablePluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Removable plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); device_client = pragha_device_client_get(); g_signal_connect (G_OBJECT(device_client), "device-added", G_CALLBACK(pragha_removable_plugin_device_added), plugin); g_signal_connect (G_OBJECT(device_client), "device-removed", G_CALLBACK(pragha_removable_plugin_device_removed), plugin); g_object_unref (device_client); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaDeviceClient *device_client; PraghaRemovablePlugin *plugin = PRAGHA_REMOVABLE_PLUGIN (activatable); PraghaRemovablePluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Removable plugin %s", G_STRFUNC); device_client = pragha_device_client_get(); g_signal_handlers_disconnect_by_func (device_client, pragha_removable_plugin_device_added, plugin); g_signal_handlers_disconnect_by_func (device_client, pragha_removable_plugin_device_removed, plugin); g_object_unref (device_client); priv->pragha = NULL; }�����������������������������pragha-1.3.4/plugins/removable-media/removable.plugin�����������������������������������������������0000664�0000000�0000000�00000000447�13435240150�0022671�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=removable Name=Removable media Description=Detect removable media and scan it Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha Depends=devices�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/���������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0016336�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/Makefile.am����������������������������������������������������������0000664�0000000�0000000�00000003060�13435240150�0020371�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/song-info AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libsong-info.la libsong_info_la_SOURCES = \ pragha-song-info-plugin.c \ pragha-song-info-plugin.h \ pragha-song-info-dialog.c \ pragha-song-info-dialog.h \ pragha-song-info-pane.c \ pragha-song-info-pane.h \ pragha-song-info-thread-albumart.c \ pragha-song-info-thread-albumart.h \ pragha-song-info-thread-dialog.c \ pragha-song-info-thread-dialog.h \ pragha-song-info-thread-pane.c \ pragha-song-info-thread-pane.h libsong_info_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libsong_info_la_CFLAGS = \ $(LIBGLYR_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libsong_info_la_LIBADD = \ $(LIBGLYR_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libsong_info_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libsong_info_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libsong_info_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libsong_info_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = song-info.plugin EXTRA_DIST = $(plugin_DATA) ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-dialog.c��������������������������������������������0000664�0000000�0000000�00000007510�13435240150�0023101�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <glyr/glyr.h> #include <glib/gstdio.h> #include "pragha-song-info-dialog.h" #include "src/pragha-simple-widgets.h" /* Use the download info on glyr thread and show a dialog. */ static void pragha_text_info_dialog_response (GtkDialog *dialog, gint response, gpointer data) { gtk_widget_destroy (GTK_WIDGET(dialog)); } void pragha_show_related_text_info_dialog (GtkWidget *widget, const gchar *title_header, const gchar *subtitle_header, const gchar *text) { PraghaHeader *header; GtkWidget *dialog, *vbox, *view, *scrolled; GtkTextBuffer *buffer; view = gtk_text_view_new (); gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE); gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW (view), GTK_WRAP_WORD); gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (view), FALSE); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); gtk_text_buffer_set_text (buffer, text, -1); scrolled = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER (scrolled), view); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(scrolled), GTK_SHADOW_IN); gtk_container_set_border_width (GTK_CONTAINER (scrolled), 8); dialog = gtk_dialog_new_with_buttons (title_header, GTK_WINDOW(widget), GTK_DIALOG_DESTROY_WITH_PARENT, _("_Ok"), GTK_RESPONSE_OK, NULL); gtk_window_set_default_size(GTK_WINDOW (dialog), 450, 350); header = pragha_header_new (); pragha_header_set_title (header, subtitle_header); pragha_header_set_icon_name (header, "media-optical"); vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); gtk_box_pack_start (GTK_BOX(vbox), GTK_WIDGET(header), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(vbox), scrolled, TRUE, TRUE, 0); g_signal_connect (G_OBJECT(dialog), "response", G_CALLBACK(pragha_text_info_dialog_response), NULL); gtk_widget_show_all(dialog); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-dialog.h��������������������������������������������0000664�0000000�0000000�00000003152�13435240150�0023104�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_SONG_INFO_DIALOG_H__ #define __PRAGHA_SONG_INFO_DIALOG_H__ #include <gtk/gtk.h> G_BEGIN_DECLS void pragha_show_related_text_info_dialog (GtkWidget *widget, const gchar *title_header, const gchar *subtitle_header, const gchar *text); G_END_DECLS #endif /* __PRAGHA_SONG_INFO_DIALOG_H__ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-pane.c����������������������������������������������0000664�0000000�0000000�00000021022�13435240150�0022557�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glyr/glyr.h> #include "pragha-song-info-pane.h" #include "src/pragha-utils.h" struct _PraghaSonginfoPane { GtkScrolledWindow parent; /* Text widget */ GtkWidget *text_view; /* Info that show thde pane */ GLYR_GET_TYPE info_type; /* Sidebar widgets */ GtkWidget *pane_title; GtkUIManager *context_menu; }; G_DEFINE_TYPE(PraghaSonginfoPane, pragha_songinfo_pane, GTK_TYPE_SCROLLED_WINDOW) enum { SIGNAL_TYPE_CHANGED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; /* * Menus definitions * **/ static void pragha_songinfo_pane_show_artist_info_action (GtkAction *action, PraghaSonginfoPane *pane); static void pragha_songinfo_pane_show_lyrics_action (GtkAction *action, PraghaSonginfoPane *pane); gchar *songinfo_pane_context_menu_xml = "<ui> \ <popup> \ <menuitem action=\"Artist info\"/> \ <menuitem action=\"Lyrics\"/> \ </popup> \ </ui>"; GtkActionEntry songinfo_pane_context_aentries[] = { {"Artist info", NULL, N_("Artist info"), "", "Artist info", G_CALLBACK(pragha_songinfo_pane_show_artist_info_action)}, {"Lyrics", NULL, N_("Lyrics"), "", "Lyrics", G_CALLBACK(pragha_songinfo_pane_show_lyrics_action)} }; /* * Public Api */ void pragha_songinfo_pane_set_text (PraghaSonginfoPane *pane, const gchar *title, const gchar *text, const gchar *provider) { GtkTextIter iter; GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (pane->text_view)); gtk_text_buffer_set_text (buffer, "", -1); gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER(buffer), &iter); gtk_text_buffer_insert_with_tags_by_name (GTK_TEXT_BUFFER(buffer), &iter, title, -1, "style_bold", "style_large", "margin_top", NULL); gtk_text_buffer_insert (GTK_TEXT_BUFFER(buffer), &iter, "\n\n", -1); gtk_text_buffer_insert (GTK_TEXT_BUFFER(buffer), &iter, text, -1); if (string_is_not_empty(provider)) { gtk_text_buffer_insert (GTK_TEXT_BUFFER(buffer), &iter, "\n\n", -1); gtk_text_buffer_insert (GTK_TEXT_BUFFER(buffer), &iter, _("Thanks to "), -1); gtk_text_buffer_insert_with_tags_by_name (GTK_TEXT_BUFFER(buffer), &iter, provider, -1, "style_bold", "style_italic", NULL); } } void pragha_songinfo_pane_clear_text (PraghaSonginfoPane *pane) { GtkTextBuffer *buffer; buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (pane->text_view)); gtk_text_buffer_set_text (buffer, "", -1); } GtkWidget * pragha_songinfo_pane_get_pane_title (PraghaSonginfoPane *pane) { return pane->pane_title; } GtkMenu * pragha_songinfo_pane_get_popup_menu (PraghaSonginfoPane *pane) { return GTK_MENU(gtk_ui_manager_get_widget(pane->context_menu, "/popup")); } GtkUIManager * pragha_songinfo_pane_get_pane_context_menu (PraghaSonginfoPane *pane) { return pane->context_menu; } GLYR_GET_TYPE pragha_songinfo_pane_get_default_view (PraghaSonginfoPane *pane) { return pane->info_type; } /* * Private */ /* Menus */ static void pragha_songinfo_pane_show_artist_info_action (GtkAction *action, PraghaSonginfoPane *pane) { gtk_label_set_text (GTK_LABEL(pane->pane_title), _("Artist info")); pane->info_type = GLYR_GET_ARTIST_BIO; g_signal_emit (pane, signals[SIGNAL_TYPE_CHANGED], 0); } static void pragha_songinfo_pane_show_lyrics_action (GtkAction *action, PraghaSonginfoPane *pane) { gtk_label_set_text (GTK_LABEL(pane->pane_title), _("Lyrics")); pane->info_type = GLYR_GET_LYRICS; g_signal_emit (pane, signals[SIGNAL_TYPE_CHANGED], 0); } /* Construction */ static GtkUIManager * pragha_songinfo_pane_context_menu_new (PraghaSonginfoPane *pane) { GtkUIManager *context_menu = NULL; GtkActionGroup *context_actions; GError *error = NULL; context_actions = gtk_action_group_new ("Header Songinfo Pane Context Actions"); context_menu = gtk_ui_manager_new (); gtk_action_group_set_translation_domain (context_actions, GETTEXT_PACKAGE); if (!gtk_ui_manager_add_ui_from_string (context_menu, songinfo_pane_context_menu_xml, -1, &error)) { g_critical ("(%s): Unable to create header songinfo tree context menu, err : %s", __func__, error->message); } gtk_action_group_add_actions (context_actions, songinfo_pane_context_aentries, G_N_ELEMENTS(songinfo_pane_context_aentries), (gpointer) pane); gtk_ui_manager_insert_action_group (context_menu, context_actions, 0); g_object_unref (context_actions); return context_menu; } static void pragha_songinfo_pane_finalize (GObject *object) { PraghaSonginfoPane *pane = PRAGHA_SONGINFO_PANE (object); g_object_unref (pane->context_menu); (*G_OBJECT_CLASS (pragha_songinfo_pane_parent_class)->finalize) (object); } static void pragha_songinfo_pane_init (PraghaSonginfoPane *pane) { GtkWidget *view; GtkTextBuffer *buffer; view = gtk_text_view_new (); gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD); gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (view), FALSE); g_object_set (view, "left-margin", 4, "right-margin", 4, NULL); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); gtk_text_buffer_create_tag(GTK_TEXT_BUFFER(buffer), "style_bold", "weight", PANGO_WEIGHT_BOLD, NULL); gtk_text_buffer_create_tag(GTK_TEXT_BUFFER(buffer), "style_large", "scale", PANGO_SCALE_X_LARGE, NULL); gtk_text_buffer_create_tag(GTK_TEXT_BUFFER(buffer), "style_italic", "style", PANGO_STYLE_ITALIC, NULL); gtk_text_buffer_create_tag(GTK_TEXT_BUFFER(buffer), "margin_top", "pixels-above-lines", 2, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (pane), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(pane), GTK_SHADOW_IN); gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW(pane), NULL); gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW(pane), NULL); gtk_container_add (GTK_CONTAINER (pane), view); gtk_widget_show_all (GTK_WIDGET(pane)); pane->pane_title = gtk_label_new (_("Lyrics")); gtk_misc_set_alignment (GTK_MISC(pane->pane_title), 0.0, 0.5); pane->context_menu = pragha_songinfo_pane_context_menu_new(pane); pane->text_view = view; pane->info_type = GLYR_GET_LYRICS; } static void pragha_songinfo_pane_class_init (PraghaSonginfoPaneClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = pragha_songinfo_pane_finalize; signals[SIGNAL_TYPE_CHANGED] = g_signal_new ("type-changed", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaSonginfoPaneClass, type_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } PraghaSonginfoPane * pragha_songinfo_pane_new (void) { return g_object_new (PRAGHA_TYPE_SONGINFO_PANE, NULL); }��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-pane.h����������������������������������������������0000664�0000000�0000000�00000006135�13435240150�0022574�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SONGINFO_PANE_H #define PRAGHA_SONGINFO_PANE_H #include <gtk/gtk.h> #include <glib-object.h> G_BEGIN_DECLS #define PRAGHA_TYPE_SONGINFO_PANE (pragha_songinfo_pane_get_type ()) #define PRAGHA_SONGINFO_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SONGINFO_PANE, PraghaSonginfoPane)) #define PRAGHA_IS_SONGINFO_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_SONGINFO_PANE)) #define PRAGHA_SONGINFO_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_SONGINFO_PANE, PraghaSonginfoPaneClass)) #define PRAGHA_IS_SONGINFO_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_SONGINFO_PANE)) #define PRAGHA_SONGINFO_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_SONGINFO_PANE, PraghaSonginfoPaneClass)) typedef struct _PraghaSonginfoPane PraghaSonginfoPane; typedef struct { GtkScrolledWindowClass __parent__; void (*type_changed) (PraghaSonginfoPane *pane); } PraghaSonginfoPaneClass; void pragha_songinfo_pane_set_text (PraghaSonginfoPane *pane, const gchar *title, const gchar *text, const gchar *provider); void pragha_songinfo_pane_clear_text (PraghaSonginfoPane *pane); GtkWidget *pragha_songinfo_pane_get_pane_title (PraghaSonginfoPane *pane); GtkMenu *pragha_songinfo_pane_get_popup_menu (PraghaSonginfoPane *pane); GtkUIManager *pragha_songinfo_pane_get_pane_context_menu (PraghaSonginfoPane *pane); GLYR_GET_TYPE pragha_songinfo_pane_get_default_view (PraghaSonginfoPane *pane); PraghaSonginfoPane *pragha_songinfo_pane_new (void); G_END_DECLS #endif /* PRAGHA_SONGINFO_H */�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-plugin.c��������������������������������������������0000664�0000000�0000000�00000040332�13435240150�0023137�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <glyr/glyr.h> #include <glyr/cache.h> #include <glib/gstdio.h> #include <libpeas/peas.h> #include <libpeas-gtk/peas-gtk.h> #include "plugins/pragha-plugin-macros.h" #include "pragha-song-info-plugin.h" #include "pragha-song-info-dialog.h" #include "pragha-song-info-pane.h" #include "pragha-song-info-thread-albumart.h" #include "pragha-song-info-thread-dialog.h" #include "pragha-song-info-thread-pane.h" #include "src/pragha.h" #include "src/pragha-hig.h" #include "src/pragha-playback.h" #include "src/pragha-sidebar.h" #include "src/pragha-simple-async.h" #include "src/pragha-simple-widgets.h" #include "src/pragha-preferences-dialog.h" #include "src/pragha-utils.h" struct _PraghaSongInfoPluginPrivate { PraghaApplication *pragha; GtkWidget *setting_widget; PraghaSonginfoPane *pane; GlyrDatabase *cache_db; gboolean download_album_art; GtkWidget *download_album_art_w; GtkActionGroup *action_group_playlist; guint merge_id_playlist; GCancellable *pane_search; }; PRAGHA_PLUGIN_REGISTER_PRIVATE_CODE (PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPlugin, pragha_song_info_plugin) /* * Popups */ static void get_lyric_current_playlist_action (GtkAction *action, PraghaSongInfoPlugin *plugin); static void get_artist_info_current_playlist_action (GtkAction *action, PraghaSongInfoPlugin *plugin); static const GtkActionEntry playlist_actions [] = { {"Search lyric", NULL, N_("Search _lyric"), "", "Search lyric", G_CALLBACK(get_lyric_current_playlist_action)}, {"Search artist info", NULL, N_("Search _artist info"), "", "Search artist info", G_CALLBACK(get_artist_info_current_playlist_action)}, }; static const gchar *playlist_xml = "<ui> \ <popup name=\"SelectionPopup\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-glyr-placeholder\"> \ <menuitem action=\"Search lyric\"/> \ <menuitem action=\"Search artist info\"/> \ <separator/> \ </placeholder> \ </menu> \ </popup> \ </ui>"; /* * Action on playlist that show a dialog */ static void get_artist_info_current_playlist_action (GtkAction *action, PraghaSongInfoPlugin *plugin) { PraghaPlaylist *playlist; PraghaMusicobject *mobj; const gchar *artist = NULL; PraghaApplication *pragha = NULL; pragha = plugin->priv->pragha; playlist = pragha_application_get_playlist (pragha); mobj = pragha_playlist_get_selected_musicobject (playlist); artist = pragha_musicobject_get_artist (mobj); CDEBUG(DBG_INFO, "Get Artist info Action of current playlist selection"); if (string_is_empty(artist)) return; pragha_songinfo_plugin_get_info_to_dialog (plugin, GLYR_GET_ARTISTBIO, artist, NULL); } static void get_lyric_current_playlist_action (GtkAction *action, PraghaSongInfoPlugin *plugin) { PraghaPlaylist *playlist; PraghaMusicobject *mobj; const gchar *artist = NULL; const gchar *title = NULL; PraghaApplication *pragha = NULL; pragha = plugin->priv->pragha; playlist = pragha_application_get_playlist (pragha); mobj = pragha_playlist_get_selected_musicobject (playlist); artist = pragha_musicobject_get_artist (mobj); title = pragha_musicobject_get_title (mobj); CDEBUG(DBG_INFO, "Get lyrics Action of current playlist selection."); if (string_is_empty(artist) || string_is_empty(title)) return; pragha_songinfo_plugin_get_info_to_dialog (plugin, GLYR_GET_LYRICS, artist, title); } /* * Handlers depending on backend status */ static void related_get_album_art_handler (PraghaSongInfoPlugin *plugin) { PraghaBackend *backend; PraghaArtCache *art_cache; PraghaMusicobject *mobj; const gchar *artist = NULL; const gchar *album = NULL; gchar *album_art_path; CDEBUG(DBG_INFO, "Get album art handler"); backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; mobj = pragha_backend_get_musicobject (backend); artist = pragha_musicobject_get_artist (mobj); album = pragha_musicobject_get_album (mobj); if (string_is_empty(artist) || string_is_empty(album)) return; art_cache = pragha_application_get_art_cache (plugin->priv->pragha); album_art_path = pragha_art_cache_get_uri (art_cache, artist, album); if (album_art_path) goto exists; pragha_songinfo_plugin_get_album_art (plugin, artist, album); exists: g_free(album_art_path); } static void cancel_pane_search (PraghaSongInfoPlugin *plugin) { PraghaSongInfoPluginPrivate *priv = plugin->priv; if (priv->pane_search) { g_cancellable_cancel (priv->pane_search); g_object_unref (priv->pane_search); priv->pane_search = NULL; } } static void related_get_song_info_pane_handler (PraghaSongInfoPlugin *plugin) { PraghaSongInfoPluginPrivate *priv = plugin->priv; PraghaBackend *backend; PraghaMusicobject *mobj; const gchar *artist = NULL; const gchar *title = NULL; const gchar *filename = NULL; CDEBUG (DBG_INFO, "Get song info handler"); backend = pragha_application_get_backend (plugin->priv->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) { pragha_songinfo_pane_clear_text (plugin->priv->pane); return; } mobj = pragha_backend_get_musicobject (backend); artist = pragha_musicobject_get_artist (mobj); title = pragha_musicobject_get_title (mobj); filename = pragha_musicobject_get_file (mobj); if (string_is_empty(artist) || string_is_empty(title)) return; cancel_pane_search (plugin); priv->pane_search = pragha_songinfo_plugin_get_info_to_pane (plugin, pragha_songinfo_pane_get_default_view(plugin->priv->pane), artist, title, filename); } static void pragha_song_info_get_info (gpointer data) { PraghaSongInfoPlugin *plugin = data; PraghaSongInfoPluginPrivate *priv = plugin->priv; if (priv->download_album_art) related_get_album_art_handler (plugin); if (gtk_widget_is_visible(GTK_WIDGET(priv->pane))) related_get_song_info_pane_handler (plugin); } static void backend_changed_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data) { PraghaMusicSource file_source = FILE_NONE; PraghaBackendState state = 0; PraghaSongInfoPlugin *plugin = user_data; cancel_pane_search (plugin); state = pragha_backend_get_state (backend); CDEBUG(DBG_INFO, "Configuring thread to get the cover art"); if (state == ST_STOPPED) pragha_songinfo_pane_clear_text (plugin->priv->pane); if (state != ST_PLAYING) return; file_source = pragha_musicobject_get_source (pragha_backend_get_musicobject (backend)); if (file_source == FILE_NONE) { pragha_songinfo_pane_clear_text (plugin->priv->pane); return; } pragha_song_info_get_info (plugin); } /* * Update handlers */ static void pragha_songinfo_pane_type_changed (PraghaSonginfoPane *pane, PraghaSongInfoPlugin *plugin) { related_get_song_info_pane_handler (plugin); } static void pragha_songinfo_pane_visibility_changed (PraghaPreferences *preferences, GParamSpec *pspec, PraghaSongInfoPlugin *plugin) { if (pragha_preferences_get_secondary_lateral_panel (preferences)) related_get_song_info_pane_handler (plugin); } /* * Public api */ GlyrDatabase * pragha_songinfo_plugin_get_cache (PraghaSongInfoPlugin *plugin) { PraghaSongInfoPluginPrivate *priv = plugin->priv; return priv->cache_db; } PraghaSonginfoPane * pragha_songinfo_plugin_get_pane (PraghaSongInfoPlugin *plugin) { PraghaSongInfoPluginPrivate *priv = plugin->priv; return priv->pane; } PraghaApplication * pragha_songinfo_plugin_get_application (PraghaSongInfoPlugin *plugin) { PraghaSongInfoPluginPrivate *priv = plugin->priv; return priv->pragha; } /* * Preferences plugin */ static void pragha_songinfo_preferences_dialog_response (GtkDialog *dialog, gint response_id, PraghaSongInfoPlugin *plugin) { PraghaPreferences *preferences; gchar *plugin_group = NULL; PraghaSongInfoPluginPrivate *priv = plugin->priv; switch(response_id) { case GTK_RESPONSE_CANCEL: gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(priv->download_album_art_w), priv->download_album_art); break; case GTK_RESPONSE_OK: priv->download_album_art = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(priv->download_album_art_w)); preferences = pragha_preferences_get (); plugin_group = pragha_preferences_get_plugin_group_name(preferences, "song-info"); pragha_preferences_set_boolean (preferences, plugin_group, "DownloadAlbumArt", priv->download_album_art); g_object_unref (preferences); g_free (plugin_group); break; default: break; } } static void pragha_songinfo_plugin_append_setting (PraghaSongInfoPlugin *plugin) { PreferencesDialog *dialog; PraghaPreferences *preferences = NULL; gchar *plugin_group = NULL; GtkWidget *table, *download_album_art_w; guint row = 0; PraghaSongInfoPluginPrivate *priv = plugin->priv; table = pragha_hig_workarea_table_new (); pragha_hig_workarea_table_add_section_title(table, &row, _("Song Information")); download_album_art_w = gtk_check_button_new_with_label (_("Download the album art while playing their songs.")); pragha_hig_workarea_table_add_wide_control (table, &row, download_album_art_w); preferences = pragha_preferences_get (); plugin_group = pragha_preferences_get_plugin_group_name(preferences, "song-info"); priv->download_album_art = pragha_preferences_get_boolean (preferences, plugin_group, "DownloadAlbumArt"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(download_album_art_w), priv->download_album_art); priv->setting_widget = table; priv->download_album_art_w = download_album_art_w; dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_append_services_setting (dialog, table, FALSE); pragha_preferences_dialog_connect_handler (dialog, G_CALLBACK(pragha_songinfo_preferences_dialog_response), plugin); g_object_unref (G_OBJECT (preferences)); g_free (plugin_group); } static void pragha_songinfo_plugin_remove_setting (PraghaSongInfoPlugin *plugin) { PreferencesDialog *dialog; PraghaSongInfoPluginPrivate *priv = plugin->priv; dialog = pragha_application_get_preferences_dialog (priv->pragha); pragha_preferences_dialog_disconnect_handler (dialog, G_CALLBACK(pragha_songinfo_preferences_dialog_response), plugin); pragha_preferences_remove_services_setting (dialog, priv->setting_widget); } /* * Plugin */ static void pragha_plugin_activate (PeasActivatable *activatable) { PraghaPreferences *preferences; PraghaPlaylist *playlist; PraghaSidebar *sidebar; gchar *cache_folder = NULL; PraghaSongInfoPlugin *plugin = PRAGHA_SONG_INFO_PLUGIN (activatable); PraghaSongInfoPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "Song-info plugin %s", G_STRFUNC); priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); glyr_init (); cache_folder = g_build_path (G_DIR_SEPARATOR_S, g_get_user_cache_dir (), "pragha", NULL); g_mkdir_with_parents (cache_folder, S_IRWXU); priv->cache_db = glyr_db_init (cache_folder); g_free (cache_folder); /* Attach Playlist popup menu*/ priv->action_group_playlist = gtk_action_group_new ("PraghaGlyrPlaylistActions"); gtk_action_group_set_translation_domain (priv->action_group_playlist, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_playlist, playlist_actions, G_N_ELEMENTS (playlist_actions), plugin); playlist = pragha_application_get_playlist (priv->pragha); priv->merge_id_playlist = pragha_playlist_append_plugin_action (playlist, priv->action_group_playlist, playlist_xml); /* Create the pane and attach it */ priv->pane = pragha_songinfo_pane_new (); sidebar = pragha_application_get_second_sidebar (priv->pragha); pragha_sidebar_attach_plugin (sidebar, GTK_WIDGET (priv->pane), pragha_songinfo_pane_get_pane_title (priv->pane), pragha_songinfo_pane_get_popup_menu (priv->pane)); /* Connect signals */ g_signal_connect (pragha_application_get_backend (priv->pragha), "notify::state", G_CALLBACK (backend_changed_state_cb), plugin); backend_changed_state_cb (pragha_application_get_backend (priv->pragha), NULL, plugin); preferences = pragha_application_get_preferences (priv->pragha); g_signal_connect (G_OBJECT(preferences), "notify::secondary-lateral-panel", G_CALLBACK(pragha_songinfo_pane_visibility_changed), plugin); g_signal_connect (G_OBJECT(priv->pane), "type-changed", G_CALLBACK(pragha_songinfo_pane_type_changed), plugin); /* Default values */ pragha_songinfo_plugin_append_setting (plugin); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaApplication *pragha = NULL; PraghaPreferences *preferences; PraghaPlaylist *playlist; PraghaSidebar *sidebar; gchar *plugin_group = NULL; PraghaSongInfoPlugin *plugin = PRAGHA_SONG_INFO_PLUGIN (activatable); PraghaSongInfoPluginPrivate *priv = plugin->priv; pragha = plugin->priv->pragha; CDEBUG(DBG_PLUGIN, "SongInfo plugin %s", G_STRFUNC); g_signal_handlers_disconnect_by_func (pragha_application_get_backend (pragha), backend_changed_state_cb, plugin); playlist = pragha_application_get_playlist (pragha); pragha_playlist_remove_plugin_action (playlist, priv->action_group_playlist, priv->merge_id_playlist); priv->merge_id_playlist = 0; preferences = pragha_application_get_preferences (pragha); g_signal_handlers_disconnect_by_func (G_OBJECT(preferences), pragha_songinfo_pane_visibility_changed, plugin); g_signal_handlers_disconnect_by_func (G_OBJECT(preferences), pragha_songinfo_pane_type_changed, plugin); plugin_group = pragha_preferences_get_plugin_group_name (preferences, "song-info"); if (!pragha_plugins_is_shutdown(pragha_application_get_plugins_engine(priv->pragha))) { pragha_preferences_remove_group (preferences, plugin_group); } g_free (plugin_group); sidebar = pragha_application_get_second_sidebar (priv->pragha); pragha_sidebar_remove_plugin (sidebar, GTK_WIDGET(priv->pane)); pragha_songinfo_plugin_remove_setting (plugin); glyr_db_destroy (priv->cache_db); glyr_cleanup (); priv->pragha = NULL; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-plugin.h��������������������������������������������0000664�0000000�0000000�00000005373�13435240150�0023152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #ifndef PRAGHA_SONGINFO_PLUGIN_H #define PRAGHA_SONGINFO_PLUGIN_H #include <gtk/gtk.h> #include <glib-object.h> #include <glyr/cache.h> #include "pragha-song-info-pane.h" #include "src/pragha.h" #include "plugins/pragha-plugin-macros.h" G_BEGIN_DECLS #define PRAGHA_TYPE_SONG_INFO_PLUGIN (pragha_song_info_plugin_get_type ()) #define PRAGHA_SONG_INFO_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPlugin)) #define PRAGHA_SONG_INFO_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPlugin)) #define PRAGHA_IS_SONG_INFO_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_SONG_INFO_PLUGIN)) #define PRAGHA_IS_SONG_INFO_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_SONG_INFO_PLUGIN)) #define PRAGHA_SONG_INFO_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPluginClass)) typedef struct _PraghaSongInfoPluginPrivate PraghaSongInfoPluginPrivate; PRAGHA_PLUGIN_REGISTER_PUBLIC_HEADER (PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPlugin, pragha_song_info_plugin) PraghaApplication *pragha_songinfo_plugin_get_application (PraghaSongInfoPlugin *plugin); GlyrDatabase *pragha_songinfo_plugin_get_cache (PraghaSongInfoPlugin *plugin); PraghaSonginfoPane *pragha_songinfo_plugin_get_pane (PraghaSongInfoPlugin *plugin); G_END_DECLS #endif /* PRAGHA_SONGINFO_PLUGIN_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-thread-albumart.c�����������������������������������0000664�0000000�0000000�00000006617�13435240150�0024725�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glyr/glyr.h> #include "pragha-song-info-plugin.h" #include "pragha-song-info-pane.h" #include "src/pragha-simple-async.h" typedef struct { PraghaSongInfoPlugin *plugin; GlyrQuery query; GlyrMemCache *head; } glyr_struct; /* Save the downloaded album art in cache, and updates the gui.*/ static void glyr_finished_successfully (glyr_struct *glyr_info) { PraghaApplication *pragha; PraghaArtCache *art_cache; const gchar *artist = NULL, *album = NULL; pragha = pragha_songinfo_plugin_get_application (glyr_info->plugin); artist = glyr_info->query.artist; album = glyr_info->query.album; art_cache = pragha_application_get_art_cache (pragha); if (glyr_info->head->data) pragha_art_cache_put (art_cache, artist, album, glyr_info->head->data, glyr_info->head->size); glyr_free_list(glyr_info->head); } /* * Final threads */ static gboolean glyr_finished_thread_update (gpointer data) { glyr_struct *glyr_info = data; if (glyr_info->head != NULL) glyr_finished_successfully (glyr_info); glyr_query_destroy (&glyr_info->query); g_slice_free (glyr_struct, glyr_info); return FALSE; } /* Get artist bio or lyric on a thread. */ static gpointer get_related_info_idle_func (gpointer data) { GlyrMemCache *head; GLYR_ERROR error; glyr_struct *glyr_info = data; head = glyr_get (&glyr_info->query, &error, NULL); glyr_info->head = head; return glyr_info; } void pragha_songinfo_plugin_get_album_art (PraghaSongInfoPlugin *plugin, const gchar *artist, const gchar *album) { glyr_struct *glyr_info; CDEBUG(DBG_INFO, "Get album art handler"); glyr_info = g_slice_new0 (glyr_struct); glyr_query_init(&glyr_info->query); glyr_opt_type (&glyr_info->query, GLYR_GET_COVERART); glyr_opt_from (&glyr_info->query, "lastfm;musicbrainz"); glyr_opt_artist (&glyr_info->query, artist); glyr_opt_album (&glyr_info->query, album); glyr_info->plugin = plugin; pragha_async_launch (get_related_info_idle_func, glyr_finished_thread_update, glyr_info); } �����������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-thread-albumart.h�����������������������������������0000664�0000000�0000000�00000003206�13435240150�0024721�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SONGINFO_THREAD_ALBUMART_H #define PRAGHA_SONGINFO_THREAD_ALBUMART_H #include <glib.h> #include <glyr/glyr.h> #include "pragha-song-info-plugin.h" G_BEGIN_DECLS void pragha_songinfo_plugin_get_album_art (PraghaSongInfoPlugin *plugin, const gchar *artist, const gchar *album_art); G_END_DECLS #endif /* PRAGHA_SONGINFO_THREAD_ALBUMART_H */������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-thread-dialog.c�������������������������������������0000664�0000000�0000000�00000012600�13435240150�0024342�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glyr/glyr.h> #include "pragha-song-info-plugin.h" #include "pragha-song-info-dialog.h" #include "pragha-song-info-pane.h" #include "src/pragha-simple-async.h" #include "src/pragha-utils.h" typedef struct { PraghaSongInfoPlugin *plugin; GlyrQuery query; GlyrMemCache *head; } glyr_struct; static void glyr_finished_successfully (glyr_struct *glyr_info) { PraghaApplication *pragha; GtkWidget *window; gchar *title_header = NULL, *subtitle_header = NULL; pragha = pragha_songinfo_plugin_get_application (glyr_info->plugin); switch (glyr_info->head->type) { case GLYR_TYPE_LYRICS: window = pragha_application_get_window (pragha); title_header = g_strdup_printf(_("Lyrics thanks to %s"), glyr_info->head->prov); subtitle_header = g_markup_printf_escaped (_("%s <small><span weight=\"light\">by</span></small> %s"), glyr_info->query.title, glyr_info->query.artist); pragha_show_related_text_info_dialog (window, title_header, subtitle_header, glyr_info->head->data); break; case GLYR_TYPE_ARTIST_BIO: window = pragha_application_get_window (pragha); title_header = g_strdup_printf(_("Artist info")); subtitle_header = g_strdup_printf(_("%s <small><span weight=\"light\">thanks to</span></small> %s"), glyr_info->query.artist, glyr_info->head->prov); pragha_show_related_text_info_dialog (window, title_header, subtitle_header, glyr_info->head->data); break; case GLYR_TYPE_COVERART: default: break; } g_free(title_header); g_free(subtitle_header); glyr_free_list(glyr_info->head); } static void glyr_finished_incorrectly(glyr_struct *glyr_info) { PraghaStatusbar *statusbar = pragha_statusbar_get (); switch (glyr_info->query.type) { case GLYR_GET_LYRICS: pragha_statusbar_set_misc_text (statusbar, _("Lyrics not found.")); break; case GLYR_GET_ARTIST_BIO: pragha_statusbar_set_misc_text (statusbar, _("Artist information not found.")); break; case GLYR_GET_COVERART: default: break; } g_object_unref (statusbar); } /* * Final threads */ static gboolean glyr_finished_thread_update (gpointer data) { PraghaApplication *pragha; GtkWidget *window; glyr_struct *glyr_info = data; pragha = pragha_songinfo_plugin_get_application (glyr_info->plugin); window = pragha_application_get_window (pragha); remove_watch_cursor (window); if(glyr_info->head != NULL) glyr_finished_successfully (glyr_info); else glyr_finished_incorrectly (glyr_info); glyr_query_destroy (&glyr_info->query); g_slice_free (glyr_struct, glyr_info); return FALSE; } /* Get artist bio or lyric on a thread. */ static gpointer get_related_info_idle_func (gpointer data) { GlyrMemCache *head; GLYR_ERROR error; glyr_struct *glyr_info = data; head = glyr_get (&glyr_info->query, &error, NULL); glyr_info->head = head; return glyr_info; } void pragha_songinfo_plugin_get_info_to_dialog (PraghaSongInfoPlugin *plugin, GLYR_GET_TYPE type, const gchar *artist, const gchar *title) { PraghaApplication *pragha; GtkWidget *window; GlyrDatabase *cache_db; glyr_struct *glyr_info; glyr_info = g_slice_new0 (glyr_struct); glyr_query_init (&glyr_info->query); glyr_opt_type (&glyr_info->query, type); switch (type) { case GLYR_GET_ARTIST_BIO: glyr_opt_artist(&glyr_info->query, artist); glyr_opt_lang (&glyr_info->query, "auto"); glyr_opt_lang_aware_only (&glyr_info->query, TRUE); break; case GLYR_GET_LYRICS: glyr_opt_artist(&glyr_info->query, artist); glyr_opt_title(&glyr_info->query, title); break; default: break; } cache_db = pragha_songinfo_plugin_get_cache (plugin); glyr_opt_lookup_db (&glyr_info->query, cache_db); glyr_opt_db_autowrite (&glyr_info->query, TRUE); glyr_info->plugin = plugin; pragha = pragha_songinfo_plugin_get_application (plugin); window = pragha_application_get_window (pragha); set_watch_cursor (window); pragha_async_launch (get_related_info_idle_func, glyr_finished_thread_update, glyr_info); } ��������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-thread-dialog.h�������������������������������������0000664�0000000�0000000�00000003322�13435240150�0024350�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SONGINFO_THREAD_DIALOG_H #define PRAGHA_SONGINFO_THREAD_DIALOG_H #include <glib.h> #include <glyr/glyr.h> #include "pragha-song-info-plugin.h" G_BEGIN_DECLS void pragha_songinfo_plugin_get_info_to_dialog (PraghaSongInfoPlugin *plugin, GLYR_GET_TYPE type, const gchar *artist, const gchar *title); G_END_DECLS #endif /* PRAGHA_SONGINFO_THREAD_DIALOG_H */��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-thread-pane.c���������������������������������������0000664�0000000�0000000�00000014620�13435240150�0024032�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glyr/glyr.h> #include "pragha-song-info-plugin.h" #include "pragha-song-info-pane.h" #include "src/pragha-simple-async.h" typedef struct { PraghaSongInfoPlugin *plugin; GCancellable *cancellable; gulong cancel_id; gchar *filename; GlyrQuery query; GlyrMemCache *head; } glyr_struct; /* * Function to check if has the last */ static gboolean glyr_finished_thread_is_current_song (PraghaSongInfoPlugin *plugin, const gchar *filename) { PraghaApplication *pragha; PraghaBackend *backend; PraghaMusicobject *mobj; const gchar *current_filename = NULL; pragha = pragha_songinfo_plugin_get_application (plugin); backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return FALSE; mobj = pragha_backend_get_musicobject (backend); current_filename = pragha_musicobject_get_file (mobj); if (g_ascii_strcasecmp(filename, current_filename)) return FALSE; return TRUE; } /* * Threads */ static void glyr_finished_successfully_pane (glyr_struct *glyr_info) { PraghaSonginfoPane *pane; switch (glyr_info->head->type) { case GLYR_TYPE_LYRICS: pane = pragha_songinfo_plugin_get_pane (glyr_info->plugin); pragha_songinfo_pane_set_text (pane, glyr_info->query.title, glyr_info->head->data, glyr_info->head->prov); break; case GLYR_TYPE_ARTIST_BIO: pane = pragha_songinfo_plugin_get_pane (glyr_info->plugin); pragha_songinfo_pane_set_text (pane,glyr_info->query.artist, glyr_info->head->data, glyr_info->head->prov); break; case GLYR_TYPE_COVERART: default: break; } } static void glyr_finished_incorrectly_pane (glyr_struct *glyr_info) { PraghaSonginfoPane *pane; switch (glyr_info->query.type) { case GLYR_GET_LYRICS: pane = pragha_songinfo_plugin_get_pane (glyr_info->plugin); pragha_songinfo_pane_set_text (pane, glyr_info->query.title, _("Lyrics not found."), ""); break; case GLYR_GET_ARTIST_BIO: pane = pragha_songinfo_plugin_get_pane (glyr_info->plugin); pragha_songinfo_pane_set_text (pane, glyr_info->query.artist, _("Artist information not found."), ""); break; case GLYR_GET_COVERART: default: break; } } static gboolean glyr_finished_thread_update_pane (gpointer data) { glyr_struct *glyr_info = data; if (g_cancellable_is_cancelled (glyr_info->cancellable)) goto old_thread; if (!glyr_finished_thread_is_current_song(glyr_info->plugin, glyr_info->filename)) goto old_thread; if (glyr_info->head != NULL) glyr_finished_successfully_pane (glyr_info); else glyr_finished_incorrectly_pane (glyr_info); old_thread: g_cancellable_disconnect (glyr_info->cancellable, glyr_info->cancel_id); g_object_unref (glyr_info->cancellable); if (glyr_info->head != NULL) glyr_free_list (glyr_info->head); glyr_query_destroy (&glyr_info->query); g_free (glyr_info->filename); g_slice_free (glyr_struct, glyr_info); return FALSE; } static gpointer get_related_info_idle_func (gpointer data) { GlyrMemCache *head; GLYR_ERROR error; glyr_struct *glyr_info = data; head = glyr_get (&glyr_info->query, &error, NULL); glyr_info->head = head; return glyr_info; } static void search_cancelled (GCancellable *cancellable, gpointer user_data) { GlyrQuery *query = user_data; glyr_signal_exit (query); } GCancellable * pragha_songinfo_plugin_get_info_to_pane (PraghaSongInfoPlugin *plugin, GLYR_GET_TYPE type, const gchar *artist, const gchar *title, const gchar *filename) { PraghaSonginfoPane *pane; GlyrDatabase *cache_db; glyr_struct *glyr_info; glyr_info = g_slice_new0 (glyr_struct); glyr_query_init (&glyr_info->query); glyr_opt_type (&glyr_info->query, type); pane = pragha_songinfo_plugin_get_pane (plugin); switch (type) { case GLYR_GET_ARTIST_BIO: pragha_songinfo_pane_set_text (pane, artist, _("Searching..."), ""); glyr_opt_artist(&glyr_info->query, artist); glyr_opt_lang (&glyr_info->query, "auto"); glyr_opt_lang_aware_only (&glyr_info->query, TRUE); break; case GLYR_GET_LYRICS: pragha_songinfo_pane_set_text (pane, title, _("Searching..."), ""); glyr_opt_artist(&glyr_info->query, artist); glyr_opt_title(&glyr_info->query, title); break; default: break; } cache_db = pragha_songinfo_plugin_get_cache (plugin); glyr_opt_lookup_db (&glyr_info->query, cache_db); glyr_opt_db_autowrite (&glyr_info->query, TRUE); glyr_info->filename = g_strdup(filename); glyr_info->plugin = plugin; GCancellable *cancellable = g_cancellable_new (); glyr_info->cancellable = g_object_ref (cancellable); glyr_info->cancel_id = g_cancellable_connect (glyr_info->cancellable, G_CALLBACK (search_cancelled), &glyr_info->query, NULL); pragha_async_launch (get_related_info_idle_func, glyr_finished_thread_update_pane, glyr_info); return cancellable; } ����������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/pragha-song-info-thread-pane.h���������������������������������������0000664�0000000�0000000�00000003427�13435240150�0024042�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SONGINFO_THREAD_PANE_H #define PRAGHA_SONGINFO_THREAD_PANE_H #include <glib.h> #include <glyr/glyr.h> #include "pragha-song-info-plugin.h" G_BEGIN_DECLS GCancellable * pragha_songinfo_plugin_get_info_to_pane (PraghaSongInfoPlugin *plugin, GLYR_GET_TYPE type, const gchar *artist, const gchar *title, const gchar *filename); G_END_DECLS #endif /* PRAGHA_SONGINFO_THREAD_PANE_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/song-info/song-info.plugin�����������������������������������������������������0000664�0000000�0000000�00000000503�13435240150�0021453�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=song-info Name=Get Artist info, Lyrics and Album arts Description=Get Artist info, Lyrics and Album arts of yours songs Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2013 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/tunein/������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0015741�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/tunein/Makefile.am�������������������������������������������������������������0000664�0000000�0000000�00000002175�13435240150�0020002�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������plugindir = $(libdir)/pragha/plugins/tunein AM_CPPFLAGS = \ -I$(top_srcdir) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) plugin_LTLIBRARIES = libtunein.la libtunein_la_SOURCES = \ pragha-tunein-plugin.c libtunein_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) libtunein_la_CFLAGS = \ $(LIBSOUP_CFLAGS) \ $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ $(LIBPEAS_CFLAGS) \ $(LIBPEAS_GTK_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall libtunein_la_LIBADD = \ $(LIBSOUP_LIBS) \ $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) \ $(LIBPEAS_LIBS) \ $(LIBPEAS_GTK_LIBS) if HAVE_GSTREAMER_AUDIO libtunein_la_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) libtunein_la_LIBADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI libtunein_la_CFLAGS += $(LIBXFCE4UI_CFLAGS) libtunein_la_LIBADD += $(LIBXFCE4UI_LIBS) endif plugin_DATA = tunein.plugin EXTRA_DIST = $(plugin_DATA) ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/tunein/pragha-tunein-plugin.c��������������������������������������������������0000664�0000000�0000000�00000023471�13435240150�0022152�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifdef HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib-object.h> #include <gmodule.h> #include <gtk/gtk.h> #include <libsoup/soup.h> #include <libpeas/peas.h> #include "src/pragha.h" #include "src/pragha-menubar.h" #include "src/pragha-playlist.h" #include "src/pragha-playlists-mgmt.h" #include "src/pragha-musicobject-mgmt.h" #include "src/pragha-hig.h" #include "src/pragha-utils.h" #include "src/pragha-window.h" #include "src/xml_helper.h" #include "plugins/pragha-plugin-macros.h" #define PRAGHA_TYPE_TUNEIN_PLUGIN (pragha_tunein_plugin_get_type ()) #define PRAGHA_TUNEIN_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_TUNEIN_PLUGIN, PraghaTuneinPlugin)) #define PRAGHA_TUNEIN_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_TUNEIN_PLUGIN, PraghaTuneinPlugin)) #define PRAGHA_IS_TUNEIN_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_TUNEIN_PLUGIN)) #define PRAGHA_IS_TUNEIN_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_TUNEIN_PLUGIN)) #define PRAGHA_TUNEIN_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_TUNEIN_PLUGIN, PraghaTuneinPluginClass)) struct _PraghaTuneinPluginPrivate { PraghaApplication *pragha; GtkActionGroup *action_group_main_menu; guint merge_id_main_menu; }; typedef struct _PraghaTuneinPluginPrivate PraghaTuneinPluginPrivate; PRAGHA_PLUGIN_REGISTER (PRAGHA_TYPE_TUNEIN_PLUGIN, PraghaTuneinPlugin, pragha_tunein_plugin) /* * Prototypes */ static void pragha_tunein_get_radio_dialog (PraghaTuneinPlugin *plugin); /* * Popups */ static void pragha_tunein_plugin_get_radio_action (GtkAction *action, PraghaTuneinPlugin *plugin) { pragha_tunein_get_radio_dialog (plugin); } static void pragha_gmenu_tunein_plugin_get_radio_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) { pragha_tunein_get_radio_dialog (PRAGHA_TUNEIN_PLUGIN(user_data)); } static const GtkActionEntry main_menu_actions [] = { {"Search tunein", NULL, N_("Search radio on TuneIn"), "", "Search tunein", G_CALLBACK(pragha_tunein_plugin_get_radio_action)} }; static const gchar *main_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"> \ <menuitem action=\"Search tunein\"/> \ <separator/> \ </placeholder> \ </menu> \ </menubar> \ </ui>"; /* * TuneIn Handlers */ static const gchar * tunein_helper_get_atribute (XMLNode *xml, const gchar *atribute) { XMLNode *xi; xi = xmlnode_get (xml,CCA {"outline", NULL}, atribute, NULL); if (xi) return xi->content; return NULL; } static void pragha_tunein_plugin_get_radio_done (SoupSession *session, SoupMessage *msg, gpointer user_data) { GtkWidget *window; PraghaPlaylist *playlist; PraghaDatabase *cdbase; PraghaMusicobject *mobj = NULL; XMLNode *xml = NULL, *xi; const gchar *type = NULL, *name = NULL, *url = NULL; gchar *uri_parsed, *name_fixed = NULL; PraghaTuneinPlugin *plugin = user_data; PraghaTuneinPluginPrivate *priv = plugin->priv; window = pragha_application_get_window (priv->pragha); remove_watch_cursor (window); if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) return; xml = tinycxml_parse ((gchar *)msg->response_body->data); xi = xmlnode_get (xml, CCA{"opml", "body", "outline", NULL }, NULL, NULL); for(;xi;xi= xi->next) { type = tunein_helper_get_atribute (xi, "type"); if (g_ascii_strcasecmp(type, "audio") == 0) break; } if (xi == NULL) { xmlnode_free(xml); return; } name = tunein_helper_get_atribute (xi, "text"); url = tunein_helper_get_atribute (xi, "URL"); if (string_is_empty(name) || string_is_empty(url)) { xmlnode_free(xml); return; } name_fixed = unescape_HTML (name); uri_parsed = pragha_pl_get_first_playlist_item (url); mobj = new_musicobject_from_location (uri_parsed, name_fixed); playlist = pragha_application_get_playlist (priv->pragha); pragha_playlist_append_single_song (playlist, mobj); new_radio (playlist, uri_parsed, name_fixed); cdbase = pragha_application_get_database (priv->pragha); pragha_database_change_playlists_done (cdbase); xmlnode_free(xml); g_free (name_fixed); g_free (uri_parsed); } static void pragha_tunein_plugin_get_radio (PraghaTuneinPlugin *plugin, const gchar *field) { GtkWidget *window; SoupSession *session; SoupMessage *msg; gchar *escaped_field = NULL, *query = NULL; PraghaTuneinPluginPrivate *priv = plugin->priv; window = pragha_application_get_window (priv->pragha); set_watch_cursor (window); escaped_field = g_uri_escape_string (field, NULL, TRUE); query = g_strdup_printf ("%s%s", "http://opml.radiotime.com/Search.aspx?query=", escaped_field); session = soup_session_sync_new (); msg = soup_message_new ("GET", query); soup_session_queue_message (session, msg, pragha_tunein_plugin_get_radio_done, plugin); g_free (escaped_field); g_free (query); } /* * TuneIn dialog */ static void pragha_tunein_get_radio_dialog (PraghaTuneinPlugin *plugin) { GtkWidget *dialog, *parent; GtkWidget *table, *entry; gint result; guint row = 0; PraghaTuneinPluginPrivate *priv = plugin->priv; parent = pragha_application_get_window (priv->pragha); dialog = gtk_dialog_new_with_buttons (_("Search in TuneIn"), GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Ok"), GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); table = pragha_hig_workarea_table_new (); pragha_hig_workarea_table_add_section_title (table, &row, _("Search in TuneIn")); entry = gtk_entry_new (); gtk_entry_set_max_length (GTK_ENTRY(entry), 255); gtk_entry_set_activates_default (GTK_ENTRY(entry), TRUE); pragha_hig_workarea_table_add_wide_control (table, &row, entry); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), table); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); switch(result) { case GTK_RESPONSE_ACCEPT: pragha_tunein_plugin_get_radio(plugin, gtk_entry_get_text(GTK_ENTRY(entry))); break; case GTK_RESPONSE_CANCEL: break; default: break; } gtk_widget_destroy (dialog); } /* * TuneIn plugin */ static void pragha_plugin_activate (PeasActivatable *activatable) { GMenuItem *item; GSimpleAction *action; PraghaTuneinPlugin *plugin = PRAGHA_TUNEIN_PLUGIN (activatable); PraghaTuneinPluginPrivate *priv = plugin->priv; priv->pragha = g_object_get_data (G_OBJECT (plugin), "object"); CDEBUG(DBG_PLUGIN, "TuneIn plugin %s", G_STRFUNC); /* Attach main menu */ priv->action_group_main_menu = gtk_action_group_new ("PraghaTuneinPlugin"); gtk_action_group_set_translation_domain (priv->action_group_main_menu, GETTEXT_PACKAGE); gtk_action_group_add_actions (priv->action_group_main_menu, main_menu_actions, G_N_ELEMENTS (main_menu_actions), plugin); priv->merge_id_main_menu = pragha_menubar_append_plugin_action (priv->pragha, priv->action_group_main_menu, main_menu_xml); /* Gear Menu */ action = g_simple_action_new ("search-tunein", NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_gmenu_tunein_plugin_get_radio_action), plugin); item = g_menu_item_new (_("Search radio on TuneIn"), "win.search-tunein"); pragha_menubar_append_action (priv->pragha, "pragha-plugins-placeholder", action, item); } static void pragha_plugin_deactivate (PeasActivatable *activatable) { PraghaTuneinPlugin *plugin = PRAGHA_TUNEIN_PLUGIN (activatable); PraghaTuneinPluginPrivate *priv = plugin->priv; CDEBUG(DBG_PLUGIN, "TuneIn plugin %s", G_STRFUNC); pragha_menubar_remove_plugin_action (priv->pragha, priv->action_group_main_menu, priv->merge_id_main_menu); priv->merge_id_main_menu = 0; pragha_menubar_remove_action (priv->pragha, "pragha-plugins-placeholder", "search-tunein"); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/plugins/tunein/tunein.plugin�����������������������������������������������������������0000664�0000000�0000000�00000000403�13435240150�0020460�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������[Plugin] Module=tunein Name=Get radios Description=Get radios on TuneIn Authors=Matias De lellis <mati86dl@gmail.com> Copyright=Copyright © 2014 Matias De lellis Website=https://github.com/matiasdelellis/pragha Help=https://github.com/matiasdelellis/pragha �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/������������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0013374�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/.gitignore��������������������������������������������������������������������������0000664�0000000�0000000�00000000073�13435240150�0015364�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*.gmo Makefile* POTFILES *~ stamp-it .intltool-merge-cache ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/ChangeLog���������������������������������������������������������������������������0000664�0000000�0000000�00000000000�13435240150�0015134�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/POTFILES.in�������������������������������������������������������������������������0000664�0000000�0000000�00000002074�13435240150�0015154�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������src/info-bar-import-music.c src/pragha-cmdline.c src/pragha-equalizer-dialog.c src/pragha-filter-dialog.c src/pragha-library-pane.c src/pragha-menubar.c src/pragha-playlist.c src/pragha-playlists-mgmt.c src/pragha-preferences-dialog.c src/pragha-scanner.c src/pragha-search-entry.c src/pragha-statusicon.c src/pragha-tags-dialog.c src/pragha-tags-mgmt.c src/pragha-toolbar.c src/pragha-utils.c src/pragha-window.c src/pragha.c data/pragha.desktop.in plugins/acoustid/pragha-acoustid-plugin.c plugins/cdrom/pragha-cdrom-plugin.c plugins/devices/pragha-device-client.c plugins/devices/pragha-devices-plugin.c plugins/dlna/pragha-dlna-plugin.c plugins/dlna-renderer/pragha-dlna-renderer-plugin.c plugins/lastfm/pragha-lastfm-plugin.c plugins/mpris2/pragha-mpris2-plugin.c plugins/notify/pragha-notify-plugin.c plugins/removable-media/pragha-devices-removable.c plugins/song-info/pragha-song-info-dialog.c plugins/song-info/pragha-song-info-plugin.c plugins/song-info/pragha-song-info-thread-dialog.c plugins/song-info/pragha-song-info-thread-pane.c plugins/tunein/pragha-tunein-plugin.c ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/POTFILES.skip�����������������������������������������������������������������������0000664�0000000�0000000�00000000000�13435240150�0015477�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/bg.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000120754�13435240150�0014335�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Lyubomir Vasilev, 2015 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-05-28 10:43+0000\n" "Last-Translator: Lyubomir Vasilev\n" "Language-Team: Bulgarian (http://www.transifex.com/p/Pragha/language/bg/)\n" "Language: bg\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Не" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Да" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Желаете ли да добавите %s в библиотеката?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Желаете ли да обновите музикалната си библиотека?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Някои промени изискват рестартиране на pragha." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "ФАЙЛ" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "Използвайте --help , за да видите пълен списък с наличните опции." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Изключен" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Класика" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Клубна" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Танцувална" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Пълен бас" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Пълен бас и високи" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Пълни високи" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Колонки на лаптоп и слушалки" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Голяма зала" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "На живо" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Купон" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Поп" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Реге" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Рок" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ска" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Крива като усмихнато лице" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Меко" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Лек рок" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Техно" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Потребителски" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Еквалайзер" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Непознат изпълнител" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Непознат албум" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Търсене в списъка за изпълнение" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Затваряне" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Добавяне към списъка за изпълнение" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Преминаване към" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "П_ропускане" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Пропускане на _всички" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "_Изтриване на всички" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "П_оказване на библиотеката" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Скриване на библиотеката" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Дърво на папките" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Изпълнител" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Албум" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Жанр" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Изпълнител / албум" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Жанр / албум" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Жанр / изпълнител" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Жанр / изпълнител / албум" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Добавяне към текущия списък" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Замяна на текущия списък" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Замяна и _изъплнение" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Преименуване" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Изтриване" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Извличане" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Редактиране на етикети" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Преместване в _кошчето" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Изтриване от библиотеката" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Непознато" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Непознат жанр" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "Файлът не може да бъде преместен в кошчето. Изтриване завинаги?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Файлът „%s“ не може да бъде преместен в кошчето. Подробности: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Отказ" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Изтриване" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Списъци за изпълнение" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Радиа" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Библиотека" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Наистина ли искате да преместите файловете в кошчето?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Изтриване завинаги вместо местене в кошчето" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Сигурни ли сте, че искате да изтриете текущия файл от библиотеката?\n" "\n" "Внимание: За да бъде възстановен, ще трябва цялата библиотека да бъде " "сканирана наново." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Изпълнение" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Списък за изпълнение" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Преглед" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "И_нструменти" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Помощ" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Предишна" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Изпълнение / Пауза" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Спиране" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Следваща" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Редактиране на информацията за песента" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "И_зход" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "Добавяне на _файлове" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Отваряна на файл за изпълнение" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Добавяне на _местоположение" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "Добавяне на _библиотеката" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Премахване на избраното от списъка" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Отрязване на остатъка от списъка" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Изчистване на списъка" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Запазване на списъка" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Нова спъсък" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Запазване на избраното" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Търсене в списъка" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Предпочитания" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Към изпълняващата се песен" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "_Еквалайзер" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "Повторно _сканиране на библиотеката" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Обновяване на библиотеката" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Статистики" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Начална страница" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Общност" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Уики" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Преведете Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Относно" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Разбъркване" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Повтаряне" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "На _цял екран" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Страничен _панел" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Втори страничен панел" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Бутоните за изпълнение да са отдолу" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Лента с менюта" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Лента за състояние" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Общо елементи за изпълнение:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Общо изпълнители:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Общо албуми:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Статистики" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Заглавие" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Побитова скорост" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Година" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Коментар" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Дължина" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Име на файл" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Тип" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Премахване от опашката за изпълнение" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Премахване от списъка за изпълнение" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "Изп_ращане към" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Копиране на „%i“ в избраните номера на писти" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Копиране на „%s“ в избраните заглавия" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Копиране на „%s“ в избраните изпълнители" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Копиране на „%s“ в избраните албуми" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Копиране на „%s“ в избраните жанрове" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Копиране на „%i“ в избраните години" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Копиране на „%s“ в избраните коментари" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Писта" msgstr[1] "Писти" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Изчистване на сортирането" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Списък за изпълнение" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Добре" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> е запазено име на списък за изпълнение" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Искате ли да презапишете списъка за изпълнение: %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Изберете ново име" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Искате ли да изтриете елемента: %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Извличане на списъка за изпълнение във файл" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Запазване" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "%d от %d песни бяха добавени от внесения списък за изпълнение." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Какво искате да направите?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Замяна на списъка за изпълнение „%s“" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Добавяне към списъка за изпълнение „%s“" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Шаблоните трябва да бъдат във формата:<filename>;<filename>;....\n" "Позволени са най-много шест шаблона.\n" "За сега не се приемат заместващи символи ( приемаме разширения на " "функционалността :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Шаблон за обложка на албум" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Стартиране в нормален режим" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Стартиране на цял екран" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Стартиране в системния панел" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Изберете папка, която да добавите към библиотеката" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Отваряне" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Звук" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Звукова система" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Изисква се рестартиране" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Звуково устройство" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Използване на софтуерен смесител" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "Не можете да променяте папките, докато те биват обхождани" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Папки" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Добавяне" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Премахване" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Сливане на папките в изгледа с дървото на папките" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Подреждане на албумите по година на издаване" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Облик" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Елементи" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Показване на обложките на албумите в панела" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Размер на обложките на албумите" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Шаблон за файлове с обложки на албуми" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Търсене" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Търсене по време на писане" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Търсене на подобни думи" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "При стартиране на pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Запомняне на последното състояние на прозореца" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Възстановяване на последния списък за изпълнение" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "При добавяне на папки" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Добавяне на файловете от всички подпапки" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Работен плот" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Показване на иконката на Pragha в зоната за уведомления" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Минимизиране на Pragha при затваряне на прозореца" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Добавки" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Предпочитания" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Общи" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Услуги" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Предпочитания на Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "Анализирани са %i от %i открити файла" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Търсене на файлове за анализиране" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Сканирането на библиотеката е завършено" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Нищо не се изпълнява</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "№ на писта" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Файл" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Подробности" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "канал" msgstr[1] "канали" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Канали" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Честота на дискретизация" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Папка" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Избраното към" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Отваряне на папка" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Искате ли на ВСИЧКИ избрани писти да зададете номера: %d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" "Искате ли на ВСИЧКИ избрани писти да зададете етикетът на заглавие: %s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">от</span></small> %s <small><span weight=" "\"light\">в</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">от</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">в</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Предишна" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Изпълнение / пауза" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Спиране" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Следваща" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Излизане от цял екран" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Изпълнение на песните в произволен ред" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Повтаряне на списъка отначало след завършване" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "ден" msgstr[1] "дни" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Неуспешно отваряне на браузъра" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Грешка при изпълнение на текущата песен.</b>\n" "(%s)\n" "<b>Причина:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Спиране" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "С_ледваща" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Изберете файл за изпълнение" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Поддържани формати" #: ../src/pragha.c:309 msgid "All files" msgstr "Всички файлове" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Въведете адреса на радио поток от Интернет" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Дайте му име" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Добавяне на местоположение" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Любомир Василев <lyubomirv@abv.bg>, 2015" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha музикален плеър" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Музикален плеър" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Слушайте и управлявайте музиката си" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Търсене на етикети в AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID не откри подобна песен" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Диск с аудио/данни" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Беше вкаран аудио диск" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Добавяне на _аудио диск" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Аудио диск" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Устройство за аудио дискове" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Свързване със сървър за дискова информация" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Пренебрегване" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Свързване с DLNA сървър" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Музиката от сървъра %s беше добавена." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Неуспешно търсене на DLNA сървър" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Обичам това" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Не обичам това" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Внасяне на списък за изпълнение от XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Добавяне на любими" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Добавяне на подобни" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Неуспешна връзка с Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm предложи поправка в етикета" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Неуспешно отбелязване на песента като обичана в Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Неуспешно отбелязване на песента като не обичана в Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Добавени са %d от %d предложени от Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm няма предложения за подобни" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Добавени са %d от последните %d обичани песни в Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Нямате любими песни в Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Неуспешно подаване на информация към Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Песента е обявена в Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Неуспешно обновяване на текущата песен в Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Обявяване в Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Потребителско име" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Парола" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Писта" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "от <b>%s</b> в <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Известия" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Показване на обложките на албумите в известията" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Добавяне на средства за смяна на песента в известията" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Неуспешен достъп до „%s“" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Преносимо устройство" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "Искате ли да управлявате файловете на „%s“?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "Търсене на _текст" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "Търсене на информация за _изпълнителя" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Информация за песента" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Изтегляне на обложката на албума по време на изпълнението на песните." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Текстът е осигурен, благодарение на %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Информация за изпълнителя" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">благодарение на</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Няма открит текст." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Няма открита информация за изпълнителя." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Търсене..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Търсене на радио в TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Търсене в TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Отбелязване на редовете в текущия списък за изпълнение" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Спазване на насоките на Gnome 3" ��������������������pragha-1.3.4/po/ca_ES.po����������������������������������������������������������������������������0000664�0000000�0000000�00000104445�13435240150�0014716�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Adolfo Jayme Barrientos, 2014-2015 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-01-05 19:30+0000\n" "Last-Translator: Adolfo Jayme Barrientos\n" "Language-Team: Catalan (Spain) (http://www.transifex.com/p/Pragha/language/" "ca_ES/)\n" "Language: ca_ES\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_No" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Sí" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Voleu importar %s a la col·lecció?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Voleu actualitzar la vostra col·leció musical?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "És necessari reiniciar el Pragha perquè alguns canvis s’apliquin." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "NOM DE FITXER" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Useu «%s --help» per veure el llistat de les opcions disponibles de la línia " "d'ordres" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Inhabilitat" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Clàssic" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Ball" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Màxim de greus" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Màxim de greus i aguts" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Màxim d'aguts" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Altaveus i auriculars de l'ordinador portàtil" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Auditori gran" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "En viu" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Festa" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Corba de la cara somrient" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Tou" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Rock suau" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Tecno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Personalitzat" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Equalitzador" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Artista desconegut" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Àlbum desconegut" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Cerca a la llista de reproducció" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Tanca" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Afegeix a la cua de reproducció" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Vés a" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Omet" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Omet-los _tots" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Suprimeix-ho _tot" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "Afegeix una _biblioteca" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "Afegeix una _biblioteca" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Estructura de la biblioteca" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artista" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Àlbum" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Gènere" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artista/àlbum" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Gènere/àlbum" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Gènere/artista" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Gènere/artista/àlbum" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Afegeix a la llista de reproducció actual" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Reemplaça la llista de reproducció actual" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "R_eemplaça i reprodueix" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Canvia el nom" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Suprimeix" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exporta" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Edita les etiquetes" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Mou a la _paperera" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Suprimeix de la biblioteca" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Desconegut" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Gènere desconegut" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" "El fitxer no es pot moure a la paperera. Voleu suprimir-ho permanentment?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "No s’ha pogut moure el fitxer «%s» a la paperera. Detalls: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Cancel·la" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "Su_primeix" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Llistes de reproducció" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Ràdios" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Col·leció" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Esteu segur que voleu moure els fitxers a la paperera?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Suprimeix permanentment en lloc de moure a la paperera" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Esteu segur que voleu suprimir el fitxer actual de la col·lecció?\n" "\n" "Avís: si el voleu recuperar és necessari escanejar de nou la col·lecció " "sencera." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Reprodueix" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Llista de _reprodució" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Visualitza" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Eines" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "A_juda" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Pista anterior" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Reprodueix/fes una pausa" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Atura" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Pista següent" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Edita la informació de la cançó" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Surt" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Afegeix fitxers" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Obre un fitxer multimèdia" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Agefeix ubicació" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Afegeix una biblioteca" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Suprimeix la selecció de la llista de reproducció" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Retalla llista de reproducció" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Neteja llista de reproducció" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Desa la llista de reproducció" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Llista de reproducció nova" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Desa la selecció" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Cerca en aquesta llista de reproducció" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Preferències" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Salta a la cançó que s'està reproduint" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "_Equalitzador" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "Torna a escanejar la biblioteca" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Actualitza _biblioteca" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "Estadí_stiques" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Pàgina d'inici" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Comunitat" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Tradueix el Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Quant a" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Aleatori" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Repeteix" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Pantalla completa" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Quadre _superior" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Quadre lateral secundari" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Controls de reproducció cap avall" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Barra de menús" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Barra d'estat" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Peces totals:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Total d'artistes:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Total d'àlbums:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Estadístiques" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Títol" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Taxa de bits" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Any" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Comentari" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Durada" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nom del fitxer" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Tipus MIME" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Suprimeix de la cua de producció" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Suprimeix de la llista de reproducció" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Envia a" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Copia «%i» als números de peça seleccionats" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Copia «%s» als títols seleccionats" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Copia «%s» als artistes seleccionats" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Copia «%s» als àlbums seleccionats" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Copia «%s» als gèneres seleccionats" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Copia «%i» als anys seleccionats" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Copia «%s» als comentaris seleccionats" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Pista" msgstr[1] "Pistes" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Neteja l'ordenació" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Llista de reproducció" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_D'acord" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> és un nom de llista de reproducció reservat" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Voleu sobreescriure la llista de reproducció: %s?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Trieu un nom nou" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Voleu suprimir l’element: %s?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exporta la llista de reproducció a un fitxer" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Desa" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "S’han afegit %d cançons de les %d que hi ha en la llista importada." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Què voleu fer?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Reemplaça la llista de reproducció «%s»" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Afegeix-les a la llista de reproducció «%s»" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Els patrons segueixen la forma: <nom_fitxer>;<nom_fitxer>;…\n" "Es permeten sis patrons com a màxim.\n" "No s’admeten comodins actualment (però s’accepten pedaços ;-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Patró de caràtula d’àlbum" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Inicia normal" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Inicia a pantalla completa" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Inicia en l'àrea de notificació." #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Trieu una carpeta per afegir-la a la col·lecció" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Obre" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Àudio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Destí («sink») d’àudio" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Es necessita reiniciar" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Dispositiu d'àudio" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Utilitza el mesclador per programari" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "No és possible canviar les carpetes mentre s’estan analitzant." #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Carpetes" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Afegeix" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Suprimeix" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Fusiona les carpetes en la visualització de estructura" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Ordena els àlbums per l'any de publicació" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Aparença" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Controls" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Mostra la caràtula al quadre" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Mida de la caràtula" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Patró de fitxers de caràtules" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Cerca" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Cerca mentre s'escriu" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Cerca paraules semblants" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "En iniciar el Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Recorda l'últim estat" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Restaura l’última llista de reproducció" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "En afegir carpetes" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Afegeix els fitxers recursivament" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Escriptori" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Mostra la icona del Pragha a l'àrea de notificació" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Minimitza el Pragha en tancar la finestra" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Connectors" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Preferències" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "General" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Serveis" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Preferències del Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "S’han analitzat %i fitxers de %i detectats" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "S’estan cercant els fitxers a analitzar" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>No s'està reproduint</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Núm. de peça" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Fitxer" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Detalls" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "canal" msgstr[1] "canals" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Canals" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Taxa de mostra" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Carpeta" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Selecciona a" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Obre la carpeta" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Pista anterior" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Reprodueix / pausa la pista actual" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Atura la reproducció" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Pista següent" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Surt de la pantalla completa" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Reprodueix cançons en ordre aleatori" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "dia" msgstr[1] "dies" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "No es pot obrir el navegador" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>S’ha produït un error en reproduir la peça actual.</b>\n" "(%s)\n" "<b>Motiu:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "A_tura" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "Següe_nt" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Fitxers multimèdia admesos" #: ../src/pragha.c:309 msgid "All files" msgstr "Tots els fitxers" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Introduïu l’URL d’un flux de ràdio d’Internet" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Nom del fitxer a desar" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Afegeix una ubicació" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "Jordi Mas i Hernàndez <jmas@softcatala.org>, 2014\n" "Adolfo Jayme Barrientos <fito@libreoffice.org>, 2014" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Reproductor de música Pragha" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Reproductor de música" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Escolteu i gestioneu la música" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Cerca etiquetes a l’AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "CD d’àudio o dades" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "S’ha inserit un CD d’àudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Afegeix CD d'àudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "CD d'àudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Dispositiu CD d'àudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Connecta amb un servidor CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ignora" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Cerca música al servidor DLNA" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "S’ha afegit música des del servidor %s." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "No s’ha trobat cap servidor DLNA." #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "M’encanta aquesta peça" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Ja no m’encanta aquesta peça" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Exporta la llista de reproducció a XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Afegeix als preferits" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Afegeix similars" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Nom d'usuari" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Contrasenya" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Pista" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notificacions" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Mostra les caràtules dels àlbums a les notificacions" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "No es pot accedir a «%s»" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Dispositiu extraïble" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "Voleu gestionar la unitat «%s»?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Informació de la cançó" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Informació de l’artista" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "No s’ha trobat la lletra." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "No s’ha trobat la informació de l’artista." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "S’està cercant…" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "Realça les files de la llista de reproducció actual" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Utilitza la interfície de GNOME 3" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/cs.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000105265�13435240150�0014352�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Alois Nešpor <info@aloisnespor.info>, 2011-2015 # Alois Nešpor <info@aloisnespor.info>, 2014 # Petr Šimáček <petr.simacek@gmail.com>, 2012 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-03-02 15:40+0000\n" "Last-Translator: Alois Nešpor <info@aloisnespor.info>\n" "Language-Team: Czech (http://www.transifex.com/p/Pragha/language/cs/)\n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Ne" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Ano" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Chcete %s importovat do knihovny?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Chcete aktualizovat vaši knihovnu?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Některé změny se projeví až po restartu přehrávače." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "JMÉNO SOUBORU" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Použitím --help se zobrazit úplný seznam dostupných voleb příkazové řádky." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Vypnuto" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Klasika" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Klub" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Tanec" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Plné basy" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Plné basy a výšky" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Plné výšky" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Sluchátka a reproduktory laptopu" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Velká místnost" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Živě" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Párty" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Smiley Face křivka" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Vlastní" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Ekvalizér" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Neznámý umělec" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Neznámé album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Hledat v playlistu" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Zavřít" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Přidat do fronty" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Skočit na" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Přeskočit" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "P_řeskočit vše" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Smazat _vše" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Rozbalit" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Zabalit" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Struktura adresářů" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Umělec" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Žánr" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Umělec / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Žánr / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Žánr / Umělec" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Žánr / Umělec / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Přidat na současný playlist" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Nahradit současný playlist" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Nahradit a přehrát" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Přejmenovat" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Smazat" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exportovat" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Editovat tagy" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Přesunout do _koše" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Smazat z knihovny" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Neznámý" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Neznámý žánr" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "Soubor nelze přesunout do koše. Úplně mazat?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Soubor \"%s\" nelze přesunout do koše. Detaily: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Zrušit" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Smazat" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Playlisty" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Rádia" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Knihovna" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Opravdu chcete přesunout do koše?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Namísto přesouvání do koše rovnou mazat" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Opravdu chcete smazat současný soubor z knihovny?\n" "\n" "Varování: K obnovení je nutné přeskenovat knihovnu." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Přehrát" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Play_list" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Zobrazení" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Nástroje" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Nápověda" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Předchozí skladba" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Hrát / Pauza" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Zastavit" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Další skladba" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Editace informací o skladbě" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Konec" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Přidat soubory" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Otevřít soubor" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Přidat _umístění" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Přidat knihovnu" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Odebrat výběr z playlistu" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Oříznout playlist" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Vyčistit playlist" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Uložit playlist" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nový playlist" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Uložit vybrané" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Hledat v playlistu" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Možnosti" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Skočit na hrající píseň" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_qualizer" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Znovu sestavit knihovnu" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Aktualizovat knihovnu" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistiky" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Domů" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Komunita" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Přeložit" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "O aplikaci" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Zamíchat" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Opakovat" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Na celou obrazovku" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Postranní _panel" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Sekundární postranní panel" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Zobrazit ovládání v dolní části" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Panel nabídky" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Stavový řádek" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Celkem skladeb:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Celkem umělců:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Celkem Alb:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistika" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Název" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitráž" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Rok" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Komentář" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Délka" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Jméno souboru" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "MIME typ" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Odebrat z fronty přehrávání" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Odebrat z playlistu" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Odeslat" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Kopírovat \"%i\" na vybrané čísla skladeb" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Kopírovat \"%s\" na vybrané názvy" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Kopírovat \"%s\" na vybrané umělce" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Kopírovat \"%s\" na vybrané alba" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Kopírovat \"%s\" na vybrané žánry" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Kopírovat \"%i\" na vybrané roky" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Kopírovat \"%s\" na vybrané komentáře" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Skladba" msgstr[1] "Skladby" msgstr[2] "Skladeb" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Zrušit výběr" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Playlist" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Ok" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> je rezervované jméno playlistu" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Chcete přepsat playlist: %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Vyberte nový název" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Chcete smazat položku: %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exportovat playlist do souboru" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Uložit" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Z importovaného playlistu přidáno %d z %d písní. " #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Co chcete dělat?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Nahradit playlist \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Přidat na playlist \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Názvy by měly vypadat jako:<jméno souboru>;<jméno souboru>;....\n" "Maximum vzorů je šest.\n" "Zástupné znaky nejsou dovoleny (patch vítán :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Název obalu" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Sputit normálně" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Spustit na celou obrazovku (fullscreen)" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Spustit minimalizovaně v systémové liště" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Vybrat adresář k přidání do knihovny" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Otevřít" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Audio sink" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Potřebuje restart" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Audio zařízení" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Použít softwarový mixer" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "Nelze změnit adresáře, zatímco se analyzují." #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Adresáře" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Přidat" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Odstranit" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Zobrazovat v knihovně všechny vybrané adresáře spolu" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Seřadit alba podle roku" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Vzhled" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Controla" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Ukazovat obal v panelu" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Rozměry obalu" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Vzor souboru obalu" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Hledat" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Hledat během psaní" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Hledat podobná slova" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Když Pragha startuje" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Pamatovat si poslední pozici okna" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Obnovit poslední playlist" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Při přidávání adresářů" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Přidat soubory rekurzivně" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Desktop" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Zobrazit Pragha v oznamovací oblasti" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Minimalizovat při zavření okna" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Pluginy" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Možnosti" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Hlavní" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Služby" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Možnosti" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i souborů analyzovaných z %i zjištěných" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Hledám soubory k analyzování" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Skenování knihovny dokončeno" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Nepřehrává</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Skladba č." #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Soubor" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Detaily " #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "kanál" msgstr[1] "kanály" msgstr[2] "kanálů" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanály" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Vzorkovací frekvence" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Adresář" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Výběr k" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Otevřít adresář" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Chcete nastavit číslo stopy všech vybraných skladeb na %d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Chcete nastavit název tagu/značky u všech vybraných skladeb na %s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">od</span></small> %s <small><span weight=" "\"light\">v</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">od</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">v</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Předchozí" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Přehrát / Zastavit" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Zastavit přehrávání" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Další skladba" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Opustit 'Celou obrazovku'" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Přehrávat písně náhodně" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Opakovat playlist po přehrání poslední skladby" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "den" msgstr[1] "dny" msgstr[2] "dnů" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Nejde otevřít prohlížeč" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Chyba při přehrávání současné skladby.</b>\n" "(%s)\n" "<b>Důvod:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Zastavit" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Další" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Vybrat soubor k přehrání" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Podporované média" #: ../src/pragha.c:309 msgid "All files" msgstr "Všechny soubory" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Zadat URL internetového rádia" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Zadejte jméno k uložení" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Přidat místo" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Alois Nešpor (info@aloisnespor.info)" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha hudební přehrávač" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Hudební přehrávač" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Spravovat a poslouchat hudbu" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Hledat tagy na AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID nenašel žádnou podobnou píseň" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Audio/Data CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Bylo vloženo AudioCD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Přidat Audio _CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Audio CD zařízení" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Připojení k CDDB serveru" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ignorovat" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Hledat hudbu na DLNA serveru" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Hudba ze serveru %s byla přidána." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Nelze najít žádný DLNA server." #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Oblíbená píseň" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Neoblíbená píseň" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importovat XSPF playlist" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Přidat mezi oblíbené" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Přidat podobné" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Nelze navázat spojení s Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm navrhne opravu tagu" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Není možné označit na Last.fm píseň za oblíbenou." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Neoblíbené písně na Last.fm selhalo." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Přidáno %d písní z %d navrhnutých Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm nenavrhuje žádnou podobnou píseň" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Přidáno %d skladeb z posledních %d oblíbených na Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Nemáte žádné oblíbené písně na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Podřízení se Last.fm selhalo" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Skladba je \"scrobbled\" na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Selhala aktualizace nynější písně na Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Scrobble na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Jméno uživatele" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Heslo" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Skladba" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "od <b>%s</b> v <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Upozornění" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Zobrazovat obal při oznamování" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "V oznámení přidat akce ke změně skladby " #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Nelze získat přístup k \"%s\"" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Odpojitelné zařízení" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "Chcete spravovat svazek \"%s\"?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "Najít _text písně" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "Hledat informace o _umělci" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Informace o hudbě" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Stáhnout obal alba během přehrávání písní." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Texty díky %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Informace o umělci" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">poděkování patří</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Text písní nenalezen." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Informace o umělci nebyly nalezeny." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Hledám...." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Hledat rádio na TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Hledat v TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Zvýraznit řádky v současném playlistě" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Použít Gnome 3 HIG" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/de.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000107151�13435240150�0014331�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Aru21, 2015 # Christoph Wickert <christoph.wickert@gmail.com>, 2012-2013 # Christoph Wickert <cwickert@fedoraproject.org>, 2011 # Ettore Atalan <atalanttore@googlemail.com>, 2014 # Mario Blättermann <mario.blaettermann@gmail.com>, 2012 # Zijj <Zijj123@gmail.com>, 2015 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-06-04 15:09+0000\n" "Last-Translator: Zijj <Zijj123@gmail.com>\n" "Language-Team: German (http://www.transifex.com/p/Pragha/language/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Nein" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Ja" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Soll %s zur Bibliothek importiert werden?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Möchten Sie Ihre Musikbibliothek aktualisieren?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Einige Änderungen erfordern einen Neustart." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "DATEINAME" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Verwenden Sie --help, um eine vollständige Liste an verfügbaren " "Befehlszeilenoptionen zu sehen" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Deaktiviert" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Klassik" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Volle Bässe" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Volle Bässe und Höhen" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Volle Höhen" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Laptop-Lautspecher und Kopfhörer" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Große Halle" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Live" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Party" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Smiley-Kurve" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Weich" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Benutzerdefiniert" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Equalizer" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Unbekannter Interpret" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Unbekanntes Album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "In der Wiedergabeliste suchen" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "S_chließen" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Zur Wiedergabewarteschlange hinzufügen" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Wechseln zu" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "Über_springen" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Alle ü_berspringen" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "_Alle löschen" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "Musikbibliothek _aufklappen" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "Musikbibliothek _zuklappen" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Verzeichnisbaum" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Interpret" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Genre" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Interpret / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Genre / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Genre / Interpret" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Genre / Interpret / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "Zur _aktuellen Wiedergabeliste hinzufügen" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "Aktuelle Wiedergabeliste e_rsetzen" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Ersetzen und abs_pielen" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Umbenennen" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Löschen" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exportieren" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Schlagwörter bearbeiten" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "In den Papierkorb _verschieben" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Aus der Bibliothek entfernen" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Unbekannt" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Unbekanntes Genre" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" "Datei kann nicht in den Papierkorb verschoben werden. Dauerhaft löschen?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Die Datei »%s« kann nicht in den Müll verschoben werden. Details: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "Abbre_chen" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Löschen" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Wiedergabelisten" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radios" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Bibliothek" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Soll die Datei wirklich in den Müll verschoben werden?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Dauerhaft löschen anstatt in den Papierkorb zu verschieben" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Soll die Datei wirklich aus der Musikbibliothek entfernt werden?\n" "\n" "Warnung: Um die Datei wiederherzustellen, muss die gesamte Musikbibliothek " "neu eingelesen werden." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Wiedergabe" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Wiedergabe_liste" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Ansicht" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Werkzeuge" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Hilfe" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Vorheriges Stück" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Wiedergabe / Pause" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stopp" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Nächstes Stück" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Stückinformationen bearbeiten" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Beenden" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "Dateien _hinzufügen" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Eine Mediendatei öffnen" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "_Ort hinzufügen" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Zur Bibliothek hinzufügen" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Auswahl aus der Wiedergabeliste entfernen" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Wiedergabeliste abschneiden" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Wiedergabeliste leeren" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Wiedergabeliste speichern" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Neue Wiedergabeliste" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Auswahl speichern" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "Wiedergabeliste durch_suchen" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Einstellungen" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Zum momentan wiedergegebenen Titel springen" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_qualizer" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "Musikbibliothek neu _einlesen" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "Musikbibliothek akt_ualisieren" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "Statistiken" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Webseite" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Gemeinschaft" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Pragha übersetzen" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "_Über" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Zufallswiedergabe" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Wiederholen" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Vollbild" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Seitenleiste" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Sekundäre Seitenleiste" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Steuerelemente unten anzeigen" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Menüleiste" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Statuszeile" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Gesamtzahl der Stücke:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Anzahl der Künstler:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Anzahl der Alben:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistiken" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Titel" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitrate" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Jahr" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Kommentar" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Länge" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Dateiname" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "MIME-Typ" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Von der Wiedergabewarteliste entfernen" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Aus der Wiedergabeliste entfernen" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Senden an" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "»%i« zu ausgewählten Stücknummern kopieren" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "»%s« zu ausgewählten Titeln kopieren" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "»%s« zu ausgewählten Künstlern kopieren" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "»%s« zu ausgewählten Alben kopieren" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "»%s« zu ausgewählten Genres kopieren" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "»%i« zu ausgewählten Jahren kopieren" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "»%s« zu ausgewählten Kommentaren kopieren" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Stück" msgstr[1] "Stücke" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Sortierung zurücksetzen" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Wiedergabeliste" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Ok" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> ist ein reservierter Wiedergabelistenname" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Soll die Wiedergabeliste »%s« überschreiben werden?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Neuen Namen angeben" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Soll »%s« gelöscht werden?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Wiedergabeliste in Datei speichern" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Speichern" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "%d von %d Titeln der importierten Wiedergabeliste hinzugefügt." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Was möchten Sie tun?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Die Wiedergabeliste »%s« ersetzen" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Zur Wiedergabeliste »%s« hinzufügen" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Muster sollten in der Form <Dateiname>;<Dateiname>;... vorliegen\n" "Es sind maximal sechs Muster erlaubt.\n" "Platzhalter werden noch nicht verarbeitet (Patches sind willkommen :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Muster für Album-Cover" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Normal starten" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Im Vollbildmodus starten" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Im Tray starten" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Einen Ordner zum Hinzufügen zur Bibliothek auswählen" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Öffnen" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Audiosystem" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Neustart erforderlich" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Audiogerät" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Software-Mixer verwenden" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" "Das Verzeichnis kann nicht gewechselt werden, während diese analysiert " "werden." #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Ordner" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Hinzufügen" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Entfernen" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Ordner im Verzeichnisbaum zusammenführen" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Alben nach Erscheinungsjahr sortieren" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Erscheinungsbild" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Steuerung" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Album-Cover in der Steuerleiste anzeigen" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Größe des Album-Covers" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Muster für Album-Cover Dateien" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Suche" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Während der Eingabe suchen" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Ähnliche Wörter suchen" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Beim Start von Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Fensterposition und -größe merken" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Letzte Wiedergabeliste wiederherstellen" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Beim Hinzufügen von Ordnern" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Dateien rekursiv hinzufügen" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Desktop-Umgebung" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Symbol in der Benachrichtigungsfläche anzeigen" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Pragha beim Schließen des Fensters minimieren" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Zusatzmodule" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Einstellungen" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Allgemein" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Dienste" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Einstellungen von Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i von %i gefundenen Dateien analysiert" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Es wird nach Dateien zum Analysieren gesucht" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Einlesen der Musikbibliothek abgeschlossen" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Keine Wiedergabe</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Stücknummer" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Datei" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Details" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "Kanal" msgstr[1] "Kanäle" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanäle" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Abtastrate" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Ordner" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Auswahl an" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Ordner öffnen" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Soll die Nummer für ALLE ausgewählten Stücke zu %d geändert werden?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Soll der Name für ALLE ausgewählten Stücke zu %s geändert werden?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">von</span></small> %s <small><span weight=" "\"light\">aus</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">von</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">aus</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Vorheriges Stück" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Stück wiedergeben / pausieren" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Wiedergabe stoppen" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Nächstes Stück" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Vollbild verlassen" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "In einer zufälligen Reihenfolge wiedergeben" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Wiedergabe wiederholen" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "Tag" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Der Browser konnte nicht geöffnet werden" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Fehler beim Abspielen des Titels.</b>\n" "(%s)\n" "<b>Grund:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Stopp" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Weiter" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Eine Datei zum Abspielen auswählen" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Unterstützte Mediendateien" #: ../src/pragha.c:309 msgid "All files" msgstr "Alle Dateien" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "URL eines Internetradio-Streams angeben" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Namen zum Speichern angeben" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Ort hinzufügen" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "PhotonX\n" "Christoph Wickert <cwickert@fedoraproject.org>" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha Musikspieler" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Musik-Player" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Musik verwalten und anhören" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Suche Schlagwörter auf AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID fand kein ähnliches Lied" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Audio/Daten-CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Eine Audio-CD wurde eingelegt" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Audio-_CD hinzufügen" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio-CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Audio-CD-Laufwerk" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Mit CDDB-Server verbinden" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ignorieren" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Musik auf DLNA-Server suchen" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Musik des Servers %s wurde hinzugefügt." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Es konnte kein DLNA-Server gefunden werden." #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Stück aufwerten" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Stück abwerten" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "XSPF-Wiedergabeliste importieren" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Zu Favoriten hinzufügen" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Ähnliche hinzufügen" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Es konnte keine Verbindung zu Last.fm aufgebaut werden" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm schlägt eine Schlagwort-Korrektur vor" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Aufwerten des Titels bei Last.fm fehlgeschlagen." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Abwerten des Titels bei Last.fm fehlgeschlagen." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "%d der %d von Last.fm vorgeschlagenen Titel wurden hinzugefügt" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Es wurden keine ähnlichen Titel von Last.fm vorgeschlagen." #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "%d der letzten %d bei Last.fm beliebten Titel wurden hinzugefügt." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Keine Favoriten bei Last.fm vorhanden." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Übertragung an Last.fm fehlgeschlagen" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Titel, die auf Last.fm gescrobbelt wurden" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Aktualisierung des aktuellen Titels bei Last.fm fehlgeschlagen." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Auf Last.fm scrobbeln" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Benutzername" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Passwort" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Stück" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "von <b>%s</b> aus <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Benachrichtigungen" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Album-Cover in Benachrichtigungen anzeigen" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Aktionen zum Wechseln der Titel in den Benachrichtigungen anzeigen" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Kann nicht auf \"%s\" zugreifen" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Entfernbares Gerät" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "Wollen Sie den Datenträger \"%s\" verwalten?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "_Liedtext suchen" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "_Interpreteninformation suchen" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Titelinformation" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Album-Hülle während der Wiedergabe der Titel herunterladen." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Liedtext mit Dank an %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Interpreteninformation" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">Dank an</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Liedtext nicht gefunden." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Interpreteninformation nicht gefunden." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Suchvorgang..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Suche Radio auf TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Suche in TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Zeilen in aktueller Wiedergabeliste hervorheben" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Verwende Gnome 3 HIG" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/el.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000102057�13435240150�0014341�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # koleoptero <vaggus@gmail.com>, 2011 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Greek (http://www.transifex.com/p/Pragha/language/el/)\n" "Language: el\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Άγνωστος Καλλιτέχνης" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Άγνωστο Άλμπουμ" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Προσθήκη στην σειρά αναπαραγωγής" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "Πα_ράληψη" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Παράληψη _Όλων" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "_Διαγραφή Όλων" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Επέκταση βιβλιοθήκης" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Σύμπτηξη βιβλιοθήκης" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Δομή φακέλων" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Καλλιτέχνης" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Άλμπουμ" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Είδος" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Καλλιτέχνης / Άλμπουμ" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Είδος / Άλμπουμ" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Είδος / Καλλιτέχνης" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Είδος / Καλλιτέχνης / Άλμπουμ" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Αφαίρεση" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Εξαγωγή" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Επεξεργασία ετικετών" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "_Μετακίνηση στα απορρίματα" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Διαγραφή από τη βιβλιοθήκη" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Άγνωστο" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Άγνωστο Είδος" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" "Το αρχείο \"%s\" δεν μπορεί να μεταφερθεί στα απορρίματα. Λεπτομέρειες: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Λίστες" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Βιβλιοθήκη" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Είστε σίγουροι ότι θέλετε να μετακινήσετε τα αρχεία στα απορρίματα;" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Είστε σίγουροι ότι θέλετε να διαγράψετε το αρχείο αυτό από τη βιβλιοθήκη;\n" "\n" "Για να το επαναφέρετε πρέπει να γίνει ανανέωση όλης της βιβλιοθήκης." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Προβολή" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Εργαλεία" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Βοήθεια" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Έναρξη / Παύση" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Διακοπή" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Επόμενο" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Έξοδος" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Προσθήκη αρχείων" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "_Άνοιγμα αρχείου" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Εκκαθάριση λίστας" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Αποθήκευση λίστας" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Αποθήκευση επιλογής" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Αναζήτηση στη λίστα" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Προτιμήσεις" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Μετάβαση στο αρχείο που παίζει" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Επαναφόρτωση βιβλιοθήκης" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Ανανέωση βιβλιοθήκης" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Στατιστικά" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Ιστοσελίδα" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Κοινότητα" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Μεταφράστε το Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Περί" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Τυχαία" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Επανάληψη" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Πλήρη οθόνη" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Πλάγια _" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Γραμμή κατάστασης" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Συνολικός αριθμός κομματιών" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Συνολικός αριθμός καλλιτεχνών" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Συνολικος αριθμός Άλμπουμ" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Στατιστικά" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Τίτλος" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitrate" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Έτος" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Σχόλιο" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Διάρκεια" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Όνομα αρχείου" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Κομμάτι" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Εκκαθάριση τακτοποίησης" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "το <b>con_playlist</b> είναι μη διαθέσιμο όνομα λίστας" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Εξαγωγή λίστας σε αρχείο" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Τα σχέδια θα πρέπει να είναι της μορφής:<filename>;<filename>;....\n" "Το όριο είναι έξι σχέδια.\n" "Δεν είναι δεκτά τα μπαλαντέρ αυτή τη στιγμή (δεκτά τα όποια patches " "στείλετε :-) )" #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Σχέδιο εξώφυλλων άλμπουμ" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Κανονική εκκίνηση" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Εκκίνηση σε πλήρη οθόνη" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Εκκίνηση στη περιοχή ειδοποιήσεων" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Επιλέξτε φάκελο για προσθήκη στη βιβλιοθήκη" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Ήχος" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Σύστημα εξόδου ήχου" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Χρειάζεται επανεκκίνηση" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Συσκευή εξόδου" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Χρήση μίκτη λογισμικού" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Φάκελοι" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Συγχώνευση φακέλων στην προβολή δέντρου φακέλων" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Εμφάνιση εξώφυλλων στην μπάρα" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Μέγεθος εξώφυλλων" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Μορφή ονόματος αρχείων εξώφυλλων" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Αποθήκευση προηγούμενης κατάστασης παραθύρου" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Επαναφορά προηγούμενης λίστας" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Προσθήκη αρχείων αναδρομικά" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Γενικά" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Προτιμήσεις του Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Σάρωση βιβλιοθήκης πλήρης" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Δεν παίζει τίποτα</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Αριθμός κομματιού" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Αρχείο" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Λεπτομέρειες" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Κανάλια" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Δειγματοληψία" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Φάκελος" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">Από</span></small> %s <small><span weight=" "\"light\">στο</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">Από</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">στο</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Προηγούμενο κομμάτι" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Αναπαραγωγή / Παύση κομματιού" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Διακοπή αναπαραγωγής" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Επόμενο" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Έξοδος από την πλήρη οθόνη" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Αναπαραγωγή αρχείων σε τυχαία σειρά" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Επανάληψη λίστας μετά το τέλος" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "ημέρα" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Αδύνατο το άνοιγμα περιηγητή" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Επιλογή αρχείου προς αναπαραγωγή" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Τύποι αρχείων" #: ../src/pragha.c:309 msgid "All files" msgstr "Όλα τα αρχεία" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "μνεία μετάφρασης" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Συσκευή CD ήχου" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Σύνδεση με διακομιστή CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Όνομα χρήστη" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Κωδικός" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Αριθμός κομματιού" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Ειδοποιήσεις" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Εμφάνιση εξώφυλλων στις ειδοποιήσεις" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/es.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000110011�13435240150�0014335�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Adolfo Jayme Barrientos, 2012,2014 # Adolfo Jayme Barrientos, 2012 # matias <mati86dl@gmail.com>, 2013-2014 # matias <mati86dl@gmail.com>, 2011-2012 # tonyskapunk <tonysk8@gmx.net>, 2013 # tonyskapunk <tonysk8@gmx.net>, 2013 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-09-09 10:33-0300\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Spanish (http://www.transifex.com/p/Pragha/language/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 1.8.4\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_No" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Sí" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "¿Quiere importar %s a la colección?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "¿Quiere actualizar la colección de música?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Es necesario reiniciar pragha para aplicar algunos cambios." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "NOMBREDEARCHIVO" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Utilice --help para ver una lista completa de las opciones disponibles." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Desactivado" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Música clásica" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Bajos al máximo" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Bajos y agudos al máximo" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Agudos al máximo" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Altavoces y auriculares para portátil" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Grandes salas" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "En directo" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Fiesta" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Curva de cara sonriente" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Suave" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Rock suave" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Tecno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Personalizado" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Ecualizador" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Artista desconocido" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Álbum desconocido" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Buscar en la lista de reproducción" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Cerrar" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Agregar a la cola de reproducción" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Saltar a" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Omitir" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "O_mitir todos" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Eliminar _todos" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "Expandir colección" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "Contraer colección" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Estructura de carpetas" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artista" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Álbum" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Género" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artista/álbum" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Género/álbum" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Género/artista" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Género/artista/álbum" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Añadir a la lista de reproducción actual" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Reemplazar lista de reproducción actual" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Reemplazar y re_producir " #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Renombrar" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Eliminar" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exportar" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Editar las etiquetas" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Mover a la _papelera" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Eliminar de la colección" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Desconocido" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Género desconocido" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" "No se pudo mover el archivo a la papelera. ¿Quiere eliminarlo " "permanentemente?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "No se puede mover el archivo «%s» a la papelera. Detalles: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Cancelar" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Eliminar" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Listas de reproducción" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radios" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Colección" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "¿Realmente quiere mover los archivos a la papelera?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Eliminar de forma permanente en lugar de mover a la papelera" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "¿Está seguro de que quiere eliminar el archivo de la colección?\n" "\n" "Aviso: para recuperarlo debe reexplorar la colección completamente. " #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Reproducción" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Lista" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Ver" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Herramientas" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Ayuda" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Pista anterior" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Reproducir/pausar" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Detener" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Pista siguiente" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Editar información de la pista" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Salir" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Añadir archivos" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Abrir un archivo multimedia" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Añadir _ubicación" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Añadir la colección" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Quitar selección de la lista de reproducción" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Recortar lista de reproducción" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Limpiar lista de reproducción" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Guardar lista de reproducción" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nueva lista de reproducción" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Guardar selección" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "Buscar en lista de reproducción" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Preferencias" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Saltar a la canción actual" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_cualizador" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "Volve_r a examinar la colección" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Actualizar la colección" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "E_stadísticas" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Sitio web" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Comunidad" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Traducir Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Acerca de" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Aleatorio" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Repetir" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Pantalla completa" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Panel _lateral" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Panel lateral secundario" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Controles de reproducción abajo" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Barra de menús" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Barra de estado" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Total de pistas:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Total de artistas:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Total de álbumes:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Estadísticas" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Titulo" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Tasa de bits" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Año" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Comentario" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Duración" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nombre del archivo" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Tipo MIME" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Quitar de la cola de reproducción" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Quitar de la lista de reproducción" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Enviar a" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Copiar «%i» a los números de pista seleccionados" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Copiar «%s» a los títulos seleccionados" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Copiar «%s» a los artistas seleccionados" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Copiar «%s» a los álbumes seleccionados" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Copiar «%s» a los géneros seleccionados" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Copiar «%i» a los años seleccionados" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Copiar «%s» a los comentarios seleccionados" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Pista" msgstr[1] "Pistas" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Limpiar orden" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Lista de reproducción" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Aceptar" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> es un nombre reservado" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "¿Quiere sobrescribir la lista de reproducción: %s?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Elija un nombre nuevo" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "¿Quiere eliminar el elemento: %s?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exportar lista de reproducción como archivo" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Guardar" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" "Se añadieron %d canciones de las %d en la lista de reproducción importada." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "¿Que quiere hacer?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Reemplazar la lista de reproducción «%s»" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Añadir a la lista de reproducción «%s»" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Los patrones deben escribirse de la forma:<Nombre_del_archivo>;" "<Nombre_del_archivo>;.... \n" "Se permiten seis patrones como máximo.\n" "Los comodines no se aceptan por ahora (se aceptan parches ;-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Patrón de la carátula" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Iniciar normalmente" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Iniciar en pantalla completa" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Iniciar en el área de notificación" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Seleccione una carpeta para añadirla a la colección" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Abrir" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Mezclador de audio" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Requiere reiniciar" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Dispositivo de audio" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Usar mezclador por software" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "No puede cambiar los directorios mientras se están analizando." #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Carpetas" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Añadir" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Quitar" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Combinar las carpetas en la vista de estructura de directorios" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Ordenar los álbumes por año de lanzamiento" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Apariencia" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "Usar la barra de título y los bordes del sistema" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "Usar iconos pequeños en las barras de herramientas" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Controles" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Mostrar carátula del álbum en el panel" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Tamaño de la carátula del álbum" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Patrón del archivo de carátula" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Búsqueda" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Buscar automáticamente mientras escribe" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Buscar palabras similares" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Cuando inicia Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Recordar el último estado de la ventana" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Restaurar última lista de reproducción" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Cuando se añaden carpetas" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Añadir archivos recursivamente" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Escritorio" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Mostrar el icono de Pragha en el área de notificación" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Minimizar Pragha al cerrar la ventana" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Complementos" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Preferencias" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "General" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Servicios" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Preferencias de Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i archivos analizados de %i encontrados" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Buscando archivos para analizar." #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Se completo la exploración de la colección" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>No se reproduce nada</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "N.º de pista" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Archivo" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Detalles" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "canal" msgstr[1] "canales" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Canales" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Tasa de muestreo" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Carpeta" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Copiar selección en" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Abrir carpeta" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" "¿Desea establecer el numero de canción de TODAS las pistas seleccionadas a: " "%d?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" "¿Desea establecer la etiqueta del título de TODAS las pistas seleccionadas " "a: %s?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">por</span></small> %s <small><span weight=" "\"light\">en</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">por</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">en</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Pista anterior" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Reproducir o pausar la reproducción" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Detener la reproducción" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Pista siguiente" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Salir de pantalla completa" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Reproducir canciones en orden aleatorio" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Repetir lista de reproducción al finalizar" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "día" msgstr[1] "días" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "No se pudo abrir el navegador" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Error al reproducir la pista actual.</b>\n" "(%s)\n" "<b>Motivo:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Detener" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Siguiente" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Seleccione un archivo para reproducir" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Archivos compatibles" #: ../src/pragha.c:309 msgid "All files" msgstr "Todos los archivos" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Escriba el URL de un flujo de radio por Internet" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Proporcione un nombre para guardarlo" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Añadir una dirección" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "Matías <mati86_dl@gmail.com>, 2009-2012\n" "Adolfo Jayme Barrientos <fito@libreoffice.org>, 2014" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Reproductor de música Pragha" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Reproductor de música" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Escuche y administre su música" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Buscar etiquetas en AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID no se encontró ninguna canción parecida" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "CD de audio/datos" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Se insertó un CD de audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Añadir _CD de audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "CD de audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Dispositivo de CD de audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Conectar con un servidor CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ignorar" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Buscar música en un servidor DLNA" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Se ha añadido música del servidor %s." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "No se pudo encontrar ningún servidor DLNA." #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Me encanta" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Ya no me encanta" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importar lista de reproducción XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Añadir favoritos" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Añadir similares" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "No se pudo establecer la conexión con Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm sugiere una corrección en las etiquetas" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Falló la adición de la pista a las favoritas de Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Falló la eliminación de la pista de las favoritas de Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Se agregaron %d canciones de %d sugeridas por Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm no sugiero ninguna canción similar." #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Se agregaron %d canciones de las ultimas %d favoritas en Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "No tienes canciones favoritas en Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Fallo al agregar la canción a tu perfil de Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Se agrego la canción a tu perfil de Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "No se pudo actualizar la canción actual en Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Scrobble en Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Usuario" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Contraseña" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Pista" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "por <b>%s</b> en <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notificaciones" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Mostrar portada del álbum en las notificaciones" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Agregar acciones para cambiar de pista en las notificaciones" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "No se puede acceder a «%s»" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Dispositivo extraíble" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "¿Quiere gestionar el volumen «%s»?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "Buscar _letra" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "Buscar información del _artista" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Información de la pista" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" "Descargar la portada del álbum durante la reproducción de sus canciones." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Letra proporcionada por %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Información del artista" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">gracias a</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "No se encontró la letra." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "No se encontró la información del artista." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Buscando..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Buscar radio en TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Buscar en TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Resaltar filas en la lista de reproducción actual" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Usar interfaz de Gnome 3" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/fr.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000107377�13435240150�0014362�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Anthony Jorion <pingax@frugalware.org>, 2013-2015 # Anthony Jorion <pingax@frugalware.org>, 2013 # Julien Sansous <bambou_puravida@hotmail.com>, 2012 # Julien Sansous <bambou_puravida@hotmail.com>, 2012 # Anthony Jorion <pingax@frugalware.org>, 2011 # raphaelh <raphael.huck@gmail.com>, 2011 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-02-16 22:10+0000\n" "Last-Translator: Anthony Jorion <pingax@frugalware.org>\n" "Language-Team: French (http://www.transifex.com/p/Pragha/language/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Non" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Oui" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Voulez-vous importer %s à la bibliothèque ?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Voulez-vous mettre à jour votre librairie musicale ?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Certains changements nécessitent de redémarrer pragha." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "NOM DE FICHIER" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Utilisez --help pour obtenir une liste complète des options disponibles de " "la ligne de commande." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Désactivé" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Classique" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Grave" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Grave et aigus" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Aigus" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Hauts-parleurs du portable et casque" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Grande salle" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Live" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Fête" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Personnalisé" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Egaliseur" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Artiste inconnu" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Album inconnu" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Rechercher dans la liste de lecture." #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Fermer" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Ajouter à la liste de lecture" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Aller à" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "Passer" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Tout passer" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Tout _supprimer" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Maximiser la vue de la bibliothèque" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Minimiser la vue de la bibliothèque" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Structure des dossiers" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artiste" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Genre" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artiste / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Genre / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Genre / Artiste" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Genre / Artiste / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Ajouter la liste de lecture courante" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Remplacer la liste de lecture courante" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Remplacer et _jouer" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Renommer" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Enlever" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exporter" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Modifier les étiquettes" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "_Mettre à la corbeille" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Enlever de la bibliothèque" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Inconnu" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Genre inconnu" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" "Le fichier ne peut être déplacé vers la corbeille. Le supprimer " "définitivement ?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Le fichier \"%s\" ne peut être mis à la corbeille. Détails : %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Annuler" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Supprimer" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Listes de lecture" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radios" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Bibliothèque" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Êtes-vous sûr de mettre les fichiers à la corbeille ?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" "Supprimer de manière permanente au lieu de les déplacer vers la corbeille" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Êtes-vous sûr de vouloir supprimer la sélection de la bibliothèque ?\n" "\n" "Attention: Pour récupérer, il faut rescanner toute la bibliothèque." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Lecture" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Liste de lecture" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Vue" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Outils" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Aide" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Piste précédente" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Lecture / Pause" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Arrêter" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Piste suivante" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Editer les étiquettes de la piste" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Quitter" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Ajouter des fichiers" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Ouvrir un fichier multimédia" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Ajouter _emplacement" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Ajouter la bibliothèque" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Enlever la séléction de la liste de lecture" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Récupérer la liste de lecture" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Effacer la liste de lecture" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Sauvegarder la liste de lecture" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nouvelle liste de lecture" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Sauvegarder la sélection" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Chercher dans la liste de lecture" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Préférences" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "_Aller au morceau en cours de lecture" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "Egaliseur" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Rescanner la bibliothèque" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Mise à jour de la bibliothèque" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistiques" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Site Internet" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Communauté" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Traduire Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "À propos" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "Lecture a_léatoire" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "Lecture en _boucle" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Plein écran" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Panneau latéral" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Second panneau latéral" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Contrôles de lecture en dessous" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Barre d'état" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Pistes :" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Artistes :" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Albums :" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistiques" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Titre" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Débit binaire" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Année" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Commentaire" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Durée" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nom du fichier" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Type MIME" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Enlever de la liste de lecture" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Enlever de la liste de lecture" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Envoyer à" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Copier \"%s\" aux albums sélectionnés" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Copier \"%s\" aux genres sélectionnés" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Copier \"%i\" aux années sélectionnées" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Copier \"%s\" aux commentaires sélectionnés" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Piste" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Annule le tri" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Liste de lecture" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Ok" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> est un nom de liste de lecture réservé" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Voulez-vous remplacer la liste de lecture: %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Choisir un nouveau nom" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Voulez-vous effacer le champ: %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exporter la liste de lecture dans un fichier" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Enregistrer" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "%d chansons ajoutées depuis %d de la liste de lecture importée." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Que voulez-vous faire ?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Remplace la liste de lecture \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Ajouter à la liste de lecture \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Les motifs doivent être de la forme : <nom du fichier>;<nom du fichier>;...\n" "Un maximum de six motifs est autorisé.\n" "Les wildcards ne sont pas encore acceptés (les patchs sont les " "bienvenus :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Motif à l'emplacement de la Pochette" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Démarrer normalement" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Démarrer en mode plein écran" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Démarer minimisé" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Sélectionner un répertoire à ajouter à la bibliothèque" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Ouvrir" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Pilote audio" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Redémarrage obligatoire" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Périphérique audio" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Utiliser un logiciel de mixage" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "Impossible de changer de dossier durant leur analyse." #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Répertoires" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Ajouter" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Supprimer" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Fusionner les dossiers dans la vue hiérarchique" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Trier les albums par année de sortie" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Apparence" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Contrôles" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Montrer la pochette d'album dans le panneau" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Taille de la pochette" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Motif à l'emplacement de la pochette" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Recherche" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Recherche lors de la frappe" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Rechercher des mots similaires" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Lors du lancement de pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Se rappeler de la disposition de la fenêtre" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Restaurer la dernière liste de lecture" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Lors de l'ajout de dossiers" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Ajouter les fichiers récursivement" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Bureau" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Afficher l'icône de pragha dans la zone de notification" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Minimiser Pragha lors de la fermeture de la fenêtre" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Greffons" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Préférences" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Général" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Services" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Préférences de Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i fichiers analysés sur %i détectés" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Recherche de fichiers à analyser" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Scan de la bibliothèque terminé" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Arrêté</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Piste n°" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Fichier" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Détails" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "canal" msgstr[1] "canaux" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Chaînes" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Fréquence d'échantillonnage" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Répertoire" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Sélection vers" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Ouvrir le répertoire" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" "Désirez-vous modifier le numéro de piste à TOUTES les pistes sélectionnées " "pour le numéro : %d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" "Désirez-vous modifier la balise titre de TOUTES les pistes sélectionnées " "pour : %s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">par</span></small> %s <small><span weight=" "\"light\">de</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">par</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">de</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Piste précédente" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Lecture / Pause de la piste" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Arrêter la lecture" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Piste suivante" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Quitter le mode plein écran" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Lire les morceaux en ordre aléatoire" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Répéter la lecture jusqu'à la fin" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "jour" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Impossible d'ouvrir le navigateur" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Erreur à la lecture de la piste courante</b>⏎\n" "(%s)⏎\n" "<b>Raison:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Arrêter" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Suivant" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Sélectionner un fichier à jouer" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Fichiers pris en charge" #: ../src/pragha.c:309 msgid "All files" msgstr "Tous les fichiers" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Entrer l´URL d´un flux radio internet" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Nommer pour enregistrer" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Ajouter un emplacement" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "Raphaël Huck <raphael.huck@gmail.com>\n" "Olivier Karquel <yellowspoon@free.fr>\n" "Raphael Tournoy <lexpas@free.fr>\n" "Laurent Coudeur <laurentc@iol.ie>\n" "Stéphane Raimbault <stephane.raimbault@gmail.com>\n" "Robert-André Mauchin <zebob.m@pengzone.org>\n" "Quentin Peten <hidden e-mail>" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Lecture de musique Pragha" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Lecteur de musique" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Gérer et écouter de la musique" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Rechercher des mots-clés sur AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID n'a trouvé aucun titre similaire" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "CD Audio/de données" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Un CD audio a été inséré" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Ajouter le _CD audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Disque audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Périphérique CD Audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Se connecter au serveur CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ignorer" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "J'aime cette piste" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Je n'aime plus cette piste" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importer une liste de lecture XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Ajouter aux favoris" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Ajouter des pistes similaires" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Impossible d'établir une connexion avec Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm a suggéré la correction de l´étiquette" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "J´aime cette chanson sur Last.fm échoué" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "L'action \"retirer des coup de coeur\" sur Last.fm a échoué" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "%d pistes ajoutés sur %d suggestions de Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm ne propose aucun titre similaire" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "%d pistes ont été ajoutées parmi les %d dernières aimées sur Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Vous n'avez pas de morceaux favoris sur Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "La soumission à Last.fm a échoué" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Piste soumise à Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Mise à jour de la chanson en cours sur Last.fm échouée" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Publier sur Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Identifiant" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Mot de passe" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Piste n°" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "par <b>%s</b> dans <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notifications" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Afficher les pochettes des albums dans les notifications" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Ajouter les actions sur les pistes dans les notifications" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Impossible d'accéder à \"%s\"" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Périphérique amovible" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Informations sur la chanson" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Télécharger la pochette de l'album pendant la lecture des morceaux." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Paroles fournies par %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Informations sur l'artiste" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">grâce à</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Les paroles n'ont pas été trouvées." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Aucune information disponible sur l'interprète." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Recherche..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Rechercher une radio sur TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Rechercher sur TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Surligner les lignes dans la liste de lecture courante" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/hu.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000101570�13435240150�0014354�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Péter Polonkai <polesz@nedudu.hu>, 2012 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Hungarian (http://www.transifex.com/p/Pragha/language/hu/)\n" "Language: hu\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Valóban importálja a %s gyűjteményt?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Ismeretlen előadó" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Ismeretlen album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Hozzáadás a lejátszási sorhoz" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "Ki_hagy" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Mind _kihagy" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Mind törlése" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "Gyűjt_emény kinyitása" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "Gyűjtemény _összezárása" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Mappák struktúrája" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Előadó" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Műfaj" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Előadó / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Műfaj / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Műfaj / Előadó" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Műfaj / Előadó / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Hozzáadás az aktuális lejátszólistához" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Lecseréli az aktuális lejátszólistát" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "_Aktuális listát cseréli és elindítja a lejátszást" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Átnevezés" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Törlés" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Export" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Címkék szerkesztése" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Mozgat_ás a kukába" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Törlés a gyűjteményből" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Ismeretlen" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Ismeretlen műfaj" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "A \"%s\" fájl mozgatása a kukába sikertelen. Részletek: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Lejátszólisták" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Rádiók" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Gyűjtemény" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Valóban a kukába szeretné dobni a fájlokat?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Valóban töröli akarja az aktuális fájlt a gyűjteményből?\n" "\n" "Figyelem: Ahhoz hogy helyreállítsa újra kell ellenőrizni a gyűjteményt." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "L_ejátszás" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Lejátszólista" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Nézet" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "E_szközök" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Súgó" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Lejátszás / Szünet" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Megállítás" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Következő sáv" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Dal információ szerkesztése" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Kilépés" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "Fájlok hozzá_adása" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Média fájl megnyitása" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "He_ly hozzáadása" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "Hozzá_adás a gyűjteményhez" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Kijelölt eltávolítása a lejátszólistáról" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Lejátszólista vágása" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Lejátszólista törlése" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Lejátszólista mentése" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Új lejátszólista" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Kiválasztás mentése" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "Kere_sés a lejátszólistában" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Beállítások" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Ugrás a most szóló számra" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "_Hangszínszabályzó" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "Gyűjtemény új_raolvasása" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "Gyűjtemény _frissítése" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statisztika" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Honlap" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Közösség" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Pragha fordítása" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Névjegy" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "Véletlen_szerű" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Ismétlés" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Teljes képernyő" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Oldalsó _panel" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Lejátszás vezérlőgombok alulra" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Státusz sor" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Összes sáv:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Összes előadó:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Összes album:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statisztika" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Cím" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitráta" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Év" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Megjegyzés" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Hossz" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Fájlnév" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Eltávolítás a lejátszólistáról" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "\"%i\" kiválasztott sávszám másolása" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "\"%s\" kiválasztott cím másolása" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "\"%s\" kiválasztott előadó másolása" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "\"%s\" kiválasztott album másolása" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "\"%s\" kiválasztott műfaj másolása" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "\"%i\" kiválasztott év másolása" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "\"%s\" kiválasztott megjegyzés másolása" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Sáv" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Rendezés törlése" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> egy védett lejátszólista neve" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Valóban felül akarja írni ezt a lejátszólistát: %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Válasszon új nevet" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Valóban törölni akarja ezt az elemet: %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Lejátszólista exportálása fájlba" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Hozzáadva %d dal, %d az importált lejátszólistán." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Az alábbi minták lehetnek:<fájlnév>;<fájlnév>;...\n" "Maximum hat minta lehetséges.\n" "Helyettesítők nem elfogadottak jelenleg ( patchet fogadunk :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Album borító minta" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Normál indítás" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Indítás teljes képernyőn" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Indítás tálcaikonnal" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Válasszon mappát amit hozzáad a gyűjteményhez" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Audio választás" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Újraindítás szükséges" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Audio eszköz" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Szoftveres keverő használata" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Mappák" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Mappák összevonása a struktúra nézetben" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Albumok rendezése kiadás éve szerint" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Megjelenés" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Album borító mutatása a panelen" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Album borító mérete" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Album borító fájlnév minta" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Jegyezze meg az ablak méretét" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Utolsónak használt lejátszólista visszaállítása" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Fájlok hozzáadása rekurzívan" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Általános" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Pragha beállításai" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Gyűjtemény ellenőrzés sikeres" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Nincs lejátszás</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Sáv száma" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Fájl" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Részletek" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Csatornák" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Mintavétel" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Mappa" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Kijelölés" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Mappa megnyitása" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Szeretné beállítani a sáv számát az ÖSSZES kijelölt dalra: %d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Szeretné beállítani a címet az ÖSSZES kijelölt dalra: %s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">előadó<//span><//small> %s <small><span " "weight=\"light\">album</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">előadó</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">album</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Előző sáv" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Sáv Lejátszása / Megállítása" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Lejátszás megállítása" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Következő sáv" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Teljes képernyő elhagyása" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Számok lejátszása véletlenszerű sorrendben" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Lejátszólista ismétlése" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "nap" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "A böngésző megnyitása sikertelen" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Hiba az aktuális dal lejátszásakor.</b>\n" "(%s)\n" "<b>Ok:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Fáj választása lejátszáshoz" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Támogatott formátumok" #: ../src/pragha.c:309 msgid "All files" msgstr "Minden fájl" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Adja meg az internet rádió URL-jét" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Adjon neki egy nevet a mentéshez" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Hely hozzáadása" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Polonkai Péter" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Zenei _CD hozzáadása" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Audio CD eszköz" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Kapcsolódás a CDDB szerverhez" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Kedvelt szám" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Nem kedvelt szám" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "XSPF lejátszólista importálása" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Hozzáadás a kedvencekhez" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Hasonló hozzáadása" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm által javasolt címke" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Kedvelt szám megjelölés Last.fm-en sikertelen." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Hozzáadva %d dal az utolsó %d Last.fm-en kedvelt dal közül." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Aktuális dal frissítése a Last.fm-en sikertelen." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Felhasználónév" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Jelszó" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Sáv száma" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "by <b>%s</b> / <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Értesítések" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Album borító mutatása az értesítési területen" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "Sorok kiemelés az aktuális lejátszólistán" ����������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/it.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000101665�13435240150�0014361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Diego Principe <cdprincipe@gmail.com>, 2013 # Edoardo Maria Elidoro <edoardo.elidoro@gmail.com>, 2013 # Giuseppe D. B. <giuped@gmail.com>, 2012 # matias <mati86dl@gmail.com>, 2011 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Italian (http://www.transifex.com/p/Pragha/language/it/)\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Vuoi importare %s nella collezione?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Disabilitato" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Classica" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Bassi pieni" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Bassi e Alti pieni" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Alti pieni" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Computer portatili e Cuffie" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Dal vivo" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Festa" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Raggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Personalizzato" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Equalizzatore" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Artista sconosciuto" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Album sconosciuto" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Aggiungi alla coda di riproduzione" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Salta" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "S_alta tutti" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Elimina _tutti" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Espande collezione" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Collassa collezione" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Albero delle cartelle" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artista" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Genere" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artista / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Genere / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Genere / Artista" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Genere / Artista / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Aggiungi alla playlist attuale" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Sostituisci la playlist attuale" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Sostituisci e ri_produci " #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Rinominare" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Eliminare" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Esportare" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Modifica tags" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Sposta nel ces_tino" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Elimina dala collezione" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Sconosciuto" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Genere sconosciuto" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Il file \"%s\" non si può spostare nel cestino. Dettagli: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Playlists" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radio" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Collezione" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Sicuro di voler cestinare i file?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Sicuro di voler eliminare il file dalla collezione?\n" "\n" "Attenzione: Per recuperarlo occorre una nuova scansione completa. " #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Riproduzione" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Play_list" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Vista" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Strumenti" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Aiuto" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Play / Pausa" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stop" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Brano succesivo" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Edita informazioni del brano" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Esci" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Aggiungere file" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Apri un file multimediale" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Aggiungi _indirizzo" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Aggiungi la collezione" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Rimuovere la selezione dalla playlist" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Taglia playlist" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Pulisci playlist" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Salva playlist" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nuova playlist" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Salva selezione" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Cerca nella playlist" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Preferenze" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Passa al brano attuale" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_qualizzatore" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Riesplora la collezione" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Aggiorna collezione" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistiche" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Homepage" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Community" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Traduci Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Info" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Casuale" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Ripeti" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Schermo intero" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Panello laterale" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Controlli di riproduzione in basso" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Barra di stato" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Total Tracks:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Total Artists:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Total Albums:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistics" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Titolo" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitrate" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Anno" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Commento" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Durata" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nome file" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Rimuovi dalla playlist" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Brano" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Pulisci ordine" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Playlist" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> è un nome playlist riservato " #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Vuoi sovrascrivere la playlist: %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Scegliere un nuovo nome" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Vuoi eliminare questo item: %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Esporta playlist in un file" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Aggiunti %d brani dei %d nella playlist importata." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Cosa vuoi fare?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Sostituisci la playlist \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Aggiungi alla playlist \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Album art pattern" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Avvio normale" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Avvio a schermo intero" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Avvio nella system tray" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Selezionare una cartella da aggiungere alla collezione" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Audio sink" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Richiesto Riavvio" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Dispositivo audio" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Usa software mixer" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Cartelle" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Unire le cartelle nella vista ad àlbero" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Ordina gli album per anno d'incissione" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Aspetto" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Controlli" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Mostra Copertina Album nel Panello" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Dimensioni della copertina del album" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Album art file pattern" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Cerca" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Quando Pragha viene avviato" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Ricorda l'ultima posizione della finestra" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Ripristina l'ultima playlist" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Quando vengono aggiunte cartelle" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Aggiungere i file in modo ricorsivo" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Scrivania" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Mostra l'icona di Pragha nell'area di notifica" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Generale" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Servizi" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Preferenze di Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i file analizzati su %i identificati" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Sto cercando i file da analizzare" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Esplorazione collezione completata" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Nessun brano in riproduzione</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Track No" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "File" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Dettagli" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Canali" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Samplerate" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Cartella" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Selezione a" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Apri cartella" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">per</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">per</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Brano Precedente" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Play / Pausa Brano" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Ferma riproduzione" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Brano Successivo" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Esci dallo schermo Intero" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Riproduci i brani in ordine casuale" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Ripetere la playlist al termine" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "giorno" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Impossibile aprire il browser" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Selezionare un file da riprodurre" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Tipi di file supportati" #: ../src/pragha.c:309 msgid "All files" msgstr "Tutti i file" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Introdurre URL di una internet radio stream" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Nome con il quale la vuoi salvare " #: ../src/pragha.c:405 msgid "Add a location" msgstr "Aggiungi un indirizzo" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "Grazie a tutti i Traduttori:\n" "\tCzech: Thanks alois.nespor\n" "\tJapanes:Thanks Masato hashimoto.\n" "\tPortuguese-Brazil: Tanks Lyceuhns.\n" "\tRussian: Thanks to Evgen.\n" "\tUkrainian: Thanks to Evgen.\n" "\tSpain: Thank to msdelos.\n" "\tGerman: Thanks to PhotonX.\n" "\tFrench: Thanks to Alois Halel.\n" "\tItalian: Thanks to Bersil." #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Riproduttore Musicale" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Gestisci e ascolta la musica" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Aggiungere CD Audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Dispositivo CD audio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Connetti con server CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Brano preferito" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Togli brano da i miei preferiti" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importa un file XSPF della playlist" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Aggiungi a preferiti" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Aggiungi simili" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm suggerisce una correzione a un tag" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Impossibile aggiungere a i tuoi preferiti." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Impossibile rimuovere il brano dai preferiti su Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Aggiunti %d brani degli ultimi %d preferiti in Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "impossibile aggiornare il brano attuale in Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Utente" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Password" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Track No" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "per <b>%s</b> in <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notifiche" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Mostra copertina del album nelle notifiche" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "Highlight rows on current playlist" ���������������������������������������������������������������������������pragha-1.3.4/po/ja.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000075342�13435240150�0014341�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Masato HASHIMOTO <cabezon.hashimoto@gmail.com>, 2009 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Japanese (http://www.transifex.com/p/Pragha/language/ja/)\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "アーティスト不明" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "アルバム不明" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "ライブラリを展開(_E)" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "ライブラリを折り畳む(_C)" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "アーティスト" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "アルバム" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "ジャンル" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "アーティスト / アルバム" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "ジャンル / アルバム" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "ジャンル / アーティスト" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "ジャンル / アーティスト / アルバム" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "削除" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "エクスポート" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "タグの編集" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "ライブラリから削除" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "ジャンル不明" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "プレイリスト" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "ライブラリ" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "表示(_V)" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "ツール(_T)" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "ヘルプ(_H)" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "再生/一時停止" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "停止" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "次のトラック" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "終了(_Q)" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "ファイルの追加(_A)" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "メディアファイルを開きます" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "プレイリストのクリア" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "プレイリストの保存" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "選択した楽曲の保存" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "設定(_P)" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "再生中の曲へ" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "ライブラリの再スキャン(_R)" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "ライブラリの更新(_U)" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "統計(_S)" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "ホームページ" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "コミュニティ" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "情報" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "シャッフル(_S)" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "繰り返し(_R)" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "全画面化(_F)" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "垂直パネル(_P)" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "ステータスバー" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "総トラック数:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "総アーティスト数:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "総アルバム数:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "統計情報" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "タイトル" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "ビットレート" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "年" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "時間" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "ファイル名" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "トラック" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "ソートの解除" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> は予約されたプレイリスト名です" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "プレイリストのファイルへのエクスポート" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "パターンの書式は <filename>;<filename>;.... です。\n" "最大6個まで設定できます。\n" "ワイルドカードは現在使用できません (パッチ歓迎)。" #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "アルバムアートのパターン" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "ライブラリに追加するフォルダを選択してください" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "オーディオ" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "オーディオシンク" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "再起動が必要です" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "オーディオデバイス" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "ソフトウェアミキサーを使用する" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "フォルダ" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "パネルにアルバムアートを表示する" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "アルバムアートのサイズ" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "アルバムアートのファイルパターン" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "一般" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "ライブラリのスキャンが完了しました" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>再生していません</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "トラック番号" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "チャンネル" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "サンプルレート" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">by</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "前のトラック" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "トラックの再生/一時停止" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "停止" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "次のトラック" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "日" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "ブラウザを表示できません" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "再生するファイルを選択してください" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "サポートメディア" #: ../src/pragha.c:309 msgid "All files" msgstr "全てのファイル" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Masato Hashimoto <cabezon.hashimoto@gmail.com>, 2009." #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "オーディオ CD デバイス" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "CDDB サーバに接続する" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "ユーザ名" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "パスワード" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "トラック" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/ko_KR.po����������������������������������������������������������������������������0000664�0000000�0000000�00000107242�13435240150�0014747�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # woosuk park <bjh13579@gmail.com>, 2013-2015 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-02-21 16:06+0000\n" "Last-Translator: woosuk park <bjh13579@gmail.com>\n" "Language-Team: Korean (Korea) (http://www.transifex.com/p/Pragha/language/" "ko_KR/)\n" "Language: ko_KR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "아니요 (_N)" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "예 (_Y)" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "%s을 라이브러리로 가져 오시겠습니까?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "음악 라이브러리를 업데이트 하시겠습니까?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "몇몇 변경사항을 적용하시려면 Pragha를 재시작하여야 됩니다." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "파일 명" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "--help를 사용하시면, 커맨드 라인에서 사용할수 있는 모든 명령들의 목록을 보실" "수 있습니다." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "해제" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Classical" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Full Bass" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Full Bass and Treble" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Full Treble" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "노트북 스피커 & 헤드폰" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Large Hall" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Live" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Party" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Smiley Face Curve" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "사용자 정의" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "이퀄라이저" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "알려지지 않은 아티스트" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "알려지지 않은 앨범" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "플레이리스트내 검색" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "닫기 (_C)" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "되감기 큐 추가" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "이동 (_J)" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "넘기기 (_S)" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "모두 넘기기 (_K)" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "전체 삭제 (_A)" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "라이브러리 펼치기 (_E)" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "라이브러리 접기 (_C)" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "폴더 구조" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "아티스트" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "앨범" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "장르" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "아티스트 / 앨범" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "장르 / 앨범" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "장르 / 아티스트" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "장르 / 아티스트 / 앨범" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "현재 플레이리스트에 추가(_A)" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "현재 플레이리스트 대체(_R)" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "대체하고 재생하기(_p)" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "이름 변경" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "삭제" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "내보내기" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "태그 수정" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "휴지통으로 이동(_T)" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "라이브러리에서 삭제" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "알수 없음" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "알수없는 장르" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "파일을 휴지통으로 이동할수 없습니다. 파일을 영구 삭제하시겠습니까?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "\"%s\" 파일을 휴지통으로 이동할수 없습니다. 이유는 다음과 같습니다: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_취소" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_삭제" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "플레이리스트" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "라디오" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "라이브러리" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "이 파일을 휴지통에 버리시겠습니까?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "휴지통으로 보내는 대신 바로 삭제" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "라이브러리에 저장된 현 파일을 삭제하시겠습니까?\n" "\n" "경고: 복구하실려면 전체 라이브러리를 다시 스캔해야 합니다." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "되감기 (_P)" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "플레이리스트 (_l)" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "보기 (_V)" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "도구 (_T)" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "도움말 (_H)" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "이전 트랙" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "재생 / 일시정지" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "정지" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "다음 트랙" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "트랙 정보 수정" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "종료 (_Q)" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "파일 추가 (_A)" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "미디어 파일 열기" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "주소 추가 (_l)" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "라이브러리 추가하기 (_A)" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "플레이리스트에서 선택한 항목 삭제" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "플레이리스트 자르기" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "플레이리스트 취소" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "플레이리스트 저장" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "새 플레이리스트" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "선택한 곡 리스트 저장" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "플레이리스트내 검색 (_S)" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "설정 (_P)" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "재생중인 음악으로 이동" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "이퀄라이저 (_Q)" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "라이브러리 다시 스캔 (_R)" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "라이브러리 업데이트 (_U)" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "통계 (_S)" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "홈페이지" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "커뮤니티" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "위키" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Pragha 번역하기" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "대하여" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "무작위 재생 (_S)" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "반복 (_R)" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "전체화면 (_F)" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "옆 패널 (_P)" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "추가적인 옆 패널" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "재생 컨트롤 아래로 보내기" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "메뉴바" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "상태 바" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "총 트랙수:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "총 아티스트 수:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "총 앨범 수:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "통계" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "음악 제목" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "비트레이트" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "년" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "주석" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "길이" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "파일명" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "MIME 유형" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "플레이백 큐에서 제거" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "플레이리스트에서 삭제" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "보내기 (_S)" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "선택된 \"%i\" 트랙 번호 복사" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "선택된 제목 \"%s\"을 복사" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "선택된 아티스트 \"%s\"를 복사" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "선택된 앨범 \"%s\"을 복사" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "선택된 장르 \"%s\" 을(를) 복사" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "선택된 \"%i\" 년을 복사" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "선택된 주석 \"%s\" 을(를) 복사" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "트랙" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "선택 취소" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "플레이리스트" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "확인 (_O)" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b>는 예약된 플레이리스트 이름입니다" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "%s 플레이리스트를 겹쳐쓰시겠습니까?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "새로운 이름 선택" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "%s 항목을 삭제하시겠습니까?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "파일로 플레이리스트 내보내기" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "저장 (_S)" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "가져온 플레이리스트에서 %d / %d개의 곡이 추가되었습니다" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "무엇을 원하시는지요?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "\"%s\" 플레이리스트 대체" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "\"%s\" 플레이리스트에 추가" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "패턴은 다음과 같은 형식만 됩니다:<filename>;<filename>;....\n" "최대 패턴 갯수는 6개입니다.\n" "와일드 카드는 현재 지원하지 않습니다 ( 패치 부탁드려요 :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "앨범 아트 패턴" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "일반적으로 시작" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "전체화면으로 시작" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "시스템 트레이에서 시작" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "라이브러리에 추가할 폴더 선택" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "열기 (_O)" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "오디오" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "오디오 싱크" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "재시작 필요" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "오디오 장치" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "소프트웨어 믹서 사용" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "분석 도중에 디렉터리를 변경할 수 없습니다" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "폴더" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "추가 (_A)" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "삭제 (_R)" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "폴더 구조 보기에서 폴더 병합" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "발매 년도대로 앨범 정렬" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "모양" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "제어" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "패널에 앨범 아트 보이기" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "앨범 아트 크기" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "앨범 아트 파일 패턴" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "검색" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "작성하는 동안 검색" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "유사한 단어 검색" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Pragha 시작시" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "마지막 창 상태 기억" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "마지막 플레이리스트 복원" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "폴더 추가시" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "하위 파일들을 추가" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "데스크탑" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Pragha 아이콘을 알림 항목에 보이기" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "창을 닫을때 Pragha 최소화 하기" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "플러그인" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "설정" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "일반" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "서비스" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Pragha 설정" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i / %i 파일 분석됨" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "분석을 위해 파일 검색중" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "라이브러리 스캔 완료" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>재생중인 음악이 없습니다</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "트랙 번호" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "파일" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "상세사항" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "채널" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "채널" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "샘플레이트" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "폴더" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "로 선택" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "폴더 열기" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "선택된 트랙의 번호를 모두 %d 로 바꾸시겠습니까?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "선택된 트랙의 제목 태그를 모두 %s로 바꾸시겠습니까?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">, </span></small> %s <small><span weight=" "\"light\">곡, </span></small> %s 앨범" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">, </span></small> %s가 작곡" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">, </span></small> %s 앨범수록곡" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "이전 트랙" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "트랙 재생 / 일시정지" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "되감기 멈추기" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "다음 트랙" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "전체화면에서 나가기" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "임의 순서로 음악 재생" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "플레이 리스트 마지막에 갔을시 반복" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "일" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "브라우저를 열 수 없습니다" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>현재 트랙을 재생하는데 오류가 발생했습니다.</b>\n" "(%s)\n" "<b>원인:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "멈춤 (_S)" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "다음 (_N)" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "선택한 파일 재생" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "지원하는 미디어" #: ../src/pragha.c:309 msgid "All files" msgstr "전체 파일" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "인터넷 라디오 스트림의 URL을 입력해주세요" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "저장할 이름을 입력해주세요" #: ../src/pragha.c:405 msgid "Add a location" msgstr "주소 추가" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "번역자 크레딧" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha 음악 플레이어" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "음악 플레이어" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "음악을 관리하고 들으세요" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "AcoustID에서 태그 검색" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID 에서 유사한 곡을 찾지 못했습니다" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "음악 / 데이터 CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "오디오 CD가 삽입되었습니다" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "오디오 CD 추가(_C)" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "오디오 CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "오디오 CD 장치" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "CDDB 서버에 접속" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "무시" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "DNLA 서버에서 음악 검색" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "%s 서버의 음악이 추가되었습니다." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "DLNA 서버를 찾을 수 없습니다" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Last.fm (_L)" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "특히 좋아하는 곡 설정" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "특히 좋아하는 곡 해제" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "XSPF 플레이리스트 가져오기" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "좋아하는 노래 추가" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "유사한 노래 추가" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Last.fm 에 접속할수 없습니다" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm 이 태그 수정을 제안했습니다" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Last.fm에 특히 좋아하는 곡으로 지정 실패함" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Last.fm에 특히 좋아하는 곡 해제 실패함" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Last.fm에서 추천한 %d / %d개의 곡이 추가되었습니다" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm이 비슷한 노래를 제안하지 않았습니다." #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "%d 곡들을 Last.fm의 특히 좋아하는 곡 %d 에 추가했습니다" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Last.fm 에 좋아하는 곡이 없습니다." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Last.fm에 제출 실패함" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Last.fm 트랙 스크로블하기" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "현 음악을 Last.fm에 업데이트 하는데 실패했습니다." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Last.fm 스크로블하기" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "사용자명" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "비밀번호" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "트랙" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "<b>%s</b> 의 <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "알림" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "알림에 앨범 아트 보이기" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "트랙 변경시 알림 영역에 액션 추가하기" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "\"%s\"에 접근할수 없음" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "제거가능한 장비" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "\"%s\" 볼륨을 관리하시겠습니까?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "가사 검색 (_L)" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "아티스트 정보 검색 (_A)" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "곡 정보" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "음악을 재생하는 동안 앨범 아트를 다운로드." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "%s 님이 가사를 제공 하셨습니다" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "아티스트 정보" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" "%s <small><span weight=\"light\">이 사용자분에게 감사를 보냅니다: </span></" "small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "가사를 찾을수 없습니다" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "아티스트 정보를 찾을수 없습니다" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "검색중..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "TuneIn 라디오 검색하기" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "TuneIn 검색" #~ msgid "Highlight rows on current playlist" #~ msgstr "현재 플레이리스트 줄에서 강조하기" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Gnome 3 HIG 사용" ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/lt.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000104210�13435240150�0014351�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Moo, 2015 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-07-11 19:32+0000\n" "Last-Translator: Moo\n" "Language-Team: Lithuanian (http://www.transifex.com/p/Pragha/language/lt/)\n" "Language: lt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" "%100<10 || n%100>=20) ? 1 : 2);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Ne" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Taip" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Ar norėtumėte importuoti %s į fonoteką?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Ar norėtumėte atnaujinti savo muzikinę fonoteką?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Kai kuriems pakeitimams reikia iš naujo paleisti Pragha." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "FAILO PAVADINIMAS" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Naudokite --help, kad pamatytumėte pilną prieinamų komandų eilutės parinkčių " "sąrašą." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Išjungtas" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Klasikinė" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Klubas" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Šokiai" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Pilni Žemi Tonai" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Pilni Žemi ir Aukšti Tonai" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Pilni Aukšti Tonai" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Nešiojamojo Kompiuterio Garsiakalbiai ir Ausinės" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Didelė Salė" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Gyvai" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Vakarėlis" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Regis" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rokas" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Šypsenėlės Linija" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Švelni" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Lengvasis Rokas" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Pasirinktinis" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Glodintuvas" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Nežinomas Atlikėjas" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Nežinomas Albumas" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Ieškoti grojaraštyje" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Užverti" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Pridėti į grojimo eilę" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Peršokti į" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "Pralei_sti" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Išskleisti fonoteką" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Suskleisti fonoteką" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Aplankų struktūra" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Atlikėjas" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Albumas" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Žanras" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Atlikėjas / Albumas" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Žanras / Albumas" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Žanras / Atlikėjas" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Žanras / Atlikėjas / Albumas" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Pridėti prie esamo grojaraščio" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "P_akeisti esamą grojaraštį" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Pakeisti ir _groti" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Pervadinti" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Ištrinti" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Eksportuoti" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Keisti žymes" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Perkelti į š_iukšlinę" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Ištrinti iš fonotekos" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Nežinomas Žanras" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "Failas negali būti perkeltas į šiukšlinę. Ištrinti negrįžtamai?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Failas \"%s\" negali būti perkeltas į šiukšlinę. Išsamiau: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Atsisakyti" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Grojaraščiai" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radijai" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Fonoteka" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Tikrai norite perkelti failus į šiukšlinę?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Vietoj perkelimo į šiukšlinę, ištrinti negrįžtamai" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Ar tikrai norite ištrinti esamą failą iš fonotekos?\n" "\n" "Įspėjimas: Norint atkurti, reikės iš naujo skenuoti visą fonoteką." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Grojimas" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Gr_ojaraštis" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Rodinys" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "Įr_ankiai" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Pagalba" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Ankstesnis takelis" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Groti / Pristabdyti" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stabdyti" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Kitas takelis" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Keisti takelio informaciją" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Baigti" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Pridėti failus" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Atverti medija failą" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Pridėti _vietą" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "Pridėti _fonoteką" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Šalinti pasirinktus iš grojaraščio" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Apkirpti grojaraštį" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Išvalyti grojaraštį" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Įrašyti grojaraštį" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Naujas grojaraštis" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Įrašyti pasirinktus" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Ieškoti grojaraštyje" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Nuostatos" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Peršokti į šiuo metu grojamą dainą" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "_Glodintuvas" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Iš naujo skenuoti fonoteką" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Atnaujinti fonoteką" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistika" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Interneto svetainė" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Bendruomenė" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Versti Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Apie" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Maišyti" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Kartoti" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Visas ekranas" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Šoninis _skydelis" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Antrinis šoninis skydelis" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Grojimo valdikliai apačioje" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Meniu juosta" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Būsenos juosta" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Viso Takelių:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Viso Atlikėjų:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Viso Albumų:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistika" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Pavadinimas" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Pralaidumas" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Metai" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Komentaras" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Trukmė" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Failo pavadinimas" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "MIME tipas" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Šalinti iš grojimo eilės" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Šalinti iš grojaraščio" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Takelis" msgstr[1] "Takeliai" msgstr[2] "Takelių" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Išvalyti rikiavimą" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Grojaraštis" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Gerai" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Ar norite perrašyti grojaraštį: %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Pasirinkite naują pavadinimą" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Ar norite ištrinti elementą: %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Eksportuoti grojaraštį į failą" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Ką norite daryti?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Pakeisti grojaraštį \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Pridėti į grojaraštį \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Šablonai turėtų būti tokios formos:<failo pavadinimas>;<failo " "pavadinimas>;....\n" "Daugiausiai leidžiami šeši šablonai.\n" "Pakaitos simboliai kol kas nėra priimami ( programos taisiniai yra " "sveikintini :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Albumo viršelio šablonas" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Paleisti įprastai" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Paleisti visame ekrane" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Paleisti sistemos dėkle" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Pasirinkite aplanką, kurį pridėsite į fonoteką" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Atverti" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Garsas" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Garso posistemė" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Reikalingas Paleidimas iš Naujo" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Garso Įrenginys" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Naudoti programinės įrangos maišiklį" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Aplankai" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Pridėti" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "Ša_linti" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Sulieti aplankus į aplankų struktūros rodinį" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Rikiuoti albumus pagal laidos metus" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Išvaizda" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Valdikliai" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Rodyti Skydelyje Albumo viršelį" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Albumo viršelio Dydis" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Albumo viršelio failo šablonas" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Paieška" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Ieškoti, renkant tekstą" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Ieškoti panašių žodžių" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Paleidžiant Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Prisiminti paskutinę lango būseną" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Atkurti paskutinį grojaraštį" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Pridedant aplankus" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Pridėti failus su pakatalogiais" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Darbalaukis" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Rodyti Pragha piktogramą pranešimų srityje" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Suskleisti Pragha, užveriant langą" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Įskiepiai" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Nuostatos" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Bendra" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Tarnybos" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Pragha Nuostatos" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Fonotekos skenavimas užbaigtas" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Negrojama</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Takelio Nr" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Failas" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Išsamiau" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "kanalas" msgstr[1] "kanalai" msgstr[2] "kanalų" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanalai" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Skaitmeninimo dažnis" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Aplankas" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Atverti aplanką" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Ar norite nustatyti VISŲ pasirinktų takelių takelio numerį į: %d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Ar norite nustatyti VISŲ pasirinktų takelių pavadinimo žymę į: %s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">atlieka</span></small> %s <small><span " "weight=\"light\">albume</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">atlieka</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">albume</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Ankstesnis Takelis" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Groti / Pristabdyti Takelį" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Stabdyti grojimą" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Kitas Takelis" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Išeiti iš Viso Ekrano" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Groti dainas atsitiktine tvarka" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Pabaigoje kartoti grojimo sąrašą" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "diena" msgstr[1] "dienos" msgstr[2] "dienų" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Nepavyko atverti naršyklę" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Klaida, grojant esamą takelį.</b>\n" "(%s)\n" "<b>Priežastis:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Stabdyti" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Kitas" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Pasirinkite norimą groti failą" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Palaikoma medija" #: ../src/pragha.c:309 msgid "All files" msgstr "Visi failai" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Įveskite internetinio radijo srauto URL" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Suteikite jam vardą, siekiant įrašyti" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Pridėkite vietą" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Moo" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha Muzikos Grotuvas" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Muzikos Grotuvas" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Tvarkyti ir klausytis muzikos" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Ieškoti žymių per AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID nerado jokios panašios dainos" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Garso/Duomenų CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Buvo įdėtas garso CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Pridėti Garso _CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Garso CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Garso CD Įrenginys" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Nepaisyti" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Ieškoti muzikos DLNA serveryje" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Buvo pridėta %s serverio muzika." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Nepavyko rasti jokio DLNA serverio." #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Patinka takelis" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Nepatinka takelis" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importuoti XSPF grojaraštį" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Pridėti mėgstamus" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Pridėti panašius" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Nepavyko užmegzti ryšio su Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm pasiūlė žymės pataisymą" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm nesiūlo jokių panašių takelių" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Jūs neturite mėgstamų takelių tarnyboje Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Last.fm pateikimas nepavyko" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Esamos dainos atnaujinimas sistemoje Last.fm nepavyko." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Naudotojo vardas" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Slaptažodis" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Takelis" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "atlieka <b>%s</b> albume <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Pranešimai" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Rodyti pranešimuose Albumo viršelį" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Pridėti į pranešimus veiksmus keisti takelį" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Nepavyksta pasiekti \"%s\"" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Dainos Informacija" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Grojant dainą per tarnybas, atsisiųsti albumo viršelį." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Atlikėjo informacija" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Dainos žodžių nerasta." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Atlikėjo informacijos nerasta." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Ieškoma..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Ieškoti radijo per TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Ieškoti sistemoje TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Paryškinti eilutes esamame grojaraštyje" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Naudoti Gnome 3 HIG" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/nl.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000103713�13435240150�0014352�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Heimen Stoffels <vistausss@outlook.com>, 2012 # Johan Bakker <ppine@gmx.com>, 2014 # tuxmachine <info@rickdg.nl>, 2011 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Dutch (http://www.transifex.com/p/Pragha/language/nl/)\n" "Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Nee" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Ja" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Wilt u %s importeren naar de bibliotheek?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Wilt u uw muziek bibliotheek actualiseren?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "BESTANDSNAAM" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "Gebruik --help om om alle beschikbare opdrachtregels te zien." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Uitgeschakeld" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Klassiek" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Maximale Bas" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Maximale Bas en Hoge tonen" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Maximale Hoge tonen" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Laptop Luidsprekers en Koptelefoon" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Grote hal" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Live" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Party" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Glimlachende boog" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Aangepast" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Equalizer" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Onbekende artiest" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Onbekend album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Zoek in de Afspeellijst" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Sluiten" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Toevoegen aan wachtrij" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Spring naar" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Overslaan" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Alles O_verslaan" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "_Alles verwijderen" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Maximaliseer de bibliotheek" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Minimaliseer de bibliotheek" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Mappenstructuur" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artiest" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Genre" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artiest / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Genre / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Genre / Artiest" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Genre / Artiest / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Voeg toe aan huidige afspeellijst" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Vervang huidige afspeellijst" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Vervang en _speel af" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Hernoem" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Verwijder" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exporteer" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Tags bewerken" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Verplaats naar prullenbak" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Verwijder uit de bibliotheek" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Onbekend" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Onbekend genre" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" "Het bestand \"%s\" kon niet naar de prullenbak verplaatst worden. Details: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Annuleren" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Verwijderen" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Afspeellijsten" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radio's" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Bibliotheek" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Weet u zeker dat u het bestand naar de prullenbak wilt verplaatsen?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Permanent verwijderen in plaats van naar de prullenbak verplaatsen." #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Bent U zeker dat U het huidige nummer wilt verwijderen uit de bibliotheek?\n" "\n" "Opgelet: om dit ongedaan te maken, moet de volledige bibliotheek opnieuw " "gescand worden." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Afspelen" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Afspeel_lijst" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Beeld" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Hulpmiddelen" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Hulp" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Vorig nummer" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Afspelen / Pauze" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stop" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Volgend nummer" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Bewerk nummerinformatie" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Afsluiten" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Bestanden toevoegen" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Open een mediabestand" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Voeg _locatie toe" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Voeg de bibliotheek toe" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Verwijder selectie van afspeellijst" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Snijd afspeellijst bij" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Afspeellijst leegmaken" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Afspeellijst bewaren" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nieuwe afspeellijst" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Selectie bewaren" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Zoek in afspeellijst" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Voorkeuren" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Ga naar huidig nummer" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_qualizer" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Herscan bibliotheek" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Werk bibliotheek bij" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistieken" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Homepage" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Gemeenschap" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Pragha vertalen" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Over Pragha" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Willekeurige volgorde" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Herhalen" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Volledig scherm" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Zij_paneel" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Secundaire zij paneel" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Afspeelknoppen beneden" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Statusbalk" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Totaal aantal nummers:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Totaal aantal artiesten:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Totaal aantal albums:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistieken" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Titel" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitsnelheid" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Jaar" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Commentaar" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Lengte" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Bestandsnaam" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Verwijder uit afspeel wachtrij" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Verwijder uit afspeellijst" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Stuur naar" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Kopieer \"%i\" naar geselecteerde nummers" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Kopieer \"%s\" naar geselecteerde titels" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Kopieer \"%s\" naar geselecteerde artiesten" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Kopieer \"%s\" naar geselecteerde albums" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Kopieer \"%s\" naar geselecteerde genres" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Kopieer \"%i\" naar geselecteerde jaren" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Kopieer \"%s\" naar geselecteerde commentaren" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Nummer" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Verwijder volgorde" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Afspeellijst" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Ok" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> is een gereserveerde naam" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Wilt u de afspeellijst %s overschrijven?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Kies een nieuwe naam" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Wilt u het item %s verwijderen?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Afspeellijst naar bestand exporteren" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Opslaan" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Voegde %d nummers van %d toe uit de geïmporteerde afspeellijst" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Wat wilt u doen?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "De afspeellijst vervangen? \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Toevoegen aan de afspeellijst \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Patronen dienen deze vorm aan te nemen:<bestandsnaam>;<bestandsnaam>;....\n" "Maximum zes patronen zijn toegelaten.\n" "Wildcards zijn voorlopig niet toegelaten ( patches welkom :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Patroon voor albumhoes" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Start normaal op" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Start in volledig scherm op" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Start geminimaliseerd op" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Selecteer een map om aan de bibliotheek toe te voegen" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Openen" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Geluid" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Geluids systeem" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Herstart noodzakelijk" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Audio apparaat" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Gebruik software mixer" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Mappen" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Toevoegen" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Verwijder" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Mappen samenvoegen in de 'estructure' weergave" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Sorteer albums op uitgavejaar" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Uiterlijk" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Bedieningselementen" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Toon albumhoes in het zijpaneel" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Grootte van albumhoes" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Albumhoes patroon bestand" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Zoek" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Zoek tijdens het typen" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Zoek soortgelijke woorden" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Bij het starten van pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Onthoud de laatst gebruikte scherminstelling" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Zet de laatste afspeellijst terug" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Bij het toevoegen van mappen" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Voeg bestanden recursief toe" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Bureaublad" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Toon pragha icoon in systeemvak" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Minimaliseer Pragha bij het sluiten van venster" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Plugins" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Voorkeuren" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Algemeen" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Diensten" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Pragha voorkeuren" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i bestanden geanalyseerd van de %i gedetecteerd" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Zoeken naar bestanden om te analyseren" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Afzoeken van bibliotheek gereed" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Speelt niet</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Nummer" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Bestand" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Details" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanalen" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Samplefrequentie" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Map" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Selectie naar" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Open map" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Wilt u het liednummer van ALLE geselecteerde nummers zetten op: %d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Wilt u de titeltag van ALLE geselecteerde nummers zetten op: %s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">door</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">door</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Vorig nummer" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Speel / Pauzeer nummer" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Stop met afspelen" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Volgend nummer" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Verlaat volledig scherm" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Speel nummers in willekeurige volgorde" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Herhaal de afspeellijst aan het einde" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "dag" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Kan de browser niet openen" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Fout bij afspelen huidig nummer</b>\n" "(%s)\n" "<b>Reden:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Stop" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Volgende" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Selecteer een bestand om af te spelen" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Ondersteunde formaten" #: ../src/pragha.c:309 msgid "All files" msgstr "Alle bestanden" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Vul de URL in van internetradio-stream" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Geef het een naam om op te slaan" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Voeg een locatie toe" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "vertaling-met dank aan" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha Muziekspeler" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Muziekspeler" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Beheer en luister naar muziek" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Audio/Data CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Voeg Audio-_CD toe" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Audio CD apparaat" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Verbind met CDDB server" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_LastFM" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Houd van nummer" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Houdt niet meer van nummer" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importeer een XSPF-afspeellijst" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Voeg favorieten toe" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Voeg vergelijkbare toe" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Kan geen verbinding tot stand bregen met Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.FM suggereerde een tag-correctie" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Favoriet nummer toevoegen op Last.FM mislukt." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Favoriet nummer verwijderen op Last.FM mislukt." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "%d van %d toegevoegde suggesties van Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "%d nummers van de laatst %d geliefde toegevoegd op Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Toevoeging aan Last.fm mislukt" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Nummer scrobbled op Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Bijwerken van huidig nummer op Last.FM mislukt." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Gebruikersnaam" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Wachtwoord" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Nummer" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "door <b>%s</b> in <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notificaties" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Toon albumhoes in notificaties" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Toon actieknoppen in notificaties" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "Markeer rijen in huidige afspeellijst" �����������������������������������������������������pragha-1.3.4/po/no.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000073114�13435240150�0014356�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Norwegian (http://www.transifex.com/p/Pragha/language/no/)\n" "Language: no\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Ukjent Artist" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Ukjent Album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artist" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Genre" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artist / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Genre / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Genre / Artist" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Genre / Artist / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Slett" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Eksporter" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Rediger tagger" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Ukjente" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Ukjent Genre" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Spillelister" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Samling" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Verktøy" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Hjelp" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stopp" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Avslutt" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Åpne en mediafil" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Lagre Spilleliste" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Innstillinger" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistikker" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Hjemmeside" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Fellesskap" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Om" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Tilfeldig" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Gjenta" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Antall Låter:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Antall Artister:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Antall Album:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistikker" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Tittel" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bithastighet" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "År" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Lengde" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Filnavn" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Spor" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b>er et navn som allerede er brukt" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Eksporter spilleliste til fil" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Mønstre bør se slik ut:<filename>;<filename>;....\n" "Maksimalt seks mønstre er tillatt.\n" "Wildcards godtas ikke fra nå av (patcher velkommen :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Albumcover mønster" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Velg en mappe for å legge til samling" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Audio synk" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Krever Omstart" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Lydenhet" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Bruk mykvare mikser" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Mappe" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Vis Albumcover i Panel" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Størrelse på Albumcover" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Albumcover filmønster" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Generell" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Skanning av samling ferdig" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Spiller ikke</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Tittel" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Fil" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanaler" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Samplingsfrekvens" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">av</span></small> %s <small><span weight=" "\"light\">i</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">av</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">i</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Forrige Spor" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Spill / Pause Spor" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Stopp Spilling" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Neste Spor" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "dag" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Velg fil for avspilling" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Støttet media" #: ../src/pragha.c:309 msgid "All files" msgstr "Alle filer" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Audio CD Enhet" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Koble til CDDB server" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Brukernavn" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Passord" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Tittel" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/pl.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000075305�13435240150�0014361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Polish (http://www.transifex.com/p/Pragha/language/pl/)\n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Nieznany wykonawca" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Nieznany album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Dodaj do kolejki odtwarzania" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Rozwiń bibliotekę" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Zwiń bibliotekę" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Wykonawca" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Gatunek" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Wykonawca / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Gatunek / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Gatunek / Wykonawca" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Gatunek / Wykonawca/ Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Usuń" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Eksportuj" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Edytuj tagi" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Usuń z biblioteki" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Nieznane" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Nieznany gatunek" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Listy odtwarzania" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Biblioteka" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Czy na pewno chcesz usunąć bieżący plik z biblioteki?\n" "\n" "Ostrzeżenie: Aby przywrócić wymagane jest ponowne skanowanie całej " "biblioteki." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Widok" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Narzędzia" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "P_omoc" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Odtwarzaj / Pauza" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stop" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Następny utwór" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Wyjście" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Dodaj pliki" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Otwórz" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Wyczyść listę odtwarzania" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Zapisz listę odtwarzania" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Zapisz zaznaczone" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Szukaj na liście odtwarzania" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "Preferencje" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Przejdź do odtwarzanego utworu" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Przeskanuj bibliotekę" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Aktualizuj bibliotekę" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statystyki" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Strona projektu" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Społeczność" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "O..." #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Losowe odtwarzanie" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Powtarzaj" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "Pełny _ekran" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Panel boczny" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Pasek stanu" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Utworów:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Wykonawców:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Albumów:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statystyki" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Tytuł" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitrate" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Rok" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Długość" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nazwa pliku" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "" msgstr[2] "Ścieżka" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Wyczyść sortowanie" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> jest zarezerwowaną nazwą listy odtwarzania" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Eksportuj listę odtwarzania do ppliku" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Wzorzec powinien być w formie:<nazwapliku>;<nazwapliku>;....\n" "Dostępnych jest maksymalnie sześć wzorców.\n" "Używanie wyrażeń nie jest akceptowalne ( mile widziany patch :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Okładka albumu" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Uruchom normalnie" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Włącz _tryb pełnoekranowy" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Uruchom w trayu" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Wybierz folder do dodania do biblioteki" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Audio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Sterownik dźwięku" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Wymagane ponowne uruchomienie" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Urządzenie" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Użyj programowego miksera" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Pokaż okładkę albumu w panelu" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Rozmiar okładki" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Wzorzec pliku z okładką" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Zapamiętaj ostatnie położenie okna" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Przywróć ostatnią listę odtwarzania" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Ogólne" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Zakończono skanowanie biblioteki" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>[Nie odtwarza]</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Numer ścieżki" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Plik" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" msgstr[2] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanały" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Częstotliwość próbkowania" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">by</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Poprzedni utwór" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Odtwarzaj / Zatrzymaj utwór" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Zatrzymaj odtwarzanie" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Następny utwór" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Opuść tryb _pełnoekranowy" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Odtwarzaj piosenki w losowej kolejności" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Powtarzaj listę odtwarzania" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "" msgstr[2] "dzień" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Nie można otworzyć przeglądarki" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Wybierz plik do odtworzenia" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Obsługiwane formaty" #: ../src/pragha.c:309 msgid "All files" msgstr "Wszystkie pliki" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "Sid\n" "http://sid.iglu.cz/\n" "translations@sidowo.uni.cc" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Napęd CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Połącz z serwerem CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Nazwa użytkownika" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Hasło" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Numer ścieżki" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/pragha.pot��������������������������������������������������������������������������0000664�0000000�0000000�00000070513�13435240150�0015370�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "" #: ../src/pragha.c:309 msgid "All files" msgstr "" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 msgid "Tracks" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/pt.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000105642�13435240150�0014367�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Sérgio Marques <smarquespt@gmail.com>, 2011-2014 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 22:26+0000\n" "Last-Translator: Sérgio Marques <smarquespt@gmail.com>\n" "Language-Team: Portuguese (http://www.transifex.com/p/Pragha/language/pt/)\n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Não" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Sim" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Importar %s para a coleção de faixas?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Gostaria de atualizar a sua coleção de músicas?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Tem que reiniciar o Pragha para aplicar as alterações." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "Nome do ficheiro" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" "Utilize --help para ver a lista completa de opções da linha de comandos." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Desligado" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Clássica" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Clube" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dança" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Graves" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Graves e agudos" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Agudos" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Colunas e auscultadores" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Sala ampla" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Ao vivo" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Festa" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Sorriso" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Suave" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Rock suave" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Personalizado" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Equalizador" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Artista desconhecido" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Álbum desconhecido" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Procurar na lista de reprodução" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "Fe_char" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Adicionar à fila de reprodução" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "_Ir para" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "Ig_norar" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Ign_orar tudo" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Elimin_ar tudo" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Expandir coleção" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "Recolher _coleção" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Estrutura de pastas" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artista" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Álbum" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Género" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artista/Álbum" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Género/Álbum" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Género/Artista" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Género/Artista/Álbum" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Adicionar à lista de reprodução atual" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "Substituir lista de _reprodução atual" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Substituir e re_produzir" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Mudar nome" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Eliminar" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exportar" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Editar detalhes" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Mover para o li_xo" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Eliminar da coleção" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Desconhecido" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Género desconhecido" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "O ficheiro não pode ser movido para o lixo. Eliminar permanentemente?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "O ficheiro \"%s\" não pode ser movido para o lixo. Detalhes: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Cancelar" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Eliminar" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Listas de reprodução" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Rádios" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Coleção" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Pretende mover o(s) ficheiro(s) para o lixo?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Eliminar permanentemente em vez de mover para o lixo" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Tem certeza de quer quer eliminar o ficheiro?\n" "\n" "Atenção: para o recuperar tem que reanalisar a coleção." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Reprodução" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Lista de reprodução" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Ver" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "Ferramen_tas" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "Aj_uda" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Faixa anterior" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Reproduzir/Pausa" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Parar" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Faixa seguinte" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Editar informações da faixa" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Sair" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Adicionar ficheiros" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Abrir ficheiro" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Adicionar _localização" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "Adicionar à _coleção" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Remover seleção da lista de reprodução" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Recortar lista de reprodução" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Limpar lista de reprodução" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Gravar lista de reprodução" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nova lista de reprodução" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Gravar seleção" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "Procurar na li_sta de reprodução" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Preferências" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Ir para a faixa atual" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_qualizador" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Reanalisar coleção" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "At_ualizar coleção" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "E_statísticas" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Página inicial" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Comunidade" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Traduzir o Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Sobre" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Aleatório" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Repetir" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Ecrã completo" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Painel lateral" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Painel lateral secundário" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Controlos de reprodução em baixo" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Barra de menu" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Barra de estado" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Faixas:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Artistas:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Álbuns:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Estatísticas" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Título" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Taxa de dados" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Ano" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Comentário" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Duração" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nome do ficheiro" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Tipo MIME" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Remover da fila de reprodução" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Remover da lista de reprodução" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "_Enviar para" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Copiar \"%i\" para o número das faixas selecionadas" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Copiar \"%s\" para os títulos selecionados" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Copiar \"%s\" para os artistas selecionados" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Copiar \"%s\" para os álbuns selecionados" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Copiar \"%s\" para os géneros selecionados" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Copiar \"%i\" para os anos selecionados" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Copiar \"%s\" para os comentários selecionados" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Faixa" msgstr[1] "Faixas" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Limpar ordenação" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Lista de reprodução" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_OK" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> é um nome reservado" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Pretende substituir a lista de reprodução %s?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Escolha o novo nome" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Pretende eliminar o item %s?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exportar lista de reprodução para um ficheiro" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Gravar" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Adicionadas %d de %d faixas da lista de reprodução importada" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "O que pretende fazer?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Substituir a lista %s" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Adicionar à lista %s" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Os padrões devem estar na forma:<nome>;<nome>;....\n" "É permitido um máximo de 6 padrões.\n" "Por enquanto, as \"wildcards\" não são aceites (aceita-se \"patches\" :-) )" #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Padrão da capa de álbum" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Iniciar normal" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Iniciar em ecrã completo" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Iniciar na bandeja do sistema" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Selecione a pasta a adicionar" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Abrir" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Áudio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Sistema de som" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Tem que reiniciar" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Dispositivo de som" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Utilizar gestor de som da aplicação" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "Não pode alterar os diretórios durante a análise." #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Pastas" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Adicionar" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Remover" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Unir pastas nas vista Estrutura de pastas" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Ordenar álbuns por ano" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Aparência" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Controlos" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Mostrar capa do álbum no painel" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Tamanho da imagem" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Padrão da capa do álbum" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Procurar" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Procurar ao escrever" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Procurar palavras similares" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Ao iniciar o Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Lembrar o último estado da janela" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Restaurar última lista de reprodução" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Ao adicionar pastas" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Adicionar ficheiros recursivamente" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Área de trabalho" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Mostrar ícone na área de notificação" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Minimizar ao fechar a janela" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Extras" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Preferências" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Geral" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Serviços" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Preferências" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i ficheiros analisados em %i detetados" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "A analisar ficheiros..." #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Terminou a análise da coleção" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Nada em reprodução</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Faixa n.º" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Ficheiro" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Detalhes" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "canal" msgstr[1] "canais" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Canais" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Frequência" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Pasta" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Seleção para" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Abrir pasta" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Definir o número de faixa de todas as faixas selecionadas para: %d?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Definir o título de todas as faixas selecionadas para: %s?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">de</span></small> %s <small><span weight=" "\"light\">em</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">de</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">em</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Faixa anterior" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Reproduzir/Pausar faixa" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Parar reprodução" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Faixa seguinte" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Sair de ecrã completo" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Reproduzir aleatoriamente" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Repetir lista de reprodução" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "dia" msgstr[1] "dias" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Não foi possível abrir o navegador" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Erro ao reproduzir a faixa atual</b>\n" "(%s)\n" "<b>Motivo:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Parar" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "Segui_nte" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Selecione o ficherio a reproduzir" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Ficheiros suportados" #: ../src/pragha.c:309 msgid "All files" msgstr "Todos os ficheiros" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Introduza o URL de uma emissão web" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Associar um nome e gravar" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Adicionar localização" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Sérgio Marques <smarquespt@gmail.com>" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha - Reprodutor de músicas" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Reprodutor de músicas" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Gestão e reprodução de músicas" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Procurar detalhes em AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "Não foram encontradas faixas similares no AcoustID" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "CD áudio/dados" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Foi inserido um CD áudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Adicionar _CD de áudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "CD áudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Dispositivo do CD de áudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Ligar ao servidor CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ignorar" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Procurar músicas no servidor DLNA" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Foram adicionadas as faixas do servidor %s." #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Servidor DLNA não encontrado." #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Gosto desta faixa" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Não gosto desta faixa" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importar uma lista XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Adicionar favoritas" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Adicionar similares" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Não foi possível estabelecer ligação à Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "A Last.fm sugeriu uma correção" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Falha ao indicar \"Gosto desta faixa\" na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Falha ao indicar \"Não gosto desta faixa\" na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Adicionadas %d faixas de %d sugeridas pela Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "A Last.fm não sugere quaisquer faixas similares" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Adicionadas %d faixas das últimas %d na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "Não possui quaisquer faixas favoritas na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Ocorreu um erro ao enviar para a Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Faixa enviada para a Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Falha ao atualizar faixa na Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Enviar para a Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Utilizador" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Senha" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Faixa" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "de <b>%s</b> em <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notificações" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Mostrar capa de álbum nas notificações" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Adicionar ações para alterar faixas na notificação" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Não foi possível aceder a %s" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Dispositivo amovível" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "Pretende gerir o dispositivo %s?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "Procurar _letra da faixa" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "Procurar informações do _artista" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Informações da faixa" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Transferir a capa do álbum ao reproduzir as faixas." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Letras das faixas graças a %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Informações do artista" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">obrigado a</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Letras não encontradas." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Informações do artista não encontradas." #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Procura..." #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Procurar rádio no TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Procurar no TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Realçar linhas da lista de reprodução atual" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Utilizar Gnome 3 HIG" ����������������������������������������������������������������������������������������������pragha-1.3.4/po/pt_BR.po����������������������������������������������������������������������������0000664�0000000�0000000�00000101625�13435240150�0014747�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Rafael Fontenelle <rffontenelle@gmail.com>, 2012 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/p/Pragha/" "language/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Você deseja importar %s para a biblioteca?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Desabilitado" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Clássico" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Grave" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Grave e agudo" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Agudo" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Fones e microfones de laptop" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Ao vivo" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Festa" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Artista Desconhecido" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Álbum Desconhecido" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Adicionar à fila de reprodução" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Pular" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Pu_lar Todas" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Deletar _Todas" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "E_xpandir biblioteca" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "E_sconder biblioteca" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Estrutura de pastas" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artista" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Álbum" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Gênero" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artista / Álbum" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Gênero / Álbum" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Gênero / Artista" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Gênero / Artista / Álbum" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Adicionar para a lista de reprodução atual" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Substituir lista de reprodução atual" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Substituir e _reproduzir" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Renomear" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Apagar" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exportar" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Editar tags" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Mover para a _lixeira" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Apagar da biblioteca" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Desconhecido" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Gênero Desconhecido" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "O arquivo \"%s\" não pode ser movido para a lixeira. Detalhes: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Listas de reprodução" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Rádios" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Biblioteca" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Você realmente deseja mover os arquivos para a lixeira?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Tem certeza de quer quer excluir o arquivo atual da biblioteca?\n" "\n" "Atenção: para recuperar é preciso re-escanear a biblioteca inteira." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Reprodução" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Lista de reprodução" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Visualização" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Ferramentas" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "A_juda" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Reproduzir / Pausar" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Parar" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Próxima faixa" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Editar informações da faixa" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Sair" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Adicionar arquivos" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Abrir um arquivo de mídia" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Adicionar _localização" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Adicionar à biblioteca" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Remover seleção da lista de reprodução" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Cortar lista de reprodução" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Limpar lista de reprodução" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Salvar lista de reprodução" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Nova lista de reprodução" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Salvar seleção" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Procurar na lista de reprodução" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Preferências" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Ir para a música atual" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "E_qualizador" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Varrer biblioteca" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Atualizar biblioteca" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Estatísticas" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Página Inicial" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Comunidade" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Traduzir o Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Sobre" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Aleatório" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Repetir" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Tela cheia" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Painel lateral" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Controles de reprodução abaixo" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Barra de status" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Total de faixas:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Total de Artistas:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Total de Álbuns:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Estatísticas" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Título" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Taxa de bits" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Ano" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Comentário" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Tempo" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Nome do Arquivo" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Remover da lista de reprodução" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Copiar \"%i\" para os números de faixas selecionadas" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Copiar \"%s\" para arquivos selecionados" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Copiar \"%s\" para artistas selecionados" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Copiar \"%s\" para álbuns selecionados" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Copiar \"%s\" para gêneros selecionados" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Copiar \"%i\" para anos selecionados" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Copiar \"%s\" para comentários selecionados" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Faixa" msgstr[1] "Faixas" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Limpar ordem" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> é um nome reservado" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Você deseja sobrescrever a lista de reprodução: %s?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Escolha um novo nome" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Você deseja excluir o item: %s?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exportar lista de reprodução para arquivo" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Adicionadas %d de %d faixas da lista de reprodução importada" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Os padrões devem ser na forma:<nomedoarquivo>;<nomedoarquivo>;....\n" "É permitido um máximo de 6 padrões.\n" "Por enquanto curingas não são aceitos (mas correções são bem vindas :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Nome da arte do álbum" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Iniciar normal" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Abrir tela cheia" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Iniciar na bandeja" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Selecione uma pasta para adicionar à biblioteca" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Áudio" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Sistema de Som" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Necessário Reiniciar" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Dispositivo de Som" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Usar controle do programa" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Pasta" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Mesclar pastas na visão de estrutura de pastas" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Mostrar álbuns por ano de lançamento" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Aparência" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Mostrar arte do álbum no painel" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Tamanho da arte do álbum" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Nome da arte do álbum" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Lembrar do estado da última janela" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Restaurar a última lista de reprodução" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Adicionar arquivos recursivamente" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Geral" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Preferências do Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Varredura da biblioteca completa" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Parado</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Faixa nº" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Arquivo" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Detalhes" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Canais" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Taxa de amostragem" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Pasta" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Selecionar para" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Abrir pasta" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" "Você deseja definir o número de faixa de TODAS as faixas selecionadas para: " "%d ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" "Você deseja definir o tag do título de TODAS as faixas selecionadas para: " "%s ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">por</span></small> %s <small><span weight=" "\"light\">em</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">por</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">em</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Faixa anterior" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Reproduzir / Pausar faixa" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Parar reprodução" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Próxima faixa" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Sair da tela cheia" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Reproduzir em ordem aleatória" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Repetir lista de reprodução" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "dia" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Não foi possível abrir o navegador" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Erro ao reproduzir a faixa atual.</b>\n" "(%s)\n" "<b>Motivo:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Selecione um arquivo para reproduzir" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Mídias suportados" #: ../src/pragha.c:309 msgid "All files" msgstr "Todos os arquivos" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Digite a URL de um fluxo de rádio de Internet" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Dê um nome para salvar" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Adicionar uma localização" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "translator-credits" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Adicionar _CD de áudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Dispositivo do CD de Áudio" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Conectar ao servidor CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Música favorita" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Não é favorita" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Importar uma lista XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Adicionar favoritos" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Adicionar semelhante" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm sugeriu uma correção de tag" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Falha ao enviar dados para Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Adicionadas %d últimas músicas %d favoritas no Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Feito scrobble da faixa no Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Falha ao atualizar faixa no Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Usuário" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Senha" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Faixa" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "por <b>%s</b> em <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notificações" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Mostrar arte do álbum nas notificações" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "Destacar linhas na lista de reprodução atual" �����������������������������������������������������������������������������������������������������������pragha-1.3.4/po/ru.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000117602�13435240150�0014371�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Dmitri Bogomolov <4glitch@gmail.com>, 2013 # Kyrill Detinov <lazy.kent@opensuse.org>, 2012-2013,2015 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-02-12 19:02+0000\n" "Last-Translator: Kyrill Detinov <lazy.kent@opensuse.org>\n" "Language-Team: Russian (http://www.transifex.com/p/Pragha/language/ru/)\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n" "%100>=11 && n%100<=14)? 2 : 3);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Нет" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Да" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Вы хотели бы импортировать %s в коллекцию?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Вы хотели бы обновить свою музыкальную коллекцию?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Некоторые изменения требуют перезапуска Pragha." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "ИМЯ_ФАЙЛА" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "Используйте --help для полного списка опций командной строки." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Отключен" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Классическая музыка" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Клубная музыка" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Танцевальная музыка" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Усиление басов" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Усиление басов и высоких частот" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Усиление высоких частот" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Ноутбук или наушники" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Большой зал" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Живое исполнение" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Вечеринка" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Поп-музыка" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Регги" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Рок" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ска" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Smiley Face Curve" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Мягкая музыка" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Софт-рок" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Техно" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Пользовательский" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Эквалайзер" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Неизвестный исполнитель" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Неизвестный альбом" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Искать в плейлисте" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Закрыть" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Добавить в очередь воспроизведения" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "П_ерейти к" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Пропустить" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Пр_опустить всё" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Удалить _всё" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Развернуть все" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Свернуть все" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Дерево каталогов" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Исполнитель" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Альбом" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Жанр" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Исполнитель / Альбом" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Жанр / Альбом" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Жанр / Исполнитель" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Жанр / Исполнитель / Альбом" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Добавить в текущий плейлист" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Заменить текущий плейлист" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Заменить и _воспроизвести" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Переименовать" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Удалить" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Экспорт" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Редактировать теги" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Переместить в _корзину" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Удалить из коллекции" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Неизвестные" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Неизвестный жанр" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "Не удалось поместить файл в корзину. Удалить совсем?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Файл «%s» не удалось поместить в корзину. Подробности: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Отмена" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Удалить" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Плейлисты" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Радиостанции" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Коллекция" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Вы действительно хотите переместить файлы в корзину?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Удалить вместо перемещения в корзину" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Вы уверены, что хотите удалить этот файл из коллекции?\n" "\n" "Внимание: Для его восстановления потребуется просканировать коллекцию заново." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "В_оспроизведение" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Плейлист" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Вид" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Инструменты" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Справка" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Предыдущий трек" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Воспроизведение / Пауза" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Остановить" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Следующий трек" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Редактировать теги" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Выход" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Добавить файлы" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Открыть медиа-файл" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Добавить _расположение" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Добавить коллекцию" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Удалить выбранное из плейлиста" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Исключить из списка остальные" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Очистить плейлист" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Сохранить плейлист" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Создать плейлист" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Сохранить выделенное" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Поиск в плейлисте" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Настройки" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Перейти к проигрываемому треку" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "_Эквалайзер" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Повторное сканирование коллекции" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Обновить коллекцию" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Статистика" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Домашняя страница" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Сообщество" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Вики" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Перевести Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "О программе" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "В _случайном порядке" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Повторять" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "Во весь _экран" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Боковая панель" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Вторая боковая панель" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Управление проигрывателем снизу" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Строка меню" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Статусная строка" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Количество треков:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Количество исполнителей:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Количество альбомов:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Статистика" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Название" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Битрейт" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Год" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Примечания" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Продолжительность" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Имя файла" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Тип mime" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Удалить из очереди воспроизведения" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Удалить из плейлиста" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "Отправит_ь" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Копировать \"%i\" в выбранные номера треков" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Копировать \"%s\" в выбранные названия" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Копировать \"%s\" в выбранные исполнители" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Копировать \"%s\" в выбранные альбомы" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Копировать \"%s\" в выбранные жанры" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Копировать \"%i\" в выбранные годы" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Копировать \"%s\" в выбранные комментарии" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Трек" msgstr[1] "Трека" msgstr[2] "Треков" msgstr[3] "Треков" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Без сортировки" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Плейлист" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Ok" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> это зарезервированное название плейлиста" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Вы хотите перезаписать плейлист: %s?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Выберите имя" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Вы хотите удалить этот элемент: %s?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Экспортировать плейлист в файл" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Сохранить" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Добавлено %d композиций из %d импортированных плейлистов." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Что вы хотите сделать?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Заменить плейлист \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Добавить в плейлист \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Шаблон должен соответствовать следующей форме записи: <имя файла>;<имя " "файла>;....\n" "Максимум можно использовать шесть шаблонов." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Обложка альбома" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Обычный размер" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Во весь экран" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Запуск в области уведомлений" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Выберите каталог для добавления в коллекцию" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Открыть" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Аудио" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Звуковая подсистема" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Требуется перезапуск" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Audio устройство" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Использовать программный микшер" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "Невозможно менять директории во время анализа" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Каталоги" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Добавить" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Удалить" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Объединить каталоги в структуре коллекции" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Сортировать альбомы по году выпуска" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Внешний вид" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Переключатели" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Показывать обложку альбома на панели" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Размер изображения обложки альбома" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Шаблон имени файла обложки альбома" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Поиск" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Поиск по мере набора" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Искать похожие слова" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "При запуске Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Запоминать состояние окна" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Восстанавливать последний плейлист" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "При добавлении каталога" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Добавлять содержимое вложенных папок" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Рабочий стол" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Показывать значок Pragha в системном лотке" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Сворачивать при закрытии окна" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Модули" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Настройки" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Основное" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Службы в Интернете" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Настройки" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "проанализировано %i из %i найденных" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Поиск файлов для анализа" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Коллекция просканирована." #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Не воспроизводится</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Трек №" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Файл" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Подробности" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "канал" msgstr[1] "каналов" msgstr[2] "каналы" msgstr[3] "каналы" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Каналы" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Рейтинг" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Каталог" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Сохранить выделенное" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Открыть каталог" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Вы хотите установить номер для ВСЕХ выбранных треков: %d?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Вы хотите установить название для ВСЕХ выбранных треков: %s?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">исполняет</span></small> %s <small><span " "weight=\"light\">из</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">исполняет</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">из</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Предыдущий трек" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Воспроизвести / Пауза " #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Остановить воспроизведение" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Следующий трек" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Выход из полноэкранного режима" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Воспроизведение в случайном порядке" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Циклическое воспроизведение списка" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "день" msgstr[1] "дня" msgstr[2] "дней" msgstr[3] "дней" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Невозможно открыть браузер." #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Ошибка проигрывания текущего трека.</b>\n" "(%s)\n" "<b>Причина:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Остановить" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Следующий" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Воспроизвести выделенный файл" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Поддерживаемые типы" #: ../src/pragha.c:309 msgid "All files" msgstr "Все файлы" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Введите URL интернет радио-потока" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Введите имя для сохранения" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Добавить расположение" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Kyrill Detinov <lazy.kent@opensuse.org>" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Музыкальный проигрыватель Pragha" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Музыкальный проигрыватель" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Слушайте и управляйте музыкой" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Искать теги на AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID не нашёл похожие композиции" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Audio/Data CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Вставлен Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Добавить Audio _CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Устройство Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Соединиться с CDDB сервером" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Игнорировать" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Искать музыку на сервере DLNA" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Добавлена музыка с сервера %s" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Невозможно найти DLNA серверы" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Добавить в «любимые»" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Удалить из «любимых»" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Импортировать плейлист XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Добавить «любимые»" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Добавить похожие" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Невозможно установить соединение с Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm предлагает исправить тег." #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Ошибка добавления композиции в «любимые» на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Ошибка удаления композиции из «любимых» на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Добавлено %d композиций из %d рекомендованных Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm не может посоветовать похожие композиции." #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Добавлено %d композиций из %d последних «любимых» на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "У вас нет «любимых» композиций на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Отправка данных на Last.fm не удалась" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Трек заскробблен на Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Ошибка отправки композиции на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Скробблинг на Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Имя учётной записи" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Пароль" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Трек" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "<b>%s</b>, альбом: <b>%s</b> (%s)" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Уведомления" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Показывать обложку альбома в уведомлении" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Добавить действия в сообщении о смене трека" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Невозможно получить доступ к \"%s\"" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Съёмное устройство" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "Искать _текст песни" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "Искать _информацию об исполнителе" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Информация о композиции" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Загружать обложки альбомов во время воспроизведения" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Спасибо за текст %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Информация об исполнителе" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">спасибо</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Текст песни не найден." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Информация об исполнителе не найдена" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Поиск…" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Искать радио на TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Искать на TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Подсветка строк в плейлисте" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Использовать GNOME 3 HIG" ������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/sv.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000074723�13435240150�0014401�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Swedish (http://www.transifex.com/p/Pragha/language/sv/)\n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Okänd artist" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Okänt album" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Köa i spellistan" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "_Fäll ut bibliotek" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "_Fäll ihop bibliotek" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Mappstruktur" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Artist" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Genre" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Artist / Album" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Genre / Album" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Genre / Artist" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Genre / Artist / Album" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Ta bort" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Exportera" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Redigera taggar" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Ta bort från bibliotek" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Okända" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Okänd genre" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Spellistor" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Bibliotek" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Är du säker på att du vill ta bort filen från biblioteket?\n" "\n" "Varning: Hela biblioteket måste sökas av igen." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Visa" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Verktyg" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Hjälp" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Uppspelning / Paus" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Stopp" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Nästa spår" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Avsluta" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Lägg till filer" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Öppna en mediafil" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Rensa spellista" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Spara spellista" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Spara urval" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Sök i spellistan" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Inställningar" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Visa aktuellt spår" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "_Avsök biblioteket igen" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Uppdatera biblioteket" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_Statistik" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Hemsida" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Forum" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Skapa översättning för Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Om" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "_Blanda" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Upprepa" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Helskärmsläge" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Sidopanel" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Statusfält" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Antal spår:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Antal artister:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Antal album:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Statistik" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Titel" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bitrate" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "År" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Kommentar" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Längd" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Filnamn" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "" msgstr[1] "Spår" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Rensa sortering" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b>är ett reserverat spellistenamn" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Exportera spellista till fil" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Mönster ska vara i formatet:<filename>;<filename>;....\n" "Maximalt sex mönster är tillåtna.\n" "Jokertecken accepteras inte för tillfället ( patchar välkomnas :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Albumomslagsmönster" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Starta normalt" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "_Helskärmsläge" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Starta i aktivitetsfältet" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Välj en mapp att lägga till i biblioteket" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Ljud" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Ljudmotor" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Omstart krävs" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Portabel musikspelare" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Använd mjukvarumixer" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Mappar" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Visa albumomslag i panelen" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Storlek för albumomslag" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Filmönster för albumomslag" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Kom ihåg föregående fönsterläge" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Återställ sista spellistan" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Lägg till filer rekursivt" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Allmänt" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Inställningar" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Biblioteksavsökning färdig" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Spelar inte</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Spårnummer" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Filnamn" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Egenskaper" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kanaler" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Samplerate" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Sökväg" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">med</span></small> %s <small><span weight=" "\"light\">från</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">med</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">från</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Föregående Spår" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Spela upp / Pausa Spår" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Stoppa uppspelningen" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Nästa spår" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Lämna _helskärmsläge" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Spela upp i slumpmässig ordning" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Upprepa spellistan då den nått slutet" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" msgstr[1] "dag" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Kunde inte öppna webbläsaren" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Välj fil att spela upp" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Tillgängliga mediaformat" #: ../src/pragha.c:309 msgid "All files" msgstr "Alla filer" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Översättare" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "CD-enhet" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "Anslut till CDDB server" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Användarnamn" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Lösenord" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Spårnummer" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Notifieringar" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Visa albumomslag i notifieringsytan" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" ���������������������������������������������pragha-1.3.4/po/tr.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000102235�13435240150�0014364�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Emre FIRAT <emrefirat93@gmail.com>, 2013 # Fatih Malakçı <>, 2012 # Necdet Yücel <necdetyucel@gmail.com>, 2012 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Turkish (http://www.transifex.com/p/Pragha/language/tr/)\n" "Language: tr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "%s 'ı kütüphaneye eklemek istermisiniz?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Kapalı" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Klasik" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dans" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Tam Bas" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Tam Bas ve Tiz" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Tam Tiz" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Laptop Hoparlörleri ve Kulaklıklar" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Büyük Salon" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Canlı" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Parti" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Reggae" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Gülen Yüz Eğrisi" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Tekno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Özel" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Ekolayzer" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Bilinmeyen sanatçı" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Bilinmeyen albüm" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Oynatma sırasına ekle" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Atla" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "_Hepsini Atla" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Hepsini Sil" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "Kütüphaneyi _yay" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "Kütüphaneyi _toparla" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Klasör görünümü" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Sanatçı" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Albüm" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Tür" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Sanatçı / Albüm" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Tür / Albüm" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Tür / Sanatçı" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Tür / Sanatçı / Albüm" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "Güncel _listeye ekle" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Güncel listeyi yenile" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Değiştir ve Çal" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Yeniden adlandır" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Sil" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Dışarı Aktar" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Etiketleri Düzenle" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Çöpe _Taşı" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Kütüphaneden kaldır" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Bilinmeyen" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Bilinmeyen tür" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Dosya \"%s\" maalesef silinemedi. Detay: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Oynatma Listeleri" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Radyolar" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Kütüphane" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Bu dosyaları gerçekten çöpe aktarmak istiyor musunuz?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Bütün kütüphaneyi cidden silmek mi istiyorsunuz?\n" "\n" "Uyarı: Bu işlemin ardından bütün kütüphaneyi yenilemek zorundayız." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Çalma" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "Oynatma_listesi" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Görünüm" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Araçlar" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Yardım" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Oynat / Durakla" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Dur" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Sonraki parça" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Parça bilgisini düzenle" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Çık" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "Dosya _ekle" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Müzik parçası aç" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "_Konum ekle" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Kütüphaneye ekle" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Seçimi listeden çıkar" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Parça listesini kırp" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Parça Listesini Temizle" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Oynatma Listesini Kaydet" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Yeni liste" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Seçimi kaydet" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "Oynatma listesinde _ara" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Tercihler" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Çalınan parçaya git" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "Ses _dengeleyicisi" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "Kütüphaneyi yenile" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "Kütüphaneyi güncelle" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "_İstatistikler" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Anasayfa" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Topluluk " #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Pragha'yı tercüme et" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Hakkında" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "Tesa_düfle" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "_Tekrarla" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_Tam ekran" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Yan bölme" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Tekrarlama seçenekleri" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Durum çubuğu" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Parça sayısı:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Sanatçı sayısı:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Albüm sayısı:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "İstatistikler" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Başlık" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Bit oranı" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Yıl" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Açıklama" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Süre" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Dosya adı" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Parça listesinden çıkar" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "\"%i\" ı seçili şarkı numaralarına kopyala" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "\"%s\" ı seçili türlere kopyala" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "\"%s\" ı seçili artislere kopyala" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "\"%s\" ı seçili albümlere kopyala" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "\"%s\" ı seçili yaş gruplarına kopyala" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr " \"%i\" 'ı seçili yıllara kopyala" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "\"%s\" ı seçili yorumlara kopyala" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Parça" msgstr[1] "Parça" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Sıralamayı boşver" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Parça Listesi" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> çalma listesinin adı muhafızdır" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "%s listesinin üzerine yazmak istiyor musunuz?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Yeni bir isim seç" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "%s 'i silmek istiyor musunuz?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Oynatma listesini dosyaya kaydet" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "İçe aktarılan parça listesinden %d parçanın %d'i eklendi." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Ne yapmak istiyorsun?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "\"%s\" parçasını değiştir" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "\"%s\" parçasını ekle" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Örüntüler şu biçinde olmalı: <filename>;<filename>;...\n" "En fazla altı örüntüye izin verilmektedir.\n" "Şimdilik meta karakterler kabul edilmemektedir (yama kabul ediyoruz :-))." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Kapak resmi türü" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Düzgün başla" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Tam ekran kipinde başla" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Sistem çekmecesinde başla" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Kütüphaneye eklemek için klasör seçiniz" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Ses" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Ses alıcı" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Yeniden başlatılması gerekiyor" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Ses aygıtı" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Yazılım mikseri kullan" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "_Klasörler" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Dosyaları dosya ortamında birleştir" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Albümleri yayınlanma yılına göre sırala" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Görünüm" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Kontroller" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Yan bölmede kapak resmini göster" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Kapak resim bouyutu" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Kapak resmi dosya seçeneği" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Ara" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "Pragha başlatılırken" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Son kullanılan pencere kipini hatırla" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Son çalma sırasını geri getir" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "Dizin eklerken" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Ortam dosyaları ekle" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Masaüstü" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Uyarı alanında Pragha simgesini göster" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Genel" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Servisler" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Praghanın Tercihleri" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "%i dosyaları anazliz edildi %i tespit edildi" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Analiz için dosyalar aranıyor" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Dosya güncelleşmesi tamamlandı" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Çalınmıyor</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "İz numara" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Dosya" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Ayrıntılar" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" msgstr[1] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Ses Kanalları" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Örnekleme hızı" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Klasör" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Seçim" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Dizin aç" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Seçili tüm şarkıları %d olarak ayarlamak istiyormusunuz ?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Seçili tüm şarkıların türünü %s olarak ayarlamak istiyormusunuz ?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">ile</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">içi</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Önceki parça" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Parçayı çal / durakla" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Oynatmayı durdur" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Sonraki Parça" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Tam ekrandan çık" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Oynatma sırasındaki dosyaları rastgele oynat" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Oynatma sırasının sonuna gelindiğinde tekrar başla" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "gün" msgstr[1] "gün" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Adres açılamadı" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Güncel parçayı çalarken hata oluştu.</b>\n" "(%s)\n" "<b>Neden:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Oynatmak için dosya seç" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Desteklenen medya" #: ../src/pragha.c:309 msgid "All files" msgstr "Tüm dosyalar" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "İnternet radyosu için URL girin" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Kaydetmek için bir isim belirle" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Konum ekle" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "Almancı Türkçe çevirimi:Hakan Erduman <smultimeter@gmail.com> " #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Müzik Çalar" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Müziği yönetin ve dinleyin" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Müzik _CD'si ekle" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Müzik CD'si" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "CD Okuyucu aygıtı" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "CDDB Sunucusuna bağlan" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Parçayı sev" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Parçayı sevme" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "XSPF listesini içeri aktar" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Favorilere ekle" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Benzer ekle" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm etikette bir düzeltme önerdi" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Last.fm'de parçayı sevme başarısız oldu" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Last.fm üzerinde Unlove şarkısı başarısız oldu" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Last.fm'de sevdiğiniz son %d parçanın %d'i eklendi." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Last.fm gönderimi başarısız oldu" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Parça Last.fm'e skroplandı" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Bu parçayı Last.fm'de güncelleme başarısız oldu." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Kullanıcı Adı" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Parola" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Parça" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "<b>%s</b> dan <b>%s</b> içinde <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Bildiriler" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Bildirilerde kapak resmi göster" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "Güncel parça listesinde satırları renklendir" �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/uk.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000120054�13435240150�0014355�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Paul Rufous <>, 2012 # Pavlo Rudyj <>, 2012 # siyanie_over_ip <siyanie-over-ip@yandex.ru>, 2014 # Микола Ткач <Stuartlittle1970@gmail.com>, 2015 # Сергій Гаврилов <sergiovana@bigmir.net>, 2011 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2015-04-02 16:04+0000\n" "Last-Translator: Микола Ткач <Stuartlittle1970@gmail.com>\n" "Language-Team: Ukrainian (http://www.transifex.com/p/Pragha/language/uk/)\n" "Language: uk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_Ні" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Так" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "Ви бажали-б імпортувати %s у колекцію?" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "Ви бажали-б оновити свою музичну колекцію?" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "Деякі зміни потребують перезапуску Pragha." #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "ІМ’Я_ФАЙЛУ" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "Використовуйте --help для повного переліку опцій командного рядка." #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Вимкнений" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Класична музика" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Клубна музика" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Танцювальна музика" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Підсилення басів" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Підсилення басів і високих частот" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Підсилення високих частот" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Ноутбук або навушники" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Великий зал" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Живе виконання" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Вечорниця" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Поп-музика" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Регі" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Рок" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ска" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Smiley Face Curve" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "М’яка музика" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Софт-рок" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Техно" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Користувацький" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Еквалайзер" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "Невідомий виконавець" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "Невідомий альбом" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "Шукати у списку відтворення" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "_Закрити" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Додати до черги відтворення" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "П_ерейти до" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Пропустити" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Пр_опустити усе" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "_Вилучити усе" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "Р_озширити фонотеку" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "З_меншити фонотеку" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "Структура тек" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Виконавець" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Альбом" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Жанр" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "Виконавець / Альбом" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "Жанр / Альбом" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "Жанр / Виконавець" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "Жанр / Виконавець / Альбом" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "_Додати до поточного списку програвання" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "_Замінити поточний список програвання" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "Повторити _програвання" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "Перейменувати" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "Вилучити" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "Експорт" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Змінити теґи" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "Перем_істити у смітник" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "Вилучити з фонотеки" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "Невідомо" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "Невідомий жанр" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "Не вдалося помістити файл у смітник. Вилучити повністю?" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "Не вдалося перемістити файл «%s» у смітник. Деталі: %s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "_Скасувати" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "_Вилучити" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "Списки композицій" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "Радіо" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Фонотека" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "Справді перемістити усі ці файли у смітник?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "Вилучити замість переміщення у смітник" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "Ви впевнені, що бажаєте вилучити цей файл з фонотеки?\n" "\n" "Заувага: Щоб його відновити, потрібно пересканувати усю фонотеку." #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "_Відтворення" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "_Список відтворення" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "_Перегляд" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "З_асоби" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "_Довідка" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "Попередня доріжка" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Відтворити / Призупинити" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Зупинити" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "Наступна доріжка" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "Редагувати теги доріжки" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "Ви_йти" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "Д_одати файли" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Відкрити файл" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Додати _шлях до музики" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Додати колекцію" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "Вилучити вибране із списку відтворення" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Обрізати список відтворення" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Очистити список відтворення" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Зберегти список композицій" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "Новий список відтворення" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Зберегти вибране" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "_Пошук у списку композицій" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "_Налаштування" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "Перейти до відтворюваної композиції" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "Е_квалайзер" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "П_ересканувати фонотеку" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "_Оновити фонотеку" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "С_татистика" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "Домашня сторінка" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "Спільнота" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Вікі" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "Перекласти Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Про проґраму" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "Перемі_шати" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "Повтор_ювати" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "_На повний екран" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "Бічна _панель" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "Друга бічна панель" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "Автоконтроль відтворення" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "Рядок меню" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "Рядок стану" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "Загалом доріжок:" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "Загалом виконавців:" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "Загалом альбомів:" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "Статистика" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Назва" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Бітрейт" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Рік" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Коментар" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Тривалість" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Назва файлу" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "Тип mime" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "Вилучити з черги відтворення" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Вилучити із списку відтворення" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "Відправи_ти" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Копіювати \"%i\" до вибраних композицій" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Копіювати \"%s\" до вибраних назв композицій" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Копіювати \"%s\" до вибраних виконавців" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Копіювати \"%s\" до вибраних альбомів" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Копіювати \"%s\" до вибраних жанрів" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Копіювати \"%i\" до вибраних років виходу альбомів" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Копіювати \"%s\" до вибраних коментарів" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Доріжка" msgstr[1] "Доріжки" msgstr[2] "Доріжок" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Очистити сортування" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "Список відтворення" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "_Так" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> — резервна назва списку композицій" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "Ви справді бажаєте переписати список відтворення %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "Створити нову назву" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "Ви справді бажаєте вилучити %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "Експорт списку композицій у файл" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "_Зберегти" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "Додано %d пісень %d з імпортованого списку відтворення." #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "Що ви бажаєте зробити?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "Замінити список відтворення \"%s\"" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "Додати до списку відтворення \"%s\"" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Шаблони мають бути у вигляді: <filename>назва;<filename>;....\n" "Дозволено максимум шість шаблонів.\n" "На цей час шаблони ще не прийняті ( латки вітаються :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Шаблон обкладинки альбому" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Звичайний запуск" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Запуск на повний екран" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Запуск у системний лоток" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Вибрати теку для додавання у фонотеку" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "_Відкрити" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Аудіо" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Аудіо підсистема" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Потрібен перезапуск" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Audio пристрій" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Використовувати проґрамний мікшер" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "Неможливо змінювати директорії під час аналізу" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Теки" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "_Додати" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "_Вилучити" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "Об'єднати теки у дерево каталогів" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "Сортування альбомів за датою випуску" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "Зовнішній вигляд" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Перемикачі" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "Показувати обкладинку на панелі" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "Розмір обкладинки" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "Шаблон файлу обкладинки альбому" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "Пошук" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "Пошук під час набору" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "Шукати схожі слова" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "При запуску Pragha" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "Пам'ятати останнє розташування вікна" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "Відновити останній список композицій" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "При додаванні теки" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "Додати файли рекурсивно" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "Стільниця" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "Показувати піктограму Pragha у системному лотку" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "Згортати при закритті вікна" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "Втулки" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Налаштування" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "Загальне" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "Інтернет-служби" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Налаштування Pragha" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "проаналізовано %i зі %i знайдених" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "Пошук файлів для аналізу" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "Сканування завершено" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Не відтворюється</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "№ доріжки" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Файл" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Деталі" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "канал" msgstr[1] "канали" msgstr[2] "каналів" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Канали" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Рейтинг" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Тека" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Вибрати" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Відкрити теку" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "Ви бажаєте встановити номер для УСІХ вибраних доріжок: %d?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "Ви бажаєте встановити назву для УСІХ вибраних доріжок: %s?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">виконує</span></small> %s <small><span " "weight=\"light\">з альбому</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">виконує</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">з альбому</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Попередня доріжка" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Відтворити / Призупинити доріжку" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Зупинити відтворення" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Наступна доріжка" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Вийти з повноекранного режиму" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "У випадковому порядку" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Повторювати список безкінечно" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "день" msgstr[1] "дні" msgstr[2] "днів" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "Не вдалося відкрити переглядач" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Помилка відтворення поточної доріжки.</b>\n" "(%s)\n" "<b>Причина:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "_Зупинити" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "_Наступний" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "Вибрати файл для відтворення" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "Підтримувані файли" #: ../src/pragha.c:309 msgid "All files" msgstr "Усі файли" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "Уведіть URL або адресу інтернет-радіо" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "Для збереження потрібна назва" #: ../src/pragha.c:405 msgid "Add a location" msgstr "Додати веб-адресу" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" "Sergiy Gavrylov <sergiovana@bigmir.net>, 2011.\n" "Микола Ткач <Stuartlittle1970@gmail.com>, 2015." #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Музичний програвач Pragha" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "Музичний програвач" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "Слухайте та керуйте музикою" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "Шукати теги на AcoustID" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "AcoustID не знайшов схожі композиції" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Audio/Data CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "Вставлений Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Додати Audio _CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Аудіо CD-пристрій" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "З'єднатися із сервером CDDB" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "Ігнорувати" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "Шукати музику на сервері DLNA" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "Додана музика з сервера %s" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "Неможливо знайти DLNA сервери" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Улюблені доріжки" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Зняти позначення улюбленої доріжки" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "Імпорт списку відтворення XSPF" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "Додати до вибраного" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Додати аналогічний" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "Неможливо встановити з’єднання з Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm запропонував скоригувати теги" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "Отримання улюблених доріжок з Last.fm не вдалося." #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "Помилка вилучення композиції з «улюблених» на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "Додано %d композицій з %d рекомендованих Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "Last.fm не може порадити схожі композиції." #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "Додати %d трек зі списку останніх %d улюблених на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "В вас немає «улюблених» композицій на Last.fm." #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "Відсилання даних на Last.fm не вдалося" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "Доріжку заскроблено на Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "Оновлення цієї пісні через last.fm невдале" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "Скроблінг на Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "Ім'я користувача" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "Пароль" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Доріжка" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr " <b>%s</b> in <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "Сповіщення" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "Показувати обкладинку у сповіщеннях" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "Додати дії у повідомленні про зміну доріжки" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "Неможливо отримати доступ до \"%s\"" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "Знімний пристрій" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "Бажаєте керувати \"%s\" значенням?" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "Шукати _текст пісні" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "Шукати _інформацію про виконавця" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "Інформація про композицію" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "Завантажувати обкладинки альбомів під час відтворення" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "Дякуємо за текст %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "Інформація про виконавця" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "%s <small><span weight=\"light\">дякуємо</span></small> %s" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "Текст пісні не знайдений." #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "Інформація про виконавця не знайдена" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "Пошук…" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "Шукати радіо на TuneIn" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "Шукати на TuneIn" #~ msgid "Highlight rows on current playlist" #~ msgstr "Виділення рядків у поточному списку відтворення" #~ msgid "Use Gnome 3 HIG" #~ msgstr "Використовувати GNOME 3 HIG" ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/vi.po�������������������������������������������������������������������������������0000664�0000000�0000000�00000076342�13435240150�0014366�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Anh Phan <ppanhh@gmail.com>, 2013 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Vietnamese (http://www.transifex.com/p/Pragha/language/vi/)\n" "Language: vi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "Vô Hiệu Hóa" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "Classical" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "Club" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "Dance" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "Trầm mạnh" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "Trầm mạnh và Bổng" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "Bổng mạnh" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "Loa Laptop và Tai nghe" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "Đại sảnh lớn" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "Nhạc sống" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "Tiệc tùng" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "Pop" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "Nhịp mạnh" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "Rock" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "Ska" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "Độ cong khuôn mặt cười" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "Soft" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "Soft Rock" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "Techno" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "Tự chọn" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "Bộ cân chỉnh tần số" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "Thêm vào hàng đợi để phát" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "_Bỏ qua" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "Bỏ _qua tất cả" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "Xoá _tất cả" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "Nghệ sĩ" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "Album" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "Thể loại" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "Chỉnh sửa thẻ đánh dấu" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "Thư viện" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "_Công cụ" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "Phát / Tạm dừng" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "Dừng lại" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "_Chỉnh sửa thông tin bài nhạc" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "_Thoát" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "_Thêm tập tin" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "Mở tập tin media" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "Thêm _địa điểm" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "_Thêm vào thư viện" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "Cắt bỏ danh sách phát" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "Dọn trống danh sách phát" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "Lưu lại danh sách phát" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "Lưu lại vùng lựa chọn" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "Dịch bởi Vietnamesel10n" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "_Khung điều khiển phía bên" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "Tiêu đề" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "Tốc độ bit" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "Năm" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "Bình luận" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "Độ dài" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "Tên tập tin" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "Loại bỏ khỏi danh sách phát" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "Sao chép \"%i\" đến số track được chọn" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "Sao chép \"%s\" vào các tiêu đề được chọn" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "Sao chép \"%s\" vào các nghệ sĩ được chọn" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "Sao chép \"%s\" vào các album được chọn" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "Sao chép \"%s\" vào loại nhạc được chọn" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "Sao chép \"%i\" vào năm được chọn" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "Sao chép \"%s\" vào bình luận được chọn" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "Track" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "Dọn trống phần sắp xếp" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "Mẫu đặt tên nên theo dạng :<filename> ;<filename> ;....\n" "Cho phép một mẫu có tối đa bốn thành tố.\n" "Không chấp nhận các ký tự đặc biệt ( sẽ được cập nhật ở phiên bản " "sau :-) )." #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "Mẫu đặt tên dành cho Album art" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "Khởi chạy theo kiểu thông thường" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "Khởi chạy ở chế độ toàn màn hình" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "Khởi chạy và thu nhỏ ở khay hệ thống" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "Chọn một thư mục để thêm vào thư viện" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "Âm Thanh" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "Audio sink" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "Cần khởi động lại" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "Thiết bị âm thanh" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "Sử dụng phần mềm phối nhạc" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "Thư mục" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>Hiện không phát bài nào</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "Số hiệu track" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "Tập tin" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "Chi tiết" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "Kênh" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "Tỉ lệ mẫu" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "Thư mục" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "Chọn đến" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "Mở thư mục" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" "Bạn có muốn thiết lập số hiệu track đối với toàn bộ các track được chọn " "thành: %d hay không?" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" "Bạn có muốn thiết lập thẻ đánh dấu dữ liệu của tiêu đề đối với toàn bộ các " "track được chọn thành: %s hay không?" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">bởi</span></small> %s <small><span weight=" "\"light\">trong</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">bởi</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">trong</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "Track trước đó" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "Phát / Tạm dừng track" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "Dừng chế độ phát lại" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "Track tiếp theo" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "Thoát khỏi toàn màn hình" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "Phát nhạc theo thứ tự ngẫu nhiên" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "Lặp lại danh sách ở phần cuối" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>Xảy ra lỗi với track đang được phát.</b>\n" "(%s)\n" "<b>Nguyên nhân :</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "" #: ../src/pragha.c:309 msgid "All files" msgstr "" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "" #: ../src/pragha.c:405 msgid "Add a location" msgstr "" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "Thêm Audio _CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Đĩa CD âm thanh" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "Thiết bị Audio CD " #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Lastfm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "Track bạn thích" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "Track bạn không thích" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "Thêm vào phần tương tự" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "Last.fm đề nghị sự chỉnh sửa thẻ đánh dấu dữ liệu" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "Track" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/po/zh_CN.po����������������������������������������������������������������������������0000664�0000000�0000000�00000077622�13435240150�0014753�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Translators: # Chunyang xu <xuchunyang56@gmail.com>, 2014 # 乐群 陈 <chenlequn22@gmail.com>, 2012 msgid "" msgstr "" "Project-Id-Version: Pragha\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-26 10:11-0300\n" "PO-Revision-Date: 2014-12-21 17:03+0000\n" "Last-Translator: matias <mati86dl@gmail.com>\n" "Language-Team: Chinese (China) (http://www.transifex.com/p/Pragha/language/" "zh_CN/)\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #. GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL #: ../src/info-bar-import-music.c:80 ../src/info-bar-import-music.c:127 #: ../src/info-bar-import-music.c:170 msgid "_No" msgstr "_No" #: ../src/info-bar-import-music.c:81 ../src/info-bar-import-music.c:128 #: ../src/info-bar-import-music.c:171 msgid "_Yes" msgstr "_Yes" #: ../src/info-bar-import-music.c:83 #, c-format msgid "Would you like to import %s to library?" msgstr "" #: ../src/info-bar-import-music.c:130 msgid "Would you like to update your music library?" msgstr "" #: ../src/info-bar-import-music.c:173 msgid "Some changes need restart pragha." msgstr "" #: ../src/pragha-cmdline.c:192 msgid "FILENAME" msgstr "" #: ../src/pragha-cmdline.c:251 msgid "Use --help to see a full list of available command line options." msgstr "" #: ../src/pragha-equalizer-dialog.c:50 msgid "Disabled" msgstr "" #: ../src/pragha-equalizer-dialog.c:51 msgid "Classical" msgstr "" #: ../src/pragha-equalizer-dialog.c:52 msgid "Club" msgstr "" #: ../src/pragha-equalizer-dialog.c:53 msgid "Dance" msgstr "" #: ../src/pragha-equalizer-dialog.c:54 msgid "Full Bass" msgstr "" #: ../src/pragha-equalizer-dialog.c:55 msgid "Full Bass and Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:56 msgid "Full Treble" msgstr "" #: ../src/pragha-equalizer-dialog.c:57 msgid "Laptop Speakers and Headphones" msgstr "" #: ../src/pragha-equalizer-dialog.c:58 msgid "Large Hall" msgstr "" #: ../src/pragha-equalizer-dialog.c:59 msgid "Live" msgstr "" #: ../src/pragha-equalizer-dialog.c:60 msgid "Party" msgstr "" #: ../src/pragha-equalizer-dialog.c:61 msgid "Pop" msgstr "" #: ../src/pragha-equalizer-dialog.c:62 msgid "Reggae" msgstr "" #: ../src/pragha-equalizer-dialog.c:63 msgid "Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:64 msgid "Ska" msgstr "" #: ../src/pragha-equalizer-dialog.c:65 msgid "Smiley Face Curve" msgstr "" #: ../src/pragha-equalizer-dialog.c:66 msgid "Soft" msgstr "" #: ../src/pragha-equalizer-dialog.c:67 msgid "Soft Rock" msgstr "" #: ../src/pragha-equalizer-dialog.c:68 msgid "Techno" msgstr "" #: ../src/pragha-equalizer-dialog.c:69 msgid "Custom" msgstr "" #: ../src/pragha-equalizer-dialog.c:419 msgid "Equalizer" msgstr "" #: ../src/pragha-filter-dialog.c:218 ../src/pragha-library-pane.c:506 #: ../src/pragha-tags-dialog.c:114 ../plugins/notify/pragha-notify-plugin.c:166 msgid "Unknown Artist" msgstr "未知歌手" #: ../src/pragha-filter-dialog.c:219 ../src/pragha-library-pane.c:513 #: ../src/pragha-library-pane.c:518 ../src/pragha-tags-dialog.c:115 #: ../plugins/notify/pragha-notify-plugin.c:167 msgid "Unknown Album" msgstr "未知专辑" #. The search dialog #: ../src/pragha-filter-dialog.c:369 msgid "Search in playlist" msgstr "" #: ../src/pragha-filter-dialog.c:372 msgid "_Close" msgstr "" #: ../src/pragha-filter-dialog.c:375 ../src/pragha-playlist.c:209 msgid "Add to playback queue" msgstr "添加到播放队列" #: ../src/pragha-filter-dialog.c:376 msgid "_Jump to" msgstr "" #: ../src/pragha-library-pane.c:132 msgid "_Skip" msgstr "跳过(_S)" #: ../src/pragha-library-pane.c:133 msgid "S_kip All" msgstr "跳过全部(_k)" #: ../src/pragha-library-pane.c:134 msgid "Delete _All" msgstr "删除全部(_A)" #: ../src/pragha-library-pane.c:188 msgid "_Expand library" msgstr "扩展“库”(_E)" #: ../src/pragha-library-pane.c:190 msgid "_Collapse library" msgstr "折叠”库“(_C)" #: ../src/pragha-library-pane.c:192 ../src/pragha-library-pane.c:1585 msgid "Folders structure" msgstr "目录结构" #: ../src/pragha-library-pane.c:194 ../src/pragha-library-pane.c:1594 #: ../src/pragha-playlist.c:115 ../src/pragha-playlist.c:3371 #: ../src/pragha-playlist.c:3547 ../src/pragha-statusicon.c:180 #: ../src/pragha-tags-dialog.c:168 ../src/pragha-tags-dialog.c:1082 msgid "Artist" msgstr "歌手" #: ../src/pragha-library-pane.c:196 ../src/pragha-library-pane.c:1603 #: ../src/pragha-playlist.c:116 ../src/pragha-playlist.c:3372 #: ../src/pragha-playlist.c:3548 ../src/pragha-statusicon.c:181 #: ../src/pragha-tags-dialog.c:169 ../src/pragha-tags-dialog.c:1087 msgid "Album" msgstr "专辑" #: ../src/pragha-library-pane.c:198 ../src/pragha-library-pane.c:1612 #: ../src/pragha-playlist.c:117 ../src/pragha-playlist.c:3373 #: ../src/pragha-playlist.c:3549 ../src/pragha-tags-dialog.c:170 #: ../src/pragha-tags-dialog.c:1092 msgid "Genre" msgstr "类型" #: ../src/pragha-library-pane.c:200 ../src/pragha-library-pane.c:1624 msgid "Artist / Album" msgstr "歌手/专辑" #: ../src/pragha-library-pane.c:202 ../src/pragha-library-pane.c:1648 msgid "Genre / Album" msgstr "类别/专辑" #: ../src/pragha-library-pane.c:204 ../src/pragha-library-pane.c:1636 msgid "Genre / Artist" msgstr "类别/歌手" #: ../src/pragha-library-pane.c:206 ../src/pragha-library-pane.c:1663 msgid "Genre / Artist / Album" msgstr "类别/歌手/专辑" #. Playlist and Radio tree #: ../src/pragha-library-pane.c:242 msgid "_Add to current playlist" msgstr "添加到播放列表(_A)" #: ../src/pragha-library-pane.c:244 msgid "_Replace current playlist" msgstr "替换当前播放列表(_R)" #: ../src/pragha-library-pane.c:246 msgid "Replace and _play" msgstr "替换并播放(_p)" #: ../src/pragha-library-pane.c:248 ../src/pragha-playlists-mgmt.c:514 msgid "Rename" msgstr "重命名" #: ../src/pragha-library-pane.c:250 msgid "Delete" msgstr "删除" #: ../src/pragha-library-pane.c:252 ../src/pragha-menubar.c:222 #: ../src/pragha-menubar.c:227 ../src/pragha-playlists-mgmt.c:1337 #: ../src/pragha-playlists-mgmt.c:1373 msgid "Export" msgstr "导出" #. Set dialog properties #: ../src/pragha-library-pane.c:254 ../src/pragha-tags-dialog.c:147 msgid "Edit tags" msgstr "编辑tags" #: ../src/pragha-library-pane.c:256 msgid "Move to _trash" msgstr "移到回收站(_t)" #: ../src/pragha-library-pane.c:258 msgid "Delete from library" msgstr "从“库”中删除" #: ../src/pragha-library-pane.c:511 ../src/pragha-tags-dialog.c:105 msgid "Unknown" msgstr "" #: ../src/pragha-library-pane.c:523 msgid "Unknown Genre" msgstr "未知类别" #: ../src/pragha-library-pane.c:843 msgid "File can't be moved to trash. Delete permanently?" msgstr "" #: ../src/pragha-library-pane.c:844 #, c-format msgid "The file \"%s\" cannot be moved to the trash. Details: %s" msgstr "文件 \"%s\"无法移到回收站。详细:%s" #: ../src/pragha-library-pane.c:852 ../src/pragha-playlists-mgmt.c:85 #: ../src/pragha-playlists-mgmt.c:517 ../src/pragha-playlists-mgmt.c:589 #: ../src/pragha-playlists-mgmt.c:1239 ../src/pragha-preferences-dialog.c:671 #: ../src/pragha-preferences-dialog.c:1276 ../src/pragha-tags-dialog.c:149 #: ../src/pragha.c:209 ../src/pragha.c:408 #: ../plugins/lastfm/pragha-lastfm-plugin.c:956 #: ../plugins/tunein/pragha-tunein-plugin.c:227 msgid "_Cancel" msgstr "取消" #: ../src/pragha-library-pane.c:858 msgid "_Delete" msgstr "删除" #: ../src/pragha-library-pane.c:1895 ../src/pragha-library-pane.c:1977 #: ../src/pragha-playlists-mgmt.c:618 ../src/pragha-playlists-mgmt.c:645 #: ../src/pragha.c:306 msgid "Playlists" msgstr "播放列表" #: ../src/pragha-library-pane.c:1911 ../src/pragha-library-pane.c:1986 msgid "Radios" msgstr "电台" #: ../src/pragha-library-pane.c:1927 ../src/pragha-preferences-dialog.c:959 #: ../src/pragha-preferences-dialog.c:1283 msgid "Library" msgstr "“库”" #: ../src/pragha-library-pane.c:2484 msgid "Really want to move the files to trash?" msgstr "确定移动这些文件到回收站么?" #: ../src/pragha-library-pane.c:2486 msgid "Delete permanently instead of moving to trash" msgstr "不移到回收站,直接删除" #: ../src/pragha-library-pane.c:2536 msgid "" "Are you sure you want to delete current file from library?\n" "\n" "Warning: To recover we must rescan the entire library." msgstr "" "确定从“库”中删除当前文件?\n" "\n" "警告:必须重新扫描才能恢复" #: ../src/pragha-menubar.c:190 msgid "_Playback" msgstr "播放" #: ../src/pragha-menubar.c:191 msgid "Play_list" msgstr "播放列表" #: ../src/pragha-menubar.c:192 msgid "_View" msgstr "视图(_V)" #: ../src/pragha-menubar.c:193 ../src/pragha-playlist.c:222 msgid "_Tools" msgstr "工具(_T)" #: ../src/pragha-menubar.c:194 msgid "_Help" msgstr "帮助(_H)" #: ../src/pragha-menubar.c:195 ../src/pragha-statusicon.c:83 #: ../plugins/notify/pragha-notify-plugin.c:177 msgid "Previous track" msgstr "上一首歌曲" #: ../src/pragha-menubar.c:197 ../src/pragha-statusicon.c:85 msgid "Play / Pause" msgstr "播放/暂停" #: ../src/pragha-menubar.c:199 ../src/pragha-statusicon.c:87 msgid "Stop" msgstr "停止" #: ../src/pragha-menubar.c:201 ../src/pragha-statusicon.c:89 #: ../plugins/notify/pragha-notify-plugin.c:181 msgid "Next track" msgstr "下一首" #: ../src/pragha-menubar.c:203 ../src/pragha-playlist.c:225 #: ../src/pragha-statusicon.c:91 msgid "Edit track information" msgstr "修改音轨信息" #: ../src/pragha-menubar.c:205 ../src/pragha-statusicon.c:93 msgid "_Quit" msgstr "退出(_Q)" #: ../src/pragha-menubar.c:207 ../src/pragha-statusicon.c:79 msgid "_Add files" msgstr "添加(_A)" #: ../src/pragha-menubar.c:208 msgid "Open a media file" msgstr "打开媒体文件" #: ../src/pragha-menubar.c:209 ../src/pragha-statusicon.c:81 msgid "Add _location" msgstr "添加网络地址(_l)" #: ../src/pragha-menubar.c:211 msgid "_Add the library" msgstr "添加“库”(_A)" #: ../src/pragha-menubar.c:213 msgid "Remove selection from playlist" msgstr "从播放列表中删除" #: ../src/pragha-menubar.c:215 ../src/pragha-playlist.c:215 msgid "Crop playlist" msgstr "清空播放列表" #: ../src/pragha-menubar.c:217 ../src/pragha-playlist.c:217 msgid "Clear playlist" msgstr "清空播放列表" #: ../src/pragha-menubar.c:219 ../src/pragha-playlist.c:219 #: ../src/pragha-playlists-mgmt.c:69 ../src/pragha-playlists-mgmt.c:92 #: ../src/pragha-playlists-mgmt.c:1244 msgid "Save playlist" msgstr "保存播放列表" #: ../src/pragha-menubar.c:220 ../src/pragha-menubar.c:225 #: ../src/pragha-playlists-mgmt.c:1333 ../src/pragha-playlists-mgmt.c:1369 msgid "New playlist" msgstr "新建播放列表" #: ../src/pragha-menubar.c:224 ../src/pragha-playlist.c:220 #: ../src/pragha-playlists-mgmt.c:71 ../src/pragha-playlists-mgmt.c:94 #: ../src/pragha-playlists-mgmt.c:1246 msgid "Save selection" msgstr "保存所选" #: ../src/pragha-menubar.c:229 msgid "_Search in playlist" msgstr "在列表中搜索(_S)" #: ../src/pragha-menubar.c:231 msgid "_Preferences" msgstr "首选项(_P)" #: ../src/pragha-menubar.c:233 msgid "Jump to playing song" msgstr "跳到正播放歌曲" #: ../src/pragha-menubar.c:235 msgid "E_qualizer" msgstr "均衡器(_q)" #: ../src/pragha-menubar.c:237 msgid "_Rescan library" msgstr "重新扫描“库”(_R)" #: ../src/pragha-menubar.c:239 #: ../plugins/removable-media/pragha-devices-removable.c:302 msgid "_Update library" msgstr "更新“库”(_U)" #: ../src/pragha-menubar.c:241 msgid "_Statistics" msgstr "状态(_S)" #: ../src/pragha-menubar.c:243 msgid "Homepage" msgstr "主页" #: ../src/pragha-menubar.c:245 msgid "Community" msgstr "社区" #: ../src/pragha-menubar.c:247 msgid "Wiki" msgstr "Wiki" #: ../src/pragha-menubar.c:249 msgid "Translate Pragha" msgstr "翻译Pragha" #: ../src/pragha-menubar.c:251 ../src/pragha-statusicon.c:77 msgid "About" msgstr "关于" #: ../src/pragha-menubar.c:256 msgid "_Shuffle" msgstr "随机(_S)" #: ../src/pragha-menubar.c:259 msgid "_Repeat" msgstr "重复(_R)" #: ../src/pragha-menubar.c:262 msgid "_Fullscreen" msgstr "全屏(_F)" #: ../src/pragha-menubar.c:265 msgid "Lateral _panel" msgstr "表盘(_p)" #: ../src/pragha-menubar.c:268 msgid "Secondary lateral panel" msgstr "" #: ../src/pragha-menubar.c:271 msgid "Playback controls below" msgstr "播放控制" #: ../src/pragha-menubar.c:274 msgid "Menubar" msgstr "" #: ../src/pragha-menubar.c:277 msgid "Status bar" msgstr "状态栏" #: ../src/pragha-menubar.c:638 msgid "Total Tracks:" msgstr "歌曲数量" #: ../src/pragha-menubar.c:640 msgid "Total Artists:" msgstr "歌手数量" #: ../src/pragha-menubar.c:642 msgid "Total Albums:" msgstr "专辑数量" #: ../src/pragha-menubar.c:645 msgid "Statistics" msgstr "状态" #. Create labels #: ../src/pragha-playlist.c:114 ../src/pragha-playlist.c:3370 #: ../src/pragha-playlist.c:3546 ../src/pragha-statusicon.c:179 #: ../src/pragha-tags-dialog.c:167 ../src/pragha-tags-dialog.c:1077 msgid "Title" msgstr "标题" #: ../src/pragha-playlist.c:118 ../src/pragha-playlist.c:3374 #: ../src/pragha-playlist.c:3550 ../src/pragha-tags-dialog.c:682 msgid "Bitrate" msgstr "比特率" #: ../src/pragha-playlist.c:119 ../src/pragha-playlist.c:3375 #: ../src/pragha-playlist.c:3551 ../src/pragha-tags-dialog.c:172 msgid "Year" msgstr "年份" #: ../src/pragha-playlist.c:120 ../src/pragha-playlist.c:3376 #: ../src/pragha-playlist.c:3552 ../src/pragha-tags-dialog.c:173 #: ../src/pragha-tags-dialog.c:1097 msgid "Comment" msgstr "注释" #. Create labels #: ../src/pragha-playlist.c:121 ../src/pragha-playlist.c:3377 #: ../src/pragha-playlist.c:3553 ../src/pragha-statusicon.c:182 #: ../src/pragha-tags-dialog.c:681 msgid "Length" msgstr "长度" #: ../src/pragha-playlist.c:122 ../src/pragha-playlist.c:3378 #: ../src/pragha-playlist.c:3554 ../src/pragha-tags-dialog.c:686 msgid "Filename" msgstr "文件名" #: ../src/pragha-playlist.c:123 ../src/pragha-playlist.c:3379 #: ../src/pragha-playlist.c:3555 ../src/pragha-tags-dialog.c:687 msgid "Mimetype" msgstr "" #: ../src/pragha-playlist.c:211 msgid "Remove from playback queue" msgstr "从播放队列中移除" #: ../src/pragha-playlist.c:213 msgid "Remove from playlist" msgstr "从播放列表中删除" #: ../src/pragha-playlist.c:221 msgid "_Send to" msgstr "发送到" #: ../src/pragha-playlist.c:2501 #, c-format msgid "Copy \"%i\" to selected track numbers" msgstr "" #: ../src/pragha-playlist.c:2507 #, c-format msgid "Copy \"%s\" to selected titles" msgstr "" #: ../src/pragha-playlist.c:2513 #, c-format msgid "Copy \"%s\" to selected artists" msgstr "" #: ../src/pragha-playlist.c:2519 #, c-format msgid "Copy \"%s\" to selected albums" msgstr "" #: ../src/pragha-playlist.c:2525 #, c-format msgid "Copy \"%s\" to selected genres" msgstr "" #: ../src/pragha-playlist.c:2531 #, c-format msgid "Copy \"%i\" to selected years" msgstr "" #: ../src/pragha-playlist.c:2537 #, c-format msgid "Copy \"%s\" to selected comments" msgstr "" #. Create the checkmenu items #: ../src/pragha-playlist.c:3369 ../src/pragha-playlist.c:3545 #: ../src/pragha.c:626 msgid "Track" msgid_plural "Tracks" msgstr[0] "曲目标号" #: ../src/pragha-playlist.c:3382 msgid "Clear sort" msgstr "清晰排序" #: ../src/pragha-playlists-mgmt.c:73 msgid "Playlist" msgstr "播放列表" #: ../src/pragha-playlists-mgmt.c:86 ../src/pragha-playlists-mgmt.c:518 #: ../src/pragha-playlists-mgmt.c:1240 ../src/pragha-preferences-dialog.c:1277 #: ../src/pragha-tags-dialog.c:150 ../src/pragha-tags-dialog.c:767 #: ../src/pragha.c:409 ../plugins/song-info/pragha-song-info-dialog.c:84 #: ../plugins/tunein/pragha-tunein-plugin.c:228 msgid "_Ok" msgstr "" #: ../src/pragha-playlists-mgmt.c:129 msgid "<b>con_playlist</b> is a reserved playlist name" msgstr "<b>con_playlist</b> 是一个反转后的播放列表名" #: ../src/pragha-playlists-mgmt.c:153 #, c-format msgid "Do you want to overwrite the playlist: %s ?" msgstr "确认覆盖播放列表 %s ?" #: ../src/pragha-playlists-mgmt.c:507 msgid "Choose a new name" msgstr "选择一个新的名字" #: ../src/pragha-playlists-mgmt.c:556 #, c-format msgid "Do you want to delete the item: %s ?" msgstr "确认删除 %s ?" #: ../src/pragha-playlists-mgmt.c:586 msgid "Export playlist to file" msgstr "导出播放列表到文件中" #: ../src/pragha-playlists-mgmt.c:590 msgid "_Save" msgstr "保存" #: ../src/pragha-playlists-mgmt.c:1036 #: ../plugins/lastfm/pragha-lastfm-plugin.c:929 #, c-format msgid "Added %d songs from %d of the imported playlist." msgstr "" #: ../src/pragha-playlists-mgmt.c:1224 msgid "What do you want to do?" msgstr "你想要做什么?" #: ../src/pragha-playlists-mgmt.c:1226 #, c-format msgid "Replace the playlist \"%s\"" msgstr "" #: ../src/pragha-playlists-mgmt.c:1231 #, c-format msgid "Add to playlist \"%s\"" msgstr "" #: ../src/pragha-preferences-dialog.c:192 msgid "" "Patterns should be of the form:<filename>;<filename>;....\n" "A maximum of six patterns are allowed.\n" "Wildcards are not accepted as of now ( patches welcome :-) )." msgstr "" "匹配式必须是如下格式:<filename>;<filename>;....\n" "最多支持6个。\n" "通配符目前不支持(欢迎patchs ^_^)" #: ../src/pragha-preferences-dialog.c:215 msgid "Album art pattern" msgstr "歌手匹配式" #: ../src/pragha-preferences-dialog.c:523 #: ../src/pragha-preferences-dialog.c:1132 msgid "Start normal" msgstr "正常启动" #: ../src/pragha-preferences-dialog.c:527 #: ../src/pragha-preferences-dialog.c:1133 msgid "Start fullscreen" msgstr "全屏启动" #: ../src/pragha-preferences-dialog.c:531 #: ../src/pragha-preferences-dialog.c:1134 msgid "Start in system tray" msgstr "最小化到托盘启动" #. Create a folder chooser dialog #: ../src/pragha-preferences-dialog.c:668 msgid "Select a folder to add to library" msgstr "选择一个目录加入到“库”中" #: ../src/pragha-preferences-dialog.c:672 #: ../plugins/lastfm/pragha-lastfm-plugin.c:957 msgid "_Open" msgstr "打开" #: ../src/pragha-preferences-dialog.c:895 #: ../src/pragha-preferences-dialog.c:1302 msgid "Audio" msgstr "音频" #: ../src/pragha-preferences-dialog.c:897 msgid "Audio sink" msgstr "音频输出" #: ../src/pragha-preferences-dialog.c:901 #: ../src/pragha-preferences-dialog.c:920 #: ../src/pragha-preferences-dialog.c:926 msgid "Restart Required" msgstr "需要重启" #: ../src/pragha-preferences-dialog.c:916 msgid "Audio Device" msgstr "音频设备" #: ../src/pragha-preferences-dialog.c:925 msgid "Use software mixer" msgstr "使用软件混合器" #: ../src/pragha-preferences-dialog.c:963 msgid "Can not change directories while they are analyzing." msgstr "" #: ../src/pragha-preferences-dialog.c:973 msgid "Folders" msgstr "文件夹" #: ../src/pragha-preferences-dialog.c:992 ../src/pragha.c:210 msgid "_Add" msgstr "添加" #: ../src/pragha-preferences-dialog.c:993 msgid "_Remove" msgstr "删除" #: ../src/pragha-preferences-dialog.c:1009 msgid "Merge folders in the folders estructure view" msgstr "在目录结构视图中合并目录" #: ../src/pragha-preferences-dialog.c:1012 msgid "Sort albums by release year" msgstr "按发行年份排序" #. Labels #: ../src/pragha-preferences-dialog.c:1055 #: ../src/pragha-preferences-dialog.c:1282 msgid "Appearance" msgstr "外观" #: ../src/pragha-preferences-dialog.c:1057 msgid "Use system title bar and borders" msgstr "" #: ../src/pragha-preferences-dialog.c:1064 msgid "Use small icons on the toolbars" msgstr "" #: ../src/pragha-preferences-dialog.c:1067 msgid "Controls" msgstr "Controls" #: ../src/pragha-preferences-dialog.c:1069 msgid "Show Album art in Panel" msgstr "在表盘中显示专辑" #: ../src/pragha-preferences-dialog.c:1072 msgid "Size of Album art" msgstr "专辑大小" #: ../src/pragha-preferences-dialog.c:1077 msgid "Album art file pattern" msgstr "专辑匹配式" #: ../src/pragha-preferences-dialog.c:1120 msgid "Search" msgstr "搜索" #. Instant search. #: ../src/pragha-preferences-dialog.c:1122 ../src/pragha-search-entry.c:41 msgid "Search while typing" msgstr "搜索时即时显示结果" #. Aproximate search. #: ../src/pragha-preferences-dialog.c:1125 ../src/pragha-search-entry.c:48 msgid "Search similar words" msgstr "搜索相似的词" #: ../src/pragha-preferences-dialog.c:1128 msgid "When starting pragha" msgstr "打开 pragha 时" #: ../src/pragha-preferences-dialog.c:1131 msgid "Remember last window state" msgstr "记住最后的窗口状态" #: ../src/pragha-preferences-dialog.c:1137 msgid "Restore last playlist" msgstr "恢复最后的播放列表" #: ../src/pragha-preferences-dialog.c:1140 msgid "When adding folders" msgstr "在添加文件夹时" #: ../src/pragha-preferences-dialog.c:1141 ../src/pragha.c:201 msgid "Add files recursively" msgstr "递归添加文件" #: ../src/pragha-preferences-dialog.c:1165 #: ../src/pragha-preferences-dialog.c:1317 msgid "Desktop" msgstr "桌面" #: ../src/pragha-preferences-dialog.c:1167 msgid "Show Pragha icon in the notification area" msgstr "在通知栏中显示 Pragha" #: ../src/pragha-preferences-dialog.c:1170 msgid "Minimize Pragha when closing window" msgstr "当点击关闭按钮时最小化Pragha" #: ../src/pragha-preferences-dialog.c:1191 #: ../src/pragha-preferences-dialog.c:1286 msgid "Plugins" msgstr "插件" #. The main preferences dialog #: ../src/pragha-preferences-dialog.c:1273 msgid "Preferences" msgstr "Pragha首选项" #: ../src/pragha-preferences-dialog.c:1284 msgid "General" msgstr "通用" #: ../src/pragha-preferences-dialog.c:1321 msgid "Services" msgstr "网络服务" #: ../src/pragha-preferences-dialog.c:1335 msgid "Preferences of Pragha" msgstr "Pragha首选项" #: ../src/pragha-scanner.c:93 #, c-format msgid "%i files analized of %i detected" msgstr "" #: ../src/pragha-scanner.c:99 msgid "Searching files to analyze" msgstr "" #: ../src/pragha-scanner.c:250 msgid "Library scan complete" msgstr "“库”扫描完毕" #: ../src/pragha-statusicon.c:174 ../src/pragha-toolbar.c:174 #: ../src/pragha-toolbar.c:524 msgid "<b>Not playing</b>" msgstr "<b>未播放</b>" #: ../src/pragha-tags-dialog.c:171 msgid "Track No" msgstr "曲目标号" #: ../src/pragha-tags-dialog.c:174 msgid "File" msgstr "文件" #. The main edit dialog #: ../src/pragha-tags-dialog.c:562 ../src/pragha-tags-dialog.c:764 msgid "Details" msgstr "详细" #: ../src/pragha-tags-dialog.c:664 msgid "channel" msgid_plural "channels" msgstr[0] "声道" #: ../src/pragha-tags-dialog.c:683 msgid "Channels" msgstr "声道" #: ../src/pragha-tags-dialog.c:684 msgid "Samplerate" msgstr "采样率" #: ../src/pragha-tags-dialog.c:685 msgid "Folder" msgstr "文件夹" #: ../src/pragha-tags-dialog.c:1070 msgid "Selection to" msgstr "保存所选" #: ../src/pragha-tags-dialog.c:1108 msgid "Open folder" msgstr "打开文件夹" #: ../src/pragha-tags-mgmt.c:197 #, c-format msgid "" "Do you want to set the track number of ALL of the selected tracks to: %d ?" msgstr "" #: ../src/pragha-tags-mgmt.c:215 #, c-format msgid "Do you want to set the title tag of ALL of the selected tracks to: %s ?" msgstr "" #: ../src/pragha-toolbar.c:150 #, c-format msgid "" "%s <small><span weight=\"light\">by</span></small> %s <small><span weight=" "\"light\">in</span></small> %s" msgstr "" "%s <small><span weight=\"light\">由</span></small> %s <small><span weight=" "\"light\">位于</span></small> %s" #: ../src/pragha-toolbar.c:155 #: ../plugins/song-info/pragha-song-info-thread-dialog.c:52 #, c-format msgid "%s <small><span weight=\"light\">by</span></small> %s" msgstr "%s <small><span weight=\"light\">由</span></small> %s" #: ../src/pragha-toolbar.c:159 #, c-format msgid "%s <small><span weight=\"light\">in</span></small> %s" msgstr "%s <small><span weight=\"light\">于</span></small> %s" #: ../src/pragha-toolbar.c:809 msgid "Previous Track" msgstr "上一首歌曲" #: ../src/pragha-toolbar.c:813 msgid "Play / Pause Track" msgstr "播放/暂停歌曲" #: ../src/pragha-toolbar.c:817 msgid "Stop playback" msgstr "停止播放" #: ../src/pragha-toolbar.c:821 msgid "Next Track" msgstr "下一首" #: ../src/pragha-toolbar.c:853 msgid "Leave Fullscreen" msgstr "离开全屏" #: ../src/pragha-toolbar.c:857 msgid "Play songs in a random order" msgstr "乱序播放" #: ../src/pragha-toolbar.c:860 msgid "Repeat playback list at the end" msgstr "重复播放" #: ../src/pragha-utils.c:239 msgid "day" msgid_plural "days" msgstr[0] "天" #: ../src/pragha-utils.c:486 msgid "Unable to open the browser" msgstr "无法打开浏览器" #: ../src/pragha-window.c:115 #, c-format msgid "" "<b>Error playing current track.</b>\n" "(%s)\n" "<b>Reason:</b> %s" msgstr "" "<b>无法播放当前曲目</b>\n" "(%s)\n" "<b>原因是:</b> %s" #: ../src/pragha-window.c:118 msgid "_Stop" msgstr "停止" #: ../src/pragha-window.c:119 msgid "_Next" msgstr "下一首" #: ../src/pragha.c:176 msgid "Select a file to play" msgstr "选择一个文件来播放" #: ../src/pragha.c:223 ../plugins/lastfm/pragha-lastfm-plugin.c:961 msgid "Supported media" msgstr "所有支持的媒体" #: ../src/pragha.c:309 msgid "All files" msgstr "所有文件" #: ../src/pragha.c:385 msgid "Enter the URL of an internet radio stream" msgstr "输入感兴趣的电台地址" #: ../src/pragha.c:392 msgid "Give it a name to save" msgstr "保存为" #: ../src/pragha.c:405 msgid "Add a location" msgstr "添加网络地址" #: ../src/pragha.c:537 msgid "translator-credits" msgstr "翻译者" #. Setup application name and pulseaudio role #: ../src/pragha.c:705 ../src/pragha.c:937 ../src/pragha.c:1314 #: ../plugins/dlna/pragha-dlna-plugin.c:222 #: ../plugins/dlna/pragha-dlna-plugin.c:224 msgid "Pragha Music Player" msgstr "Pragha音乐播放器" #: ../data/pragha.desktop.in.h:1 msgid "Music Player" msgstr "音乐播放器" #: ../data/pragha.desktop.in.h:2 msgid "Manage and listen to music" msgstr "管理和听音乐" #: ../plugins/acoustid/pragha-acoustid-plugin.c:99 #: ../plugins/acoustid/pragha-acoustid-plugin.c:428 msgid "Search tags on AcoustID" msgstr "" #: ../plugins/acoustid/pragha-acoustid-plugin.c:261 msgid "AcoustID not found any similar song" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:477 msgid "Audio/Data CD" msgstr "Audio/Data CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:478 msgid "An audio CD was inserted" msgstr "" #: ../plugins/cdrom/pragha-cdrom-plugin.c:479 #: ../plugins/cdrom/pragha-cdrom-plugin.c:519 #: ../plugins/cdrom/pragha-cdrom-plugin.c:730 msgid "Add Audio _CD" msgstr "添加整张CD(_C)" #: ../plugins/cdrom/pragha-cdrom-plugin.c:622 msgid "Audio CD" msgstr "Audio CD" #: ../plugins/cdrom/pragha-cdrom-plugin.c:624 msgid "Audio CD Device" msgstr "音频CD设备" #: ../plugins/cdrom/pragha-cdrom-plugin.c:644 msgid "Connect to CDDB server" msgstr "连接到CDDB服务器" #: ../plugins/devices/pragha-device-client.c:76 msgid "Ignore" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:89 #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:283 msgid "Search music on DLNA server" msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:220 #, c-format msgid "Music of the %s server was added." msgstr "" #: ../plugins/dlna-renderer/pragha-dlna-renderer-plugin.c:225 msgid "Could not find any DLNA server." msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:174 #: ../plugins/lastfm/pragha-lastfm-plugin.c:1549 msgid "_Lastfm" msgstr "_Last.FM" #: ../plugins/lastfm/pragha-lastfm-plugin.c:175 #: ../plugins/lastfm/pragha-lastfm-plugin.c:215 msgid "Love track" msgstr "设为喜爱曲目" #: ../plugins/lastfm/pragha-lastfm-plugin.c:177 #: ../plugins/lastfm/pragha-lastfm-plugin.c:217 msgid "Unlove track" msgstr "从喜爱曲目中删除" #: ../plugins/lastfm/pragha-lastfm-plugin.c:179 #: ../plugins/lastfm/pragha-lastfm-plugin.c:953 msgid "Import a XSPF playlist" msgstr "导入XSPF播放列表" #: ../plugins/lastfm/pragha-lastfm-plugin.c:181 msgid "Add favorites" msgstr "添加到我最喜爱的" #: ../plugins/lastfm/pragha-lastfm-plugin.c:183 #: ../plugins/lastfm/pragha-lastfm-plugin.c:219 msgid "Add similar" msgstr "添加相似歌曲" #: ../plugins/lastfm/pragha-lastfm-plugin.c:432 msgid "Unable to establish conection with Last.fm" msgstr "无法连接 Last.fm" #: ../plugins/lastfm/pragha-lastfm-plugin.c:617 msgid "Last.fm suggested a tag correction" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:643 msgid "Love song on Last.fm failed." msgstr "在Last.FM上设置喜爱曲目失败" #: ../plugins/lastfm/pragha-lastfm-plugin.c:661 msgid "Unlove song on Last.fm failed." msgstr "在Last.FM上取消喜爱曲目失败" #: ../plugins/lastfm/pragha-lastfm-plugin.c:768 #, c-format msgid "Added %d tracks of %d suggested from Last.fm" msgstr "从Last.FM上添加了%d首推荐(共%d首)" #: ../plugins/lastfm/pragha-lastfm-plugin.c:771 #, c-format msgid "Last.fm doesn't suggest any similar track" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:775 #, c-format msgid "Added %d songs of the last %d loved on Last.fm." msgstr "从Last.FM上添加了%d首喜爱曲目(共%d首)" #: ../plugins/lastfm/pragha-lastfm-plugin.c:778 #, c-format msgid "You don't have favorite tracks on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1248 msgid "Last.fm submission failed" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1250 msgid "Track scrobbled on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1360 msgid "Update current song on Last.fm failed." msgstr "上传当前歌曲到Last.FM失败" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1787 msgid "Scrobble on Last.fm" msgstr "" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1790 msgid "Username" msgstr "用户名" #: ../plugins/lastfm/pragha-lastfm-plugin.c:1797 msgid "Password" msgstr "密码" #: ../plugins/mpris2/pragha-mpris2-plugin.c:856 #, fuzzy msgid "Tracks" msgstr "曲目标号" #: ../plugins/notify/pragha-notify-plugin.c:165 #, c-format msgid "by <b>%s</b> in <b>%s</b> <b>(%s)</b>" msgstr "由 <b>%s</b> 于 <b>%s</b> <b>(%s)</b>" #: ../plugins/notify/pragha-notify-plugin.c:267 msgid "Notifications" msgstr "通知" #: ../plugins/notify/pragha-notify-plugin.c:269 msgid "Show Album art in notifications" msgstr "在通知中显示专辑" #: ../plugins/notify/pragha-notify-plugin.c:274 msgid "Add actions to change track in notifications" msgstr "在通知中添加切换动作" #: ../plugins/removable-media/pragha-devices-removable.c:211 #, c-format msgid "Unable to access \"%s\"" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:214 #: ../plugins/removable-media/pragha-devices-removable.c:300 msgid "Removable Device" msgstr "" #: ../plugins/removable-media/pragha-devices-removable.c:297 #, c-format msgid "Want to manage \"%s\" volume?" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:88 msgid "Search _lyric" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:90 msgid "Search _artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:377 msgid "Song Information" msgstr "" #: ../plugins/song-info/pragha-song-info-plugin.c:379 msgid "Download the album art while playing their songs." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:51 #, c-format msgid "Lyrics thanks to %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:58 #, c-format msgid "Artist info" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:59 #, c-format msgid "%s <small><span weight=\"light\">thanks to</span></small> %s" msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:81 #: ../plugins/song-info/pragha-song-info-thread-pane.c:100 msgid "Lyrics not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-dialog.c:84 #: ../plugins/song-info/pragha-song-info-thread-pane.c:104 msgid "Artist information not found." msgstr "" #: ../plugins/song-info/pragha-song-info-thread-pane.c:185 #: ../plugins/song-info/pragha-song-info-thread-pane.c:193 msgid "Searching..." msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:92 #: ../plugins/tunein/pragha-tunein-plugin.c:295 msgid "Search radio on TuneIn" msgstr "" #: ../plugins/tunein/pragha-tunein-plugin.c:224 #: ../plugins/tunein/pragha-tunein-plugin.c:235 msgid "Search in TuneIn" msgstr "" #~ msgid "Highlight rows on current playlist" #~ msgstr "为播放列表交替染色" ��������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/�����������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0013545�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/.gitignore�������������������������������������������������������������������������0000664�0000000�0000000�00000000036�13435240150�0015534�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������*.deps* *.libs* pragha *.o *~ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/Makefile.am������������������������������������������������������������������������0000664�0000000�0000000�00000006636�13435240150�0015614�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������bin_PROGRAMS = pragha AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"pragha\" \ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ -DPIXMAPDIR=\""$(datadir)/pixmaps/pragha"\" \ -DDESKTOPENTRY=\""$(datadir)/applications/pragha.desktop"\" \ -DLIBPLUGINDIR=\""$(libdir)/pragha/plugins/"\" \ -DUSRPLUGINDIR=\""$(prefix)/share/pragha/plugins"\" \ -DUSRCUSTUMDIR=\""$(datadir)/pragha/custom"\" \ -I$(top_srcdir) pragha_SOURCES = \ gtkcellrendererbubble.c \ gtkcellrendererbubble.h \ info-bar-import-music.c \ pragha-album-art.c \ pragha-album-art.h \ pragha-art-cache.c \ pragha-art-cache.h \ pragha-backend.c \ pragha-backend.h \ pragha-cmdline.c \ pragha-database.c \ pragha-database.h \ pragha-debug.c \ pragha-debug.h \ pragha-dnd.c \ pragha-dnd.h \ pragha-equalizer-dialog.c \ pragha-equalizer-dialog.h \ pragha-file-utils.c \ pragha-file-utils.h \ pragha-filter-dialog.c \ pragha-filter-dialog.h \ pragha-hig.c \ pragha-hig.h \ pragha-library-pane.c \ pragha-library-pane.h \ pragha-menubar.c \ pragha-menubar.h \ pragha-music-enum.c \ pragha-music-enum.h \ pragha-musicobject.c \ pragha-musicobject.h \ pragha-musicobject-mgmt.c \ pragha-musicobject-mgmt.h \ pragha-playback.c \ pragha-playback.h \ pragha-playlist.c \ pragha-playlist.h \ pragha-playlists-mgmt.c \ pragha-playlists-mgmt.h \ pragha-preferences.c \ pragha-preferences.h \ pragha-preferences-dialog.c \ pragha-preferences-dialog.h \ pragha-prepared-statement.c \ pragha-prepared-statement.h \ pragha-prepared-statement-private.h \ pragha-scanner.c \ pragha-scanner.h \ pragha-search-entry.c \ pragha-search-entry.h \ pragha-session.c \ pragha-session.h \ pragha-sidebar.c \ pragha-sidebar.h \ pragha-simple-async.c \ pragha-simple-async.h \ pragha-simple-widgets.c \ pragha-simple-widgets.h \ pragha-statusbar.c \ pragha-statusbar.h \ pragha-statusicon.c \ pragha-statusicon.h \ pragha-tagger.c \ pragha-tagger.h \ pragha-tags-dialog.c \ pragha-tags-dialog.h \ pragha-tags-mgmt.c \ pragha-tags-mgmt.h \ pragha-toolbar.c \ pragha-toolbar.h \ pragha-utils.c \ pragha-utils.h \ pragha-window.c \ pragha-window.h \ pragha.c \ pragha.h \ xml_helper.c \ xml_helper.h pragha_CFLAGS = $(GSTREAMER_CFLAGS) \ $(GSTREAMER_BASE_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_CFLAGS) \ $(GTK_CFLAGS) \ $(SQLITE3_CFLAGS) \ $(TAGLIB_C_CFLAGS) \ -I$(top_srcdir)/src/include \ -Wall -lm pragha_LDADD = $(GSTREAMER_LIBS) \ $(GLIB_LIBS) \ $(GIO_LIBS) \ $(GTK_LIBS) \ $(SQLITE3_LIBS) \ $(TAGLIB_C_LIBS) if HAVE_GSTREAMER_AUDIO pragha_CFLAGS += $(GSTREAMER_AUDIO_CFLAGS) pragha_LDADD += $(GSTREAMER_AUDIO_LIBS) endif if HAVE_LIBXFCE4UI pragha_CFLAGS += $(LIBXFCE4UI_CFLAGS) pragha_LDADD += $(LIBXFCE4UI_LIBS) endif if HAVE_PLPARSER pragha_CFLAGS += $(PLPARSER_CFLAGS) pragha_LDADD += $(PLPARSER_LIBS) endif if HAVE_LIBPEAS pragha_SOURCES += \ pragha-plugins-engine.c \ pragha-plugins-engine.h pragha_CFLAGS += $(LIBPEAS_CFLAGS) pragha_LDADD += $(LIBPEAS_LIBS) pragha_CFLAGS += $(LIBPEAS_GTK_CFLAGS) pragha_LDADD += $(LIBPEAS_GTK_LIBS) endif if WIN32 pragha_SOURCES += \ $(top_srcdir)/win32/win32dep.c \ $(top_srcdir)/win32/win32dep.h AM_CFLAGS = \ -mms-bitfields AM_LDFLAGS = \ -Wl,-subsystem,windows pragha-res.o: $(top_srcdir)/win32/pragha.rc $(WINDRES) -i $(top_srcdir)/win32/pragha.rc --input-format=rc -o pragha-res.o -O coff pragha_LDADD += pragha-res.o endif ��������������������������������������������������������������������������������������������������pragha-1.3.4/src/gtkcellrendererbubble.c������������������������������������������������������������0000664�0000000�0000000�00000017717�13435240150�0020256�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* gtkcellrendererbubble.c * * Copyright (C) 2009 - Christian Hergert * * This 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 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 St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "gtkcellrendererbubble.h" struct _GtkCellRendererBubblePrivate { gboolean show_bubble; }; enum { PROP_0, PROP_SHOW_BUBBLE, }; G_DEFINE_TYPE (GtkCellRendererBubble, gtk_cell_renderer_bubble, GTK_TYPE_CELL_RENDERER_TEXT); static void gtk_cell_renderer_bubble_finalize (GObject *object) { G_OBJECT_CLASS (gtk_cell_renderer_bubble_parent_class)->finalize (object); } gboolean gtk_cell_renderer_bubble_get_show_bubble (GtkCellRendererBubble *cell) { g_return_val_if_fail (GTK_IS_CELL_RENDERER_BUBBLE (cell), FALSE); return cell->priv->show_bubble; } void gtk_cell_renderer_bubble_set_show_bubble (GtkCellRendererBubble *cell, gboolean show_bubble) { g_return_if_fail (GTK_IS_CELL_RENDERER_BUBBLE (cell)); cell->priv->show_bubble = show_bubble; } static void gtk_cell_renderer_bubble_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { switch (property_id) { case PROP_SHOW_BUBBLE: g_value_set_boolean (value, gtk_cell_renderer_bubble_get_show_bubble (GTK_CELL_RENDERER_BUBBLE (object))); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void gtk_cell_renderer_bubble_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { switch (property_id) { case PROP_SHOW_BUBBLE: gtk_cell_renderer_bubble_set_show_bubble (GTK_CELL_RENDERER_BUBBLE (object), g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rounded_rectangle (cairo_t *cr, gint x, gint y, gint width, gint height, gint x_radius, gint y_radius) { gint x1, x2; gint y1, y2; gint xr1, xr2; gint yr1, yr2; x1 = x; x2 = x1 + width; y1 = y; y2 = y1 + height; x_radius = MIN (x_radius, width / 2.0); y_radius = MIN (y_radius, width / 2.0); xr1 = x_radius; xr2 = x_radius / 2.0; yr1 = y_radius; yr2 = y_radius / 2.0; cairo_move_to (cr, x1 + xr1, y1); cairo_line_to (cr, x2 - xr1, y1); cairo_curve_to (cr, x2 - xr2, y1, x2, y1 + yr2, x2, y1 + yr1); cairo_line_to (cr, x2, y2 - yr1); cairo_curve_to (cr, x2, y2 - yr2, x2 - xr2, y2, x2 - xr1, y2); cairo_line_to (cr, x1 + xr1, y2); cairo_curve_to (cr, x1 + xr2, y2, x1, y2 - yr2, x1, y2 - yr1); cairo_line_to (cr, x1, y1 + yr1); cairo_curve_to (cr, x1, y1 + yr2, x1 + xr2, y1, x1 + xr1, y1); cairo_close_path (cr); } static void render (GtkCellRenderer *cell, cairo_t *cr, GtkWidget *widget, const GdkRectangle *background_area, const GdkRectangle *cell_area, GtkCellRendererState flags) { GtkCellRendererBubblePrivate *priv; cairo_pattern_t *pattern; GtkStyleContext *style; GdkRGBA selected; GdkRGBA *color_light; GdkRGBA *color_dark; g_return_if_fail (GTK_IS_CELL_RENDERER_BUBBLE (cell)); priv = GTK_CELL_RENDERER_BUBBLE (cell)->priv; if (priv->show_bubble) { cairo_save (cr); style = gtk_widget_get_style_context (widget); gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED, &selected); pattern = cairo_pattern_create_linear (cell_area->x, cell_area->y, cell_area->x, cell_area->y + cell_area->height); color_light = gdk_rgba_copy(&selected); color_light->red *= 1.3; color_light->green *= 1.3; color_light->blue *= 1.3; color_dark = gdk_rgba_copy(&selected); color_dark->red *= 0.7; color_dark->green *= 0.7; color_dark->blue *= 0.7; cairo_pattern_add_color_stop_rgb (pattern, 0.3, color_light->red, color_light->green, color_light->blue); cairo_pattern_add_color_stop_rgb (pattern, 0.9, color_dark->red, color_dark->green, color_dark->blue); rounded_rectangle (cr, cell_area->x, cell_area->y + 1, cell_area->width, cell_area->height - 2, cell_area->height / 2.5, cell_area->height / 2.5); cairo_set_source (cr, pattern); cairo_fill_preserve (cr); gdk_cairo_set_source_rgba (cr, color_dark); cairo_set_line_width (cr, 1.0); cairo_stroke (cr); rounded_rectangle (cr, cell_area->x + 1.0, cell_area->y + 2.0, cell_area->width - 2.0, cell_area->height - 4.0, cell_area->height / 2.5, cell_area->height / 2.5); gdk_cairo_set_source_rgba (cr, color_light); gdk_rgba_free (color_light); gdk_rgba_free (color_dark); cairo_stroke (cr); cairo_pattern_destroy(pattern); cairo_restore (cr); } GTK_CELL_RENDERER_CLASS (gtk_cell_renderer_bubble_parent_class)-> render (cell, cr, widget, background_area, cell_area, flags); } static void gtk_cell_renderer_bubble_class_init (GtkCellRendererBubbleClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (klass); cell_class->render = render; object_class->finalize = gtk_cell_renderer_bubble_finalize; object_class->set_property = gtk_cell_renderer_bubble_set_property; object_class->get_property = gtk_cell_renderer_bubble_get_property; g_type_class_add_private (object_class, sizeof(GtkCellRendererBubblePrivate)); g_object_class_install_property (object_class, PROP_SHOW_BUBBLE, g_param_spec_boolean ("show-bubble", "Show Bubble", "Show the bubble background", TRUE, G_PARAM_READWRITE)); } static void gtk_cell_renderer_bubble_init (GtkCellRendererBubble *cell) { cell->priv = G_TYPE_INSTANCE_GET_PRIVATE (cell, GTK_TYPE_CELL_RENDERER_BUBBLE, GtkCellRendererBubblePrivate); cell->priv->show_bubble = TRUE; /* we need extra padding on the side */ /*g_object_set (cell, "xpad", 3, "ypad", 3, NULL);*/ g_object_set (cell, "xalign", 0.5, NULL); } GtkCellRenderer* gtk_cell_renderer_bubble_new () { return g_object_new (GTK_TYPE_CELL_RENDERER_BUBBLE, NULL); } �������������������������������������������������pragha-1.3.4/src/gtkcellrendererbubble.h������������������������������������������������������������0000664�0000000�0000000�00000005565�13435240150�0020261�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* gtkcellrendererbubble.h * * Copyright (C) 2009 - Christian Hergert * * This 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 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 St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __GTK_CELL_RENDERER_BUBBLE_H__ #define __GTK_CELL_RENDERER_BUBBLE_H__ #include <glib-object.h> #include <gtk/gtk.h> G_BEGIN_DECLS #define GTK_TYPE_CELL_RENDERER_BUBBLE (gtk_cell_renderer_bubble_get_type ()) #define GTK_CELL_RENDERER_BUBBLE(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ GTK_TYPE_CELL_RENDERER_BUBBLE, \ GtkCellRendererBubble)) #define GTK_CELL_RENDERER_BUBBLE_CONST(obj) \ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ GTK_TYPE_CELL_RENDERER_BUBBLE, \ GtkCellRendererBubble const)) #define GTK_CELL_RENDERER_BUBBLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST ((klass), \ GTK_TYPE_CELL_RENDERER_BUBBLE, \ GtkCellRendererBubbleClass)) #define GTK_IS_CELL_RENDERER_BUBBLE(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ GTK_TYPE_CELL_RENDERER_BUBBLE)) #define GTK_IS_CELL_RENDERER_BUBBLE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE ((klass), \ GTK_TYPE_CELL_RENDERER_BUBBLE)) #define GTK_CELL_RENDERER_BUBBLE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), \ GTK_TYPE_CELL_RENDERER_BUBBLE, \ GtkCellRendererBubbleClass)) typedef struct _GtkCellRendererBubble GtkCellRendererBubble; typedef struct _GtkCellRendererBubbleClass GtkCellRendererBubbleClass; typedef struct _GtkCellRendererBubblePrivate GtkCellRendererBubblePrivate; struct _GtkCellRendererBubble { GtkCellRendererText parent; GtkCellRendererBubblePrivate *priv; }; struct _GtkCellRendererBubbleClass { GtkCellRendererTextClass parent_class; }; GType gtk_cell_renderer_bubble_get_type (void) G_GNUC_CONST; GtkCellRenderer* gtk_cell_renderer_bubble_new (void); gboolean gtk_cell_renderer_bubble_get_show_bubble (GtkCellRendererBubble *cell); void gtk_cell_renderer_bubble_set_show_bubble (GtkCellRendererBubble *cell, gboolean show_bubble); G_END_DECLS #endif /* __GTK_CELL_RENDERER_BUBBLE_H__ */ �������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/info-bar-import-music.c������������������������������������������������������������0000664�0000000�0000000�00000012772�13435240150�0020045�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2012 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #if HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include "pragha-utils.h" #include "pragha.h" gboolean info_bar_import_music_will_be_useful(PraghaApplication *pragha) { return pragha_application_is_first_run (pragha) && g_get_user_special_dir (G_USER_DIRECTORY_MUSIC); } static void info_bar_response_cb(GtkInfoBar *info_bar, gint response_id, gpointer user_data) { GSList *library_dir = NULL; PraghaPreferences *preferences; PraghaScanner *scanner; PraghaApplication *pragha = user_data; const gchar *dir = g_get_user_special_dir(G_USER_DIRECTORY_MUSIC); gtk_widget_destroy(GTK_WIDGET(info_bar)); switch (response_id) { case GTK_RESPONSE_CANCEL: break; case GTK_RESPONSE_YES: library_dir = g_slist_append(library_dir, g_strdup(dir)); preferences = pragha_application_get_preferences (pragha); pragha_preferences_set_filename_list (preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR, library_dir); free_str_list(library_dir); scanner = pragha_application_get_scanner (pragha); pragha_scanner_scan_library (scanner); break; default: g_warn_if_reached(); } } GtkWidget * create_info_bar_import_music(PraghaApplication *pragha) { const gchar *dir = g_get_user_special_dir(G_USER_DIRECTORY_MUSIC); GtkWidget *info_bar = gtk_info_bar_new(); GtkWidget *action_area = gtk_info_bar_get_action_area(GTK_INFO_BAR (info_bar)); GtkWidget *content_area = gtk_info_bar_get_content_area(GTK_INFO_BAR(info_bar)); gtk_orientable_set_orientation(GTK_ORIENTABLE(action_area), GTK_ORIENTATION_HORIZONTAL); //GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), _("_No"), GTK_RESPONSE_CANCEL); gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), _("_Yes"), GTK_RESPONSE_YES); gchar *content = g_strdup_printf(_("Would you like to import %s to library?"), dir); GtkWidget *label = gtk_label_new(content); gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0); g_signal_connect(info_bar, "response", G_CALLBACK(info_bar_response_cb), pragha); gtk_widget_show_all(info_bar); g_free(content); return info_bar; } static void info_bar_update_response_cb(GtkInfoBar *info_bar, gint response_id, gpointer user_data) { PraghaScanner *scanner; PraghaApplication *pragha = user_data; gtk_widget_destroy(GTK_WIDGET(info_bar)); switch (response_id) { case GTK_RESPONSE_CANCEL: break; case GTK_RESPONSE_YES: scanner = pragha_application_get_scanner (pragha); pragha_scanner_update_library (scanner); break; default: g_warn_if_reached(); } } GtkWidget *create_info_bar_update_music(PraghaApplication *pragha) { GtkWidget *info_bar = gtk_info_bar_new(); GtkWidget *action_area = gtk_info_bar_get_action_area(GTK_INFO_BAR (info_bar)); GtkWidget *content_area = gtk_info_bar_get_content_area(GTK_INFO_BAR(info_bar)); gtk_orientable_set_orientation(GTK_ORIENTABLE(action_area), GTK_ORIENTATION_HORIZONTAL); //GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), _("_No"), GTK_RESPONSE_CANCEL); gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), _("_Yes"), GTK_RESPONSE_YES); GtkWidget *label = gtk_label_new(_("Would you like to update your music library?")); gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0); g_signal_connect(info_bar, "response", G_CALLBACK(info_bar_update_response_cb), pragha); gtk_widget_show_all(info_bar); return info_bar; } static void info_bar_restart_response_cb(GtkInfoBar *info_bar, gint response_id, gpointer user_data) { PraghaApplication *pragha = user_data; gtk_widget_destroy(GTK_WIDGET(info_bar)); switch (response_id) { case GTK_RESPONSE_CANCEL: break; case GTK_RESPONSE_YES: pragha_application_quit(pragha); break; default: g_warn_if_reached(); } } GtkWidget * pragha_info_bar_need_restart (PraghaApplication *pragha) { GtkWidget *info_bar = gtk_info_bar_new(); GtkWidget *action_area = gtk_info_bar_get_action_area(GTK_INFO_BAR (info_bar)); GtkWidget *content_area = gtk_info_bar_get_content_area(GTK_INFO_BAR(info_bar)); gtk_orientable_set_orientation(GTK_ORIENTABLE(action_area), GTK_ORIENTATION_HORIZONTAL); //GtkInfoBar has undocumented behavior for GTK_RESPONSE_CANCEL gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), _("_No"), GTK_RESPONSE_CANCEL); gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), _("_Yes"), GTK_RESPONSE_YES); GtkWidget *label = gtk_label_new(_("Some changes need restart pragha.")); gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0); g_signal_connect(info_bar, "response", G_CALLBACK(info_bar_restart_response_cb), pragha); gtk_widget_show_all(info_bar); return info_bar; } ������pragha-1.3.4/src/pragha-album-art.c�����������������������������������������������������������������0000664�0000000�0000000�00000017040�13435240150�0017037�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-album-art.h" #include <glib.h> #ifdef G_OS_WIN32 #include "../win32/win32dep.h" #endif G_DEFINE_TYPE(PraghaAlbumArt, pragha_album_art, GTK_TYPE_IMAGE) struct _PraghaAlbumArtPrivate { gchar *path; guint size; }; enum { PROP_0, PROP_PATH, PROP_SIZE, LAST_PROP }; static GParamSpec *gParamSpecs[LAST_PROP]; PraghaAlbumArt * pragha_album_art_new (void) { return g_object_new(PRAGHA_TYPE_ALBUM_ART, NULL); } /** * pragha_album_art_update_image: * */ static void pragha_album_art_update_image (PraghaAlbumArt *albumart) { PraghaAlbumArtPrivate *priv; GdkPixbuf *pixbuf = NULL, *album_art = NULL, *frame; gchar *frame_uri = NULL; GError *error = NULL; g_return_if_fail(PRAGHA_IS_ALBUM_ART(albumart)); priv = albumart->priv; frame_uri = g_build_filename (PIXMAPDIR, "cover.png", NULL); frame = gdk_pixbuf_new_from_file (frame_uri, NULL); g_free (frame_uri); if (priv->path != NULL) { #ifdef G_OS_WIN32 GdkPixbuf *a_pixbuf = gdk_pixbuf_new_from_file (priv->path, &error); if (a_pixbuf) { album_art = gdk_pixbuf_scale_simple (a_pixbuf, 112, 112, GDK_INTERP_BILINEAR); g_object_unref(G_OBJECT(a_pixbuf)); } #else album_art = gdk_pixbuf_new_from_file_at_scale(priv->path, 112, 112, FALSE, &error); #endif if (album_art) { gdk_pixbuf_copy_area (album_art, 0, 0, 112, 112, frame, 12, 8); g_object_unref(G_OBJECT(album_art)); } else { g_critical("Unable to open image file: %s\n", priv->path); g_error_free(error); } } pixbuf = gdk_pixbuf_scale_simple (frame, priv->size, priv->size, GDK_INTERP_BILINEAR); pragha_album_art_set_pixbuf(albumart, pixbuf); g_object_unref(G_OBJECT(pixbuf)); g_object_unref(G_OBJECT(frame)); } /** * album_art_get_path: * */ const gchar * pragha_album_art_get_path (PraghaAlbumArt *albumart) { g_return_val_if_fail(PRAGHA_IS_ALBUM_ART(albumart), NULL); return albumart->priv->path; } /** * album_art_set_path: * */ void pragha_album_art_set_path (PraghaAlbumArt *albumart, const gchar *path) { PraghaAlbumArtPrivate *priv; g_return_if_fail(PRAGHA_IS_ALBUM_ART(albumart)); priv = albumart->priv; g_free(priv->path); priv->path = g_strdup(path); pragha_album_art_update_image(albumart); g_object_notify_by_pspec(G_OBJECT(albumart), gParamSpecs[PROP_PATH]); } /** * album_art_get_size: * */ guint pragha_album_art_get_size (PraghaAlbumArt *albumart) { g_return_val_if_fail(PRAGHA_IS_ALBUM_ART(albumart), 0); return albumart->priv->size; } /** * album_art_set_size: * */ void pragha_album_art_set_size (PraghaAlbumArt *albumart, guint size) { PraghaAlbumArtPrivate *priv; g_return_if_fail(PRAGHA_IS_ALBUM_ART(albumart)); priv = albumart->priv; priv->size = size; pragha_album_art_update_image(albumart); g_object_notify_by_pspec(G_OBJECT(albumart), gParamSpecs[PROP_SIZE]); } /** * album_art_set_pixbuf: * */ void pragha_album_art_set_pixbuf (PraghaAlbumArt *albumart, GdkPixbuf *pixbuf) { g_return_if_fail(PRAGHA_IS_ALBUM_ART(albumart)); gtk_image_clear(GTK_IMAGE(albumart)); gtk_image_set_from_pixbuf(GTK_IMAGE(albumart), pixbuf); } /** * album_art_get_pixbuf: * */ GdkPixbuf * pragha_album_art_get_pixbuf (PraghaAlbumArt *albumart) { GdkPixbuf *pixbuf = NULL; g_return_val_if_fail(PRAGHA_IS_ALBUM_ART(albumart), NULL); if(gtk_image_get_storage_type(GTK_IMAGE(albumart)) == GTK_IMAGE_PIXBUF) pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(albumart)); return pixbuf; } static void pragha_album_art_finalize (GObject *object) { PraghaAlbumArtPrivate *priv; priv = PRAGHA_ALBUM_ART(object)->priv; g_free(priv->path); G_OBJECT_CLASS(pragha_album_art_parent_class)->finalize(object); } static void pragha_album_art_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { PraghaAlbumArt *albumart = PRAGHA_ALBUM_ART(object); switch (prop_id) { case PROP_PATH: g_value_set_string(value, pragha_album_art_get_path(albumart)); break; case PROP_SIZE: g_value_set_uint (value, pragha_album_art_get_size(albumart)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void pragha_album_art_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PraghaAlbumArt *albumart = PRAGHA_ALBUM_ART(object); switch (prop_id) { case PROP_PATH: pragha_album_art_set_path(albumart, g_value_get_string(value)); break; case PROP_SIZE: pragha_album_art_set_size(albumart, g_value_get_uint(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void pragha_album_art_class_init (PraghaAlbumArtClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->finalize = pragha_album_art_finalize; object_class->get_property = pragha_album_art_get_property; object_class->set_property = pragha_album_art_set_property; g_type_class_add_private(object_class, sizeof(PraghaAlbumArtPrivate)); /** * PraghaAlbumArt:path: * */ gParamSpecs[PROP_PATH] = g_param_spec_string("path", "Path", "The album art path", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaAlbumArt:size: * */ gParamSpecs[PROP_SIZE] = g_param_spec_uint("size", "Size", "The album art size", 24, 128, 36, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(object_class, LAST_PROP, gParamSpecs); } static void pragha_album_art_init (PraghaAlbumArt *albumart) { albumart->priv = G_TYPE_INSTANCE_GET_PRIVATE(albumart, PRAGHA_TYPE_ALBUM_ART, PraghaAlbumArtPrivate); } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-album-art.h�����������������������������������������������������������������0000664�0000000�0000000�00000005317�13435240150�0017050�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_ALBUM_ART_H #define PRAGHA_ALBUM_ART_H #include <glib-object.h> #include <gtk/gtk.h> G_BEGIN_DECLS #define PRAGHA_TYPE_ALBUM_ART (pragha_album_art_get_type()) #define PRAGHA_ALBUM_ART(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_ALBUM_ART, PraghaAlbumArt)) #define PRAGHA_ALBUM_ART_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_ALBUM_ART, PraghaAlbumArt const)) #define PRAGHA_ALBUM_ART_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_ALBUM_ART, PraghaAlbumArtClass)) #define PRAGHA_IS_ALBUM_ART(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_ALBUM_ART)) #define PRAGHA_IS_ALBUM_ART_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_ALBUM_ART)) #define PRAGHA_ALBUM_ART_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_ALBUM_ART, PraghaAlbumArtClass)) typedef struct _PraghaAlbumArt PraghaAlbumArt; typedef struct _PraghaAlbumArtClass PraghaAlbumArtClass; typedef struct _PraghaAlbumArtPrivate PraghaAlbumArtPrivate; struct _PraghaAlbumArt { GtkImage parent; /*< private >*/ PraghaAlbumArtPrivate *priv; }; struct _PraghaAlbumArtClass { GtkImageClass parent_class; }; PraghaAlbumArt *pragha_album_art_new (void); GType pragha_album_art_get_type (void) G_GNUC_CONST; const gchar *pragha_album_art_get_path (PraghaAlbumArt *albumart); void pragha_album_art_set_path (PraghaAlbumArt *albumart, const char *path); guint pragha_album_art_get_size (PraghaAlbumArt *albumart); void pragha_album_art_set_size (PraghaAlbumArt *albumart, guint size); void pragha_album_art_set_pixbuf (PraghaAlbumArt *albumart, GdkPixbuf *pixbuf); GdkPixbuf * pragha_album_art_get_pixbuf (PraghaAlbumArt *albumart); G_END_DECLS #endif /* PRAGHA_ALBUM_ART_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-art-cache.c�����������������������������������������������������������������0000664�0000000�0000000�00000007465�13435240150�0017014�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2011-2013 matias <mati86dl@gmail.com> * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "pragha-art-cache.h" #include <glib/gstdio.h> #include "pragha-utils.h" struct _PraghaArtCache { GObject _parent; gchar *cache_dir; }; enum { SIGNAL_CACHE_CHANGED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(PraghaArtCache, pragha_art_cache, G_TYPE_OBJECT) static void pragha_art_cache_finalize (GObject *object) { PraghaArtCache *cache = PRAGHA_ART_CACHE(object); g_free (cache->cache_dir); G_OBJECT_CLASS(pragha_art_cache_parent_class)->finalize(object); } static void pragha_art_cache_class_init (PraghaArtCacheClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->finalize = pragha_art_cache_finalize; signals[SIGNAL_CACHE_CHANGED] = g_signal_new ("cache-changed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaArtCacheClass, cache_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void pragha_art_cache_init (PraghaArtCache *cache) { cache->cache_dir = g_build_path (G_DIR_SEPARATOR_S, g_get_user_cache_dir (), "pragha", NULL); g_mkdir_with_parents (cache->cache_dir, S_IRWXU); } PraghaArtCache * pragha_art_cache_get (void) { static PraghaArtCache *cache = NULL; if (G_UNLIKELY (cache == NULL)) { cache = g_object_new (PRAGHA_TYPE_ART_CACHE, NULL); g_object_add_weak_pointer (G_OBJECT (cache), (gpointer) &cache); } else { g_object_ref (G_OBJECT(cache)); } return cache; } static gchar * pragha_art_cache_build_path (PraghaArtCache *cache, const gchar *artist, const gchar *album) { gchar *artist_escaped = pragha_escape_slashes (artist); gchar *album_escaped = pragha_escape_slashes (album); gchar *result = g_strdup_printf ("%s%salbum-%s-%s.jpeg", cache->cache_dir, G_DIR_SEPARATOR_S, artist_escaped, album_escaped); g_free (album_escaped); g_free (artist_escaped); return result; } gchar * pragha_art_cache_get_uri (PraghaArtCache *cache, const gchar *artist, const gchar *album) { gchar *path = pragha_art_cache_build_path (cache, artist, album); if (g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR) == FALSE) { g_free (path); return NULL; } return path; } gboolean pragha_art_cache_contains (PraghaArtCache *cache, const gchar *artist, const gchar *album) { gchar *path = pragha_art_cache_get_uri (cache, artist, album); if (path) { g_free (path); return TRUE; } return FALSE; } void pragha_art_cache_put (PraghaArtCache *cache, const gchar *artist, const gchar *album, gconstpointer data, gsize size) { GError *error = NULL; GdkPixbuf *pixbuf = pragha_gdk_pixbuf_new_from_memory (data, size); if (!pixbuf) return; gchar *path = pragha_art_cache_build_path (cache, artist, album); gdk_pixbuf_save (pixbuf, path, "jpeg", &error, "quality", "100", NULL); if (error) { g_warning ("Failed to save albumart file %s: %s\n", path, error->message); g_error_free (error); } g_signal_emit (cache, signals[SIGNAL_CACHE_CHANGED], 0); g_free (path); g_object_unref (pixbuf); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-art-cache.h�����������������������������������������������������������������0000664�0000000�0000000�00000004224�13435240150�0017007�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PRAGHA_ART_CACHE_H #define PRAGHA_ART_CACHE_H #include <glib.h> #include <glib-object.h> G_BEGIN_DECLS #define PRAGHA_TYPE_ART_CACHE (pragha_art_cache_get_type()) #define PRAGHA_ART_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_ART_CACHE, PraghaArtCache)) #define PRAGHA_ART_CACHE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_ART_CACHE, PraghaArtCache const)) #define PRAGHA_ART_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_ART_CACHE, PraghaArtCacheClass)) #define PRAGHA_IS_ART_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_ART_CACHE)) #define PRAGHA_IS_ART_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_ART_CACHE)) #define PRAGHA_ART_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_ART_CACHE, PraghaArtCacheClass)) typedef struct _PraghaArtCache PraghaArtCache; typedef struct _PraghaArtCacheClass PraghaArtCacheClass; struct _PraghaArtCacheClass { GObjectClass parent_class; void (*cache_changed) (PraghaArtCache *cache); }; PraghaArtCache * pragha_art_cache_get (void); gchar * pragha_art_cache_get_uri (PraghaArtCache *cache, const gchar *artist, const gchar *album); gboolean pragha_art_cache_contains (PraghaArtCache *cache, const gchar *artist, const gchar *album); void pragha_art_cache_put (PraghaArtCache *cache, const gchar *artist, const gchar *album, gconstpointer data, gsize size); G_END_DECLS #endif /* PRAGHA_ART_CACHE_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-backend.c�������������������������������������������������������������������0000664�0000000�0000000�00000075752�13435240150�0016560�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2010-2015 matias <mati86dl@gmail.com> */ /* Copyright (C) 2012-2013 Pavel Vasin */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-backend.h" #include <glib.h> #include <stdlib.h> #if HAVE_GSTREAMER_AUDIO #include <gst/audio/streamvolume.h> #endif #include "pragha-art-cache.h" #include "pragha-debug.h" #include "pragha-musicobject.h" #include "pragha-musicobject-mgmt.h" #include "pragha-utils.h" static void pragha_backend_evaluate_state(GstState old, GstState new, GstState pending, PraghaBackend *backend); #if HAVE_GSTREAMER_AUDIO #define convert_volume(from, to, val) gst_stream_volume_convert_volume((from), (to), (val)) #define VOLUME_FORMAT_LINEAR GST_STREAM_VOLUME_FORMAT_LINEAR #define VOLUME_FORMAT_CUBIC GST_STREAM_VOLUME_FORMAT_CUBIC #endif typedef enum { GST_PLAY_FLAG_VIDEO = (1 << 0), GST_PLAY_FLAG_AUDIO = (1 << 1), GST_PLAY_FLAG_TEXT = (1 << 2), GST_PLAY_FLAG_VIS = (1 << 3), GST_PLAY_FLAG_SOFT_VOLUME = (1 << 4), GST_PLAY_FLAG_NATIVE_AUDIO = (1 << 5), GST_PLAY_FLAG_NATIVE_VIDEO = (1 << 6), GST_PLAY_FLAG_DOWNLOAD = (1 << 7), GST_PLAY_FLAG_BUFFERING = (1 << 8), GST_PLAY_FLAG_DEINTERLACE = (1 << 9) } GstPlayFlags; struct PraghaBackendPrivate { PraghaPreferences *preferences; PraghaArtCache *art_cache; GstElement *pipeline; GstElement *audio_sink; GstElement *preamp; GstElement *equalizer; guint timer; gboolean is_live; gboolean can_seek; gboolean seeking; //this is hack, we should catch seek by seqnum, but it's currently broken in gstreamer gboolean emitted_error; GError *error; GstState target_state; PraghaBackendState state; PraghaMusicobject *mobj; }; #define PRAGHA_BACKEND_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), PRAGHA_TYPE_BACKEND, PraghaBackendPrivate)) enum { PROP_0, PROP_VOLUME, PROP_TARGET_STATE, PROP_STATE, PROP_LAST }; static GParamSpec *properties[PROP_LAST] = { 0 }; enum { SIGNAL_SET_DEVICE, SIGNAL_PREPARE_SOURCE, SIGNAL_CLEAN_SOURCE, SIGNAL_TICK, SIGNAL_SEEKED, SIGNAL_BUFFERING, SIGNAL_FINISHED, SIGNAL_ERROR, SIGNAL_TAGS_CHANGED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE (PraghaBackend, pragha_backend, G_TYPE_OBJECT); static gboolean emit_tick_cb (gpointer user_data) { PraghaBackend *backend = user_data; g_signal_emit (backend, signals[SIGNAL_TICK], 0); return TRUE; } static void pragha_backend_source_notify_cb (GObject *obj, GParamSpec *pspec, PraghaBackend *backend) { GstElement* element; g_object_get (obj, "source", &element, NULL); if (!element) return; if (g_object_class_find_property(G_OBJECT_GET_CLASS(element), "user-agent")) { g_object_set (element, "user-agent", PACKAGE_NAME"/"PACKAGE_VERSION, NULL); g_object_set(element, "ssl-use-system-ca-file", FALSE, NULL); g_object_set(element, "ssl-strict", FALSE, NULL); } g_signal_emit (backend, signals[SIGNAL_SET_DEVICE], 0, obj); } gint64 pragha_backend_get_current_length (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; gint64 song_length; gboolean result; result = gst_element_query_duration (priv->pipeline, GST_FORMAT_TIME, &song_length); if (!result) return GST_CLOCK_TIME_NONE; return song_length; } gint64 pragha_backend_get_current_position (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; gint64 song_position; gboolean result; result = gst_element_query_position (priv->pipeline, GST_FORMAT_TIME, &song_position); if (!result) return GST_CLOCK_TIME_NONE; return song_position; } gboolean pragha_backend_can_seek (PraghaBackend *backend) { return backend->priv->can_seek; } void pragha_backend_seek (PraghaBackend *backend, gint64 seek) { PraghaBackendPrivate *priv = backend->priv; if (!priv->can_seek) return; CDEBUG(DBG_BACKEND, "Seeking playback"); gboolean success = gst_element_seek (priv->pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET, seek * GST_SECOND, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); if (success) priv->seeking = TRUE; } void pragha_backend_set_soft_volume (PraghaBackend *backend, gboolean value) { PraghaBackendPrivate *priv = backend->priv; GstPlayFlags flags; g_object_get (priv->pipeline, "flags", &flags, NULL); if (value) flags |= GST_PLAY_FLAG_SOFT_VOLUME; else flags &= ~GST_PLAY_FLAG_SOFT_VOLUME; g_object_set (priv->pipeline, "flags", flags, NULL); } static void pragha_backend_optimize_audio_flags (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; GstPlayFlags flags; g_object_get (priv->pipeline, "flags", &flags, NULL); /* Disable all video features */ flags &= ~GST_PLAY_FLAG_VIDEO; flags &= ~GST_PLAY_FLAG_TEXT; flags &= ~GST_PLAY_FLAG_VIS; flags &= ~GST_PLAY_FLAG_NATIVE_VIDEO; g_object_set (priv->pipeline, "flags", flags, NULL); } gdouble pragha_backend_get_volume (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; gdouble volume; g_object_get (priv->pipeline, "volume", &volume, NULL); #if HAVE_GSTREAMER_AUDIO volume = convert_volume (VOLUME_FORMAT_LINEAR, VOLUME_FORMAT_CUBIC, volume); #endif return volume; } static gboolean emit_volume_notify_cb (gpointer user_data) { PraghaBackend *backend = user_data; g_object_notify_by_pspec (G_OBJECT (backend), properties[PROP_VOLUME]); return FALSE; } static void volume_notify_cb (GObject *gobject, GParamSpec *pspec, gpointer user_data) { g_idle_add (emit_volume_notify_cb, user_data); } void pragha_backend_set_volume (PraghaBackend *backend, gdouble volume) { PraghaBackendPrivate *priv = backend->priv; volume = CLAMP (volume, 0.0, 1.0); #if HAVE_GSTREAMER_AUDIO volume = convert_volume (VOLUME_FORMAT_CUBIC, VOLUME_FORMAT_LINEAR, volume); #endif g_object_set (priv->pipeline, "volume", volume, NULL); if (pragha_preferences_get_software_mixer (priv->preferences)) pragha_preferences_set_software_volume (priv->preferences, volume); } void pragha_backend_set_delta_volume (PraghaBackend *backend, gdouble delta) { gdouble volume = pragha_backend_get_volume (backend); volume += delta; pragha_backend_set_volume (backend, volume); } gboolean pragha_backend_is_playing (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; GstState state; gst_element_get_state (priv->pipeline, &state, NULL, GST_CLOCK_TIME_NONE); if (state == GST_STATE_PLAYING) return TRUE; return FALSE; } gboolean pragha_backend_is_paused (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; GstState state; gst_element_get_state(priv->pipeline, &state, NULL, GST_CLOCK_TIME_NONE); if (state == GST_STATE_PAUSED) return TRUE; return FALSE; } gboolean pragha_backend_emitted_error (PraghaBackend *backend) { return backend->priv->emitted_error; } GError * pragha_backend_get_error (PraghaBackend *backend) { return backend->priv->error; } GstState pragha_backend_get_target_state (PraghaBackend *backend) { return backend->priv->target_state; } static void pragha_backend_set_target_state (PraghaBackend *backend, GstState target_state) { GstStateChangeReturn ret; PraghaBackendPrivate *priv = backend->priv; GstState old_state = priv->target_state; priv->target_state = target_state; ret = gst_element_set_state(priv->pipeline, target_state); switch (ret) { case GST_STATE_CHANGE_SUCCESS: if (target_state == GST_STATE_READY) pragha_backend_evaluate_state(old_state, GST_STATE (priv->pipeline), GST_STATE_PENDING (priv->pipeline), backend); break; case GST_STATE_CHANGE_NO_PREROLL: if (target_state == GST_STATE_PLAYING) priv->is_live = TRUE; break; default: break; } g_object_notify_by_pspec (G_OBJECT (backend), properties[PROP_TARGET_STATE]); } const gchar * pragha_playback_state_get_name(PraghaBackendState state) { switch (state) { case ST_PLAYING: return "ST_PLAYING"; case ST_STOPPED: return "ST_STOPPED"; case ST_PAUSED: return "ST_PAUSED"; default: /* This is a memory leak */ return g_strdup_printf ("UNKNOWN!(%d)", state); } } PraghaBackendState pragha_backend_get_state (PraghaBackend *backend) { return backend->priv->state; } static void pragha_backend_set_state (PraghaBackend *backend, PraghaBackendState state) { if (backend->priv->state == state) return; backend->priv->state = state; CDEBUG(DBG_BACKEND, "Setting new playback state: %s: ", pragha_playback_state_get_name(state)); g_object_notify_by_pspec (G_OBJECT (backend), properties[PROP_STATE]); } void pragha_backend_stop (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; CDEBUG(DBG_BACKEND, "Stopping playback"); pragha_backend_set_target_state (backend, GST_STATE_READY); if(priv->mobj) { g_signal_emit (backend, signals[SIGNAL_CLEAN_SOURCE], 0); g_object_unref(priv->mobj); priv->mobj = NULL; } } void pragha_backend_pause (PraghaBackend *backend) { CDEBUG(DBG_BACKEND, "Pause playback"); pragha_backend_set_target_state (backend, GST_STATE_PAUSED); } void pragha_backend_resume (PraghaBackend *backend) { CDEBUG(DBG_BACKEND, "Resuming playback"); pragha_backend_set_target_state (backend, GST_STATE_PLAYING); } static void pragha_backend_parse_error (PraghaBackend *backend, GstMessage *message) { PraghaBackendPrivate *priv = backend->priv; gboolean emit = TRUE; GError *error = NULL; gchar *dbg_info = NULL; gst_message_parse_error (message, &error, &dbg_info); /* Gstreamer doc: When an error has occured * playbin should be set back to READY or NULL state. */ gst_element_set_state(priv->pipeline, GST_STATE_NULL); /* Next code inspired on rhynthmbox. * If we've already got an error, ignore 'internal data flow error' * type messages, as they're too generic to be helpful. */ if (priv->emitted_error && error->domain == GST_STREAM_ERROR && error->code == GST_STREAM_ERROR_FAILED) { CDEBUG(DBG_BACKEND, "Ignoring generic error \"%s\"", error->message); emit = FALSE; } if (emit) { CDEBUG(DBG_BACKEND, "Gstreamer error \"%s\"", error->message); priv->emitted_error = TRUE; priv->error = error; g_signal_emit (backend, signals[SIGNAL_ERROR], 0, error); } else { g_error_free (error); } g_free (dbg_info); } static void pragha_backend_parse_buffering (PraghaBackend *backend, GstMessage *message) { PraghaBackendPrivate *priv = backend->priv; gint percent = 0; GstState cur_state; if (priv->is_live) return; if (priv->target_state == GST_STATE_READY) /* Prevent that buffering overlaps the stop command playing or pausing the playback */ return; gst_message_parse_buffering (message, &percent); gst_element_get_state (priv->pipeline, &cur_state, NULL, 0); if (percent >= 100) { if (priv->target_state == GST_STATE_PLAYING && cur_state != GST_STATE_PLAYING) { CDEBUG(DBG_BACKEND, "Buffering complete ... return to playback"); gst_element_set_state(priv->pipeline, GST_STATE_PLAYING); } } else { if (priv->target_state == GST_STATE_PLAYING && cur_state == GST_STATE_PLAYING) { CDEBUG(DBG_BACKEND, "Buffering ... temporarily pausing playback"); gst_element_set_state (priv->pipeline, GST_STATE_PAUSED); } else { CDEBUG(DBG_BACKEND, "Buffering (already paused) ... %d", percent); } } g_signal_emit (backend, signals[SIGNAL_BUFFERING], 0, percent); } static void save_embedded_art (PraghaBackend *backend, const GstTagList *taglist) { PraghaBackendPrivate *priv = backend->priv; GstSample *sample = NULL; gst_tag_list_get_sample_index (taglist, GST_TAG_IMAGE, 0, &sample); if (!sample) //try harder gst_tag_list_get_sample_index (taglist, GST_TAG_PREVIEW_IMAGE, 0, &sample); if (!sample) goto out; //got art, now check if we need it const gchar *artist = pragha_musicobject_get_artist (priv->mobj); const gchar *album = pragha_musicobject_get_album (priv->mobj); if (pragha_art_cache_contains (priv->art_cache, artist, album)) goto out; //ok, we need it GstBuffer *buf = gst_sample_get_buffer (sample); if (!buf) goto out; GstMapInfo info; if (!gst_buffer_map (buf, &info, GST_MAP_READ)) goto out; pragha_art_cache_put (priv->art_cache, artist, album, info.data, info.size); gst_buffer_unmap (buf, &info); out: if (sample) gst_sample_unref (sample); } static void pragha_backend_parse_message_tag (PraghaBackend *backend, GstMessage *message) { PraghaBackendPrivate *priv = backend->priv; GstTagList *tag_list; gchar *str = NULL; gint changed = 0; CDEBUG(DBG_BACKEND, "Parse message tag"); gst_message_parse_tag(message, &tag_list); save_embedded_art (backend, tag_list); if (pragha_musicobject_get_source (priv->mobj) != FILE_HTTP) goto out; if (gst_tag_list_get_string(tag_list, GST_TAG_TITLE, &str)) { changed |= TAG_TITLE_CHANGED; pragha_musicobject_set_title(priv->mobj, str); g_free(str); } if (gst_tag_list_get_string(tag_list, GST_TAG_ARTIST, &str)) { changed |= TAG_ARTIST_CHANGED; pragha_musicobject_set_artist(priv->mobj, str); g_free(str); } g_signal_emit (backend, signals[SIGNAL_TAGS_CHANGED], 0, changed); out: gst_tag_list_free(tag_list); } void pragha_backend_set_playback_uri (PraghaBackend *backend, const gchar *uri) { PraghaBackendPrivate *priv = backend->priv; g_object_set (priv->pipeline, "uri", uri, NULL); } void pragha_backend_set_musicobject (PraghaBackend *backend, PraghaMusicobject *mobj) { PraghaBackendPrivate *priv = backend->priv; CDEBUG(DBG_BACKEND, "Starting playback"); if (!mobj) { g_critical("Dangling entry in current playlist"); return; } if ((priv->state == ST_PLAYING) || (priv->state == ST_PAUSED)) { pragha_backend_stop(backend); } priv->mobj = pragha_musicobject_dup(mobj); } PraghaMusicobject * pragha_backend_get_musicobject(PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; return priv->mobj; } void pragha_backend_play (PraghaBackend *backend) { PraghaMusicSource file_source = FILE_NONE; gchar *file = NULL, *uri = NULL; PraghaBackendPrivate *priv = backend->priv; g_object_get(priv->mobj, "file", &file, "source", &file_source, NULL); if (string_is_empty(file)) goto exit; CDEBUG(DBG_BACKEND, "Playing: %s", file); switch (file_source) { case FILE_USER_L: case FILE_USER_3: case FILE_USER_2: case FILE_USER_1: case FILE_USER_0: g_signal_emit (backend, signals[SIGNAL_PREPARE_SOURCE], 0); break; case FILE_LOCAL: uri = g_filename_to_uri (file, NULL, NULL); g_object_set (priv->pipeline, "uri", uri, NULL); g_free (uri); break; case FILE_HTTP: g_object_set (priv->pipeline, "uri", file, NULL); break; case FILE_NONE: default: break; } pragha_backend_set_target_state (backend, GST_STATE_PLAYING); exit: g_free(file); } static void pragha_backend_evaluate_if_can_seek(PraghaBackend *backend) { GstQuery *query; PraghaBackendPrivate *priv = backend->priv; query = gst_query_new_seeking (GST_FORMAT_TIME); if (gst_element_query (priv->pipeline, query)) gst_query_parse_seeking (query, NULL, &priv->can_seek, NULL, NULL); gst_query_unref (query); } static void pragha_backend_evaluate_state (GstState old, GstState new, GstState pending, PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; if (pending != GST_STATE_VOID_PENDING) return; CDEBUG(DBG_BACKEND, "Gstreamer inform the state change: %s", gst_element_state_get_name (new)); switch (new) { case GST_STATE_PLAYING: { if (priv->target_state == GST_STATE_PLAYING) { pragha_backend_evaluate_if_can_seek(backend); if (priv->timer == 0) priv->timer = g_timeout_add_seconds (1, emit_tick_cb, backend); pragha_backend_set_state (backend, ST_PLAYING); } break; } case GST_STATE_PAUSED: { if (priv->target_state == GST_STATE_PAUSED) { if (priv->timer > 0) { g_source_remove(priv->timer); priv->timer = 0; } pragha_backend_set_state (backend, ST_PAUSED); } break; } case GST_STATE_READY: if (priv->target_state == GST_STATE_READY) { pragha_backend_set_state (backend, ST_STOPPED); priv->is_live = FALSE; priv->emitted_error = FALSE; g_clear_error(&priv->error); priv->seeking = FALSE; } case GST_STATE_NULL: { if (priv->timer > 0) { g_source_remove(priv->timer); priv->timer = 0; } break; } default: break; } } static void pragha_backend_message_error (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { pragha_backend_parse_error (backend, msg); } static void pragha_backend_message_eos (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { g_signal_emit (backend, signals[SIGNAL_FINISHED], 0); } static void pragha_backend_message_state_changed (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { GstState old, new, pending; PraghaBackendPrivate *priv = backend->priv; gst_message_parse_state_changed (msg, &old, &new, &pending); if (GST_MESSAGE_SRC (msg) == GST_OBJECT (priv->pipeline)) pragha_backend_evaluate_state (old, new, pending, backend); } static void pragha_backend_message_async_done (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; if (priv->seeking) { priv->seeking = FALSE; g_signal_emit (backend, signals[SIGNAL_SEEKED], 0); g_signal_emit (backend, signals[SIGNAL_TICK], 0); } } static void pragha_backend_message_buffering (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { pragha_backend_parse_buffering (backend, msg); } static void pragha_backend_message_clock_lost (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; gst_element_set_state (priv->pipeline, GST_STATE_PAUSED); gst_element_set_state (priv->pipeline, GST_STATE_PLAYING); } static void pragha_backend_message_tag (GstBus *bus, GstMessage *msg, PraghaBackend *backend) { pragha_backend_parse_message_tag (backend, msg); } static void pragha_backend_dispose (GObject *object) { PraghaBackend *backend = PRAGHA_BACKEND (object); PraghaBackendPrivate *priv = backend->priv; if (priv->pipeline) { gst_element_set_state (priv->pipeline, GST_STATE_NULL); gst_object_unref (priv->pipeline); priv->pipeline = NULL; } if (priv->preferences) { g_object_unref (priv->preferences); priv->preferences = NULL; } if (priv->art_cache) { g_object_unref (priv->art_cache); priv->art_cache = NULL; } G_OBJECT_CLASS (pragha_backend_parent_class)->dispose (object); } static void pragha_backend_finalize (GObject *object) { PraghaBackend *backend = PRAGHA_BACKEND (object); PraghaBackendPrivate *priv = backend->priv; if (priv->error) g_error_free (priv->error); CDEBUG(DBG_BACKEND, "Pipeline destruction complete"); G_OBJECT_CLASS (pragha_backend_parent_class)->finalize (object); } GstElement * pragha_backend_get_equalizer (PraghaBackend *backend) { return backend->priv->equalizer; } GstElement * pragha_backend_get_preamp (PraghaBackend *backend) { return backend->priv->preamp; } void pragha_backend_update_equalizer (PraghaBackend *backend, const gdouble *bands) { PraghaBackendPrivate *priv = backend->priv; g_object_set (priv->equalizer, "band0", bands[0], "band1", bands[1], "band2", bands[2], "band3", bands[3], "band4", bands[4], "band5", bands[5], "band6", bands[6], "band7", bands[7], "band8", bands[8], "band9", bands[9], NULL); } static void pragha_backend_init_equalizer_preset (PraghaBackend *backend) { PraghaBackendPrivate *priv = backend->priv; gdouble *saved_bands; if (priv->equalizer == NULL) return; saved_bands = pragha_preferences_get_double_list (priv->preferences, GROUP_AUDIO, KEY_EQ_10_BANDS); if (saved_bands != NULL) { pragha_backend_update_equalizer (backend, saved_bands); g_free (saved_bands); } } #ifndef G_OS_WIN32 static GstElement * make_audio_sink (PraghaPreferences *preferences) { const gchar *audiosink; const gchar *sink_pref = pragha_preferences_get_audio_sink (preferences); if (!g_ascii_strcasecmp (sink_pref, ALSA_SINK)) { CDEBUG (DBG_BACKEND, "Setting Alsa like audio sink"); audiosink = "alsasink"; } else if (!g_ascii_strcasecmp (sink_pref, OSS4_SINK)) { CDEBUG (DBG_BACKEND, "Setting Oss4 like audio sink"); audiosink = "oss4sink"; } else if (!g_ascii_strcasecmp (sink_pref, OSS_SINK)) { CDEBUG (DBG_BACKEND, "Setting Oss like audio sink"); audiosink = "osssink"; } else if (!g_ascii_strcasecmp (sink_pref, PULSE_SINK)) { CDEBUG (DBG_BACKEND, "Setting Pulseaudio like audio sink"); audiosink = "pulsesink"; } else { CDEBUG (DBG_BACKEND, "Setting autoaudiosink like audio sink"); audiosink = "autoaudiosink"; } return gst_element_factory_make (audiosink, "audio-sink"); } #endif static void pragha_backend_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { PraghaBackend *backend = PRAGHA_BACKEND (object); switch (property_id) { case PROP_VOLUME: pragha_backend_set_volume (backend, g_value_get_double (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } static void pragha_backend_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { PraghaBackend *backend = PRAGHA_BACKEND (object); switch (property_id) { case PROP_VOLUME: g_value_set_double (value, pragha_backend_get_volume (backend)); break; case PROP_TARGET_STATE: g_value_set_int (value, pragha_backend_get_target_state (backend)); break; case PROP_STATE: g_value_set_int (value, pragha_backend_get_state (backend)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } static void pragha_backend_class_init (PraghaBackendClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->set_property = pragha_backend_set_property; gobject_class->get_property = pragha_backend_get_property; gobject_class->dispose = pragha_backend_dispose; gobject_class->finalize = pragha_backend_finalize; properties[PROP_VOLUME] = g_param_spec_double ("volume", "Volume", "Playback volume.", 0.0, 1.0, 0.5, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); properties[PROP_TARGET_STATE] = g_param_spec_int ("targetstate", "TargetState", "Playback target state.", G_MININT, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); properties[PROP_STATE] = g_param_spec_int ("state", "State", "Playback state.", G_MININT, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, PROP_LAST, properties); signals[SIGNAL_SET_DEVICE] = g_signal_new ("set-device", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, set_device), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[SIGNAL_PREPARE_SOURCE] = g_signal_new ("prepare-source", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, prepare_source), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_CLEAN_SOURCE] = g_signal_new ("clean-source", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, clean_source), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_TICK] = g_signal_new ("tick", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, tick), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_SEEKED] = g_signal_new ("seeked", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, seeked), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_BUFFERING] = g_signal_new ("buffering", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, buffering), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); signals[SIGNAL_FINISHED] = g_signal_new ("finished", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, finished), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_ERROR] = g_signal_new ("error", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, error), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[SIGNAL_TAGS_CHANGED] = g_signal_new ("tags-changed", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaBackendClass, tags_changed), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); g_type_class_add_private (klass, sizeof (PraghaBackendPrivate)); } static void pragha_backend_init (PraghaBackend *backend) { PraghaBackendPrivate *priv = PRAGHA_BACKEND_GET_PRIVATE (backend); backend->priv = priv; priv->target_state = GST_STATE_READY; priv->state = ST_STOPPED; priv->is_live = FALSE; priv->can_seek = FALSE; priv->seeking = FALSE; priv->emitted_error = FALSE; priv->error = NULL; priv->preferences = pragha_preferences_get (); priv->art_cache = pragha_art_cache_get (); priv->pipeline = gst_element_factory_make("playbin", "playbin"); if (priv->pipeline == NULL) { g_critical ("Failed to create playbin element. Please check your GStreamer installation."); exit (1); } /* If no audio sink has been specified via the "audio-sink" property, playbin will use the autoaudiosink. Need review then when return the audio preferences. */ #ifndef G_OS_WIN32 priv->audio_sink = make_audio_sink (priv->preferences); #else priv->audio_sink = gst_element_factory_make ("directsoundsink", "audio-sink"); #endif if (priv->audio_sink != NULL) { const gchar *audio_device_pref = pragha_preferences_get_audio_device (priv->preferences); gboolean can_set_device = g_object_class_find_property (G_OBJECT_GET_CLASS (priv->audio_sink), "device") != NULL; /* Set the audio device to use. */ if (can_set_device && string_is_not_empty (audio_device_pref)) g_object_set (priv->audio_sink, "device", audio_device_pref, NULL); /* Test 10bands equalizer and test it. */ priv->equalizer = gst_element_factory_make ("equalizer-10bands", "equalizer"); priv->preamp = gst_element_factory_make ("volume", "preamp"); if (priv->equalizer != NULL && priv->preamp != NULL) { GstElement *bin; GstPad *pad, *ghost_pad; bin = gst_bin_new ("audiobin"); gst_bin_add_many (GST_BIN(bin), priv->preamp, priv->equalizer, priv->audio_sink, NULL); gst_element_link_many (priv->preamp, priv->equalizer, priv->audio_sink, NULL); pad = gst_element_get_static_pad (priv->preamp, "sink"); ghost_pad = gst_ghost_pad_new ("sink", pad); gst_pad_set_active (ghost_pad, TRUE); gst_element_add_pad (bin, ghost_pad); gst_object_unref (pad); g_object_set (priv->pipeline, "audio-sink", bin, NULL); } else { g_warning ("Failed to create the 10bands equalizer element. Not use it."); g_object_set (priv->pipeline, "audio-sink", priv->audio_sink, NULL); } } else { if (priv->equalizer) { g_object_unref(priv->equalizer); priv->equalizer = NULL; } if (priv->preamp) { g_object_unref(priv->preamp); priv->preamp = NULL; } g_warning ("Failed to create audio-sink element. Use default sink, without equalizer."); g_object_set (priv->pipeline, "audio-sink", priv->audio_sink, NULL); } /* Disable all video features */ pragha_backend_optimize_audio_flags(backend); GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (priv->pipeline)); gst_bus_add_signal_watch (bus); g_signal_connect (bus, "message::error", G_CALLBACK (pragha_backend_message_error), backend); g_signal_connect (bus, "message::eos", G_CALLBACK (pragha_backend_message_eos), backend); g_signal_connect (bus, "message::state-changed", G_CALLBACK (pragha_backend_message_state_changed), backend); g_signal_connect (bus, "message::async-done", G_CALLBACK (pragha_backend_message_async_done), backend); g_signal_connect (bus, "message::buffering", G_CALLBACK (pragha_backend_message_buffering), backend); g_signal_connect (bus, "message::clock-lost", G_CALLBACK (pragha_backend_message_clock_lost), backend); g_signal_connect (bus, "message::tag", G_CALLBACK (pragha_backend_message_tag), backend); gst_object_unref (bus); if(pragha_preferences_get_software_mixer (priv->preferences)) { pragha_backend_set_soft_volume (backend, TRUE); pragha_backend_set_volume(backend, pragha_preferences_get_software_volume (priv->preferences)); } pragha_backend_init_equalizer_preset (backend); //notify::volume is emitted from gstreamer worker thread g_signal_connect (priv->pipeline, "notify::volume", G_CALLBACK (volume_notify_cb), backend); g_signal_connect (priv->pipeline, "notify::source", G_CALLBACK (pragha_backend_source_notify_cb), backend); gst_element_set_state (priv->pipeline, GST_STATE_READY); CDEBUG (DBG_BACKEND, "Pipeline construction completed"); } PraghaBackend * pragha_backend_new (void) { gst_init (NULL, NULL); PraghaBackend *backend = g_object_new (PRAGHA_TYPE_BACKEND, NULL); return backend; } ����������������������pragha-1.3.4/src/pragha-backend.h�������������������������������������������������������������������0000664�0000000�0000000�00000011546�13435240150�0016554�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2010-2015 matias <mati86dl@gmail.com> */ /* Copyright (C) 2012-2013 Pavel Vasin */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_BACKEND_H #define PRAGHA_BACKEND_H #include <gst/gst.h> #include <glib-object.h> #include "pragha-musicobject.h" G_BEGIN_DECLS typedef enum { ST_PLAYING = 1, ST_STOPPED, ST_PAUSED } PraghaBackendState; #define PRAGHA_TYPE_BACKEND (pragha_backend_get_type ()) #define PRAGHA_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_BACKEND, PraghaBackend)) #define PRAGHA_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_BACKEND)) #define PRAGHA_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_BACKEND, PraghaBackendClass)) #define PRAGHA_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_BACKEND)) #define PRAGHA_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_BACKEND, PraghaBackendClass)) struct PraghaBackendPrivate; typedef struct PraghaBackendPrivate PraghaBackendPrivate; typedef struct { GObject parent; PraghaBackendPrivate *priv; } PraghaBackend; typedef struct { GObjectClass parent_class; void (*set_device) (PraghaBackend *backend, GObject *obj); void (*prepare_source) (PraghaBackend *backend); void (*clean_source) (PraghaBackend *backend); void (*tick) (PraghaBackend *backend); void (*seeked) (PraghaBackend *backend); void (*buffering) (PraghaBackend *backend, gint percent); void (*finished) (PraghaBackend *backend); void (*error) (PraghaBackend *backend, const GError *error); void (*tags_changed) (PraghaBackend *backend, gint changed); } PraghaBackendClass; gboolean pragha_backend_can_seek (PraghaBackend *backend); void pragha_backend_seek (PraghaBackend *backend, gint64 seek); gint64 pragha_backend_get_current_length (PraghaBackend *backend); gint64 pragha_backend_get_current_position (PraghaBackend *backend); void pragha_backend_set_soft_volume (PraghaBackend *backend, gboolean value); gdouble pragha_backend_get_volume (PraghaBackend *backend); void pragha_backend_set_volume (PraghaBackend *backend, gdouble volume); void pragha_backend_set_delta_volume (PraghaBackend *backend, gdouble delta); gboolean pragha_backend_is_playing (PraghaBackend *backend); gboolean pragha_backend_is_paused (PraghaBackend *backend); gboolean pragha_backend_emitted_error (PraghaBackend *backend); GError *pragha_backend_get_error (PraghaBackend *backend); PraghaBackendState pragha_backend_get_state (PraghaBackend *backend); void pragha_backend_pause (PraghaBackend *backend); void pragha_backend_resume (PraghaBackend *backend); void pragha_backend_play (PraghaBackend *backend); void pragha_backend_stop (PraghaBackend *backend); void pragha_backend_set_playback_uri (PraghaBackend *backend, const gchar *uri); void pragha_backend_set_musicobject (PraghaBackend *backend, PraghaMusicobject *mobj); PraghaMusicobject *pragha_backend_get_musicobject (PraghaBackend *backend); GstElement *pragha_backend_get_equalizer (PraghaBackend *backend); void pragha_backend_update_equalizer (PraghaBackend *backend, const gdouble *bands); GstElement *pragha_backend_get_preamp (PraghaBackend *backend); PraghaBackend *pragha_backend_new (void); G_END_DECLS #endif /* PRAGHA_BACKEND_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-cmdline.c�������������������������������������������������������������������0000664�0000000�0000000�00000022310�13435240150�0016562�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* Copyright (C) 2012-2013 Pavel Vasin */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <stdlib.h> #ifdef HAVE_LIBXFCE4UI #include <libxfce4ui/libxfce4ui.h> #endif #include "pragha-playback.h" #include "pragha-window.h" #include "pragha.h" static struct PraghaCmdLineOptions { gchar *audio_backend; gchar *audio_device; gchar *audio_mixer; gchar *logfile; gboolean play; gboolean stop; gboolean pause; gboolean prev; gboolean next; gboolean shuffle; gboolean repeat; gboolean inc_volume; gboolean dec_volume; gboolean toggle_view; gboolean current_state; gchar **files; } cmdline_options; static void clear_cmdline_options () { g_free (cmdline_options.audio_backend); g_free (cmdline_options.audio_device); g_free (cmdline_options.audio_mixer); g_free (cmdline_options.logfile); g_strfreev (cmdline_options.files); memset (&cmdline_options, 0, sizeof(cmdline_options)); } static gboolean cmd_version (const gchar *opt_name, const gchar *val, gpointer arg_data, GError **error) { g_print ("%s %s\n", PACKAGE, VERSION); exit (0); } static void cmd_current_state (PraghaApplication *pragha, GApplicationCommandLine *command_line) { const char *playing_str = "Playing"; const char *paused_str = "Paused"; const char *stopped_str = "Stopped"; PraghaBackend *backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) != ST_STOPPED) { const char *state = (pragha_backend_get_state (backend) == ST_PLAYING) ? playing_str : paused_str; PraghaMusicobject *mobj = pragha_backend_get_musicobject (backend); const char *file = pragha_musicobject_get_file (mobj); const char *title = pragha_musicobject_get_title (mobj); const char *artist = pragha_musicobject_get_artist (mobj); const char *album = pragha_musicobject_get_album (mobj); const char *genre = pragha_musicobject_get_genre (mobj); guint year = pragha_musicobject_get_year (mobj); guint track_no = pragha_musicobject_get_track_no (mobj); const char *comment = pragha_musicobject_get_comment (mobj); gint length = pragha_musicobject_get_length (mobj); gint bitrate = pragha_musicobject_get_bitrate (mobj); gint channels = pragha_musicobject_get_channels (mobj); gint samplerate = pragha_musicobject_get_samplerate (mobj); g_application_command_line_print (command_line, "state: %s\nfile: %s\ntitle: %s\nartist: %s\n" "album: %s\ngenre: %s\nyear: %d\ntrack_no: %d\ncomment: %s\n" "length: %d\nbitrate: %d\nchannels: %d\nsamplerate: %d\n", state, file, title, artist, album, genre, year, track_no, comment, length, bitrate, channels, samplerate); } else { g_application_command_line_print (command_line, "state: %s\n", stopped_str); } } static void cmd_add_files (PraghaApplication *pragha, GApplicationCommandLine *command_line) { gchar **file_names = cmdline_options.files; GPtrArray *files = g_ptr_array_new_with_free_func (g_object_unref); while (*file_names) { GFile *file = g_application_command_line_create_file_for_arg (command_line, *file_names); g_ptr_array_add (files, file); file_names++; } if (files->len > 0) g_application_open (G_APPLICATION (pragha), (GFile **) files->pdata, files->len, ""); g_ptr_array_unref (files); } static void process_options (PraghaApplication *pragha, GApplicationCommandLine *command_line) { if (!command_line) return; if (cmdline_options.logfile) { g_log_set_default_handler (pragha_log_to_file, cmdline_options.logfile); } if (cmdline_options.play) { pragha_playback_play_pause_resume (pragha); } if (cmdline_options.stop) { pragha_playback_stop (pragha); } if (cmdline_options.pause) { pragha_playback_play_pause_resume (pragha); } if (cmdline_options.prev) { pragha_playback_prev_track (pragha); } if (cmdline_options.next) { pragha_playback_next_track (pragha); } if (cmdline_options.shuffle) { PraghaPreferences *preferences = pragha_application_get_preferences (pragha); gboolean shuffle = pragha_preferences_get_shuffle (preferences); pragha_preferences_set_shuffle (preferences, !shuffle); } if (cmdline_options.repeat) { PraghaPreferences *preferences = pragha_application_get_preferences (pragha); gboolean repeat = pragha_preferences_get_repeat (preferences); pragha_preferences_set_repeat (preferences, !repeat); } if (cmdline_options.inc_volume) { PraghaBackend *backend = pragha_application_get_backend (pragha); pragha_backend_set_delta_volume (backend, +0.05); } if (cmdline_options.dec_volume) { PraghaBackend *backend = pragha_application_get_backend (pragha); pragha_backend_set_delta_volume (backend, -0.05); } if (cmdline_options.toggle_view) { pragha_window_toggle_state (pragha, TRUE); } if (cmdline_options.current_state) { cmd_current_state (pragha, command_line); } if (cmdline_options.files) { cmd_add_files (pragha, command_line); } } static const GOptionEntry cmd_entries[] = { {"version", 'v', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, cmd_version, "Version", NULL}, {"debug", 'e', 0, G_OPTION_ARG_INT, &debug_level, "Enable Debug ( Levels: 1,2,3,4 )", NULL}, { "log-file", 'l', 0, G_OPTION_ARG_FILENAME, &cmdline_options.logfile, "Redirects console warnings to the specified FILENAME", N_("FILENAME")}, {"play", 'p', 0, G_OPTION_ARG_NONE, &cmdline_options.play, "Play", NULL}, {"stop", 's', 0, G_OPTION_ARG_NONE, &cmdline_options.stop, "Stop", NULL}, {"pause", 't', 0, G_OPTION_ARG_NONE, &cmdline_options.pause, "Play/Pause/Resume", NULL}, {"prev", 'r', 0, G_OPTION_ARG_NONE, &cmdline_options.prev, "Prev", NULL}, {"next", 'n', 0, G_OPTION_ARG_NONE, &cmdline_options.next, "Next", NULL}, {"shuffle", 'f', 0, G_OPTION_ARG_NONE, &cmdline_options.shuffle, "Shuffle", NULL}, {"repeat", 'u', 0, G_OPTION_ARG_NONE, &cmdline_options.repeat, "Repeat", NULL}, {"inc_vol", 'i', 0, G_OPTION_ARG_NONE, &cmdline_options.inc_volume, "Increase volume by 1", NULL}, {"dec_vol", 'd', 0, G_OPTION_ARG_NONE, &cmdline_options.dec_volume, "Decrease volume by 1", NULL}, {"toggle_view", 'x', 0, G_OPTION_ARG_NONE, &cmdline_options.toggle_view, "Toggle player visibility", NULL}, {"current_state", 'c', 0, G_OPTION_ARG_NONE, &cmdline_options.current_state, "Get current player state", NULL}, {"audio_backend", 'a', 0, G_OPTION_ARG_STRING, &cmdline_options.audio_backend, "Audio backend (valid options: alsa/oss)", NULL}, {"audio_device", 'g', 0, G_OPTION_ARG_STRING, &cmdline_options.audio_device, "Audio Device (For ALSA: hw:0,0 etc.., For OSS: /dev/dsp etc..)", NULL}, {"audio_mixer", 'm', 0, G_OPTION_ARG_STRING, &cmdline_options.audio_mixer, "Mixer Element (For ALSA: Master, PCM, etc.., For OSS: /dev/mixer, etc...)", NULL}, {G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &cmdline_options.files, "", "[FILE1 [FILE2...]]"}, {NULL} }; gint handle_command_line (PraghaApplication *pragha, GApplicationCommandLine *command_line, gint argc, gchar **args) { gint i; int ret = 0; GError *error = NULL; /* We have to make an extra copy of the array, since g_option_context_parse() * assumes that it can remove strings from the array without freeing them. */ gchar **argv = g_new (gchar*, argc + 1); for (i = 0; i <= argc; i++) argv[i] = args[i]; GOptionContext *context = g_option_context_new ("- A lightweight music player"); GOptionGroup *group = g_option_group_new ("General", "General", "General Options", NULL, NULL); g_option_group_add_entries (group, cmd_entries); g_option_context_set_main_group (context, group); #ifdef HAVE_LIBXFCE4UI g_option_context_add_group (context, xfce_sm_client_get_option_group (argc, argv)); #endif g_option_context_parse (context, &argc, &argv, &error); if (error) { g_print ("%s\n%s\n", error->message, _("Use --help to see a full list of available command line options.")); g_error_free (error); ret = -1; } process_options (pragha, command_line); clear_cmdline_options (); g_option_context_free (context); g_free (argv); return ret; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-database.c������������������������������������������������������������������0000664�0000000�0000000�00000115612�13435240150�0016723�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* Copyright (C) 2012-2013 Pavel Vasin */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-database.h" #include "pragha-prepared-statement-private.h" #include <sqlite3.h> #include "pragha-musicobject-mgmt.h" #include "pragha-playlists-mgmt.h" #include "pragha-utils.h" #include "pragha-debug.h" G_DEFINE_TYPE(PraghaDatabase, pragha_database, G_TYPE_OBJECT) struct _PraghaDatabasePrivate { sqlite3 *sqlitedb; GHashTable *statements_cache; gboolean successfully; }; enum { SIGNAL_TRACKS_CHANGED, SIGNAL_PLAYLISTS_CHANGED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; gboolean pragha_database_exec_query (PraghaDatabase *database, const gchar *query) { gchar *err = NULL; gboolean ret = FALSE; g_return_val_if_fail(PRAGHA_IS_DATABASE(database), FALSE); if (!query) return FALSE; CDEBUG(DBG_DB, "%s", query); sqlite3_exec(database->priv->sqlitedb, query, NULL, NULL, &err); if (err) { g_critical("SQL Err : %s", err); g_critical("query : %s", query); sqlite3_free(err); ret = FALSE; } else { ret = TRUE; } return ret; } static PraghaPreparedStatement * new_statement (PraghaDatabase *database, const gchar *sql) { PraghaDatabasePrivate *priv = database->priv; sqlite3_stmt *stmt; if (sqlite3_prepare_v2 (priv->sqlitedb, sql, -1, &stmt, NULL) != SQLITE_OK) { g_critical ("db: %s", pragha_database_get_last_error (database)); return NULL; } return pragha_prepared_statement_new (stmt, database); } PraghaPreparedStatement * pragha_database_create_statement (PraghaDatabase *database, const gchar *sql) { PraghaDatabasePrivate *priv = database->priv; PraghaPreparedStatement *cached = g_hash_table_lookup (priv->statements_cache, sql); if (cached) { g_hash_table_steal (priv->statements_cache, sql); return cached; } return new_statement (database, sql); } void pragha_database_release_statement (PraghaDatabase *database, PraghaPreparedStatement *statement) { PraghaDatabasePrivate *priv = database->priv; gpointer sql = (gpointer) pragha_prepared_statement_get_sql (statement); pragha_prepared_statement_reset (statement); g_hash_table_replace (priv->statements_cache, sql, statement); } void pragha_database_begin_transaction (PraghaDatabase *database) { pragha_database_exec_query (database, "BEGIN TRANSACTION"); } void pragha_database_commit_transaction (PraghaDatabase *database) { pragha_database_exec_query (database, "END TRANSACTION"); } gint pragha_database_find_location (PraghaDatabase *database, const gchar *location) { gint location_id = 0; const gchar *sql = "SELECT id FROM LOCATION WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, location); if (pragha_prepared_statement_step (statement)) location_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return location_id; } gint pragha_database_find_mime_type (PraghaDatabase *database, const gchar *mime_type) { gint mime_type_id = 0; const gchar *sql = "SELECT id FROM MIME_TYPE WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, mime_type); if (pragha_prepared_statement_step (statement)) mime_type_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return mime_type_id; } gint pragha_database_find_artist (PraghaDatabase *database, const gchar *artist) { gint artist_id = 0; const gchar *sql = "SELECT id FROM ARTIST WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, artist); if (pragha_prepared_statement_step (statement)) artist_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return artist_id; } gint pragha_database_find_album (PraghaDatabase *database, const gchar *album) { gint album_id = 0; const gchar *sql = "SELECT id FROM ALBUM WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, album); if (pragha_prepared_statement_step (statement)) album_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return album_id; } gint pragha_database_find_genre (PraghaDatabase *database, const gchar *genre) { gint genre_id = 0; const gchar *sql = "SELECT id FROM GENRE WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, genre); if (pragha_prepared_statement_step (statement)) genre_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return genre_id; } gint pragha_database_find_comment (PraghaDatabase *database, const gchar *comment) { gint comment_id = 0; const gchar *sql = "SELECT id FROM COMMENT WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, comment); if (pragha_prepared_statement_step (statement)) comment_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return comment_id; } gint pragha_database_find_year (PraghaDatabase *database, gint year) { gint year_id = 0; const gchar *sql = "SELECT id FROM YEAR WHERE year = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, year); if (pragha_prepared_statement_step (statement)) year_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return year_id; } gint pragha_database_find_playlist (PraghaDatabase *database, const gchar *playlist) { gint playlist_id = 0; const gchar *sql = "SELECT id FROM PLAYLIST WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, playlist); if (pragha_prepared_statement_step (statement)) playlist_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return playlist_id; } gint pragha_database_find_radio (PraghaDatabase *database, const gchar *radio) { gint radio_id = 0; const gchar *sql = "SELECT id FROM RADIO WHERE name = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, radio); if (pragha_prepared_statement_step (statement)) radio_id = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return radio_id; } gint pragha_database_add_new_location (PraghaDatabase *database, const gchar *location) { const gchar *sql = "INSERT INTO LOCATION (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, location); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_location (database, location); } gint pragha_database_add_new_mime_type (PraghaDatabase *database, const gchar *mime_type) { const gchar *sql = "INSERT INTO MIME_TYPE (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, mime_type); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_mime_type (database, mime_type); } gint pragha_database_add_new_artist (PraghaDatabase *database, const gchar *artist) { const gchar *sql = "INSERT INTO ARTIST (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, artist); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_artist (database, artist); } gint pragha_database_add_new_album (PraghaDatabase *database, const gchar *album) { const gchar *sql = "INSERT INTO ALBUM (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, album); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_album (database, album); } gint pragha_database_add_new_genre (PraghaDatabase *database, const gchar *genre) { const gchar *sql = "INSERT INTO GENRE (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, genre); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_genre (database, genre); } gint pragha_database_add_new_comment (PraghaDatabase *database, const gchar *comment) { const gchar *sql = "INSERT INTO COMMENT (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, comment); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_comment (database, comment); } gint pragha_database_add_new_year (PraghaDatabase *database, guint year) { const gchar *sql = "INSERT INTO YEAR (year) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, year); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_year (database, year); } void pragha_database_forget_location (PraghaDatabase *database, gint location_id) { const gchar *sql; PraghaPreparedStatement *statement; sql = "DELETE FROM TRACK WHERE location = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); sql = "DELETE FROM LOCATION WHERE id = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_forget_track (PraghaDatabase *database, const gchar *file) { gint location_id = pragha_database_find_location (database, file); if (!location_id) { g_warning ("File not present in DB: %s", file); return; } pragha_database_forget_location(database, location_id); } gint pragha_database_add_new_playlist (PraghaDatabase *database, const gchar *playlist) { const gchar *sql = "INSERT INTO PLAYLIST (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, playlist); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_playlist (database, playlist); } void pragha_database_add_playlist_track (PraghaDatabase *database, gint playlist_id, const gchar *file) { const gchar *sql = "INSERT INTO PLAYLIST_TRACKS (file, playlist) VALUES (?, ?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, file); pragha_prepared_statement_bind_int (statement, 2, playlist_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } gint pragha_database_add_new_radio (PraghaDatabase *database, const gchar *radio) { const gchar *sql = "INSERT INTO RADIO (name) VALUES (?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, radio); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); return pragha_database_find_radio (database, radio); } void pragha_database_add_radio_track (PraghaDatabase *database, gint radio_id, const gchar *uri) { const gchar *sql = "INSERT INTO RADIO_TRACKS (uri, radio) VALUES (?, ?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, uri); pragha_prepared_statement_bind_int (statement, 2, radio_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_update_playlist_name (PraghaDatabase *database, const gchar *old_name, const gchar *new_name) { gint playlist_id = pragha_database_find_playlist (database, old_name); if (!playlist_id) return; const gchar *sql = "UPDATE PLAYLIST SET name = ? WHERE id = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, new_name); pragha_prepared_statement_bind_int (statement, 2, playlist_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_update_radio_name (PraghaDatabase *database, const gchar *old_name, const gchar *new_name) { gint radio_id = pragha_database_find_radio (database, old_name); if (!radio_id) return; const gchar *sql = "UPDATE RADIO SET name = ? WHERE id = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, new_name); pragha_prepared_statement_bind_int (statement, 2, radio_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_delete_dir (PraghaDatabase *database, const gchar *dir_name) { const gchar *sql; PraghaPreparedStatement *statement; gchar *mask = g_strconcat (dir_name, "%", NULL); /* Delete all tracks under the given dir */ sql = "DELETE FROM TRACK WHERE location IN (SELECT id FROM LOCATION WHERE NAME LIKE ?)"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, mask); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); /* Delete the location entries */ sql = "DELETE FROM LOCATION WHERE name LIKE ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, mask); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); /* Delete all entries from PLAYLIST_TRACKS which match given dir */ sql = "DELETE FROM PLAYLIST_TRACKS WHERE file LIKE ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, mask); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); /* Now flush unused artists, albums, genres, years */ pragha_database_flush_stale_entries (database); g_free (mask); } gint pragha_database_get_playlist_count (PraghaDatabase *database) { gint n_playlists = 0; const gchar *sql = "SELECT COUNT() FROM PLAYLIST WHERE name != ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); if (pragha_prepared_statement_step (statement)) n_playlists = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return n_playlists; } void pragha_database_flush_playlist (PraghaDatabase *database, gint playlist_id) { const gchar *sql = "DELETE FROM PLAYLIST_TRACKS WHERE playlist = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, playlist_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_delete_playlist (PraghaDatabase *database, const gchar *playlist) { gint playlist_id; if (string_is_empty(playlist)) { g_warning("Playlist name is NULL"); return; } playlist_id = pragha_database_find_playlist (database, playlist); if (!playlist_id) { g_warning("Playlist doesn't exist"); return; } pragha_database_flush_playlist (database, playlist_id); const gchar *sql = "DELETE FROM PLAYLIST WHERE id = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, playlist_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_flush_radio (PraghaDatabase *database, gint radio_id) { const gchar *sql = "DELETE FROM RADIO_TRACKS WHERE radio = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, radio_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_delete_radio (PraghaDatabase *database, const gchar *radio) { gint radio_id; if (string_is_empty(radio)) { g_warning("Radio name is NULL"); return; } radio_id = pragha_database_find_radio (database, radio); if (!radio_id) { g_warning("Radio doesn't exist"); return; } pragha_database_flush_radio (database, radio_id); const gchar *sql = "DELETE FROM RADIO WHERE id = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, radio_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } static void pragha_database_add_new_track (PraghaDatabase *database, gint location_id, gint mime_type_id, gint artist_id, gint album_id, gint genre_id, gint year_id, gint comment_id, guint track_no, gint length, gint channels, gint bitrate, gint samplerate, const gchar *title) { const gchar *sql = "INSERT INTO TRACK (" "location, " "file_type, " "track_no, " "artist, " "album, " "genre, " "year, " "comment, " "bitrate, " "samplerate, " "length, " "channels, " "title) " "VALUES " "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, location_id); pragha_prepared_statement_bind_int (statement, 2, mime_type_id); pragha_prepared_statement_bind_int (statement, 3, track_no); pragha_prepared_statement_bind_int (statement, 4, artist_id); pragha_prepared_statement_bind_int (statement, 5, album_id); pragha_prepared_statement_bind_int (statement, 6, genre_id); pragha_prepared_statement_bind_int (statement, 7, year_id); pragha_prepared_statement_bind_int (statement, 8, comment_id); pragha_prepared_statement_bind_int (statement, 9, bitrate); pragha_prepared_statement_bind_int (statement, 10, samplerate); pragha_prepared_statement_bind_int (statement, 11, length); pragha_prepared_statement_bind_int (statement, 12, channels); pragha_prepared_statement_bind_string (statement, 13, title); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } void pragha_database_add_new_musicobject (PraghaDatabase *database, PraghaMusicobject *mobj) { const gchar *file, *mime_type, *artist, *album, *genre, *comment; gint location_id = 0, mime_type_id = 0, artist_id = 0, album_id = 0, genre_id = 0, year_id = 0, comment_id; if (mobj) { file = pragha_musicobject_get_file (mobj); mime_type = pragha_musicobject_get_mime_type (mobj); artist = pragha_musicobject_get_artist (mobj); album = pragha_musicobject_get_album (mobj); genre = pragha_musicobject_get_genre (mobj); comment = pragha_musicobject_get_comment (mobj); /* Write location */ if ((location_id = pragha_database_find_location (database, file)) == 0) location_id = pragha_database_add_new_location (database, file); /* Write mime_type */ if ((mime_type_id = pragha_database_find_mime_type (database, mime_type)) == 0) mime_type_id = pragha_database_add_new_mime_type (database, mime_type); /* Write artist */ if ((artist_id = pragha_database_find_artist (database, artist)) == 0) artist_id = pragha_database_add_new_artist (database, artist); /* Write album */ if ((album_id = pragha_database_find_album (database, album)) == 0) album_id = pragha_database_add_new_album (database, album); /* Write genre */ if ((genre_id = pragha_database_find_genre (database, genre)) == 0) genre_id = pragha_database_add_new_genre (database, genre); /* Write year */ if ((year_id = pragha_database_find_year (database, pragha_musicobject_get_year (mobj))) == 0) year_id = pragha_database_add_new_year (database, pragha_musicobject_get_year (mobj)); /* Write comment */ if ((comment_id = pragha_database_find_comment (database, comment)) == 0) comment_id = pragha_database_add_new_comment (database, comment); /* Write track */ pragha_database_add_new_track (database, location_id, mime_type_id, artist_id, album_id, genre_id, year_id, comment_id, pragha_musicobject_get_track_no (mobj), pragha_musicobject_get_length (mobj), pragha_musicobject_get_channels (mobj), pragha_musicobject_get_bitrate (mobj), pragha_musicobject_get_samplerate (mobj), pragha_musicobject_get_title (mobj)); } } gchar * pragha_database_get_filename_from_location_id (PraghaDatabase *database, gint location_id) { PraghaPreparedStatement *statement; const gchar *sql; gchar *file = NULL; sql = "SELECT name FROM LOCATION WHERE id = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, location_id); if (pragha_prepared_statement_step (statement)) file = g_strdup (pragha_prepared_statement_get_string (statement, 0)); else g_warning ("Unable to find filename for location id: %d", location_id); pragha_prepared_statement_free (statement); return file; } static void pragha_database_update_track (PraghaDatabase *database, gint location_id, gint changed, gint track_no, const gchar *title, gint artist_id, gint album_id, gint genre_id, gint year_id, gint comment_id) { const gchar *sql; PraghaPreparedStatement *statement; if (changed & TAG_TNO_CHANGED) { sql = "UPDATE TRACK SET track_no = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, track_no); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } if (changed & TAG_TITLE_CHANGED) { sql = "UPDATE TRACK SET title = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, title); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } if (changed & TAG_ARTIST_CHANGED) { sql = "UPDATE TRACK SET artist = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, artist_id); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } if (changed & TAG_ALBUM_CHANGED) { sql = "UPDATE TRACK SET album = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, album_id); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } if (changed & TAG_GENRE_CHANGED) { sql = "UPDATE TRACK SET genre = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, genre_id); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } if (changed & TAG_YEAR_CHANGED) { sql = "UPDATE TRACK SET year = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, year_id); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } if (changed & TAG_COMMENT_CHANGED) { sql = "UPDATE TRACK SET comment = ? WHERE LOCATION = ?"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_int (statement, 1, comment_id); pragha_prepared_statement_bind_int (statement, 2, location_id); pragha_prepared_statement_step (statement); pragha_prepared_statement_free (statement); } } void pragha_database_update_local_files_change_tag (PraghaDatabase *database, GArray *loc_arr, gint changed, PraghaMusicobject *mobj) { gint track_no = 0, artist_id = 0, album_id = 0, genre_id = 0, year_id = 0, comment_id = 0; guint i = 0, elem = 0; if (!changed) return; if (!loc_arr) return; CDEBUG (DBG_VERBOSE, "Tags Changed: 0x%x", changed); if (changed & TAG_TNO_CHANGED) { track_no = pragha_musicobject_get_track_no (mobj); } if (changed & TAG_TITLE_CHANGED) { } if (changed & TAG_ARTIST_CHANGED) { const gchar *artist = pragha_musicobject_get_artist (mobj); artist_id = pragha_database_find_artist (database, artist); if (!artist_id) artist_id = pragha_database_add_new_artist (database, artist); } if (changed & TAG_ALBUM_CHANGED) { const gchar *album = pragha_musicobject_get_album (mobj); album_id = pragha_database_find_album (database, album); if (!album_id) album_id = pragha_database_add_new_album (database, album); } if (changed & TAG_GENRE_CHANGED) { const gchar *genre = pragha_musicobject_get_genre (mobj); genre_id = pragha_database_find_genre (database, genre); if (!genre_id) genre_id = pragha_database_add_new_genre (database, genre); } if (changed & TAG_YEAR_CHANGED) { year_id = pragha_database_find_year (database, pragha_musicobject_get_year (mobj)); if (!year_id) year_id = pragha_database_add_new_year (database, pragha_musicobject_get_year (mobj)); } if (changed & TAG_COMMENT_CHANGED) { const gchar *comment = pragha_musicobject_get_comment (mobj); comment_id = pragha_database_find_comment (database, comment); if (!comment_id) comment_id = pragha_database_add_new_comment (database, comment); } pragha_database_begin_transaction (database); if (loc_arr) { elem = 0; for (i = 0; i < loc_arr->len; i++) { elem = g_array_index (loc_arr, gint, i); if (elem) { pragha_database_update_track (database, elem, changed, track_no, pragha_musicobject_get_title (mobj), artist_id, album_id, genre_id, year_id, comment_id); } } } pragha_database_commit_transaction (database); } gchar** pragha_database_get_playlist_names (PraghaDatabase *database) { GPtrArray *playlists = g_ptr_array_new (); const gchar *sql = "SELECT name FROM PLAYLIST WHERE name != ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { const gchar *name = pragha_prepared_statement_get_string (statement, 0); g_ptr_array_add (playlists, g_strdup (name)); } pragha_prepared_statement_free (statement); if (playlists->len > 0) { g_ptr_array_add (playlists, NULL); return (gchar**) g_ptr_array_free (playlists, FALSE); } else { g_ptr_array_free (playlists, TRUE); return NULL; } } void pragha_database_flush (PraghaDatabase *database) { pragha_database_exec_query (database, "DELETE FROM TRACK"); pragha_database_exec_query (database, "DELETE FROM LOCATION"); pragha_database_exec_query (database, "DELETE FROM ARTIST"); pragha_database_exec_query (database, "DELETE FROM ALBUM"); pragha_database_exec_query (database, "DELETE FROM GENRE"); pragha_database_exec_query (database, "DELETE FROM YEAR"); pragha_database_exec_query (database, "DELETE FROM COMMENT"); } void pragha_database_flush_stale_entries (PraghaDatabase *database) { pragha_database_exec_query (database, "DELETE FROM ARTIST WHERE id NOT IN (SELECT artist FROM TRACK);"); pragha_database_exec_query (database, "DELETE FROM ALBUM WHERE id NOT IN (SELECT album FROM TRACK);"); pragha_database_exec_query (database, "DELETE FROM GENRE WHERE id NOT IN (SELECT genre FROM TRACK);"); pragha_database_exec_query (database, "DELETE FROM YEAR WHERE id NOT IN (SELECT year FROM TRACK);"); pragha_database_exec_query (database, "DELETE FROM COMMENT WHERE id NOT IN (SELECT comment FROM TRACK);"); } static gint pragha_database_get_table_count (PraghaDatabase *database, const gchar *table) { gchar *sql; gint count = 0; sql = g_strdup_printf ("SELECT COUNT() FROM %s;", table); PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); if (pragha_prepared_statement_step (statement)) count = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); g_free (sql); return count; } gint pragha_database_get_artist_count (PraghaDatabase *database) { return pragha_database_get_table_count (database, "ARTIST"); } gint pragha_database_get_album_count (PraghaDatabase *database) { return pragha_database_get_table_count (database, "ALBUM"); } gint pragha_database_get_track_count (PraghaDatabase *database) { return pragha_database_get_table_count (database, "TRACK"); } gboolean pragha_database_init_schema (PraghaDatabase *database) { gint i; const gchar *queries[] = { "PRAGMA user_version=131", "PRAGMA synchronous=OFF", "CREATE TABLE IF NOT EXISTS TRACK " "(location INT PRIMARY KEY," "track_no INT," "artist INT," "album INT," "genre INT," "year INT," "comment INT," "bitrate INT," "length INT," "channels INT," "samplerate INT," "file_type INT," "title VARCHAR(255));", "CREATE TABLE IF NOT EXISTS LOCATION " "(id INTEGER PRIMARY KEY," "name TEXT," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS MIME_TYPE " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS ARTIST " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS ALBUM " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS GENRE " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS YEAR " "(id INTEGER PRIMARY KEY," "year INT," "UNIQUE(year));", "CREATE TABLE IF NOT EXISTS COMMENT " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS PLAYLIST_TRACKS " "(file TEXT," "playlist INT);", "CREATE TABLE IF NOT EXISTS PLAYLIST " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));", "CREATE TABLE IF NOT EXISTS RADIO_TRACKS " "(uri TEXT," "radio INT);", "CREATE TABLE IF NOT EXISTS RADIO " "(id INTEGER PRIMARY KEY," "name VARCHAR(255)," "UNIQUE(name));" }; for (i = 0; i < G_N_ELEMENTS(queries); i++) { if (!pragha_database_exec_query (database, queries[i])) return FALSE; } return TRUE; } /** * pragha_database_change_playlists_done: * */ void pragha_database_change_playlists_done(PraghaDatabase *database) { g_return_if_fail(PRAGHA_IS_DATABASE(database)); g_signal_emit (database, signals[SIGNAL_PLAYLISTS_CHANGED], 0); } /** * pragha_database_change_tracks_done: * */ void pragha_database_change_tracks_done(PraghaDatabase *database) { g_return_if_fail(PRAGHA_IS_DATABASE(database)); g_signal_emit (database, signals[SIGNAL_TRACKS_CHANGED], 0); } /** * pragha_database_compatibilize_version: * */ void pragha_database_compatibilize_version (PraghaDatabase *database) { gint i; const gchar *mime_types[] = { "audio/x-wav", "audio/mpeg", "audio/x-flac", "audio/ogg", "audio/x-ms-wma", "audio/x-m4a", "audio/ape", "audio/x-mod" }; const gchar *sql = "UPDATE TRACK SET file_type = file_type + 1"; for (i = 0; i < G_N_ELEMENTS(mime_types); i++) { if (!pragha_database_find_mime_type (database, mime_types[i])) pragha_database_add_new_mime_type (database, mime_types[i]); } pragha_database_exec_query (database, sql); } gint pragha_database_get_version (PraghaDatabase *database) { gint version = 0; const gchar *sql = "PRAGMA user_version"; PraghaPreparedStatement *statement = pragha_database_create_statement (database, sql); if (pragha_prepared_statement_step (statement)) version = pragha_prepared_statement_get_int (statement, 0); pragha_prepared_statement_free (statement); return version; } /** * pragha_database_start_successfully: * */ gboolean pragha_database_start_successfully (PraghaDatabase *database) { g_return_val_if_fail(PRAGHA_IS_DATABASE(database), FALSE); return database->priv->successfully; } const gchar * pragha_database_get_last_error (PraghaDatabase *database) { return sqlite3_errmsg (database->priv->sqlitedb); } static void pragha_database_print_stats (PraghaDatabase *database) { PraghaDatabasePrivate *priv = database->priv; int current = 0, high = 0; sqlite3_db_status (priv->sqlitedb, SQLITE_DBSTATUS_STMT_USED, ¤t, &high, 0); gchar *formatted = g_format_size_full (current, G_FORMAT_SIZE_IEC_UNITS); CDEBUG (DBG_DB, "statements in cache: %i, mem used: %s", g_hash_table_size (priv->statements_cache), formatted); g_free (formatted); } static void pragha_database_finalize (GObject *object) { PraghaDatabase *database = PRAGHA_DATABASE(object); PraghaDatabasePrivate *priv = database->priv; pragha_database_print_stats (database); g_hash_table_destroy (priv->statements_cache); sqlite3_close(priv->sqlitedb); G_OBJECT_CLASS(pragha_database_parent_class)->finalize(object); } static void pragha_database_class_init (PraghaDatabaseClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->finalize = pragha_database_finalize; signals[SIGNAL_PLAYLISTS_CHANGED] = g_signal_new ("PlaylistsChanged", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaDatabaseClass, playlists_change), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_TRACKS_CHANGED] = g_signal_new ("TracksChanged", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaDatabaseClass, tracks_change), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_type_class_add_private(object_class, sizeof(PraghaDatabasePrivate)); } static void pragha_database_init (PraghaDatabase *database) { gint ret; gchar *database_file; const gchar *home; database->priv = G_TYPE_INSTANCE_GET_PRIVATE(database, PRAGHA_TYPE_DATABASE, PraghaDatabasePrivate); PraghaDatabasePrivate *priv = database->priv; priv->statements_cache = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, (GDestroyNotify) pragha_prepared_statement_finalize); home = g_get_user_config_dir(); database_file = g_build_path(G_DIR_SEPARATOR_S, home, "/pragha/pragha.db", NULL); priv->successfully = FALSE; /* Create the database file */ ret = sqlite3_open(database_file, &priv->sqlitedb); if (ret) { g_critical("Unable to open/create DATABASE file : %s", database_file); g_free(database_file); return; } g_free(database_file); if (!pragha_database_init_schema (database)) return; priv->successfully = TRUE; } /** * pragha_database_get: * * Queries the global #PraghaDatabase instance, which is shared * by all modules. The function automatically takes a reference * for the caller, so you'll need to call g_object_unref() when * you're done with it. * * Return value: the global #PraghaDatabase instance. **/ PraghaDatabase* pragha_database_get (void) { static PraghaDatabase *database = NULL; if (G_UNLIKELY (database == NULL)) { database = g_object_new(PRAGHA_TYPE_DATABASE, NULL); g_object_add_weak_pointer(G_OBJECT (database), (gpointer) &database); } else { g_object_ref (G_OBJECT (database)); } return database; } ����������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-database.h������������������������������������������������������������������0000664�0000000�0000000�00000014702�13435240150�0016726�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_DATABASE_H #define PRAGHA_DATABASE_H #include <glib-object.h> #include "pragha-prepared-statement.h" #include "pragha-musicobject.h" G_BEGIN_DECLS #define PRAGHA_TYPE_DATABASE (pragha_database_get_type()) #define PRAGHA_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_DATABASE, PraghaDatabase)) #define PRAGHA_DATABASE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_DATABASE, PraghaDatabase const)) #define PRAGHA_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_DATABASE, PraghaDatabaseClass)) #define PRAGHA_IS_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_DATABASE)) #define PRAGHA_IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_DATABASE)) #define PRAGHA_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_DATABASE, PraghaDatabaseClass)) typedef struct _PraghaDatabase PraghaDatabase; typedef struct _PraghaDatabaseClass PraghaDatabaseClass; typedef struct _PraghaDatabasePrivate PraghaDatabasePrivate; struct _PraghaDatabase { GObject parent; /*< private >*/ PraghaDatabasePrivate *priv; }; struct _PraghaDatabaseClass { GObjectClass parent_class; void (*playlists_change) (PraghaDatabase *database); void (*tracks_change) (PraghaDatabase *database); }; gboolean pragha_database_exec_query (PraghaDatabase *database, const gchar *query); PraghaPreparedStatement * pragha_database_create_statement (PraghaDatabase *database, const gchar *sql); void pragha_database_release_statement (PraghaDatabase *database, PraghaPreparedStatement *statement); void pragha_database_begin_transaction (PraghaDatabase *database); void pragha_database_commit_transaction (PraghaDatabase *database); gint pragha_database_find_location (PraghaDatabase *database, const gchar *location); gint pragha_database_find_mime_type (PraghaDatabase *database, const gchar *mime_type); gint pragha_database_find_artist (PraghaDatabase *database, const gchar *artist); gint pragha_database_find_album (PraghaDatabase *database, const gchar *album); gint pragha_database_find_genre (PraghaDatabase *database, const gchar *genre); gint pragha_database_find_comment (PraghaDatabase *database, const gchar *comment); gint pragha_database_find_year (PraghaDatabase *database, gint year); gint pragha_database_find_playlist (PraghaDatabase *database, const gchar *playlist); gint pragha_database_find_radio (PraghaDatabase *database, const gchar *radio); gint pragha_database_add_new_location (PraghaDatabase *database, const gchar *location); gint pragha_database_add_new_mime_type (PraghaDatabase *database, const gchar *mime_type); gint pragha_database_add_new_artist (PraghaDatabase *database, const gchar *artist); gint pragha_database_add_new_album (PraghaDatabase *database, const gchar *album); gint pragha_database_add_new_genre (PraghaDatabase *database, const gchar *genre); gint pragha_database_add_new_comment (PraghaDatabase *database, const gchar *comment); gint pragha_database_add_new_year (PraghaDatabase *database, guint year); gint pragha_database_add_new_playlist (PraghaDatabase *database, const gchar *playlist); void pragha_database_add_playlist_track (PraghaDatabase *database, gint playlist_id, const gchar *file); gint pragha_database_add_new_radio (PraghaDatabase *database, const gchar *radio); void pragha_database_forget_location (PraghaDatabase *database, gint location_id); void pragha_database_forget_track (PraghaDatabase *database, const gchar *file); void pragha_database_add_radio_track (PraghaDatabase *database, gint radio_id, const gchar *uri); void pragha_database_update_playlist_name (PraghaDatabase *database, const gchar *old_name, const gchar *new_name); void pragha_database_update_radio_name (PraghaDatabase *database, const gchar *old_name, const gchar *new_name); void pragha_database_delete_dir (PraghaDatabase *database, const gchar *dir_name); gint pragha_database_get_playlist_count (PraghaDatabase *database); void pragha_database_flush_playlist (PraghaDatabase *database, gint playlist_id); void pragha_database_delete_playlist (PraghaDatabase *database, const gchar *playlist); void pragha_database_flush_radio (PraghaDatabase *database, gint radio_id); void pragha_database_delete_radio (PraghaDatabase *database, const gchar *radio); void pragha_database_add_new_musicobject (PraghaDatabase *database, PraghaMusicobject *mobj); gchar * pragha_database_get_filename_from_location_id (PraghaDatabase *database, gint location_id); void pragha_database_update_local_files_change_tag (PraghaDatabase *database, GArray *loc_arr, gint changed, PraghaMusicobject *mobj); gchar** pragha_database_get_playlist_names (PraghaDatabase *database); void pragha_database_flush (PraghaDatabase *database); void pragha_database_flush_stale_entries (PraghaDatabase *database); gint pragha_database_get_artist_count (PraghaDatabase *database); gint pragha_database_get_album_count (PraghaDatabase *database); gint pragha_database_get_track_count (PraghaDatabase *database); void pragha_database_change_playlists_done(PraghaDatabase *database); void pragha_database_change_tracks_done(PraghaDatabase *database); void pragha_database_compatibilize_version (PraghaDatabase *database); gint pragha_database_get_version (PraghaDatabase *database); gboolean pragha_database_start_successfully (PraghaDatabase *database); const gchar * pragha_database_get_last_error (PraghaDatabase *database); PraghaDatabase* pragha_database_get (void); GType pragha_database_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* PRAGHA_DATABASE_H */ ��������������������������������������������������������������pragha-1.3.4/src/pragha-debug.c���������������������������������������������������������������������0000664�0000000�0000000�00000004305�13435240150�0016241�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2011 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-debug.h" #include <stdio.h> /* Function to save debug on file. */ void pragha_log_to_file (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message, gpointer user_data) { FILE* logfile = fopen ((const char*)user_data, "a"); gchar* level_name = ""; switch (log_level) { /* skip irrelevant flags */ case G_LOG_LEVEL_MASK: case G_LOG_FLAG_FATAL: case G_LOG_FLAG_RECURSION: case G_LOG_LEVEL_ERROR: level_name = "ERROR"; break; case G_LOG_LEVEL_CRITICAL: level_name = "CRITICAL"; break; case G_LOG_LEVEL_WARNING: level_name = "WARNING"; break; case G_LOG_LEVEL_MESSAGE: level_name = "MESSAGE"; break; case G_LOG_LEVEL_INFO: level_name = "INFO"; break; case G_LOG_LEVEL_DEBUG: level_name = "DEBUG"; break; } fprintf (logfile, "%s %s: %s\n", log_domain ? log_domain : "Pragha", level_name, message); fclose (logfile); } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-debug.h���������������������������������������������������������������������0000664�0000000�0000000�00000003410�13435240150�0016242�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2011 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_DEBUG_H #define PRAGHA_DEBUG_H #include <glib.h> enum debug_level { DBG_BACKEND = 1, DBG_INFO, DBG_PLUGIN, DBG_MOBJ, DBG_DB, DBG_VERBOSE, }; extern gint debug_level; #define CDEBUG(_lvl, _fmt, ...) \ if (G_UNLIKELY(_lvl <= debug_level)) \ g_debug(_fmt, ##__VA_ARGS__); void pragha_log_to_file (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message, gpointer user_data); #endif /* PRAGHA_DEBUG_H */��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-dnd.c�����������������������������������������������������������������������0000664�0000000�0000000�00000010160�13435240150�0015714�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-dnd.h" #include <stdlib.h> #include <string.h> #include "pragha-musicobject-mgmt.h" #include "pragha-playlists-mgmt.h" #include "pragha-file-utils.h" #include "pragha-utils.h" #include "pragha-debug.h" GList * pragha_dnd_library_get_mobj_list (GtkSelectionData *data, PraghaDatabase *cdbase) { gint n = 0, location_id = 0; gchar *name = NULL, *uri, **uris; PraghaMusicobject *mobj = NULL; GList *list = NULL; CDEBUG(DBG_VERBOSE, "Dnd: Library"); uris = g_uri_list_extract_uris ((const gchar *) gtk_selection_data_get_data (data)); if (!uris) { g_warning("No selections to process in DnD"); return list; } /* Dnd from the library, so will read everything from database. */ pragha_database_begin_transaction (cdbase); /* Get the mobjs from the path of the library. */ for (n = 0; uris[n] != NULL; n++) { uri = uris[n]; if (g_str_has_prefix(uri, "Location:/")) { location_id = atoi(uri + strlen("Location:/")); mobj = new_musicobject_from_db (cdbase, location_id); if (G_LIKELY(mobj)) list = g_list_prepend(list, mobj); } else if(g_str_has_prefix(uri, "Playlist:/")) { name = uri + strlen("Playlist:/"); list = add_playlist_to_mobj_list (cdbase, name, list); } else if(g_str_has_prefix(uri, "Radio:/")) { name = uri + strlen("Radio:/"); list = add_radio_to_mobj_list (cdbase, name, list); } } pragha_database_commit_transaction (cdbase); g_strfreev(uris); return g_list_reverse (list); } GList * pragha_dnd_uri_list_get_mobj_list (GtkSelectionData *data) { PraghaMusicobject *mobj = NULL; gchar **uris = NULL, *filename = NULL; GList *list = NULL; gint i = 0; CDEBUG(DBG_VERBOSE, "Target: URI_LIST"); uris = gtk_selection_data_get_uris(data); if(uris){ for(i = 0; uris[i] != NULL; i++) { filename = g_filename_from_uri(uris[i], NULL, NULL); if (g_file_test(filename, G_FILE_TEST_IS_DIR)){ list = append_mobj_list_from_folder(list, filename); } else { mobj = new_musicobject_from_file(filename); if (G_LIKELY(mobj)) list = g_list_prepend(list, mobj); } /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); g_free(filename); } g_strfreev(uris); } return g_list_reverse (list); } GList * pragha_dnd_plain_text_get_mobj_list (GtkSelectionData *data) { PraghaMusicobject *mobj = NULL; gchar *filename = NULL; GList *list = NULL; CDEBUG(DBG_VERBOSE, "Target: PLAIN_TEXT"); filename = (gchar*)gtk_selection_data_get_text(data); if (g_file_test(filename, G_FILE_TEST_IS_DIR)) { list = append_mobj_list_from_folder(list, filename); } else { mobj = new_musicobject_from_file(filename); if (G_LIKELY(mobj)) list = g_list_prepend(list, mobj); /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } g_free(filename); return g_list_reverse (list); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-dnd.h�����������������������������������������������������������������������0000664�0000000�0000000�00000003311�13435240150�0015721�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_DND_H #define PRAGHA_DND_H #include <gtk/gtk.h> #include "pragha-database.h" typedef enum { TARGET_REF_LIBRARY, TARGET_URI_LIST, TARGET_PLAIN_TEXT } PraghaDndTarget; GList *pragha_dnd_library_get_mobj_list (GtkSelectionData *data, PraghaDatabase *dbase); GList *pragha_dnd_uri_list_get_mobj_list (GtkSelectionData *data); GList *pragha_dnd_plain_text_get_mobj_list (GtkSelectionData *data); #endif /* PRAGHA_DND_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-equalizer-dialog.c����������������������������������������������������������0000664�0000000�0000000�00000035433�13435240150�0020417�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2015 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-equalizer-dialog.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <math.h> #include "pragha-preferences.h" #define NUM_BANDS 11 typedef struct _PraghaEqualizerDialog PraghaEqualizerDialog; struct _PraghaEqualizerDialog { GtkWidget *enable; GtkWidget *vscales[NUM_BANDS]; GtkWidget *preset_combobox; PraghaPreferences *preferences; GstElement *equalizer; GstElement *preamp; }; static const gchar *presets_names[] = { N_("Disabled"), N_("Classical"), N_("Club"), N_("Dance"), N_("Full Bass"), N_("Full Bass and Treble"), N_("Full Treble"), N_("Laptop Speakers and Headphones"), N_("Large Hall"), N_("Live"), N_("Party"), N_("Pop"), N_("Reggae"), N_("Rock"), N_("Ska"), N_("Smiley Face Curve"), N_("Soft"), N_("Soft Rock"), N_("Techno"), N_("Custom") }; static const gchar *label_band_frec[] = { "30", "60", "120", "250", "500", "1k", "2k", "4k", "8k", "15k" }; static gboolean vscales_eq_set_by_user (GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data) { GtkWidget *eq_combobox = user_data; /* Set "custum" in combo */ gtk_combo_box_set_active (GTK_COMBO_BOX(eq_combobox), 19); return FALSE; } static void eq_combobox_activated_cb (GtkComboBox *widget, gpointer user_data) { PraghaEqualizerDialog *dialog = user_data; gint i, option = 0; gdouble value[][NUM_BANDS] = { { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, // "Disabled" { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -7.2, -7.2, -7.2, -9.6}, // "Classical" { 0.0, 0.0, 0.0, 8.0, 5.6, 5.6, 5.6, 3.2, 0.0, 0.0, 0.0}, // "Club" { -1.1, 9.6, 7.2, 2.4, -1.1, -1.1, -5.6, -7.2, -7.2, -1.1, -1.1}, // "Dance" { -1.1, -8.0, 9.6, 9.6, 5.6, 1.6, -4.0, -8.0,-10.4,-11.2,-11.2}, //"Full Bass" { -1.1, 7.2, 5.6, -1.1, -7.2, -4.8, 1.6, 8.0, 11.2, 12.0, 12.0}, // "Full Bass and Treble" { -1.1, -9.6, -9.6, -9.6, -4.0, 2.4, 11.2, 11.5, 11.8, 11.8, 12.0}, // "Full Treble" { -1.1, 4.8, 11.2, 5.6, -3.2, -2.4, 1.6, 4.8, 9.6, 11.9, 11.9}, // "Laptop Speakers and Headphones" { -1.1, 10.4, 10.4, 5.6, 5.6, -1.1, -4.8, -4.8, -4.8, -1.1, -1.1}, // "Large Hall" { -1.1, -4.8, -1.1, 4.0, 5.6, 5.6, 5.6, 4.0, 2.4, 2.4, 2.4}, // "Live" { -1.1, 7.2, 7.2, -1.1, -1.1, -1.1, -1.1, -1.1, -1.1, 7.2, 7.2}, // "Party" { -1.1, -1.6, 4.8, 7.2, 8.0, 5.6, -1.1, -2.4, -2.4, -1.6, -1.6}, // "Pop" { -1.1, -1.1, -1.1, -1.1, -5.6, -1.1, 6.4, 6.4, -1.1, -1.1, -1.1}, // "Reggae" { -1.1, 8.0, 4.8, -5.6, -8.0, -3.2, 4.0, 8.8, 11.2, 11.2, 11.2}, // "Rock" { -1.1, -2.4, -4.8, -4.0, -1.1, 4.0, 5.6, 8.8, 9.6, 11.2, 9.6}, // "Ska" { -7.0, 12.0, 8.0, 6.0, 3.0, 0.0, 0.0, 3.0, 6.0, 8.0, 12.0}, // "Smiley Face Curve" { -1.1, 4.8, 1.6, -1.1, -2.4, -1.1, 4.0, 8.0, 9.6, 11.2, 12.0}, // "Soft" { -1.1, 4.0, 4.0, 2.4, -1.1, -4.0, -5.6, -3.2, -1.1, 2.4, 8.8}, // "Soft Rock" { -1.1, 8.0, 5.6, -1.1, -5.6, -4.8, -1.1, 8.0, 9.6, 9.6, 8.8}, // "Techno" }; gtk_switch_set_state (GTK_SWITCH(dialog->enable), TRUE); option = gtk_combo_box_get_active (widget); if(option == 19) return; for (i = 0; i < NUM_BANDS; i++) gtk_range_set_value(GTK_RANGE(dialog->vscales[i]), value[option][i]); } static void pragha_equalizer_dialog_init_bands (PraghaEqualizerDialog *dialog) { gchar *eq_preset = NULL; gdouble *saved_bands; gint i; eq_preset = pragha_preferences_get_string (dialog->preferences, GROUP_AUDIO, KEY_EQ_PRESET); if(eq_preset != NULL) { if (g_ascii_strcasecmp(eq_preset, "Custom") == 0) { saved_bands = pragha_preferences_get_double_list (dialog->preferences, GROUP_AUDIO, KEY_EQ_10_BANDS); if (saved_bands != NULL) { for (i = 0; i < NUM_BANDS; i++) gtk_range_set_value(GTK_RANGE(dialog->vscales[i]), saved_bands[i]); g_free(saved_bands); } gtk_combo_box_set_active (GTK_COMBO_BOX(dialog->preset_combobox), G_N_ELEMENTS(presets_names) - 1); } else { for (i = 0; i < G_N_ELEMENTS(presets_names); i++) { if (g_ascii_strcasecmp(eq_preset, presets_names[i]) == 0) { gtk_combo_box_set_active (GTK_COMBO_BOX(dialog->preset_combobox), i); break; } } } g_free(eq_preset); } else { gtk_combo_box_set_active (GTK_COMBO_BOX(dialog->preset_combobox), 0); } } static void pragha_equalizer_dialog_save_preset (PraghaEqualizerDialog *dialog) { gdouble bands[NUM_BANDS]; gint i, preset; preset = gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->preset_combobox)); for (i = 0; i < NUM_BANDS; i++) bands[i] = gtk_range_get_value(GTK_RANGE(dialog->vscales[i])); pragha_preferences_set_string(dialog->preferences, GROUP_AUDIO, KEY_EQ_PRESET, presets_names[preset]); pragha_preferences_set_double_list(dialog->preferences, GROUP_AUDIO, KEY_EQ_10_BANDS, bands, NUM_BANDS); } static gboolean pragha_equalizer_band_get_tooltip (GtkWidget *vscale, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer data) { gchar *text = NULL; text = g_strdup_printf("%.1lf dB", gtk_range_get_value(GTK_RANGE(vscale))); gtk_tooltip_set_text (tooltip, text); g_free(text); return TRUE; } static void pragha_equalizer_dialog_bind_bands_to_backend (PraghaEqualizerDialog *dialog) { gchar *eq_property; GtkAdjustment *adjustment; gint i; GBindingFlags flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; for (i = 1; i < NUM_BANDS; i++) { eq_property = g_strdup_printf ("band%i", i-1); adjustment = gtk_range_get_adjustment (GTK_RANGE(dialog->vscales[i])); g_object_bind_property (dialog->equalizer, eq_property, adjustment, "value", flags); g_free (eq_property); } } static gboolean db_to_volume_transform_func (GBinding *binding, const GValue *from_value, GValue *to_value, gpointer user_data) { gdouble db = 0, volume = 0; db = g_value_get_double (from_value); volume = pow(10.0, db / 20.0); g_value_set_double (to_value, volume); return TRUE; } static gboolean volume_to_db_transform_func (GBinding *binding, const GValue *from_value, GValue *to_value, gpointer user_data) { gdouble db = 0, volume = 0; volume = g_value_get_double (from_value); db = 20 * log (volume/100); g_value_set_double (to_value, db); return TRUE; } static void pragha_equalizer_dialog_enabled_cb (GtkSwitch *enable, gpointer data1, gpointer data) { PraghaEqualizerDialog *dialog = data; if (!gtk_switch_get_active (enable)) { gtk_combo_box_set_active (GTK_COMBO_BOX(dialog->preset_combobox), 0); } } static void pragha_equalizer_dialog_response (GtkWidget *w_dialog, gint response_id, gpointer data) { PraghaEqualizerDialog *dialog = data; if(dialog->equalizer != NULL) pragha_equalizer_dialog_save_preset (dialog); g_object_unref (dialog->preferences); gtk_widget_destroy(w_dialog); g_slice_free(PraghaEqualizerDialog, dialog); } void pragha_equalizer_dialog_show (PraghaBackend *backend, GtkWidget *parent) { PraghaEqualizerDialog *dialog; GtkWidget *w_dialog, *grid, *label; GtkWidget *preamp_scale; gint i; dialog = g_slice_new0 (PraghaEqualizerDialog); dialog->equalizer = pragha_backend_get_equalizer (backend); dialog->preamp = pragha_backend_get_preamp (backend); dialog->preferences = pragha_preferences_get (); /* The main grid of dialog */ grid = gtk_grid_new (); /* Enable switch button */ dialog->enable = gtk_switch_new (); gtk_switch_set_state (GTK_SWITCH(dialog->enable), TRUE); gtk_widget_set_halign (GTK_WIDGET(dialog->enable), GTK_ALIGN_CENTER); gtk_widget_set_valign (GTK_WIDGET(dialog->enable), GTK_ALIGN_CENTER); g_object_set (G_OBJECT(dialog->enable), "margin", 4, NULL); gtk_grid_attach (GTK_GRID(grid), GTK_WIDGET(dialog->enable), 0, 0, 1, 1); g_signal_connect (dialog->enable, "notify::active", G_CALLBACK (pragha_equalizer_dialog_enabled_cb), dialog); /* Preamp scale */ preamp_scale = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, -12.0, 12.0, 0.1); gtk_scale_add_mark (GTK_SCALE(preamp_scale), 0.0, GTK_POS_LEFT, NULL); gtk_range_set_inverted(GTK_RANGE(preamp_scale), TRUE); gtk_scale_set_draw_value (GTK_SCALE(preamp_scale), FALSE); gtk_grid_attach (GTK_GRID(grid), GTK_WIDGET(preamp_scale), 0, 1, 1, 3); g_object_bind_property_full (dialog->preamp, "volume", gtk_range_get_adjustment(GTK_RANGE(preamp_scale)), "value", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, volume_to_db_transform_func, db_to_volume_transform_func, NULL, NULL); g_object_set (G_OBJECT(preamp_scale), "has-tooltip", TRUE, NULL); g_signal_connect (G_OBJECT(preamp_scale), "query-tooltip", G_CALLBACK(pragha_equalizer_band_get_tooltip), NULL); dialog->vscales[0] = preamp_scale; /* Preamp label */ label = gtk_label_new("Preamp"); gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC(label), 0.5, 0.5); gtk_grid_attach (GTK_GRID(grid), label, 0, 4, 1, 1); /* Equalizer scales marks */ label = gtk_label_new("+12 dB"); gtk_widget_set_vexpand (label, TRUE); gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.0); gtk_grid_attach (GTK_GRID(grid), label, 1, 1, 1, 1); label = gtk_label_new("0 dB"); gtk_widget_set_vexpand (label, TRUE); gtk_misc_set_alignment (GTK_MISC(label), 1.0, 0.5); gtk_grid_attach (GTK_GRID(grid), label, 1, 2, 1, 1); label = gtk_label_new("-12 dB"); gtk_widget_set_vexpand (label, TRUE); gtk_misc_set_alignment (GTK_MISC(label), 1.0, 1.0); gtk_grid_attach (GTK_GRID(grid), label, 1, 3, 1, 1); /* Create vertical scales band to equalizer */ for (i = 1; i < NUM_BANDS; i++) { dialog->vscales[i] = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, -12.0, 12.0, 0.1); gtk_range_set_inverted(GTK_RANGE(dialog->vscales[i]), TRUE); gtk_scale_set_draw_value (GTK_SCALE(dialog->vscales[i]), FALSE); gtk_scale_add_mark (GTK_SCALE(dialog->vscales[i]), 12.0, GTK_POS_LEFT, NULL); gtk_scale_add_mark (GTK_SCALE(dialog->vscales[i]), 0.0, GTK_POS_LEFT, NULL); gtk_scale_add_mark (GTK_SCALE(dialog->vscales[i]), -12.0, GTK_POS_LEFT, NULL); g_object_set (G_OBJECT(dialog->vscales[i]), "has-tooltip", TRUE, NULL); g_signal_connect(G_OBJECT(dialog->vscales[i]), "query-tooltip", G_CALLBACK(pragha_equalizer_band_get_tooltip), NULL); gtk_widget_set_vexpand (dialog->vscales[i], TRUE); gtk_widget_set_hexpand (dialog->vscales[i], TRUE); gtk_grid_attach (GTK_GRID(grid), dialog->vscales[i], i+1, 1, 1, 3); } for (i = 0; i < G_N_ELEMENTS(label_band_frec); i++) { label = gtk_label_new(label_band_frec[i]); gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_CENTER); gtk_misc_set_alignment (GTK_MISC(label), 0.5, 0.5); gtk_grid_attach (GTK_GRID(grid), GTK_WIDGET(label), i+2, 4, 1, 1); } /* Default pressets */ dialog->preset_combobox = gtk_combo_box_text_new (); gtk_widget_set_halign (GTK_WIDGET(dialog->preset_combobox), GTK_ALIGN_CENTER); gtk_container_set_border_width (GTK_CONTAINER(dialog->preset_combobox), 4); gtk_grid_attach (GTK_GRID(grid), dialog->preset_combobox, 2, 0, 10, 1); for (i = 0; i < G_N_ELEMENTS(presets_names); i++) gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(dialog->preset_combobox), _(presets_names[i])); /* Create the dialog */ w_dialog = gtk_dialog_new (); gtk_window_set_transient_for (GTK_WINDOW(w_dialog), GTK_WINDOW(parent)); gtk_window_set_destroy_with_parent (GTK_WINDOW(w_dialog), TRUE); gtk_window_set_title (GTK_WINDOW(w_dialog), _("Equalizer")); gtk_window_set_default_size(GTK_WINDOW (w_dialog), 400, 200); /* Conect the signals */ for (i = 0; i < NUM_BANDS; i++) { g_signal_connect(dialog->vscales[i], "change-value", G_CALLBACK(vscales_eq_set_by_user), dialog->preset_combobox); } g_signal_connect(G_OBJECT(dialog->preset_combobox), "changed", G_CALLBACK(eq_combobox_activated_cb), dialog); /* Append and show the dialog */ gtk_box_pack_start (GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(w_dialog))), grid, TRUE, TRUE, 0); if (dialog->equalizer != NULL && dialog->preamp != NULL) { pragha_equalizer_dialog_bind_bands_to_backend (dialog); pragha_equalizer_dialog_init_bands (dialog); } else { gtk_widget_set_sensitive(GTK_WIDGET(grid), FALSE); } gtk_widget_show_all(w_dialog); g_signal_connect (G_OBJECT (w_dialog), "response", G_CALLBACK (pragha_equalizer_dialog_response), dialog); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-equalizer-dialog.h����������������������������������������������������������0000664�0000000�0000000�00000002657�13435240150�0020426�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_EQUALIZER_DIALOG_H #define PRAGHA_EQUALIZER_DIALOG_H #include <gtk/gtk.h> #include "pragha-backend.h" void pragha_equalizer_dialog_show (PraghaBackend *backend, GtkWidget *parent); #endif /* PRAGHA_EQUALIZER_DIALOG_H */���������������������������������������������������������������������������������pragha-1.3.4/src/pragha-file-utils.c����������������������������������������������������������������0000664�0000000�0000000�00000034713�13435240150�0017236�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-file-utils.h" #include <gtk/gtk.h> #include <glib.h> #include <glib/gstdio.h> #include "pragha-utils.h" #include "pragha-playlists-mgmt.h" #include "pragha-musicobject-mgmt.h" /* * Mimetype handles by pragha */ #ifdef G_OS_WIN32 const gchar *mime_flac[] = {"audio/x-flac", "application/x-ext-flac", NULL}; const gchar *mime_mpeg[] = {"audio/mpeg", "application/x-ext-mp3", NULL}; const gchar *mime_ogg[] = {"audio/x-vorbis+ogg", "audio/ogg", "application/ogg", "application/x-ext-ogg", NULL}; const gchar *mime_wav[] = {"audio/x-wav", "audio/wav", "application/x-ext-wav", NULL}; const gchar *mime_asf[] = {"video/x-ms-asf", "audio/x-ms-wma", "application/x-ext-wma", NULL}; const gchar *mime_mp4 [] = {"audio/x-m4a", "application/x-ext-m4a", NULL}; const gchar *mime_ape [] = {"application/x-ape", "audio/ape", "audio/x-ape", NULL}; const gchar *mime_tracker[] = {"audio/x-mod", "audio/x-xm", "application/x-ext-mod", NULL}; #else const gchar *mime_flac[] = {"audio/x-flac", NULL}; const gchar *mime_mpeg[] = {"audio/mpeg", NULL}; const gchar *mime_ogg[] = {"audio/x-vorbis+ogg", "audio/ogg", "application/ogg", NULL}; const gchar *mime_wav[] = {"audio/x-wav", NULL}; const gchar *mime_asf[] = {"video/x-ms-asf", "audio/x-ms-wma", NULL}; const gchar *mime_mp4 [] = {"audio/x-m4a", NULL}; const gchar *mime_ape [] = {"application/x-ape", "audio/ape", "audio/x-ape", NULL}; const gchar *mime_tracker[] = {"audio/x-mod", "audio/x-xm", NULL}; #endif const gchar *mime_image[] = {"image/jpeg", "image/png", NULL}; /* Next based on http://git.gnome.org/browse/totem-pl-parser/tree/plparse/totem-pl-parser.c */ #ifdef HAVE_PLPARSER const gchar *mime_playlist[] = {"audio/x-mpegurl", "video/vnd.mpegurl", "audio/playlist", "audio/x-scpls", "application/x-smil", "application/smil", "application/vnd.ms-wpl", "video/x-ms-wvx", "audio/x-ms-wax", "application/xspf+xml", "text/uri-list", "text/x-google-video-pointer", "text/google-video-pointer", "audio/x-iriver-pla", "application/atom+xml", "application/rss+xml", "text/x-opml+xml", "audio/x-amzxml", NULL}; /* These ones are "dual" types, might be a video, might be a parser. */ const gchar *mime_dual[] = {"audio/x-real-audio", "audio/x-pn-realaudio", "application/ram", "application/vnd.rn-realmedia", "audio/x-pn-realaudio-plugin", "audio/vnd.rn-realaudio", "audio/x-realaudio", "audio/x-ms-asx", "video/x-ms-asf", "video/x-ms-wmv", "audio/x-ms-wma", "video/quicktime", "video/mp4", "application/x-quicktime-media-link", "application/x-quicktimeplayer", "application/xml", NULL}; #endif /* * Mimetype management. */ static gboolean is_valid_mime(const gchar *mime, const gchar **mlist) { gint i = 0; while (mlist[i]) { if (g_content_type_equals(mime, mlist[i])) return TRUE; i++; } return FALSE; } #ifdef G_OS_WIN32 /* * Next based on evince code. * See https://git.gnome.org/browse/evince/tree/libdocument/ev-file-helpers.c */ static gchar * get_mime_type_from_uri (const gchar *uri, GError **error) { GFile *file; GFileInfo *file_info; const gchar *content_type; gchar *mime_type = NULL; file = g_file_new_for_uri (uri); file_info = g_file_query_info (file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, 0, NULL, error); g_object_unref (file); if (file_info == NULL) return NULL; content_type = g_file_info_get_content_type (file_info); if (content_type != NULL) { mime_type = g_content_type_get_mime_type (content_type); } if (mime_type == NULL) { g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Unknown MIME Type"); } g_object_unref (file_info); return mime_type; } #else /* Accepts only absolute filename */ /* NB: Disregarding 'uncertain' flag for now. */ static gchar* get_mime_type (const gchar *file) { gboolean uncertain; gchar *result = NULL; result = g_content_type_guess(file, NULL, 0, &uncertain); return result; } #endif gchar * pragha_file_get_music_type(const gchar *filename) { gchar *result = NULL; if (!filename) return NULL; #ifdef G_OS_WIN32 result = get_mime_type_from_uri (filename, NULL); #else result = get_mime_type (filename); #endif return result; } PraghaPlaylistType pragha_pl_parser_guess_format_from_extension (const gchar *filename) { if ( g_str_has_suffix (filename, ".m3u") || g_str_has_suffix (filename, ".M3U") ) return PL_FORMAT_M3U; if ( g_str_has_suffix (filename, ".pls") || g_str_has_suffix (filename, ".PLS") ) return PL_FORMAT_PLS; if ( g_str_has_suffix (filename, ".xspf") || g_str_has_suffix (filename, ".XSPF") ) return PL_FORMAT_XSPF; if ( g_str_has_suffix (filename, ".asx") || g_str_has_suffix (filename, ".ASX") ) return PL_FORMAT_ASX; if ( g_str_has_suffix (filename, ".wax") || g_str_has_suffix (filename, ".WAX") ) return PL_FORMAT_XSPF; return PL_FORMAT_UNKNOWN; } /* Determine if the any file is useful to pragha. */ PraghaMediaType pragha_file_get_media_type (const gchar *filename) { PraghaMediaType ret = MEDIA_TYPE_UNKNOWN; gchar *result = NULL; if (!filename) return ret; #ifdef G_OS_WIN32 result = get_mime_type_from_uri (filename, NULL); #else result = get_mime_type (filename); #endif if (result) { if (is_valid_mime(result, mime_flac) || is_valid_mime(result, mime_mpeg) || is_valid_mime(result, mime_ogg) || is_valid_mime(result, mime_wav) || is_valid_mime(result, mime_asf) || is_valid_mime(result, mime_mp4) || is_valid_mime(result, mime_ape) || is_valid_mime(result, mime_tracker)) ret = MEDIA_TYPE_AUDIO; #ifdef HAVE_PLPARSER else if (is_valid_mime(result, mime_playlist)) #else else if (g_str_has_suffix (filename, ".m3u") || g_str_has_suffix (filename, ".M3U") || g_str_has_suffix (filename, ".pls") || g_str_has_suffix (filename, ".PLS") || g_str_has_suffix (filename, ".xspf") || g_str_has_suffix (filename, ".XSPF") || g_str_has_suffix (filename, ".asx") || g_str_has_suffix (filename, ".ASX") || g_str_has_suffix (filename, ".wax") || g_str_has_suffix (filename, ".WAX")) #endif ret = MEDIA_TYPE_PLAYLIST; else if (is_valid_mime(result, mime_image)) ret = MEDIA_TYPE_IMAGE; } g_free(result); return ret; } /* Return true if given file is an image */ static gboolean is_image_file(const gchar *file) { gboolean ret = FALSE; gchar *result = NULL; if (!file) return FALSE; /* Type: JPG, PNG */ #ifdef G_OS_WIN32 result = get_mime_type_from_uri (file, NULL); #else result = get_mime_type (file); #endif if (!result) return FALSE; else { ret = is_valid_mime(result, mime_image); g_free(result); return ret; } } /* *Generate and add the recently-used data */ static void add_recent_file (const gchar *filename) { GtkRecentData recent_data; gchar *uri = NULL; #ifdef G_OS_WIN32 recent_data.mime_type = get_mime_type_from_uri (filename, NULL); #else recent_data.mime_type = get_mime_type (filename); #endif if (recent_data.mime_type == NULL) return; recent_data.display_name = g_filename_display_basename (filename); recent_data.app_name = g_strdup (g_get_application_name ()); recent_data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL); recent_data.description = NULL; recent_data.groups = NULL; recent_data.is_private = FALSE; uri = g_filename_to_uri(filename, NULL, NULL); gtk_recent_manager_add_full(gtk_recent_manager_get_default(), uri, &recent_data); g_free (recent_data.display_name); g_free (recent_data.mime_type); g_free (recent_data.app_name); g_free (recent_data.app_exec); g_free (uri); } /* Accepts only absolute filename */ gboolean is_playable_file(const gchar *file) { if (!file) return FALSE; if (g_file_test(file, G_FILE_TEST_IS_REGULAR) && (pragha_file_get_media_type(file) != MEDIA_TYPE_AUDIO)) return TRUE; else return FALSE; } /* Accepts only absolute path */ gboolean is_dir_and_accessible(const gchar *dir) { gint ret; if (!dir) return FALSE; if (g_file_test(dir, G_FILE_TEST_IS_DIR) && !g_access(dir, R_OK | X_OK)) ret = TRUE; else ret = FALSE; return ret; } /* Get the first image file from the directory */ gchar* get_image_path_from_dir (const gchar *path) { GError *error = NULL; GDir *dir = NULL; const gchar *next_file = NULL; gchar *ab_file = NULL; gchar *result = NULL; dir = g_dir_open(path, 0, &error); if (!dir) { g_critical("Unable to open dir: %s", path); g_error_free(error); return NULL; } next_file = g_dir_read_name(dir); while (next_file) { ab_file = g_strconcat(path, G_DIR_SEPARATOR_S, next_file, NULL); if (g_file_test(ab_file, G_FILE_TEST_IS_REGULAR) && is_image_file(ab_file)) { result = ab_file; goto exit; } g_free(ab_file); next_file = g_dir_read_name(dir); } exit: g_dir_close(dir); return result; } /* Find out if any of the preferred album art files are present in the given dir. Runs through the patterns in sequence */ gchar* get_pref_image_path_dir (PraghaPreferences *preferences, const gchar *path) { GError *error = NULL; GDir *dir = NULL; const gchar *next_file = NULL; gchar *ab_file = NULL, **pattern; const gchar *patterns = NULL; GSList *file_list = NULL; gint i = 0; patterns = pragha_preferences_get_album_art_pattern(preferences); if (string_is_empty(patterns)) return NULL; /* Form a list of all files in the given dir */ dir = g_dir_open(path, 0, &error); if (!dir) { g_critical("Unable to open dir: %s", path); g_error_free(error); return NULL; } next_file = g_dir_read_name(dir); while (next_file) { ab_file = g_strconcat(path, G_DIR_SEPARATOR_S, next_file, NULL); if (g_file_test(ab_file, G_FILE_TEST_IS_REGULAR)) file_list = g_slist_append(file_list, g_strdup(next_file)); g_free(ab_file); next_file = g_dir_read_name(dir); } g_dir_close(dir); /* Now, run the preferred patterns through them */ pattern = g_strsplit(patterns, ";", ALBUM_ART_NO_PATTERNS); while (pattern[i]) { if (is_present_str_list(pattern[i], file_list)) { ab_file = g_strconcat(path, G_DIR_SEPARATOR_S, pattern[i], NULL); if (is_image_file(ab_file)) return ab_file; g_free(ab_file); } i++; } /* Cleanup */ g_slist_free_full(file_list, g_free); g_strfreev(pattern); return NULL; } /* Count files on a folder. */ gint pragha_get_dir_count(const gchar *dir_name, GCancellable *cancellable) { gint file_count = 0; GDir *dir; const gchar *next_file = NULL; gchar *ab_file; GError *error = NULL; dir = g_dir_open(dir_name, 0, &error); if (!dir) { g_warning("Unable to open library : %s", dir_name); return file_count; } next_file = g_dir_read_name(dir); while (next_file) { if(g_cancellable_is_cancelled (cancellable)) return 0; ab_file = g_strconcat(dir_name, G_DIR_SEPARATOR_S, next_file, NULL); if (g_file_test(ab_file, G_FILE_TEST_IS_DIR)) file_count += pragha_get_dir_count(ab_file, cancellable); else { file_count++; } g_free(ab_file); next_file = g_dir_read_name(dir); } g_dir_close(dir); return file_count; } GList * append_mobj_list_from_folder(GList *list, gchar *dir_name) { PraghaPreferences *preferences; PraghaMusicobject *mobj = NULL; PraghaMediaType file_type; GDir *dir; const gchar *next_file = NULL; gchar *ab_file; GError *error = NULL; dir = g_dir_open(dir_name, 0, &error); if (!dir) { g_critical("Unable to open library : %s", dir_name); return list; } next_file = g_dir_read_name(dir); while (next_file) { ab_file = g_strconcat(dir_name, G_DIR_SEPARATOR_S, next_file, NULL); if (is_dir_and_accessible(ab_file)) { preferences = pragha_preferences_get(); if(pragha_preferences_get_add_recursively(preferences)) list = append_mobj_list_from_folder(list, ab_file); g_object_unref(G_OBJECT(preferences)); } else { file_type = pragha_file_get_media_type (ab_file); switch (file_type) { case MEDIA_TYPE_AUDIO: mobj = new_musicobject_from_file (ab_file); if (G_LIKELY(mobj)) list = g_list_append(list, mobj); break; case MEDIA_TYPE_PLAYLIST: list = pragha_pl_parser_append_mobj_list_by_extension (list, ab_file); break; case MEDIA_TYPE_IMAGE: case MEDIA_TYPE_UNKNOWN: default: break; } } /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); g_free(ab_file); next_file = g_dir_read_name(dir); } g_dir_close(dir); return list; } GList * append_mobj_list_from_unknown_filename(GList *list, gchar *filename) { PraghaMusicobject *mobj; PraghaMediaType file_type; if (is_dir_and_accessible(filename)) { list = append_mobj_list_from_folder (list, filename); } else { file_type = pragha_file_get_media_type (filename); switch (file_type) { case MEDIA_TYPE_AUDIO: mobj = new_musicobject_from_file (filename); if (G_LIKELY(mobj)) { list = g_list_append(list, mobj); add_recent_file(filename); } break; case MEDIA_TYPE_PLAYLIST: list = pragha_pl_parser_append_mobj_list_by_extension (list, filename); break; case MEDIA_TYPE_IMAGE: case MEDIA_TYPE_UNKNOWN: default: break; } } /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); return list; } �����������������������������������������������������pragha-1.3.4/src/pragha-file-utils.h����������������������������������������������������������������0000664�0000000�0000000�00000005560�13435240150�0017241�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /**************************************************************************/ #ifndef PRAGHA_FILE_UTILS_H #define PRAGHA_FILE_UTILS_H #if HAVE_CONFIG_H #include <config.h> #endif #include <glib.h> #include <gio/gio.h> #include "pragha-musicobject.h" #include "pragha-preferences.h" /* Playlist type formats */ typedef enum { PL_FORMAT_UNKNOWN, PL_FORMAT_M3U, PL_FORMAT_PLS, PL_FORMAT_ASX, PL_FORMAT_XSPF } PraghaPlaylistType; typedef enum { MEDIA_TYPE_UNKNOWN, MEDIA_TYPE_AUDIO, MEDIA_TYPE_PLAYLIST, MEDIA_TYPE_IMAGE } PraghaMediaType; extern const gchar *mime_mpeg[]; extern const gchar *mime_wav[]; extern const gchar *mime_flac[]; extern const gchar *mime_ogg[]; extern const gchar *mime_asf[]; extern const gchar *mime_mp4[]; extern const gchar *mime_ape[]; extern const gchar *mime_tracker[]; extern const gchar *mime_image[]; #ifdef HAVE_PLPARSER extern const gchar *mime_playlist[]; extern const gchar *mime_dual[]; #endif gboolean is_playable_file(const gchar *file); PraghaMediaType pragha_file_get_media_type (const gchar *filename); gchar *pragha_file_get_music_type (const gchar *filename); PraghaPlaylistType pragha_pl_parser_guess_format_from_extension (const gchar *filename); gboolean is_dir_and_accessible(const gchar *dir); gchar *get_image_path_from_dir (const gchar *path); gchar *get_pref_image_path_dir (PraghaPreferences *preferences, const gchar *path); gint pragha_get_dir_count(const gchar *dir_name, GCancellable *cancellable); GList *append_mobj_list_from_folder(GList *list, gchar *dir_name); GList *append_mobj_list_from_unknown_filename(GList *list, gchar *filename); #endif /* PRAGHA_FILE_UTILS_H */������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-filter-dialog.c�������������������������������������������������������������0000664�0000000�0000000�00000030152�13435240150�0017674�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-filter-dialog.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <gdk/gdkkeysyms.h> #include "pragha-utils.h" #include "pragha-search-entry.h" typedef struct { GtkWidget *filter_view; GtkTreeModel *filter_model; gchar *filter_string; guint timeout_id; PraghaPlaylist *cplaylist; PraghaPreferences *preferences; } PraghaFilterDialog; static void pragha_filter_dialog_select_row_on_current_playlist(GtkTreeView *fliter_view, GtkTreePath *filter_path, PraghaFilterDialog *fdialog) { GtkTreeIter iter; GtkTreeModel *filter_model; gint track_i = 0; filter_model = gtk_tree_view_get_model (GTK_TREE_VIEW(fliter_view)); if(gtk_tree_model_get_iter (filter_model, &iter, filter_path)) { gtk_tree_model_get (filter_model, &iter, 0, &track_i, -1); select_numered_path_of_current_playlist(fdialog->cplaylist, track_i - 1, TRUE); } } static int pragha_filter_dialog_key_press (GtkWidget *fliter_view, GdkEventKey *event, PraghaFilterDialog *fdialog) { GtkTreeSelection *selection; GList *list; if (event->state != 0 && ((event->state & GDK_CONTROL_MASK) || (event->state & GDK_MOD1_MASK) || (event->state & GDK_MOD3_MASK) || (event->state & GDK_MOD4_MASK) || (event->state & GDK_MOD5_MASK))) { return FALSE; } else if(event->keyval == GDK_KEY_q || event->keyval == GDK_KEY_Q) { selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(fliter_view)); list = gtk_tree_selection_get_selected_rows (selection, NULL); if (list) { pragha_filter_dialog_select_row_on_current_playlist (GTK_TREE_VIEW (fliter_view), list->data, fdialog); gtk_tree_path_free (list->data); g_list_free (list); toggle_queue_selected_current_playlist (fdialog->cplaylist); } return TRUE; } return FALSE; } static gboolean simple_filter_search_activate_handler(GtkEntry *entry, PraghaFilterDialog *fdialog) { const gchar *text = NULL; gchar *u_str = NULL; gboolean has_text; has_text = gtk_entry_get_text_length (GTK_ENTRY(entry)) > 0; if (fdialog->filter_string != NULL) { g_free (fdialog->filter_string); fdialog->filter_string = NULL; } if (has_text) { text = gtk_entry_get_text (entry); u_str = g_utf8_strdown (text, -1); fdialog->filter_string = u_str; } gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER(fdialog->filter_model)); return FALSE; } static gboolean do_filter_dialog_refilter (PraghaFilterDialog *fdialog) { gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER(fdialog->filter_model)); fdialog->timeout_id = 0; return FALSE; } static void queue_filter_dialog_refilter (PraghaFilterDialog *fdialog) { if (fdialog->timeout_id) { g_source_remove (fdialog->timeout_id); fdialog->timeout_id = 0; } fdialog->timeout_id = g_timeout_add(500, (GSourceFunc)do_filter_dialog_refilter, fdialog); } static void simple_filter_search_keyrelease_handler (GtkEntry *entry, PraghaFilterDialog *fdialog) { const gchar *text = NULL; gchar *u_str = NULL; gboolean has_text; if (fdialog->filter_string != NULL) { g_free (fdialog->filter_string); fdialog->filter_string = NULL; } has_text = gtk_entry_get_text_length (GTK_ENTRY(entry)) > 0; if (has_text) { text = gtk_entry_get_text (entry); u_str = g_utf8_strdown (text, -1); fdialog->filter_string = u_str; } if (!pragha_preferences_get_instant_search(fdialog->preferences)) return; queue_filter_dialog_refilter(fdialog); } static gboolean filter_model_visible_func (GtkTreeModel *model, GtkTreeIter *iter, PraghaFilterDialog *fdialog) { gchar *haystack = NULL, *haystackd = NULL, *needle = NULL; gboolean approximate, visible = FALSE; if(!fdialog->filter_string) return TRUE; gtk_tree_model_get(model, iter, 1, &haystack, -1); needle = fdialog->filter_string; haystackd = g_utf8_strdown (haystack, -1); approximate = pragha_preferences_get_approximate_search(fdialog->preferences); if(g_strstr_lv(haystackd, needle, approximate ? 1 : 0)) visible = TRUE; g_free(haystack); g_free(haystackd); return visible; } static void pragha_filter_dialog_fill_model (GtkListStore *filter_model, PraghaPlaylist *cplaylist) { GtkTreeIter filter_iter; PraghaMusicobject *mobj = NULL; gchar *ch_title = NULL, *ch_artist = NULL, *ch_album = NULL; const gchar *file, *title, *artist, *album; gchar *track_data_markup = NULL; gint track_i = 0; GList *list = NULL, *i; list = pragha_playlist_get_mobj_list(cplaylist); track_i = pragha_playlist_get_no_tracks(cplaylist); if(list != NULL) { for (i=list; i != NULL; i = i->next) { mobj = i->data; file = pragha_musicobject_get_file(mobj); title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); album = pragha_musicobject_get_album(mobj); ch_title = string_is_not_empty(title) ? g_strdup(title) : get_display_filename (file, FALSE); ch_artist = string_is_not_empty(artist) ? g_strdup(artist) : g_strdup(_("Unknown Artist")); ch_album = string_is_not_empty(album) ? g_strdup(album) : g_strdup(_("Unknown Album")); track_data_markup = g_markup_printf_escaped ("%s - %s - %s", ch_title, ch_artist, ch_album); if (track_data_markup != NULL) { gtk_list_store_prepend (filter_model, &filter_iter); gtk_list_store_set (filter_model, &filter_iter, 0, track_i, 1, track_data_markup, -1); } track_i--; g_free (ch_title); g_free (ch_artist); g_free (ch_album); g_free (track_data_markup); } g_list_free(list); } } static void pragha_filter_dialog_activated_cb(GtkTreeView *fliter_view, GtkTreePath *filter_path, GtkTreeViewColumn *column, GtkWidget *dialog) { gtk_dialog_response (GTK_DIALOG(dialog), GTK_RESPONSE_APPLY); } static void pragha_filter_dialog_response(GtkDialog *dialog, gint response, PraghaFilterDialog *fdialog) { GList *list; GtkTreeSelection *selection; switch (response) { case GTK_RESPONSE_ACCEPT: /* Get row selected on jump list and select the row on current playlist. */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(fdialog->filter_view)); list = gtk_tree_selection_get_selected_rows (selection, NULL); if (list) { pragha_filter_dialog_select_row_on_current_playlist (GTK_TREE_VIEW (fdialog->filter_view), list->data, fdialog); gtk_tree_path_free (list->data); g_list_free (list); } toggle_queue_selected_current_playlist (fdialog->cplaylist); break; case GTK_RESPONSE_APPLY: selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(fdialog->filter_view)); list = gtk_tree_selection_get_selected_rows (selection, NULL); if (list) { pragha_filter_dialog_select_row_on_current_playlist (GTK_TREE_VIEW (fdialog->filter_view), list->data, fdialog); gtk_tree_path_free (list->data); g_list_free (list); } case GTK_RESPONSE_DELETE_EVENT: case GTK_RESPONSE_CANCEL: break; default: break; } gtk_widget_grab_focus (pragha_playlist_get_view (fdialog->cplaylist)); gtk_widget_destroy (GTK_WIDGET(dialog)); g_free(fdialog->filter_string); g_object_unref(G_OBJECT(fdialog->preferences)); g_slice_free(PraghaFilterDialog, fdialog); } void pragha_filter_dialog (PraghaPlaylist *playlist) { PraghaPreferences *preferences; GtkWidget *dialog, *scrollwin, *vbox, *search_entry; GtkWidget *filter_view = NULL; GtkListStore *filter_store; GtkTreeModel *filter_model; GtkCellRenderer *renderer; GtkTreeViewColumn *column; PraghaFilterDialog *fdialog; fdialog = g_slice_new0(PraghaFilterDialog); preferences = pragha_preferences_get (); /* Crete the filter entry */ search_entry = pragha_search_entry_new(preferences); g_signal_connect (G_OBJECT(search_entry), "changed", G_CALLBACK(simple_filter_search_keyrelease_handler), fdialog); g_signal_connect (G_OBJECT(search_entry), "activate", G_CALLBACK(simple_filter_search_activate_handler), fdialog); /* Create the view */ filter_store = gtk_list_store_new (2, G_TYPE_UINT, G_TYPE_STRING); column = gtk_tree_view_column_new (); renderer = gtk_cell_renderer_text_new (); gtk_tree_view_column_pack_start (column, renderer, FALSE); gtk_tree_view_column_set_attributes (column, renderer, "text", 0, NULL); gtk_tree_view_column_set_spacing (column, 4); renderer = gtk_cell_renderer_text_new (); gtk_tree_view_column_pack_start (column, renderer, FALSE); gtk_tree_view_column_set_attributes (column, renderer, "markup", 1, NULL); gtk_tree_view_column_set_spacing (column, 4); /* Fill the filter tree view with current playlist */ pragha_filter_dialog_fill_model (filter_store, playlist); filter_model = gtk_tree_model_filter_new(GTK_TREE_MODEL(filter_store), NULL); g_object_unref(filter_store); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filter_model), (GtkTreeModelFilterVisibleFunc)filter_model_visible_func, fdialog, NULL); /* Create the tree view */ filter_view = gtk_tree_view_new_with_model(filter_model); gtk_tree_view_append_column (GTK_TREE_VIEW(filter_view), column); g_object_unref(G_OBJECT(filter_model)); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW(filter_view), TRUE); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(filter_view), FALSE); gtk_tree_view_set_enable_search (GTK_TREE_VIEW(filter_view), FALSE); /* Store references */ fdialog->filter_view = filter_view; fdialog->filter_model = filter_model; fdialog->filter_string = NULL; fdialog->timeout_id = 0; fdialog->cplaylist = playlist; fdialog->preferences = preferences; /* The search dialog */ dialog = gtk_dialog_new_with_buttons (_("Search in playlist"), GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(playlist))), GTK_DIALOG_MODAL, _("_Close"), GTK_RESPONSE_CANCEL, NULL); gtk_dialog_add_button (GTK_DIALOG (dialog), _("Add to playback queue"), GTK_RESPONSE_ACCEPT); gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Jump to"), GTK_RESPONSE_APPLY); gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 500); /* Add to the dialog's main vbox */ vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); gtk_box_pack_start (GTK_BOX(vbox), search_entry, FALSE, FALSE, 3); scrollwin = gtk_scrolled_window_new (NULL, NULL); gtk_container_add (GTK_CONTAINER(scrollwin), filter_view); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(scrollwin), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(scrollwin), GTK_SHADOW_IN); gtk_box_pack_start (GTK_BOX(vbox), scrollwin, TRUE, TRUE, 0); /* Connect signals */ g_signal_connect (filter_view, "row-activated", G_CALLBACK(pragha_filter_dialog_activated_cb), dialog); g_signal_connect (filter_view, "key_press_event", G_CALLBACK (pragha_filter_dialog_key_press), fdialog); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(pragha_filter_dialog_response), fdialog); gtk_widget_show_all (dialog); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-filter-dialog.h�������������������������������������������������������������0000664�0000000�0000000�00000002570�13435240150�0017704�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2011-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_FILTER_DIALOG_H #define PRAGHA_FILTER_DIALOG_H #include "pragha-playlist.h" void pragha_filter_dialog (PraghaPlaylist *playlist); #endif /* PRAGHA_FILTER_DIALOG_H */����������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-hig.c�����������������������������������������������������������������������0000664�0000000�0000000�00000010632�13435240150�0015722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2018 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-hig.h" #if !GTK_CHECK_VERSION (3, 12, 0) #define gtk_widget_set_margin_start gtk_widget_set_margin_left #endif void gtk_label_set_attribute_bold(GtkLabel *label) { PangoAttrList *Bold = pango_attr_list_new(); PangoAttribute *Attribute = NULL; Attribute = pango_attr_weight_new(PANGO_WEIGHT_BOLD); pango_attr_list_insert(Bold, Attribute); gtk_label_set_attributes(label, Bold); pango_attr_list_unref(Bold); } void pragha_hig_set_tiny_button (GtkWidget *button) { GtkCssProvider *provider; provider = gtk_css_provider_new (); gtk_css_provider_load_from_data (provider, "#s-tiny-button {\n" #if GTK_CHECK_VERSION (3, 14, 0) " margin : 0px;\n" " min-width: 10px; \n" " min-height: 10px; \n" #else " -GtkButton-default-border : 0px;\n" " -GtkButton-default-outside-border : 0px;\n" " -GtkButton-inner-border: 0px;\n" " -GtkWidget-focus-line-width: 0px;\n" " -GtkWidget-focus-padding: 0px;\n" #endif " padding: 0px;}", -1, NULL); gtk_style_context_add_provider (gtk_widget_get_style_context (button), GTK_STYLE_PROVIDER (provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); gtk_widget_set_name (button, "s-tiny-button"); g_object_unref (provider); } GtkWidget * pragha_hig_workarea_table_add_section_title(GtkWidget *table, guint *row, const char *section_title) { GtkWidget *section_label; section_label = gtk_label_new(section_title); gtk_misc_set_alignment(GTK_MISC(section_label), 0.0, 0.5); gtk_label_set_attribute_bold(GTK_LABEL(section_label)); gtk_grid_attach (GTK_GRID(table), section_label, 0, *row, 2, 1); ++ * row; return section_label; } void pragha_hig_workarea_table_add_wide_control(GtkWidget *table, guint *row, GtkWidget *widget) { gtk_grid_attach (GTK_GRID(table), widget, 0, *row, 2, 1); gtk_widget_set_margin_start (GTK_WIDGET(widget), 12); gtk_widget_set_hexpand (GTK_WIDGET(widget), TRUE); ++ * row; } void pragha_hig_workarea_table_add_wide_tall_control(GtkWidget *table, guint *row, GtkWidget *widget) { gtk_grid_attach (GTK_GRID(table), widget, 0, *row, 2, 1); gtk_widget_set_margin_start (GTK_WIDGET(widget), 12); gtk_widget_set_hexpand (widget, TRUE); gtk_widget_set_vexpand (widget, TRUE); ++ * row; } void pragha_hig_workarea_table_add_row(GtkWidget *table, guint *row, GtkWidget *label, GtkWidget *control) { gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_widget_set_margin_start (GTK_WIDGET(label), 12); gtk_grid_attach (GTK_GRID(table), label, 0, *row, 1, 1); gtk_grid_attach (GTK_GRID(table), control, 1, *row, 1, 1); gtk_widget_set_hexpand (control, TRUE); ++ * row; } GtkWidget * pragha_hig_workarea_table_new() { GtkWidget *table; table = gtk_grid_new (); gtk_container_set_border_width(GTK_CONTAINER(table), 12); gtk_grid_set_row_spacing (GTK_GRID(table), 12); gtk_grid_set_column_spacing (GTK_GRID(table), 6); return table; } ������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-hig.h�����������������������������������������������������������������������0000664�0000000�0000000�00000003716�13435240150�0015734�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2018 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_HIG_H #define PRAGHA_HIG_H #include <gtk/gtk.h> void gtk_label_set_attribute_bold (GtkLabel *label); void pragha_hig_set_tiny_button (GtkWidget *button); GtkWidget *pragha_hig_workarea_table_add_section_title (GtkWidget *table, guint *row, const char *section_title); void pragha_hig_workarea_table_add_wide_control (GtkWidget *table, guint *row, GtkWidget *widget); void pragha_hig_workarea_table_add_wide_tall_control (GtkWidget *table, guint *row, GtkWidget *widget); void pragha_hig_workarea_table_add_row (GtkWidget *table, guint *row, GtkWidget *label, GtkWidget *control); GtkWidget *pragha_hig_workarea_table_new (); #endif /* PRAGHA_HIG_H */��������������������������������������������������pragha-1.3.4/src/pragha-library-pane.c��������������������������������������������������������������0000664�0000000�0000000�00000270625�13435240150�0017552�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-library-pane.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib/gstdio.h> #include <gdk/gdkkeysyms.h> #include <stdlib.h> #include "pragha-playback.h" #include "pragha-menubar.h" #include "pragha-utils.h" #include "pragha-playlists-mgmt.h" #include "pragha-search-entry.h" #include "pragha-tagger.h" #include "pragha-tags-dialog.h" #include "pragha-tags-mgmt.h" #include "pragha-musicobject-mgmt.h" #include "pragha-dnd.h" #ifdef G_OS_WIN32 #include "../win32/win32dep.h" #endif struct _PraghaLibraryPane { GtkBox __parent__; /* Global database and preferences instances */ PraghaDatabase *cdbase; PraghaPreferences *preferences; /* Tree view */ GtkTreeStore *library_store; GtkWidget *library_tree; GtkWidget *search_entry; GtkWidget *pane_title; /* Tree view order. TODO: Rework and remove it. */ GSList *library_tree_nodes; /* Useful flags */ gboolean dragging; gboolean view_change; /* Filter stuff */ gchar *filter_entry; guint timeout_id; /* Fixbuf used on library tree. */ GdkPixbuf *pixbuf_artist; GdkPixbuf *pixbuf_album; GdkPixbuf *pixbuf_track; GdkPixbuf *pixbuf_genre; GdkPixbuf *pixbuf_dir; /* Menu */ GtkUIManager *library_pane_context_menu; GtkUIManager *library_tree_context_menu; }; enum { LIBRARY_APPEND_PLAYLIST, LIBRARY_REPLACE_PLAYLIST, LIBRARY_REPLACE_PLAYLIST_AND_PLAY, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(PraghaLibraryPane, pragha_library_pane, GTK_TYPE_BOX) /* Node types in library view */ typedef enum { NODE_CATEGORY, NODE_FOLDER, NODE_GENRE, NODE_ARTIST, NODE_ALBUM, NODE_TRACK, NODE_BASENAME, NODE_PLAYLIST, NODE_RADIO } LibraryNodeType; /* Columns in Library view */ enum library_columns { L_PIXBUF, L_NODE_DATA, L_NODE_BOLD, L_NODE_TYPE, L_LOCATION_ID, L_MACH, L_VISIBILE, N_L_COLUMNS }; typedef enum { PRAGHA_RESPONSE_SKIP, PRAGHA_RESPONSE_SKIP_ALL, PRAGHA_RESPONSE_DELETE_ALL } PraghaDeleteResponseType; #define PRAGHA_BUTTON_SKIP _("_Skip") #define PRAGHA_BUTTON_SKIP_ALL _("S_kip All") #define PRAGHA_BUTTON_DELETE_ALL _("Delete _All") /* * library_pane_context_menu calbacks */ static void pragha_library_pane_expand_all_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_collapse_all_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_folders_view_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_artist_view_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_album_view_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_genre_view_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_artist_album_view_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_genre_album_view_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_genre_artist_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_set_genre_artist_album_view_action (GtkAction *action, PraghaLibraryPane *library); /* * library_tree_context_menu calbacks */ static void library_tree_add_to_playlist_action (GtkAction *action, PraghaLibraryPane *library); static void library_tree_replace_playlist_action (GtkAction *action, PraghaLibraryPane *library); static void library_tree_replace_and_play (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_rename_item_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_remove_item_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_export_playlist_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_edit_tags_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_delete_from_hdd_action (GtkAction *action, PraghaLibraryPane *library); static void pragha_library_pane_delete_from_db_action (GtkAction *action, PraghaLibraryPane *library); /* * Menus definitions * **/ gchar *library_pane_context_menu_xml = "<ui> \ <popup> \ <menuitem action=\"Expand library\"/> \ <menuitem action=\"Collapse library\"/> \ <separator/> \ <menuitem action=\"folders\"/> \ <separator/> \ <menuitem action=\"artist\"/> \ <menuitem action=\"album\"/> \ <menuitem action=\"genre\"/> \ <separator/> \ <menuitem action=\"artist_album\"/> \ <menuitem action=\"genre_artist\"/> \ <menuitem action=\"genre_album\"/> \ <separator/> \ <menuitem action=\"genre_artist_album\"/> \ </popup> \ </ui>"; GtkActionEntry library_pane_context_aentries[] = { {"Expand library", NULL, N_("_Expand library"), "", "Expand the library", G_CALLBACK(pragha_library_pane_expand_all_action)}, {"Collapse library", NULL, N_("_Collapse library"), "", "Collapse the library", G_CALLBACK(pragha_library_pane_collapse_all_action)}, {"folders", NULL, N_("Folders structure"), "", "Folders structure", G_CALLBACK(pragha_library_pane_set_folders_view_action)}, {"artist", NULL, N_("Artist"), "", "Artist", G_CALLBACK(pragha_library_pane_set_artist_view_action)}, {"album", NULL, N_("Album"), "", "Album", G_CALLBACK(pragha_library_pane_set_album_view_action)}, {"genre", NULL, N_("Genre"), "", "Genre", G_CALLBACK(pragha_library_pane_set_genre_view_action)}, {"artist_album", NULL, N_("Artist / Album"), "", "Artist / Album", G_CALLBACK(pragha_library_pane_set_artist_album_view_action)}, {"genre_album", NULL, N_("Genre / Album"), "", "Genre / Album", G_CALLBACK(pragha_library_pane_set_genre_album_view_action)}, {"genre_artist", NULL, N_("Genre / Artist"), "", "Genre / Artist", G_CALLBACK(pragha_library_pane_set_genre_artist_action)}, {"genre_artist_album", NULL, N_("Genre / Artist / Album"), "", "Genre / Artist / Album", G_CALLBACK(pragha_library_pane_set_genre_artist_album_view_action)} }; gchar *library_tree_context_menu_xml = "<ui> \ <popup name=\"PlaylistPopup\"> \ <menuitem action=\"Add to current playlist\"/> \ <menuitem action=\"Replace current playlist\"/> \ <menuitem action=\"Replace and play\"/> \ <separator/> \ <menuitem action=\"Rename\"/> \ <menuitem action=\"Delete\"/> \ <menuitem action=\"Export\"/> \ </popup> \ <popup name=\"LibraryPopup\"> \ <menuitem action=\"Add to current playlist\"/> \ <menuitem action=\"Replace current playlist\"/> \ <menuitem action=\"Replace and play\"/> \ <separator/> \ <menuitem action=\"Edit tags\"/> \ <separator/> \ <menuitem action=\"Move to trash\"/> \ <menuitem action=\"Delete from library\"/> \ </popup> \ <popup name=\"CategoriesPopup\"> \ <menuitem action=\"Add to current playlist\"/> \ <menuitem action=\"Replace current playlist\"/> \ <menuitem action=\"Replace and play\"/> \ <separator/> \ <menuitem action=\"Rescan library\"/> \ <menuitem action=\"Update library\"/> \ </popup> \ </ui>"; GtkActionEntry library_tree_context_aentries[] = { /* Playlist and Radio tree */ {"Add to current playlist", "list-add", N_("_Add to current playlist"), "", "Add to current playlist", G_CALLBACK(library_tree_add_to_playlist_action)}, {"Replace current playlist", NULL, N_("_Replace current playlist"), "", "Replace current playlist", G_CALLBACK(library_tree_replace_playlist_action)}, {"Replace and play", "media-playback-start", N_("Replace and _play"), "", "Replace and play", G_CALLBACK(library_tree_replace_and_play)}, {"Rename", NULL, N_("Rename"), "", "Rename", G_CALLBACK(pragha_library_pane_rename_item_action)}, {"Delete", "list-remove", N_("Delete"), "", "Delete", G_CALLBACK(pragha_library_pane_remove_item_action)}, {"Export", "document-save", N_("Export"), "", "Export", G_CALLBACK(pragha_library_pane_export_playlist_action)}, {"Edit tags", NULL, N_("Edit tags"), "", "Edit tags", G_CALLBACK(pragha_library_pane_edit_tags_action)}, {"Move to trash", "user-trash", N_("Move to _trash"), "", "Move to trash", G_CALLBACK(pragha_library_pane_delete_from_hdd_action)}, {"Delete from library", "list-remove", N_("Delete from library"), "", "Delete from library", G_CALLBACK(pragha_library_pane_delete_from_db_action)}/*, {"Rescan library", GTK_STOCK_EXECUTE, N_("_Rescan library"), "", "Rescan library", G_CALLBACK(rescan_library_action)}, {"Update library", GTK_STOCK_EXECUTE, N_("_Update library"), "", "Update library", G_CALLBACK(update_library_action)}*/ }; /* * library_tree_context_menu calbacks */ static void library_tree_add_to_playlist_action(GtkAction *action, PraghaLibraryPane *library) { g_signal_emit (library, signals[LIBRARY_APPEND_PLAYLIST], 0); } static void library_tree_replace_playlist_action(GtkAction *action, PraghaLibraryPane *library) { g_signal_emit (library, signals[LIBRARY_REPLACE_PLAYLIST], 0); } static void library_tree_replace_and_play(GtkAction *action, PraghaLibraryPane *library) { g_signal_emit (library, signals[LIBRARY_REPLACE_PLAYLIST_AND_PLAY], 0); } /* Returns TRUE if any of the childs of p_iter matches node_data. iter * and p_iter must be created outside this function */ static gboolean find_child_node(const gchar *node_data, GtkTreeIter *iter, GtkTreeIter *p_iter, GtkTreeModel *model) { gchar *data = NULL; gboolean valid; gint cmp; valid = gtk_tree_model_iter_children(model, iter, p_iter); while (valid) { gtk_tree_model_get(model, iter, L_NODE_DATA, &data, -1); if (data) { cmp = g_ascii_strcasecmp (data, node_data); if (cmp == 0) { g_free(data); return TRUE; } else if (cmp > 0) { g_free(data); return FALSE; } g_free(data); } valid = gtk_tree_model_iter_next(model, iter); } return FALSE; } /* Prepend a child (iter) to p_iter with given data. NOTE that iter * and p_iter must be created outside this function */ static void library_store_prepend_node(GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *p_iter, GdkPixbuf *pixbuf, const gchar *node_data, int node_type, int location_id) { gtk_tree_store_prepend(GTK_TREE_STORE(model), iter, p_iter); gtk_tree_store_set (GTK_TREE_STORE(model), iter, L_PIXBUF, pixbuf, L_NODE_DATA, node_data, L_NODE_BOLD, PANGO_WEIGHT_NORMAL, L_NODE_TYPE, node_type, L_LOCATION_ID, location_id, L_MACH, FALSE, L_VISIBILE, TRUE, -1); } static void add_child_node_folder(GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *p_iter, const gchar *node_data, PraghaLibraryPane *clibrary) { GtkTreeIter l_iter; gchar *data = NULL; gint l_node_type; gboolean valid; /* Find position of the last directory that is a child of p_iter */ valid = gtk_tree_model_iter_children(model, &l_iter, p_iter); while (valid) { gtk_tree_model_get(model, &l_iter, L_NODE_TYPE, &l_node_type, -1); if (l_node_type != NODE_FOLDER) break; gtk_tree_model_get(model, &l_iter, L_NODE_DATA, &data, -1); if (g_ascii_strcasecmp(data, node_data) >= 0) { g_free(data); break; } g_free(data); valid = gtk_tree_model_iter_next(model, &l_iter); } /* Insert the new folder after the last subdirectory by order */ gtk_tree_store_insert_before (GTK_TREE_STORE(model), iter, p_iter, valid ? &l_iter : NULL); gtk_tree_store_set (GTK_TREE_STORE(model), iter,L_PIXBUF, clibrary->pixbuf_dir, L_NODE_DATA, node_data, L_NODE_BOLD, PANGO_WEIGHT_NORMAL, L_NODE_TYPE, NODE_FOLDER, L_LOCATION_ID, 0, L_MACH, FALSE, L_VISIBILE, TRUE, -1); } /* Appends a child (iter) to p_iter with given data. NOTE that iter * and p_iter must be created outside this function */ static void add_child_node_file(GtkTreeModel *model, GtkTreeIter *iter, GtkTreeIter *p_iter, const gchar *node_data, int location_id, PraghaLibraryPane *clibrary) { GtkTreeIter l_iter; gchar *data = NULL; gint l_node_type; gboolean valid; /* Find position of the last file that is a child of p_iter */ valid = gtk_tree_model_iter_children(model, &l_iter, p_iter); while (valid) { gtk_tree_model_get(model, &l_iter, L_NODE_TYPE, &l_node_type, -1); gtk_tree_model_get(model, &l_iter, L_NODE_DATA, &data, -1); if ((l_node_type == NODE_BASENAME) && (g_ascii_strcasecmp(data, node_data) >= 0)) { g_free(data); break; } g_free(data); valid = gtk_tree_model_iter_next(model, &l_iter); } /* Insert the new file after the last file by order */ gtk_tree_store_insert_before (GTK_TREE_STORE(model), iter, p_iter, valid ? &l_iter : NULL); gtk_tree_store_set (GTK_TREE_STORE(model), iter, L_PIXBUF, clibrary->pixbuf_track, L_NODE_DATA, node_data, L_NODE_BOLD, PANGO_WEIGHT_NORMAL, L_NODE_TYPE, NODE_BASENAME, L_LOCATION_ID, location_id, L_MACH, FALSE, L_VISIBILE, TRUE, -1); } /* Adds a file and its parent directories to the library tree */ static void add_folder_file(GtkTreeModel *model, const gchar *filepath, int location_id, GtkTreeIter *p_iter, PraghaLibraryPane *clibrary) { gchar **subpaths = NULL; /* To be freed */ GtkTreeIter iter, iter2, search_iter; int i = 0 , len = 0; /* Point after library directory prefix */ subpaths = g_strsplit(filepath, G_DIR_SEPARATOR_S, -1); len = g_strv_length (subpaths); len--; /* Add all subdirectories and filename to the tree */ for (i = 0; subpaths[i]; i++) { if (!find_child_node(subpaths[i], &search_iter, p_iter, model)) { if(i < len) add_child_node_folder(model, &iter, p_iter, subpaths[i], clibrary); else add_child_node_file(model, &iter, p_iter, subpaths[i], location_id, clibrary); p_iter = &iter; } else { iter2 = search_iter; p_iter = &iter2; } } g_strfreev(subpaths); } /* Adds an entry to the library tree by tag (genre, artist...) */ static void add_child_node_by_tags (GtkTreeModel *model, GtkTreeIter *p_iter, gint location_id, const gchar *location, const gchar *genre, const gchar *album, const gchar *year, const gchar *artist, const gchar *track, PraghaLibraryPane *clibrary) { GtkTreeIter iter, iter2, search_iter; gchar *node_data = NULL; GdkPixbuf *node_pixbuf = NULL; LibraryNodeType node_type = 0; gint node_level = 0, tot_levels = 0; gboolean need_gfree = FALSE; /* Iterate through library tree node types */ tot_levels = g_slist_length(clibrary->library_tree_nodes); while (node_level < tot_levels) { /* Set data to be added to the tree node depending on the type of node */ node_type = GPOINTER_TO_INT(g_slist_nth_data(clibrary->library_tree_nodes, node_level)); switch (node_type) { case NODE_TRACK: node_pixbuf = clibrary->pixbuf_track; if (string_is_not_empty(track)) { node_data = (gchar *)track; } else { node_data = get_display_filename(location, FALSE); need_gfree = TRUE; } break; case NODE_ARTIST: node_pixbuf = clibrary->pixbuf_artist; node_data = string_is_not_empty(artist) ? (gchar *)artist : _("Unknown Artist"); break; case NODE_ALBUM: node_pixbuf = clibrary->pixbuf_album; if (pragha_preferences_get_sort_by_year(clibrary->preferences)) { node_data = g_strconcat ((string_is_not_empty(year) && (atoi(year) > 0)) ? year : _("Unknown"), " - ", string_is_not_empty(album) ? album : _("Unknown Album"), NULL); need_gfree = TRUE; } else { node_data = string_is_not_empty(album) ? (gchar *)album : _("Unknown Album"); } break; case NODE_GENRE: node_pixbuf = clibrary->pixbuf_genre; node_data = string_is_not_empty(genre) ? (gchar *)genre : _("Unknown Genre"); break; case NODE_CATEGORY: case NODE_FOLDER: case NODE_PLAYLIST: case NODE_RADIO: case NODE_BASENAME: default: g_warning("add_by_tag: Bad node type."); break; } /* Find / add child node if it's not already added */ if (node_type != NODE_TRACK) { if (!find_child_node(node_data, &search_iter, p_iter, model)) { library_store_prepend_node(model, &iter, p_iter, node_pixbuf, node_data, node_type, 0); p_iter = &iter; } else { iter2 = search_iter; p_iter = &iter2; } } else { library_store_prepend_node(model, &iter, p_iter, node_pixbuf, node_data, NODE_TRACK, location_id); } /* Free node_data if needed */ if (need_gfree) { need_gfree = FALSE; g_free(node_data); } node_level++; } } GString * append_pragha_uri_string_list(GtkTreeIter *r_iter, GString *list, GtkTreeModel *model) { GtkTreeIter t_iter; LibraryNodeType node_type = 0; gint location_id; gchar *data, *uri = NULL; gboolean valid; gtk_tree_model_get(model, r_iter, L_NODE_TYPE, &node_type, -1); switch (node_type) { case NODE_CATEGORY: case NODE_FOLDER: case NODE_GENRE: case NODE_ARTIST: case NODE_ALBUM: valid = gtk_tree_model_iter_children(model, &t_iter, r_iter); while (valid) { list = append_pragha_uri_string_list(&t_iter, list, model); valid = gtk_tree_model_iter_next(model, &t_iter); } pragha_process_gtk_events (); break; case NODE_TRACK: case NODE_BASENAME: gtk_tree_model_get(model, r_iter, L_LOCATION_ID, &location_id, -1); uri = g_strdup_printf("Location:/%d", location_id); break; case NODE_PLAYLIST: gtk_tree_model_get(model, r_iter, L_NODE_DATA, &data, -1); uri = g_strdup_printf("Playlist:/%s", data); g_free(data); break; case NODE_RADIO: gtk_tree_model_get(model, r_iter, L_NODE_DATA, &data, -1); uri = g_strdup_printf("Radio:/%s", data); g_free(data); break; default: break; } if(uri) { g_string_append (list, uri); g_string_append (list, "\r\n"); g_free(uri); } return list; } static GString * append_uri_string_list(GtkTreeIter *r_iter, GString *list, GtkTreeModel *model, PraghaLibraryPane *clibrary) { GtkTreeIter t_iter; LibraryNodeType node_type = 0; gint location_id; gchar *filename = NULL, *uri = NULL; gboolean valid; gtk_tree_model_get(model, r_iter, L_NODE_TYPE, &node_type, -1); switch (node_type) { case NODE_CATEGORY: case NODE_FOLDER: case NODE_GENRE: case NODE_ARTIST: case NODE_ALBUM: valid = gtk_tree_model_iter_children(model, &t_iter, r_iter); while (valid) { list = append_uri_string_list(&t_iter, list, model, clibrary); valid = gtk_tree_model_iter_next(model, &t_iter); } pragha_process_gtk_events (); break; case NODE_TRACK: case NODE_BASENAME: gtk_tree_model_get(model, r_iter, L_LOCATION_ID, &location_id, -1); filename = pragha_database_get_filename_from_location_id(clibrary->cdbase, location_id); break; case NODE_PLAYLIST: case NODE_RADIO: g_message("Drag Radios and Playlist not yet implemented"); break; default: break; } if(filename) { uri = g_filename_to_uri(filename, NULL, NULL); if(uri) { g_string_append (list, uri); g_string_append (list, "\r\n"); g_free(uri); } g_free(filename); } return list; } /* Append to the given array the location ids of all the nodes under the given path */ static void get_location_ids(GtkTreePath *path, GArray *loc_arr, GtkTreeModel *model, PraghaLibraryPane *clibrary) { GtkTreeIter t_iter, r_iter; LibraryNodeType node_type = 0; gint location_id; gint j = 0; clibrary->view_change = TRUE; gtk_tree_model_get_iter(model, &r_iter, path); /* If this path is a track, just append it to the array */ gtk_tree_model_get(model, &r_iter, L_NODE_TYPE, &node_type, -1); if ((node_type == NODE_TRACK) || (node_type == NODE_BASENAME)) { gtk_tree_model_get(model, &r_iter, L_LOCATION_ID, &location_id, -1); g_array_append_val(loc_arr, location_id); } /* For all other node types do a recursive add */ while (gtk_tree_model_iter_nth_child(model, &t_iter, &r_iter, j++)) { gtk_tree_model_get(model, &t_iter, L_NODE_TYPE, &node_type, -1); if ((node_type == NODE_TRACK) || (node_type == NODE_BASENAME)) { gtk_tree_model_get(model, &t_iter, L_LOCATION_ID, &location_id, -1); g_array_append_val(loc_arr, location_id); } else { path = gtk_tree_model_get_path(model, &t_iter); get_location_ids(path, loc_arr, model, clibrary); gtk_tree_path_free(path); } } clibrary->view_change = FALSE; } /* Add all the tracks under the given path to the current playlist */ GList * append_library_row_to_mobj_list(PraghaDatabase *cdbase, GtkTreePath *path, GtkTreeModel *row_model, GList *list) { GtkTreeIter t_iter, r_iter; LibraryNodeType node_type = 0; gint location_id; PraghaMusicobject *mobj = NULL; gchar *data = NULL; gint j = 0; /* If this path is a track, just append it to the current playlist */ gtk_tree_model_get_iter(row_model, &r_iter, path); gtk_tree_model_get(row_model, &r_iter, L_NODE_TYPE, &node_type, -1); gtk_tree_model_get(row_model, &r_iter, L_LOCATION_ID, &location_id, -1); gtk_tree_model_get(row_model, &r_iter, L_NODE_DATA, &data, -1); switch (node_type) { case NODE_CATEGORY: case NODE_FOLDER: case NODE_GENRE: case NODE_ARTIST: case NODE_ALBUM: /* For all other node types do a recursive add */ while (gtk_tree_model_iter_nth_child(row_model, &t_iter, &r_iter, j++)) { path = gtk_tree_model_get_path(row_model, &t_iter); list = append_library_row_to_mobj_list(cdbase, path, row_model, list); gtk_tree_path_free(path); } break; case NODE_TRACK: case NODE_BASENAME: mobj = new_musicobject_from_db(cdbase, location_id); if (G_LIKELY(mobj)) list = g_list_append(list, mobj); break; case NODE_PLAYLIST: list = add_playlist_to_mobj_list(cdbase, data, list); break; case NODE_RADIO: list = add_radio_to_mobj_list(cdbase, data, list); break; default: break; } g_free(data); return list; } static void delete_row_from_db(PraghaDatabase *cdbase, GtkTreePath *path, GtkTreeModel *model) { GtkTreeIter t_iter, r_iter; LibraryNodeType node_type = 0; gboolean valid; gint location_id; /* If this path is a track, delete it immediately */ gtk_tree_model_get_iter(model, &r_iter, path); gtk_tree_model_get(model, &r_iter, L_NODE_TYPE, &node_type, -1); if ((node_type == NODE_TRACK) || (node_type == NODE_BASENAME)) { gtk_tree_model_get(model, &r_iter, L_LOCATION_ID, &location_id, -1); pragha_database_forget_location(cdbase, location_id); } /* For all other node types do a recursive deletion */ valid = gtk_tree_model_iter_children(model, &t_iter, &r_iter); while (valid) { gtk_tree_model_get(model, &t_iter, L_NODE_TYPE, &node_type, -1); if ((node_type == NODE_TRACK) || (node_type == NODE_BASENAME)) { gtk_tree_model_get(model, &t_iter, L_LOCATION_ID, &location_id, -1); pragha_database_forget_location(cdbase, location_id); } else { path = gtk_tree_model_get_path(model, &t_iter); delete_row_from_db(cdbase, path, model); gtk_tree_path_free(path); } valid = gtk_tree_model_iter_next(model, &t_iter); } } static void trash_or_unlink_row (GArray *loc_arr, gboolean unlink, PraghaLibraryPane *library) { GtkWidget *question_dialog; gchar *primary, *secondary, *filename = NULL; gint response, location_id = 0; guint i; gboolean deleted = FALSE; GError *error = NULL; GFile *file = NULL; if (!loc_arr) return; for(i = 0; i < loc_arr->len; i++) { location_id = g_array_index(loc_arr, gint, i); if (location_id) { filename = pragha_database_get_filename_from_location_id (library->cdbase, location_id); if (filename && g_file_test(filename, G_FILE_TEST_EXISTS)) { file = g_file_new_for_path(filename); if(!unlink && !(deleted = g_file_trash(file, NULL, &error))) { primary = g_strdup (_("File can't be moved to trash. Delete permanently?")); secondary = g_strdup_printf (_("The file \"%s\" cannot be moved to the trash. Details: %s"), g_file_get_basename (file), error->message); question_dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(library))), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", primary); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (question_dialog), "%s", secondary); gtk_dialog_add_button (GTK_DIALOG (question_dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); if (loc_arr->len > 1) { gtk_dialog_add_button (GTK_DIALOG (question_dialog), PRAGHA_BUTTON_SKIP, PRAGHA_RESPONSE_SKIP); gtk_dialog_add_button (GTK_DIALOG (question_dialog), PRAGHA_BUTTON_SKIP_ALL, PRAGHA_RESPONSE_SKIP_ALL); gtk_dialog_add_button (GTK_DIALOG (question_dialog), PRAGHA_BUTTON_DELETE_ALL, PRAGHA_RESPONSE_DELETE_ALL); } gtk_dialog_add_button (GTK_DIALOG (question_dialog), _("_Delete"), GTK_RESPONSE_ACCEPT); response = gtk_dialog_run (GTK_DIALOG (question_dialog)); gtk_widget_destroy (question_dialog); g_free (primary); g_free (secondary); g_error_free (error); error = NULL; switch (response) { case PRAGHA_RESPONSE_DELETE_ALL: unlink = TRUE; break; case GTK_RESPONSE_ACCEPT: g_unlink(filename); deleted = TRUE; break; case PRAGHA_RESPONSE_SKIP: break; case PRAGHA_RESPONSE_SKIP_ALL: case GTK_RESPONSE_CANCEL: case GTK_RESPONSE_DELETE_EVENT: default: return; } } if(unlink) { g_unlink(filename); deleted = TRUE; } g_object_unref(G_OBJECT(file)); } if (deleted) { pragha_database_forget_location (library->cdbase, location_id); } } } } /******************/ /* Event handlers */ /******************/ static void library_tree_row_activated_cb (GtkTreeView *library_tree, GtkTreePath *path, GtkTreeViewColumn *column, PraghaLibraryPane *library) { GtkTreeIter iter; GtkTreeModel *filter_model; LibraryNodeType node_type; filter_model = gtk_tree_view_get_model (GTK_TREE_VIEW(library->library_tree)); gtk_tree_model_get_iter (filter_model, &iter, path); gtk_tree_model_get (filter_model, &iter, L_NODE_TYPE, &node_type, -1); switch(node_type) { case NODE_CATEGORY: case NODE_ARTIST: case NODE_ALBUM: case NODE_GENRE: case NODE_FOLDER: if (!gtk_tree_view_row_expanded (GTK_TREE_VIEW(library->library_tree), path)) gtk_tree_view_expand_row (GTK_TREE_VIEW(library->library_tree), path, TRUE); else gtk_tree_view_collapse_row (GTK_TREE_VIEW(library->library_tree), path); break; case NODE_TRACK: case NODE_BASENAME: case NODE_PLAYLIST: case NODE_RADIO: g_signal_emit (library, signals[LIBRARY_APPEND_PLAYLIST], 0); break; default: break; } } static int library_tree_key_press (GtkWidget *win, GdkEventKey *event, PraghaLibraryPane *library) { if (event->state != 0 && ((event->state & GDK_CONTROL_MASK) || (event->state & GDK_MOD1_MASK) || (event->state & GDK_MOD3_MASK) || (event->state & GDK_MOD4_MASK) || (event->state & GDK_MOD5_MASK))) return FALSE; if (event->keyval == GDK_KEY_Delete){ pragha_library_pane_delete_from_db_action (NULL, library); return TRUE; } return FALSE; } /*****************/ /* DnD functions */ /*****************/ /* These two functions are only callbacks that must be passed to gtk_tree_selection_set_select_function() to chose if GTK is allowed to change selection itself or if we handle it ourselves */ static gboolean pragha_library_pane_selection_func_true(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer data) { return TRUE; } static gboolean pragha_library_pane_selection_func_false(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer data) { return FALSE; } static gboolean library_tree_button_press_cb (GtkWidget *widget, GdkEventButton *event, PraghaLibraryPane *library) { GtkWidget *popup_menu, *item_widget; GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; GtkTreeSelection *selection; gboolean many_selected = FALSE; LibraryNodeType node_type; gint n_select = 0; model = gtk_tree_view_get_model (GTK_TREE_VIEW(library->library_tree)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(library->library_tree)); if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), (gint) event->x,(gint) event->y, &path, NULL, NULL, NULL)){ switch(event->button) { case 1: if (gtk_tree_selection_path_is_selected(selection, path) && !(event->state & GDK_CONTROL_MASK) && !(event->state & GDK_SHIFT_MASK)) { gtk_tree_selection_set_select_function(selection, &pragha_library_pane_selection_func_false, NULL, NULL); } else { gtk_tree_selection_set_select_function(selection, &pragha_library_pane_selection_func_true, NULL, NULL); } break; case 2: if (!gtk_tree_selection_path_is_selected(selection, path)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); } g_signal_emit (library, signals[LIBRARY_APPEND_PLAYLIST], 0); break; case 3: if (!(gtk_tree_selection_path_is_selected(selection, path))){ gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); } gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, L_NODE_TYPE, &node_type, -1); n_select = gtk_tree_selection_count_selected_rows(selection); if (node_type == NODE_PLAYLIST || node_type == NODE_RADIO) { popup_menu = gtk_ui_manager_get_widget(library->library_tree_context_menu, "/PlaylistPopup"); item_widget = gtk_ui_manager_get_widget(library->library_tree_context_menu, "/PlaylistPopup/Rename"); gtk_widget_set_sensitive (GTK_WIDGET(item_widget), n_select == 1 && gtk_tree_path_get_depth(path) > 1); item_widget = gtk_ui_manager_get_widget(library->library_tree_context_menu, "/PlaylistPopup/Delete"); gtk_widget_set_sensitive (GTK_WIDGET(item_widget), gtk_tree_path_get_depth(path) > 1); item_widget = gtk_ui_manager_get_widget(library->library_tree_context_menu, "/PlaylistPopup/Export"); gtk_widget_set_sensitive (GTK_WIDGET(item_widget), n_select == 1 && gtk_tree_path_get_depth(path) > 1 && node_type == NODE_PLAYLIST); } else { if (gtk_tree_path_get_depth(path) > 1) popup_menu = gtk_ui_manager_get_widget(library->library_tree_context_menu, "/LibraryPopup"); else popup_menu = gtk_ui_manager_get_widget(library->library_tree_context_menu, "/CategoriesPopup"); } gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, event->button, event->time); /* If more than one track is selected, don't propagate event */ if (n_select > 1) many_selected = TRUE; else many_selected = FALSE; break; default: many_selected = FALSE; break; } gtk_tree_path_free(path); } else gtk_tree_selection_unselect_all(selection); return many_selected; } static gboolean library_tree_button_release_cb (GtkWidget *widget, GdkEventButton *event, PraghaLibraryPane *library) { GtkTreeSelection *selection; GtkTreePath *path; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(library->library_tree)); if((event->state & GDK_CONTROL_MASK) || (event->state & GDK_SHIFT_MASK) || (library->dragging == TRUE) || (event->button!=1)){ gtk_tree_selection_set_select_function(selection, &pragha_library_pane_selection_func_true, NULL, NULL); library->dragging = FALSE; return FALSE; } gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), (gint) event->x,(gint) event->y, &path, NULL, NULL, NULL); if (path){ gtk_tree_selection_set_select_function(selection, &pragha_library_pane_selection_func_true, NULL, NULL); gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); gtk_tree_path_free(path); } return FALSE; } /*******/ /* DnD */ /*******/ static gboolean dnd_library_tree_begin(GtkWidget *widget, GdkDragContext *context, PraghaLibraryPane *clibrary) { clibrary->dragging = TRUE; return FALSE; } gboolean gtk_selection_data_set_pragha_uris (GtkSelectionData *selection_data, GString *list) { gchar *result; gsize length; result = g_convert (list->str, list->len, "ASCII", "UTF-8", NULL, &length, NULL); if (result) { gtk_selection_data_set (selection_data, gtk_selection_data_get_target(selection_data), 8, (guchar *) result, length); g_free (result); return TRUE; } return FALSE; } /* Callback for DnD signal 'drag-data-get' */ static void dnd_library_tree_get(GtkWidget *widget, GdkDragContext *context, GtkSelectionData *data, PraghaDndTarget info, guint time, PraghaLibraryPane *clibrary) { GtkTreeSelection *selection; GtkTreeModel *model; GList *list = NULL, *l; GString *rlist; GtkTreeIter s_iter; switch(info) { case TARGET_REF_LIBRARY: rlist = g_string_new (NULL); set_watch_cursor (GTK_WIDGET(clibrary)); clibrary->view_change = TRUE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW( clibrary->library_tree)); list = gtk_tree_selection_get_selected_rows(selection, &model); l = list; while(l) { if(gtk_tree_model_get_iter(model, &s_iter, l->data)) rlist = append_pragha_uri_string_list(&s_iter, rlist, model); gtk_tree_path_free(l->data); l = l->next; } clibrary->view_change = FALSE; remove_watch_cursor (GTK_WIDGET(clibrary)); gtk_selection_data_set_pragha_uris(data, rlist); g_list_free(list); g_string_free (rlist, TRUE); break; case TARGET_URI_LIST: rlist = g_string_new (NULL); set_watch_cursor (GTK_WIDGET(clibrary)); clibrary->view_change = TRUE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW( clibrary->library_tree)); list = gtk_tree_selection_get_selected_rows(selection, &model); l = list; while(l) { if(gtk_tree_model_get_iter(model, &s_iter, l->data)) rlist = append_uri_string_list(&s_iter, rlist, model, clibrary); l = l->next; } clibrary->view_change = FALSE; remove_watch_cursor (GTK_WIDGET(clibrary)); gtk_selection_data_set_pragha_uris(data, rlist); g_list_free(list); g_string_free (rlist, TRUE); break; case TARGET_PLAIN_TEXT: default: g_warning("Unknown DND type"); break; } } static const GtkTargetEntry lentries[] = { {"REF_LIBRARY", GTK_TARGET_SAME_APP, TARGET_REF_LIBRARY}, {"text/uri-list", GTK_TARGET_OTHER_APP, TARGET_URI_LIST}, {"text/plain", GTK_TARGET_OTHER_APP, TARGET_PLAIN_TEXT} }; static void library_pane_init_dnd(PraghaLibraryPane *clibrary) { /* Source: Library View */ gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(clibrary->library_tree), GDK_BUTTON1_MASK, lentries, G_N_ELEMENTS(lentries), GDK_ACTION_COPY); g_signal_connect(G_OBJECT(GTK_WIDGET(clibrary->library_tree)), "drag-begin", G_CALLBACK(dnd_library_tree_begin), clibrary); g_signal_connect(G_OBJECT(clibrary->library_tree), "drag-data-get", G_CALLBACK(dnd_library_tree_get), clibrary); } /**********/ /* Search */ /**********/ static gboolean set_all_visible(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { gtk_tree_store_set(GTK_TREE_STORE(model), iter, L_MACH, FALSE, L_VISIBILE, TRUE, -1); return FALSE; } static void library_expand_filtered_tree_func(GtkTreeView *view, GtkTreePath *path, gpointer data) { GtkTreeIter iter; LibraryNodeType node_type; gboolean node_mach; GtkTreeModel *filter_model = data; /* Collapse any non-leaf node that matches the seach entry */ gtk_tree_model_get_iter(filter_model, &iter, path); gtk_tree_model_get(filter_model, &iter, L_MACH, &node_mach, -1); if (node_mach) { gtk_tree_model_get(filter_model, &iter, L_NODE_TYPE, &node_type, -1); if ((node_type != NODE_TRACK) && (node_type != NODE_BASENAME)) gtk_tree_view_collapse_row(view, path); } } static void set_visible_parents_nodes(GtkTreeModel *model, GtkTreeIter *c_iter) { GtkTreeIter t_iter, parent; t_iter = *c_iter; while(gtk_tree_model_iter_parent(model, &parent, &t_iter)) { gtk_tree_store_set(GTK_TREE_STORE(model), &parent, L_VISIBILE, TRUE, -1); t_iter = parent; } } static gboolean any_parent_node_mach(GtkTreeModel *model, GtkTreeIter *iter) { GtkTreeIter t_iter, parent; gboolean p_mach = FALSE; t_iter = *iter; while(gtk_tree_model_iter_parent(model, &parent, &t_iter)) { gtk_tree_model_get(model, &parent, L_MACH, &p_mach, -1); if (p_mach) return TRUE; t_iter = parent; } return FALSE; } static gboolean filter_tree_func(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { PraghaLibraryPane *clibrary = data; gchar *node_data = NULL, *u_str; gboolean p_mach; /* Mark node and its parents visible if search entry matches. If search entry doesn't match, check if _any_ ancestor has been marked as visible and if so, mark current node as visible too. */ if (clibrary->filter_entry) { gtk_tree_model_get(model, iter, L_NODE_DATA, &node_data, -1); u_str = g_utf8_strdown(node_data, -1); if (pragha_strstr_lv(u_str, clibrary->filter_entry, clibrary->preferences)) { /* Set visible the match row */ gtk_tree_store_set(GTK_TREE_STORE(model), iter, L_MACH, TRUE, L_VISIBILE, TRUE, -1); /* Also set visible the parents */ set_visible_parents_nodes(model, iter); } else { /* Check parents. If any node is visible due it mach, * also shows. So, show the children of coincidences. */ p_mach = any_parent_node_mach(model, iter); gtk_tree_store_set(GTK_TREE_STORE(model), iter, L_MACH, FALSE, L_VISIBILE, p_mach, -1); } g_free(u_str); g_free(node_data); } else return TRUE; return FALSE; } gboolean do_refilter(PraghaLibraryPane *clibrary) { GtkTreeModel *filter_model; /* Remove the model of widget. */ filter_model = gtk_tree_view_get_model(GTK_TREE_VIEW(clibrary->library_tree)); g_object_ref(filter_model); gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), NULL); /* Set visibility of rows in the library store. */ gtk_tree_model_foreach(GTK_TREE_MODEL(clibrary->library_store), filter_tree_func, clibrary); /* Set the model again.*/ gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), filter_model); g_object_unref(filter_model); /* Expand all and then reduce properly. */ gtk_tree_view_expand_all(GTK_TREE_VIEW(clibrary->library_tree)); gtk_tree_view_map_expanded_rows(GTK_TREE_VIEW(clibrary->library_tree), library_expand_filtered_tree_func, filter_model); clibrary->timeout_id = 0; return FALSE; } void queue_refilter (PraghaLibraryPane *clibrary) { if (clibrary->timeout_id) { g_source_remove (clibrary->timeout_id); clibrary->timeout_id = 0; } clibrary->timeout_id = g_timeout_add(500, (GSourceFunc)do_refilter, clibrary); } static void simple_library_search_keyrelease_handler (GtkEntry *entry, PraghaLibraryPane *clibrary) { const gchar *text = NULL; gboolean has_text; if (!pragha_preferences_get_instant_search(clibrary->preferences)) return; if (clibrary->filter_entry != NULL) { g_free (clibrary->filter_entry); clibrary->filter_entry = NULL; } has_text = gtk_entry_get_text_length (GTK_ENTRY(entry)) > 0; if (has_text) { text = gtk_entry_get_text (entry); clibrary->filter_entry = g_utf8_strdown (text, -1); queue_refilter(clibrary); } else { clear_library_search (clibrary); } } gboolean simple_library_search_activate_handler(GtkEntry *entry, PraghaLibraryPane *clibrary) { const gchar *text = NULL; gboolean has_text; has_text = gtk_entry_get_text_length (GTK_ENTRY(entry)) > 0; if (clibrary->filter_entry != NULL) { g_free (clibrary->filter_entry); clibrary->filter_entry = NULL; } if (has_text) { text = gtk_entry_get_text (entry); clibrary->filter_entry = g_utf8_strdown (text, -1); do_refilter (clibrary); } else { clear_library_search (clibrary); } return FALSE; } void pragha_library_expand_categories(PraghaLibraryPane *clibrary) { GtkTreeModel *filter_model, *model; GtkTreePath *path; GtkTreeIter iter; gboolean valid, visible; filter_model = gtk_tree_view_get_model(GTK_TREE_VIEW(clibrary->library_tree)); model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)); valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { visible = gtk_tree_model_iter_has_child(model, &iter); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, L_VISIBILE, visible, -1); path = gtk_tree_model_get_path(model, &iter); gtk_tree_view_expand_row (GTK_TREE_VIEW(clibrary->library_tree), path, FALSE); gtk_tree_path_free(path); valid = gtk_tree_model_iter_next(model, &iter); } } void clear_library_search(PraghaLibraryPane *clibrary) { GtkTreeModel *filter_model; /* Remove the model of widget. */ filter_model = gtk_tree_view_get_model(GTK_TREE_VIEW(clibrary->library_tree)); g_object_ref(filter_model); gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), NULL); /* Set all nodes visibles. */ gtk_tree_model_foreach(GTK_TREE_MODEL(clibrary->library_store), set_all_visible, clibrary); /* Set the model again. */ gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), filter_model); g_object_unref(filter_model); /* Expand the categories. */ pragha_library_expand_categories(clibrary); } /* * Return if you must update the library according to the changes, and the current view. */ gboolean pragha_library_need_update_view(PraghaPreferences *preferences, gint changed) { gboolean need_update = FALSE; switch (pragha_preferences_get_library_style(preferences)) { case FOLDERS: break; case ARTIST: need_update = ((changed & TAG_ARTIST_CHANGED) || (changed & TAG_TITLE_CHANGED)); break; case ALBUM: need_update = ((changed & TAG_ALBUM_CHANGED) || (pragha_preferences_get_sort_by_year(preferences) && (changed & TAG_YEAR_CHANGED)) || (changed & TAG_TITLE_CHANGED)); break; case GENRE: need_update = ((changed & TAG_GENRE_CHANGED) || (changed & TAG_TITLE_CHANGED)); break; case ARTIST_ALBUM: need_update = ((changed & TAG_ARTIST_CHANGED) || (changed & TAG_ALBUM_CHANGED) || (pragha_preferences_get_sort_by_year(preferences) && (changed & TAG_YEAR_CHANGED)) || (changed & TAG_TITLE_CHANGED)); break; case GENRE_ARTIST: need_update = ((changed & TAG_GENRE_CHANGED) || (changed & TAG_ARTIST_CHANGED) || (changed & TAG_TITLE_CHANGED)); break; case GENRE_ALBUM: need_update = ((changed & TAG_GENRE_CHANGED) || (changed & TAG_ALBUM_CHANGED) || (pragha_preferences_get_sort_by_year(preferences) && (changed & TAG_YEAR_CHANGED)) || (changed & TAG_TITLE_CHANGED)); break; case GENRE_ARTIST_ALBUM: need_update = ((changed & TAG_GENRE_CHANGED) || (changed & TAG_ARTIST_CHANGED) || (changed & TAG_ALBUM_CHANGED) || (pragha_preferences_get_sort_by_year(preferences) && (changed & TAG_YEAR_CHANGED)) || (changed & TAG_TITLE_CHANGED)); break; default: break; } return need_update; } gboolean pragha_library_need_update(PraghaLibraryPane *clibrary, gint changed) { return pragha_library_need_update_view(clibrary->preferences, changed); } /********************************/ /* Library view order selection */ /********************************/ static void library_pane_update_style (PraghaLibraryPane *library) { g_slist_free (library->library_tree_nodes); library->library_tree_nodes = NULL; switch (pragha_preferences_get_library_style(library->preferences)) { case FOLDERS: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_FOLDER)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_BASENAME)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Folders structure")); break; case ARTIST: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ARTIST)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Artist")); break; case ALBUM: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ALBUM)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Album")); break; case GENRE: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_GENRE)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Genre")); break; case ARTIST_ALBUM: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ARTIST)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ALBUM)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Artist / Album")); break; case GENRE_ARTIST: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_GENRE)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ARTIST)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Genre / Artist")); break; case GENRE_ALBUM: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_GENRE)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ALBUM)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Genre / Album")); break; case GENRE_ARTIST_ALBUM: library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_GENRE)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ARTIST)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_ALBUM)); library->library_tree_nodes = g_slist_append(library->library_tree_nodes, GINT_TO_POINTER(NODE_TRACK)); gtk_label_set_text (GTK_LABEL(library->pane_title), _("Genre / Artist / Album")); break; default: break; } } static void library_pane_change_style (GObject *gobject, GParamSpec *pspec, PraghaLibraryPane *library) { library_pane_update_style (library); library_pane_view_reload (library); } /*********************************/ /* Functions to reload playlist. */ /*********************************/ static void library_view_append_playlists(GtkTreeModel *model, GtkTreeIter *p_iter, PraghaLibraryPane *clibrary) { PraghaPreparedStatement *statement; const gchar *sql = NULL, *playlist = NULL; GtkTreeIter iter; sql = "SELECT name FROM PLAYLIST WHERE name != ? ORDER BY name COLLATE NOCASE DESC"; statement = pragha_database_create_statement (clibrary->cdbase, sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { playlist = pragha_prepared_statement_get_string(statement, 0); library_store_prepend_node(model, &iter, p_iter, clibrary->pixbuf_track, playlist, NODE_PLAYLIST, 0); pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); } static void library_view_append_radios(GtkTreeModel *model, GtkTreeIter *p_iter, PraghaLibraryPane *clibrary) { PraghaPreparedStatement *statement; const gchar *sql = NULL, *radio = NULL; GtkTreeIter iter; sql = "SELECT name FROM RADIO ORDER BY name COLLATE NOCASE DESC"; statement = pragha_database_create_statement (clibrary->cdbase, sql); while (pragha_prepared_statement_step (statement)) { radio = pragha_prepared_statement_get_string(statement, 0); library_store_prepend_node(model, &iter, p_iter, clibrary->pixbuf_track, radio, NODE_RADIO, 0); pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); } void library_view_complete_folder_view(GtkTreeModel *model, GtkTreeIter *p_iter, PraghaLibraryPane *clibrary) { PraghaPreparedStatement *statement; const gchar *sql = NULL, *filepath = NULL; gchar *mask = NULL; GtkTreeIter iter, *f_iter; GSList *list = NULL, *library_dir = NULL; library_dir = pragha_preferences_get_library_list (clibrary->preferences); for(list = library_dir ; list != NULL ; list=list->next) { /*If no need to fuse folders, add headers and set p_iter */ if(!pragha_preferences_get_fuse_folders(clibrary->preferences)) { gtk_tree_store_append(GTK_TREE_STORE(model), &iter, p_iter); gtk_tree_store_set (GTK_TREE_STORE(model), &iter, L_PIXBUF, clibrary->pixbuf_dir, L_NODE_DATA, list->data, L_NODE_BOLD, PANGO_WEIGHT_NORMAL, L_NODE_TYPE, NODE_FOLDER, L_LOCATION_ID, 0, L_MACH, FALSE, L_VISIBILE, TRUE, -1); f_iter = &iter; } else { f_iter = p_iter; } sql = "SELECT name, id FROM LOCATION WHERE name LIKE ? ORDER BY name DESC"; statement = pragha_database_create_statement (clibrary->cdbase, sql); mask = g_strconcat (list->data, "%", NULL); pragha_prepared_statement_bind_string (statement, 1, mask); while (pragha_prepared_statement_step (statement)) { filepath = pragha_prepared_statement_get_string(statement, 0) + strlen(list->data) + 1; add_folder_file(model, filepath, pragha_prepared_statement_get_int(statement, 1), f_iter, clibrary); pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); g_free(mask); } free_str_list(library_dir); } void library_view_complete_tags_view(GtkTreeModel *model, GtkTreeIter *p_iter, PraghaLibraryPane *clibrary) { PraghaPreparedStatement *statement; gchar *order_str = NULL, *sql = NULL; /* Get order needed to sqlite query. */ switch(pragha_preferences_get_library_style(clibrary->preferences)) { case FOLDERS: break; case ARTIST: order_str = g_strdup("ARTIST.name COLLATE NOCASE DESC, TRACK.title COLLATE NOCASE DESC"); break; case ALBUM: if (pragha_preferences_get_sort_by_year(clibrary->preferences)) order_str = g_strdup("YEAR.year COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.title COLLATE NOCASE DESC"); else order_str = g_strdup("ALBUM.name COLLATE NOCASE DESC, TRACK.title COLLATE NOCASE DESC"); break; case GENRE: order_str = g_strdup("GENRE.name COLLATE NOCASE DESC, TRACK.title COLLATE NOCASE DESC"); break; case ARTIST_ALBUM: if (pragha_preferences_get_sort_by_year(clibrary->preferences)) order_str = g_strdup("ARTIST.name COLLATE NOCASE DESC, YEAR.year COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.track_no COLLATE NOCASE DESC"); else order_str = g_strdup("ARTIST.name COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.track_no COLLATE NOCASE DESC"); break; case GENRE_ARTIST: order_str = g_strdup("GENRE.name COLLATE NOCASE DESC, ARTIST.name COLLATE NOCASE DESC, TRACK.title COLLATE NOCASE DESC"); break; case GENRE_ALBUM: if (pragha_preferences_get_sort_by_year(clibrary->preferences)) order_str = g_strdup("GENRE.name COLLATE NOCASE DESC, YEAR.year COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.track_no COLLATE NOCASE DESC"); else order_str = g_strdup("GENRE.name COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.track_no COLLATE NOCASE DESC"); break; case GENRE_ARTIST_ALBUM: if (pragha_preferences_get_sort_by_year(clibrary->preferences)) order_str = g_strdup("GENRE.name COLLATE NOCASE DESC, ARTIST.name COLLATE NOCASE DESC, YEAR.year COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.track_no COLLATE NOCASE DESC"); else order_str = g_strdup("GENRE.name COLLATE NOCASE DESC, ARTIST.name COLLATE NOCASE DESC, ALBUM.name COLLATE NOCASE DESC, TRACK.track_no COLLATE NOCASE DESC"); break; default: break; } /* Common query for all tag based library views */ sql = g_strdup_printf("SELECT TRACK.title, ARTIST.name, YEAR.year, ALBUM.name, GENRE.name, LOCATION.name, LOCATION.id " "FROM TRACK, ARTIST, YEAR, ALBUM, GENRE, LOCATION " "WHERE ARTIST.id = TRACK.artist AND TRACK.year = YEAR.id AND ALBUM.id = TRACK.album AND GENRE.id = TRACK.genre AND LOCATION.id = TRACK.location " "ORDER BY %s;", order_str); statement = pragha_database_create_statement (clibrary->cdbase, sql); while (pragha_prepared_statement_step (statement)) { add_child_node_by_tags(model, p_iter, pragha_prepared_statement_get_int(statement, 6), pragha_prepared_statement_get_string(statement, 5), pragha_prepared_statement_get_string(statement, 4), pragha_prepared_statement_get_string(statement, 3), pragha_prepared_statement_get_string(statement, 2), pragha_prepared_statement_get_string(statement, 1), pragha_prepared_statement_get_string(statement, 0), clibrary); /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); g_free(order_str); g_free(sql); } void library_pane_view_reload(PraghaLibraryPane *clibrary) { GtkTreeModel *model, *filter_model; GtkTreeIter iter; clibrary->view_change = TRUE; set_watch_cursor (GTK_WIDGET(clibrary)); filter_model = gtk_tree_view_get_model(GTK_TREE_VIEW(clibrary->library_tree)); model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)); g_object_ref(filter_model); gtk_widget_set_sensitive(GTK_WIDGET(GTK_WIDGET(clibrary)), FALSE); gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), NULL); gtk_tree_store_clear(GTK_TREE_STORE(model)); /* Playlists.*/ gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, L_PIXBUF, clibrary->pixbuf_dir, L_NODE_DATA, _("Playlists"), L_NODE_BOLD, PANGO_WEIGHT_BOLD, L_NODE_TYPE, NODE_CATEGORY, L_MACH, FALSE, L_VISIBILE, TRUE, -1); library_view_append_playlists(model, &iter, clibrary); /* Radios. */ gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, L_PIXBUF, clibrary->pixbuf_dir, L_NODE_DATA, _("Radios"), L_NODE_BOLD, PANGO_WEIGHT_BOLD, L_NODE_TYPE, NODE_CATEGORY, L_MACH, FALSE, L_VISIBILE, TRUE, -1); library_view_append_radios(model, &iter, clibrary); /* Add library header */ gtk_tree_store_append(GTK_TREE_STORE(model), &iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(model), &iter, L_PIXBUF, clibrary->pixbuf_dir, L_NODE_DATA, _("Library"), L_NODE_BOLD, PANGO_WEIGHT_BOLD, L_NODE_TYPE, NODE_CATEGORY, L_MACH, FALSE, L_VISIBILE, TRUE, -1); if (pragha_preferences_get_library_style(clibrary->preferences) == FOLDERS) { library_view_complete_folder_view(model, &iter, clibrary); } else { library_view_complete_tags_view(model, &iter, clibrary); } /* Sensitive, set model and filter */ gtk_widget_set_sensitive(GTK_WIDGET(GTK_WIDGET(clibrary)), TRUE); gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), filter_model); g_object_unref(filter_model); if(gtk_entry_get_text_length (GTK_ENTRY(clibrary->search_entry))) g_signal_emit_by_name (G_OBJECT (clibrary->search_entry), "activate"); else pragha_library_expand_categories(clibrary); remove_watch_cursor (GTK_WIDGET(clibrary)); clibrary->view_change = FALSE; } static void update_library_playlist_changes (PraghaDatabase *database, PraghaLibraryPane *clibrary) { GtkTreeModel *model, *filter_model; GtkTreeIter c_iter, iter; clibrary->view_change = TRUE; set_watch_cursor (GTK_WIDGET(clibrary)); filter_model = gtk_tree_view_get_model(GTK_TREE_VIEW(clibrary->library_tree)); model = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(filter_model)); g_object_ref(filter_model); gtk_widget_set_sensitive(GTK_WIDGET(GTK_WIDGET(clibrary)), FALSE); gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), NULL); if(find_child_node(_("Playlists"), &c_iter, NULL, model)) { while (gtk_tree_model_iter_nth_child(model, &iter, &c_iter, 0)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); } library_view_append_playlists(model, &c_iter, clibrary); } if(find_child_node(_("Radios"), &c_iter, NULL, model)) { while (gtk_tree_model_iter_nth_child(model, &iter, &c_iter, 0)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &iter); } library_view_append_radios(model, &c_iter, clibrary); } gtk_widget_set_sensitive(GTK_WIDGET(GTK_WIDGET(clibrary)), TRUE); gtk_tree_view_set_model(GTK_TREE_VIEW(clibrary->library_tree), filter_model); g_object_unref(filter_model); if(gtk_entry_get_text_length (GTK_ENTRY(clibrary->search_entry))) g_signal_emit_by_name (G_OBJECT (clibrary->search_entry), "activate"); else pragha_library_expand_categories(clibrary); remove_watch_cursor (GTK_WIDGET(clibrary)); clibrary->view_change = FALSE; } static void update_library_tracks_changes(PraghaDatabase *database, PraghaLibraryPane *library) { /* * Rework to olny update library tree!!!. **/ library_pane_view_reload(library); } /*************************************/ /* All menu handlers of library pane */ /*************************************/ /* * library_pane_context_menu calbacks */ static void pragha_library_pane_expand_all_action (GtkAction *action, PraghaLibraryPane *library) { gtk_tree_view_expand_all(GTK_TREE_VIEW(library->library_tree)); } static void pragha_library_pane_collapse_all_action (GtkAction *action, PraghaLibraryPane *library) { gtk_tree_view_collapse_all(GTK_TREE_VIEW(library->library_tree)); } static void pragha_library_pane_set_folders_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, FOLDERS); } static void pragha_library_pane_set_artist_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, ARTIST); } static void pragha_library_pane_set_album_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, ALBUM); } static void pragha_library_pane_set_genre_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, GENRE); } static void pragha_library_pane_set_artist_album_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, ARTIST_ALBUM); } static void pragha_library_pane_set_genre_album_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, GENRE_ALBUM); } static void pragha_library_pane_set_genre_artist_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, GENRE_ARTIST); } static void pragha_library_pane_set_genre_artist_album_view_action (GtkAction *action, PraghaLibraryPane *library) { pragha_preferences_set_library_style(library->preferences, GENRE_ARTIST_ALBUM); } /* * library_tree_context_menu calbacks */ GList * pragha_library_pane_get_mobj_list (PraghaLibraryPane *library) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GList *mlist = NULL, *list, *i; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(library->library_tree)); list = gtk_tree_selection_get_selected_rows (selection, &model); if (list) { /* Add all the rows to the current playlist */ for (i = list; i != NULL; i = i->next) { path = i->data; mlist = append_library_row_to_mobj_list (library->cdbase, path, model, mlist); gtk_tree_path_free (path); /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } g_list_free (list); } return mlist; } static void pragha_library_pane_rename_item_action (GtkAction *action, PraghaLibraryPane *library) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; GList *list; gchar *playlist = NULL, *n_playlist = NULL; gint node_type; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(library->library_tree)); list = gtk_tree_selection_get_selected_rows(selection, &model); if (list) { path = list->data; if (gtk_tree_path_get_depth(path) > 1) { gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, L_NODE_DATA, &playlist, -1); n_playlist = rename_playlist_dialog (playlist, gtk_widget_get_toplevel(GTK_WIDGET(library))); if(n_playlist != NULL) { gtk_tree_model_get(model, &iter, L_NODE_TYPE, &node_type, -1); if(node_type == NODE_PLAYLIST) pragha_database_update_playlist_name (library->cdbase, playlist, n_playlist); else if (node_type == NODE_RADIO) pragha_database_update_radio_name (library->cdbase, playlist, n_playlist); pragha_database_change_playlists_done(library->cdbase); g_free(n_playlist); } g_free(playlist); } gtk_tree_path_free(path); } g_list_free(list); } static void pragha_library_pane_remove_item_action (GtkAction *action, PraghaLibraryPane *library) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; GList *list, *i; gchar *playlist; gint node_type; gboolean removed = FALSE; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(library->library_tree)); list = gtk_tree_selection_get_selected_rows (selection, &model); if (list) { /* Delete selected playlists */ for (i = list; i != NULL; i = i->next) { path = i->data; if (gtk_tree_path_get_depth(path) > 1) { gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, L_NODE_TYPE, &node_type, -1); gtk_tree_model_get(model, &iter, L_NODE_DATA, &playlist, -1); if (delete_existing_item_dialog(playlist, gtk_widget_get_toplevel(GTK_WIDGET(library)))) { if(node_type == NODE_PLAYLIST) { pragha_database_delete_playlist (library->cdbase, playlist); } else if (node_type == NODE_RADIO) { pragha_database_delete_radio (library->cdbase, playlist); } removed = TRUE; } g_free (playlist); } gtk_tree_path_free (path); } g_list_free (list); } if (removed) pragha_database_change_playlists_done (library->cdbase); } static void pragha_library_pane_export_playlist_action (GtkAction *action, PraghaLibraryPane *library) { GtkWidget *toplevel; GIOChannel *chan = NULL; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; GList *list, *i; GError *err = NULL; gint cnt; gchar *filename = NULL, *playlist = NULL, *playlistpath = NULL; gint node_type; model = gtk_tree_view_get_model (GTK_TREE_VIEW(library->library_tree)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(library->library_tree)); cnt = (gtk_tree_selection_count_selected_rows(selection)); list = gtk_tree_selection_get_selected_rows(selection, NULL); path = list->data; /* If only is 'Playlist' node, just return, else get playlistname. */ if ((cnt == 1) && (gtk_tree_path_get_depth(path) == 1)) { gtk_tree_path_free(path); g_list_free(list); return; } else { gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, L_NODE_DATA, &playlistpath, -1); gtk_tree_model_get(model, &iter, L_NODE_TYPE, &node_type, -1); if(node_type != NODE_PLAYLIST) { gtk_tree_path_free(path); g_list_free(list); return; } } toplevel = gtk_widget_get_toplevel(GTK_WIDGET(library)); filename = playlist_export_dialog_get_filename(playlistpath, toplevel); if (!filename) goto exit; chan = create_m3u_playlist(filename); if (!chan) { g_warning("Unable to create M3U playlist file: %s", filename); goto exit; } set_watch_cursor (toplevel); list = gtk_tree_selection_get_selected_rows(selection, NULL); if (list) { /* Export all the playlists to the given file */ for (i=list; i != NULL; i = i->next) { path = i->data; if (gtk_tree_path_get_depth(path) > 1) { gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, L_NODE_DATA, &playlist, -1); if (save_m3u_playlist(chan, playlist, filename, library->cdbase) < 0) { g_warning("Unable to save M3U playlist: %s", filename); g_free(playlist); goto exit_list; } g_free(playlist); } gtk_tree_path_free(path); /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } } if (chan) { if (g_io_channel_shutdown(chan, TRUE, &err) != G_IO_STATUS_NORMAL) { g_critical("Unable to save M3U playlist: %s", filename); g_error_free(err); err = NULL; } else { CDEBUG(DBG_INFO, "Saved M3U playlist: %s", filename); } g_io_channel_unref(chan); } exit_list: remove_watch_cursor (toplevel); if (list) g_list_free(list); exit: g_free(playlistpath); g_free(filename); } /* * library_tree_context_menu_xml calbacks */ static void pragha_library_pane_edit_tags_dialog_response (GtkWidget *dialog, gint response_id, PraghaLibraryPane *library) { PraghaMusicobject *nmobj; PraghaTagger *tagger; GArray *loc_arr = NULL; gint changed = 0, elem = 0, ielem; GtkWidget *toplevel; toplevel = gtk_widget_get_toplevel (GTK_WIDGET(library)); if (response_id == GTK_RESPONSE_HELP) { nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); pragha_track_properties_dialog(nmobj, toplevel); return; } loc_arr = g_object_get_data (G_OBJECT (dialog), "local-array"); if (response_id == GTK_RESPONSE_OK) { changed = pragha_tags_dialog_get_changed(PRAGHA_TAGS_DIALOG(dialog)); if(!changed) goto no_change; nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); /* Updata the db changes */ if(loc_arr) { if (changed & TAG_TNO_CHANGED) { if (loc_arr->len > 1) { if (!confirm_tno_multiple_tracks(pragha_musicobject_get_track_no(nmobj), toplevel)) return; } } if (changed & TAG_TITLE_CHANGED) { if (loc_arr->len > 1) { if (!confirm_title_multiple_tracks(pragha_musicobject_get_title(nmobj), toplevel)) return; } } tagger = pragha_tagger_new(); /* Get a array of files and update it */ for(ielem = 0; ielem < loc_arr->len; ielem++) { elem = g_array_index(loc_arr, gint, ielem); if (G_LIKELY(elem)) pragha_tagger_add_location_id(tagger, elem); } pragha_tagger_set_changes(tagger, nmobj, changed); pragha_tagger_apply_changes (tagger); g_object_unref(tagger); } } no_change: g_array_free (loc_arr, TRUE); gtk_widget_destroy (dialog); } static void pragha_library_pane_edit_tags_action (GtkAction *action, PraghaLibraryPane *library) { GtkWidget *dialog; LibraryNodeType node_type = 0; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; GList *list, *i; GArray *loc_arr = NULL; gint sel, location_id; gchar *node_data = NULL, **split_album = NULL; PraghaMusicobject *omobj = NULL; dialog = pragha_tags_dialog_new(); gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(library)))); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(library->library_tree)); sel = gtk_tree_selection_count_selected_rows(selection); list = gtk_tree_selection_get_selected_rows(selection, &model); /* Setup initial entries */ if (sel == 1) { path = list->data; if (!gtk_tree_model_get_iter(model, &iter, path)) goto exit; gtk_tree_model_get(model, &iter, L_NODE_TYPE, &node_type, -1); if (node_type == NODE_TRACK || node_type == NODE_BASENAME) { gtk_tree_model_get(model, &iter, L_LOCATION_ID, &location_id, -1); omobj = new_musicobject_from_db(library->cdbase, location_id); } else { omobj = pragha_musicobject_new(); gtk_tree_model_get(model, &iter, L_NODE_DATA, &node_data, -1); switch(node_type) { case NODE_ARTIST: pragha_musicobject_set_artist(omobj, node_data); break; case NODE_ALBUM: if (pragha_preferences_get_sort_by_year(library->preferences)) { split_album = g_strsplit(node_data, " - ", 2); pragha_musicobject_set_year(omobj, atoi (split_album[0])); pragha_musicobject_set_album(omobj, split_album[1]); } else { pragha_musicobject_set_album(omobj, node_data); } break; case NODE_GENRE: pragha_musicobject_set_genre(omobj, node_data); break; default: break; } } } if (omobj) pragha_tags_dialog_set_musicobject(PRAGHA_TAGS_DIALOG(dialog), omobj); loc_arr = g_array_new(TRUE, TRUE, sizeof(gint)); for (i=list; i != NULL; i = i->next) { path = i->data; /* Form an array of location ids */ get_location_ids(path, loc_arr, model, library); } g_object_set_data (G_OBJECT (dialog), "local-array", loc_arr); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_library_pane_edit_tags_dialog_response), library); gtk_widget_show (dialog); exit: g_free(node_data); g_strfreev (split_album); if (omobj) g_object_unref (omobj); g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } static void pragha_library_pane_delete_from_hdd_action (GtkAction *action, PraghaLibraryPane *library) { GtkWidget *dialog; GtkWidget *toggle_unlink; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GList *list, *i; gint result; GArray *loc_arr; gboolean unlink = FALSE; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(library->library_tree)); list = gtk_tree_selection_get_selected_rows(selection, &model); if (list) { dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(library))), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Really want to move the files to trash?")); toggle_unlink = gtk_check_button_new_with_label(_("Delete permanently instead of moving to trash")); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), toggle_unlink, TRUE, TRUE, 0); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); unlink = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle_unlink)); gtk_widget_destroy(dialog); if(result == GTK_RESPONSE_YES){ loc_arr = g_array_new(TRUE, TRUE, sizeof(gint)); pragha_database_begin_transaction(library->cdbase); for (i=list; i != NULL; i = i->next) { path = i->data; get_location_ids(path, loc_arr, model, library); trash_or_unlink_row(loc_arr, unlink, library); /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } pragha_database_commit_transaction(library->cdbase); g_array_free(loc_arr, TRUE); pragha_database_flush_stale_entries (library->cdbase); pragha_database_change_tracks_done(library->cdbase); } g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } } static void pragha_library_pane_delete_from_db_action (GtkAction *action, PraghaLibraryPane *library) { GtkWidget *dialog; GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GList *list, *i; gint result; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(library->library_tree)); list = gtk_tree_selection_get_selected_rows(selection, &model); if (list) { dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(library))), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Are you sure you want to delete current file from library?\n\n" "Warning: To recover we must rescan the entire library.")); result = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); if( result == GTK_RESPONSE_YES ){ /* Delete all the rows */ pragha_database_begin_transaction (library->cdbase); for (i=list; i != NULL; i = i->next) { path = i->data; delete_row_from_db(library->cdbase, path, model); /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } pragha_database_commit_transaction (library->cdbase); pragha_database_flush_stale_entries (library->cdbase); pragha_database_change_tracks_done(library->cdbase); } g_list_free_full(list, (GDestroyNotify) gtk_tree_path_free); } } /**************************************/ /* Construction menus of library pane */ /**************************************/ static GtkUIManager * pragha_library_tree_context_menu_new (PraghaLibraryPane *library) { GtkUIManager *context_menu = NULL; GtkActionGroup *context_actions; GError *error = NULL; context_actions = gtk_action_group_new("Library Tree Context Actions"); context_menu = gtk_ui_manager_new(); gtk_action_group_set_translation_domain (context_actions, GETTEXT_PACKAGE); if (!gtk_ui_manager_add_ui_from_string (context_menu, library_tree_context_menu_xml, -1, &error)) { g_critical ("Unable to create library tree context menu, err : %s", error->message); } gtk_action_group_add_actions (context_actions, library_tree_context_aentries, G_N_ELEMENTS(library_tree_context_aentries), (gpointer) library); gtk_ui_manager_insert_action_group (context_menu, context_actions, 0); g_object_unref (context_actions); return context_menu; } static GtkUIManager * pragha_library_pane_header_context_menu_new (PraghaLibraryPane *library) { GtkUIManager *context_menu = NULL; GtkActionGroup *context_actions; GError *error = NULL; context_actions = gtk_action_group_new("Header Library Pane Context Actions"); context_menu = gtk_ui_manager_new(); gtk_action_group_set_translation_domain (context_actions, GETTEXT_PACKAGE); if (!gtk_ui_manager_add_ui_from_string (context_menu, library_pane_context_menu_xml, -1, &error)) { g_critical ("(%s): Unable to create header library tree context menu, err : %s", __func__, error->message); } gtk_action_group_add_actions (context_actions, library_pane_context_aentries, G_N_ELEMENTS(library_pane_context_aentries), (gpointer) library); gtk_ui_manager_insert_action_group (context_menu, context_actions, 0); g_object_unref (context_actions); return context_menu; } /********************************/ /* Construction of library pane */ /********************************/ static GtkTreeStore * pragha_library_pane_store_new() { GtkTreeStore *store; store = gtk_tree_store_new(N_L_COLUMNS, GDK_TYPE_PIXBUF, /* Pixbuf */ G_TYPE_STRING, /* Node */ G_TYPE_INT, /* Bold */ G_TYPE_INT, /* Node type : Artist / Album / Track */ G_TYPE_INT, /* Location id (valid only for Track) */ G_TYPE_BOOLEAN, /* Flag to save mach when filtering */ G_TYPE_BOOLEAN); /* Row visibility */ return store; } static GtkWidget* pragha_library_pane_tree_new(PraghaLibraryPane *clibrary) { GtkWidget *library_tree; GtkTreeModel *library_filter_tree; GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkTreeSelection *selection; /* Create the filter model */ library_filter_tree = gtk_tree_model_filter_new(GTK_TREE_MODEL(clibrary->library_store), NULL); gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(library_filter_tree), L_VISIBILE); /* Create the tree view */ library_tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(library_filter_tree)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(library_tree), FALSE); gtk_tree_view_set_show_expanders(GTK_TREE_VIEW(library_tree), TRUE); /* Set sidebar style */ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(library_tree)), GTK_STYLE_CLASS_SIDEBAR); /* Selection mode is multiple */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(library_tree)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); /* Create column and cell renderers */ column = gtk_tree_view_column_new(); renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", L_PIXBUF, NULL); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "text", L_NODE_DATA, "weight", L_NODE_BOLD, NULL); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(library_tree), column); g_object_unref(library_filter_tree); return library_tree; } static GtkWidget* pragha_library_pane_search_entry_new(PraghaLibraryPane *clibrary) { GtkWidget *search_entry; search_entry = pragha_search_entry_new(clibrary->preferences); g_signal_connect (G_OBJECT(search_entry), "changed", G_CALLBACK(simple_library_search_keyrelease_handler), clibrary); g_signal_connect (G_OBJECT(search_entry), "activate", G_CALLBACK(simple_library_search_activate_handler), clibrary); return search_entry; } static void pragha_library_pane_create_widget (PraghaLibraryPane *library) { GtkWidget *library_tree_scroll; library_tree_scroll = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(library_tree_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(library_tree_scroll), GTK_SHADOW_IN); /* Package all */ gtk_box_pack_start (GTK_BOX(library), library->search_entry, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(library), library_tree_scroll, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER(library_tree_scroll), library->library_tree); } static gint get_library_icon_size (void) { gint width, height; if (gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height)) return MAX (width, height); else return 16; } static void pragha_library_pane_init_pixbufs(PraghaLibraryPane *librarypane) { gchar *pix_uri = NULL; GtkIconTheme *icontheme = gtk_icon_theme_get_default(); gint icon_size = get_library_icon_size(); pix_uri = g_build_filename (PIXMAPDIR, "artist.png", NULL); librarypane->pixbuf_artist = gdk_pixbuf_new_from_file_at_scale(pix_uri, icon_size, icon_size, TRUE, NULL); if (!librarypane->pixbuf_artist) g_warning("Unable to load artist png"); g_free (pix_uri); librarypane->pixbuf_album = gtk_icon_theme_load_icon(icontheme, "media-optical", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); if (!librarypane->pixbuf_album) { pix_uri = g_build_filename (PIXMAPDIR, "album.png", NULL); librarypane->pixbuf_album = gdk_pixbuf_new_from_file_at_scale(pix_uri, icon_size, icon_size, TRUE, NULL); g_free (pix_uri); } if (!librarypane->pixbuf_album) g_warning("Unable to load album png"); librarypane->pixbuf_track = gtk_icon_theme_load_icon(icontheme, "audio-x-generic", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); if (!librarypane->pixbuf_track) { pix_uri = g_build_filename (PIXMAPDIR, "track.png", NULL); librarypane->pixbuf_track = gdk_pixbuf_new_from_file_at_scale(pix_uri, icon_size, icon_size, TRUE, NULL); g_free (pix_uri); } if (!librarypane->pixbuf_track) g_warning("Unable to load track png"); pix_uri = g_build_filename (PIXMAPDIR, "genre.png", NULL); librarypane->pixbuf_genre = gdk_pixbuf_new_from_file_at_scale(pix_uri, icon_size, icon_size, TRUE, NULL); if (!librarypane->pixbuf_genre) g_warning("Unable to load genre png"); g_free (pix_uri); librarypane->pixbuf_dir = gtk_icon_theme_load_icon(icontheme, "folder-music", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); if (!librarypane->pixbuf_dir) librarypane->pixbuf_dir = gtk_icon_theme_load_icon(icontheme, "folder", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); if (!librarypane->pixbuf_dir) g_warning("Unable to load folder png"); } void pragha_library_pane_init_view (PraghaLibraryPane *clibrary) { library_pane_update_style(clibrary); library_pane_view_reload(clibrary); } GtkWidget * pragha_library_pane_get_widget(PraghaLibraryPane *librarypane) { return GTK_WIDGET(librarypane); } GtkWidget * pragha_library_pane_get_pane_title (PraghaLibraryPane *library) { return library->pane_title; } GtkMenu * pragha_library_pane_get_popup_menu (PraghaLibraryPane *library) { return GTK_MENU(gtk_ui_manager_get_widget(library->library_pane_context_menu, "/popup")); } GtkUIManager * pragha_library_pane_get_pane_context_menu(PraghaLibraryPane *clibrary) { return clibrary->library_pane_context_menu; } static void pragha_library_pane_init (PraghaLibraryPane *library) { gtk_orientable_set_orientation (GTK_ORIENTABLE (library), GTK_ORIENTATION_VERTICAL); g_object_set (G_OBJECT(library), "spacing", 2, NULL); /* Get usefuls instances */ library->cdbase = pragha_database_get (); library->preferences = pragha_preferences_get (); /* Create the store */ library->library_store = pragha_library_pane_store_new(); /* Create the widgets */ library->search_entry = pragha_library_pane_search_entry_new (library); library->library_tree = pragha_library_pane_tree_new (library); library->pane_title = gtk_label_new(""); gtk_misc_set_alignment (GTK_MISC(library->pane_title), 0, 0.5); /* Create main widget */ pragha_library_pane_create_widget (library); /* Create context menus */ library->library_pane_context_menu = pragha_library_pane_header_context_menu_new (library); library->library_tree_context_menu = pragha_library_tree_context_menu_new (library); /* Init the rest of flags */ library->filter_entry = NULL; library->dragging = FALSE; library->view_change = FALSE; library->timeout_id = 0; library->library_tree_nodes = NULL; /* Init drag and drop */ library_pane_init_dnd (library); /* Init pixbufs */ pragha_library_pane_init_pixbufs (library); /* Conect signals */ g_signal_connect (G_OBJECT(library->library_tree), "row-activated", G_CALLBACK(library_tree_row_activated_cb), library); g_signal_connect (G_OBJECT(library->library_tree), "button-press-event", G_CALLBACK(library_tree_button_press_cb), library); g_signal_connect (G_OBJECT(library->library_tree), "button-release-event", G_CALLBACK(library_tree_button_release_cb), library); g_signal_connect (G_OBJECT (library->library_tree), "key-press-event", G_CALLBACK(library_tree_key_press), library); g_signal_connect (library->cdbase, "PlaylistsChanged", G_CALLBACK (update_library_playlist_changes), library); g_signal_connect (library->cdbase, "TracksChanged", G_CALLBACK (update_library_tracks_changes), library); g_signal_connect (library->preferences, "notify::library-style", G_CALLBACK (library_pane_change_style), library); gtk_widget_show_all (GTK_WIDGET(library)); } static void pragha_library_pane_finalize (GObject *object) { PraghaLibraryPane *library = PRAGHA_LIBRARY_PANE (object); if (library->pixbuf_dir) g_object_unref (library->pixbuf_dir); if (library->pixbuf_artist) g_object_unref (library->pixbuf_artist); if (library->pixbuf_album) g_object_unref (library->pixbuf_album); if (library->pixbuf_track) g_object_unref (library->pixbuf_track); if (library->pixbuf_genre) g_object_unref (library->pixbuf_genre); g_object_unref (library->cdbase); g_object_unref (library->preferences); g_object_unref (library->library_store); g_slist_free (library->library_tree_nodes); g_object_unref (library->library_pane_context_menu); g_object_unref (library->library_tree_context_menu); (*G_OBJECT_CLASS (pragha_library_pane_parent_class)->finalize) (object); } static void pragha_library_pane_class_init (PraghaLibraryPaneClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = pragha_library_pane_finalize; /* * Signals: */ signals[LIBRARY_APPEND_PLAYLIST] = g_signal_new ("library-append-playlist", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaLibraryPaneClass, library_append_playlist), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[LIBRARY_REPLACE_PLAYLIST] = g_signal_new ("library-replace-playlist", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaLibraryPaneClass, library_replace_playlist), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[LIBRARY_REPLACE_PLAYLIST_AND_PLAY] = g_signal_new ("library-replace-playlist-and-play", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaLibraryPaneClass, library_replace_playlist_and_play), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } PraghaLibraryPane * pragha_library_pane_new (void) { return g_object_new (PRAGHA_TYPE_LIBRARY_PANE, NULL); } �����������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-library-pane.h��������������������������������������������������������������0000664�0000000�0000000�00000007103�13435240150�0017544�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_LIBRARY_PANE_H #define PRAGHA_LIBRARY_PANE_H #include <gtk/gtk.h> #include "pragha-preferences.h" #define PRAGHA_TYPE_LIBRARY_PANE (pragha_library_pane_get_type ()) #define PRAGHA_LIBRARY_PANE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_LIBRARY_PANE, PraghaLibraryPane)) #define PRAGHA_IS_LIBRARY_PANE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_LIBRARY_PANE)) #define PRAGHA_LIBRARY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_LIBRARY_PANE, PraghaLibraryPaneClass)) #define PRAGHA_IS_LIBRARY_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_LIBRARY_PANE)) #define PRAGHA_LIBRARY_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_LIBRARY_PANE, PraghaLibraryPaneClass)) typedef struct _PraghaLibraryPane PraghaLibraryPane; typedef struct { GtkBoxClass __parent__; void (*library_append_playlist) (PraghaLibraryPane *toolbar); void (*library_replace_playlist) (PraghaLibraryPane *toolbar); void (*library_replace_playlist_and_play) (PraghaLibraryPane *toolbar); } PraghaLibraryPaneClass; /* Library Views */ typedef enum { FOLDERS, ARTIST, ALBUM, GENRE, ARTIST_ALBUM, GENRE_ARTIST, GENRE_ALBUM, GENRE_ARTIST_ALBUM, LAST_LIBRARY_STYLE } PraghaLibraryStyle; /* Functions */ GList * pragha_library_pane_get_mobj_list (PraghaLibraryPane *library); gboolean simple_library_search_activate_handler (GtkEntry *entry, PraghaLibraryPane *clibrary); void clear_library_search (PraghaLibraryPane *clibrary); gboolean pragha_library_need_update_view (PraghaPreferences *preferences, gint changed); gboolean pragha_library_need_update (PraghaLibraryPane *clibrary, gint changed); void library_pane_view_reload (PraghaLibraryPane *clibrary); void pragha_library_pane_init_view (PraghaLibraryPane *clibrary); GtkWidget *pragha_library_pane_get_widget (PraghaLibraryPane *librarypane); GtkWidget *pragha_library_pane_get_pane_title (PraghaLibraryPane *library); GtkMenu *pragha_library_pane_get_popup_menu (PraghaLibraryPane *library); GtkUIManager *pragha_library_pane_get_pane_context_menu(PraghaLibraryPane *clibrary); PraghaLibraryPane *pragha_library_pane_new (void); #endif /* PRAGHA_LIBRARY_PANE_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-menubar.c�������������������������������������������������������������������0000664�0000000�0000000�00000153413�13435240150�0016611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-menubar.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <gdk/gdkkeysyms.h> #include <stdlib.h> #include "pragha-playback.h" #include "pragha-file-utils.h" #include "pragha-utils.h" #include "pragha-filter-dialog.h" #include "pragha-playlists-mgmt.h" #include "pragha-tagger.h" #include "pragha-tags-dialog.h" #include "pragha-tags-mgmt.h" #include "pragha-preferences-dialog.h" #include "pragha-musicobject-mgmt.h" #include "pragha-equalizer-dialog.h" #include "pragha.h" /* * Prototypes */ static void pragha_gear_menu_update_playlist_changes (PraghaDatabase *database, PraghaApplication *pragha); /* * Menubar callbacks. */ /* Playback */ static void prev_action(GtkAction *action, PraghaApplication *pragha); static void play_pause_action(GtkAction *action, PraghaApplication *pragha); static void stop_action(GtkAction *action, PraghaApplication *pragha); static void next_action (GtkAction *action, PraghaApplication *pragha); static void edit_tags_playing_action(GtkAction *action, PraghaApplication *pragha); static void quit_action(GtkAction *action, PraghaApplication *pragha); /* Playlist */ static void open_file_action(GtkAction *action, PraghaApplication *pragha); static void add_location_action(GtkAction *action, PraghaApplication *pragha); static void add_libary_action(GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_remove_playlist_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_crop_playlist_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_clear_playlist_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_save_playlist_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_export_playlist_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_save_selection_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menubar_export_selection_action (GtkAction *action, PraghaApplication *pragha); static void pragha_menu_action_save_playlist (GtkAction *action, PraghaApplication *pragha); static void pragha_menu_action_save_selection (GtkAction *action, PraghaApplication *pragha); static void search_playlist_action(GtkAction *action, PraghaApplication *pragha); /* View */ static void fullscreen_action (GtkAction *action, PraghaApplication *pragha); static void show_controls_below_action (GtkAction *action, PraghaApplication *pragha); static void jump_to_playing_song_action (GtkAction *action, PraghaApplication *pragha); /* Tools */ static void show_equalizer_action(GtkAction *action, PraghaApplication *pragha); static void rescan_library_action(GtkAction *action, PraghaApplication *pragha); static void update_library_action(GtkAction *action, PraghaApplication *pragha); static void statistics_action(GtkAction *action, PraghaApplication *pragha); static void pref_action(GtkAction *action, PraghaApplication *pragha); /* Help */ static void home_action(GtkAction *action, PraghaApplication *pragha); static void community_action(GtkAction *action, PraghaApplication *pragha); static void wiki_action(GtkAction *action, PraghaApplication *pragha); static void translate_action(GtkAction *action, PraghaApplication *pragha); static void about_action(GtkAction *action, PraghaApplication *pragha); /* * Menu bar ui definition. */ static const gchar *main_menu_xml = "<ui> \ <menubar name=\"Menubar\"> \ <menu action=\"PlaybackMenu\"> \ <separator/> \ <menuitem action=\"Prev\"/> \ <menuitem action=\"Play_pause\"/> \ <menuitem action=\"Stop\"/> \ <menuitem action=\"Next\"/> \ <separator/> \ <menuitem action=\"Shuffle\"/> \ <menuitem action=\"Repeat\"/> \ <separator/> \ <menuitem action=\"Edit tags\"/> \ <separator/> \ <menuitem action=\"Quit\"/> \ </menu> \ <menu action=\"PlaylistMenu\"> \ <menuitem action=\"Add files\"/> \ <menuitem action=\"Add location\"/> \ <placeholder name=\"pragha-append-music-placeholder\"/> \ <separator/> \ <menuitem action=\"Add the library\"/> \ <separator/> \ <menuitem action=\"Remove from playlist\"/> \ <menuitem action=\"Crop playlist\"/> \ <menuitem action=\"Clear playlist\"/> \ <separator/> \ <menu action=\"SavePlaylist\"> \ <menuitem action=\"New playlist1\"/> \ <menuitem action=\"Export1\"/> \ <separator/> \ <placeholder name=\"pragha-save-playlist-placeholder\"/> \ </menu> \ <menu action=\"SaveSelection\"> \ <menuitem action=\"New playlist2\"/> \ <menuitem action=\"Export2\"/> \ <separator/> \ <placeholder name=\"pragha-save-selection-placeholder\"/> \ </menu> \ <separator/> \ <menuitem action=\"Search in playlist\"/> \ </menu> \ <menu action=\"ViewMenu\"> \ <menuitem action=\"Fullscreen\"/> \ <separator/> \ <menuitem action=\"Lateral panel1\"/> \ <menuitem action=\"Lateral panel2\"/> \ <menuitem action=\"Playback controls below\"/> \ <menuitem action=\"Show menubar\"/> \ <menuitem action=\"Status bar\"/> \ <separator/> \ <menuitem action=\"Jump to playing song\"/> \ </menu> \ <menu action=\"ToolsMenu\"> \ <separator/> \ <menuitem action=\"Equalizer\"/> \ <separator/> \ <placeholder name=\"pragha-plugins-placeholder\"/> \ <separator/> \ <menuitem action=\"Rescan library\"/> \ <menuitem action=\"Update library\"/> \ <separator/> \ <menuitem action=\"Statistics\"/> \ <separator/> \ <menuitem action=\"Preferences\"/> \ </menu> \ <menu action=\"HelpMenu\"> \ <menuitem action=\"Home\"/> \ <menuitem action=\"Community\"/> \ <menuitem action=\"Wiki\"/> \ <separator/> \ <menuitem action=\"Translate Pragha\"/> \ <separator/> \ <menuitem action=\"About\"/> \ </menu> \ </menubar> \ </ui>"; static GtkActionEntry main_aentries[] = { {"PlaybackMenu", NULL, N_("_Playback")}, {"PlaylistMenu", NULL, N_("Play_list")}, {"ViewMenu", NULL, N_("_View")}, {"ToolsMenu", NULL, N_("_Tools")}, {"HelpMenu", NULL, N_("_Help")}, {"Prev", NULL, N_("Previous track"), "<Alt>Left", "Prev track", G_CALLBACK(prev_action)}, {"Play_pause", NULL, N_("Play / Pause"), "<Control>space", "Play / Pause", G_CALLBACK(play_pause_action)}, {"Stop", NULL, N_("Stop"), "", "Stop", G_CALLBACK(stop_action)}, {"Next", NULL, N_("Next track"), "<Alt>Right", "Next track", G_CALLBACK(next_action)}, {"Edit tags", NULL, N_("Edit track information"), "<Control>E", "Edit information of current track", G_CALLBACK(edit_tags_playing_action)}, {"Quit", NULL, N_("_Quit"), "<Control>Q", "Quit pragha", G_CALLBACK(quit_action)}, {"Add files", NULL, N_("_Add files"), "<Control>O", N_("Open a media file"), G_CALLBACK(open_file_action)}, {"Add location", NULL, N_("Add _location"), "", "Add a no local stream", G_CALLBACK(add_location_action)}, {"Add the library", NULL, N_("_Add the library"), "", "Add all the library", G_CALLBACK(add_libary_action)}, {"Remove from playlist", NULL, N_("Remove selection from playlist"), "", "Remove selection from playlist", G_CALLBACK(pragha_menubar_remove_playlist_action)}, {"Crop playlist", NULL, N_("Crop playlist"), "<Control>C", "Crop playlist", G_CALLBACK(pragha_menubar_crop_playlist_action)}, {"Clear playlist", NULL, N_("Clear playlist"), "<Control>L", "Clear the current playlist", G_CALLBACK(pragha_menubar_clear_playlist_action)}, {"SavePlaylist", NULL, N_("Save playlist")}, {"New playlist1", NULL, N_("New playlist"), "<Control>S", "Save new playlist", G_CALLBACK(pragha_menubar_save_playlist_action)}, {"Export1", NULL, N_("Export"), "", "Export playlist", G_CALLBACK(pragha_menubar_export_playlist_action)}, {"SaveSelection", NULL, N_("Save selection")}, {"New playlist2", NULL, N_("New playlist"), "<Control><Shift>S", "Save new playlist", G_CALLBACK(pragha_menubar_save_selection_action)}, {"Export2", NULL, N_("Export"), "", "Export playlist", G_CALLBACK(pragha_menubar_export_selection_action)}, {"Search in playlist", NULL, N_("_Search in playlist"), "<Control>F", "Search in playlist", G_CALLBACK(search_playlist_action)}, {"Preferences", NULL, N_("_Preferences"), "<Control>P", "Set preferences", G_CALLBACK(pref_action)}, {"Jump to playing song", NULL, N_("Jump to playing song"), "<Control>J", "Jump to playing song", G_CALLBACK(jump_to_playing_song_action)}, {"Equalizer", NULL, N_("E_qualizer"), "", "Equalizer", G_CALLBACK(show_equalizer_action)}, {"Rescan library", NULL, N_("_Rescan library"), "", "Rescan library", G_CALLBACK(rescan_library_action)}, {"Update library", NULL, N_("_Update library"), "", "Update library", G_CALLBACK(update_library_action)}, {"Statistics", NULL, N_("_Statistics"), "", "Statistics", G_CALLBACK(statistics_action)}, {"Home", NULL, N_("Homepage"), "", "Homepage", G_CALLBACK(home_action)}, {"Community", NULL, N_("Community"), "", "Forum of pragha", G_CALLBACK(community_action)}, {"Wiki", NULL, N_("Wiki"), "", "Wiki of pragha", G_CALLBACK(wiki_action)}, {"Translate Pragha", NULL, N_("Translate Pragha"), "", "Translate Pragha", G_CALLBACK(translate_action)}, {"About", NULL, N_("About"), "", "About pragha", G_CALLBACK(about_action)}, }; static GtkToggleActionEntry toggles_entries[] = { {"Shuffle", NULL, N_("_Shuffle"), "<Control>U", "Shuffle Songs", NULL, FALSE}, {"Repeat", NULL, N_("_Repeat"), "<Control>R", "Repeat Songs", NULL, FALSE}, {"Fullscreen", NULL, N_("_Fullscreen"), "F11", "Switch between full screen and windowed mode", G_CALLBACK(fullscreen_action), FALSE}, {"Lateral panel1", NULL, N_("Lateral _panel"), "F9", "Lateral panel", NULL, TRUE}, {"Lateral panel2", NULL, N_("Secondary lateral panel"), "<Shift>F9", "Secondary lateral panel", NULL, FALSE}, {"Playback controls below", NULL, N_("Playback controls below"), NULL, "Show playback controls below", G_CALLBACK(show_controls_below_action), FALSE}, {"Show menubar", NULL, N_("Menubar"), "<Control>M", "Show menubar", NULL, TRUE}, {"Status bar", NULL, N_("Status bar"), "", "Status bar", NULL, TRUE} }; /* Sentitive menubar actions depending on the playback status. */ void pragha_menubar_update_playback_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data) { GtkAction *action; gboolean playing = FALSE; PraghaApplication *pragha = user_data; playing = (pragha_backend_get_state (backend) != ST_STOPPED); action = pragha_application_get_menu_action (pragha, "/Menubar/PlaybackMenu/Prev"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = pragha_application_get_menu_action (pragha, "/Menubar/PlaybackMenu/Stop"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = pragha_application_get_menu_action (pragha, "/Menubar/PlaybackMenu/Next"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = pragha_application_get_menu_action (pragha, "/Menubar/PlaybackMenu/Edit tags"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Jump to playing song"); gtk_action_set_sensitive (GTK_ACTION (action), playing); } static void pragha_menubar_update_playlist_changes (PraghaDatabase *database, PraghaApplication *pragha) { GtkUIManager *ui_manager; GtkAction *action; PraghaPreparedStatement *statement; const gchar *sql = NULL, *playlist = NULL; gchar *action_name = NULL; static gint playlist_ui_id = 0; static GtkActionGroup *playlist_action_group = NULL; ui_manager = pragha_application_get_menu_ui_manager (pragha); gtk_ui_manager_remove_ui (ui_manager, playlist_ui_id); gtk_ui_manager_ensure_update (ui_manager); if (playlist_action_group) { gtk_ui_manager_remove_action_group (ui_manager, playlist_action_group); g_object_unref (playlist_action_group); } playlist_action_group = gtk_action_group_new ("playlists-action-group"); gtk_ui_manager_insert_action_group (ui_manager, playlist_action_group, -1); playlist_ui_id = gtk_ui_manager_new_merge_id (ui_manager); sql = "SELECT name FROM PLAYLIST WHERE name != ? ORDER BY name COLLATE NOCASE DESC"; statement = pragha_database_create_statement (database, sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { playlist = pragha_prepared_statement_get_string(statement, 0); /* Save playlist */ action_name = g_strdup_printf ("playlist-to-%s", playlist); action = gtk_action_new (action_name, playlist, NULL, NULL); gtk_action_group_add_action (playlist_action_group, action); g_object_unref (action); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_menu_action_save_playlist), pragha); gtk_ui_manager_add_ui (ui_manager, playlist_ui_id, "/Menubar/PlaylistMenu/SavePlaylist/pragha-save-playlist-placeholder", playlist, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); g_free (action_name); /* Save selection */ action_name = g_strdup_printf ("selection-to-%s", playlist); action = gtk_action_new (action_name, playlist, NULL, NULL); gtk_action_group_add_action (playlist_action_group, action); g_object_unref (action); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_menu_action_save_selection), pragha); gtk_ui_manager_add_ui (ui_manager, playlist_ui_id, "/Menubar/PlaylistMenu/SaveSelection/pragha-save-selection-placeholder", playlist, action_name, GTK_UI_MANAGER_MENUITEM, FALSE); g_free (action_name); pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); } /* Handler for the 'Open' item in the File menu */ void open_file_action(GtkAction *action, PraghaApplication *pragha) { pragha_application_open_files (pragha); } /* Build a dialog to get a new playlist name */ void add_location_action(GtkAction *action, PraghaApplication *pragha) { pragha_application_add_location (pragha); } /* Handler for 'Add All' action in the Tools menu */ static void add_libary_action(GtkAction *action, PraghaApplication *pragha) { pragha_application_append_entery_libary (pragha); } /* Handler for the 'Prev' item in the pragha menu */ static void prev_action(GtkAction *action, PraghaApplication *pragha) { pragha_playback_prev_track(pragha); } /* Handler for the 'Play / Pause' item in the pragha menu */ static void play_pause_action(GtkAction *action, PraghaApplication *pragha) { pragha_playback_play_pause_resume(pragha); } /* Handler for the 'Stop' item in the pragha menu */ static void stop_action(GtkAction *action, PraghaApplication *pragha) { pragha_playback_stop(pragha); } /* Handler for the 'Next' item in the pragha menu */ static void next_action (GtkAction *action, PraghaApplication *pragha) { pragha_playback_next_track(pragha); } void edit_tags_playing_action(GtkAction *action, PraghaApplication *pragha) { pragha_playback_edit_current_track (pragha); } /* Handler for the 'Quit' item in the pragha menu */ static void quit_action(GtkAction *action, PraghaApplication *pragha) { pragha_application_quit (pragha); } /* Handler for 'Search Playlist' option in the Edit menu */ static void search_playlist_action(GtkAction *action, PraghaApplication *pragha) { pragha_filter_dialog (pragha_application_get_playlist (pragha)); } /* Handler for the 'Preferences' item in the Edit menu */ static void pref_action(GtkAction *action, PraghaApplication *pragha) { PreferencesDialog *dialog; dialog = pragha_application_get_preferences_dialog (pragha); pragha_preferences_dialog_show (dialog); } /* Handler for the 'Full screen' item in the Edit menu */ static void fullscreen_action (GtkAction *action, PraghaApplication *pragha) { GtkWidget *menu_bar; gboolean fullscreen; GdkWindowState state; menu_bar = pragha_application_get_menubar (pragha); fullscreen = gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action)); if(fullscreen){ gtk_window_fullscreen(GTK_WINDOW(pragha_application_get_window(pragha))); gtk_widget_hide(GTK_WIDGET(menu_bar)); } else { state = gdk_window_get_state (gtk_widget_get_window (pragha_application_get_window(pragha))); if (state & GDK_WINDOW_STATE_FULLSCREEN) gtk_window_unfullscreen(GTK_WINDOW(pragha_application_get_window(pragha))); gtk_widget_show(GTK_WIDGET(menu_bar)); } } /* Handler for the 'Show_controls_below_action' item in the view menu */ static void show_controls_below_action (GtkAction *action, PraghaApplication *pragha) { PraghaPreferences *preferences; PraghaToolbar *toolbar; GtkWidget *parent; preferences = pragha_application_get_preferences (pragha); pragha_preferences_set_controls_below (preferences, gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(action))); toolbar = pragha_application_get_toolbar (pragha); parent = gtk_widget_get_parent (GTK_WIDGET(toolbar)); gint position = pragha_preferences_get_controls_below (preferences) ? 3 : 1; gtk_box_reorder_child(GTK_BOX(parent), GTK_WIDGET(toolbar), position); } static void jump_to_playing_song_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist; playlist = pragha_application_get_playlist (pragha); pragha_playlist_show_current_track (playlist); } /* Handler for the 'Equalizer' item in the Tools menu */ static void show_equalizer_action(GtkAction *action, PraghaApplication *pragha) { GtkWidget *parent = pragha_application_get_window (pragha); PraghaBackend *backend = pragha_application_get_backend(pragha); pragha_equalizer_dialog_show (backend, parent); } /* Handler for the 'Rescan Library' item in the Tools menu */ static void rescan_library_action(GtkAction *action, PraghaApplication *pragha) { PraghaScanner *scanner; scanner = pragha_application_get_scanner (pragha); pragha_scanner_scan_library (scanner); } /* Handler for the 'Update Library' item in the Tools menu */ static void update_library_action(GtkAction *action, PraghaApplication *pragha) { PraghaScanner *scanner; scanner = pragha_application_get_scanner (pragha); pragha_scanner_update_library (scanner); } /* Handler for remove, crop and clear action in the Tools menu */ static void pragha_menubar_remove_playlist_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist; playlist = pragha_application_get_playlist (pragha); pragha_playlist_remove_selection (playlist); } static void pragha_menubar_crop_playlist_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist; playlist = pragha_application_get_playlist (pragha); pragha_playlist_crop_selection (playlist); } static void pragha_menubar_clear_playlist_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist; playlist = pragha_application_get_playlist (pragha); pragha_playlist_remove_all (playlist); } static void pragha_menubar_save_playlist_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); save_current_playlist (NULL, playlist); } static void pragha_menubar_export_playlist_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); export_current_playlist (NULL, playlist); } static void pragha_menubar_save_selection_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); save_selected_playlist (NULL, playlist); } static void pragha_menu_action_save_playlist (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist = pragha_application_get_playlist (pragha);; const gchar *name = gtk_action_get_label (action); pragha_playlist_save_playlist (playlist, name); } static void pragha_menu_action_save_selection (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist = pragha_application_get_playlist (pragha);; const gchar *name = gtk_action_get_label (action); pragha_playlist_save_selection (playlist, name); } static void pragha_menubar_export_selection_action (GtkAction *action, PraghaApplication *pragha) { PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); export_selected_playlist (NULL, playlist); } /* Handler for 'Statistics' action in the Tools menu */ static void statistics_action(GtkAction *action, PraghaApplication *pragha) { PraghaDatabase *cdbase; gint n_artists, n_albums, n_tracks; GtkWidget *dialog; cdbase = pragha_application_get_database (pragha); n_artists = pragha_database_get_artist_count (cdbase); n_albums = pragha_database_get_album_count (cdbase); n_tracks = pragha_database_get_track_count (cdbase); dialog = gtk_message_dialog_new(GTK_WINDOW(pragha_application_get_window(pragha)), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s %d\n%s %d\n%s %d", _("Total Tracks:"), n_tracks, _("Total Artists:"), n_artists, _("Total Albums:"), n_albums); gtk_window_set_title(GTK_WINDOW(dialog), _("Statistics")); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_widget_show_all(dialog); } /* Handler for the 'About' action in the Help menu */ static void home_action(GtkAction *action, PraghaApplication *pragha) { const gchar *uri = "http://pragha-music-player.github.io/"; open_url(uri, pragha_application_get_window(pragha)); } static void community_action(GtkAction *action, PraghaApplication *pragha) { const gchar *uri = "http://bbs.archlinux.org/viewtopic.php?id=46171"; open_url(uri, pragha_application_get_window(pragha)); } static void wiki_action(GtkAction *action, PraghaApplication *pragha) { const gchar *uri = "https://github.com/pragha-music-player/pragha/wiki/Welcome-to-the-Pragha-Wiki"; open_url(uri, pragha_application_get_window(pragha)); } static void translate_action(GtkAction *action, PraghaApplication *pragha) { const gchar *uri = "http://www.transifex.net/projects/p/Pragha/"; open_url(uri, pragha_application_get_window(pragha)); } void about_action(GtkAction *action, PraghaApplication *pragha) { pragha_application_about_dialog(pragha); } void pragha_menubar_connect_signals (GtkUIManager *menu_ui_manager, PraghaApplication *pragha) { PraghaPreferences *preferences; GtkActionGroup *main_actions; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; main_actions = gtk_action_group_new("Main Actions"); gtk_action_group_set_translation_domain (main_actions, GETTEXT_PACKAGE); gtk_action_group_add_actions (main_actions, main_aentries, G_N_ELEMENTS(main_aentries), (gpointer)pragha); gtk_action_group_add_toggle_actions (main_actions, toggles_entries, G_N_ELEMENTS(toggles_entries), pragha); gtk_window_add_accel_group (GTK_WINDOW(pragha_application_get_window(pragha)), gtk_ui_manager_get_accel_group(menu_ui_manager)); gtk_ui_manager_insert_action_group (menu_ui_manager, main_actions, 0); /* Hide second sidebar */ GtkAction *action_sidebar = gtk_ui_manager_get_action(menu_ui_manager, "/Menubar/ViewMenu/Lateral panel2"); gtk_action_set_visible (action_sidebar, FALSE); /* Binding properties to Actions. */ preferences = pragha_application_get_preferences (pragha); #if GTK_CHECK_VERSION (3, 12, 0) if (!pragha_preferences_get_system_titlebar(preferences)) { GtkAction *fullscreen_action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Fullscreen"); gtk_action_set_sensitive (GTK_ACTION (fullscreen_action), FALSE); GtkAction *below_action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Playback controls below"); gtk_action_set_sensitive (GTK_ACTION (below_action), FALSE); } #endif GtkAction *action_shuffle = gtk_ui_manager_get_action(menu_ui_manager, "/Menubar/PlaybackMenu/Shuffle"); g_object_bind_property (preferences, "shuffle", action_shuffle, "active", binding_flags); GtkAction *action_repeat = gtk_ui_manager_get_action(menu_ui_manager,"/Menubar/PlaybackMenu/Repeat"); g_object_bind_property (preferences, "repeat", action_repeat, "active", binding_flags); GtkAction *action_lateral1 = gtk_ui_manager_get_action(menu_ui_manager, "/Menubar/ViewMenu/Lateral panel1"); g_object_bind_property (preferences, "lateral-panel", action_lateral1, "active", binding_flags); GtkAction *action_lateral2 = gtk_ui_manager_get_action(menu_ui_manager, "/Menubar/ViewMenu/Lateral panel2"); g_object_bind_property (preferences, "secondary-lateral-panel", action_lateral2, "active", binding_flags); GtkAction *action_status_bar = gtk_ui_manager_get_action(menu_ui_manager, "/Menubar/ViewMenu/Status bar"); g_object_bind_property (preferences, "show-status-bar", action_status_bar, "active", binding_flags); GtkAction *action_show_menubar = gtk_ui_manager_get_action(menu_ui_manager, "/Menubar/ViewMenu/Show menubar"); g_object_bind_property (preferences, "show-menubar", action_show_menubar, "active", binding_flags); g_signal_connect (pragha_application_get_database(pragha), "PlaylistsChanged", G_CALLBACK(pragha_menubar_update_playlist_changes), pragha); pragha_menubar_update_playlist_changes (pragha_application_get_database(pragha), pragha); g_signal_connect (pragha_application_get_database(pragha), "PlaylistsChanged", G_CALLBACK(pragha_gear_menu_update_playlist_changes), pragha); pragha_gear_menu_update_playlist_changes (pragha_application_get_database(pragha), pragha); g_object_unref (main_actions); } GtkUIManager* pragha_menubar_new (void) { GtkUIManager *main_menu = NULL; gchar *pragha_accels_path = NULL; GError *error = NULL; main_menu = gtk_ui_manager_new(); if (!gtk_ui_manager_add_ui_from_string(main_menu, main_menu_xml, -1, &error)) { g_critical("Unable to create main menu, err : %s", error->message); } /* Load menu accelerators edited */ pragha_accels_path = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), "/pragha/accels.scm", NULL); gtk_accel_map_load (pragha_accels_path); g_free (pragha_accels_path); return main_menu; } /* * Menu on toolbar. */ /* Playback submenu. */ static void pragha_gmenu_prev (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_playback_prev_track (pragha); } static void pragha_gmenu_playpause (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_playback_play_pause_resume (pragha); } static void pragha_gmenu_stop (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_playback_stop (pragha); } static void pragha_gmenu_next (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_playback_next_track (pragha); } static void pragha_gmenu_edit (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_playback_edit_current_track (pragha); } static void pragha_gmenu_quit (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_application_quit (pragha); } /* Playlist submenu. */ static void pragha_gmenu_open (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_application_open_files (pragha); } static void pragha_gmenu_location (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_application_add_location (pragha); } static void pragha_gmenu_library (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_application_append_entery_libary (pragha); } static void pragha_gmenu_remove (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); pragha_playlist_remove_selection (playlist); } static void pragha_gmenu_crop (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); pragha_playlist_crop_selection (playlist); } static void pragha_gmenu_playlist_export (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); export_current_playlist (NULL, playlist); } static void pragha_gmenu_playlist_save (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); save_current_playlist (NULL, playlist); } static gchar * pragha_database_get_playlist_by_order (PraghaDatabase *cdbase, gint id) { gchar *name = NULL; gint i = 0; const gchar *sql = "SELECT name FROM PLAYLIST WHERE name != ? ORDER BY name COLLATE NOCASE"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { if (i++ == id) break; } name = g_strdup(pragha_prepared_statement_get_string (statement, 0)); pragha_prepared_statement_free (statement); return name; } static void pragha_gmenu_playlist_append (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); PraghaDatabase *cdbase = pragha_playlist_get_database (playlist); const gchar *name = g_action_get_name (G_ACTION(action)); gchar *title = pragha_database_get_playlist_by_order(cdbase, atoi(name + strlen("playlist"))); pragha_playlist_save_playlist (playlist, title); g_free(title); } static void pragha_gmenu_selection_export (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); export_selected_playlist (NULL, playlist); } static void pragha_gmenu_selection_save (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); save_selected_playlist (NULL, playlist); } static void pragha_gmenu_selection_append (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); PraghaDatabase *cdbase = pragha_playlist_get_database (playlist); const gchar *name = g_action_get_name (G_ACTION(action)); gchar *title = pragha_database_get_playlist_by_order(cdbase, atoi(name + strlen("selection"))); pragha_playlist_save_selection (playlist, title); g_free(title); } static void pragha_gmenu_clear (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); pragha_playlist_remove_all (playlist); } static void pragha_gmenu_search (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; PraghaPlaylist *playlist = pragha_application_get_playlist (pragha); pragha_filter_dialog(playlist); } /* View submenu */ static void pragha_gmenu_jump_to_song (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaPlaylist *playlist; PraghaApplication *pragha = user_data; playlist = pragha_application_get_playlist (pragha); pragha_playlist_show_current_track (playlist); } /* Tools Submenu */ static void pragha_gmenu_equalizer (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; GtkWidget *parent = pragha_application_get_window (pragha); PraghaBackend *backend = pragha_application_get_backend(pragha); pragha_equalizer_dialog_show (backend, parent); } static void pragha_gmenu_rescan_library (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaScanner *scanner; PraghaApplication *pragha = user_data; scanner = pragha_application_get_scanner (pragha); pragha_scanner_scan_library (scanner); } static void pragha_gmenu_update_library (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaScanner *scanner; PraghaApplication *pragha = user_data; scanner = pragha_application_get_scanner (pragha); pragha_scanner_update_library (scanner); } static void pragha_gmenu_show_statistic (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; statistics_action (NULL, pragha); } static void pragha_gmenu_show_preferences (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PreferencesDialog *dialog; PraghaApplication *pragha = user_data; dialog = pragha_application_get_preferences_dialog (pragha); pragha_preferences_dialog_show (dialog); } /* Help Submenu */ static void pragha_gmenu_show_homepage (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; const gchar *uri = "http://pragha.wikispaces.com/"; open_url (uri, pragha_application_get_window(pragha)); } static void pragha_gmenu_show_community (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; const gchar *uri = "http://bbs.archlinux.org/viewtopic.php?id=46171"; open_url (uri, pragha_application_get_window(pragha)); } static void pragha_gmenu_show_wiki (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; const gchar *uri = "http://pragha.wikispaces.com/"; open_url (uri, pragha_application_get_window(pragha)); } static void pragha_gmenu_translate (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; const gchar *uri = "http://www.transifex.net/projects/p/Pragha/"; open_url (uri, pragha_application_get_window(pragha)); } static void pragha_gmenu_about (GSimpleAction *action, GVariant *parameter, gpointer user_data) { PraghaApplication *pragha = user_data; pragha_application_about_dialog (pragha); } /* * Useful functions. */ void pragha_menubar_set_enable_action (GtkWindow *window, const char *action_name, gboolean enabled) { GAction *action; action = g_action_map_lookup_action (G_ACTION_MAP (window), action_name); g_object_set (action, "enabled", enabled, NULL); } GMenu * pragha_menubar_get_menu_section (PraghaApplication *pragha, const char *id) { GObject *object; GtkBuilder *builder; builder = pragha_application_get_menu_ui (pragha); object = gtk_builder_get_object (builder, id); if (object == NULL || !G_IS_MENU (object)) return NULL; return G_MENU (object); } static void pragha_menubar_emthy_menu_section (PraghaApplication *pragha, const char *id) { GMenu *menu; GtkBuilder *builder; builder = pragha_application_get_menu_ui (pragha); menu = G_MENU (gtk_builder_get_object (builder, id)); while (g_menu_model_get_n_items (G_MENU_MODEL (menu)) > 0) { const char *action; g_menu_model_get_item_attribute (G_MENU_MODEL (menu), 0, G_MENU_ATTRIBUTE_ACTION, "s", &action); if (g_str_has_prefix (action, "win.")) { GVariant *target; target = g_menu_model_get_item_attribute_value (G_MENU_MODEL (menu), 0, G_MENU_ATTRIBUTE_TARGET, NULL); /* Don't remove actions that have a specific target */ if (target == NULL) { GtkWindow *window; window = GTK_WINDOW(pragha_application_get_window(pragha)); g_action_map_remove_action (G_ACTION_MAP (window), action + strlen ("win.")); } else g_variant_unref (target); } g_menu_remove (G_MENU (menu), 0); } } void pragha_menubar_append_action (PraghaApplication *pragha, const gchar *placeholder, GSimpleAction *action, GMenuItem *item) { GActionMap *map; GMenu *place; place = pragha_menubar_get_menu_section (pragha, placeholder); map = G_ACTION_MAP (pragha_application_get_window(pragha)); g_action_map_add_action (map, G_ACTION (action)); g_menu_append_item (G_MENU (place), item); } void pragha_menubar_remove_action (PraghaApplication *pragha, const gchar *placeholder, const gchar *action_name) { GtkBuilder *builder; GActionMap *map; GMenu *menu; const char *action; gint i; builder = pragha_application_get_menu_ui (pragha); menu = G_MENU (gtk_builder_get_object (builder, placeholder)); for (i = 0; i < g_menu_model_get_n_items (G_MENU_MODEL(menu)); i++) { if (g_menu_model_get_item_attribute (G_MENU_MODEL(menu), i, G_MENU_ATTRIBUTE_ACTION, "s", &action)) { if (g_strcmp0 (action + strlen ("win."), action_name) == 0) { g_menu_remove (G_MENU (menu), i); map = G_ACTION_MAP (pragha_application_get_window(pragha)); g_action_map_remove_action (map, action_name); break; } } } } void pragha_menubar_append_submenu (PraghaApplication *pragha, const gchar *placeholder, const gchar *xml_ui, const gchar *menu_id, const gchar *label, gpointer user_data) { GtkBuilder *builder; GError *error = NULL; GMenuModel *menu; GMenu *section; GMenuItem *menu_item; builder = gtk_builder_new (); gtk_builder_add_from_string (builder, xml_ui, -1, &error); if (error) { g_print ("GtkBuilder error: %s", error->message); g_error_free (error); error = NULL; } section = pragha_menubar_get_menu_section (pragha, placeholder); menu = G_MENU_MODEL (gtk_builder_get_object (builder, menu_id)); menu_item = g_menu_item_new_submenu (label, menu); g_menu_item_set_attribute (menu_item, "pragha-merge-id", "s", menu_id); g_menu_insert_item (section, -1, menu_item); g_object_unref (menu_item); } void pragha_menubar_remove_by_id (PraghaApplication *pragha, const gchar *placeholder, const gchar *item_id) { GtkBuilder *builder; GMenu *menu; const char *id; gint i; builder = pragha_application_get_menu_ui (pragha); menu = G_MENU (gtk_builder_get_object (builder, placeholder)); for (i = 0; i < g_menu_model_get_n_items (G_MENU_MODEL(menu)); i++) { if (g_menu_model_get_item_attribute (G_MENU_MODEL(menu), i, "pragha-merge-id", "s", &id)) { if (g_strcmp0 (id, item_id) == 0) g_menu_remove (G_MENU (menu), i); } } } static void pragha_gear_menu_update_playlist_changes (PraghaDatabase *database, PraghaApplication *pragha) { PraghaDatabase *cdbase; GSimpleAction *action; GMenuItem *item; gchar *selection_name = NULL, *action_name = NULL; gint i = 0; pragha_menubar_emthy_menu_section (pragha, "selection-submenu"); pragha_menubar_emthy_menu_section (pragha, "playlist-submenu"); cdbase = pragha_application_get_database (pragha); const gchar *sql = "SELECT name FROM PLAYLIST WHERE name != ? ORDER BY name COLLATE NOCASE"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { const gchar *name = pragha_prepared_statement_get_string (statement, 0); /* Playlist */ selection_name = g_strdup_printf ("playlist%d", i); action = g_simple_action_new (selection_name, NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_gmenu_playlist_append), pragha); action_name = g_strdup_printf ("win.%s", selection_name); item = g_menu_item_new (name, action_name); pragha_menubar_append_action (pragha, "playlist-submenu", action, item); g_free(selection_name); g_free(action_name); /* Selection */ selection_name = g_strdup_printf ("selection%d", i); action = g_simple_action_new (selection_name, NULL); g_signal_connect (G_OBJECT (action), "activate", G_CALLBACK (pragha_gmenu_selection_append), pragha); action_name = g_strdup_printf ("win.%s", selection_name); item = g_menu_item_new (name, action_name); pragha_menubar_append_action (pragha, "selection-submenu", action, item); g_free(selection_name); g_free(action_name); i++; pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); } /* * Bindigns Functions */ static void activate_toggle (GSimpleAction *action, GVariant *parameter, gpointer user_data) { GVariant *state; state = g_action_get_state (G_ACTION (action)); g_action_change_state (G_ACTION (action), g_variant_new_boolean (!g_variant_get_boolean (state))); g_variant_unref (state); } static gboolean binding_gboolean_to_variant (GBinding *binding, const GValue *from_value, GValue *to_value, gpointer user_data) { GVariant *vvalue = g_variant_new_boolean (g_value_get_boolean (from_value)); g_value_set_variant (to_value, vvalue); return TRUE; } static gboolean binding_variant_to_gboolean (GBinding *binding, const GValue *from_value, GValue *to_value, gpointer user_data) { gboolean vbool = g_variant_get_boolean(g_value_get_variant(from_value)); g_value_set_boolean (to_value, vbool); return TRUE; } /* * Menu definitions. */ static GActionEntry win_entries[] = { /* Playback submenu. */ { "prev", pragha_gmenu_prev, NULL, NULL, NULL }, { "play", pragha_gmenu_playpause, NULL, NULL, NULL }, { "stop", pragha_gmenu_stop, NULL, NULL, NULL }, { "next", pragha_gmenu_next, NULL, NULL, NULL }, { "shuffle", activate_toggle, NULL, "false", NULL }, { "repeat", activate_toggle, NULL, "false", NULL }, { "edit", pragha_gmenu_edit, NULL, NULL, NULL }, { "quit", pragha_gmenu_quit, NULL, NULL, NULL }, /* Playlist submenu. */ { "open", pragha_gmenu_open, NULL, NULL, NULL }, { "location", pragha_gmenu_location, NULL, NULL, NULL }, { "library", pragha_gmenu_library, NULL, NULL, NULL }, { "remove", pragha_gmenu_remove, NULL, NULL, NULL }, { "crop", pragha_gmenu_crop, NULL, NULL, NULL }, { "clear", pragha_gmenu_clear, NULL, NULL, NULL }, { "export_playlist", pragha_gmenu_playlist_export, NULL, NULL, NULL }, { "new_playlist", pragha_gmenu_playlist_save, NULL, NULL, NULL }, { "export_selection", pragha_gmenu_selection_export, NULL, NULL, NULL }, { "new_selection", pragha_gmenu_selection_save, NULL, NULL, NULL }, { "search", pragha_gmenu_search, NULL, NULL, NULL }, /* View Submenu */ { "sidebar1", activate_toggle, NULL, "false", NULL }, { "sidebar2", activate_toggle, NULL, "false", NULL }, { "menubar", activate_toggle, NULL, "true", NULL }, { "status-bar", activate_toggle, NULL, "false", NULL }, { "jump-song", pragha_gmenu_jump_to_song, NULL, NULL, NULL }, /* Tools submenu */ { "equalizer", pragha_gmenu_equalizer, NULL, NULL, NULL }, { "lib-rescan", pragha_gmenu_rescan_library, NULL, NULL, NULL }, { "lib-update", pragha_gmenu_update_library, NULL, NULL, NULL }, { "statistics", pragha_gmenu_show_statistic, NULL, NULL, NULL }, { "preferences", pragha_gmenu_show_preferences, NULL, NULL, NULL }, /* Help submenu */ { "homepage", pragha_gmenu_show_homepage, NULL, NULL, NULL }, { "community", pragha_gmenu_show_community, NULL, NULL, NULL }, { "wiki", pragha_gmenu_show_wiki, NULL, NULL, NULL }, { "translate", pragha_gmenu_translate, NULL, NULL, NULL }, { "about", pragha_gmenu_about, NULL, NULL, NULL } }; static const gchar *menu_ui = \ NEW_MENU("menubar") \ NEW_ACCEL_ITEM("_Add files", "<Control>O", "win", "open") \ NEW_ITEM ("Add _location", "win", "location") \ NEW_ITEM ("_Add the library", "win", "library") \ NEW_PLACEHOLDER("pragha-plugins-append-music") \ SEPARATOR \ NEW_ACCEL_ITEM ("Edit track information", "<Control>E", "win", "edit") \ NEW_ITEM ("E_qualizer", "win", "equalizer") \ SEPARATOR \ NEW_ITEM ("Remove selection from playlist", "win", "remove") \ NEW_ACCEL_ITEM("Crop playlist", "<Control>C", "win", "crop") \ NEW_ACCEL_ITEM("Clear playlist", "<Control>L", "win", "clear") \ NEW_SUBMENU("Save playlist") \ NEW_ACCEL_ITEM("New playlist", "<Control>S", "win", "new_playlist") \ NEW_ITEM ("Export", "win", "export_playlist") \ SEPARATOR \ NEW_PLACEHOLDER("playlist-submenu") \ CLOSE_SUBMENU \ NEW_SUBMENU("Save selection") \ NEW_ACCEL_ITEM("New playlist", "<Shift><Control>S","win", "new_selection") \ NEW_ITEM ("Export", "win", "export_selection") \ SEPARATOR \ NEW_PLACEHOLDER("selection-submenu") \ CLOSE_SUBMENU \ SEPARATOR \ NEW_ACCEL_ITEM("_Search in playlist", "<Control>F", "win", "search") \ NEW_ACCEL_ITEM("Jump to playing song", "<Control>J", "win", "jump-song") \ SEPARATOR \ NEW_ACCEL_ITEM ("Show lateral _panel", "F9", "win", "sidebar1") \ NEW_ACCEL_ITEM ("Show secondary lateral panel", "<Shift>F9", "win", "sidebar2") \ NEW_ACCEL_ITEM ("Show menubar", "<Control>M", "win", "menubar") \ NEW_ITEM ("Show status bar", "win", "status-bar") \ SEPARATOR \ NEW_PLACEHOLDER("pragha-plugins-placeholder") \ SEPARATOR \ NEW_ITEM ("_Rescan library", "win", "lib-rescan") \ NEW_ITEM ("_Update library", "win", "lib-update") \ SEPARATOR \ NEW_ACCEL_ITEM("_Preferences", "<Control>P", "win", "preferences") \ NEW_ITEM ("About", "win", "about") \ NEW_ACCEL_ITEM("_Quit", "<Control>Q", "win", "quit") \ CLOSE_MENU; GtkBuilder * pragha_gmenu_toolbar_new (PraghaApplication *pragha) { PraghaPreferences *preferences; GtkBuilder *builder; GActionMap *map; GAction *action; GError *error = NULL; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; builder = gtk_builder_new (); gtk_builder_add_from_string (builder, menu_ui, -1, &error); if (error) { g_print ("GtkBuilder error: %s", error->message); g_error_free (error); error = NULL; } /* Get the action map */ map = G_ACTION_MAP (pragha_application_get_window(pragha)); /* Add the menu */ g_action_map_add_action_entries (G_ACTION_MAP (map), win_entries, G_N_ELEMENTS (win_entries), pragha); /* Insensitive second sidebar */ action = g_action_map_lookup_action (map, "sidebar2"); g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE); /* Binding properties to Actions. */ preferences = pragha_application_get_preferences (pragha); action = g_action_map_lookup_action (map, "shuffle"); g_object_bind_property_full (preferences, "shuffle", action, "state", binding_flags, binding_gboolean_to_variant, binding_variant_to_gboolean, NULL, NULL); action = g_action_map_lookup_action (map, "repeat"); g_object_bind_property_full (preferences, "repeat", action, "state", binding_flags, binding_gboolean_to_variant, binding_variant_to_gboolean, NULL, NULL); action = g_action_map_lookup_action (map, "sidebar1"); g_object_bind_property_full (preferences, "lateral-panel", action, "state", binding_flags, binding_gboolean_to_variant, binding_variant_to_gboolean, NULL, NULL); action = g_action_map_lookup_action (map, "sidebar2"); g_object_bind_property_full (preferences, "secondary-lateral-panel", action, "state", binding_flags, binding_gboolean_to_variant, binding_variant_to_gboolean, NULL, NULL); action = g_action_map_lookup_action (map, "status-bar"); g_object_bind_property_full (preferences, "show-status-bar", action, "state", binding_flags, binding_gboolean_to_variant, binding_variant_to_gboolean, NULL, NULL); action = g_action_map_lookup_action (map, "menubar"); g_object_bind_property_full (preferences, "show-menubar", action, "state", binding_flags, binding_gboolean_to_variant, binding_variant_to_gboolean, NULL, NULL); return builder; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-menubar.h�������������������������������������������������������������������0000664�0000000�0000000�00000012216�13435240150�0016611�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_MENU_H #define PRAGHA_MENU_H #include <gtk/gtk.h> #include "pragha-backend.h" #include "pragha.h" /* * Helper to GMenumodel definitions. * * NOTE: Remember use "<" and ">" as "<" and ">" in accelerators. */ #define NEW_MENU(_MENU) \ "<interface>" \ " <menu id='" _MENU "'>" \ " <section>" #define NEW_SUBMENU(_LABEL) \ " <submenu>" \ " <attribute name='label' translatable='yes'>" _LABEL "</attribute>" \ " <section>" #define NEW_NAMED_SUBMENU(_ID,_LABEL) \ " <submenu id='" _ID "'>" \ " <attribute name='label' translatable='yes'>" _LABEL "</attribute>" \ " <section>" #define NEW_ITEM(_LABEL,_PREFIX,_ACTION) \ " <item>" \ " <attribute name='label' translatable='yes'>" _LABEL "</attribute>" \ " <attribute name='action'>" _PREFIX "." _ACTION "</attribute>" \ " </item>" #define NEW_ACCEL_ITEM(_LABEL,_ACCEL,_PREFIX,_ACTION) \ " <item>" \ " <attribute name='label' translatable='yes'>" _LABEL "</attribute>" \ " <attribute name='action'>" _PREFIX "." _ACTION "</attribute>" \ " <attribute name='accel'>" _ACCEL "</attribute>" \ " </item>" #define NEW_ICON_ITEM(_LABEL,_ICON,_PREFIX,_ACTION) \ " <item>" \ " <attribute name='label' translatable='yes'>" _LABEL "</attribute>" \ " <attribute name='action'>" _PREFIX "." _ACTION "</attribute>" \ " <attribute name='icon'>" _ICON "</attribute>" \ " </item>" #define NEW_ICON_ACCEL_ITEM(_LABEL,_ICON,_ACCEL,_PREFIX,_ACTION) \ " <item>" \ " <attribute name='label' translatable='yes'>" _LABEL "</attribute>" \ " <attribute name='action'>" _PREFIX "." _ACTION "</attribute>" \ " <attribute name='icon'>" _ICON "</attribute>" \ " <attribute name='accel'>" _ACCEL "</attribute>" \ " </item>" #define SEPARATOR \ " </section>" \ " <section>" #define NEW_PLACEHOLDER(_TAG) \ " <section id='" _TAG "'/>" #define OPEN_PLACEHOLDER(_TAG) \ " <section id='" _TAG "'>" #define CLOSE_PLACEHOLDER \ " </section>" #define CLOSE_SUBMENU \ " </section>" \ " </submenu>" #define CLOSE_MENU \ " </section>" \ " </menu>" \ "</interface>" #define NEW_POPUP(_POPUP) \ "<interface>" \ " <menu id='" _POPUP "'>" \ " <section>" #define CLOSE_POPUP \ " </section>" \ " </menu>" \ "</interface>" void pragha_menubar_update_playback_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data); /* * Public api.. */ void pragha_menubar_connect_signals (GtkUIManager *menu_ui_manager, PraghaApplication *pragha); void pragha_menubar_set_enable_action (GtkWindow *window, const char *action_name, gboolean enabled); void pragha_menubar_append_action (PraghaApplication *pragha, const gchar *placeholder, GSimpleAction *action, GMenuItem *item); void pragha_menubar_remove_action (PraghaApplication *pragha, const gchar *placeholder, const gchar *action_name); void pragha_menubar_append_submenu (PraghaApplication *pragha, const gchar *placeholder, const gchar *xml_ui, const gchar *menu_id, const gchar *label, gpointer user_data); void pragha_menubar_remove_by_id (PraghaApplication *pragha, const gchar *placeholder, const gchar *item_id); GtkUIManager *pragha_menubar_new (void); GtkBuilder *pragha_gmenu_toolbar_new (PraghaApplication *pragha); #endif /* PRAGHA_MENU_H */����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-music-enum.c����������������������������������������������������������������0000664�0000000�0000000�00000010663�13435240150�0017241�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-music-enum.h" #include "pragha-musicobject.h" struct _PraghaMusicEnumItem { gchar *name; gint code; }; typedef struct _PraghaMusicEnumItem PraghaMusicEnumItem; struct _PraghaMusicEnum { GObject _parent; PraghaMusicEnumItem map[MAX_ENUM_SIZE]; gint size; }; enum { SIGNAL_ENUM_REMOVED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(PraghaMusicEnum, pragha_music_enum, G_TYPE_OBJECT) static void pragha_music_enum_finalize (GObject *object) { PraghaMusicEnum *enum_map = PRAGHA_MUSIC_ENUM(object); gint i = 0; for (i = 0; i <= enum_map->size; i++) { if (enum_map->map[i].name == NULL) continue; g_free (enum_map->map[i].name); } G_OBJECT_CLASS(pragha_music_enum_parent_class)->finalize(object); } static void pragha_music_enum_class_init (PraghaMusicEnumClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->finalize = pragha_music_enum_finalize; signals[SIGNAL_ENUM_REMOVED] = g_signal_new ("enum-removed", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaMusicEnumClass, enum_removed), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); } static void pragha_music_enum_init (PraghaMusicEnum *enum_map) { gint i = 0, code = 0; /* TODO: Add props to this!. */ gint min_enum = FILE_USER_0; gint max_enum = FILE_USER_L; /* Set size */ enum_map->size = max_enum - min_enum; if (enum_map->size > MAX_ENUM_SIZE) enum_map->size = MAX_ENUM_SIZE; for (i = 0, code = min_enum; i <= enum_map->size; i++, code++) { enum_map->map[i].name = NULL; if (i <= enum_map->size) enum_map->map[i].code = code; else enum_map->map[i].code = -1; } } PraghaMusicEnum * pragha_music_enum_get (void) { static PraghaMusicEnum *enum_map = NULL; if (G_UNLIKELY (enum_map == NULL)) { enum_map = g_object_new (PRAGHA_TYPE_MUSIC_ENUM, NULL); g_object_add_weak_pointer (G_OBJECT (enum_map), (gpointer) &enum_map); } else { g_object_ref (G_OBJECT(enum_map)); } return enum_map; } const gchar * pragha_music_enum_map_get_name (PraghaMusicEnum *enum_map, gint enum_code) { return enum_map->map[enum_code].name; } gint pragha_music_enum_map_get (PraghaMusicEnum *enum_map, const gchar *name) { gint i = 0; /* First check if exist */ for (i = 0; i <= enum_map->size; i++) { if (enum_map->map[i].name == NULL) continue; if (g_ascii_strcasecmp(name, enum_map->map[i].name) == 0) return enum_map->map[i].code; } /* Add a new enum */ for (i = 0; i <= enum_map->size; i++) { if (enum_map->map[i].name == NULL) { enum_map->map[i].name = g_strdup(name); return enum_map->map[i].code; } } return -1; } gint pragha_music_enum_map_remove (PraghaMusicEnum *enum_map, const gchar *name) { gint i = 0; for (i = 0; i <= enum_map->size; i++) { if (enum_map->map[i].name == NULL) continue; if (g_ascii_strcasecmp (name, enum_map->map[i].name) == 0) { g_free (enum_map->map[i].name); enum_map->map[i].name = NULL; g_signal_emit (enum_map, signals[SIGNAL_ENUM_REMOVED], 0, enum_map->map[i].code); return enum_map->map[i].code; } } return -1; } �����������������������������������������������������������������������������pragha-1.3.4/src/pragha-music-enum.h����������������������������������������������������������������0000664�0000000�0000000�00000005247�13435240150�0017250�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_MUSIC_ENUM_H #define PRAGHA_MUSIC_ENUM_H #include <glib.h> #include <glib-object.h> G_BEGIN_DECLS #define MAX_ENUM_SIZE 10 #define PRAGHA_TYPE_MUSIC_ENUM (pragha_music_enum_get_type()) #define PRAGHA_MUSIC_ENUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnum)) #define PRAGHA_MUSIC_ENUM_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnum const)) #define PRAGHA_MUSIC_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnumClass)) #define PRAGHA_IS_MUSIC_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_MUSIC_ENUM)) #define PRAGHA_IS_MUSIC_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_MUSIC_ENUM)) #define PRAGHA_MUSIC_ENUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnumClass)) typedef struct _PraghaMusicEnum PraghaMusicEnum; typedef struct _PraghaMusicEnumClass PraghaMusicEnumClass; struct _PraghaMusicEnumClass { GObjectClass parent_class; void (*enum_removed) (PraghaMusicEnum *enum_map, gint enum_removed); }; PraghaMusicEnum *pragha_music_enum_get (void); const gchar *pragha_music_enum_map_get_name (PraghaMusicEnum *enum_map, gint enum_code); gint pragha_music_enum_map_get (PraghaMusicEnum *enum_map, const gchar *name); gint pragha_music_enum_map_remove (PraghaMusicEnum *enum_map, const gchar *name); G_END_DECLS #endif /* PRAGHA_MUSIC_ENUM_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-musicobject-mgmt.c����������������������������������������������������������0000664�0000000�0000000�00000013777�13435240150�0020441�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-musicobject-mgmt.h" #include <glib.h> #include <glib/gstdio.h> #include "pragha-file-utils.h" #include "pragha-playlists-mgmt.h" #include "pragha-tags-mgmt.h" PraghaMusicobject * new_musicobject_from_file(const gchar *file) { PraghaMusicobject *mobj = NULL; PraghaMediaType ftype = MEDIA_TYPE_UNKNOWN; gchar *mime_type = NULL; gboolean ret = FALSE; CDEBUG(DBG_MOBJ, "Creating new musicobject from file: %s", file); ftype = pragha_file_get_media_type (file); if (ftype != MEDIA_TYPE_AUDIO) return NULL; mime_type = pragha_file_get_music_type(file); mobj = g_object_new (PRAGHA_TYPE_MUSICOBJECT, "file", file, "source", FILE_LOCAL, "mime-type", mime_type, NULL); g_free (mime_type); ret = pragha_musicobject_set_tags_from_file (mobj, file); if (G_LIKELY(ret)) return mobj; else { g_critical("Fail to create musicobject from file"); g_object_unref(mobj); } return NULL; } PraghaMusicobject * new_musicobject_from_db(PraghaDatabase *cdbase, gint location_id) { PraghaMusicobject *mobj = NULL; CDEBUG(DBG_MOBJ, "Creating new musicobject with location id: %d", location_id); const gchar *sql = "SELECT \ MIME_TYPE.name, \ TRACK.samplerate, \ TRACK.channels, \ TRACK.length, \ TRACK.bitrate, \ COMMENT.name, \ YEAR.year, \ TRACK.track_no, \ GENRE.name, \ ALBUM.name, \ ARTIST.name, \ TRACK.title, \ LOCATION.name \ FROM MIME_TYPE, TRACK, COMMENT, YEAR, GENRE, ALBUM, ARTIST, LOCATION \ WHERE TRACK.location = ? \ AND MIME_TYPE.id = TRACK.file_type \ AND COMMENT.id = TRACK.comment \ AND YEAR.id = TRACK.year \ AND GENRE.id = TRACK.genre \ AND ALBUM.id = TRACK.album \ AND ARTIST.id = TRACK.artist \ AND LOCATION.id = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); pragha_prepared_statement_bind_int (statement, 1, location_id); pragha_prepared_statement_bind_int (statement, 2, location_id); if (pragha_prepared_statement_step (statement)) { mobj = g_object_new (PRAGHA_TYPE_MUSICOBJECT, "file", pragha_prepared_statement_get_string (statement, 12), "source", FILE_LOCAL, "mime-type", pragha_prepared_statement_get_string (statement, 0), "title", pragha_prepared_statement_get_string (statement, 11), "artist", pragha_prepared_statement_get_string (statement, 10), "album", pragha_prepared_statement_get_string (statement, 9), "genre", pragha_prepared_statement_get_string (statement, 8), "comment", pragha_prepared_statement_get_string (statement, 5), "year", pragha_prepared_statement_get_int (statement, 6), "track-no", pragha_prepared_statement_get_int (statement, 7), "length", pragha_prepared_statement_get_int (statement, 3), "bitrate", pragha_prepared_statement_get_int (statement, 4), "channels", pragha_prepared_statement_get_int (statement, 2), "samplerate", pragha_prepared_statement_get_int (statement, 1), NULL); } else { g_critical("Track with location id : %d not found in DB", location_id); } pragha_prepared_statement_free (statement); return mobj; } PraghaMusicobject * new_musicobject_from_location(const gchar *uri, const gchar *name) { PraghaMusicobject *mobj = NULL; CDEBUG(DBG_MOBJ, "Creating new musicobject to location: %s", uri); mobj = g_object_new (PRAGHA_TYPE_MUSICOBJECT, "file", uri, "source", FILE_HTTP, NULL); if (name) pragha_musicobject_set_title(mobj, name); return mobj; } void pragha_update_musicobject_change_tag(PraghaMusicobject *mobj, gint changed, PraghaMusicobject *nmobj) { if (!changed) return; CDEBUG(DBG_VERBOSE, "Tags Updates: 0x%x", changed); if (changed & TAG_TNO_CHANGED) { pragha_musicobject_set_track_no(mobj, pragha_musicobject_get_track_no(nmobj)); } if (changed & TAG_TITLE_CHANGED) { pragha_musicobject_set_title(mobj, pragha_musicobject_get_title(nmobj)); } if (changed & TAG_ARTIST_CHANGED) { pragha_musicobject_set_artist (mobj, pragha_musicobject_get_artist(nmobj)); } if (changed & TAG_ALBUM_CHANGED) { pragha_musicobject_set_album(mobj, pragha_musicobject_get_album(nmobj)); } if (changed & TAG_GENRE_CHANGED) { pragha_musicobject_set_genre(mobj, pragha_musicobject_get_genre(nmobj)); } if (changed & TAG_YEAR_CHANGED) { pragha_musicobject_set_year(mobj, pragha_musicobject_get_year(nmobj)); } if (changed & TAG_COMMENT_CHANGED) { pragha_musicobject_set_comment(mobj, pragha_musicobject_get_comment(nmobj)); } } �pragha-1.3.4/src/pragha-musicobject-mgmt.h����������������������������������������������������������0000664�0000000�0000000�00000004040�13435240150�0020425�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_MUSICOBJECT_MGMT_H #define PRAGHA_MUSICOBJECT_MGMT_H #include "pragha-musicobject.h" #include "pragha-database.h" /* Flags to control tags changed. */ #define TAG_TNO_CHANGED 1<<0 #define TAG_TITLE_CHANGED 1<<1 #define TAG_ARTIST_CHANGED 1<<2 #define TAG_ALBUM_CHANGED 1<<3 #define TAG_GENRE_CHANGED 1<<4 #define TAG_YEAR_CHANGED 1<<5 #define TAG_COMMENT_CHANGED 1<<6 PraghaMusicobject* new_musicobject_from_file(const gchar *file); PraghaMusicobject* new_musicobject_from_db(PraghaDatabase *cdbase, gint location_id); PraghaMusicobject* new_musicobject_from_location(const gchar *uri, const gchar *name); void pragha_update_musicobject_change_tag(PraghaMusicobject *mobj, gint changed, PraghaMusicobject *nmobj); #endif /* PRAGHA_MUSICOBJECT_MGMT_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-musicobject.c���������������������������������������������������������������0000664�0000000�0000000�00000050507�13435240150�0017467�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-musicobject.h" G_DEFINE_TYPE(PraghaMusicobject, pragha_musicobject, G_TYPE_OBJECT) struct _PraghaMusicobjectPrivate { gchar *file; PraghaMusicSource source; gchar *mime_type; gchar *title; gchar *artist; gchar *album; gchar *genre; gchar *comment; guint year; guint track_no; gint length; gint bitrate; gint channels; gint samplerate; }; enum { PROP_0, PROP_FILE, PROP_SOURCE, PROP_MIME_TYPE, PROP_TITLE, PROP_ARTIST, PROP_ALBUM, PROP_GENRE, PROP_COMMENT, PROP_YEAR, PROP_TRACK_NO, PROP_LENGTH, PROP_BITRATE, PROP_CHANNELS, PROP_SAMPLERATE, LAST_PROP }; static GParamSpec *gParamSpecs[LAST_PROP]; /** * pragha_musicobject_new: * */ PraghaMusicobject * pragha_musicobject_new (void) { return g_object_new (PRAGHA_TYPE_MUSICOBJECT, NULL); } /** * pragha_musicobject_dup: * */ PraghaMusicobject * pragha_musicobject_dup (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return g_object_new (PRAGHA_TYPE_MUSICOBJECT, "file", pragha_musicobject_get_file(musicobject), "source", pragha_musicobject_get_source (musicobject), "mime-type", pragha_musicobject_get_mime_type(musicobject), "title", pragha_musicobject_get_title(musicobject), "artist", pragha_musicobject_get_artist(musicobject), "album", pragha_musicobject_get_album(musicobject), "genre", pragha_musicobject_get_genre(musicobject), "comment", pragha_musicobject_get_comment(musicobject), "year", pragha_musicobject_get_year(musicobject), "track-no", pragha_musicobject_get_track_no(musicobject), "length", pragha_musicobject_get_length(musicobject), "bitrate", pragha_musicobject_get_bitrate(musicobject), "channels", pragha_musicobject_get_channels(musicobject), "samplerate", pragha_musicobject_get_samplerate(musicobject), NULL); } /** * pragha_musicobject_clean: * */ void pragha_musicobject_clean (PraghaMusicobject *musicobject) { g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); g_object_set (musicobject, "file", "", "source", FILE_NONE, "mime-type", "", "title", "", "artist", "", "album", "", "genre", "", "comment", "", "year", 0, "track-no", 0, "length", 0, "bitrate", 0, "channels", 0, "samplerate", 0, NULL); } /** * pragha_musicobject_compare: * */ gint pragha_musicobject_compare (PraghaMusicobject *a, PraghaMusicobject *b) { /* First compare the pointers */ if(a == b) return 0; /* Then compare filenames. */ return g_strcmp0(pragha_musicobject_get_file(a), pragha_musicobject_get_file(b)); } /** * pragha_musicobject_get_file: * */ const gchar * pragha_musicobject_get_file (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->file; } /** * pragha_musicobject_set_file: * */ void pragha_musicobject_set_file (PraghaMusicobject *musicobject, const gchar *file) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free(priv->file); priv->file = g_strdup(file); } /** * pragha_musicobject_is_local_file: * */ gboolean pragha_musicobject_is_local_file (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), FALSE); PraghaMusicSource source = musicobject->priv->source; return (source == FILE_LOCAL); } /** * pragha_musicobject_get_source: * */ PraghaMusicSource pragha_musicobject_get_source (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), FILE_NONE); return musicobject->priv->source; } /** * pragha_musicobject_set_source: * */ void pragha_musicobject_set_source (PraghaMusicobject *musicobject, PraghaMusicSource source) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->source = source; } /** * pragha_musicobject_get_mime_type: * */ const gchar * pragha_musicobject_get_mime_type (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->mime_type; } /** * pragha_musicobject_set_mime_type: * */ void pragha_musicobject_set_mime_type (PraghaMusicobject *musicobject, const gchar *mime_type) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free (priv->mime_type); priv->mime_type = g_strdup(mime_type); } /** * pragha_musicobject_get_title: * */ const gchar * pragha_musicobject_get_title (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->title; } /** * pragha_musicobject_set_title: * */ void pragha_musicobject_set_title (PraghaMusicobject *musicobject, const gchar *title) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free(priv->title); priv->title = g_strdup(title); } /** * pragha_musicobject_get_artist: * */ const gchar * pragha_musicobject_get_artist (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->artist; } /** * pragha_musicobject_set_artist: * */ void pragha_musicobject_set_artist (PraghaMusicobject *musicobject, const gchar *artist) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free(priv->artist); priv->artist = g_strdup(artist); } /** * pragha_musicobject_get_album: * */ const gchar * pragha_musicobject_get_album (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->album; } /** * pragha_musicobject_set_album: * */ void pragha_musicobject_set_album (PraghaMusicobject *musicobject, const gchar *album) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free(priv->album); priv->album = g_strdup(album); } /** * pragha_musicobject_get_genre: * */ const gchar * pragha_musicobject_get_genre (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->genre; } /** * pragha_musicobject_set_genre: * */ void pragha_musicobject_set_genre (PraghaMusicobject *musicobject, const gchar *genre) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free(priv->genre); priv->genre = g_strdup(genre); } /** * pragha_musicobject_get_comment: * */ const gchar * pragha_musicobject_get_comment (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), NULL); return musicobject->priv->comment; } /** * pragha_musicobject_set_comment: * */ void pragha_musicobject_set_comment (PraghaMusicobject *musicobject, const gchar *comment) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; g_free(priv->comment); priv->comment = g_strdup(comment); } /** * pragha_musicobject_get_year: * */ guint pragha_musicobject_get_year (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), 0); return musicobject->priv->year; } /** * pragha_musicobject_set_year: * */ void pragha_musicobject_set_year (PraghaMusicobject *musicobject, guint year) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->year = year; } /** * pragha_musicobject_get_track_no: * */ guint pragha_musicobject_get_track_no (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), 0); return musicobject->priv->track_no; } /** * pragha_musicobject_set_track_no: * */ void pragha_musicobject_set_track_no (PraghaMusicobject *musicobject, guint track_no) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->track_no = track_no; } /** * pragha_musicobject_get_length: * */ gint pragha_musicobject_get_length (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), 0); return musicobject->priv->length; } /** * pragha_musicobject_set_length: * */ void pragha_musicobject_set_length (PraghaMusicobject *musicobject, gint length) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->length = length; } /** * pragha_musicobject_get_bitrate: * */ gint pragha_musicobject_get_bitrate (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), 0); return musicobject->priv->bitrate; } /** * pragha_musicobject_set_bitrate: * */ void pragha_musicobject_set_bitrate (PraghaMusicobject *musicobject, gint bitrate) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->bitrate = bitrate; } /** * pragha_musicobject_get_channels: * */ gint pragha_musicobject_get_channels (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), 0); return musicobject->priv->channels; } /** * pragha_musicobject_set_channels: * */ void pragha_musicobject_set_channels (PraghaMusicobject *musicobject, gint channels) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->channels = channels; } /** * pragha_musicobject_get_samplerate: * */ gint pragha_musicobject_get_samplerate (PraghaMusicobject *musicobject) { g_return_val_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject), 0); return musicobject->priv->samplerate; } /** * pragha_musicobject_set_samplerate: * */ void pragha_musicobject_set_samplerate (PraghaMusicobject *musicobject, gint samplerate) { PraghaMusicobjectPrivate *priv; g_return_if_fail(PRAGHA_IS_MUSICOBJECT(musicobject)); priv = musicobject->priv; priv->samplerate = samplerate; } static void pragha_musicobject_finalize (GObject *object) { PraghaMusicobjectPrivate *priv; priv = PRAGHA_MUSICOBJECT(object)->priv; g_free(priv->file); g_free(priv->mime_type); g_free(priv->title); g_free(priv->artist); g_free(priv->album); g_free(priv->genre); g_free(priv->comment); G_OBJECT_CLASS(pragha_musicobject_parent_class)->finalize(object); } static void pragha_musicobject_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { PraghaMusicobject *musicobject = PRAGHA_MUSICOBJECT(object); switch (prop_id) { case PROP_FILE: g_value_set_string (value, pragha_musicobject_get_file(musicobject)); break; case PROP_SOURCE: g_value_set_int(value, pragha_musicobject_get_source(musicobject)); break; case PROP_MIME_TYPE: g_value_set_string (value, pragha_musicobject_get_mime_type(musicobject)); break; case PROP_TITLE: g_value_set_string (value, pragha_musicobject_get_title(musicobject)); break; case PROP_ARTIST: g_value_set_string (value, pragha_musicobject_get_artist(musicobject)); break; case PROP_ALBUM: g_value_set_string (value, pragha_musicobject_get_album(musicobject)); break; case PROP_GENRE: g_value_set_string (value, pragha_musicobject_get_genre(musicobject)); break; case PROP_COMMENT: g_value_set_string (value, pragha_musicobject_get_comment(musicobject)); break; case PROP_YEAR: g_value_set_uint (value, pragha_musicobject_get_year(musicobject)); break; case PROP_TRACK_NO: g_value_set_uint (value, pragha_musicobject_get_track_no(musicobject)); break; case PROP_LENGTH: g_value_set_int(value, pragha_musicobject_get_length(musicobject)); break; case PROP_BITRATE: g_value_set_int(value, pragha_musicobject_get_bitrate(musicobject)); break; case PROP_CHANNELS: g_value_set_int(value, pragha_musicobject_get_channels(musicobject)); break; case PROP_SAMPLERATE: g_value_set_int(value, pragha_musicobject_get_samplerate(musicobject)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void pragha_musicobject_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PraghaMusicobject *musicobject = PRAGHA_MUSICOBJECT(object); switch (prop_id) { case PROP_FILE: pragha_musicobject_set_file(musicobject, g_value_get_string(value)); break; case PROP_SOURCE: pragha_musicobject_set_source(musicobject, g_value_get_int(value)); break; case PROP_MIME_TYPE: pragha_musicobject_set_mime_type(musicobject, g_value_get_string(value)); break; case PROP_TITLE: pragha_musicobject_set_title(musicobject, g_value_get_string(value)); break; case PROP_ARTIST: pragha_musicobject_set_artist(musicobject, g_value_get_string(value)); break; case PROP_ALBUM: pragha_musicobject_set_album(musicobject, g_value_get_string(value)); break; case PROP_GENRE: pragha_musicobject_set_genre(musicobject, g_value_get_string(value)); break; case PROP_COMMENT: pragha_musicobject_set_comment(musicobject, g_value_get_string(value)); break; case PROP_YEAR: pragha_musicobject_set_year(musicobject, g_value_get_uint(value)); break; case PROP_TRACK_NO: pragha_musicobject_set_track_no(musicobject, g_value_get_uint(value)); break; case PROP_LENGTH: pragha_musicobject_set_length(musicobject, g_value_get_int(value)); break; case PROP_BITRATE: pragha_musicobject_set_bitrate(musicobject, g_value_get_int(value)); break; case PROP_CHANNELS: pragha_musicobject_set_channels(musicobject, g_value_get_int(value)); break; case PROP_SAMPLERATE: pragha_musicobject_set_samplerate(musicobject, g_value_get_int(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void pragha_musicobject_class_init (PraghaMusicobjectClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->finalize = pragha_musicobject_finalize; object_class->get_property = pragha_musicobject_get_property; object_class->set_property = pragha_musicobject_set_property; g_type_class_add_private(object_class, sizeof(PraghaMusicobjectPrivate)); /** * PraghaMusicobject:file: * */ gParamSpecs[PROP_FILE] = g_param_spec_string("file", "File", "The File", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:source: * */ gParamSpecs[PROP_SOURCE] = g_param_spec_int ("source", "Source", "Source of file", FILE_HTTP, FILE_USER_L, FILE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaMusicobject:mime_type: * */ gParamSpecs[PROP_MIME_TYPE] = g_param_spec_string("mime-type", "MimeType", "The MimeType", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:title: * */ gParamSpecs[PROP_TITLE] = g_param_spec_string("title", "Title", "The Title", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:artist: * */ gParamSpecs[PROP_ARTIST] = g_param_spec_string("artist", "Artist", "The Artist", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:album: * */ gParamSpecs[PROP_ALBUM] = g_param_spec_string("album", "Album", "The Album", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:genre: * */ gParamSpecs[PROP_GENRE] = g_param_spec_string("genre", "Genre", "The Genre", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:comment: * */ gParamSpecs[PROP_COMMENT] = g_param_spec_string("comment", "Comment", "The Comment", "", PRAGHA_MUSICOBJECT_PARAM_STRING); /** * PraghaMusicobject:year: * */ gParamSpecs[PROP_YEAR] = g_param_spec_uint ("year", "Year", "The Year", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaMusicobject:track_no: * */ gParamSpecs[PROP_TRACK_NO] = g_param_spec_uint ("track-no", "TrackNo", "The Track No", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaMusicobject:length: * */ gParamSpecs[PROP_LENGTH] = g_param_spec_int ("length", "Length", "The Length", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaMusicobject:bitrate: * */ gParamSpecs[PROP_BITRATE] = g_param_spec_int ("bitrate", "Bitrate", "The Bitrate", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaMusicobject:channels: * */ gParamSpecs[PROP_CHANNELS] = g_param_spec_int ("channels", "Channels", "The Channels", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * PraghaMusicobject:samplerate: * */ gParamSpecs[PROP_SAMPLERATE] = g_param_spec_int ("samplerate", "Samplerate", "The Samplerate", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(object_class, LAST_PROP, gParamSpecs); } static void pragha_musicobject_init (PraghaMusicobject *musicobject) { musicobject->priv = G_TYPE_INSTANCE_GET_PRIVATE(musicobject, PRAGHA_TYPE_MUSICOBJECT, PraghaMusicobjectPrivate); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-musicobject.h���������������������������������������������������������������0000664�0000000�0000000�00000013074�13435240150�0017472�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_MUSICOBJECT_H #define PRAGHA_MUSICOBJECT_H #include <glib-object.h> G_BEGIN_DECLS #define PRAGHA_TYPE_MUSICOBJECT (pragha_musicobject_get_type()) #define PRAGHA_MUSICOBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_MUSICOBJECT, PraghaMusicobject)) #define PRAGHA_MUSICOBJECT_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_MUSICOBJECT, PraghaMusicobject const)) #define PRAGHA_MUSICOBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_MUSICOBJECT, PraghaMusicobjectClass)) #define PRAGHA_IS_MUSICOBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_MUSICOBJECT)) #define PRAGHA_IS_MUSICOBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_MUSICOBJECT)) #define PRAGHA_MUSICOBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_MUSICOBJECT, PraghaMusicobjectClass)) typedef struct _PraghaMusicobject PraghaMusicobject; typedef struct _PraghaMusicobjectClass PraghaMusicobjectClass; typedef struct _PraghaMusicobjectPrivate PraghaMusicobjectPrivate; struct _PraghaMusicobject { GObject parent; /*< private >*/ PraghaMusicobjectPrivate *priv; }; struct _PraghaMusicobjectClass { GObjectClass parent_class; }; /* File music types */ typedef enum { FILE_USER_L = 4, FILE_USER_3 = 3, FILE_USER_2 = 2, FILE_USER_1 = 1, FILE_USER_0 = 0, FILE_NONE = -1, FILE_LOCAL = -2, FILE_HTTP = -3 } PraghaMusicSource; #define PRAGHA_MUSICOBJECT_PARAM_STRING G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS PraghaMusicobject *pragha_musicobject_new (void); PraghaMusicobject * pragha_musicobject_dup (PraghaMusicobject *musicobject); void pragha_musicobject_clean (PraghaMusicobject *musicobject); gint pragha_musicobject_compare (PraghaMusicobject *a, PraghaMusicobject *b); GType pragha_musicobject_get_type (void) G_GNUC_CONST; const gchar * pragha_musicobject_get_file (PraghaMusicobject *musicobject); void pragha_musicobject_set_file (PraghaMusicobject *musicobject, const gchar *file); gboolean pragha_musicobject_is_local_file (PraghaMusicobject *musicobject); PraghaMusicSource pragha_musicobject_get_source (PraghaMusicobject *musicobject); void pragha_musicobject_set_source (PraghaMusicobject *musicobject, PraghaMusicSource source); const gchar * pragha_musicobject_get_mime_type (PraghaMusicobject *musicobject); void pragha_musicobject_set_mime_type (PraghaMusicobject *musicobject, const gchar *mime_type); const gchar * pragha_musicobject_get_title (PraghaMusicobject *musicobject); void pragha_musicobject_set_title (PraghaMusicobject *musicobject, const gchar *title); const gchar * pragha_musicobject_get_artist (PraghaMusicobject *musicobject); void pragha_musicobject_set_artist (PraghaMusicobject *musicobject, const gchar *artist); const gchar * pragha_musicobject_get_album (PraghaMusicobject *musicobject); void pragha_musicobject_set_album (PraghaMusicobject *musicobject, const gchar *album); const gchar * pragha_musicobject_get_genre (PraghaMusicobject *musicobject); void pragha_musicobject_set_genre (PraghaMusicobject *musicobject, const gchar *genre); const gchar * pragha_musicobject_get_comment (PraghaMusicobject *musicobject); void pragha_musicobject_set_comment (PraghaMusicobject *musicobject, const gchar *comment); guint pragha_musicobject_get_year (PraghaMusicobject *musicobject); void pragha_musicobject_set_year (PraghaMusicobject *musicobject, guint year); guint pragha_musicobject_get_track_no (PraghaMusicobject *musicobject); void pragha_musicobject_set_track_no (PraghaMusicobject *musicobject, guint track_no); gint pragha_musicobject_get_length (PraghaMusicobject *musicobject); void pragha_musicobject_set_length (PraghaMusicobject *musicobject, gint length); gint pragha_musicobject_get_bitrate (PraghaMusicobject *musicobject); void pragha_musicobject_set_bitrate (PraghaMusicobject *musicobject, gint bitrate); gint pragha_musicobject_get_channels (PraghaMusicobject *musicobject); void pragha_musicobject_set_channels (PraghaMusicobject *musicobject, gint channels); gint pragha_musicobject_get_samplerate (PraghaMusicobject *musicobject); void pragha_musicobject_set_samplerate (PraghaMusicobject *musicobject, gint samplerate); G_END_DECLS #endif /* PRAGHA_MUSICOBJECT_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-playback.c������������������������������������������������������������������0000664�0000000�0000000�00000026501�13435240150�0016743�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2010-2012 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-playback.h" #include "pragha-tags-dialog.h" #include "pragha-tagger.h" #include "pragha-musicobject-mgmt.h" #include "pragha-file-utils.h" #include "pragha-utils.h" #include "pragha.h" static void pragha_playback_update_current_album_art (PraghaApplication *pragha, PraghaMusicobject *mobj); /**********************/ /* Playback functions */ /**********************/ /* Play prev track in current playlist */ void pragha_playback_prev_track(PraghaApplication *pragha) { PraghaBackend *backend; PraghaPlaylist *playlist; CDEBUG(DBG_BACKEND, "Want to play a song previously played"); /* Are we playing right now ? */ backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; playlist = pragha_application_get_playlist (pragha); pragha_playlist_go_prev_track (playlist); } /* Start playback of a new track, or resume playback of current track */ void pragha_playback_play_pause_resume(PraghaApplication *pragha) { PraghaBackend *backend; PraghaPlaylist *playlist; CDEBUG(DBG_BACKEND, "Play pause or resume a track based on the current state"); /* New action is based on the current state */ /************************************/ /* State Action */ /* */ /* Playing Pause playback */ /* Paused Resume playback */ /* Stopped Start playback */ /************************************/ backend = pragha_application_get_backend (pragha); switch (pragha_backend_get_state (backend)) { case ST_PLAYING: pragha_backend_pause (backend); break; case ST_PAUSED: pragha_backend_resume (backend); break; case ST_STOPPED: playlist = pragha_application_get_playlist (pragha); pragha_playlist_go_any_track (playlist); break; default: break; } } /* Stop the playback */ void pragha_playback_stop(PraghaApplication *pragha) { PraghaBackend *backend; PraghaPlaylist *playlist; CDEBUG(DBG_BACKEND, "Stopping the current song"); backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; pragha_backend_stop (backend); playlist = pragha_application_get_playlist (pragha); pragha_playlist_stopped_playback (playlist); } /* Play next song when terminate a song. */ void pragha_advance_playback (PraghaApplication *pragha) { PraghaPlaylist *playlist; CDEBUG(DBG_BACKEND, "Advancing to next track"); playlist = pragha_application_get_playlist (pragha); pragha_playlist_go_next_track (playlist); } /* Play next track in current_playlist */ void pragha_playback_next_track(PraghaApplication *pragha) { PraghaBackend *backend; CDEBUG(DBG_BACKEND, "Want to advancing to next track"); /* Are we playing right now ? */ backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; /* Play a new song */ pragha_advance_playback (pragha); } gboolean pragha_playback_can_go_prev (PraghaApplication *pragha) { PraghaPlaylist *playlist; gboolean can_go_prev = FALSE; playlist = pragha_application_get_playlist (pragha); if (pragha_playlist_get_no_unplayed_tracks(playlist) < pragha_playlist_get_no_tracks(playlist)) can_go_prev = TRUE; return can_go_prev; } gboolean pragha_playback_can_go_next (PraghaApplication *pragha) { PraghaPlaylist *playlist; gboolean can_go_next = FALSE; playlist = pragha_application_get_playlist (pragha); if (pragha_playlist_get_no_unplayed_tracks(playlist) > 0) can_go_next = TRUE; return can_go_next; } gint pragha_playback_get_no_tracks (PraghaApplication *pragha) { PraghaPlaylist *playlist; playlist = pragha_application_get_playlist (pragha); return pragha_playlist_get_no_tracks(playlist); } /******************************************/ /* Update playback state based on backend */ /******************************************/ void pragha_playback_set_playlist_track (PraghaPlaylist *playlist, PraghaMusicobject *mobj, PraghaApplication *pragha) { PraghaBackend *backend; PraghaToolbar *toolbar; CDEBUG(DBG_BACKEND, "Set track activated on playlist"); /* Stop to set ready and clear all info */ backend = pragha_application_get_backend (pragha); pragha_backend_stop (backend); if (!mobj) return; /* Play new song. */ pragha_backend_set_musicobject (backend, mobj); pragha_backend_play (backend); /* Update current song info */ toolbar = pragha_application_get_toolbar (pragha); pragha_toolbar_set_title (toolbar, mobj); pragha_toolbar_update_progress (toolbar, pragha_musicobject_get_length(mobj), 0); /* Update album art */ pragha_playback_update_current_album_art (pragha, mobj); } void pragha_backend_finished_song (PraghaBackend *backend, PraghaApplication *pragha) { pragha_advance_playback(pragha); } void pragha_backend_tags_changed (PraghaBackend *backend, gint changed, PraghaApplication *pragha) { PraghaPlaylist *playlist; PraghaToolbar *toolbar; PraghaMusicobject *nmobj; if(pragha_backend_get_state (backend) != ST_PLAYING) return; nmobj = pragha_backend_get_musicobject(backend); /* Update change on gui */ toolbar = pragha_application_get_toolbar (pragha); pragha_toolbar_set_title(toolbar, nmobj); /* Update the playlist */ playlist = pragha_application_get_playlist (pragha); pragha_playlist_update_current_track (playlist, changed, nmobj); } static void pragha_playback_update_current_album_art (PraghaApplication *pragha, PraghaMusicobject *mobj) { PraghaToolbar *toolbar; PraghaPreferences *preferences; PraghaArtCache *art_cache; gchar *album_path = NULL, *path = NULL; CDEBUG(DBG_INFO, "Update album art"); if (G_UNLIKELY(!mobj)) return; preferences = pragha_application_get_preferences (pragha); if (!pragha_preferences_get_show_album_art (preferences)) return; art_cache = pragha_application_get_art_cache (pragha); album_path = pragha_art_cache_get_uri (art_cache, pragha_musicobject_get_artist(mobj), pragha_musicobject_get_album(mobj)); if (album_path == NULL) { if (!pragha_musicobject_is_local_file(mobj)) return; path = g_path_get_dirname(pragha_musicobject_get_file(mobj)); album_path = get_pref_image_path_dir (preferences, path); if (!album_path) album_path = get_image_path_from_dir(path); g_free(path); } toolbar = pragha_application_get_toolbar (pragha); pragha_toolbar_set_image_album_art (toolbar, album_path); g_free(album_path); } void pragha_playback_show_current_album_art (GObject *object, PraghaApplication *pragha) { PraghaAlbumArt *albumart; gchar *uri = NULL; PraghaBackend *backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) return; albumart = pragha_toolbar_get_album_art (pragha_application_get_toolbar (pragha)); const gchar *albumart_path = pragha_album_art_get_path (albumart); if (!albumart_path) return; #ifdef G_OS_WIN32 uri = g_strdup (albumart_path); #else uri = g_filename_to_uri (albumart_path, NULL, NULL); #endif open_url(uri, pragha_application_get_window (pragha)); g_free (uri); } static void pragha_edit_tags_dialog_response (GtkWidget *dialog, gint response_id, PraghaApplication *pragha) { PraghaBackend *backend; PraghaToolbar *toolbar; PraghaPlaylist *playlist; PraghaMusicobject *nmobj, *bmobj; PraghaTagger *tagger; gint changed = 0; if (response_id == GTK_RESPONSE_HELP) { nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); pragha_track_properties_dialog(nmobj, pragha_application_get_window(pragha)); return; } if (response_id == GTK_RESPONSE_OK) { changed = pragha_tags_dialog_get_changed(PRAGHA_TAGS_DIALOG(dialog)); if(changed) { nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); backend = pragha_application_get_backend (pragha); if(pragha_backend_get_state (backend) != ST_STOPPED) { PraghaMusicobject *current_mobj = pragha_backend_get_musicobject (backend); if (pragha_musicobject_compare (nmobj, current_mobj) == 0) { toolbar = pragha_application_get_toolbar (pragha); playlist = pragha_application_get_playlist (pragha); /* Update public current song */ pragha_update_musicobject_change_tag (current_mobj, changed, nmobj); /* Update current song on playlist */ pragha_playlist_update_current_track(playlist, changed, nmobj); /* Update current song on backend */ bmobj = g_object_ref(pragha_backend_get_musicobject(backend)); pragha_update_musicobject_change_tag(bmobj, changed, nmobj); g_object_unref(bmobj); pragha_toolbar_set_title(toolbar, current_mobj); } } if(G_LIKELY(pragha_musicobject_is_local_file (nmobj))) { tagger = pragha_tagger_new(); pragha_tagger_add_file (tagger, pragha_musicobject_get_file(nmobj)); pragha_tagger_set_changes(tagger, nmobj, changed); pragha_tagger_apply_changes (tagger); g_object_unref(tagger); } } } gtk_widget_destroy (dialog); } void pragha_playback_edit_current_track (PraghaApplication *pragha) { PraghaBackend *backend; GtkWidget *dialog; backend = pragha_application_get_backend (pragha); if(pragha_backend_get_state (backend) == ST_STOPPED) return; dialog = pragha_tags_dialog_new(); gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(pragha_application_get_window (pragha))); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_edit_tags_dialog_response), pragha); pragha_tags_dialog_set_musicobject (PRAGHA_TAGS_DIALOG(dialog), pragha_backend_get_musicobject (backend)); gtk_widget_show (dialog); } void pragha_playback_seek_fraction (GObject *object, gdouble fraction, PraghaApplication *pragha) { gint seek = 0, length = 0; PraghaBackend *backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) != ST_PLAYING) return; length = pragha_musicobject_get_length (pragha_backend_get_musicobject (backend)); if (length == 0) return; seek = (length * fraction); if (seek >= length) seek = length; pragha_backend_seek (backend, seek); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-playback.h������������������������������������������������������������������0000664�0000000�0000000�00000004754�13435240150�0016756�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2010-2017 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_PLAYBACK_H #define PRAGHA_PLAYBACK_H #include "pragha-backend.h" #include "pragha-playlist.h" #include "pragha.h" void pragha_playback_set_playlist_track (PraghaPlaylist *playlist, PraghaMusicobject *mobj, PraghaApplication *pragha); void pragha_playback_prev_track (PraghaApplication *pragha); void pragha_playback_play_pause_resume (PraghaApplication *pragha); void pragha_playback_stop (PraghaApplication *pragha); void pragha_playback_next_track (PraghaApplication *pragha); void pragha_advance_playback (PraghaApplication *pragha); gboolean pragha_playback_can_go_prev (PraghaApplication *pragha); gboolean pragha_playback_can_go_next (PraghaApplication *pragha); gint pragha_playback_get_no_tracks (PraghaApplication *pragha); void pragha_backend_finished_song (PraghaBackend *backend, PraghaApplication *pragha); void pragha_backend_tags_changed (PraghaBackend *backend, gint changed, PraghaApplication *pragha); void pragha_playback_show_current_album_art (GObject *object, PraghaApplication *pragha); void pragha_playback_edit_current_track (PraghaApplication *pragha); void pragha_playback_seek_fraction (GObject *object, gdouble fraction, PraghaApplication *pragha); #endif /* PRAGHA_PLAYBACK_H */ ��������������������pragha-1.3.4/src/pragha-playlist.c������������������������������������������������������������������0000664�0000000�0000000�00000407432�13435240150�0017024�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-playlist.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <gdk/gdkkeysyms.h> #include "pragha-file-utils.h" #include "pragha-menubar.h" #include "pragha-utils.h" #include "pragha-playlists-mgmt.h" #include "gtkcellrendererbubble.h" #include "pragha-tagger.h" #include "pragha-tags-mgmt.h" #include "pragha-tags-dialog.h" #include "pragha-musicobject-mgmt.h" #include "pragha-dnd.h" /** * PraghaPlaylist - Pertains to the current state of the playlist * @view - The playlist tree view widget * @widget - The parent widget containing the view * @changing: If current platlist change is in progress * @no_tracks: Total no. of tracks in the current playlist * @unplayed_tracks: Total no. of tracks that haven't been played * @rand: To generate random numbers * @rand_track_refs: List of references maintained in Shuffle mode * @queue_track_refs: List of references of queued songs * @curr_rand_ref: Currently playing track in Shuffle mode * @curr_seq_ref: Currently playing track in non-Shuffle mode */ struct _PraghaPlaylist { GtkScrolledWindow __parent__; /* Global database and preferences instances */ PraghaDatabase *cdbase; PraghaPreferences *preferences; /* List view. */ GtkWidget *view; GtkTreeModel *model; GSList *columns; GSList *column_widths; /* Playback control. */ GRand *rand; GList *rand_track_refs; GSList *queue_track_refs; GtkTreeRowReference *curr_rand_ref; GtkTreeRowReference *curr_seq_ref; gint unplayed_tracks; /* Useful flags */ gboolean changing; gboolean dragging; gint no_tracks; GError *track_error; /* Pixbuf used on library tree. */ GdkPixbuf *paused_pixbuf; GdkPixbuf *playing_pixbuf; /* Menu */ GtkWidget *header_context_menu; GtkUIManager *playlist_context_menu; }; enum { PLAYLIST_SET_TRACK, PLAYLIST_CHANGE_TAGS, PLAYLIST_CHANGED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; G_DEFINE_TYPE(PraghaPlaylist, pragha_playlist, GTK_TYPE_SCROLLED_WINDOW) /* Columns in current playlist view */ #define P_TRACK_NO_STR "#" #define P_TITLE_STR N_("Title") #define P_ARTIST_STR N_("Artist") #define P_ALBUM_STR N_("Album") #define P_GENRE_STR N_("Genre") #define P_BITRATE_STR N_("Bitrate") #define P_YEAR_STR N_("Year") #define P_COMMENT_STR N_("Comment") #define P_LENGTH_STR N_("Length") #define P_FILENAME_STR N_("Filename") #define P_MIMETYPE_STR N_("Mimetype") /* * Prototypes */ static void pragha_playlist_queue_handler (PraghaPlaylist *playlist); static void pragha_playlist_dequeue_handler (PraghaPlaylist *playlist); static GtkTreePath* get_first_random_track (PraghaPlaylist *playlist); static GtkTreePath* get_prev_random_track (PraghaPlaylist *playlist); static GtkTreePath* get_prev_sequential_track (PraghaPlaylist *playlist); static GtkTreePath* get_next_queue_track (PraghaPlaylist *cplaylist); static GtkTreePath* get_next_unplayed_random_track (PraghaPlaylist *playlist); static GtkTreePath* get_next_sequential_track (PraghaPlaylist *playlist); static GtkTreePath* get_next_random_ref_track (PraghaPlaylist *playlist); static GtkTreePath* get_next_any_random_track (PraghaPlaylist *playlist); static GtkTreePath* get_nth_track (PraghaPlaylist *playlist, gint n); static GtkTreePath* get_selected_track (PraghaPlaylist *playlist); static GtkTreePath* get_current_track (PraghaPlaylist *playlist); static void pragha_playlist_update_playback_sequence (PraghaPlaylist *playlist, PraghaUpdateAction update_action, GtkTreePath *path); static void pragha_playlist_set_first_rand_ref (PraghaPlaylist *cplaylist, GtkTreePath *path); static void pragha_playlist_select_path (PraghaPlaylist *playlist, GtkTreePath *path, gboolean center); static void pragha_playlist_change_ref_list_tags (PraghaPlaylist *playlist, GList *rlist, gint changed, PraghaMusicobject *mobj); static void pragha_playlist_update_track_state (PraghaPlaylist *playlist, GtkTreePath *path, PraghaBackendState state); static void playlist_track_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_title_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_artist_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_album_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_genre_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_bitrate_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_year_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_length_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_comment_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_filename_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void playlist_mimetype_column_change_cb (GtkCheckMenuItem *item, PraghaPlaylist* cplaylist); static void clear_sort_current_playlist_cb (GtkMenuItem *item, PraghaPlaylist *cplaylist); static gint compare_track_no (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data); static gint compare_bitrate (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data); static gint compare_year (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data); static gint compare_length (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data); /* * playlist_context_menu calbacks */ static void queue_current_playlist (GtkAction *action, PraghaPlaylist *playlist); static void dequeue_current_playlist (GtkAction *action, PraghaPlaylist *playlist); static void remove_from_playlist (GtkAction *action, PraghaPlaylist *playlist); static void crop_current_playlist (GtkAction *action, PraghaPlaylist *playlist); static void current_playlist_clear_action (GtkAction *action, PraghaPlaylist *playlist); static void pragha_playlist_copy_tags (GtkAction *action, PraghaPlaylist *playlist); static void pragha_playlist_edit_tags (GtkAction *action, PraghaPlaylist *playlist); static const gchar *playlist_context_menu_xml = "<ui> \ <popup name=\"SelectionPopup\"> \ <menuitem action=\"Queue track\"/> \ <menuitem action=\"Dequeue track\"/> \ <separator/> \ <menuitem action=\"Remove from playlist\"/> \ <menuitem action=\"Crop playlist\"/> \ <menuitem action=\"Clear playlist\"/> \ <separator/> \ <menuitem action=\"Save playlist\"/> \ <menuitem action=\"Save selection\"/> \ <menu action=\"SendToMenu\"> \ <placeholder name=\"pragha-sendto-placeholder\"/> \ </menu> \ <separator/> \ <menu action=\"ToolsMenu\"> \ <placeholder name=\"pragha-plugins-placeholder\"/> \ </menu> \ <separator/> \ <menuitem action=\"Copy tag to selection\"/> \ <separator/> \ <menuitem action=\"Edit tags\"/> \ </popup> \ </ui>"; static GtkActionEntry playlist_context_aentries[] = { {"Queue track", NULL, N_("Add to playback queue"), "", "Add to playback queue", G_CALLBACK(queue_current_playlist)}, {"Dequeue track", NULL, N_("Remove from playback queue"), "", "Remove from playback queue", G_CALLBACK(dequeue_current_playlist)}, {"Remove from playlist", NULL, N_("Remove from playlist"), "", "Remove selection from playlist", G_CALLBACK(remove_from_playlist)}, {"Crop playlist", NULL, N_("Crop playlist"), "", "Remove no telected tracks of playlist", G_CALLBACK(crop_current_playlist)}, {"Clear playlist", NULL, N_("Clear playlist"), "", "Clear the current playlist", G_CALLBACK(current_playlist_clear_action)}, {"Save playlist", NULL, N_("Save playlist")}, {"Save selection", NULL, N_("Save selection")}, {"SendToMenu", NULL, N_("_Send to")}, {"ToolsMenu", NULL, N_("_Tools")}, {"Copy tag to selection", NULL, NULL, "", "Copy tag to selection", G_CALLBACK(pragha_playlist_copy_tags)}, {"Edit tags", NULL, N_("Edit track information"), "", "Edit information for this track", G_CALLBACK(pragha_playlist_edit_tags)} }; /* * Menu action callbacks. */ static void queue_current_playlist (GtkAction *action, PraghaPlaylist *playlist) { pragha_playlist_queue_handler (playlist); } static void dequeue_current_playlist (GtkAction *action, PraghaPlaylist *playlist) { pragha_playlist_dequeue_handler (playlist); } static void remove_from_playlist (GtkAction *action, PraghaPlaylist *playlist) { pragha_playlist_remove_selection (playlist); } static void crop_current_playlist (GtkAction *action, PraghaPlaylist *playlist) { pragha_playlist_crop_selection (playlist); } static void current_playlist_clear_action (GtkAction *action, PraghaPlaylist *playlist) { pragha_playlist_remove_all (playlist); } static void pragha_playlist_copy_tags (GtkAction *action, PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; gint changed = 0; GList *rlist; mobj = g_object_get_data (G_OBJECT(action), "mobj"); changed = GPOINTER_TO_INT(g_object_get_data (G_OBJECT(action), "change")); rlist = pragha_playlist_get_selection_ref_list (playlist); pragha_playlist_change_ref_list_tags (playlist, rlist, changed, mobj); g_list_free_full (rlist, (GDestroyNotify) gtk_tree_row_reference_free); } static void pragha_edit_tags_playlist_dialog_response (GtkWidget *dialog, gint response_id, PraghaPlaylist *playlist) { GtkWidget *toplevel; PraghaMusicobject *nmobj = NULL; gint changed = 0; GList *rlist = NULL; toplevel = gtk_widget_get_toplevel (GTK_WIDGET(playlist)); if (response_id == GTK_RESPONSE_HELP) { nmobj = pragha_tags_dialog_get_musicobject(PRAGHA_TAGS_DIALOG(dialog)); pragha_track_properties_dialog (nmobj, toplevel); return; } rlist = g_object_get_data (G_OBJECT (dialog), "reference-list"); if (response_id == GTK_RESPONSE_OK) { changed = pragha_tags_dialog_get_changed (PRAGHA_TAGS_DIALOG(dialog)); if(!changed) goto no_change; nmobj = pragha_tags_dialog_get_musicobject (PRAGHA_TAGS_DIALOG(dialog)); if (rlist) pragha_playlist_change_ref_list_tags (playlist, rlist, changed, nmobj); } no_change: g_list_free_full (rlist, (GDestroyNotify) gtk_tree_row_reference_free); gtk_widget_destroy (dialog); } static void pragha_playlist_edit_tags (GtkAction *action, PraghaPlaylist *playlist) { GtkWidget *dialog; GList *rlist = NULL; PraghaMusicobject *mobj; dialog = pragha_tags_dialog_new(); gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(playlist)))); /* Get a list of references and music objects selected. */ rlist = pragha_playlist_get_selection_ref_list (playlist); if(g_list_length(rlist) == 1) { mobj = pragha_playlist_get_selected_musicobject (playlist); pragha_tags_dialog_set_musicobject(PRAGHA_TAGS_DIALOG(dialog), mobj); } g_object_set_data (G_OBJECT (dialog), "reference-list", rlist); g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (pragha_edit_tags_playlist_dialog_response), playlist); gtk_widget_show (dialog); } /* * Public Api. */ PraghaMusicobject * pragha_playlist_get_prev_track (PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; GtkTreePath *path = NULL; gboolean repeat, shuffle, seq_first = FALSE; if (playlist->changing || playlist->no_tracks == 0) return NULL; repeat = pragha_preferences_get_repeat (playlist->preferences); shuffle = pragha_preferences_get_shuffle (playlist->preferences); if (shuffle) { path = get_prev_random_track (playlist); } else { path = get_prev_sequential_track (playlist); if (!path) seq_first = TRUE; } if (seq_first && repeat) path = get_nth_track (playlist, (playlist->no_tracks - 1)); if (!path) return NULL; pragha_playlist_update_playback_sequence (playlist, PLAYLIST_PREV, path); mobj = current_playlist_mobj_at_path (path, playlist); gtk_tree_path_free (path); return mobj; } PraghaMusicobject * pragha_playlist_get_any_track (PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; GtkTreePath *path = NULL; gboolean shuffle; if (playlist->changing || playlist->no_tracks == 0) return NULL; shuffle = pragha_preferences_get_shuffle (playlist->preferences); if (playlist->queue_track_refs) path = get_next_queue_track (playlist); if (!path) path = get_selected_track (playlist); if (!path) { if (shuffle) path = get_first_random_track (playlist); else path = gtk_tree_path_new_first (); } if (shuffle) pragha_playlist_set_first_rand_ref (playlist, path); pragha_playlist_update_playback_sequence (playlist, PLAYLIST_CURR, path); mobj = current_playlist_mobj_at_path (path, playlist); gtk_tree_path_free (path); return mobj; } PraghaMusicobject * pragha_playlist_get_next_track (PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; GtkTreePath *path = NULL; gboolean repeat, shuffle, rand_unplayed = FALSE, seq_last = FALSE; GList *last; if (playlist->changing || playlist->no_tracks == 0) return NULL; repeat = pragha_preferences_get_repeat (playlist->preferences); shuffle = pragha_preferences_get_shuffle (playlist->preferences); if (playlist->queue_track_refs) { path = get_next_queue_track (playlist); } else { if (shuffle) { last = g_list_last (playlist->rand_track_refs); if ((!playlist->curr_rand_ref) || (last && (playlist->curr_rand_ref == last->data))) { path = get_next_unplayed_random_track (playlist); if (!path) rand_unplayed = TRUE; } else path = get_next_random_ref_track (playlist); } else { path = get_next_sequential_track (playlist); if (!path) seq_last = TRUE; } } if (rand_unplayed && repeat) path = get_next_any_random_track (playlist); if (seq_last && repeat) path = get_nth_track (playlist, 0); if (!path) return NULL; pragha_playlist_update_playback_sequence (playlist, PLAYLIST_NEXT, path); mobj = current_playlist_mobj_at_path (path, playlist); gtk_tree_path_free (path); return mobj; } void pragha_playlist_go_prev_track (PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; mobj = pragha_playlist_get_prev_track (playlist); if (mobj) g_signal_emit (playlist, signals[PLAYLIST_SET_TRACK], 0, mobj); } void pragha_playlist_go_any_track (PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; mobj = pragha_playlist_get_any_track (playlist); g_signal_emit (playlist, signals[PLAYLIST_SET_TRACK], 0, mobj); } void pragha_playlist_go_next_track (PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; mobj = pragha_playlist_get_next_track (playlist); g_signal_emit (playlist, signals[PLAYLIST_SET_TRACK], 0, mobj); if (!mobj) pragha_playlist_stopped_playback (playlist); } void pragha_playlist_stopped_playback (PraghaPlaylist *playlist) { GtkTreePath *path; GtkTreeIter iter; gboolean ret; /* Clear playback icon. */ path = get_current_track (playlist); if (path) pragha_playlist_update_track_state (playlist, path, ST_STOPPED); /* Mark all as playable */ ret = gtk_tree_model_get_iter_first (playlist->model, &iter); while(ret) { gtk_list_store_set(GTK_LIST_STORE(playlist->model), &iter, P_PLAYED, FALSE, -1); ret = gtk_tree_model_iter_next(playlist->model, &iter); } playlist->unplayed_tracks = playlist->no_tracks; /* Remove old references */ if (playlist->rand_track_refs) { g_list_free_full(playlist->rand_track_refs, (GDestroyNotify) gtk_tree_row_reference_free); playlist->rand_track_refs = NULL; } playlist->curr_rand_ref = NULL; if (playlist->curr_seq_ref) { gtk_tree_row_reference_free (playlist->curr_seq_ref); playlist->curr_seq_ref = NULL; } gtk_tree_path_free (path); } /* Update playback state pixbuf */ static gint get_playlist_icon_size (void) { gint width, height; if (gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height)) return MAX (width, height); else return 16; } static void pragha_playlist_update_track_state (PraghaPlaylist *playlist, GtkTreePath *path, PraghaBackendState state) { GtkIconTheme *icon_theme; GdkPixbuf *pixbuf = NULL; GtkTreeIter iter; gint icon_size = 0; if (pragha_playlist_is_changing (playlist)) return; if (playlist->track_error) { icon_theme = gtk_icon_theme_get_default (); icon_size = get_playlist_icon_size (); if(playlist->track_error->code == GST_RESOURCE_ERROR_NOT_FOUND) pixbuf = gtk_icon_theme_load_icon (icon_theme, "list-remove", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); else pixbuf = gtk_icon_theme_load_icon (icon_theme, "dialog-warning", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); } else { switch (state) { case ST_PLAYING: pixbuf = playlist->playing_pixbuf; break; case ST_PAUSED: pixbuf = playlist->paused_pixbuf; break; default: break; } } if (gtk_tree_model_get_iter (playlist->model, &iter, path)) gtk_list_store_set (GTK_LIST_STORE(playlist->model), &iter, P_STATUS_PIXBUF, pixbuf, -1); if (playlist->track_error) g_object_unref (pixbuf); } void pragha_playlist_show_current_track (PraghaPlaylist *playlist) { GtkTreePath *path = NULL; gboolean shuffle = FALSE; if (pragha_playlist_is_changing (playlist)) return; path = get_current_track (playlist); if (path) { shuffle = pragha_preferences_get_shuffle (playlist->preferences); pragha_playlist_select_path (playlist, path, shuffle); gtk_tree_path_free (path); } } void pragha_playlist_set_track_error (PraghaPlaylist *playlist, GError *error) { GtkTreePath *path; CDEBUG(DBG_VERBOSE, "Set error on current playlist"); playlist->track_error = g_error_copy (error); path = get_current_track (playlist); if(path) { pragha_playlist_update_track_state (playlist, path, ST_STOPPED); gtk_tree_path_free (path); } } /* * Private api.. */ static void pragha_playlist_menu_action_set_sensitive (PraghaPlaylist *playlist, const gchar *action, gboolean sentitive) { GtkWidget *item_widget; item_widget = gtk_ui_manager_get_widget(playlist->playlist_context_menu, action); gtk_widget_set_sensitive (GTK_WIDGET(item_widget), sentitive); } static void pragha_playlist_menu_action_set_visible (PraghaPlaylist *playlist, const gchar *action, gboolean visible) { GtkWidget *item_widget; item_widget = gtk_ui_manager_get_widget(playlist->playlist_context_menu, action); gtk_widget_set_visible (GTK_WIDGET(item_widget), visible); } /* Clear current seq ref */ static void clear_curr_seq_ref(PraghaPlaylist *cplaylist) { if (!cplaylist->curr_seq_ref) return; gtk_tree_row_reference_free(cplaylist->curr_seq_ref); cplaylist->curr_seq_ref = NULL; } /* Clear cstate->curr_seq_ref if it happens to contain the given path */ static void test_clear_curr_seq_ref(GtkTreePath *path, PraghaPlaylist *cplaylist) { GtkTreePath *lpath; if (!cplaylist->curr_seq_ref) return; lpath = gtk_tree_row_reference_get_path(cplaylist->curr_seq_ref); if (!gtk_tree_path_compare(path, lpath)) { gtk_tree_row_reference_free(cplaylist->curr_seq_ref); cplaylist->curr_seq_ref = NULL; } gtk_tree_path_free(lpath); } /* Check if given ref is the current rand reference */ static gboolean is_current_rand_ref(GtkTreeRowReference *ref, PraghaPlaylist *cplaylist) { if (ref == cplaylist->curr_rand_ref) return TRUE; else return FALSE; } static void requeue_track_refs (PraghaPlaylist *cplaylist) { GSList *list = NULL; GtkTreeRowReference *ref; GtkTreeModel *model = cplaylist->model; GtkTreePath *lpath; gchar *ch_queue_no=NULL; GtkTreeIter iter; gint i=0; list = cplaylist->queue_track_refs; while (list) { ref = list->data; lpath = gtk_tree_row_reference_get_path(ref); if (gtk_tree_model_get_iter(model, &iter, lpath)){ ch_queue_no = g_strdup_printf("%d", ++i); gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_QUEUE, ch_queue_no, -1); gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_BUBBLE, TRUE, -1); g_free(ch_queue_no); } gtk_tree_path_free(lpath); list = list->next; } } /* Delete the ref corresponding to the given path */ static void delete_queue_track_refs(GtkTreePath *path, PraghaPlaylist *cplaylist) { GSList *list = NULL; GtkTreeRowReference *dref = NULL, *ref; GtkTreeModel *model = cplaylist->model; GtkTreePath *lpath; GtkTreeIter iter; if (cplaylist->queue_track_refs) { list = cplaylist->queue_track_refs; while (list) { ref = list->data; lpath = gtk_tree_row_reference_get_path(ref); if (!gtk_tree_path_compare(path, lpath)) dref = ref; if (gtk_tree_model_get_iter(model, &iter, lpath)){ gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_QUEUE, NULL, -1); gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_BUBBLE, FALSE, -1); } gtk_tree_path_free(lpath); list = list->next; } if (dref) { cplaylist->queue_track_refs = g_slist_remove(cplaylist->queue_track_refs, dref); gtk_tree_row_reference_free(dref); } } } /* Delete the ref corresponding to the given path */ static void delete_rand_track_refs(GtkTreePath *path, PraghaPlaylist *cplaylist) { GList *list; GtkTreeRowReference *ref; GtkTreePath *lpath; if (cplaylist->rand_track_refs) { list = cplaylist->rand_track_refs; while (list) { ref = list->data; lpath = gtk_tree_row_reference_get_path(ref); if (!gtk_tree_path_compare(path, lpath)) { if (is_current_rand_ref(ref, cplaylist)) cplaylist->curr_rand_ref = NULL; cplaylist->rand_track_refs = g_list_remove(cplaylist->rand_track_refs, ref); gtk_tree_row_reference_free(ref); gtk_tree_path_free(lpath); break; } gtk_tree_path_free(lpath); list = list->next; } } } /* Mark a track in current playlist as dirty */ static void pragha_playlist_set_dirty_track (PraghaPlaylist *playlist, GtkTreePath *path) { GtkTreeIter iter; if (gtk_tree_model_get_iter (playlist->model, &iter, path)) gtk_list_store_set (GTK_LIST_STORE(playlist->model), &iter, P_PLAYED, TRUE, -1); if (playlist->unplayed_tracks) playlist->unplayed_tracks--; } /* Mark a track in current playlist as dirty */ static void pragha_playlist_unset_dirty_track (PraghaPlaylist *cplaylist, GtkTreePath *path) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; if (gtk_tree_model_get_iter(model, &iter, path)) gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_PLAYED, FALSE, -1); cplaylist->unplayed_tracks++; } /* Mark all tracks in current playlist as clean */ static void pragha_playlist_clear_dirty_all (PraghaPlaylist *playlist) { GtkTreeIter iter; gboolean ret; ret = gtk_tree_model_get_iter_first (playlist->model, &iter); while(ret) { gtk_list_store_set (GTK_LIST_STORE(playlist->model), &iter, P_PLAYED, FALSE, -1); ret = gtk_tree_model_iter_next (playlist->model, &iter); } playlist->unplayed_tracks = playlist->no_tracks; } /* Remove all ref of song next current song */ static void trim_down_rand_track_refs (PraghaPlaylist *playlist) { GList *list; GtkTreeRowReference *ref; GtkTreePath *lpath; if (playlist->rand_track_refs) { list = g_list_find (playlist->rand_track_refs, playlist->curr_rand_ref); if (list) { list = g_list_next(list); while (list) { ref = list->data; lpath = gtk_tree_row_reference_get_path(ref); pragha_playlist_unset_dirty_track (playlist, lpath); playlist->rand_track_refs = g_list_remove (playlist->rand_track_refs, ref); gtk_tree_row_reference_free(ref); gtk_tree_path_free(lpath); list = list->next; } } } } /* Return the next node after the given ref */ static GtkTreeRowReference * get_rand_ref_next (PraghaPlaylist *playlist, GtkTreeRowReference *ref) { GtkTreeRowReference *ret_ref = NULL; GList *list; if (!playlist->rand_track_refs) return NULL; list = playlist->rand_track_refs; while (list) { if (ref == list->data) { ret_ref = list->next->data; break; } list = list->next; } return ret_ref; } /* Return the prev node of the given ref */ static GtkTreeRowReference * get_rand_ref_prev (PraghaPlaylist *playlist, GtkTreeRowReference *ref) { GtkTreeRowReference *ret_ref = NULL; GList *list; if (!playlist->rand_track_refs) return NULL; list = playlist->rand_track_refs; while (list) { if (ref == list->data) { ret_ref = list->prev->data; break; } list = list->next; } return ret_ref; } /* Return path of track at nth position in current playlist */ static GtkTreePath * get_nth_track (PraghaPlaylist *playlist, gint n) { GtkTreeIter iter; GtkTreePath *path = NULL; if (playlist->changing) return NULL; if(gtk_tree_model_iter_nth_child (playlist->model, &iter, NULL, n)) path = gtk_tree_model_get_path (playlist->model, &iter); return path; } /* Return path of the next queue track */ static GtkTreePath * get_next_queue_track (PraghaPlaylist *cplaylist) { GtkTreePath *path = NULL; path = gtk_tree_row_reference_get_path(cplaylist->queue_track_refs->data); /* Remove old next song. */ trim_down_rand_track_refs(cplaylist); /*Remove the queue reference and update gui. */ delete_queue_track_refs(path, cplaylist); requeue_track_refs (cplaylist); return path; } /* Return path of a first random track */ static GtkTreePath * get_first_random_track (PraghaPlaylist *playlist) { gint rnd; GtkTreePath *path = NULL; do { rnd = g_rand_int_range (playlist->rand, 0, playlist->no_tracks); path = get_nth_track (playlist, rnd); } while (playlist->no_tracks > 1 && (path == NULL)); if (!path) { g_printerr("No track at position : %d\n", rnd); return NULL; } return path; } /* Return path of next unique random track */ static GtkTreePath * get_next_unplayed_random_track (PraghaPlaylist *playlist) { gint rnd; GtkTreePath *path = NULL; GtkTreeIter iter; gboolean played = TRUE; while (played && playlist->unplayed_tracks) { rnd = g_rand_int_range (playlist->rand, 0, playlist->no_tracks); path = get_nth_track (playlist, rnd); if (!path) { g_printerr("No track at position : %d\n", rnd); return NULL; } if (gtk_tree_model_get_iter (playlist->model, &iter, path)) gtk_tree_model_get (playlist->model, &iter, P_PLAYED, &played, -1); if (played) { gtk_tree_path_free(path); path = NULL; } } return path; } /* Return path of next random track, this is called after exhausting all unique tracks */ static GtkTreePath * get_next_any_random_track (PraghaPlaylist *playlist) { gint rnd; GtkTreePath *path = NULL, *rpath; rpath = gtk_tree_row_reference_get_path (playlist->curr_rand_ref); do { rnd = g_rand_int_range (playlist->rand, 0, playlist->no_tracks); path = get_nth_track (playlist, rnd); } while (!gtk_tree_path_compare(rpath, path) && (playlist->no_tracks > 1)); gtk_tree_path_free(rpath); if (!path) { g_printerr("No track at position : %d\n", rnd); return NULL; } return path; } /* Return path of next sequential track */ static GtkTreePath * get_next_sequential_track (PraghaPlaylist *playlist) { GtkTreeIter iter; GtkTreePath *path = NULL; gboolean ret = FALSE; ret = gtk_tree_model_get_iter_first (playlist->model, &iter); /* If no tracks, return NULL. If current track has been removed from the playlist, return the first track. */ if (!playlist->curr_seq_ref && !ret) return NULL; else if (!playlist->curr_seq_ref && ret) { path = gtk_tree_model_get_path (playlist->model, &iter); return path; } path = gtk_tree_row_reference_get_path (playlist->curr_seq_ref); gtk_tree_model_get_iter (playlist->model, &iter, path); if (!gtk_tree_model_iter_next (playlist->model, &iter)) { gtk_tree_path_free(path); path = NULL; } else { gtk_tree_path_free(path); path = gtk_tree_model_get_path (playlist->model, &iter); } return path; } /* Return path of next track in the list cstate->rand_track_refs */ /* This is called when the user clicks 'next' after one/more 'prev(s)' */ static GtkTreePath * get_next_random_ref_track (PraghaPlaylist *playlist) { GtkTreePath *path = NULL; GList *i, *j; i = g_list_find (playlist->rand_track_refs, playlist->curr_rand_ref); if (i) { j = g_list_next(i); if (j) path = gtk_tree_row_reference_get_path(j->data); } return path; } /* Return path of the node previous to the current track from cstate->rand_track_refs */ static GtkTreePath * get_prev_random_track (PraghaPlaylist *playlist) { GtkTreePath *path = NULL; GList *i, *j; if (!playlist->rand_track_refs) return NULL; i = g_list_find (playlist->rand_track_refs, playlist->curr_rand_ref); if (i) { j = g_list_previous(i); if (j) path = gtk_tree_row_reference_get_path(j->data); } return path; } /* Return path of the previous sequential track */ static GtkTreePath * get_prev_sequential_track (PraghaPlaylist *playlist) { GtkTreeIter iter; GtkTreePath *path = NULL; if (!playlist->curr_seq_ref) return NULL; path = gtk_tree_row_reference_get_path (playlist->curr_seq_ref); gtk_tree_model_get_iter (playlist->model, &iter, path); if (!gtk_tree_path_prev(path)) { gtk_tree_path_free(path); path = NULL; } return path; } /* Remove all nodes and free the list */ static void clear_rand_track_refs (PraghaPlaylist *playlist) { if (playlist->rand_track_refs) { g_list_free_full (playlist->rand_track_refs, (GDestroyNotify) gtk_tree_row_reference_free); playlist->rand_track_refs = NULL; } playlist->curr_rand_ref = NULL; } /* Remove all nodes and free the list */ static void clear_queue_track_refs (PraghaPlaylist *playlist) { if (playlist->queue_track_refs) { g_slist_free_full (playlist->queue_track_refs, (GDestroyNotify) gtk_tree_row_reference_free); playlist->queue_track_refs = NULL; } } /* Comparison function for column names */ static gint compare_playlist_column_name(gconstpointer a, gconstpointer b) { const gchar *e1 = a; const gchar *e2 = b; return g_ascii_strcasecmp(e1, e2); } /* Function to add/delete columns from preferences */ static void modify_current_playlist_columns(PraghaPlaylist* cplaylist, const gchar *col_name, gboolean state) { gboolean pref_present; GSList *element; if (!col_name) { g_warning("Invalid column name"); return; } pref_present = is_present_str_list(col_name, cplaylist->columns); /* Already in preferences */ if (pref_present && state) { return; } /* Remove from preferences */ else if (pref_present && !state) { element = g_slist_find_custom(cplaylist->columns, col_name, compare_playlist_column_name); if (element) { g_free(element->data); cplaylist->columns = g_slist_delete_link(cplaylist->columns, element); } else g_warning("Column : %s not found in preferences", col_name); } /* Add to preferences */ else if (!pref_present && state) { cplaylist->columns = g_slist_append(cplaylist->columns, g_strdup(col_name)); } } /* Function to jump to track on current playlist */ static void pragha_playlist_select_path (PraghaPlaylist *playlist, GtkTreePath *path, gboolean center) { GtkTreeSelection *selection; GdkRectangle vrect, crect; gint cx, cy, cnt_selected; if (!path) return; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(playlist->view)); cnt_selected = gtk_tree_selection_count_selected_rows (selection); if (cnt_selected > 1) return; gtk_tree_selection_unselect_all (selection); gtk_tree_selection_select_path (GTK_TREE_SELECTION (selection), path); gtk_tree_view_set_cursor (GTK_TREE_VIEW(playlist->view), path, NULL, FALSE); gtk_tree_view_get_visible_rect (GTK_TREE_VIEW(playlist->view), &vrect); gtk_tree_view_get_cell_area (GTK_TREE_VIEW(playlist->view), path, NULL, &crect); gtk_tree_view_convert_widget_to_tree_coords (GTK_TREE_VIEW(playlist->view), crect.x, crect.y, &cx, &cy); if (pragha_preferences_get_shuffle(playlist->preferences) || center) { if ((cy < vrect.y) || (cy + crect.height > vrect.y + vrect.height)) { gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(playlist->view), path, NULL, TRUE, 0.5, 0.0); } } else { if (cy < vrect.y) { gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(playlist->view), path, NULL, TRUE, 0.0, 0.0); } else if (cy + crect.height > vrect.y + vrect.height) { gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(playlist->view), path, NULL, TRUE, 1.0, 0.0); } } } /* Select the song numbered according to the position in the playlist */ void select_numered_path_of_current_playlist(PraghaPlaylist *cplaylist, gint path_number, gboolean center) { GtkTreePath *path = NULL; path = get_nth_track (cplaylist, path_number); pragha_playlist_select_path (cplaylist, path, center); gtk_tree_path_free(path); } /*************************/ /* General playlist mgmt */ /*************************/ static void pragha_playlist_update_playback_sequence (PraghaPlaylist *playlist, PraghaUpdateAction update_action, GtkTreePath *path) { GtkTreeRowReference *rand_ref; GtkTreePath *opath = NULL; gboolean shuffle = FALSE; CDEBUG(DBG_VERBOSE, "Update the state from current playlist"); opath = get_current_track (playlist); if (opath) { pragha_playlist_update_track_state (playlist, opath, ST_STOPPED); gtk_tree_path_free (opath); } if (playlist->track_error) { g_error_free (playlist->track_error); playlist->track_error = NULL; } /* Append the new reference to the list of played track references to retrace the sequence */ shuffle = pragha_preferences_get_shuffle (playlist->preferences); if (!shuffle) { gtk_tree_row_reference_free(playlist->curr_seq_ref); playlist->curr_seq_ref = gtk_tree_row_reference_new (playlist->model, path); } if (shuffle) { switch (update_action) { /* If 'Prev', get the previous node from the track references */ case PLAYLIST_PREV: if (playlist->curr_rand_ref) { playlist->curr_rand_ref = get_rand_ref_prev (playlist, playlist->curr_rand_ref); } break; /* If 'Next', get the next node from the track references */ /* Do this only if the current track and the last node don't match */ case PLAYLIST_NEXT: if (playlist->curr_rand_ref) { rand_ref = g_list_last(playlist->rand_track_refs)->data; if (playlist->curr_rand_ref != rand_ref) { playlist->curr_rand_ref = get_rand_ref_next (playlist, playlist->curr_rand_ref); break; } } /* Append a new ref of the track to the track references */ case PLAYLIST_CURR: rand_ref = gtk_tree_row_reference_new (playlist->model, path); playlist->rand_track_refs = g_list_append (playlist->rand_track_refs, rand_ref); playlist->curr_rand_ref = rand_ref; break; default: break; } } /* Mark the track as dirty */ pragha_playlist_set_dirty_track (playlist, path); pragha_playlist_update_track_state (playlist, path, ST_PLAYING); pragha_playlist_select_path (playlist, path, shuffle); } void update_current_playlist_view_track(PraghaPlaylist *cplaylist, PraghaBackend *backend) { GtkTreePath *path; PraghaBackendState state; path = get_current_track (cplaylist); if(path) { state = pragha_backend_get_state (backend); pragha_playlist_update_track_state (cplaylist, path, state); gtk_tree_path_free(path); } } /* Return musicobject of the given path */ PraghaMusicobject * current_playlist_mobj_at_path(GtkTreePath *path, PraghaPlaylist *cplaylist) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; if (gtk_tree_model_get_iter(model, &iter, path)) gtk_tree_model_get(model, &iter, P_MOBJ_PTR, &mobj, -1); return mobj; } /* Return path of musicobject already in tree */ GtkTreePath* current_playlist_path_at_mobj (PraghaMusicobject *mobj, PraghaPlaylist *cplaylist) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; PraghaMusicobject *ptr = NULL; gboolean ret; ret = gtk_tree_model_get_iter_first (model, &iter); while(ret) { gtk_tree_model_get(model, &iter, P_MOBJ_PTR, &ptr, -1); if (ptr == mobj) { return gtk_tree_model_get_path(model, &iter); } ret = gtk_tree_model_iter_next(model, &iter); } return NULL; } /* Reset random rand_refs and appends given ref */ static void reset_rand_track_refs (PraghaPlaylist *playlist, GtkTreeRowReference *ref) { GtkTreePath *path; /* All songs can be played. */ pragha_playlist_clear_dirty_all (playlist); clear_rand_track_refs (playlist); /* Set the current song as played. */ playlist->rand_track_refs = g_list_append (playlist->rand_track_refs, ref); playlist->curr_rand_ref = ref; path = gtk_tree_row_reference_get_path (ref); pragha_playlist_set_dirty_track (playlist, path); gtk_tree_path_free (path); } static void pragha_playlist_set_first_rand_ref (PraghaPlaylist *playlist, GtkTreePath *path) { GtkTreeRowReference *ref; ref = gtk_tree_row_reference_new (playlist->model, path); reset_rand_track_refs (playlist, ref); } /* Return the path of the selected track */ static GtkTreePath * get_selected_track (PraghaPlaylist *cplaylist) { GtkTreeSelection *selection; GtkTreePath *path = NULL; gint cnt_selected = 0; GList *list; if(cplaylist->changing) return NULL; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); cnt_selected = gtk_tree_selection_count_selected_rows (selection); if (!cnt_selected) return NULL; else if (cnt_selected == 1) { list = gtk_tree_selection_get_selected_rows(selection, NULL); if (list) { path = list->data; g_list_free(list); } } else if (cnt_selected > 1) g_message("Selected multiple"); return path; } /* Return the path of the Actual track playing */ static GtkTreePath * get_current_track (PraghaPlaylist *cplaylist) { GtkTreePath *path=NULL; gboolean shuffle = pragha_preferences_get_shuffle(cplaylist->preferences); if (shuffle && cplaylist->curr_rand_ref) path = gtk_tree_row_reference_get_path(cplaylist->curr_rand_ref); else if (!shuffle && cplaylist->curr_seq_ref) path = gtk_tree_row_reference_get_path(cplaylist->curr_seq_ref); return path; } /* Dequeue selected rows from current playlist */ static void pragha_playlist_dequeue_handler (PraghaPlaylist *cplaylist) { GtkTreeSelection *selection; GList *list; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, NULL); g_list_foreach (list, (GFunc) delete_queue_track_refs, cplaylist); requeue_track_refs(cplaylist); g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); } /* Queue selected rows from current playlist */ static void pragha_playlist_queue_handler (PraghaPlaylist *cplaylist) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeRowReference *ref; GList *list, *l; gboolean is_queue = FALSE; GtkTreeIter iter; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); l= list; while (l) { path = l->data; if (gtk_tree_model_get_iter(model, &iter, path)) { gtk_tree_model_get(model, &iter, P_BUBBLE, &is_queue, -1); if(!is_queue) { ref = gtk_tree_row_reference_new(model, path); cplaylist->queue_track_refs = g_slist_append(cplaylist->queue_track_refs, ref); } } gtk_tree_path_free(path); l = l->next; } requeue_track_refs(cplaylist); g_list_free (list); } /* Toglle queue state of selection on current playlist. */ void toggle_queue_selected_current_playlist (PraghaPlaylist *cplaylist) { GtkTreeModel *model; GtkTreeRowReference *ref; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; gboolean is_queue = FALSE; GList *list; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); while (list) { path = list->data; if (gtk_tree_model_get_iter(model, &iter, path)) { gtk_tree_model_get(model, &iter, P_BUBBLE, &is_queue, -1); if(is_queue) delete_queue_track_refs(path, cplaylist); else { ref = gtk_tree_row_reference_new(model, path); cplaylist->queue_track_refs = g_slist_append(cplaylist->queue_track_refs, ref); } } gtk_tree_path_free(path); list = list->next; } requeue_track_refs(cplaylist); g_list_free (list); } /* Remove selected rows from current playlist */ void pragha_playlist_remove_selection (PraghaPlaylist *playlist) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeRowReference *ref; GtkTreePath *path, *next; GtkTreeIter iter; GList *list = NULL, *i = NULL; PraghaMusicobject *mobj = NULL; gboolean played = FALSE; set_watch_cursor (GTK_WIDGET(playlist)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(playlist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); if (list) { /* Select the next row to the last selected */ gtk_tree_view_get_cursor (GTK_TREE_VIEW(playlist->view), &next, NULL); do { if(gtk_tree_selection_path_is_selected(selection, next) == FALSE) break; gtk_tree_path_next(next); } while(next != NULL); gtk_tree_view_set_cursor (GTK_TREE_VIEW(playlist->view), next, NULL, FALSE); gtk_tree_path_free (next); /* Get references from the paths and store them in the 'data' portion of the list elements. This idea was inspired by code from 'claws-mail' */ for (i=list; i != NULL; i = i->next) { path = i->data; ref = gtk_tree_row_reference_new(model, path); i->data = ref; gtk_tree_path_free(path); } /* Now build iterators from the references and delete them from the store */ for (i=list; i != NULL; i = i->next) { ref = i->data; path = gtk_tree_row_reference_get_path(ref); delete_rand_track_refs (path, playlist); delete_queue_track_refs (path, playlist); test_clear_curr_seq_ref (path, playlist); if (gtk_tree_model_get_iter(model, &iter, path)) { gtk_tree_model_get(model, &iter, P_MOBJ_PTR, &mobj, -1); g_object_unref(mobj); gtk_tree_model_get(model, &iter, P_PLAYED, &played, -1); gtk_list_store_remove(GTK_LIST_STORE(model), &iter); playlist->no_tracks--; if (!played) playlist->unplayed_tracks--; } gtk_tree_path_free(path); gtk_tree_row_reference_free(ref); } g_list_free(list); } requeue_track_refs (playlist); remove_watch_cursor (GTK_WIDGET(playlist)); g_signal_emit (playlist, signals[PLAYLIST_CHANGED], 0); } /* Crop selected rows from current playlist */ void pragha_playlist_crop_selection (PraghaPlaylist *playlist) { GtkTreeIter iter; PraghaMusicobject *mobj = NULL; gboolean ret, played = FALSE; GtkTreeSelection *selection; GtkTreeRowReference *ref; GtkTreePath *path; GSList *to_delete = NULL, *i = NULL; set_watch_cursor (GTK_WIDGET(playlist)); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(playlist->view)); /* At least one row must be selected */ if (!gtk_tree_selection_count_selected_rows(selection)) return; /* Get a reference to all the nodes that are _not_ selected */ ret = gtk_tree_model_get_iter_first (playlist->model, &iter); while (ret) { if (gtk_tree_selection_iter_is_selected(selection, &iter) == FALSE) { path = gtk_tree_model_get_path (playlist->model, &iter); ref = gtk_tree_row_reference_new (playlist->model, path); to_delete = g_slist_prepend(to_delete, ref); gtk_tree_path_free(path); } ret = gtk_tree_model_iter_next (playlist->model, &iter); } /* Delete the referenced nodes */ pragha_playlist_set_changing (playlist, TRUE); gtk_tree_view_set_model(GTK_TREE_VIEW(playlist->view), NULL); for (i=to_delete; i != NULL; i = i->next) { ref = i->data; path = gtk_tree_row_reference_get_path(ref); delete_rand_track_refs (path, playlist); delete_queue_track_refs (path, playlist); test_clear_curr_seq_ref (path, playlist); if (gtk_tree_model_get_iter (playlist->model, &iter, path)) { gtk_tree_model_get (playlist->model, &iter, P_MOBJ_PTR, &mobj, -1); g_object_unref(mobj); gtk_tree_model_get (playlist->model, &iter, P_PLAYED, &played, -1); gtk_list_store_remove (GTK_LIST_STORE(playlist->model), &iter); playlist->no_tracks--; if (!played) playlist->unplayed_tracks--; /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } gtk_tree_path_free(path); gtk_tree_row_reference_free(ref); } gtk_tree_view_set_model (GTK_TREE_VIEW(playlist->view), playlist->model); pragha_playlist_set_changing (playlist, FALSE); requeue_track_refs (playlist); remove_watch_cursor (GTK_WIDGET(playlist)); g_signal_emit (playlist, signals[PLAYLIST_CHANGED], 0); g_slist_free(to_delete); } void pragha_playlist_crop_music_type (PraghaPlaylist *playlist, PraghaMusicSource music_type) { GtkTreeIter iter; PraghaMusicobject *mobj = NULL; gboolean ret, played = FALSE; GtkTreeRowReference *ref; GtkTreePath *path; GSList *to_delete = NULL, *i = NULL; set_watch_cursor (GTK_WIDGET(playlist)); /* Get a reference to all the nodes that are _not_ selected */ ret = gtk_tree_model_get_iter_first (playlist->model, &iter); while (ret) { gtk_tree_model_get (playlist->model, &iter, P_MOBJ_PTR, &mobj, -1); if (music_type == pragha_musicobject_get_source(mobj)) { path = gtk_tree_model_get_path (playlist->model, &iter); ref = gtk_tree_row_reference_new (playlist->model, path); to_delete = g_slist_prepend(to_delete, ref); gtk_tree_path_free(path); } ret = gtk_tree_model_iter_next (playlist->model, &iter); } /* Delete the referenced nodes */ pragha_playlist_set_changing (playlist, TRUE); gtk_tree_view_set_model(GTK_TREE_VIEW(playlist->view), NULL); for (i=to_delete; i != NULL; i = i->next) { ref = i->data; path = gtk_tree_row_reference_get_path(ref); delete_rand_track_refs (path, playlist); delete_queue_track_refs (path, playlist); test_clear_curr_seq_ref (path, playlist); if (gtk_tree_model_get_iter (playlist->model, &iter, path)) { gtk_tree_model_get (playlist->model, &iter, P_MOBJ_PTR, &mobj, -1); g_object_unref(mobj); gtk_tree_model_get (playlist->model, &iter, P_PLAYED, &played, -1); gtk_list_store_remove (GTK_LIST_STORE(playlist->model), &iter); playlist->no_tracks--; if (!played) playlist->unplayed_tracks--; /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } gtk_tree_path_free(path); gtk_tree_row_reference_free(ref); } gtk_tree_view_set_model (GTK_TREE_VIEW(playlist->view), playlist->model); pragha_playlist_set_changing (playlist, FALSE); requeue_track_refs (playlist); remove_watch_cursor (GTK_WIDGET(playlist)); g_signal_emit (playlist, signals[PLAYLIST_CHANGED], 0); g_slist_free(to_delete); } /* Handle key press on current playlist view. * Based on Totem Code*/ static gint current_playlist_key_press (GtkWidget *win, GdkEventKey *event, PraghaPlaylist *cplaylist) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeRowReference *ref; GtkTreeIter iter; GList *list; gint n_select = 0; gboolean is_queue = FALSE; /* Special case some shortcuts */ if (event->state != 0) { if (event->state & GDK_MOD1_MASK && event->keyval == GDK_KEY_Return) { pragha_playlist_edit_tags (NULL, cplaylist); return TRUE; } } /* If we have modifiers, and either Ctrl, Mod1 (Alt), or any * of Mod3 to Mod5 (Mod2 is num-lock...) are pressed, we * let Gtk+ handle the key */ if (event->state != 0 && ((event->state & GDK_CONTROL_MASK) || (event->state & GDK_MOD1_MASK) || (event->state & GDK_MOD3_MASK) || (event->state & GDK_MOD4_MASK) || (event->state & GDK_MOD5_MASK))) return FALSE; if (event->keyval == GDK_KEY_Delete){ pragha_playlist_remove_selection(cplaylist); return TRUE; } else if(event->keyval == GDK_KEY_q || event->keyval == GDK_KEY_Q){ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); n_select = gtk_tree_selection_count_selected_rows(selection); if(n_select==1){ list = gtk_tree_selection_get_selected_rows(selection, &model); if (gtk_tree_model_get_iter(model, &iter, list->data)){ gtk_tree_model_get(model, &iter, P_BUBBLE, &is_queue, -1); if(is_queue) delete_queue_track_refs(list->data, cplaylist); else{ ref = gtk_tree_row_reference_new(model, list->data); cplaylist->queue_track_refs = g_slist_append(cplaylist->queue_track_refs, ref); } requeue_track_refs(cplaylist); } gtk_tree_path_free(list->data); g_list_free (list); } return TRUE; } return FALSE; } void pragha_playlist_remove_all (PraghaPlaylist *playlist) { GtkTreeIter iter; PraghaMusicobject *mobj = NULL; gboolean ret; set_watch_cursor (GTK_WIDGET(playlist)); clear_rand_track_refs(playlist); clear_queue_track_refs(playlist); clear_curr_seq_ref(playlist); ret = gtk_tree_model_get_iter_first (playlist->model, &iter); while (ret) { gtk_tree_model_get (playlist->model, &iter, P_MOBJ_PTR, &mobj, -1); g_object_unref(mobj); ret = gtk_tree_model_iter_next (playlist->model, &iter); } gtk_list_store_clear (GTK_LIST_STORE(playlist->model)); remove_watch_cursor (GTK_WIDGET(playlist)); playlist->no_tracks = 0; playlist->unplayed_tracks = 0; g_signal_emit (playlist, signals[PLAYLIST_CHANGED], 0); } /* Update a list of references in the current playlist */ static gboolean pragha_playlist_update_ref_list_change_tags(PraghaPlaylist *cplaylist, GList *list, gint changed, PraghaMusicobject *nmobj) { PraghaMusicobject *mobj = NULL; PraghaTagger *tagger; GtkTreeRowReference *ref; GtkTreePath *path = NULL, *apath; GtkTreeIter iter; GList *i; gchar *ch_track_no = NULL, *ch_year = NULL, *ch_title = NULL; gboolean update_current_song = FALSE; tagger = pragha_tagger_new(); apath = get_current_track (cplaylist); for (i = list; i != NULL; i = i->next) { ref = i->data; path = gtk_tree_row_reference_get_path(ref); if (G_LIKELY(gtk_tree_model_get_iter(cplaylist->model, &iter, path))) { gtk_tree_model_get(cplaylist->model, &iter, P_MOBJ_PTR, &mobj, -1); if (changed & TAG_TNO_CHANGED) { pragha_musicobject_set_track_no(mobj, pragha_musicobject_get_track_no(nmobj)); ch_track_no = g_strdup_printf("%d", pragha_musicobject_get_track_no(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_TRACK_NO, ch_track_no, -1); g_free(ch_track_no); } if (changed & TAG_TITLE_CHANGED) { const gchar *title = pragha_musicobject_get_title(nmobj); pragha_musicobject_set_title(mobj, title); ch_title = string_is_not_empty(title) ? g_strdup(title) : get_display_name(mobj); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_TITLE, ch_title, -1); g_free(ch_title); } if (changed & TAG_ARTIST_CHANGED) { pragha_musicobject_set_artist(mobj, pragha_musicobject_get_artist(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_ARTIST, pragha_musicobject_get_artist(mobj),-1); } if (changed & TAG_ALBUM_CHANGED) { pragha_musicobject_set_album(mobj, pragha_musicobject_get_album(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_ALBUM, pragha_musicobject_get_album(mobj),-1); } if (changed & TAG_GENRE_CHANGED) { pragha_musicobject_set_genre(mobj, pragha_musicobject_get_genre(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_GENRE, pragha_musicobject_get_genre(mobj),-1); } if (changed & TAG_YEAR_CHANGED) { pragha_musicobject_set_year(mobj, pragha_musicobject_get_year(nmobj)); ch_year = g_strdup_printf("%d", pragha_musicobject_get_year(mobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_YEAR, ch_year, -1); g_free(ch_year); } if (changed & TAG_COMMENT_CHANGED) { pragha_musicobject_set_comment(mobj, pragha_musicobject_get_comment(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_COMMENT, pragha_musicobject_get_comment(mobj),-1); } pragha_tagger_add_file (tagger, pragha_musicobject_get_file(mobj)); if(apath && gtk_tree_path_compare(path, apath) == 0) update_current_song = TRUE; gtk_tree_path_free(path); } } pragha_tagger_set_changes(tagger, nmobj, changed); pragha_tagger_apply_changes (tagger); g_object_unref(tagger); return update_current_song; } static void pragha_playlist_change_ref_list_tags (PraghaPlaylist *playlist, GList *rlist, gint changed, PraghaMusicobject *mobj) { GtkWidget *toplevel; PraghaMusicobject *tmobj = NULL; gboolean need_update; toplevel = gtk_widget_get_toplevel (GTK_WIDGET(playlist)); /* Check if user is trying to set the same title ot track no for multiple tracks */ if (g_list_length(rlist) > 1) { if (changed & TAG_TNO_CHANGED) { if (!confirm_tno_multiple_tracks(pragha_musicobject_get_track_no(mobj), toplevel)) return; } if (changed & TAG_TITLE_CHANGED) { if (!confirm_title_multiple_tracks(pragha_musicobject_get_title(mobj), toplevel)) return; } } clear_sort_current_playlist_cb (NULL, playlist); pragha_playlist_set_changing (playlist, TRUE); rlist = pragha_playlist_get_selection_ref_list (playlist); tmobj = pragha_musicobject_dup (mobj); /* Update the view and save tag change on db and disk.*/ need_update = pragha_playlist_update_ref_list_change_tags (playlist, rlist, changed, tmobj); pragha_playlist_set_changing (playlist, FALSE); if (need_update) g_signal_emit (playlist, signals[PLAYLIST_CHANGE_TAGS], 0, changed, mobj); g_object_unref(tmobj); } void pragha_playlist_update_current_track(PraghaPlaylist *cplaylist, gint changed, PraghaMusicobject *nmobj) { GtkTreePath *path = NULL; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; gchar *ch_track_no = NULL, *ch_year = NULL, *ch_title = NULL; path = get_current_track (cplaylist); if(!path) return; if (G_LIKELY(gtk_tree_model_get_iter(cplaylist->model, &iter, path))) { gtk_tree_model_get(cplaylist->model, &iter, P_MOBJ_PTR, &mobj, -1); if (changed & TAG_TNO_CHANGED) { pragha_musicobject_set_track_no(mobj, pragha_musicobject_get_track_no(nmobj)); ch_track_no = g_strdup_printf("%d", pragha_musicobject_get_track_no(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_TRACK_NO, ch_track_no, -1); g_free(ch_track_no); } if (changed & TAG_TITLE_CHANGED) { const gchar *title = pragha_musicobject_get_title(nmobj); pragha_musicobject_set_title(mobj, title); ch_title = string_is_not_empty(title) ? g_strdup(title) : get_display_name(mobj); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_TITLE, ch_title, -1); g_free(ch_title); } if (changed & TAG_ARTIST_CHANGED) { pragha_musicobject_set_artist(mobj, pragha_musicobject_get_artist(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_ARTIST, pragha_musicobject_get_artist(mobj),-1); } if (changed & TAG_ALBUM_CHANGED) { pragha_musicobject_set_album(mobj, pragha_musicobject_get_album(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_ALBUM, pragha_musicobject_get_album(mobj),-1); } if (changed & TAG_GENRE_CHANGED) { pragha_musicobject_set_genre(mobj, pragha_musicobject_get_genre(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_GENRE, pragha_musicobject_get_genre(mobj),-1); } if (changed & TAG_YEAR_CHANGED) { pragha_musicobject_set_year(mobj, pragha_musicobject_get_year(nmobj)); ch_year = g_strdup_printf("%d", pragha_musicobject_get_year(mobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_YEAR, ch_year, -1); g_free(ch_year); } if (changed & TAG_COMMENT_CHANGED) { pragha_musicobject_set_comment(mobj, pragha_musicobject_get_comment(nmobj)); gtk_list_store_set(GTK_LIST_STORE(cplaylist->model), &iter, P_COMMENT, pragha_musicobject_get_comment(mobj),-1); } } gtk_tree_path_free(path); } /* Insert a track to the current playlist */ static void insert_current_playlist(PraghaPlaylist *cplaylist, PraghaMusicobject *mobj, GtkTreeViewDropPosition droppos, GtkTreeIter *pos) { GtkTreeIter iter; const gchar *title, *artist, *album, *genre, *comment, *mimetype; gint track_no, year, length, bitrate; gchar *ch_length = NULL, *ch_track_no = NULL, *ch_year = NULL, *ch_bitrate = NULL, *ch_filename = NULL; GtkTreeModel *model = cplaylist->model; if (!mobj) { g_warning("Dangling entry in current playlist"); return; } title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); album = pragha_musicobject_get_album(mobj); genre = pragha_musicobject_get_genre(mobj); track_no = pragha_musicobject_get_track_no(mobj); year = pragha_musicobject_get_year(mobj); comment = pragha_musicobject_get_comment(mobj); mimetype = pragha_musicobject_get_mime_type(mobj); length = pragha_musicobject_get_length(mobj); bitrate = pragha_musicobject_get_bitrate(mobj); if(track_no > 0) ch_track_no = g_strdup_printf("%d", track_no); if(year > 0) ch_year = g_strdup_printf("%d", year); if(length > 0) ch_length = convert_length_str(length); if(bitrate) ch_bitrate = g_strdup_printf("%d", bitrate); ch_filename = get_display_name(mobj); if (droppos == GTK_TREE_VIEW_DROP_AFTER) gtk_list_store_insert_after(GTK_LIST_STORE(model), &iter, pos); else gtk_list_store_insert_before(GTK_LIST_STORE(model), &iter, pos); gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_MOBJ_PTR, mobj, P_QUEUE, NULL, P_BUBBLE, FALSE, P_STATUS_PIXBUF, NULL, P_TRACK_NO, ch_track_no, P_TITLE, string_is_not_empty(title) ? title : ch_filename, P_ARTIST, artist, P_ALBUM, album, P_GENRE, genre, P_BITRATE, ch_bitrate, P_YEAR, ch_year, P_COMMENT, comment, P_LENGTH, ch_length, P_FILENAME, ch_filename, P_MIMETYPE, mimetype, P_PLAYED, FALSE, -1); /* Increment global count of tracks */ cplaylist->no_tracks++; cplaylist->unplayed_tracks++; /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); g_free(ch_length); g_free(ch_track_no); g_free(ch_year); g_free(ch_bitrate); g_free(ch_filename); } /* Append a track to the current playlist */ static void append_current_playlist_ex(PraghaPlaylist *cplaylist, PraghaMusicobject *mobj, GtkTreePath **path) { GtkTreeIter iter; const gchar *title, *artist, *album, *genre, *comment, *mimetype; gint track_no, year, length, bitrate; gchar *ch_length = NULL, *ch_track_no = NULL, *ch_year = NULL, *ch_bitrate = NULL, *ch_filename = NULL; GtkTreeModel *model = cplaylist->model; if (!mobj) { g_warning("Dangling entry in current playlist"); return; } title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); album = pragha_musicobject_get_album(mobj); genre = pragha_musicobject_get_genre(mobj); track_no = pragha_musicobject_get_track_no(mobj); year = pragha_musicobject_get_year(mobj); comment = pragha_musicobject_get_comment(mobj); mimetype = pragha_musicobject_get_mime_type(mobj); length = pragha_musicobject_get_length(mobj); bitrate = pragha_musicobject_get_bitrate(mobj); if(track_no > 0) ch_track_no = g_strdup_printf("%d", track_no); if(year > 0) ch_year = g_strdup_printf("%d", year); if(length > 0) ch_length = convert_length_str(length); if(bitrate) ch_bitrate = g_strdup_printf("%d", bitrate); ch_filename = get_display_name(mobj); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, P_MOBJ_PTR, mobj, P_QUEUE, NULL, P_BUBBLE, FALSE, P_STATUS_PIXBUF, NULL, P_TRACK_NO, ch_track_no, P_TITLE, string_is_not_empty(title) ? title : ch_filename, P_ARTIST, artist, P_ALBUM, album, P_GENRE, genre, P_BITRATE, ch_bitrate, P_YEAR, ch_year, P_COMMENT, comment, P_LENGTH, ch_length, P_FILENAME, ch_filename, P_MIMETYPE, mimetype, P_PLAYED, FALSE, -1); /* Increment global count of tracks */ cplaylist->no_tracks++; cplaylist->unplayed_tracks++; if(path) *path = gtk_tree_model_get_path(model, &iter); g_free(ch_length); g_free(ch_track_no); g_free(ch_year); g_free(ch_bitrate); g_free(ch_filename); } static void append_current_playlist (PraghaPlaylist *cplaylist, PraghaMusicobject *mobj) { append_current_playlist_ex(cplaylist, mobj, NULL); } void pragha_playlist_append_single_song(PraghaPlaylist *cplaylist, PraghaMusicobject *mobj) { append_current_playlist(cplaylist, mobj); g_signal_emit (cplaylist, signals[PLAYLIST_CHANGED], 0); } void pragha_playlist_append_mobj_and_play(PraghaPlaylist *cplaylist, PraghaMusicobject *mobj) { GtkTreePath *path = NULL; append_current_playlist_ex(cplaylist, mobj, &path); if(path) { pragha_playlist_activate_path(cplaylist, path); g_signal_emit (cplaylist, signals[PLAYLIST_CHANGED], 0); gtk_tree_path_free(path); } } /* Insert a list of mobj to the current playlist. */ static void pragha_playlist_insert_mobj_list(PraghaPlaylist *cplaylist, GList *list, GtkTreeViewDropPosition droppos, GtkTreeIter *pos) { PraghaMusicobject *mobj; GList *l; /* TODO: pragha_playlist_set_changing() should be set cursor automatically. */ set_watch_cursor (GTK_WIDGET(cplaylist)); pragha_playlist_set_changing(cplaylist, TRUE); gtk_tree_view_set_model(GTK_TREE_VIEW(cplaylist->view), NULL); for (l = list; l != NULL; l = l->next) { mobj = l->data; insert_current_playlist(cplaylist, mobj, droppos, pos); } gtk_tree_view_set_model(GTK_TREE_VIEW(cplaylist->view), cplaylist->model); pragha_playlist_set_changing(cplaylist, FALSE); remove_watch_cursor (GTK_WIDGET(cplaylist)); g_signal_emit (cplaylist, signals[PLAYLIST_CHANGED], 0); } /* Append a list of mobj to the current playlist */ void pragha_playlist_append_mobj_list(PraghaPlaylist *cplaylist, GList *list) { PraghaMusicobject *mobj; gint prev_tracks = 0; GtkSortType order; gint column; GList *l; prev_tracks = pragha_playlist_get_no_tracks(cplaylist); /* TODO: pragha_playlist_set_changing() should be set cursor automatically. */ set_watch_cursor (GTK_WIDGET(cplaylist)); pragha_playlist_set_changing(cplaylist, TRUE); gtk_tree_view_set_model(GTK_TREE_VIEW(cplaylist->view), NULL); for (l = list; l != NULL; l = l->next) { mobj = l->data; append_current_playlist(cplaylist, mobj); } gtk_tree_view_set_model(GTK_TREE_VIEW(cplaylist->view), cplaylist->model); pragha_playlist_set_changing(cplaylist, FALSE); remove_watch_cursor (GTK_WIDGET(cplaylist)); g_signal_emit (cplaylist, signals[PLAYLIST_CHANGED], 0); if(gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(cplaylist->model), &column, &order)) select_numered_path_of_current_playlist(cplaylist, prev_tracks, TRUE); } /* Test if the song is already in the mobj list */ gboolean pragha_mobj_list_already_has_title_of_artist(GList *list, const gchar *title, const gchar *artist) { PraghaMusicobject *mobj = NULL; GList *i; for (i = list; i != NULL; i = i->next) { mobj = i->data; if((0 == g_ascii_strcasecmp(pragha_musicobject_get_title(mobj), title)) && (0 == g_ascii_strcasecmp(pragha_musicobject_get_artist(mobj), artist))) return TRUE; } return FALSE; } /* Test if the song is already in the playlist.*/ gboolean pragha_playlist_already_has_title_of_artist(PraghaPlaylist *cplaylist, const gchar *title, const gchar *artist) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; gboolean ret; ret = gtk_tree_model_get_iter_first (model, &iter); while (ret) { gtk_tree_model_get (model, &iter, P_MOBJ_PTR, &mobj, -1); if((0 == g_ascii_strcasecmp(pragha_musicobject_get_title(mobj), title)) && (0 == g_ascii_strcasecmp(pragha_musicobject_get_artist(mobj), artist))) return TRUE; ret = gtk_tree_model_iter_next(model, &iter); } return FALSE; } /* Clear sort in the current playlist */ void clear_sort_current_playlist(GtkAction *action, PraghaPlaylist *cplaylist) { GtkTreeModel *model = cplaylist->model; gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING); } /* Save selected tracks as a playlist */ void save_selected_playlist(GtkAction *action, PraghaPlaylist *cplaylist) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; GtkTreeSelection *selection; gchar *playlist; /* If current playlist is empty, return immediately. */ if (!gtk_tree_model_get_iter_first(model, &iter)) { g_warning("Current playlist is empty"); return; } /* If no tracks have been selected in the current playlist, return immediately. */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); if (!gtk_tree_selection_count_selected_rows(selection)) return; playlist = get_playlist_name(SAVE_SELECTED, gtk_widget_get_toplevel(GTK_WIDGET(cplaylist))); if (playlist) { new_playlist(cplaylist, playlist, SAVE_SELECTED); pragha_database_change_playlists_done(cplaylist->cdbase); g_free(playlist); } } /* Save current playlist */ void save_current_playlist(GtkAction *action, PraghaPlaylist *cplaylist) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; gchar *playlist = NULL; /* If current playlist is empty, return immediately. */ if(pragha_playlist_is_changing(cplaylist)) return; if (!gtk_tree_model_get_iter_first(model, &iter)) { g_warning("Current playlist is empty"); return; } playlist = get_playlist_name(SAVE_COMPLETE, gtk_widget_get_toplevel(GTK_WIDGET(cplaylist))); if (playlist) { new_playlist(cplaylist, playlist, SAVE_COMPLETE); pragha_database_change_playlists_done(cplaylist->cdbase); g_free(playlist); } } void export_current_playlist(GtkAction *action, PraghaPlaylist *cplaylist) { GtkTreeIter iter; if(pragha_playlist_is_changing(cplaylist)) return; /* If current playlist change or is empty, return immediately. */ if (!gtk_tree_model_get_iter_first(cplaylist->model, &iter)) { g_warning("Current playlist is empty"); return; } export_playlist (cplaylist, SAVE_COMPLETE); } void export_selected_playlist(GtkAction *action, PraghaPlaylist *cplaylist) { GtkTreeIter iter; GtkTreeSelection *selection; /* If current playlist change or is empty, return immediately. */ if(pragha_playlist_is_changing(cplaylist)) return; if (!gtk_tree_model_get_iter_first(cplaylist->model, &iter)) { g_warning("Current playlist is empty"); return; } /* If no tracks have been selected in the current playlist, return immediately. */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); if (!gtk_tree_selection_count_selected_rows(selection)) return; export_playlist (cplaylist, SAVE_SELECTED); } /*******************/ /* Event Callbacks */ /*******************/ /* Handler for row double click / kboard enter */ static void pragha_playlist_row_activated_cb (GtkTreeView *current_playlist, GtkTreePath *path, GtkTreeViewColumn *column, PraghaPlaylist *playlist) { PraghaMusicobject *mobj = NULL; gboolean shuffle = FALSE; GtkTreeIter iter; gtk_tree_model_get_iter (playlist->model, &iter, path); gtk_tree_model_get (playlist->model, &iter, P_MOBJ_PTR, &mobj, -1); if (!mobj) return; shuffle = pragha_preferences_get_shuffle (playlist->preferences); if (shuffle) { if (!playlist->rand_track_refs) { clear_rand_track_refs (playlist); pragha_playlist_clear_dirty_all (playlist); } else { trim_down_rand_track_refs (playlist); } } /* Start playing new track */ pragha_playlist_update_playback_sequence (playlist, PLAYLIST_NEXT, path); g_signal_emit (playlist, signals[PLAYLIST_SET_TRACK], 0, mobj); } static void pragha_playlist_personalize_copy_tag_to_seleccion (PraghaPlaylist *playlist, GtkTreeViewColumn *column, GtkTreeIter *iter) { GList *list = NULL; gint icolumn = 0; GtkAction *action = NULL; gchar *label = NULL; PraghaMusicobject *mobj = NULL; gint change = 0; gtk_tree_model_get (playlist->model, iter, P_MOBJ_PTR, &mobj, -1); /* Get the column clicked and set menu. */ list = gtk_tree_view_get_columns (GTK_TREE_VIEW(playlist->view)); icolumn = g_list_index(list, column); switch (icolumn) { case 1: { change = TAG_TNO_CHANGED; label = g_strdup_printf(_("Copy \"%i\" to selected track numbers"), pragha_musicobject_get_track_no(mobj)); break; } case 2: { change = TAG_TITLE_CHANGED; label = g_strdup_printf(_("Copy \"%s\" to selected titles"), pragha_musicobject_get_title(mobj)); break; } case 3: { change = TAG_ARTIST_CHANGED; label = g_strdup_printf(_("Copy \"%s\" to selected artists"), pragha_musicobject_get_artist(mobj)); break; } case 4: { change = TAG_ALBUM_CHANGED; label = g_strdup_printf(_("Copy \"%s\" to selected albums"), pragha_musicobject_get_album(mobj)); break; } case 5: { change = TAG_GENRE_CHANGED; label = g_strdup_printf(_("Copy \"%s\" to selected genres"), pragha_musicobject_get_genre(mobj)); break; } case 7: { change = TAG_YEAR_CHANGED; label = g_strdup_printf(_("Copy \"%i\" to selected years"), pragha_musicobject_get_year(mobj)); break; } case 8: { change = TAG_COMMENT_CHANGED; label = g_strdup_printf(_("Copy \"%s\" to selected comments"), pragha_musicobject_get_comment(mobj)); break; } default: { break; } } if (change) { action = gtk_ui_manager_get_action (playlist->playlist_context_menu, "/SelectionPopup/Copy tag to selection"); g_object_set_data(G_OBJECT(action), "mobj", mobj); g_object_set_data(G_OBJECT(action), "change", GINT_TO_POINTER(change)); pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Copy tag to selection", TRUE); gtk_action_set_label(GTK_ACTION(action), label); } else { pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Copy tag to selection", FALSE); } g_list_free(list); g_free(label); } /*****************/ /* DnD functions */ /*****************/ /* These two functions are only callbacks that must be passed to gtk_tree_selection_set_select_function() to chose if GTK is allowed to change selection itself or if we handle it ourselves */ static gboolean pragha_playlist_selection_func_true(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer data) { return TRUE; } static gboolean pragha_playlist_selection_func_false(GtkTreeSelection *selection, GtkTreeModel *model, GtkTreePath *path, gboolean path_currently_selected, gpointer data) { return FALSE; } /* Handler for current playlist click */ static gboolean pragha_playlist_first_button_press_cb (PraghaPlaylist *playlist, GdkEventButton *event) { GtkTreePath *path = NULL; GtkTreeSelection *selection; gboolean ret = FALSE; ret = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(playlist->view), (gint) event->x,(gint) event->y, &path, NULL, NULL, NULL); if (ret) { selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(playlist->view)); if (gtk_tree_selection_path_is_selected (selection, path) && !(event->state & GDK_CONTROL_MASK) && !(event->state & GDK_SHIFT_MASK)) { gtk_tree_selection_set_select_function(selection, &pragha_playlist_selection_func_false, playlist, NULL); } else { gtk_tree_selection_set_select_function(selection, &pragha_playlist_selection_func_true, playlist, NULL); } gtk_tree_path_free(path); } return FALSE; } static gboolean pragha_playlist_second_button_press_cb (PraghaPlaylist *playlist, GdkEventButton *event) { GtkWidget *popup_menu; GtkTreeSelection *selection; gint n_select = 0; GtkTreePath *path; GtkTreeViewColumn *column; GtkTreeIter iter; gboolean ret = FALSE, is_queue = FALSE; popup_menu = gtk_ui_manager_get_widget (playlist->playlist_context_menu, "/SelectionPopup"); ret = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(playlist->view), (gint) event->x,(gint) event->y, &path, &column, NULL, NULL); if (ret) { /* Click on a song.. */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(playlist->view)); /* Select the song. */ if (!gtk_tree_selection_path_is_selected (selection, path)) { gtk_tree_selection_unselect_all (selection); gtk_tree_selection_select_path (selection, path); } /* Personalize popup menu acording state. */ if (gtk_tree_model_get_iter (playlist->model, &iter, path)) { gtk_tree_model_get (playlist->model, &iter, P_BUBBLE, &is_queue, -1); if (is_queue) { pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Queue track", FALSE); pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Dequeue track", TRUE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Deueue track", TRUE); } else { pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Queue track", TRUE); pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Dequeue track", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Queue track", TRUE); } } pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Remove from playlist", TRUE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Crop playlist", TRUE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Clear playlist", TRUE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Save selection", TRUE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Save playlist", TRUE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Edit tags", TRUE); n_select = gtk_tree_selection_count_selected_rows (selection); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/ToolsMenu", (n_select == 1)); if(n_select > 1) { pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Copy tag to selection", TRUE); pragha_playlist_personalize_copy_tag_to_seleccion (playlist, column, &iter); } else pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Copy tag to selection", FALSE); gtk_tree_path_free (path); } else { if (playlist->no_tracks == 0) { /* Click on emthy playlist. */ pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Queue track", TRUE); pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Dequeue track", FALSE); } else { /* Click on any song. */ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(playlist->view)); gtk_tree_selection_unselect_all (selection); } pragha_playlist_menu_action_set_visible (playlist, "/SelectionPopup/Copy tag to selection", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Queue track", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Remove from playlist", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Crop playlist", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Clear playlist", (playlist->no_tracks != 0)); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Save selection", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Save playlist", (playlist->no_tracks != 0)); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/ToolsMenu", FALSE); pragha_playlist_menu_action_set_sensitive (playlist, "/SelectionPopup/Edit tags", FALSE); } gtk_menu_popup (GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, event->button, event->time); if (n_select > 1) return TRUE; else return FALSE; } static gboolean pragha_playlist_button_press_cb (GtkWidget *widget, GdkEventButton *event, PraghaPlaylist *playlist) { gboolean ret = FALSE; switch (event->button) { case 1: ret = pragha_playlist_first_button_press_cb (playlist, event); break; case 3: ret = pragha_playlist_second_button_press_cb (playlist, event); break; default: ret = FALSE; break; } return ret; } static gboolean current_playlist_button_release_cb(GtkWidget *widget, GdkEventButton *event, PraghaPlaylist *cplaylist) { GtkTreeSelection *selection; GtkTreePath *path; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); if((event->state & GDK_CONTROL_MASK) || (event->state & GDK_SHIFT_MASK) || (cplaylist->dragging == TRUE) || (event->button!=1)){ gtk_tree_selection_set_select_function(selection, &pragha_playlist_selection_func_true, cplaylist, NULL); cplaylist->dragging = FALSE; return FALSE; } gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), (gint) event->x,(gint) event->y, &path, NULL, NULL, NULL); if (path){ gtk_tree_selection_set_select_function(selection, &pragha_playlist_selection_func_true, cplaylist, NULL); gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); gtk_tree_path_free(path); } return FALSE; } /* Handler for column header right click popup menu */ gboolean header_right_click_cb(GtkWidget *widget, GdkEventButton *event, PraghaPlaylist *cplaylist) { gboolean ret = FALSE; switch(event->button) { case 3: { gtk_menu_popup(GTK_MENU(cplaylist->header_context_menu), NULL, NULL, NULL, NULL, event->button, event->time); ret = TRUE; break; } default: ret = FALSE; break; } return ret; } /*******/ /* DnD */ /*******/ static gboolean dnd_current_playlist_begin(GtkWidget *widget, GdkDragContext *context, PraghaPlaylist *cplaylist) { cplaylist->dragging = TRUE; return FALSE; } /* Callback for DnD signal 'drag-data-get' */ static void drag_current_playlist_get_data (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint target_type, guint time, PraghaPlaylist *cplaylist) { g_assert (selection_data != NULL); GtkTreeModel *model; GtkTreeSelection *selection; GList *list, *i; GtkTreePath *path; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; guint uri_i = 0; gchar **uri_list; switch (target_type){ case TARGET_URI_LIST: CDEBUG(DBG_VERBOSE, "DnD: TARGET_URI_LIST"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); uri_list = g_new(gchar* , gtk_tree_selection_count_selected_rows(selection) + 1); for (i=list; i != NULL; i = i->next){ path = i->data; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, P_MOBJ_PTR, &mobj, -1); if (G_LIKELY(mobj && pragha_musicobject_is_local_file(mobj))) uri_list[uri_i++] = g_filename_to_uri(pragha_musicobject_get_file(mobj), NULL, NULL); gtk_tree_path_free(path); } uri_list[uri_i++] = NULL; gtk_selection_data_set_uris(selection_data, uri_list); g_strfreev(uri_list); g_list_free(list); break; default: break; } } static gboolean dnd_current_playlist_drop(GtkWidget *widget, GdkDragContext *context, gint x, gint y, guint time, PraghaPlaylist *cplaylist) { GList *p; if (gdk_drag_context_list_targets (context) == NULL) return FALSE; for (p = gdk_drag_context_list_targets (context); p != NULL; p = p->next) { gchar *possible_type; possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data)); if (!strcmp (possible_type, "REF_LIBRARY")) { CDEBUG(DBG_VERBOSE, "DnD: library_tree"); gtk_drag_get_data(widget, context, GDK_POINTER_TO_ATOM (p->data), time); g_free (possible_type); return TRUE; } g_free (possible_type); } return FALSE; } /* Reorder playlist with DnD. */ void dnd_current_playlist_reorder(GtkTreeModel *model, GtkTreeIter *dest_iter, GtkTreeViewDropPosition pos, PraghaPlaylist *cplaylist) { GtkTreeRowReference *ref; GtkTreePath *path = NULL; GtkTreeSelection *selection; GtkTreeIter iter; GList *list = NULL, *l; CDEBUG(DBG_VERBOSE, "Dnd: Reorder"); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, NULL); /* Clear sort */ clear_sort_current_playlist(NULL, cplaylist); /* No selections */ if (!list) goto exit; /* Store references to the selected paths */ l = list; while(l) { path = l->data; ref = gtk_tree_row_reference_new(model, path); l->data = ref; gtk_tree_path_free(path); l = l->next; } for (l=list; l != NULL; l = l->next) { ref = l->data; path = gtk_tree_row_reference_get_path(ref); gtk_tree_model_get_iter(model, &iter, path); if (pos == GTK_TREE_VIEW_DROP_BEFORE) gtk_list_store_move_before(GTK_LIST_STORE(model), &iter, dest_iter); else if (pos == GTK_TREE_VIEW_DROP_AFTER) gtk_list_store_move_after(GTK_LIST_STORE(model), &iter, dest_iter); gtk_tree_path_free(path); gtk_tree_row_reference_free(ref); } exit: g_list_free(list); } /* Callback for DnD signal 'drag-data-received' */ static void dnd_current_playlist_received(GtkWidget *playlist_view, GdkDragContext *context, gint x, gint y, GtkSelectionData *data, PraghaDndTarget info, guint time, PraghaPlaylist *cplaylist) { GtkTreeModel *model; GtkTreePath *dest_path = NULL; GtkTreeIter dest_iter; GtkTreeViewDropPosition pos = 0; gboolean is_row; GdkRectangle vrect, crect; gdouble row_align; GList *list = NULL; model = gtk_tree_view_get_model(GTK_TREE_VIEW(playlist_view)); is_row = gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(playlist_view), x, y, &dest_path, &pos); gtk_tree_view_get_visible_rect(GTK_TREE_VIEW(playlist_view), &vrect); gtk_tree_view_get_cell_area(GTK_TREE_VIEW(playlist_view), dest_path, NULL, &crect); row_align = (gdouble)crect.y / (gdouble)vrect.height; switch(pos) { case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: pos = GTK_TREE_VIEW_DROP_BEFORE; break; case GTK_TREE_VIEW_DROP_INTO_OR_AFTER: pos = GTK_TREE_VIEW_DROP_AFTER; break; default: break; } if (is_row) gtk_tree_model_get_iter (model, &dest_iter, dest_path); /* Reorder within current playlist */ if (gtk_drag_get_source_widget(context) == playlist_view) { dnd_current_playlist_reorder(model, &dest_iter, pos, cplaylist); goto exit; } /* Get new tracks to append on playlist */ switch(info) { case TARGET_REF_LIBRARY: list = pragha_dnd_library_get_mobj_list (data, cplaylist->cdbase); break; case TARGET_URI_LIST: list = pragha_dnd_uri_list_get_mobj_list (data); break; case TARGET_PLAIN_TEXT: list = pragha_dnd_plain_text_get_mobj_list (data); break; default: g_warning("Unknown DND type"); break; } /* Insert mobj list to current playlist. */ if (is_row) { pragha_playlist_insert_mobj_list(cplaylist, list, pos, &dest_iter); gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW(playlist_view), dest_path, NULL, TRUE, row_align, 0.0); } else pragha_playlist_append_mobj_list(cplaylist, list); g_list_free(list); exit: gtk_tree_path_free(dest_path); gtk_drag_finish(context, TRUE, FALSE, time); } /* Get a list of all music objects on current playlist */ GList * pragha_playlist_get_mobj_list(PraghaPlaylist* cplaylist) { GtkTreeModel *model = cplaylist->model; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; GList *list = NULL; gboolean valid; valid = gtk_tree_model_get_iter_first(model, &iter); while (valid) { gtk_tree_model_get (model, &iter, P_MOBJ_PTR, &mobj, -1); if (G_LIKELY(mobj)) list = g_list_prepend(list, mobj); valid = gtk_tree_model_iter_next(model, &iter); } return list; } /* Get a list of selected music objects on current playlist */ GList * pragha_playlist_get_selection_mobj_list(PraghaPlaylist* cplaylist) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreePath *path; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; GList *list = NULL, *mlist = NULL, *i; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); if (list) { for (i=list; i != NULL; i = i->next) { path = i->data; gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(model, &iter, P_MOBJ_PTR, &mobj, -1); if (G_LIKELY(mobj)) mlist = g_list_prepend(mlist, mobj); gtk_tree_path_free(path); } g_list_free (list); } return mlist; } GList * pragha_playlist_get_selection_ref_list(PraghaPlaylist *cplaylist) { GtkTreeModel *model; GtkTreeSelection *selection; GtkTreeRowReference *ref; GtkTreePath *path = NULL; GList *list, *i; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); /* Get references from the paths and store them in the 'data' portion of the list elements. This idea was inspired by code from 'claws-mail' */ for (i = list; i != NULL; i = i->next) { path = i->data; ref = gtk_tree_row_reference_new(model, path); i->data = ref; gtk_tree_path_free(path); } return list; } /* Get the musicobject of seleceted track on current playlist */ PraghaMusicobject * pragha_playlist_get_selected_musicobject(PraghaPlaylist* cplaylist) { GtkTreeModel *model; GtkTreeSelection *selection; GList *list; GtkTreePath *path = NULL; GtkTreeIter iter; PraghaMusicobject *mobj = NULL; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(cplaylist->view)); list = gtk_tree_selection_get_selected_rows(selection, &model); if (list != NULL) { path = list->data; if (gtk_tree_model_get_iter(model, &iter, path)) { gtk_tree_model_get(model, &iter, P_MOBJ_PTR, &mobj, -1); if (!mobj) g_warning("Invalid mobj pointer"); } g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free); } return mobj; } /* Save current playlist state on exit */ void pragha_playlist_save_playlist_state (PraghaPlaylist* cplaylist) { GtkTreePath *path = NULL; GtkTreeIter iter; gint playlist_id = 0; gchar *ref_char = NULL; /* Save last playlist. */ playlist_id = pragha_database_find_playlist (cplaylist->cdbase, SAVE_PLAYLIST_STATE); if (!playlist_id) playlist_id = pragha_database_add_new_playlist (cplaylist->cdbase, SAVE_PLAYLIST_STATE); else pragha_database_flush_playlist (cplaylist->cdbase, playlist_id); if (!gtk_tree_model_get_iter_first(cplaylist->model, &iter)) return; save_playlist(cplaylist, playlist_id, SAVE_COMPLETE); /* Save reference to current song. */ path = get_current_track (cplaylist); if(path) { ref_char = gtk_tree_path_to_string (path); gtk_tree_path_free(path); pragha_preferences_set_string(cplaylist->preferences, GROUP_PLAYLIST, KEY_CURRENT_REF, ref_char); g_free (ref_char); } else { pragha_preferences_remove_key(cplaylist->preferences, GROUP_PLAYLIST, KEY_CURRENT_REF); } } /* Init current playlist on application bringup, restore stored playlist */ static void init_playlist_current_playlist(PraghaPlaylist *cplaylist) { gint playlist_id, location_id; PraghaMusicobject *mobj; GList *list = NULL; playlist_id = pragha_database_find_playlist (cplaylist->cdbase, SAVE_PLAYLIST_STATE); const gchar *sql = "SELECT file FROM PLAYLIST_TRACKS WHERE playlist = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (cplaylist->cdbase, sql); pragha_prepared_statement_bind_int (statement, 1, playlist_id); while (pragha_prepared_statement_step (statement)) { const gchar *file = pragha_prepared_statement_get_string (statement, 0); /* TODO: Fix this negradaaa!. */ if(g_str_has_prefix(file, "Radio:/") == FALSE) { if ((location_id = pragha_database_find_location (cplaylist->cdbase, file))) mobj = new_musicobject_from_db(cplaylist->cdbase, location_id); else mobj = new_musicobject_from_file(file); } else { mobj = new_musicobject_from_location(file + strlen("Radio:/"), file + strlen("Radio:/")); } if (G_LIKELY(mobj)) list = g_list_append(list, mobj); } pragha_prepared_statement_free (statement); if (list) { pragha_playlist_append_mobj_list(cplaylist, list); g_list_free (list); } } void pragha_playlist_init_playlist_state (PraghaPlaylist *cplaylist) { gchar *ref = NULL; GtkTreePath *path = NULL; init_playlist_current_playlist(cplaylist); ref = pragha_preferences_get_string(cplaylist->preferences, GROUP_PLAYLIST, KEY_CURRENT_REF); if (!ref) return; path = gtk_tree_path_new_from_string(ref); pragha_playlist_select_path (cplaylist, path, pragha_preferences_get_shuffle(cplaylist->preferences)); gtk_tree_path_free(path); g_free(ref); } /* Initialize columns of current playlist */ static void init_current_playlist_columns(PraghaPlaylist* cplaylist) { gchar **columns; const gchar *col_name; GtkTreeViewColumn *col; GList *list = NULL, *i; GSList *j; gint k = 0; gint *col_widths; gsize cnt = 0, isize; columns = pragha_preferences_get_string_list(cplaylist->preferences, GROUP_PLAYLIST, KEY_PLAYLIST_COLUMNS, &cnt); if (columns) { for (isize=0; isize < cnt; isize++) { cplaylist->columns = g_slist_append(cplaylist->columns, g_strdup(columns[isize])); } g_strfreev(columns); } else { cplaylist->columns = g_slist_append(cplaylist->columns, g_strdup(P_TITLE_STR)); cplaylist->columns = g_slist_append(cplaylist->columns, g_strdup(P_ARTIST_STR)); cplaylist->columns = g_slist_append(cplaylist->columns, g_strdup(P_ALBUM_STR)); cplaylist->columns = g_slist_append(cplaylist->columns, g_strdup(P_LENGTH_STR)); } col_widths = pragha_preferences_get_integer_list(cplaylist->preferences, GROUP_PLAYLIST, KEY_PLAYLIST_COLUMN_WIDTHS, &cnt); if (col_widths) { for (isize = 0; isize < cnt; isize++) { cplaylist->column_widths = g_slist_append(cplaylist->column_widths, GINT_TO_POINTER(col_widths[isize])); } g_free(col_widths); } else { for (isize=0; isize < 4; isize++) { cplaylist->column_widths = g_slist_append(cplaylist->column_widths, GINT_TO_POINTER(DEFAULT_PLAYLIST_COL_WIDTH)); } } /* Mark only the columns that are present in cplaylist->columns as visible. And set their sizes */ list = gtk_tree_view_get_columns(GTK_TREE_VIEW(cplaylist->view)); if (list) { for (i=list; i != NULL; i = i->next) { col = i->data; col_name = gtk_tree_view_column_get_title(col); if (is_present_str_list(col_name, cplaylist->columns)) { j = g_slist_nth(cplaylist->column_widths, k++); gtk_tree_view_column_set_visible(col, TRUE); gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); if (GPOINTER_TO_INT(j->data) > COL_WIDTH_THRESH) gtk_tree_view_column_set_fixed_width(col, GPOINTER_TO_INT(j->data)); else gtk_tree_view_column_set_fixed_width(col, DEFAULT_PLAYLIST_COL_WIDTH); } else gtk_tree_view_column_set_visible(col, FALSE); } g_list_free(list); } else g_warning("(%s): No columns in playlist view", __func__); /* Always show queue and status pixbuf colum */ col = gtk_tree_view_get_column(GTK_TREE_VIEW(cplaylist->view), 0); gtk_tree_view_column_set_visible(col, TRUE); gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_fixed_width(col, 36); } static GtkWidget* create_header_context_menu(PraghaPlaylist* cplaylist) { GtkWidget *menu; GtkWidget *toggle_track, *toggle_title, *toggle_artist, *toggle_album, *toggle_genre, *toggle_bitrate, *toggle_year, *toggle_comment, *toggle_length, *toggle_filename, *toggle_mimetype, *separator, *action_clear_sort; menu = gtk_menu_new(); /* Create the checkmenu items */ toggle_track = gtk_check_menu_item_new_with_label(_("Track")); toggle_title = gtk_check_menu_item_new_with_label(_("Title")); toggle_artist = gtk_check_menu_item_new_with_label(_("Artist")); toggle_album = gtk_check_menu_item_new_with_label(_("Album")); toggle_genre = gtk_check_menu_item_new_with_label(_("Genre")); toggle_bitrate = gtk_check_menu_item_new_with_label(_("Bitrate")); toggle_year = gtk_check_menu_item_new_with_label(_("Year")); toggle_comment = gtk_check_menu_item_new_with_label(_("Comment")); toggle_length = gtk_check_menu_item_new_with_label(_("Length")); toggle_filename = gtk_check_menu_item_new_with_label(_("Filename")); toggle_mimetype = gtk_check_menu_item_new_with_label(_("Mimetype")); separator = gtk_separator_menu_item_new (); action_clear_sort = gtk_image_menu_item_new_with_label(_("Clear sort")); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(action_clear_sort), gtk_image_new_from_icon_name("view-refresh", GTK_ICON_SIZE_MENU)); /* Add the items to the menu */ gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_track); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_title); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_artist); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_album); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_genre); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_bitrate); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_year); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_comment); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_length); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_filename); gtk_menu_shell_append(GTK_MENU_SHELL(menu), toggle_mimetype); gtk_menu_shell_append(GTK_MENU_SHELL(menu), separator); gtk_menu_shell_append(GTK_MENU_SHELL(menu), action_clear_sort); /* Initialize the state of the items */ if (is_present_str_list(P_TRACK_NO_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_track), TRUE); if (is_present_str_list(P_TITLE_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_title), TRUE); if (is_present_str_list(P_ARTIST_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_artist), TRUE); if (is_present_str_list(P_ALBUM_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_album), TRUE); if (is_present_str_list(P_GENRE_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_genre), TRUE); if (is_present_str_list(P_BITRATE_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_bitrate), TRUE); if (is_present_str_list(P_YEAR_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_year), TRUE); if (is_present_str_list(P_COMMENT_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_comment), TRUE); if (is_present_str_list(P_LENGTH_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_length), TRUE); if (is_present_str_list(P_FILENAME_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_filename), TRUE); if (is_present_str_list(P_MIMETYPE_STR, cplaylist->columns)) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(toggle_mimetype), TRUE); /* Setup the individual signal handlers */ g_signal_connect(G_OBJECT(toggle_track), "toggled", G_CALLBACK(playlist_track_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_title), "toggled", G_CALLBACK(playlist_title_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_artist), "toggled", G_CALLBACK(playlist_artist_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_album), "toggled", G_CALLBACK(playlist_album_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_genre), "toggled", G_CALLBACK(playlist_genre_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_bitrate), "toggled", G_CALLBACK(playlist_bitrate_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_year), "toggled", G_CALLBACK(playlist_year_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_comment), "toggled", G_CALLBACK(playlist_comment_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_length), "toggled", G_CALLBACK(playlist_length_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_filename), "toggled", G_CALLBACK(playlist_filename_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(toggle_mimetype), "toggled", G_CALLBACK(playlist_mimetype_column_change_cb), cplaylist); g_signal_connect(G_OBJECT(action_clear_sort), "activate", G_CALLBACK(clear_sort_current_playlist_cb), cplaylist); gtk_widget_show_all(menu); return menu; } static GtkUIManager* pragha_playlist_context_menu_new (PraghaPlaylist *playlist) { GtkUIManager *context_menu = NULL; GtkActionGroup *context_actions; GError *error = NULL; context_actions = gtk_action_group_new("Playlist Context Actions"); context_menu = gtk_ui_manager_new(); gtk_action_group_set_translation_domain (context_actions, GETTEXT_PACKAGE); if (!gtk_ui_manager_add_ui_from_string(context_menu, playlist_context_menu_xml, -1, &error)) { g_critical("Unable to create current playlist context menu, err : %s", error->message); } gtk_action_group_add_actions(context_actions, playlist_context_aentries, G_N_ELEMENTS(playlist_context_aentries), (gpointer) playlist); gtk_ui_manager_insert_action_group(context_menu, context_actions, 0); g_object_unref (context_actions); return context_menu; } static const GtkTargetEntry pentries[] = { {"REF_LIBRARY", GTK_TARGET_SAME_APP, TARGET_REF_LIBRARY}, {"text/uri-list", GTK_TARGET_OTHER_APP, TARGET_URI_LIST}, {"text/plain", GTK_TARGET_OTHER_APP, TARGET_PLAIN_TEXT} }; static void init_playlist_dnd(PraghaPlaylist *cplaylist) { /* Source/Dest: Current Playlist */ gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(cplaylist->view), GDK_BUTTON1_MASK, pentries, G_N_ELEMENTS(pentries), GDK_ACTION_COPY | GDK_ACTION_MOVE); gtk_tree_view_enable_model_drag_dest(GTK_TREE_VIEW(cplaylist->view), pentries, G_N_ELEMENTS(pentries), GDK_ACTION_COPY | GDK_ACTION_MOVE); g_signal_connect(G_OBJECT(GTK_WIDGET(cplaylist->view)), "drag-begin", G_CALLBACK(dnd_current_playlist_begin), cplaylist); g_signal_connect (G_OBJECT(cplaylist->view), "drag-data-get", G_CALLBACK (drag_current_playlist_get_data), cplaylist); g_signal_connect(G_OBJECT(cplaylist->view), "drag-drop", G_CALLBACK(dnd_current_playlist_drop), cplaylist); g_signal_connect(G_OBJECT(cplaylist->view), "drag-data-received", G_CALLBACK(dnd_current_playlist_received), cplaylist); } static void create_current_playlist_columns(PraghaPlaylist *cplaylist, GtkTreeView *view) { GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *state_pixbuf, *label_track, *label_title, *label_artist, *label_album, *label_genre, *label_bitrate, *label_year, *label_comment, *label_length, *label_filename, *label_mimetype; GtkWidget *col_button; label_track = gtk_label_new(_("Track")); label_title = gtk_label_new(_("Title")); label_artist = gtk_label_new(_("Artist")); label_album = gtk_label_new(_("Album")); label_genre = gtk_label_new(_("Genre")); label_bitrate = gtk_label_new(_("Bitrate")); label_year = gtk_label_new(_("Year")); label_comment = gtk_label_new(_("Comment")); label_length = gtk_label_new(_("Length")); label_filename = gtk_label_new(_("Filename")); label_mimetype = gtk_label_new(_("Mimetype")); state_pixbuf = gtk_image_new_from_icon_name ("audio-volume-high", GTK_ICON_SIZE_MENU); /* Column : Queue Bubble and Status Pixbuf */ column = gtk_tree_view_column_new (); renderer = gtk_cell_renderer_bubble_new (); gtk_cell_renderer_set_fixed_size (renderer, 14, -1); gtk_tree_view_column_pack_start (column, renderer, FALSE); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer), 1); gtk_tree_view_column_set_attributes(column, renderer, "markup", P_QUEUE, "show-bubble", P_BUBBLE, NULL); renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, renderer, FALSE); gtk_tree_view_column_set_attributes(column, renderer, "pixbuf", P_STATUS_PIXBUF, NULL); gtk_tree_view_column_set_resizable(column, FALSE); gtk_tree_view_append_column (GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget (column, state_pixbuf); gtk_tree_view_column_set_alignment (column, 0.5); gtk_widget_show (state_pixbuf); /* Column : Track No */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); column = gtk_tree_view_column_new_with_attributes(P_TRACK_NO_STR, renderer, "text", P_TRACK_NO, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_TRACK_NO); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_track); gtk_widget_show(label_track); col_button = gtk_widget_get_ancestor(label_track, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Title */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); column = gtk_tree_view_column_new_with_attributes(P_TITLE_STR, renderer, "text", P_TITLE, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_TITLE); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_title); gtk_widget_show(label_title); col_button = gtk_widget_get_ancestor(label_title, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Artist */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); column = gtk_tree_view_column_new_with_attributes(P_ARTIST_STR, renderer, "text", P_ARTIST, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_ARTIST); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_artist); gtk_widget_show(label_artist); col_button = gtk_widget_get_ancestor(label_artist, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Album */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_ALBUM_STR, renderer, "text", P_ALBUM, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_ALBUM); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_album); gtk_widget_show(label_album); col_button = gtk_widget_get_ancestor(label_album, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Genre */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_GENRE_STR, renderer, "text", P_GENRE, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_GENRE); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_genre); gtk_widget_show(label_genre); col_button = gtk_widget_get_ancestor(label_genre, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Bitrate */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_BITRATE_STR, renderer, "text", P_BITRATE, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_BITRATE); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_bitrate); gtk_widget_show(label_bitrate); col_button = gtk_widget_get_ancestor(label_bitrate, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Year */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_YEAR_STR, renderer, "text", P_YEAR, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_YEAR); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_year); gtk_widget_show(label_year); col_button = gtk_widget_get_ancestor(label_year, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Comment */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_COMMENT_STR, renderer, "text", P_COMMENT, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_COMMENT); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_comment); gtk_widget_show(label_comment); col_button = gtk_widget_get_ancestor(label_comment, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Length */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_LENGTH_STR, renderer, "text", P_LENGTH, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_LENGTH); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_length); gtk_widget_show(label_length); col_button = gtk_widget_get_ancestor(label_length, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Filename */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_FILENAME_STR, renderer, "text", P_FILENAME, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_FILENAME); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_filename); gtk_widget_show(label_filename); col_button = gtk_widget_get_ancestor(label_filename, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); /* Column : Mimetype */ renderer = gtk_cell_renderer_text_new(); gtk_cell_renderer_text_set_fixed_height_from_font(GTK_CELL_RENDERER_TEXT(renderer),1); gtk_cell_renderer_set_fixed_size (renderer, 1, -1); column = gtk_tree_view_column_new_with_attributes(P_MIMETYPE_STR, renderer, "text", P_MIMETYPE, NULL); gtk_tree_view_column_set_resizable(column, TRUE); gtk_tree_view_column_set_sort_column_id(column, P_MIMETYPE); g_object_set(G_OBJECT(renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(view), column); gtk_tree_view_column_set_widget(column, label_mimetype); gtk_widget_show(label_mimetype); col_button = gtk_widget_get_ancestor(label_mimetype, GTK_TYPE_BUTTON); g_signal_connect(G_OBJECT(GTK_WIDGET(col_button)), "button-press-event", G_CALLBACK(header_right_click_cb), cplaylist); } void update_current_playlist_view_playback_state_cb (PraghaBackend *backend, GParamSpec *pspec, PraghaPlaylist *cplaylist) { update_current_playlist_view_track(cplaylist, backend); } static GtkWidget* create_current_playlist_view (PraghaPlaylist *cplaylist) { GtkWidget *current_playlist; GtkListStore *store; GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeSortable *sortable; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE; /* Create the tree store */ store = gtk_list_store_new(N_P_COLUMNS, G_TYPE_POINTER, /* Pointer to musicobject */ G_TYPE_STRING, /* Queue No String */ G_TYPE_BOOLEAN, /* Show Bublle Queue */ GDK_TYPE_PIXBUF, /* Playback status pixbuf */ G_TYPE_STRING, /* Tag : Track No */ G_TYPE_STRING, /* Tag : Title */ G_TYPE_STRING, /* Tag : Artist */ G_TYPE_STRING, /* Tag : Album */ G_TYPE_STRING, /* Tag : Genre */ G_TYPE_STRING, /* Tag : Bitrate */ G_TYPE_STRING, /* Tag : Year */ G_TYPE_STRING, /* Tag : Comment */ G_TYPE_STRING, /* Tag : Length */ G_TYPE_STRING, /* Filename */ G_TYPE_STRING, /* Mimetype */ G_TYPE_BOOLEAN); /* Played flag */ /* Create the tree view */ current_playlist = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); model = gtk_tree_view_get_model(GTK_TREE_VIEW(current_playlist)); sortable = GTK_TREE_SORTABLE(model); /* Disable interactive search */ gtk_tree_view_set_enable_search(GTK_TREE_VIEW(current_playlist), FALSE); /* Set the sort functions */ gtk_tree_sortable_set_sort_func(sortable, P_TRACK_NO, compare_track_no, NULL, NULL); gtk_tree_sortable_set_sort_func(sortable, P_BITRATE, compare_bitrate, NULL, NULL); gtk_tree_sortable_set_sort_func(sortable, P_YEAR, compare_year, NULL, NULL); gtk_tree_sortable_set_sort_func(sortable, P_LENGTH, compare_length, NULL, NULL); /* Set selection properties */ selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(current_playlist)); gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE); /* Create the columns and cell renderers */ create_current_playlist_columns(cplaylist, GTK_TREE_VIEW(current_playlist)); /* Signal handler for double-clicking on a row */ g_signal_connect(G_OBJECT(current_playlist), "key-press-event", G_CALLBACK (current_playlist_key_press), cplaylist); g_object_unref(store); return current_playlist; } static void playlist_column_set_visible(PraghaPlaylist* cplaylist, gint column, gboolean visible) { const gchar *col_name; GtkTreeViewColumn *col; col = gtk_tree_view_get_column(GTK_TREE_VIEW(cplaylist->view), column - 3); if (!col) { g_warning("Invalid column number"); return; } col_name = gtk_tree_view_column_get_title(col); gtk_tree_view_column_set_visible(col, visible); modify_current_playlist_columns(cplaylist, col_name, visible); } /* Callback for adding/deleting track_no column */ static void playlist_track_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_TRACK_NO, state); } /* Callback for adding/deleting title column */ static void playlist_title_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_TITLE, state); } /* Callback for adding/deleting artist column */ static void playlist_artist_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_ARTIST, state); } /* Callback for adding/deleting album column */ static void playlist_album_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_ALBUM, state); } /* Callback for adding/deleting genre column */ static void playlist_genre_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_GENRE, state); } /* Callback for adding/deleting bitrate column */ static void playlist_bitrate_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_BITRATE, state); } /* Callback for adding/deleting year column */ static void playlist_year_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_YEAR, state); } /* Callback for adding/deleting comment column */ static void playlist_comment_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_COMMENT, state); } /* Callback for adding/deleting length column */ static void playlist_length_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_LENGTH, state); } /* Callback for adding/deleting filename column */ static void playlist_filename_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_FILENAME, state); } /* Callback for adding/deleting mimetype column */ static void playlist_mimetype_column_change_cb(GtkCheckMenuItem *item, PraghaPlaylist* cplaylist) { gboolean state; state = gtk_check_menu_item_get_active(item); playlist_column_set_visible(cplaylist, P_MIMETYPE, state); } /* Clear sort in the current playlist */ static void clear_sort_current_playlist_cb(GtkMenuItem *item, PraghaPlaylist *cplaylist) { GtkTreeModel *model = cplaylist->model; gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(model), GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING); } /* Comparison function for track numbers */ static gint compare_track_no(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) { PraghaMusicobject *mobj_a = NULL, *mobj_b = NULL; gtk_tree_model_get(model, a, P_MOBJ_PTR, &mobj_a, -1); gtk_tree_model_get(model, b, P_MOBJ_PTR, &mobj_b, -1); if (!mobj_a || !mobj_b) return 0; if (pragha_musicobject_get_track_no(mobj_a) < pragha_musicobject_get_track_no(mobj_b)) return -1; else if (pragha_musicobject_get_track_no(mobj_a) > pragha_musicobject_get_track_no(mobj_b)) return 1; else return 0; } /* Comparison function for bitrates */ static gint compare_bitrate(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) { PraghaMusicobject *mobj_a = NULL, *mobj_b = NULL; gtk_tree_model_get(model, a, P_MOBJ_PTR, &mobj_a, -1); gtk_tree_model_get(model, b, P_MOBJ_PTR, &mobj_b, -1); if (!mobj_a || !mobj_b) return 0; if (pragha_musicobject_get_bitrate(mobj_a) < pragha_musicobject_get_bitrate(mobj_b)) return -1; else if (pragha_musicobject_get_bitrate(mobj_a) > pragha_musicobject_get_bitrate(mobj_b)) return 1; else return 0; } /* Comparison function for years */ static gint compare_year(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) { PraghaMusicobject *mobj_a = NULL, *mobj_b = NULL; gtk_tree_model_get(model, a, P_MOBJ_PTR, &mobj_a, -1); gtk_tree_model_get(model, b, P_MOBJ_PTR, &mobj_b, -1); if (!mobj_a || !mobj_b) return 0; if (pragha_musicobject_get_year(mobj_a) < pragha_musicobject_get_year(mobj_b)) return -1; else if (pragha_musicobject_get_year(mobj_a) > pragha_musicobject_get_year(mobj_b)) return 1; else return 0; } /* Comparison function for lengths */ static gint compare_length(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer data) { PraghaMusicobject *mobj_a = NULL, *mobj_b = NULL; gtk_tree_model_get(model, a, P_MOBJ_PTR, &mobj_a, -1); gtk_tree_model_get(model, b, P_MOBJ_PTR, &mobj_b, -1); if (!mobj_a || !mobj_b) return 0; if (pragha_musicobject_get_length(mobj_a) < pragha_musicobject_get_length(mobj_b)) return -1; else if (pragha_musicobject_get_length(mobj_a) > pragha_musicobject_get_length(mobj_b)) return 1; else return 0; } gboolean pragha_playlist_propagate_event(PraghaPlaylist* cplaylist, GdkEventKey *event) { GdkEvent *new_event; gboolean ret; gtk_widget_grab_focus(cplaylist->view); new_event = gdk_event_copy ((GdkEvent *) event); ret = gtk_widget_event (GTK_WIDGET (cplaylist->view), new_event); gdk_event_free (new_event); return ret; } void pragha_playlist_activate_path(PraghaPlaylist* cplaylist, GtkTreePath *path) { GtkTreeViewColumn *col; col = gtk_tree_view_get_column(GTK_TREE_VIEW(cplaylist->view), 1); gtk_tree_view_row_activated(GTK_TREE_VIEW(cplaylist->view), path, col); } void pragha_playlist_activate_unique_mobj(PraghaPlaylist* cplaylist, PraghaMusicobject *mobj) { GtkTreePath *path = NULL; path = current_playlist_path_at_mobj(mobj, cplaylist); if(path) { pragha_playlist_activate_path(cplaylist, path); gtk_tree_path_free (path); } } gint pragha_playlist_get_no_tracks (PraghaPlaylist *playlist) { return playlist->no_tracks; } gint pragha_playlist_get_no_unplayed_tracks (PraghaPlaylist *playlist) { return playlist->unplayed_tracks; } gint pragha_playlist_get_total_playtime (PraghaPlaylist *playlist) { GtkTreeIter iter; gint total_playtime = 0; PraghaMusicobject *mobj = NULL; gboolean ret; if(playlist->changing) return 0; ret = gtk_tree_model_get_iter_first (playlist->model, &iter); while (ret) { gtk_tree_model_get (playlist->model, &iter, P_MOBJ_PTR, &mobj, -1); if (mobj) total_playtime += pragha_musicobject_get_length (mobj); ret = gtk_tree_model_iter_next (playlist->model, &iter); } return total_playtime; } gboolean pragha_playlist_has_queue(PraghaPlaylist* cplaylist) { if(cplaylist->queue_track_refs) return TRUE; else return FALSE; } gboolean pragha_playlist_is_changing(PraghaPlaylist* cplaylist) { return cplaylist->changing; } void pragha_playlist_set_changing(PraghaPlaylist* cplaylist, gboolean changing) { cplaylist->changing = changing; gtk_widget_set_sensitive(GTK_WIDGET(cplaylist), !changing); } static void shuffle_changed_cb (GObject *gobject, GParamSpec *pspec, gpointer user_data) { GtkTreeRowReference *ref; PraghaPlaylist *cplaylist = user_data; gboolean shuffle = pragha_preferences_get_shuffle(cplaylist->preferences); if(!cplaylist->no_tracks) return; if (shuffle) { CDEBUG(DBG_INFO, "Turning shuffle on"); if (cplaylist->curr_seq_ref) { ref = gtk_tree_row_reference_copy(cplaylist->curr_seq_ref); reset_rand_track_refs(cplaylist, ref); } } else { CDEBUG(DBG_INFO, "Turning shuffle off"); pragha_playlist_clear_dirty_all (cplaylist); if (cplaylist->curr_rand_ref) cplaylist->curr_seq_ref = gtk_tree_row_reference_copy(cplaylist->curr_rand_ref); else cplaylist->curr_seq_ref = NULL; } } GtkWidget * pragha_playlist_get_view(PraghaPlaylist* cplaylist) { return cplaylist->view; } GtkTreeModel * pragha_playlist_get_model(PraghaPlaylist* cplaylist) { return cplaylist->model; } GtkUIManager * pragha_playlist_get_context_menu(PraghaPlaylist* cplaylist) { return cplaylist->playlist_context_menu; } gint pragha_playlist_append_plugin_action (PraghaPlaylist *cplaylist, GtkActionGroup *action_group, const gchar *menu_xml) { GtkUIManager *ui_manager; GError *error = NULL; gint merge_id; ui_manager = cplaylist->playlist_context_menu; gtk_ui_manager_insert_action_group (ui_manager, action_group, -1); merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, menu_xml, -1, &error); if (error) { g_warning ("Adding plugin to playlist menu: %s", error->message); g_error_free (error); } return merge_id; } void pragha_playlist_remove_plugin_action (PraghaPlaylist *cplaylist, GtkActionGroup *action_group, gint merge_id) { gtk_ui_manager_remove_ui (cplaylist->playlist_context_menu, merge_id); gtk_ui_manager_remove_action_group (cplaylist->playlist_context_menu, action_group); g_object_unref (action_group); } PraghaDatabase * pragha_playlist_get_database(PraghaPlaylist* cplaylist) { return cplaylist->cdbase; } static void pragha_playlist_save_preferences(PraghaPlaylist* cplaylist) { GtkTreeViewColumn *col; const gchar *col_name; gchar **columns; gint cnt = 0, i = 0, *col_widths; GSList *list; GList *cols, *j; /* Save list of columns visible in current playlist */ if (cplaylist->columns) { list = cplaylist->columns; cnt = g_slist_length(cplaylist->columns); columns = g_new0(gchar *, cnt); for (i=0; i<cnt; i++) { columns[i] = list->data; list = list->next; } pragha_preferences_set_string_list (cplaylist->preferences, GROUP_PLAYLIST, KEY_PLAYLIST_COLUMNS, (const gchar **)columns, cnt); g_free(columns); } /* Save column widths */ cols = gtk_tree_view_get_columns(GTK_TREE_VIEW(cplaylist->view)); cnt = g_list_length(cols); if (cols) { col_widths = g_new0(gint, cnt); for (j=cols, i=0; j != NULL; j = j->next) { col = j->data; col_name = gtk_tree_view_column_get_title(col); if (is_present_str_list(col_name, cplaylist->columns)) col_widths[i++] = gtk_tree_view_column_get_width(col); } pragha_preferences_set_integer_list (cplaylist->preferences, GROUP_PLAYLIST, KEY_PLAYLIST_COLUMN_WIDTHS, col_widths, i); g_list_free(cols); g_free(col_widths); } } static void pragha_playlist_init_pixbuf(PraghaPlaylist* cplaylist) { GtkIconTheme *icontheme = gtk_icon_theme_get_default(); gint icon_size = get_playlist_icon_size(); cplaylist->playing_pixbuf = gtk_icon_theme_load_icon (icontheme, "media-playback-start", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); cplaylist->paused_pixbuf = gtk_icon_theme_load_icon (icontheme, "media-playback-pause", icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); } static void pragha_playlist_update_menu_playlist_changes (PraghaDatabase *database, PraghaPlaylist *playlist) { update_playlist_changes_on_menu (playlist); } static void pragha_playlist_init (PraghaPlaylist *playlist) { /* Get usefuls instances */ playlist->cdbase = pragha_database_get (); playlist->preferences = pragha_preferences_get (); playlist->view = create_current_playlist_view (playlist); playlist->model = g_object_ref (gtk_tree_view_get_model(GTK_TREE_VIEW(playlist->view))); /* Setup the scrolled window */ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(playlist), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(playlist), GTK_SHADOW_IN); gtk_scrolled_window_set_hadjustment (GTK_SCROLLED_WINDOW(playlist), NULL); gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW(playlist), NULL); /* Attach view to scroll window */ gtk_container_add (GTK_CONTAINER(playlist), playlist->view); /* Init columns */ init_current_playlist_columns (playlist); /* Init pixbufs */ pragha_playlist_init_pixbuf (playlist); /* Init drag and drop */ init_playlist_dnd (playlist); /* Create menus */ playlist->header_context_menu = create_header_context_menu (playlist); playlist->playlist_context_menu = pragha_playlist_context_menu_new (playlist); /* Init the rest of flags */ playlist->rand = g_rand_new(); playlist->changing = FALSE; playlist->dragging = FALSE; playlist->track_error = NULL; playlist->rand_track_refs = NULL; playlist->queue_track_refs = NULL; /* Conect signals */ g_signal_connect (playlist->preferences, "notify::shuffle", G_CALLBACK (shuffle_changed_cb), playlist); g_signal_connect (G_OBJECT(playlist->view), "row-activated", G_CALLBACK(pragha_playlist_row_activated_cb), playlist); g_signal_connect (G_OBJECT(playlist->view), "button-press-event", G_CALLBACK(pragha_playlist_button_press_cb), playlist); g_signal_connect (G_OBJECT(playlist->view), "button-release-event", G_CALLBACK(current_playlist_button_release_cb), playlist); g_signal_connect (G_OBJECT(playlist->cdbase), "PlaylistsChanged", G_CALLBACK(pragha_playlist_update_menu_playlist_changes), playlist); pragha_playlist_update_menu_playlist_changes (playlist->cdbase, playlist); gtk_widget_show_all (GTK_WIDGET(playlist)); } static void pragha_playlist_dispose (GObject *object) { PraghaPlaylist *playlist = PRAGHA_PLAYLIST (object); if (playlist->preferences) { g_signal_handlers_disconnect_by_func (playlist->preferences, shuffle_changed_cb, playlist); g_object_unref (playlist->preferences); playlist->preferences = NULL; } if (playlist->model) { g_object_unref (playlist->model); playlist->model = NULL; } if (playlist->playlist_context_menu) { g_object_unref (playlist->playlist_context_menu); playlist->playlist_context_menu = NULL; } if (playlist->playing_pixbuf) { g_object_unref (playlist->playing_pixbuf); playlist->playing_pixbuf = NULL; } if (playlist->paused_pixbuf) { g_object_unref (playlist->paused_pixbuf); playlist->paused_pixbuf = NULL; } if (playlist->cdbase) { g_object_unref (playlist->cdbase); playlist->cdbase = NULL; } (*G_OBJECT_CLASS (pragha_playlist_parent_class)->dispose) (object); } static void pragha_playlist_finalize (GObject *object) { PraghaPlaylist *playlist = PRAGHA_PLAYLIST (object); if (playlist->track_error) g_error_free (playlist->track_error); free_str_list (playlist->columns); g_slist_free (playlist->column_widths); g_rand_free (playlist->rand); (*G_OBJECT_CLASS (pragha_playlist_parent_class)->finalize) (object); } static void pragha_playlist_unrealize (GtkWidget *widget) { PraghaPlaylist *playlist = PRAGHA_PLAYLIST (widget); pragha_playlist_save_preferences (playlist); (*GTK_WIDGET_CLASS (pragha_playlist_parent_class)->unrealize) (widget); } static void pragha_playlist_class_init (PraghaPlaylistClass *klass) { GObjectClass *gobject_class; GtkWidgetClass *gtkobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = pragha_playlist_dispose; gobject_class->finalize = pragha_playlist_finalize; gtkobject_class = GTK_WIDGET_CLASS (klass); gtkobject_class->unrealize = pragha_playlist_unrealize; /* * Signals: */ signals[PLAYLIST_SET_TRACK] = g_signal_new ("playlist-set-track", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaPlaylistClass, playlist_set_track), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[PLAYLIST_CHANGE_TAGS] = g_signal_new ("playlist-change-tags", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaPlaylistClass, playlist_change_tags), NULL, NULL, g_cclosure_marshal_VOID__UINT_POINTER, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER); signals[PLAYLIST_CHANGED] = g_signal_new ("playlist-changed", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaPlaylistClass, playlist_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } PraghaPlaylist * pragha_playlist_new (void) { return g_object_new (PRAGHA_TYPE_PLAYLIST, NULL); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-playlist.h������������������������������������������������������������������0000664�0000000�0000000�00000015121�13435240150�0017017�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_PLAYLIST_H #define PRAGHA_PLAYLIST_H #include <gtk/gtk.h> #include "pragha-backend.h" #include "pragha-database.h" #define PRAGHA_TYPE_PLAYLIST (pragha_playlist_get_type ()) #define PRAGHA_PLAYLIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PLAYLIST, PraghaPlaylist)) #define PRAGHA_IS_PLAYLIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_PLAYLIST)) #define PRAGHA_PLAYLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_PLAYLIST, PraghaPlaylistClass)) #define PRAGHA_IS_PLAYLIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_PLAYLIST)) #define PRAGHA_PLAYLIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_PLAYLIST, PraghaPlaylistClass)) typedef struct _PraghaPlaylist PraghaPlaylist; typedef struct { GtkScrolledWindowClass __parent__; void (*playlist_set_track) (PraghaPlaylist *playlist, PraghaMusicobject *mobj); void (*playlist_change_tags) (PraghaPlaylist *playlist, gint changes, PraghaMusicobject *mobj); void (*playlist_changed) (PraghaPlaylist *playlist); } PraghaPlaylistClass; /* Columns in current playlist view */ enum curplaylist_columns { P_MOBJ_PTR, P_QUEUE, P_BUBBLE, P_STATUS_PIXBUF, P_TRACK_NO, P_TITLE, P_ARTIST, P_ALBUM, P_GENRE, P_BITRATE, P_YEAR, P_COMMENT, P_LENGTH, P_FILENAME, P_MIMETYPE, P_PLAYED, N_P_COLUMNS }; /* Current playlist movement */ typedef enum { PLAYLIST_NONE, PLAYLIST_CURR, PLAYLIST_NEXT, PLAYLIST_PREV } PraghaUpdateAction; void save_selected_playlist (GtkAction *action, PraghaPlaylist *cplaylist); void save_current_playlist (GtkAction *action, PraghaPlaylist *cplaylist); void export_current_playlist (GtkAction *action, PraghaPlaylist *cplaylist); void export_selected_playlist (GtkAction *action, PraghaPlaylist *cplaylist); void pragha_playlist_remove_selection (PraghaPlaylist *playlist); void pragha_playlist_crop_selection (PraghaPlaylist *playlist); void pragha_playlist_crop_music_type (PraghaPlaylist *playlist, PraghaMusicSource music_type); void pragha_playlist_remove_all (PraghaPlaylist *playlist); void pragha_playlist_go_prev_track (PraghaPlaylist *playlist); void pragha_playlist_go_any_track (PraghaPlaylist *playlist); void pragha_playlist_go_next_track (PraghaPlaylist *playlist); void pragha_playlist_stopped_playback (PraghaPlaylist *playlist); void pragha_playlist_show_current_track (PraghaPlaylist *playlist); void pragha_playlist_set_track_error (PraghaPlaylist *playlist, GError *error); void select_numered_path_of_current_playlist(PraghaPlaylist *cplaylist, gint path_number, gboolean center); void update_current_playlist_view_playback_state_cb (PraghaBackend *backend, GParamSpec *pspec, PraghaPlaylist *cplaylist); PraghaMusicobject * current_playlist_mobj_at_path(GtkTreePath *path, PraghaPlaylist *cplaylist); void toggle_queue_selected_current_playlist (PraghaPlaylist *cplaylist); void pragha_playlist_update_current_track(PraghaPlaylist *cplaylist, gint changed, PraghaMusicobject *nmobj); void pragha_playlist_append_single_song(PraghaPlaylist *cplaylist, PraghaMusicobject *mobj); void pragha_playlist_append_mobj_and_play(PraghaPlaylist *cplaylist, PraghaMusicobject *mobj); void pragha_playlist_append_mobj_list(PraghaPlaylist *cplaylist, GList *list); gboolean pragha_mobj_list_already_has_title_of_artist(GList *list, const gchar *title, const gchar *artist); gboolean pragha_playlist_already_has_title_of_artist(PraghaPlaylist *cplaylist, const gchar *title, const gchar *artist); GList *pragha_playlist_get_mobj_list(PraghaPlaylist* cplaylist); GList *pragha_playlist_get_selection_mobj_list(PraghaPlaylist* cplaylist); GList *pragha_playlist_get_selection_ref_list(PraghaPlaylist *cplaylist); void pragha_playlist_save_playlist_state (PraghaPlaylist* cplaylist); void pragha_playlist_init_playlist_state (PraghaPlaylist* cplaylist); PraghaMusicobject *pragha_playlist_get_selected_musicobject(PraghaPlaylist* cplaylist); gboolean pragha_playlist_propagate_event(PraghaPlaylist* cplaylist, GdkEventKey *event); void pragha_playlist_activate_path (PraghaPlaylist* cplaylist, GtkTreePath *path); void pragha_playlist_activate_unique_mobj (PraghaPlaylist* cplaylist, PraghaMusicobject *mobj); gint pragha_playlist_get_no_tracks (PraghaPlaylist *playlist); gint pragha_playlist_get_no_unplayed_tracks (PraghaPlaylist *playlist); gint pragha_playlist_get_total_playtime (PraghaPlaylist *playlist); gboolean pragha_playlist_has_queue(PraghaPlaylist* cplaylist); gboolean pragha_playlist_is_changing (PraghaPlaylist* cplaylist); void pragha_playlist_set_changing (PraghaPlaylist* cplaylist, gboolean changing); GtkWidget *pragha_playlist_get_view (PraghaPlaylist* cplaylist); GtkTreeModel *pragha_playlist_get_model (PraghaPlaylist* cplaylist); GtkUIManager *pragha_playlist_get_context_menu(PraghaPlaylist* cplaylist); gint pragha_playlist_append_plugin_action (PraghaPlaylist *cplaylist, GtkActionGroup *action_group, const gchar *menu_xml); void pragha_playlist_remove_plugin_action (PraghaPlaylist *cplaylist, GtkActionGroup *action_group, gint merge_id); PraghaDatabase *pragha_playlist_get_database(PraghaPlaylist* cplaylist); PraghaPlaylist *pragha_playlist_new (void); #endif /* PRAGHA_PLAYLIST_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-playlists-mgmt.c������������������������������������������������������������0000664�0000000�0000000�00000110127�13435240150�0020141�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-playlists-mgmt.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib/gstdio.h> #ifdef HAVE_PLPARSER #include <totem-pl-parser.h> #else #include <fcntl.h> #include "xml_helper.h" #endif #include "pragha-hig.h" #include "pragha-file-utils.h" #include "pragha-utils.h" #include "pragha-musicobject-mgmt.h" #include "pragha.h" /* Playlist management */ typedef enum { NEW_PLAYLIST, APPEND_PLAYLIST, EXPORT_PLAYLIST } PraghaPlaylistAction; /* Build a dialog to get a new playlist name */ static gchar * get_playlist_dialog(PraghaPlaylistActionRange type, GtkWidget *parent) { GtkWidget *dialog; GtkWidget *table, *label, *entry; gchar *playlist = NULL; gint result; guint row = 0; table = pragha_hig_workarea_table_new(); if(type == SAVE_COMPLETE) pragha_hig_workarea_table_add_section_title(table, &row, _("Save playlist")); else pragha_hig_workarea_table_add_section_title(table, &row, _("Save selection")); label = gtk_label_new_with_mnemonic(_("Playlist")); entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 255); gtk_entry_set_activates_default (GTK_ENTRY(entry), TRUE); gtk_widget_grab_focus(GTK_WIDGET(entry)); pragha_hig_workarea_table_add_row(table, &row, label, entry); dialog = gtk_dialog_new_with_buttons (NULL, GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Ok"), GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); if(type == SAVE_COMPLETE) gtk_window_set_title (GTK_WINDOW(dialog), _("Save playlist")); else gtk_window_set_title (GTK_WINDOW(dialog), _("Save selection")); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), table); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); switch(result) { case GTK_RESPONSE_ACCEPT: playlist = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); break; case GTK_RESPONSE_CANCEL: break; default: break; } gtk_widget_destroy(dialog); return playlist; } /* Get a new playlist name that is not reserved */ gchar * get_playlist_name(PraghaPlaylistActionRange type, GtkWidget *parent) { gchar *playlist = NULL; do { playlist = get_playlist_dialog(type, parent); if (playlist && !g_ascii_strcasecmp(playlist, SAVE_PLAYLIST_STATE)) { GtkWidget *dialog; dialog = gtk_message_dialog_new_with_markup(GTK_WINDOW(parent), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, _("<b>con_playlist</b> is a reserved playlist name")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(playlist); continue; } else { break; } } while (1); return playlist; } static gboolean overwrite_existing_playlist(const gchar *playlist, GtkWidget *parent) { GtkWidget *dialog; gint response; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Do you want to overwrite the playlist: %s ?"), playlist); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return (response == GTK_RESPONSE_YES); } GIOChannel* create_m3u_playlist(gchar *file) { GIOChannel *chan = NULL; GIOStatus status; GError *err = NULL; gsize bytes = 0; chan = g_io_channel_new_file(file, "w+", &err); if (!chan) { g_critical("Unable to create M3U playlist IO channel: %s", file); goto exit_failure; } status = g_io_channel_write_chars(chan, "#EXTM3U\n", -1, &bytes, &err); if (status != G_IO_STATUS_NORMAL) { g_critical("Unable to write to M3U playlist: %s", file); goto exit_failure; } CDEBUG(DBG_INFO, "Created M3U playlist file: %s", file); return chan; exit_failure: g_error_free(err); err = NULL; if (chan) { g_io_channel_shutdown(chan, FALSE, &err); g_io_channel_unref(chan); } return NULL; } static gint save_mobj_list_to_m3u_playlist(GList *list, GIOChannel *chan, gchar *filename) { gchar *str = NULL, *uri = NULL, *base_m3u = NULL, *base = NULL; PraghaMusicobject *mobj = NULL; GIOStatus status; gsize bytes = 0; GError *err = NULL; GList *i; gint ret = 0; base_m3u = get_display_filename(filename, TRUE); /* Export all selected tracks to the given file */ for (i=list; i != NULL; i = i->next) { mobj = i->data; if (pragha_musicobject_is_local_file(mobj)) { base = get_display_filename(pragha_musicobject_get_file(mobj), TRUE); if (g_ascii_strcasecmp(base_m3u, base) == 0) uri = get_display_filename(pragha_musicobject_get_file(mobj), FALSE); else uri = g_strdup(pragha_musicobject_get_file(mobj)); /* Format: "#EXTINF:seconds, title" */ str = g_strdup_printf("#EXTINF:%d,%s\n%s\n", pragha_musicobject_get_length(mobj), pragha_musicobject_get_title(mobj), uri); status = g_io_channel_write_chars(chan, str, -1, &bytes, &err); if (status != G_IO_STATUS_NORMAL) { g_critical("Unable to write to M3U playlist: %s", filename); ret = -1; goto exit_list; } g_free(base); g_free(uri); } /* Have to give control to GTK periodically ... */ pragha_process_gtk_events (); } exit_list: g_free(base_m3u); if (err) { g_error_free(err); err = NULL; } return ret; } #ifdef HAVE_PLPARSER static void pragha_parser_append_foreach_playlist (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { TotemPlPlaylistIter pl_iter; PraghaMusicobject *mobj; const gchar *filename; gchar *uri = NULL; TotemPlPlaylist *playlist = data; gtk_tree_model_get (model, iter, P_MOBJ_PTR, &mobj, -1); filename = pragha_musicobject_get_file(mobj); uri = g_filename_to_uri (filename, NULL, NULL); totem_pl_playlist_append (playlist, &pl_iter); totem_pl_playlist_set (playlist, &pl_iter, TOTEM_PL_PARSER_FIELD_URI, uri, NULL); g_free(uri); } static gboolean pragha_parser_append_foreach_track_list (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { pragha_parser_append_foreach_playlist (model, path, iter, data); return FALSE; } static gboolean pragha_parser_save_full_track_list (PraghaPlaylist *cplaylist, const gchar *filename) { TotemPlPlaylist *playlist; TotemPlParser *pl; GFile *file; gboolean ret = TRUE; pl = totem_pl_parser_new (); playlist = totem_pl_playlist_new (); file = g_file_new_for_path (filename); gtk_tree_model_foreach(pragha_playlist_get_model(cplaylist), pragha_parser_append_foreach_track_list, playlist); if (totem_pl_parser_save (pl, playlist, file, "Title", TOTEM_PL_PARSER_M3U, NULL) != TRUE) { g_error ("Playlist writing failed."); ret = FALSE; } g_object_unref (playlist); g_object_unref (pl); g_object_unref (file); return ret; } static gboolean pragha_parser_save_selection_track_list (PraghaPlaylist *cplaylist, const gchar *filename) { TotemPlPlaylist *playlist; TotemPlParser *pl; GtkTreeSelection *selection; GFile *file; gboolean ret = TRUE; pl = totem_pl_parser_new (); playlist = totem_pl_playlist_new (); file = g_file_new_for_path (filename); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(pragha_playlist_get_view(cplaylist))); gtk_tree_selection_selected_foreach(selection, pragha_parser_append_foreach_playlist, playlist); if (totem_pl_parser_save (pl, playlist, file, "Title", TOTEM_PL_PARSER_M3U, NULL) != TRUE) { g_error ("Playlist writing failed."); ret = FALSE; } g_object_unref (playlist); g_object_unref (pl); g_object_unref (file); return ret; } #else static gint save_complete_m3u_playlist(PraghaPlaylist* cplaylist, GIOChannel *chan, gchar *filename) { gint ret = 0; GList *list = NULL; list = pragha_playlist_get_mobj_list(cplaylist); if(list != NULL) { ret = save_mobj_list_to_m3u_playlist(list, chan, filename); g_list_free(list); } return ret; } static gint save_selected_to_m3u_playlist(PraghaPlaylist* cplaylist, GIOChannel *chan, gchar *filename) { GList *list = NULL; gint ret = 0; list = pragha_playlist_get_selection_mobj_list(cplaylist); if (list != NULL) { ret = save_mobj_list_to_m3u_playlist(list, chan, filename); g_list_free(list); } return ret; } #endif gint save_m3u_playlist(GIOChannel *chan, gchar *playlist, gchar *filename, PraghaDatabase *cdbase) { GList *list = NULL; gint ret = 0; list = add_playlist_to_mobj_list(cdbase, playlist, list); if (list != NULL) { ret = save_mobj_list_to_m3u_playlist(list, chan, filename); g_list_free_full (list, (GDestroyNotify) g_object_unref); } return ret; } /**********************/ /* External functions */ /**********************/ /* Append the given playlist to the current playlist */ void add_playlist_current_playlist(gchar *splaylist, PraghaApplication *pragha) { PraghaPlaylist *playlist; PraghaDatabase *cdbase; GList *list = NULL; cdbase = pragha_application_get_database (pragha); list = add_playlist_to_mobj_list (cdbase, splaylist, list); if(list) { playlist = pragha_application_get_playlist (pragha); pragha_playlist_append_mobj_list (playlist, list); g_list_free (list); } } /* Append the given playlist to the mobj list. */ GList * add_playlist_to_mobj_list(PraghaDatabase *cdbase, const gchar *playlist, GList *list) { gint playlist_id, location_id; PraghaMusicobject *mobj; playlist_id = pragha_database_find_playlist (cdbase, playlist); if(playlist_id == 0) goto bad; const gchar *sql = "SELECT file FROM PLAYLIST_TRACKS WHERE playlist = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); pragha_prepared_statement_bind_int (statement, 1, playlist_id); while (pragha_prepared_statement_step (statement)) { const gchar *file = pragha_prepared_statement_get_string (statement, 0); if ((location_id = pragha_database_find_location (cdbase, file))) mobj = new_musicobject_from_db(cdbase, location_id); else mobj = new_musicobject_from_file (file); if (G_LIKELY(mobj)) list = g_list_append(list, mobj); } pragha_prepared_statement_free (statement); bad: return list; } /* Append the given radio to the mobj list. */ GList * add_radio_to_mobj_list(PraghaDatabase *cdbase, const gchar *radio, GList *list) { gint radio_id; PraghaMusicobject *mobj; radio_id = pragha_database_find_radio (cdbase, radio); if(radio_id == 0) goto bad; const gchar *sql = "SELECT uri FROM RADIO_TRACKS WHERE radio = ?"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); pragha_prepared_statement_bind_int (statement, 1, radio_id); while (pragha_prepared_statement_step (statement)) { const gchar *uri = pragha_prepared_statement_get_string (statement, 0); mobj = new_musicobject_from_location (uri, radio); if (G_LIKELY(mobj)) list = g_list_append(list, mobj); } pragha_prepared_statement_free (statement); bad: return list; } /* Build a dialog to get a new playlist name */ gchar* rename_playlist_dialog(const gchar *oplaylist, GtkWidget *parent) { GtkWidget *dialog; GtkWidget *table, *entry; gchar *playlist = NULL; gint result; guint row = 0; /* Create dialog window */ table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("Choose a new name")); entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry), 255); gtk_entry_set_activates_default (GTK_ENTRY(entry), TRUE); pragha_hig_workarea_table_add_wide_control(table, &row, entry); dialog = gtk_dialog_new_with_buttons (_("Rename"), GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Ok"), GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); gtk_entry_set_text(GTK_ENTRY(entry), oplaylist); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), table); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); switch(result) { case GTK_RESPONSE_ACCEPT: /* Get playlist name */ playlist = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry))); break; case GTK_RESPONSE_CANCEL: break; default: break; } gtk_widget_destroy(dialog); return playlist; } gboolean delete_existing_item_dialog(const gchar *item, GtkWidget *parent) { gboolean choice = FALSE; gint ret; GtkWidget *dialog; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Do you want to delete the item: %s ?"), item); ret = gtk_dialog_run(GTK_DIALOG(dialog)); switch(ret) { case GTK_RESPONSE_YES: choice = TRUE; break; case GTK_RESPONSE_NO: choice = FALSE; break; default: break; } gtk_widget_destroy(dialog); return choice; } /* Export selection/current playlist to a M3U file */ gchar * playlist_export_dialog_get_filename(const gchar *prefix, GtkWidget *parent) { GtkWidget *dialog; gchar *filename = NULL, *playlistm3u = NULL; gint resp; dialog = gtk_file_chooser_dialog_new (_("Export playlist to file"), GTK_WINDOW(parent), GTK_FILE_CHOOSER_ACTION_SAVE, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Save"), GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE); playlistm3u = g_strdup_printf("%s.m3u", prefix); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(dialog), playlistm3u); g_free(playlistm3u); resp = gtk_dialog_run(GTK_DIALOG(dialog)); switch (resp) { case GTK_RESPONSE_ACCEPT: filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); break; default: break; } gtk_widget_destroy(dialog); return filename; } #ifdef HAVE_PLPARSER void export_playlist (PraghaPlaylist* cplaylist, PraghaPlaylistActionRange choice) { gchar *filename = NULL; filename = playlist_export_dialog_get_filename(_("Playlists"), gtk_widget_get_toplevel(GTK_WIDGET(cplaylist))); if (!filename) return; switch(choice) { case SAVE_COMPLETE: if (pragha_parser_save_full_track_list(cplaylist, filename) == FALSE) g_warning("Unable to save M3U playlist: %s", filename); break; case SAVE_SELECTED: if (pragha_parser_save_selection_track_list(cplaylist, filename) == FALSE) g_warning("Unable to save M3U playlist: %s", filename); break; default: break; } g_free(filename); } #else void export_playlist (PraghaPlaylist* cplaylist, PraghaPlaylistActionRange choice) { gchar *filename = NULL; GIOChannel *chan = NULL; GError *err = NULL; filename = playlist_export_dialog_get_filename(_("Playlists"), gtk_widget_get_toplevel(GTK_WIDGET(cplaylist))); if (!filename) goto exit; chan = create_m3u_playlist(filename); if (!chan) { g_warning("Unable to create M3U playlist file: %s", filename); goto exit; } switch(choice) { case SAVE_COMPLETE: if (save_complete_m3u_playlist(cplaylist, chan, filename) < 0) { g_warning("Unable to save M3U playlist: %s", filename); goto exit; } break; case SAVE_SELECTED: if (save_selected_to_m3u_playlist(cplaylist, chan, filename) < 0) { g_warning("Unable to save M3U playlist: %s", filename); goto exit; } break; default: break; } if (chan) { if (g_io_channel_shutdown(chan, TRUE, &err) != G_IO_STATUS_NORMAL) { g_critical("Unable to save M3U playlist: %s", filename); g_error_free(err); err = NULL; } else { CDEBUG(DBG_INFO, "Saved M3U playlist: %s", filename); } g_io_channel_unref(chan); } exit: g_free(filename); } #endif #ifdef HAVE_PLPARSER static void _on_pl_entry_parsed (TotemPlParser *parser, gchar *uri, gpointer metadata, GSList **plitems) { gchar *filename = NULL; if (uri != NULL) { /* Convert the uri into a filename to taglib.*/ if (g_str_has_prefix (uri, "file:")) filename = g_filename_from_uri (uri, NULL, NULL); else filename = g_strdup(uri); *plitems = g_slist_append(*plitems, filename); } } GSList * pragha_totem_pl_parser_parse_from_uri (const gchar *uri) { TotemPlParser *pl_parser = NULL; GSList *plitems = NULL; gchar *base; pl_parser = totem_pl_parser_new (); //g_object_set (pl_parser, "recurse", FALSE, NULL); g_signal_connect (G_OBJECT(pl_parser), "entry-parsed", G_CALLBACK(_on_pl_entry_parsed), &plitems); base = get_display_filename(uri, TRUE); switch (totem_pl_parser_parse_with_base(pl_parser, uri, base, FALSE)) { case TOTEM_PL_PARSER_RESULT_UNHANDLED: case TOTEM_PL_PARSER_RESULT_IGNORED: /* maybe it's the actual stream URL, then */ plitems = g_slist_append(plitems, g_strdup(uri)); break; case TOTEM_PL_PARSER_RESULT_ERROR: g_warning ("An error happens while parsing %s", uri); break; case TOTEM_PL_PARSER_RESULT_SUCCESS: default: break; } g_object_unref (pl_parser); g_free(base); return plitems; } #else GSList * pragha_pl_parser_parse_xspf (const gchar *filename) { XMLNode *xml = NULL, *xi, *xl; gchar *contents, *f_file, *uri, *base; GSList *list = NULL; GError *err = NULL; GFile *file; gsize size; file = g_file_new_for_path (filename); if (!g_file_load_contents (file, NULL, &contents, &size, NULL, NULL)) { goto out; } if (g_utf8_validate (contents, -1, NULL) == FALSE) { gchar *fixed; fixed = g_convert (contents, -1, "UTF-8", "ISO8859-1", NULL, NULL, NULL); if (fixed != NULL) { g_free (contents); contents = fixed; } } base = get_display_filename(filename, TRUE); xml = tinycxml_parse(contents); xi = xmlnode_get(xml,CCA { "playlist","trackList","track",NULL},NULL,NULL); for(;xi;xi= xi->next) { xl = xmlnode_get(xi,CCA {"track","location",NULL},NULL,NULL); if (xl && xl->content) { f_file = g_filename_from_uri(xl->content, NULL, &err); if (!f_file) { g_warning("Unable to get filename from UTF-8 string: %s", xl->content); g_error_free(err); err = NULL; continue; } if (g_path_is_absolute(f_file)) uri = g_strdup(f_file); else { uri = g_build_filename (base, f_file, NULL); } list = g_slist_append (list, uri); g_free(f_file); } } xmlnode_free(xml); g_free(contents); g_free(base); out: g_object_unref (file); return list; } GSList * pragha_pl_parser_parse_pls (const gchar *file) { GKeyFile *plskeyfile; GError *error = NULL; GSList *list = NULL; guint i, nentries; gchar key[128], *file_entry = NULL, *uri = NULL, *base = NULL; base = get_display_filename(file, TRUE); plskeyfile = g_key_file_new(); if (!g_key_file_load_from_file(plskeyfile, file, G_KEY_FILE_NONE, &error)) { g_critical("Unable to load pls playlist, err: %s", error->message); } else { nentries = g_key_file_get_integer (plskeyfile, "playlist", "NumberOfEntries", NULL); if (nentries > 0) { for (i = 1; i <= nentries; i++) { g_snprintf (key, 128, "File%d", i); file_entry = g_key_file_get_string(plskeyfile, "playlist", key, NULL); if (NULL == file_entry) continue; if (g_path_is_absolute(file_entry)) uri = g_strdup(file_entry); else { uri = g_build_filename (base, file_entry, NULL); } list = g_slist_append (list, uri); g_free(file_entry); } } } g_key_file_free (plskeyfile); g_free(base); return list; } /* Load a M3U playlist, and add tracks to current playlist */ GSList * pragha_pl_parser_parse_m3u (const gchar *file) { GError *err = NULL; GIOChannel *chan = NULL; gint fd; gsize len, term; gchar *str, *filename, *f_file, *uri, *base; GSList *list = NULL; fd = g_open(file, O_RDONLY, 0); if (fd == -1) { g_critical("Unable to open file : %s", file); return NULL; } chan = g_io_channel_unix_new(fd); if (!chan) { g_critical("Unable to open an IO channel for file: %s", file); goto exit_close; } base = get_display_filename(file, TRUE); while (g_io_channel_read_line(chan, &str, &len, &term, &err) == G_IO_STATUS_NORMAL) { if (!str || !len) break; /* Skip lines containing #EXTM3U or #EXTINF */ if (g_strrstr(str, "#EXTM3U") || g_strrstr(str, "#EXTINF")) { g_free(str); continue; } filename = g_strndup(str, term); f_file = g_filename_from_utf8(filename, -1, NULL, NULL, &err); if (!f_file) { g_warning("Unable to get filename from UTF-8 string: %s", filename); g_error_free(err); err = NULL; goto continue_read; } if (g_path_is_absolute(f_file)) uri = g_strdup(f_file); else { uri = g_build_filename (base, f_file, NULL); } list = g_slist_append (list, uri); pragha_process_gtk_events (); g_free(f_file); continue_read: g_free(filename); g_free(str); } CDEBUG(DBG_INFO, "Loaded M3U playlist: %s", file); g_free(base); if (g_io_channel_shutdown(chan, TRUE, &err) != G_IO_STATUS_NORMAL) { g_critical("Unable to open M3U playlist: %s", file); g_error_free(err); err = NULL; } g_io_channel_unref(chan); exit_close: close(fd); return list; } GSList * pragha_pl_parser_parse (PraghaPlaylistType format, const gchar *filename) { GSList *list = NULL; switch (format) { case PL_FORMAT_M3U: list = pragha_pl_parser_parse_m3u (filename); break; case PL_FORMAT_PLS: list = pragha_pl_parser_parse_pls (filename); break; case PL_FORMAT_ASX: //list = pragha_pl_parser_parse_asx (filename); break; case PL_FORMAT_XSPF: list = pragha_pl_parser_parse_xspf (filename); break; default: break; } return list; } GSList *pragha_pl_parser_parse_from_file_by_extension (const gchar *filename) { PraghaPlaylistType format = PL_FORMAT_UNKNOWN; GSList *list = NULL; if ((format = pragha_pl_parser_guess_format_from_extension (filename)) != PL_FORMAT_UNKNOWN) { list = pragha_pl_parser_parse (format, filename); } else { g_debug ("Unable to guess playlist format : %s", filename); } return list; } #endif GList * pragha_pl_parser_append_mobj_list_by_extension (GList *mlist, const gchar *file) { GSList *list = NULL, *i = NULL; PraghaMusicobject *mobj; #ifdef HAVE_PLPARSER gchar *uri = g_filename_to_uri (file, NULL, NULL); list = pragha_totem_pl_parser_parse_from_uri(uri); g_free (uri); #else list = pragha_pl_parser_parse_from_file_by_extension (file); #endif for (i = list; i != NULL; i = i->next) { mobj = new_musicobject_from_file(i->data); if (G_LIKELY(mobj)) mlist = g_list_append(mlist, mobj); pragha_process_gtk_events (); g_free(i->data); } g_slist_free(list); return mlist; } void pragha_pl_parser_open_from_file_by_extension (const gchar *file, PraghaApplication *pragha) { PraghaPlaylist *playlist; GSList *list = NULL, *i = NULL; GList *mlist = NULL; gchar *summary; gint try = 0, added = 0; PraghaStatusbar *statusbar; PraghaMusicobject *mobj; #ifdef HAVE_PLPARSER gchar *uri = g_filename_to_uri (file, NULL, NULL); list = pragha_totem_pl_parser_parse_from_uri(uri); g_free (uri); #else list = pragha_pl_parser_parse_from_file_by_extension (file); #endif for (i = list; i != NULL; i = i->next) { try++; mobj = new_musicobject_from_file(i->data); if (G_LIKELY(mobj)) { added++; mlist = g_list_append(mlist, mobj); } pragha_process_gtk_events (); g_free(i->data); } playlist = pragha_application_get_playlist (pragha); pragha_playlist_append_mobj_list (playlist, mlist); summary = g_strdup_printf(_("Added %d songs from %d of the imported playlist."), added, try); statusbar = pragha_statusbar_get (); pragha_statusbar_set_misc_text (statusbar, summary); g_object_unref (statusbar); g_free(summary); g_slist_free(list); g_list_free(mlist); } gchar * pragha_pl_get_first_playlist_item (const gchar *uri) { gchar *file = NULL; #ifdef HAVE_PLPARSER GSList *list = pragha_totem_pl_parser_parse_from_uri(uri); if (list != NULL) { file = g_strdup(list->data); g_slist_free_full(list, g_free); } else { file = g_strdup(uri); } #else /* TODO: Check if local uri and parse it */ file = g_strdup(uri); #endif return file; } /* Appennd a tracks list to a playlist using the given type */ static void append_files_to_playlist(PraghaDatabase *cdbase, GSList *list, gint playlist_id) { gchar *file; GSList *i = NULL; pragha_database_begin_transaction (cdbase); for (i=list; i != NULL; i = i->next) { file = i->data; pragha_database_add_playlist_track (cdbase, playlist_id, file); g_free(file); } pragha_database_commit_transaction (cdbase); } /* Save tracks to a playlist using the given type */ void save_playlist(PraghaPlaylist* cplaylist, gint playlist_id, PraghaPlaylistActionRange type) { PraghaMusicobject *mobj = NULL; GList *mlist = NULL, *i; GSList *files = NULL; gchar *file = NULL; switch(type) { case SAVE_COMPLETE: mlist = pragha_playlist_get_mobj_list(cplaylist); break; case SAVE_SELECTED: mlist = pragha_playlist_get_selection_mobj_list(cplaylist); break; default: break; } if(mlist != NULL) { for (i=mlist; i != NULL; i = i->next) { mobj = i->data; if (pragha_musicobject_is_local_file(mobj)) { file = g_strdup(pragha_musicobject_get_file(mobj)); files = g_slist_prepend(files, file); } else if(pragha_musicobject_get_source(mobj) == FILE_HTTP) { /* TODO: Fix this negradaaa!. */ file = g_strdup_printf("Radio:/%s", pragha_musicobject_get_file(mobj)); files = g_slist_prepend(files, file); } } g_list_free(mlist); } if(files != NULL) { append_files_to_playlist(pragha_playlist_get_database(cplaylist), files, playlist_id); g_slist_free(files); } } void new_playlist(PraghaPlaylist* cplaylist, const gchar *playlist, PraghaPlaylistActionRange type) { gint playlist_id = 0; if (string_is_empty(playlist)) { g_warning("Playlist name is NULL"); return; } if ((playlist_id = pragha_database_find_playlist (pragha_playlist_get_database(cplaylist), playlist))) { if (overwrite_existing_playlist(playlist, gtk_widget_get_toplevel(GTK_WIDGET(cplaylist)))) pragha_database_delete_playlist (pragha_playlist_get_database(cplaylist), playlist); else return; } playlist_id = pragha_database_add_new_playlist (pragha_playlist_get_database(cplaylist), playlist); save_playlist(cplaylist, playlist_id, type); } void append_playlist(PraghaPlaylist* cplaylist, const gchar *playlist, PraghaPlaylistActionRange type) { gint playlist_id; if (string_is_empty(playlist)) { g_warning("Playlist name is NULL"); return; } playlist_id = pragha_database_find_playlist (pragha_playlist_get_database(cplaylist), playlist); if (!playlist_id) { g_warning("Playlist doesn't exist\n"); return; } save_playlist(cplaylist, playlist_id, type); } gchar * new_radio (PraghaPlaylist *playlist, const gchar *uri, const gchar *basename) { PraghaDatabase *cdbase; gchar *name = NULL; gint radio_id = 0, i = 0; if (string_is_empty(basename)) { g_warning("Radio name is NULL"); return NULL; } cdbase = pragha_playlist_get_database(playlist); if (!pragha_database_find_radio (cdbase, basename)) { name = g_strdup (basename); } else { /* Get a new name */ do { if (name) g_free (name); name = g_strdup_printf ("%s %i", basename, ++i); } while (pragha_database_find_radio (cdbase, name)); } /* Save a new radio */ radio_id = pragha_database_add_new_radio (cdbase, name); pragha_database_add_radio_track (cdbase, radio_id, uri); return name; } PraghaPlaylistAction replace_or_append_dialog(PraghaPlaylist *cplaylist, const gchar *playlist, PraghaPlaylistActionRange type) { GtkWidget *dialog; GtkWidget *table, *radio_replace, *radio_add; gchar *string_options = NULL; gint result; guint row = 0; PraghaPlaylistAction choise = EXPORT_PLAYLIST; /* Create dialog window */ table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("What do you want to do?")); string_options = g_strdup_printf(_("Replace the playlist \"%s\""), playlist); radio_replace = gtk_radio_button_new_with_label_from_widget (NULL, string_options); pragha_hig_workarea_table_add_wide_control(table, &row, radio_replace); g_free(string_options); string_options = g_strdup_printf(_("Add to playlist \"%s\""), playlist); radio_add = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON(radio_replace), string_options); pragha_hig_workarea_table_add_wide_control(table, &row, radio_add); g_free(string_options); dialog = gtk_dialog_new_with_buttons (NULL, GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(cplaylist))), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Ok"), GTK_RESPONSE_ACCEPT, NULL); if(type == SAVE_COMPLETE) gtk_window_set_title (GTK_WINDOW(dialog), _("Save playlist")); else gtk_window_set_title (GTK_WINDOW(dialog), _("Save selection")); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), table); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); switch(result) { case GTK_RESPONSE_ACCEPT: if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(radio_replace))) choise = NEW_PLAYLIST; else choise = APPEND_PLAYLIST; break; case GTK_RESPONSE_CANCEL: default: break; } gtk_widget_destroy(dialog); return choise; } void pragha_playlist_save_selection (PraghaPlaylist *playlist, const gchar *name) { PraghaPlaylistAction choise; choise = replace_or_append_dialog (playlist, name, SAVE_SELECTED); switch(choise) { case NEW_PLAYLIST: new_playlist (playlist, name, SAVE_SELECTED); break; case APPEND_PLAYLIST: append_playlist (playlist, name, SAVE_SELECTED); break; default: break; } } void pragha_playlist_save_playlist (PraghaPlaylist *playlist, const gchar *name) { PraghaPlaylistAction choise; choise = replace_or_append_dialog (playlist, name, SAVE_COMPLETE); switch(choise) { case NEW_PLAYLIST: new_playlist (playlist, name, SAVE_COMPLETE); break; case APPEND_PLAYLIST: append_playlist (playlist, name, SAVE_COMPLETE); break; default: break; } } static void playlist_save_selection (GtkMenuItem *menuitem, PraghaPlaylist *cplaylist) { const gchar *playlist; playlist = gtk_menu_item_get_label (menuitem); pragha_playlist_save_selection (cplaylist, playlist); } static void playlist_save_complete_playlist (GtkMenuItem *menuitem, PraghaPlaylist *cplaylist) { const gchar *playlist; playlist = gtk_menu_item_get_label (menuitem); pragha_playlist_save_playlist (cplaylist, playlist); } static void update_playlist_changes_save_selection_popup_playlist (PraghaPlaylist *cplaylist) { GtkWidget *submenu, *menuitem; submenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (gtk_ui_manager_get_widget (pragha_playlist_get_context_menu(cplaylist), "/SelectionPopup/Save selection")), submenu); menuitem = gtk_image_menu_item_new_with_label (_("New playlist")); g_signal_connect(menuitem, "activate", G_CALLBACK(save_selected_playlist), cplaylist); gtk_menu_shell_append (GTK_MENU_SHELL(submenu), menuitem); menuitem = gtk_image_menu_item_new_with_label (_("Export")); g_signal_connect(menuitem, "activate", G_CALLBACK(export_selected_playlist), cplaylist); gtk_menu_shell_append (GTK_MENU_SHELL(submenu), menuitem); menuitem = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL(submenu), menuitem); const gchar *sql = "SELECT name FROM PLAYLIST WHERE name != ? ORDER BY name COLLATE NOCASE"; PraghaPreparedStatement *statement = pragha_database_create_statement (pragha_playlist_get_database(cplaylist), sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { const gchar *name = pragha_prepared_statement_get_string (statement, 0); menuitem = gtk_image_menu_item_new_with_label (name); g_signal_connect (menuitem, "activate", G_CALLBACK(playlist_save_selection), cplaylist); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem); } pragha_prepared_statement_free (statement); gtk_widget_show_all (submenu); } static void update_playlist_changes_save_playlist_popup_playlist (PraghaPlaylist *cplaylist) { GtkWidget *submenu, *menuitem; submenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (gtk_ui_manager_get_widget (pragha_playlist_get_context_menu(cplaylist), "/SelectionPopup/Save playlist")), submenu); menuitem = gtk_image_menu_item_new_with_label (_("New playlist")); g_signal_connect(menuitem, "activate", G_CALLBACK(save_current_playlist), cplaylist); gtk_menu_shell_append (GTK_MENU_SHELL(submenu), menuitem); menuitem = gtk_image_menu_item_new_with_label (_("Export")); g_signal_connect(menuitem, "activate", G_CALLBACK(export_current_playlist), cplaylist); gtk_menu_shell_append (GTK_MENU_SHELL(submenu), menuitem); menuitem = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL(submenu), menuitem); const gchar *sql = "SELECT name FROM PLAYLIST WHERE name != ? ORDER BY name COLLATE NOCASE"; PraghaPreparedStatement *statement = pragha_database_create_statement (pragha_playlist_get_database(cplaylist), sql); pragha_prepared_statement_bind_string (statement, 1, SAVE_PLAYLIST_STATE); while (pragha_prepared_statement_step (statement)) { const gchar *name = pragha_prepared_statement_get_string (statement, 0); menuitem = gtk_image_menu_item_new_with_label (name); g_signal_connect (menuitem, "activate", G_CALLBACK(playlist_save_complete_playlist), cplaylist); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), menuitem); } pragha_prepared_statement_free (statement); gtk_widget_show_all (submenu); } void update_playlist_changes_on_menu (PraghaPlaylist *playlist) { update_playlist_changes_save_playlist_popup_playlist (playlist); update_playlist_changes_save_selection_popup_playlist (playlist); } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-playlists-mgmt.h������������������������������������������������������������0000664�0000000�0000000�00000006600�13435240150�0020146�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_PLAYLISTS_MGMT_H #define PRAGHA_PLAYLISTS_MGMT_H #include "pragha-database.h" #include "pragha-playlist.h" #include "pragha.h" /* Playlist management */ typedef enum { SAVE_COMPLETE, SAVE_SELECTED } PraghaPlaylistActionRange; #define SAVE_PLAYLIST_STATE "con_playlist" gchar *get_playlist_name(PraghaPlaylistActionRange type, GtkWidget *parent); void add_playlist_current_playlist(gchar *splaylist, PraghaApplication *pragha); GList * add_playlist_to_mobj_list(PraghaDatabase *cdbase, const gchar *playlist, GList *list); GList *add_radio_to_mobj_list(PraghaDatabase *cdbase, const gchar *playlist, GList *list); gboolean delete_existing_item_dialog(const gchar *item, GtkWidget *parent); gchar* rename_playlist_dialog(const gchar *oplaylist, GtkWidget *parent); GIOChannel *create_m3u_playlist(gchar *file); gint save_m3u_playlist(GIOChannel *chan, gchar *playlist, gchar *filename, PraghaDatabase *cdbase); gchar *playlist_export_dialog_get_filename(const gchar *prefix, GtkWidget *parent); void export_playlist (PraghaPlaylist* cplaylist, PraghaPlaylistActionRange choice); void save_playlist(PraghaPlaylist* cplaylist, gint playlist_id, PraghaPlaylistActionRange type); void new_playlist(PraghaPlaylist* cplaylist, const gchar *playlist, PraghaPlaylistActionRange type); void append_playlist(PraghaPlaylist* cplaylist, const gchar *playlist, PraghaPlaylistActionRange type); void pragha_playlist_save_selection (PraghaPlaylist *playlist, const gchar *name); void pragha_playlist_save_playlist (PraghaPlaylist *playlist, const gchar *name); GList * pragha_pl_parser_append_mobj_list_by_extension (GList *mlist, const gchar *file); GSList *pragha_pl_parser_parse_from_file_by_extension (const gchar *filename); GSList *pragha_totem_pl_parser_parse_from_uri(const gchar *uri); void pragha_pl_parser_open_from_file_by_extension(const gchar *file, PraghaApplication *pragha); gchar * pragha_pl_get_first_playlist_item (const gchar *uri); gchar * new_radio (PraghaPlaylist *playlist, const gchar *uri, const gchar *basename); void update_playlist_changes_on_menu (PraghaPlaylist *playlist); #endif /* PRAGHA_PLAYLISTS_MGMT_H */ ��������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-plugins-engine.c������������������������������������������������������������0000664�0000000�0000000�00000013662�13435240150�0020105�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-plugins-engine.h" #include <libpeas/peas.h> #include "pragha-utils.h" #include "pragha-debug.h" #include "pragha.h" struct _PraghaPluginsEngine { GObject _parent; GObject *object; PeasEngine *peas_engine; PeasExtensionSet *peas_exten_set; gboolean shutdown; }; G_DEFINE_TYPE(PraghaPluginsEngine, pragha_plugins_engine, G_TYPE_OBJECT) static void on_extension_added (PeasExtensionSet *set, PeasPluginInfo *info, PeasExtension *exten, gpointer data) { peas_activatable_activate (PEAS_ACTIVATABLE (exten)); } static void on_extension_removed (PeasExtensionSet *set, PeasPluginInfo *info, PeasExtension *exten, gpointer data) { peas_activatable_deactivate (PEAS_ACTIVATABLE (exten)); } gboolean pragha_plugins_is_shutdown (PraghaPluginsEngine *engine) { return engine->shutdown; } void pragha_plugins_engine_shutdown (PraghaPluginsEngine *engine) { PraghaPreferences *preferences; gchar **loaded_plugins = NULL; CDEBUG(DBG_PLUGIN,"Plugins engine shutdown"); engine->shutdown = TRUE; g_signal_handlers_disconnect_by_func (engine->peas_exten_set, (GCallback) on_extension_added, engine); g_signal_handlers_disconnect_by_func (engine->peas_exten_set, (GCallback) on_extension_removed, engine); loaded_plugins = peas_engine_get_loaded_plugins (engine->peas_engine); if (loaded_plugins) { preferences = pragha_application_get_preferences (PRAGHA_APPLICATION(engine->object)); pragha_preferences_set_string_list (preferences, "PLUGINS", "Activated", (const gchar * const*)loaded_plugins, g_strv_length(loaded_plugins)); g_strfreev(loaded_plugins); } peas_engine_set_loaded_plugins (engine->peas_engine, NULL); } void pragha_plugins_engine_startup (PraghaPluginsEngine *engine) { PraghaPreferences *preferences; gchar **loaded_plugins = NULL; const gchar *default_plugins[] = {"notify", "mpris2", "song-info", NULL}; CDEBUG(DBG_PLUGIN,"Plugins engine startup"); preferences = pragha_application_get_preferences (PRAGHA_APPLICATION(engine->object)); if (string_is_not_empty (pragha_preferences_get_installed_version (preferences))) { loaded_plugins = pragha_preferences_get_string_list (preferences, "PLUGINS", "Activated", NULL); if (loaded_plugins) { peas_engine_set_loaded_plugins (engine->peas_engine, (const gchar **) loaded_plugins); g_strfreev(loaded_plugins); } } else { peas_engine_set_loaded_plugins (engine->peas_engine, (const gchar **) default_plugins); } } /* * PraghaPluginsEngine */ static void pragha_plugins_engine_dispose (GObject *object) { PraghaPluginsEngine *engine = PRAGHA_PLUGINS_ENGINE(object); CDEBUG(DBG_PLUGIN,"Dispose plugins engine"); if (engine->peas_exten_set) { g_object_unref (engine->peas_exten_set); engine->peas_exten_set = NULL; } if (engine->peas_engine) { peas_engine_garbage_collect (engine->peas_engine); g_object_unref (engine->peas_engine); engine->peas_engine = NULL; } if (engine->object) { g_object_unref (engine->object); engine->object = NULL; } G_OBJECT_CLASS(pragha_plugins_engine_parent_class)->dispose(object); } static void pragha_plugins_engine_class_init (PraghaPluginsEngineClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->dispose = pragha_plugins_engine_dispose; } static void pragha_plugins_engine_init (PraghaPluginsEngine *engine) { engine->peas_engine = peas_engine_get_default (); engine->shutdown = FALSE; } PraghaPluginsEngine * pragha_plugins_engine_new (GObject *object) { PraghaPluginsEngine *engine; CDEBUG(DBG_PLUGIN,"Create new plugins engine"); engine = g_object_new (PRAGHA_TYPE_PLUGINS_ENGINE, NULL); engine->object = g_object_ref(object); peas_engine_add_search_path (engine->peas_engine, LIBPLUGINDIR, USRPLUGINDIR); engine->peas_exten_set = peas_extension_set_new (engine->peas_engine, PEAS_TYPE_ACTIVATABLE, "object", object, NULL); g_signal_connect (engine->peas_exten_set, "extension-added", G_CALLBACK (on_extension_added), engine); g_signal_connect (engine->peas_exten_set, "extension-removed", G_CALLBACK (on_extension_removed), engine); return engine; } ������������������������������������������������������������������������������pragha-1.3.4/src/pragha-plugins-engine.h������������������������������������������������������������0000664�0000000�0000000�00000005244�13435240150�0020107�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013-2015 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_PLUGINS_ENGINE_H #define PRAGHA_PLUGINS_ENGINE_H #include <glib.h> #include <glib-object.h> G_BEGIN_DECLS #define PRAGHA_TYPE_PLUGINS_ENGINE (pragha_plugins_engine_get_type()) #define PRAGHA_PLUGINS_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngine)) #define PRAGHA_PLUGINS_ENGINE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngine const)) #define PRAGHA_PLUGINS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngineClass)) #define PRAGHA_IS_PLUGINS_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_PLUGINS_ENGINE)) #define PRAGHA_IS_PLUGINS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_PLUGINS_ENGINE)) #define PRAGHA_PLUGINS_ENGINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngineClass)) typedef struct _PraghaPluginsEngine PraghaPluginsEngine; typedef struct _PraghaPluginsEngineClass PraghaPluginsEngineClass; struct _PraghaPluginsEngineClass { GObjectClass parent_class; }; gboolean pragha_plugins_is_shutdown (PraghaPluginsEngine *engine); void pragha_plugins_engine_shutdown (PraghaPluginsEngine *engine); void pragha_plugins_engine_startup (PraghaPluginsEngine *engine); PraghaPluginsEngine *pragha_plugins_engine_new (GObject *object); G_END_DECLS #endif /* PRAGHA_PLUGINS_ENGINE_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-preferences-dialog.c��������������������������������������������������������0000664�0000000�0000000�00000132470�13435240150�0020716�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-preferences-dialog.h" #include <glib.h> #include <gdk/gdkkeysyms.h> #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #ifdef HAVE_LIBPEAS #include <libpeas-gtk/peas-gtk.h> #endif #include "pragha-hig.h" #include "pragha-utils.h" #include "pragha-simple-widgets.h" #include "pragha-library-pane.h" #include "pragha-database.h" struct _PreferencesTab { GtkWidget *widget; GtkWidget *vbox; GtkWidget *label; }; typedef struct _PreferencesTab PreferencesTab; struct _PreferencesDialog { PraghaPreferences *preferences; GtkWidget *widget; GtkWidget *notebook; PreferencesTab *audio_tab; PreferencesTab *desktop_tab; PreferencesTab *services_tab; #ifndef G_OS_WIN32 GtkWidget *audio_device_w; GtkWidget *audio_sink_combo_w; GtkWidget *soft_mixer_w; #endif #if GTK_CHECK_VERSION (3, 12, 0) GtkWidget *system_titlebar_w; #endif GtkWidget *small_toolbar_w; GtkWidget *album_art_w; GtkWidget *album_art_size_w; GtkWidget *album_art_pattern_w; GtkWidget *library_view_w; GtkWidget *fuse_folders_w; GtkWidget *sort_by_year_w; GtkWidget *instant_filter_w; GtkWidget *aproximate_search_w; GtkWidget *window_state_combo_w; GtkWidget *restore_playlist_w; GtkWidget *show_icon_tray_w; GtkWidget *close_to_tray_w; GtkWidget *add_recursively_w; }; /* * Utils. */ void pragha_gtk_entry_set_text (GtkEntry *entry, const gchar *text) { gtk_entry_set_text (GTK_ENTRY(entry), string_is_not_empty(text) ? text : ""); } /* * Dinamic Tabs */ static PreferencesTab * pragha_preferences_tab_new (const gchar *label) { PreferencesTab *tab; tab = g_slice_new0(PreferencesTab); tab->label = gtk_label_new(label); tab->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); return tab; } static void pragha_preferences_tab_free (PreferencesTab *tab) { g_slice_free (PreferencesTab, tab); } static void pragha_preferences_tab_append_setting (PreferencesTab *tab, GtkWidget *widget, gboolean expand) { gtk_box_pack_start (GTK_BOX(tab->vbox), widget, expand, expand, 0); gtk_widget_show_all (tab->vbox); } static void pragha_preferences_tab_remove_setting (PreferencesTab *tab, GtkWidget *widget) { GList *list = NULL; gtk_container_remove (GTK_CONTAINER(tab->vbox), widget); list = gtk_container_get_children (GTK_CONTAINER(tab->vbox)); if (g_list_length(list) == 0) gtk_widget_hide (tab->vbox); g_list_free(list); } static void pragha_preferences_notebook_append_tab (GtkWidget *notebook, PreferencesTab *tab) { GList *list = NULL; gtk_notebook_append_page (GTK_NOTEBOOK(notebook), tab->vbox, tab->label); list = gtk_container_get_children (GTK_CONTAINER(tab->vbox)); if (g_list_length(list) == 0) gtk_widget_hide (tab->vbox); else gtk_widget_show_all (tab->vbox); g_list_free (list); } void pragha_preferences_append_audio_setting (PreferencesDialog *dialog, GtkWidget *widget, gboolean expand) { pragha_preferences_tab_append_setting (dialog->audio_tab, widget, expand); } void pragha_preferences_remove_audio_setting (PreferencesDialog *dialog, GtkWidget *widget) { pragha_preferences_tab_remove_setting (dialog->audio_tab, widget); } void pragha_preferences_append_desktop_setting (PreferencesDialog *dialog, GtkWidget *widget, gboolean expand) { pragha_preferences_tab_append_setting (dialog->desktop_tab, widget, expand); } void pragha_preferences_remove_desktop_setting (PreferencesDialog *dialog, GtkWidget *widget) { pragha_preferences_tab_remove_setting (dialog->desktop_tab, widget); } void pragha_preferences_append_services_setting (PreferencesDialog *dialog, GtkWidget *widget, gboolean expand) { pragha_preferences_tab_append_setting (dialog->services_tab, widget, expand); } void pragha_preferences_remove_services_setting (PreferencesDialog *dialog, GtkWidget *widget) { pragha_preferences_tab_remove_setting (dialog->services_tab, widget); } const gchar *album_art_pattern_info = N_("Patterns should be of the form:\ <filename>;<filename>;....\nA maximum of six patterns are allowed.\n\ Wildcards are not accepted as of now ( patches welcome :-) )."); static void album_art_pattern_helper_response (GtkDialog *dialog, gint response, gpointer data) { gtk_widget_destroy(GTK_WIDGET(dialog)); } static void album_art_pattern_helper (GtkDialog *parent, PreferencesDialog *dialogs) { GtkWidget *dialog; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", album_art_pattern_info); gtk_window_set_title(GTK_WINDOW(dialog), _("Album art pattern")); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(album_art_pattern_helper_response), dialogs); gtk_widget_show_all (dialog); } static GSList * pragha_preferences_dialog_get_library_list (PreferencesDialog *dialog) { GtkTreeModel *model; GtkTreeIter iter; GSList *library_list = NULL; gchar *u_folder = NULL, *folder = NULL; GError *error = NULL; gboolean ret; model = gtk_tree_view_get_model(GTK_TREE_VIEW(dialog->library_view_w)); ret = gtk_tree_model_get_iter_first(model, &iter); while (ret) { gtk_tree_model_get (model, &iter, 0, &u_folder, -1); if (u_folder) { folder = g_filename_from_utf8 (u_folder, -1, NULL, NULL, &error); if (!folder) { g_warning ("Unable to get filename from UTF-8 string: %s", u_folder); g_error_free(error); } else { library_list = g_slist_append(library_list, folder); } g_free (u_folder); } ret = gtk_tree_model_iter_next(model, &iter); } return library_list; } static void pragha_preferences_dialog_set_library_list (PreferencesDialog *dialog, GSList *library_list) { GtkTreeModel *model; GtkTreeIter iter; GError *error = NULL; gint cnt = 0, i = 0; GSList *list; model = gtk_tree_view_get_model(GTK_TREE_VIEW(dialog->library_view_w)); gtk_list_store_clear (GTK_LIST_STORE(model)); cnt = g_slist_length(library_list); list = library_list; for (i = 0; i < cnt; i++) { /* Convert to UTF-8 before adding to the model */ gchar *u_file = g_filename_to_utf8 (list->data, -1, NULL, NULL, &error); if (!u_file) { g_warning("Unable to convert file to UTF-8"); g_error_free(error); error = NULL; list = list->next; continue; } gtk_list_store_append (GTK_LIST_STORE(model), &iter); gtk_list_store_set (GTK_LIST_STORE(model), &iter, 0, u_file, -1); list = list->next; g_free(u_file); } } /* * When cancel the preferences dialog should restore all changes */ static void pragha_preferences_dialog_restore_changes (PreferencesDialog *dialog) { GSList *library_list = NULL; const gchar *start_mode = NULL; /* * Collection settings. */ library_list = pragha_preferences_get_library_list (dialog->preferences); pragha_preferences_dialog_set_library_list(dialog, library_list); free_str_list(library_list); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->fuse_folders_w), pragha_preferences_get_fuse_folders(dialog->preferences)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->sort_by_year_w), pragha_preferences_get_sort_by_year(dialog->preferences)); /* * Audio settings. */ #ifndef G_OS_WIN32 const gchar *audio_sink = pragha_preferences_get_audio_sink(dialog->preferences); if (string_is_not_empty(audio_sink)) { if (!g_ascii_strcasecmp(audio_sink, ALSA_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 1); else if (!g_ascii_strcasecmp(audio_sink, OSS4_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 2); else if (!g_ascii_strcasecmp(audio_sink, OSS_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 3); else if (!g_ascii_strcasecmp(audio_sink, PULSE_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 4); else gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 0); } pragha_gtk_entry_set_text(GTK_ENTRY(dialog->audio_device_w), pragha_preferences_get_audio_device(dialog->preferences)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->soft_mixer_w), pragha_preferences_get_software_mixer (dialog->preferences)); #endif /* * Apareanse settings */ #if GTK_CHECK_VERSION (3, 12, 0) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->system_titlebar_w), pragha_preferences_get_system_titlebar(dialog->preferences)); #endif if (pragha_preferences_get_toolbar_size(dialog->preferences) == GTK_ICON_SIZE_SMALL_TOOLBAR) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->small_toolbar_w), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->small_toolbar_w), FALSE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->album_art_w), pragha_preferences_get_show_album_art(dialog->preferences)); gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->album_art_size_w), pragha_preferences_get_album_art_size(dialog->preferences)); pragha_gtk_entry_set_text(GTK_ENTRY(dialog->album_art_pattern_w), pragha_preferences_get_album_art_pattern (dialog->preferences)); /* * General settings */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->instant_filter_w), pragha_preferences_get_instant_search(dialog->preferences)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->aproximate_search_w), pragha_preferences_get_approximate_search(dialog->preferences)); if (pragha_preferences_get_remember_state(dialog->preferences)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 0); else { start_mode = pragha_preferences_get_start_mode(dialog->preferences); if(string_is_not_empty(start_mode)) { if (!g_ascii_strcasecmp(start_mode, NORMAL_STATE)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 1); else if(!g_ascii_strcasecmp(start_mode, FULLSCREEN_STATE)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 2); else if(!g_ascii_strcasecmp(start_mode, ICONIFIED_STATE)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 3); } } gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->restore_playlist_w), pragha_preferences_get_restore_playlist(dialog->preferences)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->add_recursively_w), pragha_preferences_get_add_recursively(dialog->preferences)); /* * Desktop settings */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->show_icon_tray_w), pragha_preferences_get_show_status_icon(dialog->preferences)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->close_to_tray_w), pragha_preferences_get_hide_instead_close(dialog->preferences)); } /* * When accepting the preferences dialog must be set changes. */ static void pragha_preferences_dialog_accept_changes (PreferencesDialog *dialog) { PraghaDatabase *database; GSList *list, *library_dir = NULL, *folder_scanned = NULL; gchar *window_state_sink = NULL; const gchar *album_art_pattern; gboolean show_album_art, instant_search, approximate_search, restore_playlist, add_recursively; gboolean test_change, pref_setted, pref_toggled, library_locked; #if GTK_CHECK_VERSION (3, 12, 0) gboolean system_titlebar; #endif gboolean small_toolbar; gint album_art_size; PraghaLibraryStyle style; /* * Audio preferences */ #ifndef G_OS_WIN32 gboolean need_restart = FALSE; const gchar *audio_device; gchar *audio_sink = NULL; gboolean software_mixer; audio_sink = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(dialog->audio_sink_combo_w)); if(audio_sink) { if (g_ascii_strcasecmp(audio_sink, pragha_preferences_get_audio_sink(dialog->preferences))) { pragha_preferences_set_audio_sink(dialog->preferences, audio_sink); need_restart = TRUE; } g_free(audio_sink); } audio_device = gtk_entry_get_text(GTK_ENTRY(dialog->audio_device_w)); if (audio_device) { if (g_ascii_strcasecmp(audio_device, pragha_preferences_get_audio_device(dialog->preferences))) { pragha_preferences_set_audio_device(dialog->preferences, audio_device); need_restart = TRUE; } } software_mixer = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->soft_mixer_w)); if (software_mixer != pragha_preferences_get_software_mixer(dialog->preferences)) { pragha_preferences_set_software_mixer(dialog->preferences, software_mixer); need_restart = TRUE; } if (need_restart) pragha_preferences_need_restart (dialog->preferences); #endif /* *Get scanded folders and compare. If changed show infobar */ library_dir = pragha_preferences_dialog_get_library_list (dialog); folder_scanned = pragha_preferences_get_filename_list (dialog->preferences, GROUP_LIBRARY, KEY_LIBRARY_SCANNED); library_locked = pragha_preferences_get_lock_library (dialog->preferences); if ((folder_scanned || library_dir) && (library_locked == FALSE)) { test_change = FALSE; for (list = folder_scanned; list != NULL; list = list->next) { if (is_present_str_list(list->data, library_dir)) continue; test_change = TRUE; break; } for (list = library_dir; list != NULL; list = list->next) { if (is_present_str_list(list->data, folder_scanned)) continue; test_change = TRUE; break; } if (test_change) { pragha_preferences_set_library_list (dialog->preferences, library_dir); } } if (library_dir) free_str_list(library_dir); if (folder_scanned) free_str_list(folder_scanned); /* * Library view changes */ style = pragha_preferences_get_library_style (dialog->preferences); /* Save fuse folders preference, and reload view if needed */ pref_setted = pragha_preferences_get_fuse_folders (dialog->preferences); pref_toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->fuse_folders_w)); pragha_preferences_set_fuse_folders (dialog->preferences, pref_toggled); if ((style == FOLDERS) && (pref_setted != pref_toggled)) { database = pragha_database_get (); pragha_database_change_tracks_done (database); g_object_unref (database); } /* Save sort by year preference, and reload view if needed */ pref_setted = pragha_preferences_get_sort_by_year (dialog->preferences); pref_toggled = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(dialog->sort_by_year_w)); pragha_preferences_set_sort_by_year (dialog->preferences, pref_toggled); if ((style != FOLDERS) && (pref_setted != pref_toggled)) { database = pragha_database_get (); pragha_database_change_tracks_done (database); g_object_unref (database); } /* * General preferences */ window_state_sink = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(dialog->window_state_combo_w)); if (!g_ascii_strcasecmp(window_state_sink, _("Start normal"))) { pragha_preferences_set_remember_state(dialog->preferences, FALSE); pragha_preferences_set_start_mode(dialog->preferences, NORMAL_STATE); } else if (!g_ascii_strcasecmp(window_state_sink, _("Start fullscreen"))){ pragha_preferences_set_remember_state(dialog->preferences, FALSE); pragha_preferences_set_start_mode(dialog->preferences, FULLSCREEN_STATE); } else if (!g_ascii_strcasecmp(window_state_sink, _("Start in system tray"))){ pragha_preferences_set_remember_state(dialog->preferences, FALSE); pragha_preferences_set_start_mode(dialog->preferences, ICONIFIED_STATE); } else pragha_preferences_set_remember_state(dialog->preferences, TRUE); g_free(window_state_sink); instant_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->instant_filter_w)); pragha_preferences_set_instant_search(dialog->preferences, instant_search); approximate_search = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->aproximate_search_w)); pragha_preferences_set_approximate_search(dialog->preferences, approximate_search); restore_playlist = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->restore_playlist_w)); pragha_preferences_set_restore_playlist(dialog->preferences, restore_playlist); pragha_preferences_set_show_status_icon(dialog->preferences, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->show_icon_tray_w))); pragha_preferences_set_hide_instead_close(dialog->preferences, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->close_to_tray_w))); add_recursively = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->add_recursively_w)); pragha_preferences_set_add_recursively(dialog->preferences, add_recursively); show_album_art = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->album_art_w)); pragha_preferences_set_show_album_art(dialog->preferences, show_album_art); album_art_size = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(dialog->album_art_size_w)); pragha_preferences_set_album_art_size(dialog->preferences, album_art_size); if (show_album_art) { album_art_pattern = gtk_entry_get_text(GTK_ENTRY(dialog->album_art_pattern_w)); if (string_is_not_empty(album_art_pattern)) { if (!validate_album_art_pattern(album_art_pattern)) { album_art_pattern_helper(GTK_DIALOG(dialog->widget), dialog); return; } /* Proper pattern, store in preferences */ pragha_preferences_set_album_art_pattern (dialog->preferences, album_art_pattern); } } #if GTK_CHECK_VERSION (3, 12, 0) system_titlebar = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->system_titlebar_w)); if (system_titlebar != pragha_preferences_get_system_titlebar(dialog->preferences)) { pragha_preferences_set_system_titlebar (dialog->preferences, system_titlebar); pragha_preferences_set_show_menubar (dialog->preferences, system_titlebar); } #endif small_toolbar = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->small_toolbar_w)); if (small_toolbar) pragha_preferences_set_toolbar_size (dialog->preferences, GTK_ICON_SIZE_SMALL_TOOLBAR); else pragha_preferences_set_toolbar_size (dialog->preferences, GTK_ICON_SIZE_LARGE_TOOLBAR); } /* Handler for the preferences dialog */ static void pragha_preferences_dialog_response(GtkDialog *dialog_w, gint response_id, PreferencesDialog *dialog) { switch(response_id) { case GTK_RESPONSE_OK: pragha_preferences_dialog_accept_changes (dialog); break; case GTK_RESPONSE_CANCEL: default: pragha_preferences_dialog_restore_changes (dialog); break; } gtk_widget_hide(GTK_WIDGET(dialog->widget)); } static gboolean pragha_preferences_dialog_delete (GtkWidget *widget, GdkEvent *event, PreferencesDialog *dialog) { return TRUE; } /* Handler for adding a new library */ static void library_add_cb_response (GtkDialog *add_dialog, gint response, PreferencesDialog *dialog) { gchar *u_folder, *folder; GtkTreeIter iter; GtkTreeModel *model; GError *error = NULL; switch (response) { case GTK_RESPONSE_ACCEPT: model = gtk_tree_view_get_model(GTK_TREE_VIEW(dialog->library_view_w)); folder = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(add_dialog)); if (!folder) break; u_folder = g_filename_to_utf8(folder, -1, NULL, NULL, &error); if (!u_folder) { g_warning("Unable to get UTF-8 from " "filename: %s", folder); g_error_free(error); g_free(folder); break; } gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, u_folder, -1); g_free(u_folder); g_free(folder); break; default: break; } gtk_widget_destroy(GTK_WIDGET(add_dialog)); } static void library_add_cb (GtkButton *button, PreferencesDialog *dialog) { GtkWidget *add_dialog; /* Create a folder chooser dialog */ add_dialog = gtk_file_chooser_dialog_new (_("Select a folder to add to library"), GTK_WINDOW(dialog->widget), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Open"), GTK_RESPONSE_ACCEPT, NULL); gtk_window_set_modal(GTK_WINDOW(add_dialog), TRUE); g_signal_connect (G_OBJECT(add_dialog), "response", G_CALLBACK(library_add_cb_response), dialog); gtk_widget_show_all (add_dialog); } /* Handler for removing a library */ static void library_remove_cb(GtkButton *button, PreferencesDialog *dialog) { GtkTreeSelection *selection; GtkTreeModel *model; GtkTreeIter iter; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(dialog->library_view_w)); if (gtk_tree_selection_get_selected(selection, &model, &iter)) gtk_list_store_remove(GTK_LIST_STORE(model), &iter); } /* Toggle album art pattern */ static void toggle_album_art(GtkToggleButton *button, PreferencesDialog *dialog) { gboolean is_active; is_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->album_art_w)); gtk_widget_set_sensitive(dialog->album_art_pattern_w, is_active); gtk_widget_set_sensitive(dialog->album_art_size_w, is_active); } /* Some audios toggles handlers */ #ifndef G_OS_WIN32 static void update_audio_device_alsa(PreferencesDialog *dialog) { gtk_widget_set_sensitive(dialog->audio_device_w, TRUE); gtk_widget_set_sensitive(dialog->soft_mixer_w, TRUE); } static void update_audio_device_oss4(PreferencesDialog *dialog) { gtk_widget_set_sensitive(dialog->audio_device_w, TRUE); gtk_widget_set_sensitive(dialog->soft_mixer_w, TRUE); } static void update_audio_device_oss(PreferencesDialog *dialog) { gtk_widget_set_sensitive(dialog->audio_device_w, TRUE); gtk_widget_set_sensitive(dialog->soft_mixer_w, TRUE); } static void update_audio_device_pulse(PreferencesDialog *dialog) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->soft_mixer_w), FALSE); gtk_widget_set_sensitive(dialog->audio_device_w, FALSE); gtk_widget_set_sensitive(dialog->soft_mixer_w, FALSE); } static void update_audio_device_default(PreferencesDialog *dialog) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->soft_mixer_w), FALSE); gtk_widget_set_sensitive(dialog->audio_device_w, FALSE); gtk_widget_set_sensitive(dialog->soft_mixer_w, FALSE); } /* The enumerated audio devices have to be changed here */ static void change_audio_sink(GtkComboBox *combo, PreferencesDialog *dialog) { gchar *audio_sink; audio_sink = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(dialog->audio_sink_combo_w)); if (!g_ascii_strcasecmp(audio_sink, ALSA_SINK)) update_audio_device_alsa(dialog); else if (!g_ascii_strcasecmp(audio_sink, OSS4_SINK)) update_audio_device_oss4(dialog); else if (!g_ascii_strcasecmp(audio_sink, OSS_SINK)) update_audio_device_oss(dialog); else if (!g_ascii_strcasecmp(audio_sink, PULSE_SINK)) update_audio_device_pulse(dialog); else update_audio_device_default(dialog); g_free(audio_sink); } #endif static void pragha_preferences_dialog_init_settings(PreferencesDialog *dialog) { GSList *library_dir = NULL; const gchar *start_mode = pragha_preferences_get_start_mode(dialog->preferences); /* Audio Options */ #ifndef G_OS_WIN32 const gchar *audio_sink = pragha_preferences_get_audio_sink(dialog->preferences); if (string_is_not_empty(audio_sink)) { if (!g_ascii_strcasecmp(audio_sink, ALSA_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 1); else if (!g_ascii_strcasecmp(audio_sink, OSS4_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 2); else if (!g_ascii_strcasecmp(audio_sink, OSS_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 3); else if (!g_ascii_strcasecmp(audio_sink, PULSE_SINK)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 4); else gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->audio_sink_combo_w), 0); } if (string_is_not_empty(audio_sink)) { if (!g_ascii_strcasecmp(audio_sink, ALSA_SINK)) update_audio_device_alsa(dialog); else if (!g_ascii_strcasecmp(audio_sink, OSS4_SINK)) update_audio_device_oss4(dialog); else if (!g_ascii_strcasecmp(audio_sink, OSS_SINK)) update_audio_device_oss(dialog); else if (!g_ascii_strcasecmp(audio_sink, PULSE_SINK)) update_audio_device_pulse(dialog); else update_audio_device_default(dialog); } pragha_gtk_entry_set_text(GTK_ENTRY(dialog->audio_device_w), pragha_preferences_get_audio_device(dialog->preferences)); if (pragha_preferences_get_software_mixer(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->soft_mixer_w), TRUE); #endif /* General Options */ if(pragha_preferences_get_remember_state(dialog->preferences)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 0); else { if(string_is_not_empty(start_mode)) { if (!g_ascii_strcasecmp(start_mode, NORMAL_STATE)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 1); else if(!g_ascii_strcasecmp(start_mode, FULLSCREEN_STATE)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 2); else if(!g_ascii_strcasecmp(start_mode, ICONIFIED_STATE)) gtk_combo_box_set_active(GTK_COMBO_BOX(dialog->window_state_combo_w), 3); } } if (pragha_preferences_get_instant_search(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->instant_filter_w), TRUE); if (pragha_preferences_get_approximate_search(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->aproximate_search_w), TRUE); if (pragha_preferences_get_restore_playlist(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->restore_playlist_w), TRUE); if (pragha_preferences_get_show_status_icon(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->show_icon_tray_w), TRUE); if (pragha_preferences_get_hide_instead_close(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->close_to_tray_w), TRUE); if (pragha_preferences_get_add_recursively(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->add_recursively_w), TRUE); if (pragha_preferences_get_show_album_art(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->album_art_w), TRUE); gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->album_art_size_w), pragha_preferences_get_album_art_size(dialog->preferences)); pragha_gtk_entry_set_text(GTK_ENTRY(dialog->album_art_pattern_w), pragha_preferences_get_album_art_pattern(dialog->preferences)); /* Lbrary Options */ library_dir = pragha_preferences_get_library_list (dialog->preferences); if (library_dir) { pragha_preferences_dialog_set_library_list(dialog, library_dir); free_str_list(library_dir); } if (pragha_preferences_get_fuse_folders(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->fuse_folders_w), TRUE); if (pragha_preferences_get_sort_by_year(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->sort_by_year_w), TRUE); } gint library_view_key_press (GtkWidget *win, GdkEventKey *event, PreferencesDialog *dialog) { if (event->state != 0 && ((event->state & GDK_CONTROL_MASK) || (event->state & GDK_MOD1_MASK) || (event->state & GDK_MOD3_MASK) || (event->state & GDK_MOD4_MASK) || (event->state & GDK_MOD5_MASK))) { return FALSE; } if (event->keyval == GDK_KEY_Delete) { library_remove_cb(NULL, dialog); return TRUE; } return FALSE; } #ifndef G_OS_WIN32 static GtkWidget* pref_create_audio_page (PreferencesDialog *dialog) { GtkWidget *table; GtkWidget *audio_device_entry, *audio_device_label, *audio_sink_combo, *sink_label, *soft_mixer; guint row = 0; table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("Audio")); sink_label = gtk_label_new(_("Audio sink")); audio_sink_combo = gtk_combo_box_text_new(); gtk_widget_set_tooltip_text(GTK_WIDGET(audio_sink_combo), _("Restart Required")); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(audio_sink_combo), DEFAULT_SINK); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(audio_sink_combo), ALSA_SINK); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(audio_sink_combo), OSS4_SINK); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(audio_sink_combo), OSS_SINK); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(audio_sink_combo), PULSE_SINK); pragha_hig_workarea_table_add_row (table, &row, sink_label, audio_sink_combo); audio_device_label = gtk_label_new(_("Audio Device")); gtk_misc_set_alignment(GTK_MISC (audio_device_label), 0, 0); audio_device_entry = gtk_entry_new(); gtk_widget_set_tooltip_text(GTK_WIDGET(audio_device_entry), _("Restart Required")); gtk_entry_set_activates_default (GTK_ENTRY(audio_device_entry), TRUE); pragha_hig_workarea_table_add_row (table, &row, audio_device_label, audio_device_entry); soft_mixer = gtk_check_button_new_with_label(_("Use software mixer")); gtk_widget_set_tooltip_text(GTK_WIDGET(soft_mixer), _("Restart Required")); pragha_hig_workarea_table_add_wide_control(table, &row, soft_mixer); /* Store references */ dialog->audio_sink_combo_w = audio_sink_combo; dialog->audio_device_w = audio_device_entry; dialog->soft_mixer_w = soft_mixer; /* Setup signal handlers */ g_signal_connect (G_OBJECT(audio_sink_combo), "changed", G_CALLBACK(change_audio_sink), dialog); return table; } #endif static GtkWidget* pref_create_library_page (PreferencesDialog *dialog) { GtkWidget *table; GtkWidget *library_view, *library_view_scroll, *library_bbox_align, *library_bbox, *library_add, \ *library_remove, *hbox_library, *fuse_folders, *sort_by_year, *infobar, *label; GtkListStore *library_store; GtkCellRenderer *renderer; GtkTreeViewColumn *column; guint row = 0; table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("Library")); infobar = gtk_info_bar_new (); gtk_info_bar_set_message_type (GTK_INFO_BAR (infobar), GTK_MESSAGE_INFO); label = gtk_label_new (_("Can not change directories while they are analyzing.")); gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (infobar))), label, FALSE, FALSE, 0); pragha_hig_workarea_table_add_wide_control(table, &row, infobar); hbox_library = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); library_store = gtk_list_store_new(1, G_TYPE_STRING); library_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(library_store)); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes (_("Folders"), renderer, "text", 0, NULL); gtk_tree_view_column_set_resizable(column, GTK_TREE_VIEW_COLUMN_GROW_ONLY); gtk_tree_view_append_column(GTK_TREE_VIEW(library_view), column); library_view_scroll = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW(library_view_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW(library_view_scroll), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(library_view_scroll), library_view); library_bbox_align = gtk_alignment_new(0, 0, 0, 0); library_bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL); library_add = gtk_button_new_with_mnemonic (_("_Add")); library_remove = gtk_button_new_with_mnemonic (_("_Remove")); gtk_box_pack_start (GTK_BOX(library_bbox), library_add, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(library_bbox), library_remove, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(library_bbox_align), library_bbox); gtk_box_pack_start (GTK_BOX(hbox_library), library_view_scroll, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_library), library_bbox_align, FALSE, FALSE, 0); pragha_hig_workarea_table_add_wide_tall_control(table, &row, hbox_library); fuse_folders = gtk_check_button_new_with_label(_("Merge folders in the folders estructure view")); pragha_hig_workarea_table_add_wide_control(table, &row, fuse_folders); sort_by_year = gtk_check_button_new_with_label(_("Sort albums by release year")); pragha_hig_workarea_table_add_wide_control(table, &row, sort_by_year); /* Store references */ dialog->library_view_w = library_view; dialog->fuse_folders_w = fuse_folders; dialog->sort_by_year_w = sort_by_year; /* Setup signal handlers */ g_signal_connect (G_OBJECT(library_add), "clicked", G_CALLBACK(library_add_cb), dialog); g_signal_connect (G_OBJECT(library_remove), "clicked", G_CALLBACK(library_remove_cb), dialog); g_signal_connect (G_OBJECT (library_view), "key_press_event", G_CALLBACK(library_view_key_press), dialog); g_object_bind_property (dialog->preferences, "lock-library", hbox_library, "sensitive", G_BINDING_INVERT_BOOLEAN); g_object_bind_property (dialog->preferences, "lock-library", infobar, "visible", G_BINDING_SYNC_CREATE | G_BINDING_DEFAULT); return table; } static GtkWidget* pref_create_appearance_page(PreferencesDialog *dialog) { GtkWidget *table; #if GTK_CHECK_VERSION (3, 12, 0) GtkWidget *system_titlebar; #endif GtkWidget *album_art, *small_toolbar; GtkWidget *album_art_pattern_label, *album_art_size, *album_art_size_label, *album_art_pattern; guint row = 0; table = pragha_hig_workarea_table_new(); #if GTK_CHECK_VERSION (3, 12, 0) pragha_hig_workarea_table_add_section_title(table, &row, _("Appearance")); system_titlebar = gtk_check_button_new_with_label(_("Use system title bar and borders")); pragha_hig_workarea_table_add_wide_control(table, &row, system_titlebar); if (!gdk_screen_is_composited (gdk_screen_get_default())) gtk_widget_set_sensitive (system_titlebar, FALSE); #endif small_toolbar = gtk_check_button_new_with_label(_("Use small icons on the toolbars")); pragha_hig_workarea_table_add_wide_control(table, &row, small_toolbar); pragha_hig_workarea_table_add_section_title(table, &row, _("Controls")); album_art = gtk_check_button_new_with_label(_("Show Album art in Panel")); pragha_hig_workarea_table_add_wide_control(table, &row, album_art); album_art_size_label = gtk_label_new(_("Size of Album art")); album_art_size = gtk_spin_button_new_with_range (24, 128, 2); pragha_hig_workarea_table_add_row (table, &row, album_art_size_label, album_art_size); album_art_pattern_label = gtk_label_new(_("Album art file pattern")); album_art_pattern = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(album_art_pattern), ALBUM_ART_PATTERN_LEN); gtk_entry_set_activates_default (GTK_ENTRY(album_art_pattern), TRUE); gtk_widget_set_tooltip_text(album_art_pattern, album_art_pattern_info); pragha_hig_workarea_table_add_row (table, &row, album_art_pattern_label, album_art_pattern); /* Store references */ #if GTK_CHECK_VERSION (3, 12, 0) dialog->system_titlebar_w = system_titlebar; #endif dialog->small_toolbar_w = small_toolbar; dialog->album_art_w = album_art; dialog->album_art_size_w = album_art_size; dialog->album_art_pattern_w = album_art_pattern; /* Setup signal handlers */ #if GTK_CHECK_VERSION (3, 12, 0) if (pragha_preferences_get_system_titlebar(dialog->preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->system_titlebar_w), TRUE); #endif if (pragha_preferences_get_toolbar_size(dialog->preferences) == GTK_ICON_SIZE_SMALL_TOOLBAR) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->small_toolbar_w), TRUE); g_signal_connect(G_OBJECT(album_art), "toggled", G_CALLBACK(toggle_album_art), dialog); return table; } static GtkWidget* pref_create_general_page(PreferencesDialog *dialog) { GtkWidget *table; GtkWidget *instant_filter, *aproximate_search, *window_state_combo, *restore_playlist, *add_recursively; guint row = 0; table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("Search")); instant_filter = gtk_check_button_new_with_label(_("Search while typing")); pragha_hig_workarea_table_add_wide_control(table, &row, instant_filter); aproximate_search = gtk_check_button_new_with_label(_("Search similar words")); pragha_hig_workarea_table_add_wide_control(table, &row, aproximate_search); pragha_hig_workarea_table_add_section_title(table, &row, _("When starting pragha")); window_state_combo = gtk_combo_box_text_new (); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window_state_combo), _("Remember last window state")); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window_state_combo), _("Start normal")); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window_state_combo), _("Start fullscreen")); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window_state_combo), _("Start in system tray")); pragha_hig_workarea_table_add_wide_control(table, &row, window_state_combo); restore_playlist = gtk_check_button_new_with_label(_("Restore last playlist")); pragha_hig_workarea_table_add_wide_control(table, &row, restore_playlist); pragha_hig_workarea_table_add_section_title(table, &row, _("When adding folders")); add_recursively = gtk_check_button_new_with_label(_("Add files recursively")); pragha_hig_workarea_table_add_wide_control(table, &row, add_recursively); /* Store references */ dialog->instant_filter_w = instant_filter; dialog->aproximate_search_w = aproximate_search; dialog->window_state_combo_w = window_state_combo; dialog->restore_playlist_w = restore_playlist; dialog->add_recursively_w = add_recursively; return table; } static GtkWidget* pref_create_desktop_page(PreferencesDialog *dialog) { GtkWidget *table; GtkWidget *show_icon_tray, *close_to_tray; guint row = 0; table = pragha_hig_workarea_table_new(); pragha_hig_workarea_table_add_section_title(table, &row, _("Desktop")); show_icon_tray = gtk_check_button_new_with_label(_("Show Pragha icon in the notification area")); pragha_hig_workarea_table_add_wide_control(table, &row, show_icon_tray); close_to_tray = gtk_check_button_new_with_label(_("Minimize Pragha when closing window")); pragha_hig_workarea_table_add_wide_control(table, &row, close_to_tray); /* Store references. */ dialog->show_icon_tray_w = show_icon_tray; dialog->close_to_tray_w = close_to_tray; return table; } #ifdef HAVE_LIBPEAS static GtkWidget* pref_create_plugins_page (PreferencesDialog *dialog) { GtkWidget *table; GtkWidget *view, *sw; guint row = 0; table = pragha_hig_workarea_table_new (); pragha_hig_workarea_table_add_section_title (table, &row, _("Plugins")); sw = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN); view = peas_gtk_plugin_manager_view_new (peas_engine_get_default ()); gtk_container_add (GTK_CONTAINER (sw), view); pragha_hig_workarea_table_add_wide_tall_control (table, &row, sw); return table; } #endif void pragha_preferences_dialog_connect_handler (PreferencesDialog *dialog, GCallback callback, gpointer user_data) { g_signal_connect (G_OBJECT(dialog->widget), "response", G_CALLBACK(callback), user_data); } void pragha_preferences_dialog_disconnect_handler (PreferencesDialog *dialog, GCallback callback, gpointer user_data) { g_signal_handlers_disconnect_by_func (dialog->widget, callback, user_data); } void pragha_preferences_dialog_show (PreferencesDialog *dialog) { GSList *library_list = NULL; if (string_is_empty (pragha_preferences_get_installed_version (dialog->preferences))) { library_list = pragha_preferences_get_library_list (dialog->preferences); pragha_preferences_dialog_set_library_list (dialog, library_list); free_str_list(library_list); } gtk_notebook_set_current_page (GTK_NOTEBOOK(dialog->notebook), 0); gtk_widget_show (dialog->widget); } void pragha_preferences_dialog_free (PreferencesDialog *dialog) { g_object_unref (dialog->preferences); pragha_preferences_tab_free (dialog->audio_tab); pragha_preferences_tab_free (dialog->desktop_tab); pragha_preferences_tab_free (dialog->services_tab); g_slice_free (PreferencesDialog, dialog); } PreferencesDialog * pragha_preferences_dialog_new (GtkWidget *parent) { PreferencesDialog *dialog; PraghaHeader *header; GtkWidget *pref_notebook; GtkWidget *audio_vbox, *appearance_vbox, *library_vbox, *general_vbox, *desktop_vbox; GtkWidget *label_appearance, *label_library, *label_general; #ifdef HAVE_LIBPEAS GtkWidget *plugins_vbox; GtkWidget *label_plugins; #endif dialog = g_slice_new0(PreferencesDialog); dialog->preferences = pragha_preferences_get(); /* The main preferences dialog */ dialog->widget = gtk_dialog_new_with_buttons (_("Preferences"), GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Ok"), GTK_RESPONSE_OK, NULL); /* Labels */ label_appearance = gtk_label_new(_("Appearance")); label_library = gtk_label_new(_("Library")); label_general = gtk_label_new(_("General")); #ifdef HAVE_LIBPEAS label_plugins = gtk_label_new(_("Plugins")); #endif /* Notebook, pages et al. */ pref_notebook = gtk_notebook_new(); gtk_container_set_border_width (GTK_CONTAINER(pref_notebook), 4); library_vbox = pref_create_library_page(dialog); gtk_notebook_append_page(GTK_NOTEBOOK(pref_notebook), library_vbox, label_library); gtk_widget_show_all (library_vbox); /* Fose hide infobar */ pragha_preferences_set_lock_library (dialog->preferences, FALSE); dialog->audio_tab = pragha_preferences_tab_new (_("Audio")); #ifndef G_OS_WIN32 audio_vbox = pref_create_audio_page(dialog); pragha_preferences_tab_append_setting (dialog->audio_tab, audio_vbox, FALSE); #endif pragha_preferences_notebook_append_tab (pref_notebook, dialog->audio_tab); appearance_vbox = pref_create_appearance_page(dialog); gtk_notebook_append_page(GTK_NOTEBOOK(pref_notebook), appearance_vbox, label_appearance); gtk_widget_show_all (appearance_vbox); general_vbox = pref_create_general_page(dialog); gtk_notebook_append_page(GTK_NOTEBOOK(pref_notebook), general_vbox, label_general); gtk_widget_show_all (general_vbox); dialog->desktop_tab = pragha_preferences_tab_new (_("Desktop")); desktop_vbox = pref_create_desktop_page(dialog); pragha_preferences_tab_append_setting (dialog->desktop_tab, desktop_vbox, FALSE); dialog->services_tab = pragha_preferences_tab_new (_("Services")); pragha_preferences_notebook_append_tab (pref_notebook, dialog->desktop_tab); pragha_preferences_notebook_append_tab (pref_notebook, dialog->services_tab); #ifdef HAVE_LIBPEAS plugins_vbox = pref_create_plugins_page(dialog); gtk_notebook_append_page(GTK_NOTEBOOK(pref_notebook), plugins_vbox, label_plugins); gtk_widget_show_all (plugins_vbox); #endif /* Add to dialog */ header = pragha_header_new (); pragha_header_set_title (header, _("Preferences of Pragha")); pragha_header_set_icon_name (header, "pragha"); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->widget))), GTK_WIDGET(header), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog->widget))), pref_notebook, TRUE, TRUE, 0); gtk_widget_show_all (GTK_WIDGET(header)); gtk_widget_show (pref_notebook); /* Setup signal handlers */ g_signal_connect (G_OBJECT(dialog->widget), "response", G_CALLBACK(pragha_preferences_dialog_response), dialog); g_signal_connect (G_OBJECT(dialog->widget), "delete_event", G_CALLBACK(pragha_preferences_dialog_delete), dialog); pragha_preferences_dialog_init_settings(dialog); toggle_album_art(GTK_TOGGLE_BUTTON(dialog->album_art_w), dialog); gtk_dialog_set_default_response(GTK_DIALOG (dialog->widget), GTK_RESPONSE_OK); dialog->notebook = pref_notebook; return dialog; } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-preferences-dialog.h��������������������������������������������������������0000664�0000000�0000000�00000006334�13435240150�0020722�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_PREFERENCES_DIALOG_H #define PRAGHA_PREFERENCES_DIALOG_H #include <gtk/gtk.h> #define LASTFM_UNAME_LEN 256 #define LASTFM_PASS_LEN 512 #define ALBUM_ART_PATTERN_LEN 1024 #define AUDIO_CD_DEVICE_ENTRY_LEN 32 typedef struct _PreferencesDialog PreferencesDialog; void pragha_gtk_entry_set_text (GtkEntry *entry, const gchar *text); void pragha_preferences_append_audio_setting (PreferencesDialog *dialog, GtkWidget *widget, gboolean expand); void pragha_preferences_remove_audio_setting (PreferencesDialog *dialog, GtkWidget *widget); void pragha_preferences_append_desktop_setting (PreferencesDialog *dialog, GtkWidget *widget, gboolean expand); void pragha_preferences_remove_desktop_setting (PreferencesDialog *dialog, GtkWidget *widget); void pragha_preferences_append_services_setting (PreferencesDialog *dialog, GtkWidget *widget, gboolean expand); void pragha_preferences_remove_services_setting (PreferencesDialog *dialog, GtkWidget *widget); void pragha_preferences_dialog_connect_handler (PreferencesDialog *dialog, GCallback callback, gpointer user_data); void pragha_preferences_dialog_disconnect_handler (PreferencesDialog *pragha, GCallback callback, gpointer user_data); void pragha_preferences_dialog_show (PreferencesDialog *dialog); void pragha_preferences_dialog_free (PreferencesDialog *dialog); PreferencesDialog *pragha_preferences_dialog_new (GtkWidget *parent); #endif /* PRAGHA_PREFERENCES_DIALOG_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-preferences.c���������������������������������������������������������������0000664�0000000�0000000�00000232331�13435240150�0017456�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-preferences.h" #include <stdio.h> /* TODO: Port this to glib!!. */ #include <errno.h> #include <fcntl.h> #include <glib.h> #include <glib/gstdio.h> #include <gtk/gtk.h> #include "pragha-musicobject.h" #include "pragha-utils.h" #include "pragha-library-pane.h" #include "pragha-debug.h" G_DEFINE_TYPE(PraghaPreferences, pragha_preferences, G_TYPE_OBJECT) struct _PraghaPreferencesPrivate { GKeyFile *rc_keyfile; gchar *rc_filepath; /* Useful to pragha. */ gchar *installed_version; /* Search preferences. */ gboolean instant_search; gboolean approximate_search; /* LibraryPane preferences */ gint library_style; gboolean sort_by_year; gboolean fuse_folders; /* Playlist preferences. */ gboolean shuffle; gboolean repeat; gboolean restore_playlist; /* Audio preferences. */ gchar *audio_sink; gchar *audio_device; gboolean software_mixer; gdouble software_volume; /* Window preferences. */ gboolean lateral_panel; gint sidebar_size; gboolean secondary_lateral_panel; gint secondary_sidebar_size; gboolean show_album_art; gint album_art_size; gchar *album_art_pattern; GtkIconSize toolbar_size; gboolean show_status_bar; gboolean show_status_icon; gboolean show_menubar; gboolean system_titlebar; gboolean controls_below; gboolean remember_state; gchar *start_mode; /* Misc preferences. */ gchar *last_folder; gboolean add_recursively; gboolean timer_remaining_mode; gboolean hide_instead_close; /* Properties without backup. */ gboolean lock_library; }; enum { PROP_0, PROP_INSTANT_SEARCH, PROP_APPROXIMATE_SEARCH, PROP_LIBRARY_STYLE, PROP_LIBRARY_SORT_BY_YEAR, PROP_LIBRARY_FUSE_FOLDERS, PROP_SHUFFLE, PROP_REPEAT, PROP_RESTORE_PLAYLIST, PROP_AUDIO_SINK, PROP_AUDIO_DEVICE, PROP_SOFTWARE_MIXER, PROP_SOFTWARE_VOLUME, PROP_LATERAL_PANEL, PROP_SIDEBAR_SIZE, PROP_SECONDARY_LATERAL_PANEL, PROP_SECONDARY_SIDEBAR_SIZE, PROP_SHOW_ALBUM_ART, PROP_ALBUM_ART_SIZE, PROP_ALBUM_ART_PATTERN, PROP_TOOLBAR_SIZE, PROP_SHOW_STATUS_BAR, PROP_SHOW_STATUS_ICON, PROP_SHOW_MENUBAR, PROP_SYSTEM_TITLEBAR, PROP_CONTROLS_BELOW, PROP_REMEMBER_STATE, PROP_START_MODE, PROP_LAST_FOLDER, PROP_ADD_RECURSIVELY, PROP_TIMER_REMAINING_MODE, PROP_HIDE_INSTEAD_CLOSE, PROP_LOCK_LIBRARY, LAST_PROP }; static GParamSpec *gParamSpecs[LAST_PROP]; enum { SIGNAL_PLUGINS_CHANGED, SIGNAL_LIBRARY_CHANGED, SIGNAL_NEED_RESTART, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; gboolean pragha_preferences_get_boolean (PraghaPreferences *preferences, const gchar *group_name, const gchar *key) { g_return_val_if_fail (PRAGHA_IS_PREFERENCES(preferences), FALSE); return g_key_file_get_boolean (preferences->priv->rc_keyfile, group_name, key, NULL); } void pragha_preferences_set_boolean (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gboolean sbool) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_key_file_set_boolean (preferences->priv->rc_keyfile, group_name, key, sbool); } /** * pragha_preferences_get_double_list: * */ gdouble * pragha_preferences_get_double_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return g_key_file_get_double_list(preferences->priv->rc_keyfile, group_name, key, NULL, NULL); } /** * pragha_preferences_set_double_list * */ void pragha_preferences_set_double_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gdouble list[], gsize length) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_key_file_set_double_list(preferences->priv->rc_keyfile, group_name, key, list, length); } /** * pragha_preferences_get_integer_list: * */ gint * pragha_preferences_get_integer_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gsize *length) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return g_key_file_get_integer_list(preferences->priv->rc_keyfile, group_name, key, length, NULL); } /** * pragha_preferences_set_integer_list * */ void pragha_preferences_set_integer_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gint list[], gsize length) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_key_file_set_integer_list(preferences->priv->rc_keyfile, group_name, key, list, length); } /** * pragha_preferences_get_string: * */ gchar * pragha_preferences_get_string (PraghaPreferences *preferences, const gchar *group_name, const gchar *key) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return g_key_file_get_string(preferences->priv->rc_keyfile, group_name, key, NULL); } /** * pragha_preferences_set_string: * */ void pragha_preferences_set_string (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, const gchar *string) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_key_file_set_string(preferences->priv->rc_keyfile, group_name, key, string); } /** * pragha_preferences_get_string_list: * */ gchar ** pragha_preferences_get_string_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gsize *length) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return g_key_file_get_string_list(preferences->priv->rc_keyfile, group_name, key, length, NULL); } /** * pragha_preferences_set_string_list * */ void pragha_preferences_set_string_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, const gchar * const list[], gsize length) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_key_file_set_string_list(preferences->priv->rc_keyfile, group_name, key, list, length); } /** * pragha_preferences_get_filename_list: * */ GSList * pragha_preferences_get_filename_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key) { gchar **clist; GSList *slist = NULL; gchar *filename = NULL; gsize i, length; GError *error = NULL; g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); clist = g_key_file_get_string_list(preferences->priv->rc_keyfile, group_name, key, &length, NULL); if (clist) { for (i = 0 ; i < length ; i++) { filename = g_filename_from_utf8(clist[i], -1, NULL, NULL, &error); if (!filename) { g_warning("Unable to get filename from UTF-8 string: %s", clist[i]); error = NULL; continue; } else { slist = g_slist_append(slist, filename); } } g_strfreev(clist); } return slist; } /** * pragha_preferences_set_filename_list: * */ void pragha_preferences_set_filename_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, GSList *list) { gchar **clist; gchar *filename = NULL; gsize cnt = 0, i; GError *error = NULL; cnt = g_slist_length(list); clist = g_new0(gchar *, cnt); for (i = 0 ; i < cnt ; i++) { filename = g_filename_to_utf8(list->data, -1, NULL, NULL, &error); if (!filename) { g_warning("Unable to convert file to UTF-8: %s", (gchar *)list->data); g_error_free(error); error = NULL; list = list->next; continue; } clist[i] = filename; list = list->next; } g_key_file_set_string_list(preferences->priv->rc_keyfile, group_name, key, (const gchar **)clist, cnt); for(i = 0; i < cnt; i++) { g_free(clist[i]); } g_free(clist); } /** * pragha_preferences_remove_key: * */ void pragha_preferences_remove_key (PraghaPreferences *preferences, const gchar *group_name, const gchar *key) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); if (g_key_file_has_group(preferences->priv->rc_keyfile, group_name) && g_key_file_has_key(preferences->priv->rc_keyfile, group_name, key, NULL)) g_key_file_remove_key(preferences->priv->rc_keyfile, group_name, key, NULL); } /** * pragha_preferences_has_group: * */ gboolean pragha_preferences_has_group (PraghaPreferences *preferences, const gchar *group_name) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return g_key_file_has_group(preferences->priv->rc_keyfile, group_name); } /** * pragha_preferences_remove_group: * */ void pragha_preferences_remove_group (PraghaPreferences *preferences, const gchar *group_name) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_key_file_remove_group (preferences->priv->rc_keyfile, group_name, NULL); } /** * pragha_preferences_get_plugin_group_name: * */ void pragha_preferences_plugin_changed (PraghaPreferences *preferences, const gchar *key) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_signal_emit (preferences, signals[SIGNAL_PLUGINS_CHANGED], 0, key); } /** * pragha_preferences_get_plugin_group_name: * */ gchar * pragha_preferences_get_plugin_group_name (PraghaPreferences *preferences, const gchar *plugin_name) { gchar *group_name = NULL, *name_upper = NULL; name_upper = g_ascii_strup (plugin_name, -1); group_name = g_strdup_printf("PLUGIN_%s", name_upper); g_free (name_upper); return group_name; } /** * pragha_preferences_get_installed_version: * */ void pragha_preferences_need_restart (PraghaPreferences *preferences) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_signal_emit (preferences, signals[SIGNAL_NEED_RESTART], 0); } /** * pragha_preferences_get_library_list: * */ GSList * pragha_preferences_get_library_list (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return pragha_preferences_get_filename_list (preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR); } /** * pragha_preferences_set_library_list: * */ void pragha_preferences_set_library_list (PraghaPreferences *preferences, GSList *list) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); if (list != NULL) { pragha_preferences_set_filename_list (preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR, list); } else { pragha_preferences_remove_key (preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR); } g_signal_emit (preferences, signals[SIGNAL_LIBRARY_CHANGED], 0); } /** * pragha_preferences_get_installed_version: * */ const gchar * pragha_preferences_get_installed_version (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return preferences->priv->installed_version; } /** * pragha_preferences_set_installed_version: * */ static void pragha_preferences_set_installed_version (PraghaPreferences *preferences, const gchar *installed_version) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_free(preferences->priv->installed_version); preferences->priv->installed_version = g_strdup(installed_version); } /** * pragha_preferences_get_instant_search: * */ gboolean pragha_preferences_get_instant_search (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->instant_search; } /** * pragha_preferences_set_instant_search: * */ void pragha_preferences_set_instant_search (PraghaPreferences *preferences, gboolean instant_search) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->instant_search = instant_search; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_INSTANT_SEARCH]); } /** * pragha_preferences_get_approximate_search: * */ gboolean pragha_preferences_get_approximate_search (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->approximate_search; } /** * pragha_preferences_set_approximate_search: * */ void pragha_preferences_set_approximate_search (PraghaPreferences *preferences, gboolean approximate_search) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->approximate_search = approximate_search; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_APPROXIMATE_SEARCH]); } /** * pragha_preferences_get_library_style: * */ gint pragha_preferences_get_library_style (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), 0); return preferences->priv->library_style; } /** * pragha_preferences_set_library_style: * */ void pragha_preferences_set_library_style (PraghaPreferences *preferences, gint library_style) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->library_style = library_style; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_LIBRARY_STYLE]); } /** * pragha_preferences_get_sort_by_year: * */ gboolean pragha_preferences_get_sort_by_year (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->sort_by_year; } /** * pragha_preferences_sort_by_year: * */ void pragha_preferences_set_sort_by_year (PraghaPreferences *preferences, gboolean sort_by_year) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->sort_by_year = sort_by_year; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_LIBRARY_SORT_BY_YEAR]); } /** * pragha_preferences_get_fuse_folders: * */ gboolean pragha_preferences_get_fuse_folders (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->fuse_folders; } /** * pragha_preferences_fuse_folders: * */ void pragha_preferences_set_fuse_folders (PraghaPreferences *preferences, gboolean fuse_folders) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->fuse_folders = fuse_folders; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_LIBRARY_FUSE_FOLDERS]); } /** * pragha_preferences_get_shuffle: * */ gboolean pragha_preferences_get_shuffle (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->shuffle; } /** * pragha_preferences_set_shuffle: * */ void pragha_preferences_set_shuffle (PraghaPreferences *preferences, gboolean shuffle) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->shuffle = shuffle; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SHUFFLE]); } /** * pragha_preferences_get_repeat: * */ gboolean pragha_preferences_get_repeat (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->repeat; } /** * pragha_preferences_set_repeat: * */ void pragha_preferences_set_repeat (PraghaPreferences *preferences, gboolean repeat) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->repeat = repeat; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_REPEAT]); } /** * pragha_preferences_get_restore_playlist: * */ gboolean pragha_preferences_get_restore_playlist (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->restore_playlist; } /** * pragha_preferences_set_restore_playlist: * */ void pragha_preferences_set_restore_playlist (PraghaPreferences *preferences, gboolean restore_playlist) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->restore_playlist = restore_playlist; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_RESTORE_PLAYLIST]); } /** * pragha_preferences_get_audio_sink: * */ const gchar * pragha_preferences_get_audio_sink (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return preferences->priv->audio_sink; } /** * pragha_preferences_set_audio_sink: * */ void pragha_preferences_set_audio_sink (PraghaPreferences *preferences, const gchar *audio_sink) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_free(preferences->priv->audio_sink); preferences->priv->audio_sink = g_strdup(audio_sink); g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_AUDIO_SINK]); } /** * pragha_preferences_get_audio_device: * */ const gchar * pragha_preferences_get_audio_device (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return preferences->priv->audio_device; } /** * pragha_preferences_set_audio_device: * */ void pragha_preferences_set_audio_device (PraghaPreferences *preferences, const gchar *audio_device) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_free(preferences->priv->audio_device); preferences->priv->audio_device = g_strdup(audio_device); g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_AUDIO_DEVICE]); } /** * pragha_preferences_get_software_mixer: * */ gboolean pragha_preferences_get_software_mixer (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->software_mixer; } /** * pragha_preferences_set_software_mixer: * */ void pragha_preferences_set_software_mixer (PraghaPreferences *preferences, gboolean software_mixer) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->software_mixer = software_mixer; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SOFTWARE_MIXER]); } /** * pragha_preferences_get_software_volume: * */ gdouble pragha_preferences_get_software_volume (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), -1.0); return preferences->priv->software_volume; } /** * pragha_preferences_set_software_volume: * */ void pragha_preferences_set_software_volume (PraghaPreferences *preferences, gdouble software_volume) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->software_volume = software_volume; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SOFTWARE_VOLUME]); } /** * pragha_preferences_get_lateral_panel: * */ gboolean pragha_preferences_get_lateral_panel (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->lateral_panel; } /** * pragha_preferences_set_lateral_panel: * */ void pragha_preferences_set_lateral_panel (PraghaPreferences *preferences, gboolean lateral_panel) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->lateral_panel = lateral_panel; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_LATERAL_PANEL]); } /** * pragha_preferences_get_sidebar_size: * */ gint pragha_preferences_get_sidebar_size (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), DEFAULT_SIDEBAR_SIZE); return preferences->priv->sidebar_size; } /** * pragha_preferences_set_sidebar_size: * */ void pragha_preferences_set_sidebar_size (PraghaPreferences *preferences, gint sidebar_size) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->sidebar_size = sidebar_size; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SIDEBAR_SIZE]); } /** * pragha_preferences_get_secondary_lateral_panel: * */ gboolean pragha_preferences_get_secondary_lateral_panel (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->secondary_lateral_panel; } /** * pragha_preferences_set_secondary_lateral_panel: * */ void pragha_preferences_set_secondary_lateral_panel (PraghaPreferences *preferences, gboolean secondary_lateral_panel) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->secondary_lateral_panel = secondary_lateral_panel; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SECONDARY_LATERAL_PANEL]); } /** * pragha_preferences_get_secondary_sidebar_size: * */ gint pragha_preferences_get_secondary_sidebar_size (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), DEFAULT_SIDEBAR_SIZE); return preferences->priv->secondary_sidebar_size; } /** * pragha_preferences_set_secondary_sidebar_size: * */ void pragha_preferences_set_secondary_sidebar_size (PraghaPreferences *preferences, gint secondary_sidebar_size) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->secondary_sidebar_size = secondary_sidebar_size; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SECONDARY_SIDEBAR_SIZE]); } /** * pragha_preferences_get_show_album_art: * */ gboolean pragha_preferences_get_show_album_art (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->show_album_art; } /** * pragha_preferences_set_show_album_art: * */ void pragha_preferences_set_show_album_art (PraghaPreferences *preferences, gboolean show_album_art) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->show_album_art = show_album_art; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SHOW_ALBUM_ART]); } /** * pragha_preferences_get_album_art_size: * */ gint pragha_preferences_get_album_art_size (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), DEFAULT_ALBUM_ART_SIZE); return preferences->priv->album_art_size; } /** * pragha_preferences_set_album_art_size: * */ void pragha_preferences_set_album_art_size (PraghaPreferences *preferences, gint album_art_size) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->album_art_size = album_art_size; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_ALBUM_ART_SIZE]); } /** * pragha_preferences_get_album_art_pattern: * */ const gchar * pragha_preferences_get_album_art_pattern (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return preferences->priv->album_art_pattern; } /** * pragha_preferences_setalbum_art_pattern: * */ void pragha_preferences_set_album_art_pattern (PraghaPreferences *preferences, const gchar *album_art_pattern) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_free(preferences->priv->album_art_pattern); preferences->priv->album_art_pattern = g_strdup(album_art_pattern); g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_ALBUM_ART_PATTERN]); } /** * pragha_preferences_get_toolbar_size: * */ GtkIconSize pragha_preferences_get_toolbar_size (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), GTK_ICON_SIZE_LARGE_TOOLBAR); return preferences->priv->toolbar_size; } /** * pragha_preferences_set_toolbar_size: * */ void pragha_preferences_set_toolbar_size (PraghaPreferences *preferences, GtkIconSize toolbar_size) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->toolbar_size = toolbar_size; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_TOOLBAR_SIZE]); } /** * pragha_preferences_get_show_status_bar: * */ gboolean pragha_preferences_get_show_status_bar (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->show_status_bar; } /** * pragha_preferences_set_show_status_bar: * */ void pragha_preferences_set_show_status_bar (PraghaPreferences *preferences, gboolean show_status_bar) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->show_status_bar = show_status_bar; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SHOW_STATUS_BAR]); } /** * pragha_preferences_get_show_status_icon: * */ gboolean pragha_preferences_get_show_status_icon (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->show_status_icon; } /** * pragha_preferences_set_show_status_icon: * */ void pragha_preferences_set_show_status_icon (PraghaPreferences *preferences, gboolean show_status_icon) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->show_status_icon = show_status_icon; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SHOW_STATUS_ICON]); } /** * pragha_preferences_get_show_menubar: * */ gboolean pragha_preferences_get_show_menubar (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->show_menubar; } /** * pragha_preferences_set_show_menubar: * */ void pragha_preferences_set_show_menubar (PraghaPreferences *preferences, gboolean show_menubar) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->show_menubar = show_menubar; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SHOW_MENUBAR]); } /** * pragha_preferences_get_system_titlebar: * */ gboolean pragha_preferences_get_system_titlebar (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->system_titlebar; } /** * pragha_preferences_set_system_titlebar: * */ void pragha_preferences_set_system_titlebar (PraghaPreferences *preferences, gboolean system_titlebar) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->system_titlebar = system_titlebar; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_SYSTEM_TITLEBAR]); } /** * pragha_preferences_get_controls_below: * */ gboolean pragha_preferences_get_controls_below (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->controls_below; } /** * pragha_preferences_set_controls_below: * */ void pragha_preferences_set_controls_below (PraghaPreferences *preferences, gboolean controls_below) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->controls_below = controls_below; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_CONTROLS_BELOW]); } /** * pragha_preferences_get_remember_state: * */ gboolean pragha_preferences_get_remember_state (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->remember_state; } /** * pragha_preferences_set_remember_state: * */ void pragha_preferences_set_remember_state (PraghaPreferences *preferences, gboolean remember_state) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->remember_state = remember_state; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_REMEMBER_STATE]); } /** * pragha_preferences_get_start_mode: * */ const gchar * pragha_preferences_get_start_mode (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return preferences->priv->start_mode; } /** * pragha_preferences_set_start_mode: * */ void pragha_preferences_set_start_mode (PraghaPreferences *preferences, const gchar *start_mode) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_free(preferences->priv->start_mode); preferences->priv->start_mode = g_strdup(start_mode); g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_START_MODE]); } /** * pragha_preferences_get_last_folder: * */ const gchar * pragha_preferences_get_last_folder (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), NULL); return preferences->priv->last_folder; } /** * pragha_preferences_set_last_folder: * */ void pragha_preferences_set_last_folder (PraghaPreferences *preferences, const gchar *last_folder) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); g_free(preferences->priv->last_folder); preferences->priv->last_folder = g_strdup(last_folder); g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_LAST_FOLDER]); } /** * pragha_preferences_get_add_recursively: * */ gboolean pragha_preferences_get_add_recursively (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->add_recursively; } /** * pragha_preferences_set_add_recursively: * */ void pragha_preferences_set_add_recursively(PraghaPreferences *preferences, gboolean add_recursively) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->add_recursively = add_recursively; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_ADD_RECURSIVELY]); } /** * pragha_preferences_get_timer_remaining_mode: * */ gboolean pragha_preferences_get_timer_remaining_mode (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), FALSE); return preferences->priv->timer_remaining_mode; } /** * pragha_preferences_set_timer_remaining_mode: * */ void pragha_preferences_set_timer_remaining_mode(PraghaPreferences *preferences, gboolean timer_remaining_mode) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->timer_remaining_mode = timer_remaining_mode; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_TIMER_REMAINING_MODE]); } /** * pragha_preferences_get_hide_instead_close: * */ gboolean pragha_preferences_get_hide_instead_close (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->hide_instead_close; } /** * pragha_preferences_set_hide_instead_close: * */ void pragha_preferences_set_hide_instead_close (PraghaPreferences *preferences, gboolean hide_instead_close) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->hide_instead_close = hide_instead_close; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_HIDE_INSTEAD_CLOSE]); } /** * pragha_preferences_get_lock_library: * */ gboolean pragha_preferences_get_lock_library (PraghaPreferences *preferences) { g_return_val_if_fail(PRAGHA_IS_PREFERENCES(preferences), TRUE); return preferences->priv->lock_library; } /** * pragha_preferences_set_lock_library: * */ void pragha_preferences_set_lock_library (PraghaPreferences *preferences, gboolean lock_library) { g_return_if_fail(PRAGHA_IS_PREFERENCES(preferences)); preferences->priv->lock_library = lock_library; g_object_notify_by_pspec(G_OBJECT(preferences), gParamSpecs[PROP_LOCK_LIBRARY]); } static void pragha_preferences_load_from_file(PraghaPreferences *preferences) { gchar *installed_version; gboolean approximate_search, instant_search; gboolean shuffle, repeat, restore_playlist, software_mixer; gboolean lateral_panel, secondary_lateral_panel, show_album_art, show_status_bar, \ show_status_icon, show_menubar, system_titlebar, controls_below, remember_state; gchar *album_art_pattern; gchar *start_mode, *last_folder, *last_folder_converted = NULL; gboolean add_recursively, timer_remaining_mode, hide_instead_close; gchar *audio_sink, *audio_device; gdouble software_volume; gint library_style, sidebar_size, secondary_sidebar_size, album_art_size; GtkIconSize toolbar_size; gboolean fuse_folders, sort_by_year; const gchar *user_config_dir; gchar *pragha_config_dir = NULL; GError *error = NULL; PraghaPreferencesPrivate *priv = preferences->priv; /* First check preferences folder or create it */ user_config_dir = g_get_user_config_dir(); pragha_config_dir = g_build_path(G_DIR_SEPARATOR_S, user_config_dir, "/pragha", NULL); if (g_file_test(pragha_config_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) == FALSE) { if (g_mkdir_with_parents (pragha_config_dir, S_IRWXU) == -1) { g_free(pragha_config_dir); g_critical("Unable to create preferences directory, err: %s", g_strerror(errno)); return; } CDEBUG(DBG_INFO, "Created .config/pragha folder"); } g_free(pragha_config_dir); /* Open the preferences storage file */ priv->rc_keyfile = g_key_file_new(); priv->rc_filepath = g_build_path(G_DIR_SEPARATOR_S, user_config_dir, "/pragha/config", NULL); /* Does /pragha/config exist ? */ if (g_file_test(priv->rc_filepath, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR) == FALSE) { CDEBUG(DBG_INFO, "First init of pragha. Use default settings."); return; } /* Open the preferences key file */ if (!g_key_file_load_from_file(priv->rc_keyfile, priv->rc_filepath, G_KEY_FILE_NONE, &error)) { g_critical("Unable to load config file (Possible first start), err: %s", error->message); g_error_free(error); return; } /* Installed version used as flag to detect the first run. */ installed_version = g_key_file_get_string(priv->rc_keyfile, GROUP_GENERAL, KEY_INSTALLED_VERSION, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_installed_version(preferences, installed_version); } /* Open last preferences */ approximate_search = g_key_file_get_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_APPROXIMATE_SEARCH, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_approximate_search(preferences, approximate_search); } instant_search = g_key_file_get_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_INSTANT_SEARCH, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_instant_search(preferences, instant_search); } shuffle = g_key_file_get_boolean(priv->rc_keyfile, GROUP_PLAYLIST, KEY_SHUFFLE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_shuffle(preferences, shuffle); } repeat = g_key_file_get_boolean(priv->rc_keyfile, GROUP_PLAYLIST, KEY_REPEAT, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_repeat(preferences, repeat); } library_style = g_key_file_get_integer(priv->rc_keyfile, GROUP_LIBRARY, KEY_LIBRARY_VIEW_ORDER, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_library_style(preferences, library_style); } sort_by_year = g_key_file_get_boolean(priv->rc_keyfile, GROUP_LIBRARY, KEY_SORT_BY_YEAR, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_sort_by_year(preferences, sort_by_year); } fuse_folders = g_key_file_get_boolean(priv->rc_keyfile, GROUP_LIBRARY, KEY_FUSE_FOLDERS, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_fuse_folders(preferences, fuse_folders); } restore_playlist = g_key_file_get_boolean(priv->rc_keyfile, GROUP_PLAYLIST, KEY_SAVE_PLAYLIST, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_restore_playlist(preferences, restore_playlist); } audio_sink = g_key_file_get_string(priv->rc_keyfile, GROUP_AUDIO, KEY_AUDIO_SINK, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_audio_sink(preferences, audio_sink); } audio_device = g_key_file_get_string(priv->rc_keyfile, GROUP_AUDIO, KEY_AUDIO_DEVICE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_audio_device(preferences, audio_device); } software_mixer = g_key_file_get_boolean(priv->rc_keyfile, GROUP_AUDIO, KEY_SOFTWARE_MIXER, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_software_mixer(preferences, software_mixer); } software_volume = g_key_file_get_double(priv->rc_keyfile, GROUP_AUDIO, KEY_SOFTWARE_VOLUME, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_software_volume(preferences, software_volume); } lateral_panel = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SIDEBAR, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_lateral_panel(preferences, lateral_panel); } sidebar_size = g_key_file_get_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_SIDEBAR_SIZE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_sidebar_size(preferences, sidebar_size); } secondary_lateral_panel = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SECONDARY_SIDEBAR, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_secondary_lateral_panel(preferences, secondary_lateral_panel); } secondary_sidebar_size = g_key_file_get_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_SECONDARY_SIDEBAR_SIZE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_secondary_sidebar_size(preferences, secondary_sidebar_size); } show_album_art = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SHOW_ALBUM_ART, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_show_album_art(preferences, show_album_art); } album_art_size = g_key_file_get_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_ALBUM_ART_SIZE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_album_art_size(preferences, album_art_size); } album_art_pattern = g_key_file_get_string(priv->rc_keyfile, GROUP_GENERAL, KEY_ALBUM_ART_PATTERN, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_album_art_pattern(preferences, album_art_pattern); } toolbar_size = g_key_file_get_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_TOOLBAR_SIZE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_toolbar_size(preferences, toolbar_size); } show_status_bar = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_STATUS_BAR, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_show_status_bar(preferences, show_status_bar); } show_status_icon = g_key_file_get_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_SHOW_ICON_TRAY, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_show_status_icon(preferences, show_status_icon); } show_menubar = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SHOW_MENUBAR, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_show_menubar(preferences, show_menubar); } system_titlebar = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SYSTEM_TITLEBAR, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_system_titlebar(preferences, system_titlebar); } controls_below = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_CONTROLS_BELOW, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_controls_below(preferences, controls_below); } remember_state = g_key_file_get_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_REMEMBER_STATE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_remember_state(preferences, remember_state); } start_mode = g_key_file_get_string(priv->rc_keyfile, GROUP_WINDOW, KEY_START_MODE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_start_mode(preferences, NORMAL_STATE); } last_folder = g_key_file_get_string(priv->rc_keyfile, GROUP_GENERAL, KEY_LAST_FOLDER, &error); if (error) { g_error_free(error); error = NULL; } else { last_folder_converted = g_filename_from_utf8(last_folder, -1, NULL, NULL, &error); if (error) { g_warning("Unable to get filename from UTF-8 string: %s", error->message); g_error_free(error); error = NULL; } else { pragha_preferences_set_last_folder(preferences, last_folder_converted); } } add_recursively = g_key_file_get_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_ADD_RECURSIVELY_FILES, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_add_recursively(preferences, add_recursively); } timer_remaining_mode = g_key_file_get_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_TIMER_REMAINING_MODE, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_timer_remaining_mode(preferences, timer_remaining_mode); } hide_instead_close = g_key_file_get_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_CLOSE_TO_TRAY, &error); if (error) { g_error_free(error); error = NULL; } else { pragha_preferences_set_hide_instead_close(preferences, hide_instead_close); } g_free(installed_version); g_free(audio_sink); g_free(audio_device); g_free(album_art_pattern); g_free(start_mode); g_free(last_folder); g_free(last_folder_converted); } static void pragha_preferences_finalize (GObject *object) { gchar *data = NULL; gsize length; GError *error = NULL; PraghaPreferences *preferences = PRAGHA_PREFERENCES(object); PraghaPreferencesPrivate *priv = preferences->priv; /* Store new preferences */ g_key_file_set_string(priv->rc_keyfile, GROUP_GENERAL, KEY_INSTALLED_VERSION, PACKAGE_VERSION); g_key_file_set_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_INSTANT_SEARCH, priv->instant_search); g_key_file_set_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_APPROXIMATE_SEARCH, priv->approximate_search); g_key_file_set_integer(priv->rc_keyfile, GROUP_LIBRARY, KEY_LIBRARY_VIEW_ORDER, priv->library_style); g_key_file_set_boolean(priv->rc_keyfile, GROUP_LIBRARY, KEY_SORT_BY_YEAR, priv->sort_by_year); g_key_file_set_boolean(priv->rc_keyfile, GROUP_LIBRARY, KEY_FUSE_FOLDERS, priv->fuse_folders); g_key_file_set_boolean(priv->rc_keyfile, GROUP_PLAYLIST, KEY_SHUFFLE, priv->shuffle); g_key_file_set_boolean(priv->rc_keyfile, GROUP_PLAYLIST, KEY_REPEAT, priv->repeat); g_key_file_set_boolean(priv->rc_keyfile, GROUP_PLAYLIST, KEY_SAVE_PLAYLIST, priv->restore_playlist); g_key_file_set_string(priv->rc_keyfile, GROUP_AUDIO, KEY_AUDIO_SINK, priv->audio_sink); g_key_file_set_string(priv->rc_keyfile, GROUP_AUDIO, KEY_AUDIO_DEVICE, priv->audio_device); g_key_file_set_boolean(priv->rc_keyfile, GROUP_AUDIO, KEY_SOFTWARE_MIXER, priv->software_mixer); g_key_file_set_double(priv->rc_keyfile, GROUP_AUDIO, KEY_SOFTWARE_VOLUME, priv->software_volume); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SIDEBAR, priv->lateral_panel); g_key_file_set_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_SIDEBAR_SIZE, priv->sidebar_size); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SECONDARY_SIDEBAR, priv->secondary_lateral_panel); g_key_file_set_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_SECONDARY_SIDEBAR_SIZE, priv->secondary_sidebar_size); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SHOW_ALBUM_ART, priv->show_album_art); g_key_file_set_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_ALBUM_ART_SIZE, priv->album_art_size); if (string_is_not_empty(priv->album_art_pattern)) g_key_file_set_string(priv->rc_keyfile, GROUP_GENERAL, KEY_ALBUM_ART_PATTERN, priv->album_art_pattern); else pragha_preferences_remove_key(preferences, GROUP_GENERAL, KEY_ALBUM_ART_PATTERN); g_key_file_set_integer(priv->rc_keyfile, GROUP_WINDOW, KEY_TOOLBAR_SIZE, priv->toolbar_size); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_STATUS_BAR, priv->show_status_bar); g_key_file_set_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_SHOW_ICON_TRAY, priv->show_status_icon); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SHOW_MENUBAR, priv->show_menubar); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_SYSTEM_TITLEBAR, priv->system_titlebar); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_CONTROLS_BELOW, priv->controls_below); g_key_file_set_boolean(priv->rc_keyfile, GROUP_WINDOW, KEY_REMEMBER_STATE, priv->remember_state); g_key_file_set_string(priv->rc_keyfile, GROUP_WINDOW, KEY_START_MODE, priv->start_mode); gchar *last_folder_converted = g_filename_to_utf8(priv->last_folder, -1, NULL, NULL, &error); if (error) { g_warning("Unable to convert filename to UTF-8: %s", error->message); g_error_free(error); error = NULL; } if (string_is_not_empty(last_folder_converted)) g_key_file_set_string(priv->rc_keyfile, GROUP_GENERAL, KEY_LAST_FOLDER, last_folder_converted); else pragha_preferences_remove_key(preferences, GROUP_GENERAL, KEY_LAST_FOLDER); g_free(last_folder_converted); g_key_file_set_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_ADD_RECURSIVELY_FILES, priv->add_recursively); g_key_file_set_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_TIMER_REMAINING_MODE, priv->timer_remaining_mode); g_key_file_set_boolean(priv->rc_keyfile, GROUP_GENERAL, KEY_CLOSE_TO_TRAY, priv->hide_instead_close); /* Save to key file */ data = g_key_file_to_data(priv->rc_keyfile, &length, NULL); if(!g_file_set_contents(priv->rc_filepath, data, length, &error)) g_critical("Unable to write preferences file : %s", error->message); g_free(data); g_key_file_free(priv->rc_keyfile); g_free(priv->installed_version); g_free(priv->rc_filepath); g_free(priv->audio_sink); g_free(priv->audio_device); g_free(priv->album_art_pattern); g_free(priv->start_mode); g_free(priv->last_folder); G_OBJECT_CLASS(pragha_preferences_parent_class)->finalize(object); } static void pragha_preferences_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { PraghaPreferences *preferences = PRAGHA_PREFERENCES(object); switch (prop_id) { case PROP_INSTANT_SEARCH: g_value_set_boolean (value, pragha_preferences_get_instant_search(preferences)); break; case PROP_APPROXIMATE_SEARCH: g_value_set_boolean (value, pragha_preferences_get_approximate_search(preferences)); break; case PROP_LIBRARY_STYLE: g_value_set_int (value, pragha_preferences_get_library_style(preferences)); break; case PROP_LIBRARY_SORT_BY_YEAR: g_value_set_boolean (value, pragha_preferences_get_sort_by_year(preferences)); break; case PROP_LIBRARY_FUSE_FOLDERS: g_value_set_boolean (value, pragha_preferences_get_fuse_folders(preferences)); break; case PROP_SHUFFLE: g_value_set_boolean (value, pragha_preferences_get_shuffle(preferences)); break; case PROP_REPEAT: g_value_set_boolean (value, pragha_preferences_get_repeat(preferences)); break; case PROP_RESTORE_PLAYLIST: g_value_set_boolean (value, pragha_preferences_get_restore_playlist(preferences)); break; case PROP_AUDIO_SINK: g_value_set_string (value, pragha_preferences_get_audio_sink(preferences)); break; case PROP_AUDIO_DEVICE: g_value_set_string (value, pragha_preferences_get_audio_device(preferences)); break; case PROP_SOFTWARE_MIXER: g_value_set_boolean (value, pragha_preferences_get_software_mixer(preferences)); break; case PROP_SOFTWARE_VOLUME: g_value_set_double (value, pragha_preferences_get_software_volume(preferences)); break; case PROP_LATERAL_PANEL: g_value_set_boolean (value, pragha_preferences_get_lateral_panel(preferences)); break; case PROP_SIDEBAR_SIZE: g_value_set_int (value, pragha_preferences_get_sidebar_size(preferences)); break; case PROP_SECONDARY_LATERAL_PANEL: g_value_set_boolean (value, pragha_preferences_get_secondary_lateral_panel(preferences)); break; case PROP_SECONDARY_SIDEBAR_SIZE: g_value_set_int (value, pragha_preferences_get_secondary_sidebar_size(preferences)); break; case PROP_SHOW_ALBUM_ART: g_value_set_boolean (value, pragha_preferences_get_show_album_art(preferences)); break; case PROP_ALBUM_ART_SIZE: g_value_set_int (value, pragha_preferences_get_album_art_size(preferences)); break; case PROP_ALBUM_ART_PATTERN: g_value_set_string (value, pragha_preferences_get_album_art_pattern(preferences)); break; case PROP_TOOLBAR_SIZE: g_value_set_enum (value, pragha_preferences_get_toolbar_size(preferences)); break; case PROP_SHOW_STATUS_BAR: g_value_set_boolean (value, pragha_preferences_get_show_status_bar(preferences)); break; case PROP_SHOW_STATUS_ICON: g_value_set_boolean (value, pragha_preferences_get_show_status_icon(preferences)); break; case PROP_SHOW_MENUBAR: g_value_set_boolean (value, pragha_preferences_get_show_menubar(preferences)); break; case PROP_SYSTEM_TITLEBAR: g_value_set_boolean (value, pragha_preferences_get_system_titlebar(preferences)); break; case PROP_CONTROLS_BELOW: g_value_set_boolean (value, pragha_preferences_get_controls_below(preferences)); break; case PROP_REMEMBER_STATE: g_value_set_boolean (value, pragha_preferences_get_remember_state(preferences)); break; case PROP_START_MODE: g_value_set_string (value, pragha_preferences_get_start_mode(preferences)); break; case PROP_LAST_FOLDER: g_value_set_string (value, pragha_preferences_get_last_folder(preferences)); break; case PROP_ADD_RECURSIVELY: g_value_set_boolean (value, pragha_preferences_get_add_recursively(preferences)); break; case PROP_TIMER_REMAINING_MODE: g_value_set_boolean (value, pragha_preferences_get_timer_remaining_mode(preferences)); break; case PROP_HIDE_INSTEAD_CLOSE: g_value_set_boolean (value, pragha_preferences_get_hide_instead_close(preferences)); break; case PROP_LOCK_LIBRARY: g_value_set_boolean (value, pragha_preferences_get_lock_library(preferences)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static void pragha_preferences_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PraghaPreferences *preferences = PRAGHA_PREFERENCES(object); switch (prop_id) { case PROP_INSTANT_SEARCH: pragha_preferences_set_instant_search(preferences, g_value_get_boolean(value)); break; case PROP_APPROXIMATE_SEARCH: pragha_preferences_set_approximate_search(preferences, g_value_get_boolean(value)); break; case PROP_LIBRARY_STYLE: pragha_preferences_set_library_style(preferences, g_value_get_int(value)); break; case PROP_LIBRARY_SORT_BY_YEAR: pragha_preferences_set_sort_by_year(preferences, g_value_get_boolean(value)); break; case PROP_LIBRARY_FUSE_FOLDERS: pragha_preferences_set_fuse_folders(preferences, g_value_get_boolean(value)); break; case PROP_SHUFFLE: pragha_preferences_set_shuffle(preferences, g_value_get_boolean(value)); break; case PROP_REPEAT: pragha_preferences_set_repeat(preferences, g_value_get_boolean(value)); break; case PROP_RESTORE_PLAYLIST: pragha_preferences_set_restore_playlist(preferences, g_value_get_boolean(value)); break; case PROP_AUDIO_SINK: pragha_preferences_set_audio_sink(preferences, g_value_get_string(value)); break; case PROP_AUDIO_DEVICE: pragha_preferences_set_audio_device(preferences, g_value_get_string(value)); break; case PROP_SOFTWARE_MIXER: pragha_preferences_set_software_mixer(preferences, g_value_get_boolean(value)); break; case PROP_SOFTWARE_VOLUME: pragha_preferences_set_software_volume(preferences, g_value_get_double(value)); break; case PROP_LATERAL_PANEL: pragha_preferences_set_lateral_panel(preferences, g_value_get_boolean(value)); break; case PROP_SIDEBAR_SIZE: pragha_preferences_set_sidebar_size(preferences, g_value_get_int(value)); break; case PROP_SECONDARY_LATERAL_PANEL: pragha_preferences_set_secondary_lateral_panel(preferences, g_value_get_boolean(value)); break; case PROP_SECONDARY_SIDEBAR_SIZE: pragha_preferences_set_secondary_sidebar_size(preferences, g_value_get_int(value)); break; case PROP_SHOW_ALBUM_ART: pragha_preferences_set_show_album_art(preferences, g_value_get_boolean(value)); break; case PROP_ALBUM_ART_SIZE: pragha_preferences_set_album_art_size(preferences, g_value_get_int(value)); break; case PROP_ALBUM_ART_PATTERN: pragha_preferences_set_album_art_pattern(preferences, g_value_get_string(value)); break; case PROP_TOOLBAR_SIZE: pragha_preferences_set_toolbar_size(preferences, g_value_get_enum(value)); break; case PROP_SHOW_STATUS_BAR: pragha_preferences_set_show_status_bar(preferences, g_value_get_boolean(value)); break; case PROP_SHOW_STATUS_ICON: pragha_preferences_set_show_status_icon(preferences, g_value_get_boolean(value)); break; case PROP_SHOW_MENUBAR: pragha_preferences_set_show_menubar(preferences, g_value_get_boolean(value)); break; case PROP_SYSTEM_TITLEBAR: pragha_preferences_set_system_titlebar(preferences, g_value_get_boolean(value)); break; case PROP_CONTROLS_BELOW: pragha_preferences_set_controls_below(preferences, g_value_get_boolean(value)); break; case PROP_REMEMBER_STATE: pragha_preferences_set_remember_state(preferences, g_value_get_boolean(value)); break; case PROP_START_MODE: pragha_preferences_set_start_mode(preferences, g_value_get_string(value)); break; case PROP_LAST_FOLDER: pragha_preferences_set_last_folder(preferences, g_value_get_string(value)); break; case PROP_ADD_RECURSIVELY: pragha_preferences_set_add_recursively(preferences, g_value_get_boolean(value)); break; case PROP_TIMER_REMAINING_MODE: pragha_preferences_set_timer_remaining_mode(preferences, g_value_get_boolean(value)); break; case PROP_HIDE_INSTEAD_CLOSE: pragha_preferences_set_hide_instead_close(preferences, g_value_get_boolean(value)); break; case PROP_LOCK_LIBRARY: pragha_preferences_set_lock_library(preferences, g_value_get_boolean(value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); } } static GObject * pragha_preferences_constructor (GType type, guint n_construct_properties, GObjectConstructParam *construct_properties) { GObject *object = G_OBJECT_CLASS (pragha_preferences_parent_class)-> constructor (type, n_construct_properties, construct_properties); PraghaPreferences *preferences = PRAGHA_PREFERENCES (object); pragha_preferences_load_from_file (preferences); return object; } static void pragha_preferences_class_init (PraghaPreferencesClass *klass) { GObjectClass *object_class; const GParamFlags PRAGHA_PREF_PARAMS = G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS; object_class = G_OBJECT_CLASS(klass); object_class->constructor = pragha_preferences_constructor; object_class->finalize = pragha_preferences_finalize; object_class->get_property = pragha_preferences_get_property; object_class->set_property = pragha_preferences_set_property; g_type_class_add_private(object_class, sizeof(PraghaPreferencesPrivate)); /** * PraghaPreferences:instant_search: * */ gParamSpecs[PROP_INSTANT_SEARCH] = g_param_spec_boolean("instant-search", "InstantSearch", "Instant Search Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:approximate_searches: * */ gParamSpecs[PROP_APPROXIMATE_SEARCH] = g_param_spec_boolean("approximate-searches", "ApproximateSearches", "Approximate Searches Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:library_style: * */ gParamSpecs[PROP_LIBRARY_STYLE] = g_param_spec_int ("library-style", "LibraryStyle", "Library Style Preferences", 0, LAST_LIBRARY_STYLE, FOLDERS, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:sort_by_year: * */ gParamSpecs[PROP_LIBRARY_SORT_BY_YEAR] = g_param_spec_boolean("sort-by-year", "SortByYear", "Sort By Year Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:fuse_folders: * */ gParamSpecs[PROP_LIBRARY_FUSE_FOLDERS] = g_param_spec_boolean("fuse-folders", "FuseFolders", "Fuse Folders Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:shuffle: * */ gParamSpecs[PROP_SHUFFLE] = g_param_spec_boolean("shuffle", "Shuffle", "Shuffle Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:repeat: * */ gParamSpecs[PROP_REPEAT] = g_param_spec_boolean("repeat", "Repeat", "Repeat Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:restore_playlist: * */ gParamSpecs[PROP_RESTORE_PLAYLIST] = g_param_spec_boolean("restore-playlist", "RestorePlaylist", "Restore Playlist Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:audio_sink: * */ gParamSpecs[PROP_AUDIO_SINK] = g_param_spec_string("audio-sink", "AudioSink", "Audio Sink", DEFAULT_SINK, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:audio_device: * */ gParamSpecs[PROP_AUDIO_DEVICE] = g_param_spec_string("audio-device", "AudioDevice", "Audio Device", ALSA_DEFAULT_DEVICE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:software_mixer: * */ gParamSpecs[PROP_SOFTWARE_MIXER] = g_param_spec_boolean("software-mixer", "SoftwareMixer", "Use Software Mixer", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:software_volume: * */ gParamSpecs[PROP_SOFTWARE_VOLUME] = g_param_spec_double ("software-volume", "SoftwareVolume", "Software Volume Preferences", -1.0, 1.0, -1.0, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:lateral_panel: * */ gParamSpecs[PROP_LATERAL_PANEL] = g_param_spec_boolean("lateral-panel", "LateralPanel", "Show Lateral Panel Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:sidebar_size: * */ gParamSpecs[PROP_SIDEBAR_SIZE] = g_param_spec_int ("sidebar-size", "SidebarSize", "Sidebar Size Preferences", 0, G_MAXINT, DEFAULT_SIDEBAR_SIZE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:secondary_lateral_panel: * */ gParamSpecs[PROP_SECONDARY_LATERAL_PANEL] = g_param_spec_boolean("secondary-lateral-panel", "SecondaryLateralPanel", "Show Secondary Lateral Panel Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:secondary_sidebar_size: * */ gParamSpecs[PROP_SECONDARY_SIDEBAR_SIZE] = g_param_spec_int ("secondary-sidebar-size", "SecondarySidebarSize", "Secondary Sidebar Size Preferences", 0, G_MAXINT, DEFAULT_SIDEBAR_SIZE*4, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:show_album_art: * */ gParamSpecs[PROP_SHOW_ALBUM_ART] = g_param_spec_boolean("show-album-art", "ShowAlbumArt", "show Album Art Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:album_art_size: * */ gParamSpecs[PROP_ALBUM_ART_SIZE] = g_param_spec_int ("album-art-size", "AlbumArtSize", "Album Art Size Preferences", 24, 128, DEFAULT_ALBUM_ART_SIZE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:album_art_pattern: * */ gParamSpecs[PROP_ALBUM_ART_PATTERN] = g_param_spec_string("album-art-pattern", "AlbumArtPattern", "Album Art Pattern Preferences", "", PRAGHA_PREF_PARAMS); /** * PraghaPreferences:toolbar_size: * */ gParamSpecs[PROP_TOOLBAR_SIZE] = g_param_spec_enum ("toolbar-size", "ToolbarSize", "Toolbar Size Preferences", GTK_TYPE_ICON_SIZE, GTK_ICON_SIZE_LARGE_TOOLBAR, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:show_status_bar: * */ gParamSpecs[PROP_SHOW_STATUS_BAR] = g_param_spec_boolean("show-status-bar", "ShowStatusBar", "Show Status Bar Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:show_status_icon: * */ gParamSpecs[PROP_SHOW_STATUS_ICON] = g_param_spec_boolean("show-status-icon", "ShowStatusIcon", "Show Status Icon Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:show_menubar: * */ gParamSpecs[PROP_SHOW_MENUBAR] = g_param_spec_boolean("show-menubar", "ShowMenubar", "Show Menubar Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:system_titlebar: * */ gParamSpecs[PROP_SYSTEM_TITLEBAR] = g_param_spec_boolean("system-titlebar", "SystemTitlebar", "System Titlebar Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:controls_below: * */ gParamSpecs[PROP_CONTROLS_BELOW] = g_param_spec_boolean("controls-below", "ControlsBelow", "Controls Below Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:remember_state: * */ gParamSpecs[PROP_REMEMBER_STATE] = g_param_spec_boolean("remember-state", "RememberState", "Remember State Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:start_mode: * */ gParamSpecs[PROP_START_MODE] = g_param_spec_string("start-mode", "StartMode", "Start Mode Preference", NORMAL_STATE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:last_folder: * */ gParamSpecs[PROP_LAST_FOLDER] = g_param_spec_string("last-folder", "LastFolder", "Last folder used in file chooser", g_get_home_dir(), PRAGHA_PREF_PARAMS); /** * PraghaPreferences:add_recursively: * */ gParamSpecs[PROP_ADD_RECURSIVELY] = g_param_spec_boolean("add-recursively", "AddRecursively", "Add Recursively Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:timer_remaining_mode: * */ gParamSpecs[PROP_TIMER_REMAINING_MODE] = g_param_spec_boolean("timer-remaining-mode", "TimerRemainingMode", "Timer Remaining Mode Preference", FALSE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:hide_instead_close: * */ gParamSpecs[PROP_HIDE_INSTEAD_CLOSE] = g_param_spec_boolean("hide-instead-close", "HideInsteadClose", "Hide Instead Close Preference", TRUE, PRAGHA_PREF_PARAMS); /** * PraghaPreferences:lock_library: * */ gParamSpecs[PROP_LOCK_LIBRARY] = g_param_spec_boolean("lock-library", "LockLibrary", "Lock Library Changes", FALSE, PRAGHA_PREF_PARAMS); g_object_class_install_properties(object_class, LAST_PROP, gParamSpecs); signals[SIGNAL_PLUGINS_CHANGED] = g_signal_new ("PluginsChanged", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaPreferencesClass, plugins_change), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); signals[SIGNAL_LIBRARY_CHANGED] = g_signal_new ("LibraryChanged", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaPreferencesClass, library_change), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIGNAL_NEED_RESTART] = g_signal_new ("NeedRestart", G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaPreferencesClass, need_restart), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void pragha_preferences_init (PraghaPreferences *preferences) { preferences->priv = G_TYPE_INSTANCE_GET_PRIVATE(preferences, PRAGHA_TYPE_PREFERENCES, PraghaPreferencesPrivate); } /** * pragha_preferences_get: * * Queries the global #PraghaPreferences instance, which is shared * by all modules. The function automatically takes a reference * for the caller, so you'll need to call g_object_unref() when * you're done with it. * * Return value: the global #PraghaPreferences instance. **/ PraghaPreferences* pragha_preferences_get (void) { static PraghaPreferences *preferences = NULL; if (G_UNLIKELY (preferences == NULL)) { CDEBUG(DBG_INFO, "Creating a new PraghaPreferences instance"); preferences = g_object_new(PRAGHA_TYPE_PREFERENCES, NULL); g_object_add_weak_pointer(G_OBJECT (preferences), (gpointer) &preferences); } else { g_object_ref (G_OBJECT (preferences)); } return preferences; } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-preferences.h���������������������������������������������������������������0000664�0000000�0000000�00000041416�13435240150�0017465�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_PREFERENCES_H #define PRAGHA_PREFERENCES_H #include <gtk/gtk.h> #include <glib-object.h> G_BEGIN_DECLS #define PRAGHA_TYPE_PREFERENCES (pragha_preferences_get_type()) #define PRAGHA_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PREFERENCES, PraghaPreferences)) #define PRAGHA_PREFERENCES_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PREFERENCES, PraghaPreferences const)) #define PRAGHA_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_PREFERENCES, PraghaPreferencesClass)) #define PRAGHA_IS_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_PREFERENCES)) #define PRAGHA_IS_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_PREFERENCES)) #define PRAGHA_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_PREFERENCES, PraghaPreferencesClass)) typedef struct _PraghaPreferences PraghaPreferences; typedef struct _PraghaPreferencesClass PraghaPreferencesClass; typedef struct _PraghaPreferencesPrivate PraghaPreferencesPrivate; struct _PraghaPreferences { GObject parent; /*< private >*/ PraghaPreferencesPrivate *priv; }; struct _PraghaPreferencesClass { GObjectClass parent_class; void (*plugins_change) (PraghaPreferences *preferences, const gchar *key); void (*library_change) (PraghaPreferences *preferences); void (*need_restart) (PraghaPreferences *preferences); }; /* Defines to key preferences. */ #define GROUP_GENERAL "General" #define KEY_INSTALLED_VERSION "installed_version" #define KEY_LAST_FOLDER "last_folder" #define KEY_ADD_RECURSIVELY_FILES "add_recursively_files" #define KEY_ALBUM_ART_PATTERN "album_art_pattern" #define KEY_TIMER_REMAINING_MODE "timer_remaining_mode" #define KEY_SHOW_ICON_TRAY "show_icon_tray" #define KEY_CLOSE_TO_TRAY "close_to_tray" #define KEY_INSTANT_SEARCH "instant_filter" #define KEY_APPROXIMATE_SEARCH "aproximate_search" #define GROUP_PLAYLIST "Playlist" #define KEY_SAVE_PLAYLIST "save_playlist" #define KEY_CURRENT_REF "current_ref" #define KEY_SHUFFLE "shuffle" #define KEY_REPEAT "repeat" #define KEY_PLAYLIST_COLUMNS "playlist_columns" #define KEY_PLAYLIST_COLUMN_WIDTHS "playlist_column_widths" #define GROUP_LIBRARY "Library" #define KEY_LIBRARY_DIR "library_dir" #define KEY_LIBRARY_SCANNED "library_scanned" #define KEY_LIBRARY_VIEW_ORDER "library_view_order" #define KEY_LIBRARY_LAST_SCANNED "library_last_scanned" #define KEY_FUSE_FOLDERS "library_fuse_folders" #define KEY_SORT_BY_YEAR "library_sort_by_year" #define GROUP_AUDIO "Audio" #define KEY_AUDIO_SINK "audio_sink" #define KEY_AUDIO_DEVICE "audio_device" #define KEY_SOFTWARE_MIXER "software_mixer" #define KEY_SOFTWARE_VOLUME "software_volume" #define KEY_EQ_10_BANDS "equealizer_10_bands" #define KEY_EQ_PRESET "equalizer_preset" #define GROUP_WINDOW "Window" #define KEY_REMEMBER_STATE "remember_window_state" #define KEY_START_MODE "start_mode" #define KEY_WINDOW_SIZE "window_size" #define KEY_WINDOW_POSITION "window_position" #define KEY_SIDEBAR "sidebar" #define KEY_SIDEBAR_SIZE "sidebar_size" #define KEY_SECONDARY_SIDEBAR "secondary_sidebar" #define KEY_SECONDARY_SIDEBAR_SIZE "secondary_sidebar_size" #define KEY_SHOW_ALBUM_ART "show_album_art" #define KEY_ALBUM_ART_SIZE "album_art_size" #define KEY_TOOLBAR_SIZE "toolbar_icon_size" #define KEY_STATUS_BAR "status_bar" #define KEY_SYSTEM_TITLEBAR "system_titlebar" #define KEY_CONTROLS_BELOW "controls_below" #define KEY_SHOW_MENUBAR "show_menubar" /* Some default preferences. */ #define DEFAULT_SIDEBAR_SIZE 200 #define DEFAULT_ALBUM_ART_SIZE 32 #define DEFAULT_SINK "default" #define ALSA_SINK "alsa" #define OSS4_SINK "oss4" #define OSS_SINK "oss" #define PULSE_SINK "pulse" #define ALSA_DEFAULT_DEVICE "default" #define OSS_DEFAULT_DEVICE "/dev/dsp" #define ALBUM_ART_NO_PATTERNS 6 /* Some useful macros. */ #define NORMAL_STATE "normal" #define FULLSCREEN_STATE "fullscreen" #define ICONIFIED_STATE "iconified" PraghaPreferences* pragha_preferences_get (void); GType pragha_preferences_get_type (void) G_GNUC_CONST; /* * Generic api to accessing other preferences. */ gboolean pragha_preferences_get_boolean (PraghaPreferences *preferences, const gchar *group_name, const gchar *key); void pragha_preferences_set_boolean (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gboolean sbool); gint * pragha_preferences_get_integer_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gsize *length); void pragha_preferences_set_integer_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gint list[], gsize length); gdouble * pragha_preferences_get_double_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key); void pragha_preferences_set_double_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gdouble list[], gsize length); gchar * pragha_preferences_get_string (PraghaPreferences *preferences, const gchar *group_name, const gchar *key); void pragha_preferences_set_string (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, const gchar *string); gchar ** pragha_preferences_get_string_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, gsize *length); void pragha_preferences_set_string_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, const gchar * const list[], gsize length); GSList * pragha_preferences_get_filename_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key); void pragha_preferences_set_filename_list (PraghaPreferences *preferences, const gchar *group_name, const gchar *key, GSList *list); /** * pragha_preferences_remove_key: * */ void pragha_preferences_remove_key (PraghaPreferences *preferences, const gchar *group_name, const gchar *key); gboolean pragha_preferences_has_group (PraghaPreferences *preferences, const gchar *group_name); void pragha_preferences_remove_group (PraghaPreferences *preferences, const gchar *group_name); /* * Specific plugin api. */ void pragha_preferences_plugin_changed (PraghaPreferences *preferences, const gchar *key); gchar * pragha_preferences_get_plugin_group_name (PraghaPreferences *preferences, const gchar *plugin_name); /* * Public api. */ void pragha_preferences_need_restart (PraghaPreferences *preferences); GSList * pragha_preferences_get_library_list (PraghaPreferences *preferences); void pragha_preferences_set_library_list (PraghaPreferences *preferences, GSList *list); const gchar * pragha_preferences_get_installed_version (PraghaPreferences *preferences); void pragha_preferences_set_approximate_search (PraghaPreferences *prefernces, gboolean approximate_search); gboolean pragha_preferences_get_approximate_search (PraghaPreferences *preferences); void pragha_preferences_set_instant_search (PraghaPreferences *preferences, gboolean instant_search); gboolean pragha_preferences_get_instant_search (PraghaPreferences *preferences); void pragha_preferences_set_library_style (PraghaPreferences *preferences, gint library_style); gint pragha_preferences_get_library_style (PraghaPreferences *preferences); void pragha_preferences_set_sort_by_year (PraghaPreferences *preferences, gboolean sort_by_year); gboolean pragha_preferences_get_sort_by_year (PraghaPreferences *preferences); void pragha_preferences_set_fuse_folders (PraghaPreferences *preferences, gboolean fuse_folders); gboolean pragha_preferences_get_fuse_folders (PraghaPreferences *preferences); void pragha_preferences_set_shuffle (PraghaPreferences *preferences, gboolean shuffle); gboolean pragha_preferences_get_shuffle (PraghaPreferences *preferences); void pragha_preferences_set_repeat (PraghaPreferences *preferences, gboolean repeat); gboolean pragha_preferences_get_repeat (PraghaPreferences *preferences); void pragha_preferences_set_restore_playlist (PraghaPreferences *preferences, gboolean restore_playlist); gboolean pragha_preferences_get_restore_playlist (PraghaPreferences *preferences); const gchar * pragha_preferences_get_audio_sink (PraghaPreferences *preferences); void pragha_preferences_set_audio_sink (PraghaPreferences *preferences, const gchar *audio_sink); const gchar * pragha_preferences_get_audio_device (PraghaPreferences *preferences); void pragha_preferences_set_audio_device (PraghaPreferences *preferences, const gchar *audio_device); gboolean pragha_preferences_get_software_mixer (PraghaPreferences *preferences); void pragha_preferences_set_software_mixer (PraghaPreferences *preferences, gboolean software_mixer); gdouble pragha_preferences_get_software_volume (PraghaPreferences *preferences); void pragha_preferences_set_software_volume (PraghaPreferences *preferences, gdouble software_volume); gboolean pragha_preferences_get_lateral_panel (PraghaPreferences *preferences); void pragha_preferences_set_lateral_panel (PraghaPreferences *preferences, gboolean lateral_panel); gboolean pragha_preferences_get_secondary_lateral_panel (PraghaPreferences *preferences); void pragha_preferences_set_secondary_lateral_panel (PraghaPreferences *preferences, gboolean secondary_lateral_panel); gboolean pragha_preferences_get_show_album_art (PraghaPreferences *preferences); void pragha_preferences_set_show_album_art (PraghaPreferences *preferences, gboolean show_album_art); gint pragha_preferences_get_album_art_size (PraghaPreferences *preferences); void pragha_preferences_set_album_art_size (PraghaPreferences *preferences, gint album_art_size); const gchar * pragha_preferences_get_album_art_pattern (PraghaPreferences *preferences); void pragha_preferences_set_album_art_pattern (PraghaPreferences *preferences, const gchar *album_art_pattern); GtkIconSize pragha_preferences_get_toolbar_size (PraghaPreferences *preferences); void pragha_preferences_set_toolbar_size (PraghaPreferences *preferences, GtkIconSize toolbar_size); gboolean pragha_preferences_get_show_status_bar (PraghaPreferences *preferences); void pragha_preferences_set_show_status_bar (PraghaPreferences *preferences, gboolean show_status_bar); gboolean pragha_preferences_get_show_status_icon (PraghaPreferences *preferences); void pragha_preferences_set_show_status_icon (PraghaPreferences *preferences, gboolean show_status_icon); gboolean pragha_preferences_get_show_menubar (PraghaPreferences *preferences); void pragha_preferences_set_show_menubar (PraghaPreferences *preferences, gboolean show_menubar); gboolean pragha_preferences_get_system_titlebar (PraghaPreferences *preferences); void pragha_preferences_set_system_titlebar (PraghaPreferences *preferences, gboolean system_titlebar); gboolean pragha_preferences_get_controls_below (PraghaPreferences *preferences); void pragha_preferences_set_controls_below (PraghaPreferences *preferences, gboolean controls_below); gboolean pragha_preferences_get_remember_state (PraghaPreferences *preferences); void pragha_preferences_set_remember_state (PraghaPreferences *preferences, gboolean remember_state); gint pragha_preferences_get_sidebar_size (PraghaPreferences *preferences); void pragha_preferences_set_sidebar_size (PraghaPreferences *preferences, gint sidebar_size); gint pragha_preferences_get_secondary_sidebar_size (PraghaPreferences *preferences); void pragha_preferences_set_secondary_sidebar_size (PraghaPreferences *preferences, gint secondary_sidebar_size); const gchar * pragha_preferences_get_start_mode (PraghaPreferences *preferences); void pragha_preferences_set_start_mode (PraghaPreferences *preferences, const gchar *start_mode); const gchar * pragha_preferences_get_last_folder (PraghaPreferences *preferences); void pragha_preferences_set_last_folder (PraghaPreferences *preferences, const gchar *last_folder); gboolean pragha_preferences_get_add_recursively (PraghaPreferences *preferences); void pragha_preferences_set_add_recursively(PraghaPreferences *preferences, gboolean add_recursively); gboolean pragha_preferences_get_timer_remaining_mode (PraghaPreferences *preferences); void pragha_preferences_set_timer_remaining_mode(PraghaPreferences *preferences, gboolean add_recursively); gboolean pragha_preferences_get_hide_instead_close (PraghaPreferences *preferences); void pragha_preferences_set_hide_instead_close (PraghaPreferences *preferences, gboolean hide_instead_close); gboolean pragha_preferences_get_lock_library (PraghaPreferences *preferences); void pragha_preferences_set_lock_library (PraghaPreferences *preferences, gboolean lock_library); G_END_DECLS #endif /* PRAGHA_PREFERENCES_H */ ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-prepared-statement-private.h������������������������������������������������0000664�0000000�0000000�00000002171�13435240150�0022433�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PRAGHA_PREPARED_STATEMENT_PRIVATE_H #define PRAGHA_PREPARED_STATEMENT_PRIVATE_H #include <sqlite3.h> #include "pragha-database.h" #include "pragha-prepared-statement.h" PraghaPreparedStatement* pragha_prepared_statement_new (sqlite3_stmt *stmt, PraghaDatabase *database); void pragha_prepared_statement_finalize (PraghaPreparedStatement *statement); #endif /* PRAGHA_PREPARED_STATEMENT_PRIVATE_H */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-prepared-statement.c��������������������������������������������������������0000664�0000000�0000000�00000005656�13435240150�0020771�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "pragha-prepared-statement.h" #include "pragha-prepared-statement-private.h" #include <sqlite3.h> #include "pragha-database.h" struct PraghaPreparedStatement { sqlite3_stmt *stmt; PraghaDatabase *database; }; PraghaPreparedStatement * pragha_prepared_statement_new (sqlite3_stmt *stmt, PraghaDatabase *database) { PraghaPreparedStatement *statement = g_slice_new (PraghaPreparedStatement); statement->stmt = stmt; statement->database = database; return statement; } void pragha_prepared_statement_finalize (PraghaPreparedStatement *statement) { sqlite3_finalize (statement->stmt); g_slice_free (PraghaPreparedStatement, statement); } void pragha_prepared_statement_free (PraghaPreparedStatement *statement) { pragha_database_release_statement (statement->database, statement); } static void on_sqlite_error (PraghaPreparedStatement *statement) { g_critical ("db: %s", pragha_database_get_last_error (statement->database)); } void pragha_prepared_statement_bind_string (PraghaPreparedStatement *statement, gint n, const gchar *value) { if (sqlite3_bind_text (statement->stmt, n, value, -1, SQLITE_TRANSIENT) != SQLITE_OK) on_sqlite_error (statement); } void pragha_prepared_statement_bind_int (PraghaPreparedStatement *statement, gint n, gint value) { if (sqlite3_bind_int (statement->stmt, n, value) != SQLITE_OK) on_sqlite_error (statement); } gboolean pragha_prepared_statement_step (PraghaPreparedStatement *statement) { int error_code = sqlite3_step (statement->stmt); if (error_code != SQLITE_OK && error_code != SQLITE_ROW && error_code != SQLITE_DONE) { on_sqlite_error (statement); } return error_code == SQLITE_ROW; } gint pragha_prepared_statement_get_int (PraghaPreparedStatement *statement, gint column) { return sqlite3_column_int (statement->stmt, column); } const gchar * pragha_prepared_statement_get_string (PraghaPreparedStatement *statement, gint column) { return (const gchar *) sqlite3_column_text (statement->stmt, column); } void pragha_prepared_statement_reset (PraghaPreparedStatement *statement) { sqlite3_stmt *stmt = statement->stmt; sqlite3_reset (stmt); sqlite3_clear_bindings (stmt); } const gchar * pragha_prepared_statement_get_sql (PraghaPreparedStatement *statement) { return sqlite3_sql (statement->stmt); } ����������������������������������������������������������������������������������pragha-1.3.4/src/pragha-prepared-statement.h��������������������������������������������������������0000664�0000000�0000000�00000003530�13435240150�0020763�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PRAGHA_PREPARED_STATEMENT_H #define PRAGHA_PREPARED_STATEMENT_H #include <glib.h> G_BEGIN_DECLS struct PraghaPreparedStatement; typedef struct PraghaPreparedStatement PraghaPreparedStatement; void pragha_prepared_statement_free (PraghaPreparedStatement *statement); void pragha_prepared_statement_bind_string (PraghaPreparedStatement *statement, gint n, const gchar *value); void pragha_prepared_statement_bind_int (PraghaPreparedStatement *statement, gint n, gint value); gboolean pragha_prepared_statement_step (PraghaPreparedStatement *statement); gint pragha_prepared_statement_get_int (PraghaPreparedStatement *statement, gint column); const gchar * pragha_prepared_statement_get_string (PraghaPreparedStatement *statement, gint column); void pragha_prepared_statement_reset (PraghaPreparedStatement *statement); const gchar * pragha_prepared_statement_get_sql (PraghaPreparedStatement *statement); G_END_DECLS #endif /* PRAGHA_PREPARED_STATEMENT_H */ ������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-scanner.c�������������������������������������������������������������������0000664�0000000�0000000�00000051406�13435240150�0016610�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-scanner.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib/gstdio.h> #include "pragha-file-utils.h" #include "pragha-utils.h" #include "pragha-musicobject-mgmt.h" #include "pragha-playlists-mgmt.h" #include "pragha-simple-async.h" #include "pragha-statusbar.h" struct _PraghaScanner { /* Widgets */ GtkWidget *hbox; GtkWidget *progress_bar; /* Cache */ GHashTable *tracks_table; GSList *folder_list; GSList *folder_scanned; GSList *playlists; GTimeVal last_update; /* Threads */ GThread *no_files_thread; GThread *worker_thread; /* Mutex to protect progress */ GMutex no_files_mutex; GMutex files_scanned_mutex; /* Progress of threads */ guint no_files; guint files_scanned; /* Cancellation safe */ GCancellable *cancellable; /* Timeout of update progress, also used as operating flag*/ guint update_timeout; }; /* Update the dialog. */ static gboolean pragha_scanner_update_progress(gpointer user_data) { gdouble fraction = 0.0; gint files_scanned = 0; gint no_files; gchar *data = NULL; PraghaScanner *scanner = user_data; if(g_cancellable_is_cancelled (scanner->cancellable)) return FALSE; g_mutex_lock (&scanner->no_files_mutex); no_files = scanner->no_files; g_mutex_unlock (&scanner->no_files_mutex); g_mutex_lock (&scanner->files_scanned_mutex); files_scanned = scanner->files_scanned; g_mutex_unlock (&scanner->files_scanned_mutex); if(no_files > 0) { fraction = (gdouble)files_scanned / (gdouble)no_files; gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(scanner->progress_bar), fraction); data = g_strdup_printf(_("%i files analized of %i detected"), files_scanned, no_files); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(scanner->progress_bar), data); g_free(data); } else { gtk_progress_bar_pulse(GTK_PROGRESS_BAR(scanner->progress_bar)); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(scanner->progress_bar), _("Searching files to analyze")); } return TRUE; } /* Thread that counts all files in the library */ static gpointer pragha_scanner_count_no_files_worker(gpointer data) { GSList *list; gint no_files = 0; PraghaScanner *scanner = data; for(list = scanner->folder_list ; list != NULL ; list = list->next) { if(g_cancellable_is_cancelled (scanner->cancellable)) break; no_files += pragha_get_dir_count(list->data, scanner->cancellable); g_mutex_lock (&scanner->no_files_mutex); scanner->no_files = no_files; g_mutex_unlock (&scanner->no_files_mutex); } return NULL; } /* Function that is executed at the end of analyze the files, * or if the analysis was canceled. * This runs on the main thread. So, can show a dialog. * Finally, frees all memory. */ static void pragha_scanner_add_track_db(gpointer key, gpointer value, gpointer user_data) { PraghaMusicobject *mobj = value; PraghaDatabase *database = user_data; pragha_database_add_new_musicobject (database, mobj); pragha_process_gtk_events (); } static GSList * pragha_scanner_clean_playlist (GSList *list) { gchar *file = NULL; GSList *l, *tmp = NULL; for (l=list; l != NULL; l = l->next) { file = l->data; if (g_file_test(file, G_FILE_TEST_EXISTS)) tmp = g_slist_prepend(tmp, file); else g_free (file); } g_slist_free (list); return g_slist_reverse(tmp); } static void pragha_scanner_import_playlist (PraghaDatabase *database, const gchar *playlist_file) { gchar *playlist = NULL; gint playlist_id = 0; GSList *list = NULL, *i = NULL; playlist = get_display_filename(playlist_file, FALSE); if (pragha_database_find_playlist(database, playlist)) goto duplicated; #ifdef HAVE_PLPARSER gchar *uri = g_filename_to_uri (playlist_file, NULL, NULL); list = pragha_totem_pl_parser_parse_from_uri(uri); g_free (uri); #else list = pragha_pl_parser_parse_from_file_by_extension (playlist_file); #endif list = pragha_scanner_clean_playlist (list); if (list) { playlist_id = pragha_database_add_new_playlist (database, playlist); for (i = list; i != NULL; i = i->next) { pragha_database_add_playlist_track (database, playlist_id, i->data); g_free(i->data); } g_slist_free(list); } duplicated: g_free(playlist); } static void pragha_scanner_finished_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data) { PraghaScanner *scanner = data; if(!scanner->update_timeout) gtk_widget_destroy(GTK_WIDGET(dialog)); } static gboolean pragha_scanner_finished_dialog_delete (GtkDialog *dialog, GdkEvent *event, gpointer data) { PraghaScanner *scanner = data; if(scanner->update_timeout) return TRUE; return FALSE; } static gboolean pragha_scanner_worker_finished (gpointer data) { GtkWidget *msg_dialog; gchar *last_scan_time = NULL; PraghaPreferences *preferences; PraghaDatabase *database; GSList *list; PraghaScanner *scanner = data; /* Stop updates */ g_source_remove(scanner->update_timeout); /* Ensure that the other thread has finished */ g_thread_join (scanner->no_files_thread); /* If not cancelled, update database and show a dialog */ if(!g_cancellable_is_cancelled (scanner->cancellable)) { /* Hide the scanner and show the dialog */ gtk_widget_hide(scanner->hbox); msg_dialog = gtk_message_dialog_new(GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(scanner->hbox))), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "%s", _("Library scan complete")); g_signal_connect(G_OBJECT(msg_dialog), "response", G_CALLBACK(pragha_scanner_finished_dialog_response_cb), scanner); g_signal_connect(G_OBJECT(msg_dialog), "delete-event", G_CALLBACK(pragha_scanner_finished_dialog_delete), scanner); gtk_widget_show_all(msg_dialog); /* Save new database and update the library view */ set_watch_cursor(msg_dialog); set_watch_cursor(scanner->hbox); database = pragha_database_get(); pragha_database_begin_transaction (database); pragha_database_flush (database); g_hash_table_foreach (scanner->tracks_table, pragha_scanner_add_track_db, database); /* Import playlist detected. */ for (list = scanner->playlists ; list != NULL; list = list->next) pragha_scanner_import_playlist(database, list->data); pragha_database_commit_transaction (database); pragha_database_change_tracks_done (database); g_object_unref(database); remove_watch_cursor(scanner->hbox); remove_watch_cursor(msg_dialog); /* Save finished time and folders scanned. */ g_get_current_time(&scanner->last_update); last_scan_time = g_time_val_to_iso8601(&scanner->last_update); preferences = pragha_preferences_get(); pragha_preferences_set_string(preferences, GROUP_LIBRARY, KEY_LIBRARY_LAST_SCANNED, last_scan_time); g_free(last_scan_time); pragha_preferences_set_filename_list(preferences, GROUP_LIBRARY, KEY_LIBRARY_SCANNED, scanner->folder_list); pragha_preferences_set_lock_library (preferences, FALSE); g_object_unref(G_OBJECT(preferences)); } else { preferences = pragha_preferences_get(); pragha_preferences_set_lock_library (preferences, FALSE); g_object_unref(G_OBJECT(preferences)); gtk_widget_hide(scanner->hbox); } gtk_progress_bar_set_text(GTK_PROGRESS_BAR(scanner->progress_bar), NULL); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(scanner->progress_bar), 0.0); /* Clean memory */ g_hash_table_remove_all(scanner->tracks_table); free_str_list(scanner->folder_list); scanner->folder_list = NULL; free_str_list(scanner->folder_scanned); scanner->folder_scanned = NULL; free_str_list(scanner->playlists); scanner->playlists = NULL; scanner->no_files = 0; scanner->files_scanned = 0; g_cancellable_reset (scanner->cancellable); scanner->update_timeout = 0; return FALSE; } /* Function that analyzes all files of library recursively */ static void pragha_scanner_scan_handler(PraghaScanner *scanner, const gchar *dir_name) { GDir *dir; const gchar *next_file = NULL; gchar *ab_file; GError *error = NULL; PraghaMusicobject *mobj = NULL; PraghaMediaType file_type; if(g_cancellable_is_cancelled (scanner->cancellable)) return; dir = g_dir_open(dir_name, 0, &error); if (!dir) { g_critical("Unable to open library : %s", dir_name); return; } next_file = g_dir_read_name(dir); while (next_file) { if(g_cancellable_is_cancelled (scanner->cancellable)) { g_dir_close(dir); return; } ab_file = g_strconcat(dir_name, G_DIR_SEPARATOR_S, next_file, NULL); if (g_file_test(ab_file, G_FILE_TEST_IS_DIR)) pragha_scanner_scan_handler(scanner, ab_file); else { file_type = pragha_file_get_media_type (ab_file); switch (file_type) { case MEDIA_TYPE_AUDIO: mobj = new_musicobject_from_file(ab_file); if (G_LIKELY(mobj)) g_hash_table_insert(scanner->tracks_table, g_strdup(pragha_musicobject_get_file(mobj)), mobj); break; case MEDIA_TYPE_PLAYLIST: scanner->playlists = g_slist_prepend (scanner->playlists, g_strdup(ab_file)); break; case MEDIA_TYPE_IMAGE: case MEDIA_TYPE_UNKNOWN: default: break; } g_mutex_lock (&scanner->files_scanned_mutex); scanner->files_scanned++; g_mutex_unlock (&scanner->files_scanned_mutex); } g_free(ab_file); next_file = g_dir_read_name(dir); } g_dir_close(dir); } /* Thread that analyze all files in the library */ static gpointer pragha_scanner_scan_worker(gpointer data) { GSList *list; PraghaScanner *scanner = data; for(list = scanner->folder_list ; list != NULL; list = list->next) { if(g_cancellable_is_cancelled (scanner->cancellable)) break; pragha_scanner_scan_handler(scanner, list->data); } return scanner; } /* Function that analyzes all files of library recursively */ static void pragha_scanner_update_handler(PraghaScanner *scanner, const gchar *dir_name) { GDir *dir; const gchar *next_file = NULL; gchar *ab_file = NULL, *s_ab_file = NULL; GError *error = NULL; struct stat sbuf; PraghaMusicobject *mobj = NULL; if(g_cancellable_is_cancelled (scanner->cancellable)) return; dir = g_dir_open(dir_name, 0, &error); if (!dir) { g_critical("Unable to open library : %s", dir_name); return; } next_file = g_dir_read_name(dir); while (next_file) { if(g_cancellable_is_cancelled (scanner->cancellable)) return; ab_file = g_strconcat(dir_name, G_DIR_SEPARATOR_S, next_file, NULL); if (g_file_test(ab_file, G_FILE_TEST_IS_DIR)) { pragha_scanner_update_handler(scanner, ab_file); } else { mobj = g_hash_table_lookup(scanner->tracks_table, ab_file); if(!mobj) { mobj = new_musicobject_from_file(ab_file); if (G_LIKELY(mobj)) g_hash_table_insert(scanner->tracks_table, g_strdup(pragha_musicobject_get_file(mobj)), mobj); } else { if ((g_stat(ab_file, &sbuf) == 0) && (sbuf.st_mtime > scanner->last_update.tv_sec)) { mobj = new_musicobject_from_file(ab_file); if (G_LIKELY(mobj)) { g_hash_table_replace(scanner->tracks_table, g_strdup(pragha_musicobject_get_file(mobj)), mobj); } } } g_mutex_lock (&scanner->files_scanned_mutex); scanner->files_scanned++; g_mutex_unlock (&scanner->files_scanned_mutex); g_free(s_ab_file); } g_free(ab_file); next_file = g_dir_read_name(dir); } g_dir_close(dir); } /* Thread that analyze all files in the library */ static gpointer pragha_scanner_update_worker(gpointer data) { GSList *list; GHashTableIter iter; gpointer key, value; gchar *file; PraghaScanner *scanner = data; /* Clean removed files */ g_hash_table_iter_init (&iter, scanner->tracks_table); while (g_hash_table_iter_next (&iter, &key, &value)) { file = key; if(g_cancellable_is_cancelled (scanner->cancellable)) break; if(!g_file_test(file, G_FILE_TEST_EXISTS)) g_hash_table_iter_remove(&iter); } /* Then update files changed.. */ for(list = scanner->folder_list ; list != NULL; list = list->next) { if(g_cancellable_is_cancelled (scanner->cancellable)) break; if(is_present_str_list(list->data, scanner->folder_scanned)) pragha_scanner_update_handler(scanner, list->data); } /* Then add news folder in library */ for(list = scanner->folder_list; list != NULL; list = list->next) { if(g_cancellable_is_cancelled (scanner->cancellable)) break; if(!is_present_str_list(list->data, scanner->folder_scanned)) pragha_scanner_scan_handler(scanner, list->data); } return scanner; } void pragha_scanner_update_library(PraghaScanner *scanner) { PraghaPreferences *preferences; PraghaDatabase *database; PraghaPreparedStatement *statement; PraghaMusicobject *mobj = NULL; gchar *mask = NULL, *last_scan_time = NULL; const gchar *sql = NULL; guint location_id; GSList *list; if(scanner->update_timeout) return; preferences = pragha_preferences_get(); pragha_preferences_set_lock_library (preferences, TRUE); /* Get last time that update the library and folders to analyze */ last_scan_time = pragha_preferences_get_string(preferences, GROUP_LIBRARY, KEY_LIBRARY_LAST_SCANNED); if (last_scan_time) { if (!g_time_val_from_iso8601(last_scan_time, &scanner->last_update)) g_warning("Unable to convert last rescan time"); g_free(last_scan_time); } scanner->folder_list = pragha_preferences_get_filename_list(preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR); scanner->folder_scanned = pragha_preferences_get_filename_list(preferences, GROUP_LIBRARY, KEY_LIBRARY_SCANNED); g_object_unref(G_OBJECT(preferences)); /* Update the gui */ scanner->update_timeout = g_timeout_add_seconds(1, (GSourceFunc)pragha_scanner_update_progress, scanner); pragha_preferences_set_show_status_bar (preferences, TRUE); gtk_widget_show_all(scanner->hbox); /* Append the files from database that no changed. */ database = pragha_database_get(); for(list = scanner->folder_scanned ; list != NULL; list = list->next) { if(is_present_str_list(list->data, scanner->folder_list)) { sql = "SELECT id FROM LOCATION WHERE name LIKE ?"; statement = pragha_database_create_statement (database, sql); mask = g_strconcat (list->data, "%", NULL); pragha_prepared_statement_bind_string (statement, 1, mask); while (pragha_prepared_statement_step (statement)) { location_id = pragha_prepared_statement_get_int (statement, 0); mobj = new_musicobject_from_db(database, location_id); if (G_LIKELY(mobj)) { g_hash_table_insert(scanner->tracks_table, g_strdup(pragha_musicobject_get_file(mobj)), mobj); } pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); g_free(mask); } } g_object_unref(database); /* Launch threads */ scanner->no_files_thread = g_thread_new("Count no files", pragha_scanner_count_no_files_worker, scanner); scanner->worker_thread = pragha_async_launch_full(pragha_scanner_update_worker, pragha_scanner_worker_finished, scanner); } void pragha_scanner_scan_library(PraghaScanner *scanner) { PraghaPreferences *preferences; gchar *last_scan_time = NULL; if(scanner->update_timeout) return; preferences = pragha_preferences_get(); pragha_preferences_set_lock_library (preferences, TRUE); /* Get last time that update the library and folders to analyze */ last_scan_time = pragha_preferences_get_string(preferences, GROUP_LIBRARY, KEY_LIBRARY_LAST_SCANNED); if (last_scan_time) { if (!g_time_val_from_iso8601(last_scan_time, &scanner->last_update)) g_warning("Unable to convert last rescan time"); g_free(last_scan_time); } scanner->folder_list = pragha_preferences_get_filename_list(preferences, GROUP_LIBRARY, KEY_LIBRARY_DIR); scanner->folder_scanned = pragha_preferences_get_filename_list(preferences, GROUP_LIBRARY, KEY_LIBRARY_SCANNED); g_object_unref(G_OBJECT(preferences)); /* Update the gui */ scanner->update_timeout = g_timeout_add_seconds(1, (GSourceFunc)pragha_scanner_update_progress, scanner); pragha_preferences_set_show_status_bar (preferences, TRUE); gtk_widget_show_all(scanner->hbox); /* Launch threads */ scanner->no_files_thread = g_thread_new("Count no files", pragha_scanner_count_no_files_worker, scanner); scanner->worker_thread = pragha_async_launch_full(pragha_scanner_scan_worker, pragha_scanner_worker_finished, scanner); } void pragha_scanner_free(PraghaScanner *scanner) { if(scanner->update_timeout) { g_cancellable_cancel (scanner->cancellable); g_thread_join (scanner->no_files_thread); g_thread_join (scanner->worker_thread); } g_hash_table_destroy(scanner->tracks_table); free_str_list(scanner->folder_list); free_str_list(scanner->folder_scanned); g_mutex_clear (&scanner->no_files_mutex); g_mutex_clear (&scanner->files_scanned_mutex); g_object_unref(scanner->cancellable); g_slice_free (PraghaScanner, scanner); } static void scanner_cancel_click_handler(GtkButton *button, PraghaScanner *scanner) { g_cancellable_cancel (scanner->cancellable); } PraghaScanner * pragha_scanner_new() { PraghaScanner *scanner; PraghaStatusbar *statusbar; GtkWidget *hbox, *progress_bar, *button, *image; scanner = g_slice_new0(PraghaScanner); /* Create widgets */ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); progress_bar = gtk_progress_bar_new(); gtk_widget_set_size_request(progress_bar, PROGRESS_BAR_WIDTH, -1); gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR(progress_bar), TRUE); button = gtk_button_new (); image = gtk_image_new_from_icon_name ("process-stop", GTK_ICON_SIZE_MENU); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE); gtk_container_add (GTK_CONTAINER (button), image); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(scanner_cancel_click_handler), scanner); gtk_box_pack_start (GTK_BOX (hbox), progress_bar, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); /* Init the rest and save references */ scanner->progress_bar = progress_bar; scanner->hbox = hbox; scanner->tracks_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref); scanner->files_scanned = 0; g_mutex_init (&scanner->files_scanned_mutex); scanner->no_files = 0; g_mutex_init (&scanner->no_files_mutex); scanner->cancellable = g_cancellable_new (); scanner->update_timeout = 0; /* Append the widget */ statusbar = pragha_statusbar_get (); pragha_statusbar_add_widget(statusbar, hbox); g_object_unref(G_OBJECT(statusbar)); return scanner; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-scanner.h�������������������������������������������������������������������0000664�0000000�0000000�00000002447�13435240150�0016616�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SCANNER_H #define PRAGHA_SCANNER_H #define PROGRESS_BAR_WIDTH 300 typedef struct _PraghaScanner PraghaScanner; void pragha_scanner_update_library(PraghaScanner *scanner); void pragha_scanner_scan_library(PraghaScanner *scanner); void pragha_scanner_free(PraghaScanner *scanner); PraghaScanner * pragha_scanner_new(); #endif /* PRAGHA_SCANNER_H */�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-search-entry.c��������������������������������������������������������������0000664�0000000�0000000�00000007160�13435240150�0017561�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2009-2013 matias <mati86dl@gmail.com> * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "pragha-search-entry.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include "pragha-utils.h" /* Generic search entry, valid to library tree, and jump dialog. */ static void seach_entry_populate_popup (GtkEntry *entry, PraghaPreferences *preferences) { GtkWidget *popup_menu, *item; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; popup_menu = gtk_menu_new (); /* Instant search. */ item = gtk_check_menu_item_new_with_label (_("Search while typing")); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item); g_object_bind_property (preferences, "instant-search", item, "active", binding_flags); gtk_widget_show (item); /* Aproximate search. */ item = gtk_check_menu_item_new_with_label (_("Search similar words")); gtk_menu_shell_append (GTK_MENU_SHELL (popup_menu), item); g_object_bind_property (preferences, "approximate-searches", item, "active", binding_flags); gtk_widget_show (item); gtk_menu_attach_to_widget(GTK_MENU(popup_menu), GTK_WIDGET(entry), NULL); gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, (GtkMenuPositionFunc) pragha_utils_set_menu_position, entry, 0, gtk_get_current_event_time()); } static void pragha_search_bar_icon_pressed_cb (GtkEntry *entry, gint position, GdkEventButton *event, PraghaPreferences *preferences) { if (position == GTK_ENTRY_ICON_SECONDARY) { gtk_entry_set_text (entry, ""); gtk_widget_grab_focus(GTK_WIDGET(entry)); if (!pragha_preferences_get_instant_search(preferences)) g_signal_emit_by_name(G_OBJECT(entry), "activate"); } else { seach_entry_populate_popup(entry, preferences); } } static void show_clear_icon (GtkEntry *entry) { const gchar *icon_name; if (gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_RTL) icon_name = "edit-clear-rtl-symbolic"; else icon_name = "edit-clear-symbolic"; gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, icon_name); } static void hide_clear_icon (GtkEntry *entry) { gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, NULL); } static void changed_cb (GtkEditable *editable, gpointer user_data) { GtkEntry *entry = GTK_ENTRY (editable); gboolean has_text = gtk_entry_get_text_length (entry) > 0; if (has_text) show_clear_icon (entry); else hide_clear_icon (entry); } GtkWidget * pragha_search_entry_new (PraghaPreferences *preferences) { GtkWidget *search_entry; search_entry = gtk_entry_new (); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(search_entry), GTK_ENTRY_ICON_PRIMARY, "edit-find-symbolic"); g_signal_connect (search_entry, "icon-press", G_CALLBACK (pragha_search_bar_icon_pressed_cb), preferences); g_signal_connect (search_entry, "changed", G_CALLBACK (changed_cb), NULL); return search_entry; } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-search-entry.h��������������������������������������������������������������0000664�0000000�0000000�00000001766�13435240150�0017574�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * Copyright (C) 2009-2013 matias <mati86dl@gmail.com> * Copyright (C) 2013 Pavel Vasin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PRAGHA_SEARCH_ENTRY_H #define PRAGHA_SEARCH_ENTRY_H #include <glib.h> #include <gtk/gtk.h> #include "pragha-preferences.h" G_BEGIN_DECLS GtkWidget * pragha_search_entry_new (PraghaPreferences *preferences); G_END_DECLS #endif /* PRAGHA_SEARCH_ENTRY_H */ ����������pragha-1.3.4/src/pragha-session.c�������������������������������������������������������������������0000664�0000000�0000000�00000006424�13435240150�0016642�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2018 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-session.h" #ifdef HAVE_LIBXFCE4UI #include <libxfce4ui/libxfce4ui.h> #endif #include <gdk/gdkx.h> #include "pragha.h" #if HAVE_LIBXFCE4UI static void pragha_session_quit (XfceSMClient *sm_client, PraghaApplication *pragha) { pragha_application_quit (pragha); } static void pragha_session_save_state (XfceSMClient *sm_client, PraghaApplication *pragha) { /* Nothing here? */ } void pragha_init_session_support(PraghaApplication *pragha) { XfceSMClient *client; GError *error = NULL; if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) { client = xfce_sm_client_get (); xfce_sm_client_set_priority (client, XFCE_SM_CLIENT_PRIORITY_DEFAULT); xfce_sm_client_set_restart_style (client, XFCE_SM_CLIENT_RESTART_NORMAL); xfce_sm_client_set_desktop_file(client, DESKTOPENTRY); g_signal_connect (G_OBJECT (client), "quit", G_CALLBACK (pragha_session_quit), pragha); g_signal_connect (G_OBJECT (client), "save-state", G_CALLBACK (pragha_session_save_state), pragha); if(!xfce_sm_client_connect (client, &error)) { g_warning ("Failed to connect to session manager: %s", error->message); g_error_free (error); // As fallback register DBUS session.. g_warning ("As fallback try to use dbus session manager"); g_object_set (GTK_APPLICATION(pragha), "register-session", TRUE, NULL); } } else { g_object_set (GTK_APPLICATION(pragha), "register-session", TRUE, NULL); } } #else #ifdef G_OS_WIN32 void pragha_init_session_support(PraghaApplication *pragha) { } #else void pragha_init_session_support(PraghaApplication *pragha) { GtkWidget *window; gchar *role; if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) { window = pragha_application_get_window (pragha); /* set a unique role on each window (for session management) */ role = g_strdup_printf ("Pragha-%p-%d-%d", window, (gint) getpid (), (gint) time (NULL)); gtk_window_set_role (GTK_WINDOW (window), role); g_free (role); } g_object_set (GTK_APPLICATION(pragha), "register-session", TRUE, NULL); } #endif #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-session.h�������������������������������������������������������������������0000664�0000000�0000000�00000002567�13435240150�0016653�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SESSION_H #define PRAGHA_SESSION_H #include <glib.h> #include "pragha.h" void pragha_init_session_support(PraghaApplication *pragha); #endif /* PRAGHA_SESSION_H */�����������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-sidebar.c�������������������������������������������������������������������0000664�0000000�0000000�00000022761�13435240150�0016572�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2018 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-sidebar.h" #include "pragha-hig.h" struct _PraghaSidebar { GtkBox __parent__; GtkWidget *container; GtkWidget *header; GtkWidget *menu_button; GtkWidget *close_button; GtkWidget *title_box; GtkMenu *popup_menu; }; G_DEFINE_TYPE(PraghaSidebar, pragha_sidebar, GTK_TYPE_BOX) enum { SIGNAL_CHILDREN_CHANGED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; /* * Public Api. */ void pragha_sidebar_attach_plugin (PraghaSidebar *sidebar, GtkWidget *widget, GtkWidget *title, GtkMenu *popup_menu) { if (!widget || !title) return; gtk_notebook_insert_page (GTK_NOTEBOOK(sidebar->container), widget, NULL, 0); gtk_container_add (GTK_CONTAINER(sidebar->title_box), title); if (popup_menu) { gtk_menu_attach_to_widget(GTK_MENU(popup_menu), title, NULL); sidebar->popup_menu = popup_menu; } gtk_widget_show_all (title); g_signal_emit (sidebar, signals[SIGNAL_CHILDREN_CHANGED], 0); } void pragha_sidebar_remove_plugin (PraghaSidebar *sidebar, GtkWidget *widget) { GList *list; GtkWidget *children; gint page; page = gtk_notebook_page_num (GTK_NOTEBOOK(sidebar->container), widget); if (page >= 0) { gtk_notebook_remove_page (GTK_NOTEBOOK(sidebar->container), page); gtk_menu_detach (sidebar->popup_menu); list = gtk_container_get_children (GTK_CONTAINER(sidebar->title_box)); if (list) { children = list->data; gtk_container_remove(GTK_CONTAINER(sidebar->title_box), children); g_list_free(list); } } g_signal_emit (sidebar, signals[SIGNAL_CHILDREN_CHANGED], 0); } gint pragha_sidebar_get_n_panes (PraghaSidebar *sidebar) { return gtk_notebook_get_n_pages (GTK_NOTEBOOK(sidebar->container)); } void pragha_sidebar_style_position (PraghaSidebar *sidebar, GtkPositionType position) { GtkWidget *parent; parent = gtk_widget_get_parent (GTK_WIDGET(sidebar->close_button)); gtk_box_reorder_child (GTK_BOX(parent), GTK_WIDGET(sidebar->close_button), (position == GTK_POS_RIGHT) ? 0 : 1); } /* * Internal Calbacks. */ static void pragha_sidebar_menu_position (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { GtkWidget *widget; GtkAllocation allocation; GtkRequisition requisition; gint menu_xpos, menu_ypos; widget = GTK_WIDGET (user_data); gtk_widget_get_preferred_size (GTK_WIDGET(menu), &requisition, NULL); gdk_window_get_origin (gtk_widget_get_window(widget), &menu_xpos, &menu_ypos); gtk_widget_get_allocation(widget, &allocation); menu_xpos += allocation.x; menu_ypos += allocation.y; if (menu_ypos > gdk_screen_get_height (gtk_widget_get_screen (widget)) / 2) menu_ypos -= requisition.height; else menu_ypos += allocation.height; *x = menu_xpos; *y = menu_ypos - 5; *push_in = TRUE; } static void pragha_sidebar_close_button_cb (GtkWidget *widget, PraghaSidebar *sidebar) { gtk_widget_hide (GTK_WIDGET(sidebar)); } static gboolean pragha_sidebar_right_click_cb(GtkWidget *widget, GdkEventButton *event, PraghaSidebar *sidebar) { gboolean ret = FALSE; if(!sidebar->popup_menu) return FALSE; if(!gtk_widget_get_sensitive(gtk_notebook_get_nth_page (GTK_NOTEBOOK(sidebar->container), 0))) return FALSE; switch(event->button) { case 3: gtk_menu_popup(GTK_MENU(sidebar->popup_menu), NULL, NULL, NULL, NULL, event->button, event->time); ret = TRUE; break; case 1: if (widget == sidebar->menu_button) { gtk_menu_popup(GTK_MENU(sidebar->popup_menu), NULL, NULL, (GtkMenuPositionFunc) pragha_sidebar_menu_position, widget, 0, gtk_get_current_event_time()); ret = TRUE; } break; default: break; } return ret; } /** * Construction: **/ static GtkWidget * praga_sidebar_menu_button_new (PraghaSidebar *sidebar) { GtkWidget *button, *hbox, *arrow; hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); button = gtk_button_new(); gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE); #if GTK_CHECK_VERSION (3, 14, 0) arrow = gtk_image_new_from_icon_name("pan-down-symbolic", GTK_ICON_SIZE_MENU); #else arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE); #endif gtk_box_pack_start (GTK_BOX(hbox), sidebar->title_box, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox), arrow, FALSE, FALSE, 0); gtk_widget_set_valign (GTK_WIDGET(sidebar->title_box), GTK_ALIGN_CENTER); gtk_container_add (GTK_CONTAINER(button), hbox); g_signal_connect(G_OBJECT(button), "button-press-event", G_CALLBACK(pragha_sidebar_right_click_cb), sidebar); return button; } GtkWidget * pragha_sidebar_close_button_new(PraghaSidebar *sidebar) { GtkWidget *button; GIcon *icon = NULL; const gchar *fallback_icons[] = { "view-left-close", "tab-close", "window-close", NULL, }; button = gtk_button_new (); gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE); pragha_hig_set_tiny_button (button); gtk_widget_set_valign (button, GTK_ALIGN_CENTER); icon = g_themed_icon_new_from_names ((gchar **)fallback_icons, -1); gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_gicon(icon, GTK_ICON_SIZE_MENU)); g_object_unref (icon); g_signal_connect(G_OBJECT (button), "clicked", G_CALLBACK(pragha_sidebar_close_button_cb), sidebar); return button; } GtkWidget * pragha_sidebar_header_new(PraghaSidebar *sidebar) { GtkWidget *hbox; hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(hbox), sidebar->menu_button, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), sidebar->close_button, FALSE, FALSE, 0); return hbox; } GtkWidget * pragha_sidebar_container_new(PraghaSidebar *sidebar) { GtkWidget *notebook; notebook = gtk_notebook_new(); gtk_notebook_set_show_tabs (GTK_NOTEBOOK(notebook), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK(notebook), FALSE); gtk_notebook_popup_disable(GTK_NOTEBOOK(notebook)); return notebook; } static void pragha_sidebar_finalize (GObject *object) { //PraghaSidebar *sidebar = PRAGHA_SIDEBAR (object); (*G_OBJECT_CLASS (pragha_sidebar_parent_class)->finalize) (object); } static void pragha_sidebar_init (PraghaSidebar *sidebar) { gtk_orientable_set_orientation (GTK_ORIENTABLE (sidebar), GTK_ORIENTATION_VERTICAL); gtk_box_set_spacing (GTK_BOX(sidebar), 2); sidebar->title_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); sidebar->menu_button = praga_sidebar_menu_button_new (sidebar); sidebar->close_button = pragha_sidebar_close_button_new (sidebar); sidebar->header = pragha_sidebar_header_new (sidebar); sidebar->container = pragha_sidebar_container_new (sidebar); sidebar->popup_menu = NULL; gtk_box_pack_start (GTK_BOX(sidebar), sidebar->header, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(sidebar), sidebar->container, TRUE, TRUE, 0); gtk_widget_show_all (GTK_WIDGET(sidebar->header)); gtk_widget_show_all (GTK_WIDGET(sidebar->container)); } static void pragha_sidebar_class_init (PraghaSidebarClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = pragha_sidebar_finalize; signals[SIGNAL_CHILDREN_CHANGED] = g_signal_new ("children-changed", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaSidebarClass, children_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } PraghaSidebar * pragha_sidebar_new (void) { return g_object_new (PRAGHA_TYPE_SIDEBAR, NULL); } ���������������pragha-1.3.4/src/pragha-sidebar.h�������������������������������������������������������������������0000664�0000000�0000000�00000005150�13435240150�0016570�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SIDEBAR_H #define PRAGHA_SIDEBAR_H #include <gtk/gtk.h> #define PRAGHA_TYPE_SIDEBAR (pragha_sidebar_get_type ()) #define PRAGHA_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SIDEBAR, PraghaSidebar)) #define PRAGHA_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_SIDEBAR)) #define PRAGHA_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_SIDEBAR, PraghaSidebarClass)) #define PRAGHA_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_SIDEBAR)) #define PRAGHA_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_SIDEBAR, PraghaSidebarClass)) typedef struct _PraghaSidebar PraghaSidebar; typedef struct { GtkScrolledWindowClass __parent__; void (*children_changed) (PraghaSidebar *sidebar); } PraghaSidebarClass; void pragha_sidebar_attach_plugin (PraghaSidebar *sidebar, GtkWidget *widget, GtkWidget *title, GtkMenu *popup_menu); void pragha_sidebar_remove_plugin (PraghaSidebar *sidebar, GtkWidget *widget); gint pragha_sidebar_get_n_panes (PraghaSidebar *sidebar); void pragha_sidebar_style_position (PraghaSidebar *sidebar, GtkPositionType position); PraghaSidebar *pragha_sidebar_new (void); #endif /* PRAGHA_SIDEBAR_H */������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-simple-async.c��������������������������������������������������������������0000664�0000000�0000000�00000006106�13435240150�0017560�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-simple-async.h" #include "pragha-statusbar.h" struct _AsyncSimple { gpointer userdata; gpointer finished_data; GThreadFunc func_w; GSourceFunc func_f; }; /* Generic function to set a message when finished the async operation. * You need set 'pragha_async_set_idle_message' as finish_func * and then return a 'const gchar *' on worker_func. */ gboolean pragha_async_set_idle_message (gpointer user_data) { PraghaStatusbar *statusbar; const gchar *message = user_data; if (message == NULL) return FALSE; statusbar = pragha_statusbar_get (); pragha_statusbar_set_misc_text(statusbar, message); g_object_unref(G_OBJECT(statusbar)); return FALSE; } /* Launch a asynchronous operation (worker_func), and when finished use another * function (finish_func) in the main loop using the information returned by * the asynchronous operation. */ static gboolean pragha_async_finished(gpointer data) { AsyncSimple *as = data; as->func_f(as->finished_data); g_slice_free(AsyncSimple, as); return FALSE; } static gpointer pragha_async_worker(gpointer data) { AsyncSimple *as = data; as->finished_data = as->func_w(as->userdata); g_idle_add_full(G_PRIORITY_HIGH_IDLE, pragha_async_finished, as, NULL); return NULL; } void pragha_async_launch (GThreadFunc worker_func, GSourceFunc finish_func, gpointer user_data) { AsyncSimple *as; as = g_slice_new0(AsyncSimple); as->func_w = worker_func; as->func_f = finish_func; as->userdata = user_data; as->finished_data = NULL; g_thread_unref(g_thread_new("Launch async", pragha_async_worker, as)); } GThread * pragha_async_launch_full (GThreadFunc worker_func, GSourceFunc finish_func, gpointer userdata) { AsyncSimple *as; as = g_slice_new0(AsyncSimple); as->func_w = worker_func; as->func_f = finish_func; as->userdata = userdata; as->finished_data = NULL; return g_thread_new("Launch async", pragha_async_worker, as); } ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-simple-async.h��������������������������������������������������������������0000664�0000000�0000000�00000003171�13435240150�0017564�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2012-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SIMPLE_ASYNC_H #define PRAGHA_SIMPLE_ASYNC_H #include <glib.h> typedef struct _AsyncSimple AsyncSimple; gboolean pragha_async_set_idle_message (gpointer user_data); void pragha_async_launch (GThreadFunc worker_func, GSourceFunc finish_func, gpointer userdata); GThread *pragha_async_launch_full (GThreadFunc worker_func, GSourceFunc finish_func, gpointer userdata); #endif /* PRAGHA_SIMPLE_ASYNC_H */�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-simple-widgets.c������������������������������������������������������������0000664�0000000�0000000�00000045343�13435240150�0020117�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2018 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-simple-widgets.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif /* * PraghaHeader: */ #define PRAGHA_TYPE_HEADER (pragha_header_get_type()) #define PRAGHA_HEADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_HEADER, PraghaHeader)) #define PRAGHA_HEADER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_HEADER, PraghaHeader const)) #define PRAGHA_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_HEADER, PraghaHeaderClass)) #define PRAGHA_IS_HEADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_HEADER)) #define PRAGHA_IS_HEADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_HEADER)) #define PRAGHA_HEADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_HEADER, PraghaHeaderClass)) typedef struct _PraghaHeaderClass PraghaHeaderClass; struct _PraghaHeaderClass { GtkBoxClass parent_class; }; struct _PraghaHeader { GtkBox _parent; GtkWidget *image; GtkWidget *vbox; GtkWidget *title; GtkWidget *subtitle; }; G_DEFINE_TYPE(PraghaHeader, pragha_header, GTK_TYPE_BOX) void pragha_header_set_icon_name (PraghaHeader *header, const gchar *icon_name) { GdkPixbuf *icon; gint width = 1, height = 1; gtk_icon_size_lookup (GTK_ICON_SIZE_DIALOG, &width, &height); icon = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), icon_name ? icon_name : "dialog-information", width, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); gtk_image_set_from_pixbuf (GTK_IMAGE(header->image), icon); g_object_unref (icon); } void pragha_header_set_title (PraghaHeader *header, const gchar *title) { gchar *markup = NULL; markup = g_markup_printf_escaped("<span size='large' weight='bold'>%s</span>", title); gtk_label_set_markup(GTK_LABEL(header->title), markup); g_free(markup); } void pragha_header_set_subtitle (PraghaHeader *header, const gchar *subtitle) { GtkWidget *subtitlew = NULL; gchar *markup = NULL; if (!header->subtitle) { subtitlew = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL(subtitlew), TRUE); gtk_widget_set_halign (subtitlew, GTK_ALIGN_START); g_object_set (subtitlew, "xalign", 0.0, NULL); gtk_box_pack_start(GTK_BOX(header->vbox), subtitlew, FALSE, FALSE, 0); gtk_widget_show (GTK_WIDGET(subtitlew)); header->subtitle = subtitlew; } markup = g_markup_printf_escaped ("<span size='large'>%s</span>", subtitle); gtk_label_set_markup (GTK_LABEL(header->subtitle), markup); g_free(markup); } static void pragha_header_class_init (PraghaHeaderClass *class) { } static void pragha_header_init (PraghaHeader *header) { GtkWidget *hbox, *vbox; GtkWidget *title; GtkWidget *separator; hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); gtk_container_set_border_width(GTK_CONTAINER(hbox), 6); header->image = gtk_image_new (); title = gtk_label_new (NULL); gtk_label_set_line_wrap(GTK_LABEL(title), TRUE); gtk_widget_set_halign (title, GTK_ALIGN_START); g_object_set (title, "xalign", 0.0, NULL); header->title = title; vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER); header->vbox = vbox; gtk_box_pack_start(GTK_BOX(vbox), title, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), header->image, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0); separator = gtk_separator_new (GTK_ORIENTATION_VERTICAL); gtk_orientable_set_orientation (GTK_ORIENTABLE (header), GTK_ORIENTATION_VERTICAL); gtk_box_pack_start (GTK_BOX(header), hbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(header), separator, FALSE, FALSE, 0); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(header)), "view"); gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET(header)), "XfceHeading"); } PraghaHeader * pragha_header_new (void) { return g_object_new (PRAGHA_TYPE_HEADER, NULL); } /* * PraghaTrackProgress: An extension of GtkProgressBar reducing their default size */ #define PRAGHA_TYPE_TRACK_PROGRESS (pragha_track_progress_get_type()) #define PRAGHA_TRACK_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TRACK_PROGRESS, PraghaTrackProgress)) #define PRAGHA_TRACK_PROGRESS_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TRACK_PROGRESS, PraghaTrackProgress const)) #define PRAGHA_TRACK_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TRACK_PROGRESS, PraghaTrackProgressClass)) #define PRAGHA_IS_TRACK_PROGRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TRACK_PROGRESS)) #define PRAGHA_IS_TRACK_PROGRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TRACK_PROGRESS)) #define PRAGHA_TRACK_PROGRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TRACK_PROGRESS, PraghaTrackProgressClass)) typedef struct _PraghaTrackProgressClass PraghaTrackProgressClass; struct _PraghaTrackProgressClass { GtkProgressBarClass parent_class; }; struct _PraghaTrackProgress { GtkProgressBar _parent; }; G_DEFINE_TYPE(PraghaTrackProgress, pragha_track_progress, GTK_TYPE_PROGRESS_BAR) static void pragha_track_progress_get_preferred_height (GtkWidget *widget, gint *minimum, gint *natural) { if (minimum) *minimum = 14; if (natural) *natural = 14; } static void pragha_track_progress_class_init (PraghaTrackProgressClass *class) { GtkWidgetClass *widget_class; widget_class = GTK_WIDGET_CLASS (class); widget_class->get_preferred_height = pragha_track_progress_get_preferred_height; } static void pragha_track_progress_init (PraghaTrackProgress *progress) { } PraghaTrackProgress * pragha_track_progress_new (void) { return g_object_new (PRAGHA_TYPE_TRACK_PROGRESS, NULL); } /* * PraghaContainer: An extension of GtkContainer to expand their default size. */ #define PRAGHA_TYPE_CONTAINER (pragha_container_get_type()) #define PRAGHA_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_CONTAINER, PraghaContainer)) #define PRAGHA_CONTAINER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_CONTAINER, PraghaContainer const)) #define PRAGHA_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_CONTAINER, PraghaContainerClass)) #define PRAGHA_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_CONTAINER)) #define PRAGHA_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_CONTAINER)) #define PRAGHA_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_CONTAINER, PraghaContainerClass)) typedef struct _PraghaContainerClass PraghaContainerClass; struct _PraghaContainerClass { GtkBoxClass parent_class; }; struct _PraghaContainer { GtkBox _parent; }; G_DEFINE_TYPE(PraghaContainer, pragha_container, GTK_TYPE_BOX) static void pragha_container_get_preferred_width (GtkWidget *widget, gint *minimum, gint *natural) { if (minimum) *minimum = 140; if (natural) *natural = 1600; } static void pragha_container_class_init (PraghaContainerClass *class) { GtkWidgetClass *widget_class; widget_class = GTK_WIDGET_CLASS (class); widget_class->get_preferred_width = pragha_container_get_preferred_width; } static void pragha_container_init (PraghaContainer *widget) { gtk_orientable_set_orientation (GTK_ORIENTABLE (widget), GTK_ORIENTATION_HORIZONTAL); } PraghaContainer * pragha_container_new (void) { return g_object_new (PRAGHA_TYPE_CONTAINER, NULL); } /* * PraghaToolbarButton */ #define PRAGHA_TYPE_TOOLBAR_BUTTON (pragha_toolbar_button_get_type()) #define PRAGHA_TOOLBAR_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TOOLBAR_BUTTON, PraghaToolbarButton)) #define PRAGHA_TOOLBAR_BUTTON_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TOOLBAR_BUTTON, PraghaToolbarButton const)) #define PRAGHA_TOOLBAR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TOOLBAR_BUTTON, PraghaToolbarButtonClass)) #define PRAGHA_IS_TOOLBAR_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TOOLBAR_BUTTON)) #define PRAGHA_IS_TOOLBAR_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TOOLBAR_BUTTON)) #define PRAGHA_TOOLBAR_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TOOLBAR_BUTTON, PraghaToolbarButtonClass)) typedef struct _PraghaToolbarButtonClass PraghaToolbarButtonClass; struct _PraghaToolbarButtonClass { GtkButtonClass parent_class; }; struct _PraghaToolbarButton { GtkButton __parent; gchar *icon_name; GtkIconSize icon_size; }; enum { PROP_0, PROP_ICON_NAME, PROP_ICON_SIZE }; G_DEFINE_TYPE(PraghaToolbarButton, pragha_toolbar_button, GTK_TYPE_BUTTON) static void pragha_toolbar_button_update_icon (PraghaToolbarButton *button) { gtk_button_set_image (GTK_BUTTON(button), gtk_image_new_from_icon_name (button->icon_name, button->icon_size)); } void pragha_toolbar_button_set_icon_name (PraghaToolbarButton *button, const gchar *icon_name) { if (g_strcmp0(button->icon_name, icon_name)) { if (button->icon_name) g_free (button->icon_name); button->icon_name = g_strdup (icon_name); pragha_toolbar_button_update_icon (button); } } void pragha_toolbar_button_set_icon_size (PraghaToolbarButton *button, GtkIconSize icon_size) { if (button->icon_size != icon_size) { button->icon_size = icon_size; pragha_toolbar_button_update_icon (button); } } static void pragha_toolbar_button_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PraghaToolbarButton *button = PRAGHA_TOOLBAR_BUTTON (object); switch (prop_id) { case PROP_ICON_NAME: pragha_toolbar_button_set_icon_name (button, g_value_get_string (value)); break; case PROP_ICON_SIZE: pragha_toolbar_button_set_icon_size (button, g_value_get_enum (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void pragha_toolbar_button_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { PraghaToolbarButton *button = PRAGHA_TOOLBAR_BUTTON (object); switch (prop_id) { case PROP_ICON_NAME: g_value_set_string (value, button->icon_name); break; case PROP_ICON_SIZE: g_value_set_enum (value, button->icon_size); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void pragha_toolbar_button_class_init (PraghaToolbarButtonClass *class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); gobject_class->set_property = pragha_toolbar_button_set_property; gobject_class->get_property = pragha_toolbar_button_get_property; g_object_class_install_property (gobject_class, PROP_ICON_NAME, g_param_spec_string ("icon-name", "Icon Name", "The name of the icon from the icon theme", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_ICON_SIZE, g_param_spec_enum ("icon-size", "Icon size", "The icon size", GTK_TYPE_ICON_SIZE, GTK_ICON_SIZE_SMALL_TOOLBAR, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); } static void pragha_toolbar_button_init (PraghaToolbarButton *widget) { gtk_button_set_relief (GTK_BUTTON(widget), GTK_RELIEF_NONE); gtk_widget_show_all (GTK_WIDGET(widget)); } PraghaToolbarButton * pragha_toolbar_button_new (const gchar *icon_name) { PraghaToolbarButton *button; GtkWidget *image; image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR); button = g_object_new (PRAGHA_TYPE_TOOLBAR_BUTTON, "image", image, "icon-name", icon_name, "icon-size", GTK_ICON_SIZE_LARGE_TOOLBAR, "valign", GTK_ALIGN_CENTER, NULL); return button; } /* * PraghaTogleButton */ #define PRAGHA_TYPE_TOGGLE_BUTTON (pragha_toggle_button_get_type()) #define PRAGHA_TOGGLE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TOGGLE_BUTTON, PraghaToggleButton)) #define PRAGHA_TOGGLE_BUTTON_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TOGGLE_BUTTON, PraghaToggleButton const)) #define PRAGHA_TOGGLE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TOGGLE_BUTTON, PraghaToggleButtonClass)) #define PRAGHA_IS_TOGGLE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TOGGLE_BUTTON)) #define PRAGHA_IS_TOGGLE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TOGGLE_BUTTON)) #define PRAGHA_TOGGLE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TOGGLE_BUTTON, PraghaToggleButtonClass)) typedef struct _PraghaToggleButtonClass PraghaToggleButtonClass; struct _PraghaToggleButtonClass { GtkToggleButtonClass parent_class; }; struct _PraghaToggleButton { GtkToggleButton __parent; gchar *icon_name; GtkIconSize icon_size; }; G_DEFINE_TYPE(PraghaToggleButton, pragha_toggle_button, GTK_TYPE_TOGGLE_BUTTON) static void pragha_toggle_button_update_icon (PraghaToggleButton *button) { gtk_button_set_image (GTK_BUTTON(button), gtk_image_new_from_icon_name (button->icon_name, button->icon_size)); } void pragha_toggle_button_set_icon_name (PraghaToggleButton *button, const gchar *icon_name) { if (g_strcmp0(button->icon_name, icon_name)) { if (button->icon_name) g_free (button->icon_name); button->icon_name = g_strdup (icon_name); pragha_toggle_button_update_icon (button); } } void pragha_toggle_button_set_icon_size (PraghaToggleButton *button, GtkIconSize icon_size) { if (button->icon_size != icon_size) { button->icon_size = icon_size; pragha_toggle_button_update_icon (button); } } static void pragha_toggle_button_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { PraghaToggleButton *button = PRAGHA_TOGGLE_BUTTON (object); switch (prop_id) { case PROP_ICON_NAME: pragha_toggle_button_set_icon_name (button, g_value_get_string (value)); break; case PROP_ICON_SIZE: pragha_toggle_button_set_icon_size (button, g_value_get_enum (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void pragha_toggle_button_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { PraghaToggleButton *button = PRAGHA_TOGGLE_BUTTON (object); switch (prop_id) { case PROP_ICON_NAME: g_value_set_string (value, button->icon_name); break; case PROP_ICON_SIZE: g_value_set_enum (value, button->icon_size); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void pragha_toggle_button_class_init (PraghaToggleButtonClass *class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); gobject_class->set_property = pragha_toggle_button_set_property; gobject_class->get_property = pragha_toggle_button_get_property; g_object_class_install_property (gobject_class, PROP_ICON_NAME, g_param_spec_string ("icon-name", "Icon Name", "The name of the icon from the icon theme", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (gobject_class, PROP_ICON_SIZE, g_param_spec_enum ("icon-size", "Icon size", "The icon size", GTK_TYPE_ICON_SIZE, GTK_ICON_SIZE_SMALL_TOOLBAR, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); } static void pragha_toggle_button_init (PraghaToggleButton *widget) { gtk_button_set_relief (GTK_BUTTON(widget), GTK_RELIEF_NONE); gtk_widget_show_all (GTK_WIDGET(widget)); } PraghaToggleButton * pragha_toggle_button_new (const gchar *icon_name) { PraghaToggleButton *button; GtkWidget *image; image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR); button = g_object_new (PRAGHA_TYPE_TOGGLE_BUTTON, "image", image, "icon-name", icon_name, "icon-size", GTK_ICON_SIZE_LARGE_TOOLBAR, "valign", GTK_ALIGN_CENTER, NULL); return button; } ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-simple-widgets.h������������������������������������������������������������0000664�0000000�0000000�00000005121�13435240150�0020112�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2009-2018 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_SIMPLE_WIDGETS_H #define PRAGHA_SIMPLE_WIDGETS_H #include <gtk/gtk.h> G_BEGIN_DECLS typedef struct _PraghaHeader PraghaHeader; typedef struct _PraghaTrackProgress PraghaTrackProgress; typedef struct _PraghaContainer PraghaContainer; typedef struct _PraghaToolbarButton PraghaToolbarButton; typedef struct _PraghaToggleButton PraghaToggleButton; PraghaHeader *pragha_header_new (void); void pragha_header_set_icon_name (PraghaHeader *header, const gchar *icon_name); void pragha_header_set_title (PraghaHeader *header, const gchar *title); void pragha_header_set_subtitle (PraghaHeader *header, const gchar *subtitle); PraghaTrackProgress *pragha_track_progress_new (void); PraghaContainer *pragha_container_new (void); void pragha_toolbar_button_set_icon_name (PraghaToolbarButton *button, const gchar *icon_name); void pragha_toolbar_button_set_icon_size (PraghaToolbarButton *button, GtkIconSize icon_size); PraghaToolbarButton *pragha_toolbar_button_new (const gchar *icon_name); void pragha_toggle_button_set_icon_name (PraghaToggleButton *button, const gchar *icon_name); void pragha_toggle_button_set_icon_size (PraghaToggleButton *button, GtkIconSize icon_size); PraghaToggleButton *pragha_toggle_button_new (const gchar *icon_name); G_END_DECLS #endif /* PRAGHA_SIMPLE_WIDGETS_H */ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-statusbar.c�����������������������������������������������������������������0000664�0000000�0000000�00000011426�13435240150�0017165�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-statusbar.h" #include "pragha-preferences.h" struct _PraghaStatusbarClass { GtkStatusbarClass __parent__; }; struct _PraghaStatusbar { GtkStatusbar __parent__; guint main_context_id; guint misc_context_id; }; G_DEFINE_TYPE (PraghaStatusbar, pragha_statusbar, GTK_TYPE_STATUSBAR) static void pragha_statusbar_class_init (PraghaStatusbarClass *klass) { } static void pragha_statusbar_init (PraghaStatusbar *statusbar) { PraghaPreferences *preferences; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; g_object_set (G_OBJECT(statusbar), "margin", 0, NULL); statusbar->main_context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Main text"); statusbar->misc_context_id = gtk_statusbar_get_context_id (GTK_STATUSBAR (statusbar), "Misc info text"); preferences = pragha_preferences_get(); g_object_bind_property (preferences, "show-status-bar", GTK_WIDGET(statusbar), "visible", binding_flags); g_object_unref (G_OBJECT(preferences)); } /** * pragha_statusbar_set_main_text: * @statusbar : a #PraghaStatusbar instance. * @text : the main text to be displayed in @statusbar. * * Sets up a new main text for @statusbar. **/ void pragha_statusbar_set_main_text (PraghaStatusbar *statusbar, const gchar *text) { g_return_if_fail (PRAGHA_IS_STATUSBAR (statusbar)); g_return_if_fail (text != NULL); gtk_statusbar_pop (GTK_STATUSBAR (statusbar), statusbar->main_context_id); gtk_statusbar_push (GTK_STATUSBAR (statusbar), statusbar->main_context_id, text); } /** * pragha_statusbar_clean_misc_text: * @statusbar : a #PraghaStatusbar instance. * * Clean the last misc text for @statusbar. **/ static void pragha_statusbar_clean_misc_text(PraghaStatusbar *statusbar) { gtk_statusbar_pop (GTK_STATUSBAR (statusbar), statusbar->misc_context_id); } gboolean pragha_statusbar_clean_misc_text_idle(gpointer data) { PraghaStatusbar *statusbar = data; pragha_statusbar_clean_misc_text(statusbar); return FALSE; } /** * pragha_statusbar_set_misc_text: * @statusbar : a #PraghaStatusbar instance. * @text : the misc text to be displayed in @statusbar. * * Sets up a new misc text for @statusbar. **/ void pragha_statusbar_set_misc_text (PraghaStatusbar *statusbar, const gchar *text) { g_return_if_fail (PRAGHA_IS_STATUSBAR (statusbar)); g_return_if_fail (text != NULL); pragha_statusbar_clean_misc_text(statusbar); gtk_statusbar_push (GTK_STATUSBAR (statusbar), statusbar->misc_context_id, text); g_timeout_add_seconds(5, pragha_statusbar_clean_misc_text_idle, statusbar); } /** * pragha_statusbar_add_widget: * @statusbar : a #PraghaStatusbar instance. * @wdget : the widget to append in @statusbar. * * Sets up a new misc text for @statusbar. **/ void pragha_statusbar_add_widget(PraghaStatusbar *statusbar, GtkWidget *widget) { GtkWidget *hbox; g_return_if_fail (PRAGHA_IS_STATUSBAR (statusbar)); g_return_if_fail (widget != NULL); hbox = gtk_statusbar_get_message_area(GTK_STATUSBAR (statusbar)); gtk_box_pack_end (GTK_BOX (hbox), widget, FALSE, FALSE, 0); } /** * pragha_statusbar_get: * * Queries the global #GtkStatusbar instance, which is shared * by all modules. The function automatically takes a reference * for the caller, so you'll need to call g_object_unref() when * you're done with it. * * Return value: the global #GtkStatusbar instance. **/ PraghaStatusbar * pragha_statusbar_get (void) { static PraghaStatusbar *statusbar = NULL; if (G_UNLIKELY (statusbar == NULL)) { statusbar = g_object_new(PRAGHA_TYPE_STATUSBAR, NULL); g_object_add_weak_pointer(G_OBJECT (statusbar), (gpointer) &statusbar); } else { g_object_ref (G_OBJECT(statusbar)); } return statusbar; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-statusbar.h�����������������������������������������������������������������0000664�0000000�0000000�00000004422�13435240150�0017170�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef __PRAGHA_STATUSBAR_H__ #define __PRAGHA_STATUSBAR_H__ #include <gtk/gtk.h> G_BEGIN_DECLS; typedef struct _PraghaStatusbarClass PraghaStatusbarClass; typedef struct _PraghaStatusbar PraghaStatusbar; #define PRAGHA_TYPE_STATUSBAR (pragha_statusbar_get_type ()) #define PRAGHA_STATUSBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_STATUSBAR, PraghaStatusbar)) #define PRAGHA_STATUSBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_STATUSBAR, PraghaStatusbarClass)) #define PRAGHA_IS_STATUSBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_STATUSBAR)) #define PRAGHA_IS_STATUSBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_STATUSBAR)) #define PRAGHA_STATUSBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_STATUSBAR, PraghaStatusbarClass)) void pragha_statusbar_set_main_text (PraghaStatusbar *statusbar, const gchar *text); void pragha_statusbar_set_misc_text (PraghaStatusbar *statusbar, const gchar *text); void pragha_statusbar_add_widget(PraghaStatusbar *statusbar, GtkWidget *widget); GType pragha_statusbar_get_type (void) G_GNUC_CONST; PraghaStatusbar * pragha_statusbar_get (void); G_END_DECLS; #endif /* !__PRAGHA_STATUSBAR_H__ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-statusicon.c����������������������������������������������������������������0000664�0000000�0000000�00000032032�13435240150�0017345�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-statusicon.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include "pragha-playback.h" #include "pragha-menubar.h" #include "pragha-window.h" #include "pragha.h" struct _PraghaStatusIcon { GtkStatusIcon __parent__; PraghaApplication *pragha; GtkUIManager *ui_manager; }; G_DEFINE_TYPE(PraghaStatusIcon, pragha_status_icon, GTK_TYPE_STATUS_ICON) static void systray_about_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_open_file_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_add_location_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_play_pause_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_stop_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_prev_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_next_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_edit_action (GtkAction *action, PraghaStatusIcon *status_icon); static void systray_quit (GtkAction *action, PraghaStatusIcon *status_icon); static const gchar *systray_menu_xml = "<ui> \ <popup> \ <menuitem action=\"About\"/> \ <separator/> \ <menuitem action=\"Add files\"/> \ <menuitem action=\"Add location\"/> \ <placeholder name=\"pragha-append-music-placeholder\"/> \ <separator/> \ <menuitem action=\"Prev\"/> \ <menuitem action=\"Play_Pause\"/> \ <menuitem action=\"Stop\"/> \ <menuitem action=\"Next\"/> \ <separator/> \ <menuitem action=\"Edit tags\"/> \ <separator/> \ <menuitem action=\"Quit\"/> \ </popup> \ </ui>"; static const GtkActionEntry systray_menu_aentries[] = { {"About", "help-about", N_("About"), "", NULL, G_CALLBACK(systray_about_action)}, {"Add files", "document-open", N_("_Add files"), "", NULL, G_CALLBACK(systray_open_file_action)}, {"Add location", "network-workgroup", N_("Add _location"), "", "Add a no local stream", G_CALLBACK(systray_add_location_action)}, {"Prev", "media-skip-backward", N_("Previous track"), "", "Previous track", G_CALLBACK(systray_prev_action)}, {"Play_Pause", "media-playback-start", N_("Play / Pause"), "", "Play / Pause", G_CALLBACK(systray_play_pause_action)}, {"Stop", "media-playback-stop", N_("Stop"), "", "Stop", G_CALLBACK(systray_stop_action)}, {"Next", "media-skip-forward", N_("Next track"), "", "Next track", G_CALLBACK(systray_next_action)}, {"Edit tags", NULL, N_("Edit track information"), "", "Edit information of current track", G_CALLBACK(systray_edit_action)}, {"Quit", "application-exit", N_("_Quit"), "", "Quit", G_CALLBACK(systray_quit)} }; gint pragha_systray_append_plugin_action (PraghaStatusIcon *status_icon, GtkActionGroup *action_group, const gchar *menu_xml) { GError *error = NULL; gint merge_id; gtk_ui_manager_insert_action_group (status_icon->ui_manager, action_group, -1); merge_id = gtk_ui_manager_add_ui_from_string (status_icon->ui_manager, menu_xml, -1, &error); if (error) { g_warning ("Adding plugin to menubar: %s", error->message); g_error_free (error); } return merge_id; } void pragha_systray_remove_plugin_action (PraghaStatusIcon *status_icon, GtkActionGroup *action_group, gint merge_id) { gtk_ui_manager_remove_ui (status_icon->ui_manager, merge_id); gtk_ui_manager_remove_action_group (status_icon->ui_manager, action_group); g_object_unref (action_group); } /* * Status Icon */ static gboolean status_icon_clicked (GtkWidget *widget, GdkEventButton *event, PraghaStatusIcon *status_icon) { GtkWidget *popup_menu; switch (event->button) { case 1: pragha_window_toggle_state (status_icon->pragha, FALSE); break; case 2: pragha_playback_play_pause_resume (status_icon->pragha); break; case 3: popup_menu = gtk_ui_manager_get_widget(status_icon->ui_manager, "/popup"); gtk_menu_popup (GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, event->button, gtk_get_current_event_time ()); default: break; } return TRUE; } static gboolean status_get_tooltip_cb (GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, PraghaStatusIcon *status_icon) { PraghaBackend *backend; PraghaToolbar *toolbar; PraghaMusicobject *mobj; gchar *markup_text; toolbar = pragha_application_get_toolbar (status_icon->pragha); backend = pragha_application_get_backend (status_icon->pragha); if (pragha_backend_get_state (backend) == ST_STOPPED) markup_text = g_strdup_printf("%s", _("<b>Not playing</b>")); else { mobj = pragha_backend_get_musicobject (backend); markup_text = g_markup_printf_escaped ("<b>%s</b>: %s\n<b>%s</b>: %s\n<b>%s</b>: %s\n<b>%s</b>: %s / %s", _("Title"), pragha_musicobject_get_title (mobj), _("Artist"), pragha_musicobject_get_artist (mobj), _("Album"), pragha_musicobject_get_album (mobj), _("Length"), pragha_toolbar_get_progress_text (toolbar), pragha_toolbar_get_length_text (toolbar)); } gtk_tooltip_set_markup (tooltip, markup_text); gtk_tooltip_set_icon (tooltip, pragha_album_art_get_pixbuf(pragha_toolbar_get_album_art(toolbar))); g_free(markup_text); return TRUE; } static void systray_volume_scroll (GtkWidget *widget, GdkEventScroll *event, PraghaStatusIcon *status_icon) { PraghaBackend *backend; if (event->type != GDK_SCROLL) return; backend = pragha_application_get_backend (status_icon->pragha); switch (event->direction){ case GDK_SCROLL_UP: pragha_backend_set_delta_volume (backend, +0.02); break; case GDK_SCROLL_DOWN: pragha_backend_set_delta_volume (backend, -0.02); break; default: break; } } static void systray_about_action (GtkAction *action, PraghaStatusIcon *status_icon) { pragha_application_about_dialog (status_icon->pragha); } static void systray_open_file_action (GtkAction *action, PraghaStatusIcon *status_icon) { pragha_application_open_files (status_icon->pragha); } static void systray_add_location_action (GtkAction *action, PraghaStatusIcon *status_icon) { pragha_application_add_location (status_icon->pragha); } static void systray_play_pause_action (GtkAction *action, PraghaStatusIcon *status_icon) { PraghaBackend *backend = pragha_application_get_backend (status_icon->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_play_pause_resume(status_icon->pragha); } static void systray_stop_action (GtkAction *action, PraghaStatusIcon *status_icon) { PraghaBackend *backend = pragha_application_get_backend (status_icon->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_stop(status_icon->pragha); } static void systray_prev_action (GtkAction *action, PraghaStatusIcon *status_icon) { PraghaBackend *backend = pragha_application_get_backend (status_icon->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_prev_track(status_icon->pragha); } static void systray_next_action (GtkAction *action, PraghaStatusIcon *status_icon) { PraghaBackend *backend = pragha_application_get_backend (status_icon->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_next_track(status_icon->pragha); } static void systray_edit_action (GtkAction *action, PraghaStatusIcon *status_icon) { PraghaBackend *backend = pragha_application_get_backend (status_icon->pragha); if (pragha_backend_emitted_error (backend) == FALSE) pragha_playback_edit_current_track (status_icon->pragha); } static void systray_quit (GtkAction *action, PraghaStatusIcon *status_icon) { pragha_application_quit (status_icon->pragha); } static void pragha_status_icon_update_state (PraghaBackend *backend, GParamSpec *pspec, PraghaStatusIcon *status_icon) { GtkAction *action; PraghaBackendState state = 0; state = pragha_backend_get_state (backend); gboolean playing = (state != ST_STOPPED); action = gtk_ui_manager_get_action (status_icon->ui_manager, "/popup/Prev"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = gtk_ui_manager_get_action (status_icon->ui_manager, "/popup/Stop"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = gtk_ui_manager_get_action (status_icon->ui_manager, "/popup/Next"); gtk_action_set_sensitive (GTK_ACTION (action), playing); action = gtk_ui_manager_get_action (status_icon->ui_manager, "/popup/Edit tags"); gtk_action_set_sensitive (GTK_ACTION (action), playing); } static void pragha_status_icon_set_application (PraghaStatusIcon *status_icon, PraghaApplication *pragha) { PraghaPreferences *preferences; GtkActionGroup *actions; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; status_icon->pragha = pragha; gtk_status_icon_set_from_icon_name (GTK_STATUS_ICON(status_icon), "pragha"); actions = gtk_action_group_new ("Systray Actions"); gtk_action_group_set_translation_domain (actions, GETTEXT_PACKAGE); gtk_action_group_add_actions (actions, systray_menu_aentries, G_N_ELEMENTS(systray_menu_aentries), (gpointer)status_icon); gtk_ui_manager_insert_action_group (status_icon->ui_manager, actions, 0); preferences = pragha_application_get_preferences (pragha); g_object_bind_property (preferences, "show-status-icon", status_icon, "visible", binding_flags); g_signal_connect (pragha_application_get_backend (pragha), "notify::state", G_CALLBACK (pragha_status_icon_update_state), status_icon); pragha_status_icon_update_state (pragha_application_get_backend (pragha), NULL, status_icon); g_object_unref (actions); } static void pragha_status_icon_dispose (GObject *object) { PraghaStatusIcon *status_icon = PRAGHA_STATUS_ICON(object); if (status_icon->ui_manager) { g_object_unref (status_icon->ui_manager); status_icon->ui_manager = NULL; } (*G_OBJECT_CLASS (pragha_status_icon_parent_class)->dispose) (object); } static void pragha_status_icon_class_init (PraghaStatusIconClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = pragha_status_icon_dispose; } static void pragha_status_icon_init (PraghaStatusIcon *status_icon) { GError *error = NULL; status_icon->ui_manager = gtk_ui_manager_new(); if (!gtk_ui_manager_add_ui_from_string (status_icon->ui_manager, systray_menu_xml, -1, &error)) g_critical("Unable to create systray menu, err : %s", error->message); g_signal_connect (status_icon, "button-press-event", G_CALLBACK (status_icon_clicked), status_icon); g_signal_connect (status_icon, "scroll_event", G_CALLBACK(systray_volume_scroll), status_icon); g_object_set (G_OBJECT(status_icon), "has-tooltip", TRUE, NULL); g_signal_connect (G_OBJECT(status_icon), "query-tooltip", G_CALLBACK(status_get_tooltip_cb), status_icon); } PraghaStatusIcon * pragha_status_icon_new (PraghaApplication *pragha) { PraghaStatusIcon *status_icon; status_icon = g_object_new (PRAGHA_TYPE_STATUS_ICON, NULL); pragha_status_icon_set_application (status_icon, pragha); return status_icon; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-statusicon.h����������������������������������������������������������������0000664�0000000�0000000�00000005343�13435240150�0017357�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_STATUSICON_H #define PRAGHA_STATUSICON_H #include <gtk/gtk.h> /* pragha.h */ typedef struct _PraghaApplication PraghaApplication; #define PRAGHA_TYPE_STATUS_ICON (pragha_status_icon_get_type ()) #define PRAGHA_STATUS_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_STATUS_ICON, PraghaStatusIcon)) #define PRAGHA_IS_STATUS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_STATUS_ICON)) #define PRAGHA_STATUS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_STATUS_ICON, PraghaStatusIconClass)) #define PRAGHA_IS_STATUS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_STATUS_ICON)) #define PRAGHA_STATUS_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_STATUS_ICON, PraghaStatusIconClass)) typedef struct { GtkStatusIconClass __parent__; } PraghaStatusIconClass; typedef struct _PraghaStatusIcon PraghaStatusIcon; gint pragha_systray_append_plugin_action (PraghaStatusIcon *status_icon, GtkActionGroup *action_group, const gchar *menu_xml); void pragha_systray_remove_plugin_action (PraghaStatusIcon *status_icon, GtkActionGroup *action_group, gint merge_id); PraghaStatusIcon *pragha_status_icon_new (PraghaApplication *pragha); #endif /* PRAGHA_STATUSICON_H */���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-tagger.c��������������������������������������������������������������������0000664�0000000�0000000�00000011200�13435240150�0016414�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #include "pragha-tagger.h" #include "pragha-musicobject.h" #include "pragha-database.h" #include "pragha-library-pane.h" #include "pragha-tags-mgmt.h" G_DEFINE_TYPE(PraghaTagger, pragha_tagger, G_TYPE_OBJECT) struct _PraghaTaggerPrivate { PraghaMusicobject *mobj; gint changed; GArray *loc_arr; GPtrArray *file_arr; PraghaDatabase *cdbase; }; void pragha_tagger_set_changes(PraghaTagger *tagger, PraghaMusicobject *mobj, gint changed) { PraghaTaggerPrivate *priv = tagger->priv; priv->mobj = pragha_musicobject_dup(mobj); priv->changed = changed; } void pragha_tagger_add_file(PraghaTagger *tagger, const gchar *file) { gint location_id = 0; PraghaTaggerPrivate *priv = tagger->priv; location_id = pragha_database_find_location(priv->cdbase, file); if (G_LIKELY(location_id)) g_array_append_val(priv->loc_arr, location_id); g_ptr_array_add(priv->file_arr, g_strdup(file)); } void pragha_tagger_add_location_id(PraghaTagger *tagger, gint location_id) { gchar *file = NULL; PraghaTaggerPrivate *priv = tagger->priv; g_array_append_val(priv->loc_arr, location_id); file = pragha_database_get_filename_from_location_id(priv->cdbase, location_id); if (G_LIKELY(file)) g_ptr_array_add(priv->file_arr, file); } void pragha_tagger_apply_changes(PraghaTagger *tagger) { PraghaPreferences *preferences; PraghaTaggerPrivate *priv = tagger->priv; if(priv->file_arr->len) pragha_update_local_files_change_tag(priv->file_arr, priv->changed, priv->mobj); if(priv->loc_arr->len) { pragha_database_update_local_files_change_tag(priv->cdbase, priv->loc_arr, priv->changed, priv->mobj); preferences = pragha_preferences_get(); if(pragha_library_need_update_view(preferences, priv->changed)) pragha_database_change_tracks_done(priv->cdbase); g_object_unref(preferences); } } static void pragha_tagger_dispose (GObject *object) { PraghaTagger *tagger = PRAGHA_TAGGER (object); PraghaTaggerPrivate *priv = tagger->priv; if (priv->mobj) { g_object_unref (priv->mobj); priv->mobj = NULL; } if (priv->cdbase) { g_object_unref (priv->cdbase); priv->cdbase = NULL; } G_OBJECT_CLASS (pragha_tagger_parent_class)->dispose (object); } static void pragha_tagger_finalize (GObject *object) { PraghaTagger *tagger = PRAGHA_TAGGER(object); PraghaTaggerPrivate *priv = tagger->priv; g_array_free(priv->loc_arr, TRUE); g_ptr_array_free(priv->file_arr, TRUE); G_OBJECT_CLASS(pragha_tagger_parent_class)->finalize(object); } static void pragha_tagger_class_init (PraghaTaggerClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->dispose = pragha_tagger_dispose; object_class->finalize = pragha_tagger_finalize; g_type_class_add_private(object_class, sizeof(PraghaTaggerPrivate)); } static void pragha_tagger_init (PraghaTagger *tagger) { tagger->priv = G_TYPE_INSTANCE_GET_PRIVATE(tagger, PRAGHA_TYPE_TAGGER, PraghaTaggerPrivate); PraghaTaggerPrivate *priv = tagger->priv; priv->mobj = NULL; priv->changed = 0; priv->loc_arr = g_array_new(TRUE, TRUE, sizeof(gint)); priv->file_arr = g_ptr_array_new_with_free_func(g_free); priv->cdbase = pragha_database_get(); } /** * pragha_tagger_new: * * Return value: a new #PraghaTagger instance. **/ PraghaTagger* pragha_tagger_new (void) { PraghaTagger *tagger = NULL; tagger = g_object_new(PRAGHA_TYPE_TAGGER, NULL); return tagger; } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-tagger.h��������������������������������������������������������������������0000664�0000000�0000000�00000005304�13435240150�0016431�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_TAGGER_H #define PRAGHA_TAGGER_H #include <glib-object.h> #include "pragha-musicobject.h" G_BEGIN_DECLS #define PRAGHA_TYPE_TAGGER (pragha_tagger_get_type()) #define PRAGHA_TAGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TAGGER, PraghaTagger)) #define PRAGHA_TAGGER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TAGGER, PraghaTagger const)) #define PRAGHA_TAGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TAGGER, PraghaTaggerClass)) #define PRAGHA_IS_TAGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TAGGER)) #define PRAGHA_IS_TAGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TAGGER)) #define PRAGHA_TAGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TAGGER, PraghaTaggerClass)) typedef struct _PraghaTagger PraghaTagger; typedef struct _PraghaTaggerClass PraghaTaggerClass; typedef struct _PraghaTaggerPrivate PraghaTaggerPrivate; struct _PraghaTagger { GObject parent; /*< private >*/ PraghaTaggerPrivate *priv; }; struct _PraghaTaggerClass { GObjectClass parent_class; }; void pragha_tagger_set_changes (PraghaTagger *tagger, PraghaMusicobject *mobj, gint changed); void pragha_tagger_add_file (PraghaTagger *tagger, const gchar *file); void pragha_tagger_add_location_id (PraghaTagger *tagger, gint location_id); void pragha_tagger_apply_changes (PraghaTagger *tagger); PraghaTagger *pragha_tagger_new (void); GType pragha_tagger_get_type (void) G_GNUC_CONST; G_END_DECLS #endif /* PRAGHA_TAGGER_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-tags-dialog.c���������������������������������������������������������������0000664�0000000�0000000�00000125717�13435240150�0017361�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-simple-widgets.h" #include "pragha-tags-dialog.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include "pragha-hig.h" #include "pragha-utils.h" #include "pragha-musicobject-mgmt.h" static void pragha_tags_dialog_dispose (GObject *object); static void pragha_tags_dialog_finalize (GObject *object); static void pragha_title_entry_change (GtkEntry *entry, PraghaTagsDialog *dialog); static void pragha_title_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_artist_entry_change (GtkEntry *entry, PraghaTagsDialog *dialog); static void pragha_artist_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_album_entry_change (GtkEntry *entry, PraghaTagsDialog *dialog); static void pragha_album_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_genre_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_track_no_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_year_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_comment_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog); static void pragha_tag_entry_change (GtkEntry *entry, GtkCheckButton *check); static void pragha_tag_entry_clear_pressed (GtkEntry *entry, gint position, GdkEventButton *event); static void pragha_tag_entry_directory_pressed (GtkEntry *entry, gint position, GdkEventButton *event, gpointer user_data); static gboolean pragha_tag_entry_select_text_on_click (GtkWidget *widget, GdkEvent *event, gpointer user_data); static void pragha_file_entry_populate_menu (GtkEntry *entry, GtkMenu *menu, gpointer user_data); GtkEntryCompletion *pragha_tags_get_entry_completion_from_table (const gchar *table); struct _PraghaTagsDialogClass { GtkDialogClass __parent__; }; struct _PraghaTagsDialog { GtkDialog __parent__; PraghaHeader *header; GtkWidget *title_entry; GtkWidget *artist_entry; GtkWidget *album_entry; GtkWidget *genre_entry; GtkWidget *track_no_entry; GtkWidget *year_entry; GtkWidget *comment_entry; GtkWidget *file_entry; GtkWidget *title_check_change; GtkWidget *artist_check_change; GtkWidget *album_check_change; GtkWidget *genre_check_change; GtkWidget *track_no_check_change; GtkWidget *year_check_change; GtkWidget *comment_check_change; PraghaMusicobject *mobj; }; G_DEFINE_TYPE (PraghaTagsDialog, pragha_tags_dialog, GTK_TYPE_DIALOG); /* * Utils. */ static gchar * pragha_tags_dialog_get_title (const gchar *title, const gchar *file) { gchar *stitle = NULL; if (string_is_not_empty(title)) stitle = g_strdup (title); else if (string_is_not_empty(file)) stitle = get_display_filename (file, FALSE); else stitle = g_strdup (_("Unknown")); return stitle; } static gchar * pragha_tags_dialog_get_subtitle (const gchar *artist, const gchar *album) { gchar *subtitle; subtitle = g_strdup_printf ("%s - %s", string_is_not_empty(artist) ? artist : _("Unknown Artist"), string_is_not_empty(album) ? album : _("Unknown Album")); return subtitle; } /* * PraghaTagDialog */ static void pragha_tags_dialog_class_init (PraghaTagsDialogClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = pragha_tags_dialog_dispose; gobject_class->finalize = pragha_tags_dialog_finalize; } static void pragha_tags_dialog_init (PraghaTagsDialog *dialog) { PraghaHeader *header; GtkWidget *tag_table; GtkWidget *label_title, *label_artist, *label_album, *label_genre, *label_tno, *label_year, *label_comment, *label_file; GtkWidget *chk_title, *chk_artist, *chk_album, *chk_genre, *chk_tno, *chk_year, *chk_comment; GtkWidget *entry_title, *entry_artist, *entry_album, *entry_genre, *entry_tno, *entry_year, *entry_comment, *entry_file; GtkWidget *hbox_title, *hbox_artist, *hbox_album, *hbox_genre, *hbox_tno, *hbox_year, *hbox_comment; GtkWidget *hbox_spins, *comment_view_scroll, *chk_alignment; GtkEntryCompletion *completion; /* Set dialog properties */ gtk_window_set_title (GTK_WINDOW (dialog), _("Edit tags")); gtk_window_set_default_size(GTK_WINDOW (dialog), 450, 300); gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Ok"), GTK_RESPONSE_OK); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); header = pragha_header_new (); pragha_header_set_icon_name (header, "media-optical"); /* Create table */ tag_table = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID(tag_table), 6); gtk_grid_set_column_spacing (GTK_GRID(tag_table), 6); gtk_container_set_border_width (GTK_CONTAINER(tag_table), 6); /* Create labels */ label_title = gtk_label_new(_("Title")); label_artist = gtk_label_new(_("Artist")); label_album = gtk_label_new(_("Album")); label_genre = gtk_label_new(_("Genre")); label_tno = gtk_label_new(_("Track No")); label_year = gtk_label_new(_("Year")); label_comment = gtk_label_new(_("Comment")); label_file = gtk_label_new(_("File")); gtk_misc_set_alignment(GTK_MISC (label_title), 1, 0.5); gtk_misc_set_alignment(GTK_MISC (label_artist), 1, 0.5); gtk_misc_set_alignment(GTK_MISC (label_album), 1, 0.5); gtk_misc_set_alignment(GTK_MISC (label_genre), 1, 0.5); gtk_misc_set_alignment(GTK_MISC (label_tno), 1, 0.5); gtk_misc_set_alignment(GTK_MISC (label_year), 1, 0.5); gtk_misc_set_alignment(GTK_MISC (label_comment), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_file), 1, 0.5); gtk_label_set_attribute_bold(GTK_LABEL(label_title)); gtk_label_set_attribute_bold(GTK_LABEL(label_artist)); gtk_label_set_attribute_bold(GTK_LABEL(label_album)); gtk_label_set_attribute_bold(GTK_LABEL(label_genre)); gtk_label_set_attribute_bold(GTK_LABEL(label_tno)); gtk_label_set_attribute_bold(GTK_LABEL(label_year)); gtk_label_set_attribute_bold(GTK_LABEL(label_comment)); gtk_label_set_attribute_bold(GTK_LABEL(label_file)); gtk_widget_show (GTK_WIDGET(label_title)); gtk_widget_show (GTK_WIDGET(label_artist)); gtk_widget_show (GTK_WIDGET(label_album)); gtk_widget_show (GTK_WIDGET(label_genre)); gtk_widget_show (GTK_WIDGET(label_tno)); gtk_widget_show (GTK_WIDGET(label_year)); gtk_widget_show (GTK_WIDGET(label_comment)); gtk_widget_show (GTK_WIDGET(label_file)); /* Create entry fields */ entry_title = gtk_entry_new(); entry_artist = gtk_entry_new(); entry_album = gtk_entry_new(); entry_genre = gtk_entry_new(); entry_tno = gtk_spin_button_new_with_range (0, 2030, 1); entry_year = gtk_spin_button_new_with_range (0, 2030, 1); entry_comment = gtk_text_view_new(); gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (entry_comment), FALSE); gtk_widget_set_hexpand (entry_comment, TRUE); gtk_widget_set_vexpand (entry_comment, TRUE); entry_file = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(entry_title), TAG_MAX_LEN); gtk_entry_set_max_length(GTK_ENTRY(entry_artist), TAG_MAX_LEN); gtk_entry_set_max_length(GTK_ENTRY(entry_album), TAG_MAX_LEN); gtk_entry_set_max_length(GTK_ENTRY(entry_genre), TAG_MAX_LEN); completion = pragha_tags_get_entry_completion_from_table ("ARTIST"); gtk_entry_set_completion(GTK_ENTRY(entry_artist), completion); g_object_unref (completion); completion = pragha_tags_get_entry_completion_from_table ("ALBUM"); gtk_entry_set_completion(GTK_ENTRY(entry_album), completion); g_object_unref (completion); completion = pragha_tags_get_entry_completion_from_table ("GENRE"); gtk_entry_set_completion(GTK_ENTRY(entry_genre), completion); g_object_unref (completion); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_title), GTK_ENTRY_ICON_SECONDARY, "edit-clear"); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_artist), GTK_ENTRY_ICON_SECONDARY, "edit-clear"); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_album), GTK_ENTRY_ICON_SECONDARY, "edit-clear"); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_genre), GTK_ENTRY_ICON_SECONDARY, "edit-clear"); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_file), GTK_ENTRY_ICON_PRIMARY, "folder"); gtk_entry_set_icon_from_icon_name (GTK_ENTRY(entry_file), GTK_ENTRY_ICON_SECONDARY, "go-jump"); gtk_editable_set_editable (GTK_EDITABLE(entry_file), FALSE); /* Create checkboxes. */ chk_title = gtk_check_button_new(); chk_artist = gtk_check_button_new(); chk_album = gtk_check_button_new(); chk_genre = gtk_check_button_new(); chk_year = gtk_check_button_new(); chk_tno = gtk_check_button_new(); chk_comment = gtk_check_button_new(); /* Connect signals. */ g_signal_connect(G_OBJECT(entry_title), "changed", G_CALLBACK(pragha_title_entry_change), dialog); g_signal_connect(G_OBJECT(entry_artist), "changed", G_CALLBACK(pragha_artist_entry_change), dialog); g_signal_connect(G_OBJECT(entry_album), "changed", G_CALLBACK(pragha_album_entry_change), dialog); g_signal_connect(G_OBJECT(entry_genre), "changed", G_CALLBACK(pragha_tag_entry_change), chk_genre); g_signal_connect(G_OBJECT(entry_tno), "changed", G_CALLBACK(pragha_tag_entry_change), chk_tno); g_signal_connect(G_OBJECT(entry_year), "changed", G_CALLBACK(pragha_tag_entry_change), chk_year); g_signal_connect(G_OBJECT(gtk_text_view_get_buffer (GTK_TEXT_VIEW (entry_comment))), "changed", G_CALLBACK(pragha_tag_entry_change), chk_comment); g_signal_connect(G_OBJECT(entry_title), "icon-press", G_CALLBACK(pragha_tag_entry_clear_pressed), NULL); g_signal_connect(G_OBJECT(entry_artist), "icon-press", G_CALLBACK(pragha_tag_entry_clear_pressed), NULL); g_signal_connect(G_OBJECT(entry_album), "icon-press", G_CALLBACK(pragha_tag_entry_clear_pressed), NULL); g_signal_connect(G_OBJECT(entry_genre), "icon-press", G_CALLBACK(pragha_tag_entry_clear_pressed), NULL); g_signal_connect(G_OBJECT(entry_file), "icon-press", G_CALLBACK(pragha_tag_entry_directory_pressed), dialog); g_signal_connect(G_OBJECT(entry_tno), "button-release-event", G_CALLBACK(pragha_tag_entry_select_text_on_click), NULL); g_signal_connect(G_OBJECT(entry_year), "button-release-event", G_CALLBACK(pragha_tag_entry_select_text_on_click), NULL); g_signal_connect (G_OBJECT(entry_file), "populate-popup", G_CALLBACK (pragha_file_entry_populate_menu), dialog); g_signal_connect (G_OBJECT(chk_title), "toggled", G_CALLBACK(pragha_title_check_toggled), dialog); g_signal_connect (G_OBJECT(chk_artist), "toggled", G_CALLBACK(pragha_artist_check_toggled), dialog); g_signal_connect (G_OBJECT(chk_album), "toggled", G_CALLBACK(pragha_album_check_toggled), dialog); g_signal_connect (G_OBJECT(chk_genre), "toggled", G_CALLBACK(pragha_genre_check_toggled), dialog); g_signal_connect (G_OBJECT(chk_tno), "toggled", G_CALLBACK(pragha_track_no_check_toggled), dialog); g_signal_connect (G_OBJECT(chk_year), "toggled", G_CALLBACK(pragha_year_check_toggled), dialog); g_signal_connect (G_OBJECT(chk_comment), "toggled", G_CALLBACK(pragha_comment_check_toggled), dialog); /* Create boxs and package all. */ hbox_title = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_artist = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_album = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_genre = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_year = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_tno = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_comment = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); hbox_spins = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); /* Create hobxs(ENTRY CHECHK) and attach in table */ gtk_box_pack_start (GTK_BOX(hbox_title), entry_title, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_title), chk_title, FALSE, FALSE, 0); gtk_widget_set_hexpand (hbox_title, TRUE); gtk_widget_show(GTK_WIDGET(entry_title)); gtk_widget_show(GTK_WIDGET(hbox_title)); gtk_grid_attach (GTK_GRID(tag_table), label_title, 0, 0, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), hbox_title, 1, 0, 1, 1); gtk_box_pack_start(GTK_BOX(hbox_artist), entry_artist, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox_artist), chk_artist, FALSE, FALSE, 0); gtk_widget_set_hexpand (hbox_artist, TRUE); gtk_widget_show(GTK_WIDGET(entry_artist)); gtk_widget_show(GTK_WIDGET(hbox_artist)); gtk_grid_attach (GTK_GRID(tag_table), label_artist, 0, 1, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), hbox_artist, 1, 1, 1, 1); gtk_box_pack_start (GTK_BOX(hbox_album), entry_album, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_album), chk_album, FALSE, FALSE, 0); gtk_widget_set_hexpand (hbox_album, TRUE); gtk_widget_show(GTK_WIDGET(entry_album)); gtk_widget_show(GTK_WIDGET(hbox_album)); gtk_grid_attach (GTK_GRID(tag_table), label_album, 0, 2, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), hbox_album, 1, 2, 1, 1); gtk_box_pack_start (GTK_BOX(hbox_genre), entry_genre, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_genre), chk_genre, FALSE, FALSE, 0); gtk_widget_set_hexpand (hbox_genre, TRUE); gtk_widget_show(GTK_WIDGET(entry_genre)); gtk_widget_show(GTK_WIDGET(hbox_genre)); gtk_grid_attach (GTK_GRID(tag_table), label_genre, 0, 3, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), hbox_genre, 1, 3, 1, 1); gtk_box_pack_start (GTK_BOX(hbox_tno), entry_tno, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox_tno), chk_tno, FALSE, FALSE, 0); gtk_widget_show(GTK_WIDGET(entry_tno)); gtk_widget_show(GTK_WIDGET(hbox_tno)); gtk_box_pack_start (GTK_BOX(hbox_year), label_year, FALSE, FALSE, 5); gtk_box_pack_start (GTK_BOX(hbox_year), entry_year, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_year), chk_year, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(hbox_spins), hbox_tno, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_spins), hbox_year, TRUE, TRUE, 0); gtk_widget_set_hexpand (hbox_spins, TRUE); gtk_widget_show(GTK_WIDGET(entry_year)); gtk_widget_show(GTK_WIDGET(hbox_year)); gtk_widget_show(GTK_WIDGET(hbox_spins)); gtk_grid_attach (GTK_GRID(tag_table), label_tno, 0, 4, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), hbox_spins, 1, 4, 1, 1); comment_view_scroll = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(comment_view_scroll), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(comment_view_scroll), GTK_SHADOW_IN); gtk_container_add(GTK_CONTAINER(comment_view_scroll), entry_comment); chk_alignment = gtk_alignment_new(0.5, 0, 0, 0); gtk_container_add(GTK_CONTAINER(chk_alignment), chk_comment); gtk_box_pack_start (GTK_BOX(hbox_comment), comment_view_scroll, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(hbox_comment), chk_alignment, FALSE, FALSE, 0); gtk_widget_set_hexpand (hbox_comment, TRUE); gtk_widget_show_all(GTK_WIDGET(comment_view_scroll)); gtk_widget_show(GTK_WIDGET(hbox_comment)); gtk_grid_attach (GTK_GRID(tag_table), label_comment, 0, 5, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), hbox_comment, 1, 5, 1, 2); gtk_widget_set_hexpand (entry_file, TRUE); gtk_widget_show(GTK_WIDGET(entry_file)); gtk_grid_attach (GTK_GRID(tag_table), label_file, 0, 7, 1, 1); gtk_grid_attach (GTK_GRID(tag_table), entry_file, 1, 7, 1, 1); /* Save changes when press enter. */ gtk_entry_set_activates_default (GTK_ENTRY(entry_title), TRUE); gtk_entry_set_activates_default (GTK_ENTRY(entry_artist), TRUE); gtk_entry_set_activates_default (GTK_ENTRY(entry_album), TRUE); gtk_entry_set_activates_default (GTK_ENTRY(entry_genre), TRUE); gtk_entry_set_activates_default (GTK_ENTRY(entry_tno), TRUE); gtk_entry_set_activates_default (GTK_ENTRY(entry_year), TRUE); /* Storage widgets and its to dialog. */ dialog->header = header; dialog->title_entry = entry_title; dialog->artist_entry = entry_artist; dialog->album_entry = entry_album; dialog->genre_entry = entry_genre; dialog->track_no_entry = entry_tno; dialog->year_entry = entry_year; dialog->comment_entry = entry_comment; dialog->file_entry = entry_file; dialog->title_check_change = chk_title; dialog->artist_check_change = chk_artist; dialog->album_check_change = chk_album; dialog->genre_check_change = chk_genre; dialog->track_no_check_change = chk_tno; dialog->year_check_change = chk_year; dialog->comment_check_change = chk_comment; gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), GTK_WIDGET(header), FALSE, FALSE, 0); gtk_widget_show_all(GTK_WIDGET(header)); gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), tag_table, TRUE, TRUE, 0); gtk_widget_show (tag_table); /* Init flags */ dialog->mobj = pragha_musicobject_new(); } void pragha_tags_dialog_set_changed(PraghaTagsDialog *dialog, gint changed) { if(changed & TAG_TNO_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->track_no_check_change), TRUE); if(changed & TAG_TITLE_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->title_check_change), TRUE); if(changed & TAG_ARTIST_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->artist_check_change), TRUE); if(changed & TAG_ALBUM_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->album_check_change), TRUE); if(changed & TAG_GENRE_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->genre_check_change), TRUE); if(changed & TAG_YEAR_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->year_check_change), TRUE); if(changed & TAG_COMMENT_CHANGED) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->comment_check_change), TRUE); } gint pragha_tags_dialog_get_changed(PraghaTagsDialog *dialog) { gint changed = 0; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->track_no_check_change))) changed |= TAG_TNO_CHANGED; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->title_check_change))) changed |= TAG_TITLE_CHANGED; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->artist_check_change))) changed |= TAG_ARTIST_CHANGED; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->album_check_change))) changed |= TAG_ALBUM_CHANGED; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->genre_check_change))) changed |= TAG_GENRE_CHANGED; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->year_check_change))) changed |= TAG_YEAR_CHANGED; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->comment_check_change))) changed |= TAG_COMMENT_CHANGED; return changed; } void pragha_tags_dialog_set_musicobject(PraghaTagsDialog *dialog, PraghaMusicobject *mobj) { const gchar *title, *artist, *album, *genre, *comment, *file; gint track_no, year; GtkTextBuffer *buffer; gchar *str_title, *str_subtitle; g_object_unref(dialog->mobj); dialog->mobj = pragha_musicobject_dup (mobj); title = pragha_musicobject_get_title(mobj); artist = pragha_musicobject_get_artist(mobj); album = pragha_musicobject_get_album(mobj); genre = pragha_musicobject_get_genre(mobj); track_no = pragha_musicobject_get_track_no(mobj); year = pragha_musicobject_get_year(mobj); comment = pragha_musicobject_get_comment(mobj); file = pragha_musicobject_get_file(mobj); str_title = pragha_tags_dialog_get_title (title, file); pragha_header_set_title (dialog->header, str_title); g_free (str_title); str_subtitle = pragha_tags_dialog_get_subtitle (artist, album); pragha_header_set_subtitle (dialog->header, str_subtitle); g_free (str_subtitle); /* Block changed signal, and force text. */ g_signal_handlers_block_by_func(G_OBJECT(dialog->title_entry), pragha_title_entry_change, dialog); gtk_entry_set_text(GTK_ENTRY(dialog->title_entry), title); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->title_entry), pragha_title_entry_change, dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->artist_entry), pragha_artist_entry_change, dialog); gtk_entry_set_text(GTK_ENTRY(dialog->artist_entry), artist); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->artist_entry), pragha_artist_entry_change, dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->album_entry), pragha_album_entry_change, dialog); gtk_entry_set_text(GTK_ENTRY(dialog->album_entry), album); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->album_entry), pragha_album_entry_change, dialog); g_signal_handlers_block_by_func(G_OBJECT(dialog->genre_entry), pragha_tag_entry_change, dialog->genre_check_change); gtk_entry_set_text(GTK_ENTRY(dialog->genre_entry), genre); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->genre_entry), pragha_tag_entry_change, dialog->genre_check_change); g_signal_handlers_block_by_func(G_OBJECT(dialog->track_no_entry), pragha_tag_entry_change, dialog->track_no_check_change); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->track_no_entry), track_no); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->track_no_entry), pragha_tag_entry_change, dialog->track_no_check_change); g_signal_handlers_block_by_func(G_OBJECT(dialog->year_entry), pragha_tag_entry_change, dialog->year_check_change); gtk_spin_button_set_value(GTK_SPIN_BUTTON(dialog->year_entry), year); g_signal_handlers_unblock_by_func(G_OBJECT(dialog->year_entry), pragha_tag_entry_change, dialog->year_check_change); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->comment_entry)); g_signal_handlers_block_by_func(G_OBJECT(buffer), pragha_tag_entry_change, dialog->comment_check_change); gtk_text_buffer_set_text (buffer, comment, -1); g_signal_handlers_unblock_by_func(G_OBJECT(buffer), pragha_tag_entry_change, dialog->comment_check_change); if (string_is_empty(file)) gtk_widget_set_sensitive(GTK_WIDGET(dialog->file_entry), FALSE); else { gtk_entry_set_text(GTK_ENTRY(dialog->file_entry), file); gtk_editable_set_position(GTK_EDITABLE(dialog->file_entry), g_utf8_strlen(file, -1)); gtk_dialog_add_button(GTK_DIALOG(dialog), _("Details"), GTK_RESPONSE_HELP); } } PraghaMusicobject * pragha_tags_dialog_get_musicobject(PraghaTagsDialog *dialog) { GtkTextBuffer *buffer; GtkTextIter start, end; if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->track_no_check_change))) pragha_musicobject_set_track_no(dialog->mobj, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(dialog->track_no_entry))); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->title_check_change))) pragha_musicobject_set_title(dialog->mobj, gtk_entry_get_text (GTK_ENTRY(dialog->title_entry))); if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->artist_check_change))) pragha_musicobject_set_artist(dialog->mobj, gtk_entry_get_text (GTK_ENTRY(dialog->artist_entry))); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->album_check_change))) pragha_musicobject_set_album(dialog->mobj, gtk_entry_get_text (GTK_ENTRY(dialog->album_entry))); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->genre_check_change))) pragha_musicobject_set_genre(dialog->mobj, gtk_entry_get_text (GTK_ENTRY(dialog->genre_entry))); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->year_check_change))) pragha_musicobject_set_year(dialog->mobj, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON(dialog->year_entry))); if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->comment_check_change))) { buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->comment_entry)); gtk_text_buffer_get_start_iter (buffer, &start); gtk_text_buffer_get_end_iter (buffer, &end); pragha_musicobject_set_comment(dialog->mobj, gtk_text_buffer_get_text (buffer, &start, &end, FALSE)); } return dialog->mobj; } static void pragha_tags_dialog_dispose (GObject *object) { PraghaTagsDialog *dialog = PRAGHA_TAGS_DIALOG (object); if(dialog->mobj) { g_object_unref(dialog->mobj); dialog->mobj = NULL; } (*G_OBJECT_CLASS (pragha_tags_dialog_parent_class)->dispose) (object); } static void pragha_tags_dialog_finalize (GObject *object) { //PraghaTagsDialog *dialog = PRAGHA_TAGS_DIALOG (object); /* * Need free dialog->loc_arr or dialog->rlist? */ (*G_OBJECT_CLASS (pragha_tags_dialog_parent_class)->finalize) (object); } GtkWidget * pragha_tags_dialog_new (void) { return g_object_new (PRAGHA_TYPE_TAGS_DIALOG, NULL); } /* * Track properties dialog */ static void pragha_track_properties_response(GtkDialog *dialog, gint response, gpointer data) { gtk_widget_destroy(GTK_WIDGET(dialog)); } void pragha_track_properties_dialog(PraghaMusicobject *mobj, GtkWidget *parent) { GtkWidget *dialog; GtkWidget *properties_table; GtkWidget *label_length, *label_bitrate, *label_channels, *label_samplerate, *label_folder, *label_filename, *label_mimetype; GtkWidget *info_length, *info_bitrate, *info_channels, *info_samplerate, *info_folder, *info_filename, *info_mimetype; gchar *length = NULL, *bitrate = NULL, *channels = NULL, *samplerate = NULL, *folder = NULL, *filename = NULL; const gchar *mimetype = NULL; if(!mobj) return; gint channels_n = pragha_musicobject_get_channels(mobj); length = convert_length_str(pragha_musicobject_get_length(mobj)); bitrate = g_strdup_printf("%d kbps", pragha_musicobject_get_bitrate(mobj)); channels = g_strdup_printf("%d %s", channels_n, ngettext("channel", "channels", channels_n)); samplerate = g_strdup_printf("%d Hz", pragha_musicobject_get_samplerate(mobj)); folder = get_display_filename(pragha_musicobject_get_file(mobj), TRUE); filename = get_display_name(mobj); mimetype = pragha_musicobject_get_mime_type(mobj); /* Create table */ properties_table = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID(properties_table), 5); gtk_grid_set_column_spacing (GTK_GRID(properties_table), 5); gtk_container_set_border_width (GTK_CONTAINER(properties_table), 5); /* Create labels */ label_length = gtk_label_new(_("Length")); label_bitrate = gtk_label_new(_("Bitrate")); label_channels = gtk_label_new(_("Channels")); label_samplerate = gtk_label_new(_("Samplerate")); label_folder = gtk_label_new(_("Folder")); label_filename = gtk_label_new(_("Filename")); label_mimetype = gtk_label_new(_("Mimetype")); gtk_misc_set_alignment(GTK_MISC (label_length), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_bitrate), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_channels), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_samplerate), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_folder), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_filename), 1, 0); gtk_misc_set_alignment(GTK_MISC (label_mimetype), 1, 0); gtk_label_set_attribute_bold(GTK_LABEL(label_length)); gtk_label_set_attribute_bold(GTK_LABEL(label_bitrate)); gtk_label_set_attribute_bold(GTK_LABEL(label_channels)); gtk_label_set_attribute_bold(GTK_LABEL(label_samplerate)); gtk_label_set_attribute_bold(GTK_LABEL(label_folder)); gtk_label_set_attribute_bold(GTK_LABEL(label_filename)); gtk_label_set_attribute_bold(GTK_LABEL(label_mimetype)); /* Create info labels */ info_length = gtk_label_new(length); info_bitrate = gtk_label_new(bitrate); info_channels = gtk_label_new(channels); info_samplerate = gtk_label_new(samplerate); info_folder = gtk_label_new(folder); info_filename = gtk_label_new(filename); info_mimetype = gtk_label_new(mimetype); gtk_misc_set_alignment(GTK_MISC (info_length), 0, 0); gtk_misc_set_alignment(GTK_MISC (info_bitrate), 0, 0); gtk_misc_set_alignment(GTK_MISC (info_channels), 0, 0); gtk_misc_set_alignment(GTK_MISC (info_samplerate), 0, 0); gtk_misc_set_alignment(GTK_MISC (info_folder), 0, 0); gtk_misc_set_alignment(GTK_MISC (info_filename), 0, 0); gtk_misc_set_alignment(GTK_MISC (info_mimetype), 0, 0); gtk_label_set_selectable(GTK_LABEL(info_length), TRUE); gtk_label_set_selectable(GTK_LABEL(info_bitrate), TRUE); gtk_label_set_selectable(GTK_LABEL(info_channels), TRUE); gtk_label_set_selectable(GTK_LABEL(info_samplerate), TRUE); gtk_label_set_selectable(GTK_LABEL(info_folder), TRUE); gtk_label_set_selectable(GTK_LABEL(info_filename), TRUE); gtk_label_set_selectable(GTK_LABEL(info_mimetype), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_length), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_bitrate), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_channels), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_samplerate), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_folder), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_filename), TRUE); gtk_widget_set_hexpand (GTK_WIDGET(info_mimetype), TRUE); /* Attach labels */ gtk_grid_attach (GTK_GRID(properties_table), label_length, 0, 0, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_length, 1, 0, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), label_bitrate, 0, 1, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_bitrate, 1, 1, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), label_channels, 0, 2, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_channels, 1, 2, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), label_samplerate, 0, 3, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_samplerate, 1, 3, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), label_folder, 0, 4, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_folder, 1, 4, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), label_filename, 0, 5, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_filename, 1, 5, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), label_mimetype, 0, 6, 1, 1); gtk_grid_attach (GTK_GRID(properties_table), info_mimetype, 1, 6, 1, 1); /* The main edit dialog */ dialog = gtk_dialog_new_with_buttons (_("Details"), GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Ok"), GTK_RESPONSE_OK, NULL); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), properties_table); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(pragha_track_properties_response), NULL); gtk_widget_show_all(dialog); g_free(length); g_free(bitrate); g_free(channels); g_free(samplerate); g_free(folder); g_free(filename); } /* * Track tags editing dialog. */ static void pragha_title_entry_change (GtkEntry *entry, PraghaTagsDialog *dialog) { gchar *str_title = NULL; const gchar *title = NULL, *file = NULL; title = gtk_entry_get_text (GTK_ENTRY(dialog->title_entry)); file = gtk_entry_get_text (GTK_ENTRY(dialog->file_entry)); str_title = pragha_tags_dialog_get_title (title, file); pragha_header_set_title (dialog->header, str_title); g_free (str_title); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->title_check_change), TRUE); gtk_widget_show (GTK_WIDGET(dialog->title_check_change)); } static void pragha_title_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { const gchar *title = NULL; if (!gtk_toggle_button_get_active(toggle)) { title = pragha_musicobject_get_title (dialog->mobj); gtk_entry_set_text (GTK_ENTRY(dialog->title_entry), title); gtk_widget_hide (GTK_WIDGET(dialog->title_check_change)); } } static void pragha_artist_entry_change (GtkEntry *entry, PraghaTagsDialog *dialog) { gchar *str_subtitle = NULL; const gchar *artist = NULL, *album = NULL; artist = gtk_entry_get_text (GTK_ENTRY(dialog->artist_entry)); album = gtk_entry_get_text (GTK_ENTRY(dialog->album_entry)); str_subtitle = pragha_tags_dialog_get_subtitle (artist, album); pragha_header_set_subtitle (dialog->header, str_subtitle); g_free (str_subtitle); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->artist_check_change), TRUE); gtk_widget_show (GTK_WIDGET(dialog->artist_check_change)); } static void pragha_artist_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { const gchar *artist = NULL; if (!gtk_toggle_button_get_active(toggle)) { artist = pragha_musicobject_get_artist (dialog->mobj); gtk_entry_set_text (GTK_ENTRY(dialog->artist_entry), artist); gtk_widget_hide (GTK_WIDGET(dialog->artist_check_change)); } } static void pragha_album_entry_change (GtkEntry *entry, PraghaTagsDialog *dialog) { gchar *str_subtitle = NULL; const gchar *artist = NULL, *album = NULL; artist = gtk_entry_get_text (GTK_ENTRY(dialog->artist_entry)); album = gtk_entry_get_text (GTK_ENTRY(dialog->album_entry)); str_subtitle = pragha_tags_dialog_get_subtitle (artist, album); pragha_header_set_subtitle (dialog->header, str_subtitle); g_free (str_subtitle); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->album_check_change), TRUE); gtk_widget_show (GTK_WIDGET(dialog->album_check_change)); } static void pragha_album_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { const gchar *album = NULL; if (!gtk_toggle_button_get_active(toggle)) { album = pragha_musicobject_get_album (dialog->mobj); gtk_entry_set_text (GTK_ENTRY(dialog->album_entry), album); gtk_widget_hide (GTK_WIDGET(dialog->album_check_change)); } } static void pragha_genre_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { const gchar *genre = NULL; if (!gtk_toggle_button_get_active(toggle)) { genre = pragha_musicobject_get_genre (dialog->mobj); gtk_entry_set_text (GTK_ENTRY(dialog->genre_entry), genre); gtk_widget_hide (GTK_WIDGET(dialog->genre_check_change)); } } static void pragha_track_no_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { if (!gtk_toggle_button_get_active(toggle)) { gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->track_no_entry), pragha_musicobject_get_track_no (dialog->mobj)); gtk_widget_hide (GTK_WIDGET(dialog->track_no_check_change)); } } static void pragha_year_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { if (!gtk_toggle_button_get_active(toggle)) { gtk_spin_button_set_value (GTK_SPIN_BUTTON(dialog->year_entry), pragha_musicobject_get_year (dialog->mobj)); gtk_widget_hide (GTK_WIDGET(dialog->year_check_change)); } } static void pragha_comment_check_toggled (GtkToggleButton *toggle, PraghaTagsDialog *dialog) { GtkTextBuffer *buffer; const gchar *comment = NULL; if (!gtk_toggle_button_get_active(toggle)) { comment = pragha_musicobject_get_comment (dialog->mobj); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->comment_entry)); gtk_text_buffer_set_text (buffer, comment, -1); gtk_widget_hide (GTK_WIDGET(dialog->comment_check_change)); } } static void pragha_tag_entry_change (GtkEntry *entry, GtkCheckButton *check) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), TRUE); gtk_widget_show (GTK_WIDGET(check)); } static void pragha_tag_entry_clear_pressed (GtkEntry *entry, gint position, GdkEventButton *event) { if (position == GTK_ENTRY_ICON_SECONDARY) { gtk_entry_set_text (entry, ""); gtk_widget_grab_focus(GTK_WIDGET(entry)); } } static void pragha_tag_entry_directory_pressed (GtkEntry *entry, gint position, GdkEventButton *event, gpointer user_data) { PraghaMusicobject *mobj; GtkWidget *toplevel; PraghaTagsDialog *dialog = user_data; if (position == GTK_ENTRY_ICON_SECONDARY) { mobj = pragha_tags_dialog_get_musicobject(dialog); toplevel = gtk_widget_get_toplevel(GTK_WIDGET(entry)); gchar *uri = path_get_dir_as_uri (pragha_musicobject_get_file(mobj)); open_url(uri, toplevel); g_free (uri); } } static gboolean pragha_tag_entry_select_text_on_click (GtkWidget *widget, GdkEvent *event, gpointer user_data) { gtk_editable_select_region(GTK_EDITABLE(widget), 0, -1); return FALSE; } gchar * pragha_tag_entry_get_selected_text(GtkWidget *entry) { gint start_sel, end_sel; if (!gtk_editable_get_selection_bounds (GTK_EDITABLE(entry), &start_sel, &end_sel)) return NULL; return gtk_editable_get_chars (GTK_EDITABLE(entry), start_sel, end_sel); } static void pragha_tag_entry_set_text(GtkWidget *entry, const gchar *text) { gtk_entry_set_text(GTK_ENTRY(entry), text); gtk_widget_grab_focus(GTK_WIDGET(entry)); } static void pragha_file_entry_open_folder (GtkMenuItem *menuitem, PraghaTagsDialog *dialog) { GtkWidget *toplevel; const gchar *file; gchar *uri; file = gtk_entry_get_text (GTK_ENTRY(dialog->file_entry)); toplevel = gtk_widget_get_toplevel(GTK_WIDGET(dialog->file_entry)); uri = path_get_dir_as_uri (file); open_url(uri, toplevel); g_free (uri); } static void pragha_file_entry_selection_to_title (GtkMenuItem *menuitem,PraghaTagsDialog *dialog) { gchar *text = pragha_tag_entry_get_selected_text(dialog->file_entry); if(text) { pragha_tag_entry_set_text(dialog->title_entry, text); g_free(text); } } static void pragha_file_entry_selection_to_artist (GtkMenuItem *menuitem, PraghaTagsDialog *dialog) { gchar *text = pragha_tag_entry_get_selected_text(dialog->file_entry); if(text) { pragha_tag_entry_set_text(dialog->artist_entry, text); g_free(text); } } static void pragha_file_entry_selection_to_album (GtkMenuItem *menuitem, PraghaTagsDialog *dialog) { gchar *text = pragha_tag_entry_get_selected_text(dialog->file_entry); if(text) { pragha_tag_entry_set_text(dialog->album_entry, text); g_free(text); } } static void pragha_file_entry_selection_to_genre (GtkMenuItem *menuitem, PraghaTagsDialog *dialog) { gchar *text = pragha_tag_entry_get_selected_text(dialog->file_entry); if(text) { pragha_tag_entry_set_text(dialog->genre_entry, text); g_free(text); } } static void pragha_file_entry_selection_to_comment (GtkMenuItem *menuitem, PraghaTagsDialog *dialog) { GtkTextBuffer *buffer; gchar *text = pragha_tag_entry_get_selected_text(dialog->file_entry); if(text) { buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (dialog->comment_entry)); gtk_text_buffer_set_text (buffer, text, -1); g_free(text); } } static void pragha_file_entry_populate_menu (GtkEntry *entry, GtkMenu *menu, gpointer user_data) { GtkWidget *submenu, *item; PraghaTagsDialog *dialog = user_data; item = gtk_separator_menu_item_new (); gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); item = gtk_menu_item_new_with_mnemonic (_("Selection to")); gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); submenu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu); item = gtk_menu_item_new_with_label (_("Title")); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pragha_file_entry_selection_to_title), dialog); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); item = gtk_menu_item_new_with_label (_("Artist")); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pragha_file_entry_selection_to_artist), dialog); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); item = gtk_menu_item_new_with_label (_("Album")); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pragha_file_entry_selection_to_album), dialog); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); item = gtk_menu_item_new_with_label (_("Genre")); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pragha_file_entry_selection_to_genre), dialog); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); item = gtk_menu_item_new_with_label (_("Comment")); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pragha_file_entry_selection_to_comment), dialog); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); gtk_widget_show_all (submenu); if (!gtk_editable_get_selection_bounds (GTK_EDITABLE(dialog->file_entry), NULL, NULL)) gtk_widget_set_sensitive (submenu, FALSE); item = gtk_menu_item_new_with_mnemonic (_("Open folder")); g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (pragha_file_entry_open_folder), dialog); gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item); gtk_widget_show (item); } GtkEntryCompletion * pragha_tags_get_entry_completion_from_table(const gchar *table) { PraghaDatabase *cdbase; PraghaPreparedStatement *statement; gchar *sql; GtkEntryCompletion *completion; GtkListStore *model; GtkTreeIter iter; cdbase = pragha_database_get (); model = gtk_list_store_new(1, G_TYPE_STRING); sql = g_strdup_printf("SELECT name FROM %s ORDER BY name DESC", table); statement = pragha_database_create_statement (cdbase, sql); while (pragha_prepared_statement_step (statement)) { const gchar *name = pragha_prepared_statement_get_string (statement, 0); gtk_list_store_insert_with_values (GTK_LIST_STORE(model), &iter, 0, 0, name, -1); } pragha_prepared_statement_free (statement); g_object_unref(G_OBJECT(cdbase)); g_free(sql); completion = gtk_entry_completion_new(); gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(model)); gtk_entry_completion_set_text_column(completion, 0); g_object_unref(model); return completion; } �������������������������������������������������pragha-1.3.4/src/pragha-tags-dialog.h���������������������������������������������������������������0000664�0000000�0000000�00000005554�13435240150�0017362�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_TAGS_DIALOG_H #define PRAGHA_TAGS_DIALOG_H #include <glib-object.h> #include <gtk/gtk.h> #include "pragha-musicobject.h" G_BEGIN_DECLS #define PRAGHA_TYPE_TAGS_DIALOG (pragha_tags_dialog_get_type ()) #define PRAGHA_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TAGS_DIALOG, PraghaTagsDialog)) #define PRAGHA_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TAGS_DIALOG, PraghaTagsDialogClass)) #define PRAGHA_IS_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TAGS_DIALOG)) #define PRAGHA_IS_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHAL_TYPE_TAGS_DIALOG)) #define PRAGHA_TAGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TAGS_DIALOG, PraghaTagsDialogClass)) #define TAG_MAX_LEN 256 typedef struct _PraghaTagsDialogClass PraghaTagsDialogClass; typedef struct _PraghaTagsDialog PraghaTagsDialog; GType pragha_tags_dialog_get_type (void) G_GNUC_CONST; PraghaMusicobject *pragha_tags_dialog_get_musicobject (PraghaTagsDialog *dialog); void pragha_tags_dialog_set_musicobject (PraghaTagsDialog *dialog, PraghaMusicobject *mobj); void pragha_tags_dialog_set_changed (PraghaTagsDialog *dialog, gint changed); gint pragha_tags_dialog_get_changed (PraghaTagsDialog *dialog); GtkWidget *pragha_tags_dialog_new (void); void pragha_track_properties_dialog (PraghaMusicobject *mobj, GtkWidget *parent); G_END_DECLS #endif /* PRAGHA_TAGS_DIALOG_H */����������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-tags-mgmt.c�����������������������������������������������������������������0000664�0000000�0000000�00000015412�13435240150�0017054�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-tags-mgmt.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <stdlib.h> #include <tag_c.h> #include "pragha-tagger.h" #include "pragha-hig.h" #include "pragha-utils.h" #include "pragha-musicobject-mgmt.h" #include "pragha-debug.h" gboolean pragha_musicobject_set_tags_from_file(PraghaMusicobject *mobj, const gchar *file) { gboolean ret = TRUE; TagLib_File *tfile = NULL; TagLib_Tag *tag; const TagLib_AudioProperties *audio_prop; gchar *title = NULL, *artist = NULL, *album = NULL, *genre = NULL, *comment = NULL; /* workaround for crash in taglib https://github.com/taglib/taglib/issues/78 */ if (!g_file_test (file, G_FILE_TEST_EXISTS)) { g_warning("Unable to open file using taglib : %s", file); ret = FALSE; goto exit; } #ifdef G_OS_WIN32 GError *err = NULL; gchar *encoded_file = g_locale_from_utf8(file, -1, NULL, NULL, &err); if (!encoded_file) { g_warning("Unable to get filename from UTF-8 string: %s", file); g_error_free(err); err = NULL; } else { tfile = taglib_file_new(encoded_file); g_free(encoded_file); } #else tfile = taglib_file_new(file); #endif if (!tfile) { g_warning("Unable to open file using taglib : %s", file); ret = FALSE; goto exit; } tag = taglib_file_tag(tfile); if (!tag) { g_warning("Unable to locate tag in file %s", file); ret = FALSE; goto exit; } audio_prop = taglib_file_audioproperties(tfile); if (!audio_prop) { g_warning("Unable to locate audio properties in file %s", file); ret = FALSE; goto exit; } title = taglib_tag_title(tag); artist = taglib_tag_artist(tag); album = taglib_tag_album(tag); genre = taglib_tag_genre(tag); comment = taglib_tag_comment(tag); g_object_set (mobj, "title", title, "artist", artist, "album", album, "genre", genre, "comment", comment, "year", taglib_tag_year(tag), "track-no", taglib_tag_track(tag), "length", taglib_audioproperties_length(audio_prop), "bitrate", taglib_audioproperties_bitrate(audio_prop), "channels", taglib_audioproperties_channels(audio_prop), "samplerate", taglib_audioproperties_samplerate(audio_prop), NULL); free(title); free(artist); free(album); free(genre); free(comment); exit: taglib_file_free(tfile); return ret; } gboolean pragha_musicobject_save_tags_to_file(gchar *file, PraghaMusicobject *mobj, int changed) { gboolean ret = TRUE; TagLib_File *tfile; TagLib_Tag *tag; if (!file || !changed) return FALSE; tfile = taglib_file_new(file); if (!tfile) { g_warning("Unable to open file using taglib : %s", file); return FALSE; } tag = taglib_file_tag(tfile); if (!tag) { g_warning("Unable to locate tag in file %s", file); ret = FALSE; goto exit; } if (changed & TAG_TNO_CHANGED) taglib_tag_set_track(tag, pragha_musicobject_get_track_no(mobj)); if (changed & TAG_TITLE_CHANGED) taglib_tag_set_title(tag, pragha_musicobject_get_title(mobj)); if (changed & TAG_ARTIST_CHANGED) taglib_tag_set_artist(tag, pragha_musicobject_get_artist(mobj)); if (changed & TAG_ALBUM_CHANGED) taglib_tag_set_album(tag, pragha_musicobject_get_album(mobj)); if (changed & TAG_GENRE_CHANGED) taglib_tag_set_genre(tag, pragha_musicobject_get_genre(mobj)); if (changed & TAG_YEAR_CHANGED) taglib_tag_set_year(tag, pragha_musicobject_get_year(mobj)); if (changed & TAG_COMMENT_CHANGED) taglib_tag_set_comment(tag, pragha_musicobject_get_comment(mobj)); CDEBUG(DBG_VERBOSE, "Saving tags for file: %s", file); if (!taglib_file_save(tfile)) { g_warning("Unable to save tags for: %s\n", file); ret = FALSE; } taglib_tag_free_strings(); exit: taglib_file_free(tfile); return ret; } /***************/ /* Tag Editing */ /***************/ gboolean confirm_tno_multiple_tracks(gint tno, GtkWidget *parent) { GtkWidget *dialog; gint response; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Do you want to set the track number of ALL of the selected tracks to: %d ?"), tno); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return (response == GTK_RESPONSE_YES); } gboolean confirm_title_multiple_tracks(const gchar *title, GtkWidget *parent) { GtkWidget *dialog; gint response; dialog = gtk_message_dialog_new(GTK_WINDOW(parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Do you want to set the title tag of ALL of the selected tracks to: %s ?"), title); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return (response == GTK_RESPONSE_YES); } void pragha_update_local_files_change_tag(GPtrArray *file_arr, gint changed, PraghaMusicobject *mobj) { guint i = 0; gchar *elem; if (!changed) return; if (!file_arr) return; CDEBUG(DBG_VERBOSE, "Tags Changed: 0x%x", changed); /* This is so fscking horrible. */ if (file_arr) { for (i = 0; i < file_arr->len; i++) { elem = g_ptr_array_index(file_arr, i); if (elem) (void)pragha_musicobject_save_tags_to_file(elem, mobj, changed); } } } ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-tags-mgmt.h�����������������������������������������������������������������0000664�0000000�0000000�00000003522�13435240150�0017060�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_TAGS_MGMT_H #define PRAGHA_TAGS_MGMT_H #include <gtk/gtk.h> #include "pragha-musicobject.h" gboolean pragha_musicobject_set_tags_from_file(PraghaMusicobject *mobj, const gchar *file); gboolean pragha_musicobject_save_tags_to_file(gchar *file, PraghaMusicobject *mobj, int changed); gboolean confirm_tno_multiple_tracks(gint tno, GtkWidget *parent); gboolean confirm_title_multiple_tracks(const gchar *title, GtkWidget *parent); void pragha_update_local_files_change_tag(GPtrArray *file_arr, gint changed, PraghaMusicobject *mobj); #endif /* PRAGHA_TAGS_MGMT_H */������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-toolbar.c�������������������������������������������������������������������0000664�0000000�0000000�00000102103�13435240150�0016610�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2014 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-toolbar.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <gdk/gdkkeysyms.h> #include "pragha-simple-widgets.h" #include "pragha-utils.h" static void pragha_toolbar_finalize (GObject *object); static void pragha_toolbar_set_remaning_mode (PraghaToolbar *toolbar, gboolean remaning_mode); gboolean pragha_toolbar_get_remaning_mode (PraghaToolbar *toolbar); struct _PraghaToolbar { #if GTK_CHECK_VERSION (3, 12, 0) GtkHeaderBar __parent__; #else GtkToolbar __parent__; #endif PraghaAlbumArt *albumart; GtkWidget *track_progress_bar; PraghaToolbarButton *prev_button; PraghaToolbarButton *play_button; PraghaToolbarButton *stop_button; PraghaToolbarButton *next_button; PraghaToolbarButton *unfull_button; GtkWidget *vol_button; GtkWidget *extra_button_box; GtkWidget *track_length_label; GtkWidget *track_time_label; GtkWidget *now_playing_label; GtkWidget *extention_box; gboolean remaning_mode; }; enum { PROP_0, PROP_VOLUME, PROP_REMANING_MODE, PROP_LAST }; static GParamSpec *properties[PROP_LAST] = { 0 }; enum { PREV_ACTIVATED, PLAY_ACTIVATED, STOP_ACTIVATED, NEXT_ACTIVATED, ALBUM_ART_ACTIVATED, TRACK_INFO_ACTIVATED, TRACK_PROGRESS_ACTIVATED, UNFULL_ACTIVATED, TRACK_TIME_ACTIVATED, LAST_SIGNAL }; static int signals[LAST_SIGNAL] = { 0 }; #if GTK_CHECK_VERSION (3, 12, 0) G_DEFINE_TYPE(PraghaToolbar, pragha_toolbar, GTK_TYPE_HEADER_BAR) #else G_DEFINE_TYPE(PraghaToolbar, pragha_toolbar, GTK_TYPE_TOOLBAR) #endif void pragha_toolbar_update_progress (PraghaToolbar *toolbar, gint length, gint progress) { gdouble fraction = 0; gchar *tot_length = NULL, *cur_pos = NULL, *str_length = NULL, *str_cur_pos = NULL; cur_pos = convert_length_str(progress); str_cur_pos = g_markup_printf_escaped ("<small>%s</small>", cur_pos); if (length == 0 || !pragha_toolbar_get_remaning_mode (toolbar)) { tot_length = convert_length_str(length); str_length = g_markup_printf_escaped ("<small>%s</small>", tot_length); } else { tot_length = convert_length_str(length - progress); str_length = g_markup_printf_escaped ("<small>- %s</small>", tot_length); } gtk_label_set_markup (GTK_LABEL(toolbar->track_time_label), str_cur_pos); gtk_label_set_markup (GTK_LABEL(toolbar->track_length_label), str_length); gtk_tooltip_trigger_tooltip_query(gtk_widget_get_display (toolbar->track_length_label)); if(length) { fraction = (gdouble) progress / (gdouble)length; gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(toolbar->track_progress_bar), fraction); } g_free(cur_pos); g_free(str_cur_pos); g_free(tot_length); g_free(str_length); } void pragha_toolbar_set_title (PraghaToolbar *toolbar, PraghaMusicobject *mobj) { gchar *str = NULL, *str_title = NULL; const gchar *file = pragha_musicobject_get_file (mobj); const gchar *title = pragha_musicobject_get_title (mobj); const gchar *artist = pragha_musicobject_get_artist (mobj); const gchar *album = pragha_musicobject_get_album (mobj); if(string_is_not_empty(title)) str_title = g_strdup(title); else str_title = get_display_filename(file, FALSE); if(string_is_not_empty(artist) && string_is_not_empty(album)) str = g_markup_printf_escaped (_("%s <small><span weight=\"light\">by</span></small> %s <small><span weight=\"light\">in</span></small> %s"), str_title, artist, album); else if(string_is_not_empty(artist)) str = g_markup_printf_escaped (_("%s <small><span weight=\"light\">by</span></small> %s"), str_title, artist); else if(string_is_not_empty(album)) str = g_markup_printf_escaped (_("%s <small><span weight=\"light\">in</span></small> %s"), str_title, album); else str = g_markup_printf_escaped("%s", str_title); gtk_label_set_markup(GTK_LABEL(toolbar->now_playing_label), str); g_free(str_title); g_free(str); } static void pragha_toolbar_unset_song_info(PraghaToolbar *toolbar) { gtk_label_set_markup(GTK_LABEL(toolbar->now_playing_label), _("<b>Not playing</b>")); gtk_label_set_markup(GTK_LABEL(toolbar->track_length_label), "<small>--:--</small>"); gtk_label_set_markup(GTK_LABEL(toolbar->track_time_label), "<small>00:00</small>"); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(toolbar->track_progress_bar), 0); pragha_album_art_set_path(toolbar->albumart, NULL); } static void pragha_toolbar_timer_label_event_change_mode (GtkWidget *widget, GdkEventButton *event, PraghaToolbar *toolbar) { pragha_toolbar_set_remaning_mode (toolbar, !pragha_toolbar_get_remaning_mode (toolbar)); } void pragha_toolbar_set_image_album_art (PraghaToolbar *toolbar, const gchar *uri) { pragha_album_art_set_path (toolbar->albumart, uri); } /* Grab focus on current playlist when press Up or Down and move between controls with Left or Right */ /*static gboolean panel_button_key_press (GtkWidget *win, GdkEventKey *event, PraghaApplication *pragha) { gboolean ret = FALSE; if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_Page_Up || event->keyval == GDK_KEY_Page_Down) { ret = pragha_playlist_propagate_event(pragha->cplaylist, event); } return ret; }*/ /* * Emit signals.. */ static gboolean play_button_handler(GtkButton *button, PraghaToolbar *toolbar) { g_signal_emit (toolbar, signals[PLAY_ACTIVATED], 0); return TRUE; } static gboolean stop_button_handler(GtkButton *button, PraghaToolbar *toolbar) { g_signal_emit (toolbar, signals[STOP_ACTIVATED], 0); return TRUE; } static gboolean prev_button_handler(GtkButton *button, PraghaToolbar *toolbar) { g_signal_emit (toolbar, signals[PREV_ACTIVATED], 0); return TRUE; } static gboolean next_button_handler(GtkButton *button, PraghaToolbar *toolbar) { g_signal_emit (toolbar, signals[NEXT_ACTIVATED], 0); return TRUE; } static gboolean unfull_button_handler (GtkButton *button, PraghaToolbar *toolbar) { g_signal_emit (toolbar, signals[UNFULL_ACTIVATED], 0); return TRUE; } static gboolean pragha_toolbar_album_art_activated (GtkWidget *event_box, GdkEventButton *event, PraghaToolbar *toolbar) { if (event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) #if GTK_CHECK_VERSION (3, 12, 0) if (!gtk_header_bar_get_show_close_button(GTK_HEADER_BAR(toolbar))) #endif g_signal_emit (toolbar, signals[ALBUM_ART_ACTIVATED], 0); return FALSE; } static gboolean pragha_toolbar_song_label_event_edit (GtkWidget *event_box, GdkEventButton *event, PraghaToolbar *toolbar) { if (event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS) #if GTK_CHECK_VERSION (3, 12, 0) if (!gtk_header_bar_get_show_close_button(GTK_HEADER_BAR(toolbar))) #endif g_signal_emit (toolbar, signals[TRACK_INFO_ACTIVATED], 0); return FALSE; } static void pragha_toolbar_progress_bar_event_seek (GtkWidget *widget, GdkEventButton *event, PraghaToolbar *toolbar) { GtkAllocation allocation; gdouble fraction = 0; if (event->button != 1) return; gtk_widget_get_allocation(widget, &allocation); fraction = (gdouble) event->x / allocation.width; g_signal_emit (toolbar, signals[TRACK_PROGRESS_ACTIVATED], 0, fraction); } /* * Callbacks that response to gstreamer signals. */ void pragha_toolbar_update_buffering_cb (PraghaBackend *backend, gint percent, gpointer user_data) { PraghaToolbar *toolbar = user_data; gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(toolbar->track_progress_bar), (gdouble)percent/100); } void pragha_toolbar_update_playback_progress(PraghaBackend *backend, gpointer user_data) { gint length = 0, newsec = 0; PraghaMusicobject *mobj = NULL; PraghaToolbar *toolbar = user_data; newsec = GST_TIME_AS_SECONDS(pragha_backend_get_current_position(backend)); if (newsec > 0) { mobj = pragha_backend_get_musicobject (backend); length = pragha_musicobject_get_length (mobj); if (length > 0) { pragha_toolbar_update_progress (toolbar, length, newsec); } else { gint nlength = GST_TIME_AS_SECONDS(pragha_backend_get_current_length(backend)); pragha_musicobject_set_length (mobj, nlength); } } } void pragha_toolbar_playback_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data) { PraghaToolbar *toolbar = user_data; PraghaBackendState state = pragha_backend_get_state (backend); gboolean playing = (state != ST_STOPPED); gtk_widget_set_sensitive (GTK_WIDGET(toolbar->prev_button), playing); pragha_toolbar_button_set_icon_name (toolbar->play_button, (state == ST_PLAYING) ? "media-playback-pause" : "media-playback-start"); gtk_widget_set_sensitive (GTK_WIDGET(toolbar->stop_button), playing); gtk_widget_set_sensitive (GTK_WIDGET(toolbar->next_button), playing); if (playing == FALSE) pragha_toolbar_unset_song_info(toolbar); } void pragha_toolbar_show_ramaning_time_cb (PraghaToolbar *toolbar, GParamSpec *pspec, gpointer user_data) { PraghaBackend *backend = user_data; pragha_toolbar_update_playback_progress (backend, toolbar); } /* * Show the unfullscreen button according to the state of the window. */ gboolean pragha_toolbar_window_state_event (GtkWidget *widget, GdkEventWindowState *event, PraghaToolbar *toolbar) { if (event->type == GDK_WINDOW_STATE && (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)) { gtk_widget_set_visible(GTK_WIDGET(toolbar->unfull_button), (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0); } return FALSE; } /* * Public api. */ #if GTK_CHECK_VERSION (3, 12, 0) void pragha_toolbar_set_style (PraghaToolbar *toolbar, gboolean system_titlebar) { GtkStyleContext *context; context = gtk_widget_get_style_context (GTK_WIDGET(toolbar)); if (system_titlebar) { gtk_style_context_remove_class (context, "header-bar"); gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOOLBAR); gtk_style_context_add_class (context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR); } else { gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TOOLBAR); gtk_style_context_remove_class (context, GTK_STYLE_CLASS_PRIMARY_TOOLBAR); gtk_style_context_add_class (context, "header-bar"); } gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(toolbar), !system_titlebar); } #endif void pragha_toolbar_add_extention_widget(PraghaToolbar *toolbar, GtkWidget *widget) { GList *list; GtkWidget *children; list = gtk_container_get_children (GTK_CONTAINER(toolbar->extention_box)); if(list) { children = list->data; gtk_container_remove(GTK_CONTAINER(toolbar->extention_box), children); gtk_widget_destroy(GTK_WIDGET(children)); g_list_free(list); } gtk_container_add(GTK_CONTAINER(toolbar->extention_box), widget); } void pragha_toolbar_add_extra_button (PraghaToolbar *toolbar, GtkWidget *widget) { GList *list; GtkWidget *children; list = gtk_container_get_children (GTK_CONTAINER(toolbar->extra_button_box)); if(list) { children = list->data; gtk_container_remove(GTK_CONTAINER(toolbar->extra_button_box), children); gtk_widget_destroy(GTK_WIDGET(children)); g_list_free(list); } gtk_container_add(GTK_CONTAINER(toolbar->extra_button_box), widget); } const gchar* pragha_toolbar_get_progress_text(PraghaToolbar *toolbar) { return gtk_label_get_text (GTK_LABEL(toolbar->track_time_label)); } const gchar* pragha_toolbar_get_length_text(PraghaToolbar *toolbar) { return gtk_label_get_text (GTK_LABEL(toolbar->track_length_label)); } PraghaAlbumArt * pragha_toolbar_get_album_art(PraghaToolbar *toolbar) { return toolbar->albumart; } /* * Pragha toolbar creation and destruction. */ GtkWidget * pragha_toolbar_get_song_box (PraghaToolbar *toolbar) { PraghaPreferences *preferences; PraghaAlbumArt *albumart; PraghaContainer *box; GtkWidget *hbox, *vbox_aling, *vbox, *top_hbox, *botton_hbox; GtkWidget *album_art_frame,*title, *title_event_box, *extention_box; GtkWidget *progress_bar, *progress_bar_event_box, *time_label, *time_align, *length_label, *length_align, *length_event_box; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; preferences = pragha_preferences_get(); /* * Main box that allow expand. */ box = pragha_container_new (); /* * Main box: [Album][Song info] */ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start (GTK_BOX(box), hbox, TRUE, TRUE, 0); album_art_frame = gtk_event_box_new (); gtk_event_box_set_visible_window(GTK_EVENT_BOX(album_art_frame), FALSE); g_signal_connect(G_OBJECT (album_art_frame), "button_press_event", G_CALLBACK (pragha_toolbar_album_art_activated), toolbar); gtk_box_pack_start (GTK_BOX(hbox), album_art_frame, FALSE, FALSE, 2); albumart = pragha_album_art_new (); g_object_bind_property (preferences, "album-art-size", albumart, "size", binding_flags); g_object_bind_property (preferences, "show-album-art", albumart, "visible", binding_flags); gtk_container_add(GTK_CONTAINER(album_art_frame), GTK_WIDGET(albumart)); toolbar->albumart = albumart; /* * Song info vbox */ vbox_aling = gtk_alignment_new(0.5, 0.5, 1, 0); vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); gtk_container_add(GTK_CONTAINER(vbox_aling), GTK_WIDGET(vbox)); /* * Top box: [Title][extentions] */ top_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(vbox), top_hbox, TRUE, TRUE, 0); /* The title widget. */ title_event_box = gtk_event_box_new(); gtk_event_box_set_visible_window(GTK_EVENT_BOX(title_event_box), FALSE); g_signal_connect (G_OBJECT(title_event_box), "button-press-event", G_CALLBACK(pragha_toolbar_song_label_event_edit), toolbar); title = gtk_label_new(NULL); gtk_label_set_ellipsize (GTK_LABEL(title), PANGO_ELLIPSIZE_END); gtk_label_set_markup(GTK_LABEL(title),_("<b>Not playing</b>")); gtk_misc_set_alignment(GTK_MISC(title), 0, 0.5); gtk_container_add (GTK_CONTAINER(title_event_box), title); /* The extentions box. */ extention_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); /* Pack top widgets: */ gtk_box_pack_start (GTK_BOX(top_hbox), GTK_WIDGET(title_event_box), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(top_hbox), GTK_WIDGET(extention_box), FALSE, FALSE, 0); /* * Botton box: [Time][ProgressBar][Length] */ botton_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0); gtk_box_pack_start(GTK_BOX(vbox), botton_hbox, FALSE, FALSE, 0); /* Time progress widget. */ time_align = gtk_alignment_new(1, 0.5, 0, 0); time_label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(time_label),"<small>00:00</small>"); gtk_container_add(GTK_CONTAINER(time_align), time_label); /* Progress bar widget. */ progress_bar_event_box = gtk_event_box_new(); gtk_event_box_set_visible_window(GTK_EVENT_BOX(progress_bar_event_box), FALSE); g_signal_connect (G_OBJECT(progress_bar_event_box), "button-press-event", G_CALLBACK(pragha_toolbar_progress_bar_event_seek), toolbar); #if GTK_CHECK_VERSION (3, 14, 0) progress_bar = gtk_progress_bar_new (); gtk_widget_set_valign (GTK_WIDGET(progress_bar), GTK_ALIGN_CENTER); #else progress_bar = GTK_WIDGET(pragha_track_progress_new ()); #endif gtk_container_add (GTK_CONTAINER(progress_bar_event_box), GTK_WIDGET(progress_bar)); /* Length and remaining time widget. */ length_event_box = gtk_event_box_new(); gtk_event_box_set_visible_window(GTK_EVENT_BOX(length_event_box), FALSE); g_signal_connect (G_OBJECT(length_event_box), "button-press-event", G_CALLBACK(pragha_toolbar_timer_label_event_change_mode), toolbar); length_align = gtk_alignment_new(0, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(length_event_box), length_align); length_label = gtk_label_new(NULL); gtk_label_set_markup(GTK_LABEL(length_label),"<small>--:--</small>"); gtk_container_add(GTK_CONTAINER(length_align), length_label); /* Pack widgets. */ gtk_box_pack_start (GTK_BOX(botton_hbox), GTK_WIDGET(time_align), FALSE, FALSE, 3); gtk_box_pack_start (GTK_BOX(botton_hbox), GTK_WIDGET(progress_bar_event_box), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(botton_hbox), GTK_WIDGET(length_event_box), FALSE, FALSE, 3); /* Save references. */ toolbar->track_progress_bar = progress_bar; toolbar->now_playing_label = title; toolbar->track_time_label = time_label; toolbar->track_length_label = length_label; toolbar->extention_box = extention_box; gtk_box_pack_start(GTK_BOX(hbox), vbox_aling, TRUE, TRUE, 2); gtk_widget_show_all(GTK_WIDGET(vbox_aling)); gtk_widget_show(GTK_WIDGET(album_art_frame)); gtk_widget_show(GTK_WIDGET(hbox)); gtk_widget_show(GTK_WIDGET(box)); g_object_unref(preferences); return GTK_WIDGET(box); } #if !GTK_CHECK_VERSION (3, 12, 0) static void gtk_tool_insert_generic_item(GtkToolbar *toolbar, GtkWidget *item) { GtkWidget *align_box; GtkToolItem *boxitem; boxitem = gtk_tool_item_new (); align_box = gtk_alignment_new(0, 0.5, 0, 0); gtk_container_add(GTK_CONTAINER(align_box), item); gtk_container_add (GTK_CONTAINER(boxitem), align_box); gtk_toolbar_insert (GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(boxitem), -1); } #endif static void vol_button_value_changed (GtkVolumeButton *button, gdouble value, PraghaToolbar *toolbar) { g_object_notify_by_pspec (G_OBJECT (toolbar), properties[PROP_VOLUME]); } static void pragha_toolbar_set_volume (PraghaToolbar *toolbar, gdouble volume) { gtk_scale_button_set_value (GTK_SCALE_BUTTON(toolbar->vol_button), volume); } gdouble pragha_toolbar_get_volume (PraghaToolbar *toolbar) { return gtk_scale_button_get_value (GTK_SCALE_BUTTON(toolbar->vol_button)); } static void pragha_toolbar_set_remaning_mode (PraghaToolbar *toolbar, gboolean remaning_mode) { toolbar->remaning_mode = remaning_mode; g_object_notify_by_pspec(G_OBJECT(toolbar), properties[PROP_REMANING_MODE]); } gboolean pragha_toolbar_get_remaning_mode (PraghaToolbar *toolbar) { return toolbar->remaning_mode; } static void pragha_toolbar_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { PraghaToolbar *toolbar = PRAGHA_TOOLBAR (object); switch (property_id) { case PROP_VOLUME: pragha_toolbar_set_volume (toolbar, g_value_get_double (value)); break; case PROP_REMANING_MODE: pragha_toolbar_set_remaning_mode (toolbar, g_value_get_boolean (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } static void pragha_toolbar_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { PraghaToolbar *toolbar = PRAGHA_TOOLBAR (object); switch (property_id) { case PROP_VOLUME: g_value_set_double (value, pragha_toolbar_get_volume (toolbar)); break; case PROP_REMANING_MODE: g_value_set_boolean (value, pragha_toolbar_get_remaning_mode (toolbar)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } } static void pragha_toolbar_class_init (PraghaToolbarClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->set_property = pragha_toolbar_set_property; gobject_class->get_property = pragha_toolbar_get_property; gobject_class->finalize = pragha_toolbar_finalize; /* * Properties: */ properties[PROP_VOLUME] = g_param_spec_double ("volume", "Volume", "Volume showed on toolbar", 0.0, 1.0, 0.5, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); properties[PROP_REMANING_MODE] = g_param_spec_boolean ("timer-remaining-mode", "TimerRemainingMode", "Show Remaining Time", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, PROP_LAST, properties); /* * Signals: */ signals[PREV_ACTIVATED] = g_signal_new ("prev", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, prev), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[PLAY_ACTIVATED] = g_signal_new ("play", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, play), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[STOP_ACTIVATED] = g_signal_new ("stop", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, stop), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[NEXT_ACTIVATED] = g_signal_new ("next", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, next), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[ALBUM_ART_ACTIVATED] = g_signal_new ("album-art-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, album_art_activated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[TRACK_INFO_ACTIVATED] = g_signal_new ("track-info-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, track_info_activated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[TRACK_PROGRESS_ACTIVATED] = g_signal_new ("track-progress-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, track_progress_activated), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); signals[UNFULL_ACTIVATED] = g_signal_new ("unfull-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, unfull), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void pragha_toolbar_init (PraghaToolbar *toolbar) { PraghaPreferences *preferences; PraghaToolbarButton *prev_button, *play_button, *stop_button, *next_button; PraghaToolbarButton *unfull_button; PraghaToggleButton *shuffle_button, *repeat_button; GtkWidget *vol_button; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; preferences = pragha_preferences_get(); /* Setup Left control buttons */ prev_button = pragha_toolbar_button_new ("media-skip-backward"); gtk_widget_set_tooltip_text(GTK_WIDGET(prev_button), _("Previous Track")); toolbar->prev_button = prev_button; play_button = pragha_toolbar_button_new ("media-playback-start"); gtk_widget_set_tooltip_text(GTK_WIDGET(play_button), _("Play / Pause Track")); toolbar->play_button = play_button; stop_button = pragha_toolbar_button_new ("media-playback-stop"); gtk_widget_set_tooltip_text(GTK_WIDGET(stop_button), _("Stop playback")); toolbar->stop_button = stop_button; next_button = pragha_toolbar_button_new ("media-skip-forward"); gtk_widget_set_tooltip_text(GTK_WIDGET(next_button), _("Next Track")); toolbar->next_button = next_button; #if GTK_CHECK_VERSION (3, 12, 0) gtk_header_bar_pack_start(GTK_HEADER_BAR(toolbar), GTK_WIDGET(prev_button)); gtk_header_bar_pack_start(GTK_HEADER_BAR(toolbar), GTK_WIDGET(play_button)); gtk_header_bar_pack_start(GTK_HEADER_BAR(toolbar), GTK_WIDGET(stop_button)); gtk_header_bar_pack_start(GTK_HEADER_BAR(toolbar), GTK_WIDGET(next_button)); #else gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(prev_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(play_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(stop_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(next_button)); #endif /* Song info Box */ #if !GTK_CHECK_VERSION (3, 12, 0) GtkToolItem *boxitem = gtk_tool_item_new (); gtk_tool_item_set_expand (GTK_TOOL_ITEM(boxitem), TRUE); gtk_toolbar_insert (GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(boxitem), -1); GtkWidget *box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_add (GTK_CONTAINER(boxitem), box); GtkWidget *playing = pragha_toolbar_get_song_box (toolbar); gtk_box_pack_start (GTK_BOX(box), playing, TRUE, TRUE, 5); #endif /* Setup Right control buttons */ unfull_button = pragha_toolbar_button_new ("view-restore"); gtk_widget_set_tooltip_text(GTK_WIDGET(unfull_button), _("Leave Fullscreen")); toolbar->unfull_button = unfull_button; shuffle_button = pragha_toggle_button_new ("media-playlist-shuffle"); gtk_widget_set_tooltip_text(GTK_WIDGET(shuffle_button), _("Play songs in a random order")); repeat_button = pragha_toggle_button_new ("media-playlist-repeat"); gtk_widget_set_tooltip_text(GTK_WIDGET(repeat_button), _("Repeat playback list at the end")); vol_button = gtk_volume_button_new(); g_object_set(vol_button, "use-symbolic", FALSE, NULL); gtk_button_set_relief(GTK_BUTTON(vol_button), GTK_RELIEF_NONE); g_object_set(G_OBJECT(vol_button), "size", GTK_ICON_SIZE_LARGE_TOOLBAR, NULL); gtk_widget_set_valign (GTK_WIDGET(vol_button), GTK_ALIGN_CENTER); toolbar->vol_button = vol_button; toolbar->extra_button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_widget_set_valign (GTK_WIDGET(toolbar->extra_button_box), GTK_ALIGN_CENTER); #if GTK_CHECK_VERSION (3, 12, 0) gtk_header_bar_pack_end(GTK_HEADER_BAR(toolbar), GTK_WIDGET(toolbar->extra_button_box)); gtk_header_bar_pack_end(GTK_HEADER_BAR(toolbar), GTK_WIDGET(vol_button)); gtk_header_bar_pack_end(GTK_HEADER_BAR(toolbar), GTK_WIDGET(repeat_button)); gtk_header_bar_pack_end(GTK_HEADER_BAR(toolbar), GTK_WIDGET(shuffle_button)); gtk_header_bar_pack_end(GTK_HEADER_BAR(toolbar), GTK_WIDGET(unfull_button)); #else gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(unfull_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(shuffle_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(repeat_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(vol_button)); gtk_tool_insert_generic_item(GTK_TOOLBAR(toolbar), GTK_WIDGET(toolbar->extra_button_box)); #endif /* Connect signals */ g_signal_connect(G_OBJECT(prev_button), "clicked", G_CALLBACK(prev_button_handler), toolbar); g_signal_connect(G_OBJECT(play_button), "clicked", G_CALLBACK(play_button_handler), toolbar); g_signal_connect(G_OBJECT(stop_button), "clicked", G_CALLBACK(stop_button_handler), toolbar); g_signal_connect(G_OBJECT(next_button), "clicked", G_CALLBACK(next_button_handler), toolbar); g_signal_connect(G_OBJECT(unfull_button), "clicked", G_CALLBACK(unfull_button_handler), toolbar); /*g_signal_connect(G_OBJECT (prev_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (play_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (stop_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (next_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (next_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (unfull_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (shuffle_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (repeat_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar); g_signal_connect(G_OBJECT (vol_button), "key-press-event", G_CALLBACK(panel_button_key_press), toolbar);*/ g_signal_connect (G_OBJECT (vol_button), "value-changed", G_CALLBACK (vol_button_value_changed), toolbar); g_object_bind_property(preferences, "shuffle", shuffle_button, "active", binding_flags); g_object_bind_property(preferences, "repeat", repeat_button, "active", binding_flags); /* Fix styling */ #if GTK_CHECK_VERSION (3, 12, 0) pragha_toolbar_set_style(toolbar, pragha_preferences_get_system_titlebar (preferences)); #endif g_object_bind_property(preferences, "toolbar-size", prev_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", play_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", stop_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", next_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", unfull_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", shuffle_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", repeat_button, "icon-size", binding_flags); g_object_bind_property(preferences, "toolbar-size", vol_button, "size", binding_flags); gtk_widget_show(GTK_WIDGET(prev_button)); gtk_widget_show(GTK_WIDGET(play_button)); gtk_widget_show(GTK_WIDGET(stop_button)); gtk_widget_show(GTK_WIDGET(next_button)); gtk_widget_show(GTK_WIDGET(shuffle_button)); gtk_widget_show(GTK_WIDGET(repeat_button)); gtk_widget_show(GTK_WIDGET(vol_button)); gtk_widget_show(GTK_WIDGET(toolbar->extra_button_box)); gtk_widget_hide(GTK_WIDGET(toolbar->unfull_button)); gtk_widget_show(GTK_WIDGET(toolbar)); g_object_unref(preferences); } static void pragha_toolbar_finalize (GObject *object) { (*G_OBJECT_CLASS (pragha_toolbar_parent_class)->finalize) (object); } PraghaToolbar * pragha_toolbar_new (void) { return g_object_new (PRAGHA_TYPE_TOOLBAR, NULL); } �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-toolbar.h�������������������������������������������������������������������0000664�0000000�0000000�00000010144�13435240150�0016620�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_TOOLBAR_H #define PRAGHA_TOOLBAR_H #include <gtk/gtk.h> #include "pragha-musicobject.h" #include "pragha-album-art.h" #include "pragha-backend.h" #define PRAGHA_TYPE_TOOLBAR (pragha_toolbar_get_type ()) #define PRAGHA_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TOOLBAR, PraghaToolbar)) #define PRAGHA_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TOOLBAR)) #define PRAGHA_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TOOLBAR, PraghaToolbarClass)) #define PRAGHA_IS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TOOLBAR)) #define PRAGHA_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TOOLBAR, PraghaToolbarClass)) typedef struct _PraghaToolbar PraghaToolbar; typedef struct { #if GTK_CHECK_VERSION (3, 12, 0) GtkHeaderBarClass __parent__; #else GtkToolbarClass __parent__; #endif void (*prev) (PraghaToolbar *toolbar); void (*play) (PraghaToolbar *toolbar); void (*stop) (PraghaToolbar *toolbar); void (*next) (PraghaToolbar *toolbar); void (*album_art_activated) (PraghaToolbar *toolbar); void (*track_info_activated) (PraghaToolbar *toolbar); void (*track_progress_activated) (PraghaToolbar *toolbar, gdouble fraction); void (*unfull) (PraghaToolbar *toolbar); } PraghaToolbarClass; void pragha_toolbar_set_title (PraghaToolbar *toolbar, PraghaMusicobject *mobj); void pragha_toolbar_set_image_album_art (PraghaToolbar *toolbar, const gchar *uri); void pragha_toolbar_update_progress (PraghaToolbar *toolbar, gint length, gint progress); void pragha_toolbar_update_buffering_cb (PraghaBackend *backend, gint percent, gpointer user_data); void pragha_toolbar_update_playback_progress (PraghaBackend *backend, gpointer user_data); void pragha_toolbar_playback_state_cb (PraghaBackend *backend, GParamSpec *pspec, gpointer user_data); void pragha_toolbar_show_ramaning_time_cb (PraghaToolbar *toolbar, GParamSpec *pspec, gpointer user_data); gboolean pragha_toolbar_window_state_event (GtkWidget *widget, GdkEventWindowState *event, PraghaToolbar *toolbar); #if GTK_CHECK_VERSION (3, 12, 0) void pragha_toolbar_set_style (PraghaToolbar *toolbar, gboolean gnome_style); #endif void pragha_toolbar_add_extention_widget (PraghaToolbar *toolbar, GtkWidget *widget); void pragha_toolbar_add_extra_button (PraghaToolbar *toolbar, GtkWidget *widget); const gchar *pragha_toolbar_get_progress_text (PraghaToolbar *toolbar); const gchar *pragha_toolbar_get_length_text (PraghaToolbar *toolbar); GtkWidget *pragha_toolbar_get_song_box (PraghaToolbar *toolbar); PraghaAlbumArt *pragha_toolbar_get_album_art (PraghaToolbar *toolbar); PraghaToolbar *pragha_toolbar_new (void); #endif /* PRAGHA_TOOLBAR_H */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-utils.c���������������������������������������������������������������������0000664�0000000�0000000�00000031347�13435240150�0016321�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-utils.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <glib/gprintf.h> #ifdef G_OS_WIN32 #include <windows.h> #endif /** @brief duplicate utf8 string, truncated after @a num characters if the string is longer than that @param str the string to be duplicated @param num maximum no. of characters in @a str to be processed @return the duplicated string * Based on emelfm2 code. */ gchar *e2_utf8_ndup (const gchar *str, glong num) { glong size = g_utf8_strlen (str, -1); if (num > size) num = size; gchar *end = g_utf8_offset_to_pointer (str, num); glong byte_size = end - str + 1; gchar *utf8 = g_malloc (byte_size); return g_utf8_strncpy (utf8, str, num); } /* Compare two strings and returns the levenshtein distance. * Based on glyr code. Thanks to cpahl. */ gsize levenshtein_strcmp(const gchar * s, const gchar * t) { int n = (s) ? g_utf8_strlen(s,-1)+1 : 0; int m = (t) ? g_utf8_strlen(t,-1)+1 : 0; // NOTE: Be sure to call g_utf8_validate(), might fail otherwise // It's advisable to call g_utf8_normalize() too. // Nothing to compute really.. if (n < 2) return m; if (m < 2) return n; // String matrix int d[n][m]; int i,j; // Init first row|column to 0...n|m for (i=0; i<n; i++) d[i][0] = i; for (j=0; j<m; j++) d[0][j] = j; for (i=1; i<n; i++) { // Current char in string s gunichar cats = g_utf8_get_char(g_utf8_offset_to_pointer(s,i-1)); for (j=1; j<m; j++) { // Do -1 only once int jm1 = j-1, im1 = i-1; gunichar tats = g_utf8_get_char(g_utf8_offset_to_pointer(t,jm1)); // a = above cell, b = left cell, c = left above celli int a = d[im1][j] + 1, b = d[i][jm1] + 1, c = d[im1][jm1] + (tats != cats); // Now compute the minimum of a,b,c and set MIN(a,b,c) to cell d[i][j] d[i][j] = (a < b) ? MIN(a,c) : MIN(b,c); } } // The result is stored in the very right down cell return d[n-1][m-1]; } gsize levenshtein_safe_strcmp(const gchar * s, const gchar * t) { gsize rc = 100; if(g_utf8_validate(s,-1,NULL) == FALSE || g_utf8_validate(t,-1,NULL) == FALSE) return rc; gchar * s_norm = g_utf8_normalize(s, -1 ,G_NORMALIZE_ALL_COMPOSE); gchar * t_norm = g_utf8_normalize(t, -1, G_NORMALIZE_ALL_COMPOSE); rc = levenshtein_strcmp(s_norm, t_norm); g_free(s_norm); g_free(t_norm); return rc; } /* Searches the string haystack for the first occurrence of the string needle * considering a maximum levenshtein distance. */ gchar * g_strstr_lv (gchar *haystack, gchar *needle, gsize lv_distance) { gint needle_len = 0, haystack_len = 0, count = 0; gchar *needle_buf = NULL, *rv = NULL; haystack_len = g_utf8_strlen(haystack, -1); needle_len = g_utf8_strlen(needle, -1); /* UTF-8 bytes are 4 bytes length in the worst case */ needle_buf = g_malloc0(needle_len * 4 + 1); do { g_utf8_strncpy(needle_buf, haystack, needle_len); if (needle_len > 3 && lv_distance != 0) { if(levenshtein_safe_strcmp(needle_buf, needle) <= lv_distance) { rv = haystack; break; } } else { if(g_ascii_strcasecmp(needle_buf, needle) == 0) { rv = haystack; break; } } haystack = g_utf8_next_char(haystack); } while(needle_len + count++ < haystack_len); g_free(needle_buf); return rv; } /* Searches the string haystack for the first occurrence of the string needle, * considering the aproximate_search option. */ gchar * pragha_strstr_lv(gchar *haystack, gchar *needle, PraghaPreferences *preferences) { gboolean aproximate_search; aproximate_search = pragha_preferences_get_approximate_search(preferences); return g_strstr_lv(haystack, needle, aproximate_search ? 1 : 0); } /* Set and remove the watch cursor to suggest background work.*/ void set_watch_cursor (GtkWidget *widget) { GdkCursor *cursor; GtkWidget *toplevel; toplevel = gtk_widget_get_toplevel(GTK_WIDGET(widget)); if (G_LIKELY (toplevel != NULL)) { cursor = gdk_cursor_new (GDK_WATCH); gdk_window_set_cursor (gtk_widget_get_window (toplevel), cursor); g_object_unref (cursor); } } void remove_watch_cursor (GtkWidget *widget) { GtkWidget *toplevel; toplevel = gtk_widget_get_toplevel(GTK_WIDGET(widget)); if (G_LIKELY (toplevel != NULL)) gdk_window_set_cursor (gtk_widget_get_window (toplevel), NULL); } GdkPixbuf * pragha_gdk_pixbuf_new_from_memory (gconstpointer data, gsize size) { GError *error = NULL; GdkPixbufLoader *loader = gdk_pixbuf_loader_new (); gdk_pixbuf_loader_write (loader, data, size, &error); GdkPixbuf *pixbuf = gdk_pixbuf_loader_get_pixbuf (loader); if (pixbuf) g_object_ref (pixbuf); gdk_pixbuf_loader_close (loader, NULL); g_object_unref (loader); if (error) { g_warning ("pragha_gdk_pixbuf_new_from_memory: %s\n", error->message); g_error_free (error); } return pixbuf; } /* NB: Have to take care of longer lengths .. */ gchar* convert_length_str(gint length) { static gchar *str, tmp[24]; gint days = 0, hours = 0, minutes = 0, seconds = 0; str = g_new0(char, 128); memset(tmp, '\0', 24); if (length > 86400) { days = length/86400; length = length%86400; g_sprintf(tmp, "%d %s, ", days, ngettext("day", "days", days)); g_strlcat(str, tmp, 24); } if (length > 3600) { hours = length/3600; length = length%3600; memset(tmp, '\0', 24); g_sprintf(tmp, "%d:", hours); g_strlcat(str, tmp, 24); } if (length >= 60) { minutes = length/60; length = length%60; memset(tmp, '\0', 24); g_sprintf(tmp, "%02d:", minutes); g_strlcat(str, tmp, 24); } else g_strlcat(str, "00:", 4); seconds = length; memset(tmp, '\0', 24); g_sprintf(tmp, "%02d", seconds); g_strlcat(str, tmp, 24); return str; } /* Check if str is present in list ( containing gchar* elements in 'data' ) */ gboolean is_present_str_list(const gchar *str, GSList *list) { GSList *i; gchar *lstr; gboolean ret = FALSE; if (!str) return FALSE; if (list) { for (i=list; i != NULL; i = i->next) { lstr = i->data; if (!g_ascii_strcasecmp(str, lstr)) { ret = TRUE; break; } } } else { ret = FALSE; } return ret; } /* Delete str from list */ GSList* delete_from_str_list(const gchar *str, GSList *list) { GSList *i = NULL; gchar *lstr; if (!str) return list; if (!list) return NULL; for (i = list; i != NULL; i = i->next) { lstr = i->data; if (!g_ascii_strcasecmp(str, lstr)) { g_free(i->data); return g_slist_delete_link(list, i); } } return list; } gchar * path_get_dir_as_uri (const gchar *path) { gchar *dir = g_path_get_dirname (path); gchar *uri = g_filename_to_uri (dir, NULL, NULL); g_free (dir); return uri; } /* Returns either the basename of the given filename, or (if the parameter * get_folder is set) the basename of the container folder of filename. In both * cases the returned string is encoded in utf-8 format. If GLib can not make * sense of the encoding of filename, as a last resort it replaces unknown * characters with U+FFFD, the Unicode replacement character */ gchar* get_display_filename(const gchar *filename, gboolean get_folder) { gchar *utf8_filename = NULL; gchar *dir = NULL; /* Get the containing folder of the file or the file itself ? */ if (get_folder) { dir = g_path_get_dirname(filename); utf8_filename = g_filename_display_name(dir); g_free(dir); } else { utf8_filename = g_filename_display_basename(filename); } return utf8_filename; } gchar* get_display_name(PraghaMusicobject *mobj) { gchar *name = NULL; if (!pragha_musicobject_is_local_file(mobj)) { name = g_strdup(pragha_musicobject_get_file(mobj)); } else { name = get_display_filename(pragha_musicobject_get_file(mobj), FALSE); } return name; } /* Free a list of strings */ void free_str_list(GSList *list) { g_slist_free_full(list, g_free); } /* Compare two UTF-8 strings */ gint compare_utf8_str(const gchar *str1, const gchar *str2) { gchar *key1, *key2; gint ret = 0; if (!str1) return 1; if (!str2) return -1; key1 = g_utf8_collate_key(str1, -1); key2 = g_utf8_collate_key(str2, -1); ret = strcmp(key1, key2); g_free(key1); g_free(key2); return ret; } gchar * pragha_escape_slashes (const gchar *str) { gchar *dup = g_strdup (str); gchar *i = dup; while (*i) { if (*i == '/' || *i == '\\') *i = '|'; i = g_utf8_next_char (i); } return dup; } gboolean validate_album_art_pattern(const gchar *pattern) { gchar **tokens; gint i = 0; gboolean ret = FALSE; if (string_is_empty(pattern)) return TRUE; if (g_strrstr(pattern, "*")) { g_warning("Contains wildcards"); return FALSE; } tokens = g_strsplit(pattern, ";", 0); while (tokens[i]) i++; /* Check if more than six patterns are given */ if (i <= ALBUM_ART_NO_PATTERNS) { ret = TRUE; } else { g_warning("More than six patterns"); } g_strfreev(tokens); return ret; } void pragha_process_gtk_events () { #ifdef DEBUG extern GThread *pragha_main_thread; if (g_thread_self () != pragha_main_thread) g_warning ("THREAD SAFETY ERROR!"); #endif while (g_main_context_pending (NULL)) { g_main_context_iteration (NULL, FALSE); } } /* callback used to open default browser when URLs got clicked */ void open_url(const gchar *url, GtkWidget *parent) { #ifdef G_OS_WIN32 if (g_file_test(url, G_FILE_TEST_IS_DIR)) ShellExecute (0, "explore", url, NULL, NULL, SW_SHOWNORMAL); else ShellExecute (0, "open", url, NULL, NULL, SW_SHOWNORMAL); #else gboolean success = TRUE; const gchar *argv[3]; gchar *methods[] = {"xdg-open","firefox","mozilla","opera","konqueror",NULL}; int i = 0; /* First try gtk_show_uri() (will fail if gvfs is not installed) */ if (!gtk_show_uri (NULL, url, gtk_get_current_event_time (), NULL)) { success = FALSE; argv[1] = url; argv[2] = NULL; /* Next try all available methods for opening the URL */ while (methods[i] != NULL) { argv[0] = methods[i++]; if (g_spawn_async(NULL, (gchar**)argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL)) { success = TRUE; break; } } } /* No method was found to open the URL */ if (!success) { GtkWidget *d; d = gtk_message_dialog_new (GTK_WINDOW (parent), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _("Unable to open the browser")); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG (d), "%s", "No methods supported"); g_signal_connect (d, "response", G_CALLBACK (gtk_widget_destroy), NULL); gtk_window_present (GTK_WINDOW (d)); } #endif } /* It gives the position of the menu on the basis of the position of combo_order */ void pragha_utils_set_menu_position (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { GtkWidget *widget; GtkAllocation allocation; GtkRequisition requisition; gint menu_xpos, menu_ypos; widget = GTK_WIDGET (user_data); gtk_widget_get_preferred_size (GTK_WIDGET(menu), &requisition, NULL); gdk_window_get_origin (gtk_widget_get_window(widget), &menu_xpos, &menu_ypos); gtk_widget_get_allocation(widget, &allocation); menu_xpos += allocation.x; menu_ypos += allocation.y; if (menu_ypos > gdk_screen_get_height (gtk_widget_get_screen (widget)) / 2) menu_ypos -= requisition.height; else menu_ypos += allocation.height; *x = menu_xpos; *y = menu_ypos - 5; *push_in = TRUE; } �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-utils.h���������������������������������������������������������������������0000664�0000000�0000000�00000005563�13435240150�0016327�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_UTILS_H #define PRAGHA_UTILS_H #include <gtk/gtk.h> #include "pragha-musicobject.h" #include "pragha-preferences.h" #define string_is_empty(s) (!(s) || !(s)[0]) #define string_is_not_empty(s) (s && (s)[0]) gchar *e2_utf8_ndup (const gchar *str, glong num); gsize levenshtein_strcmp(const gchar * s, const gchar * t); gsize levenshtein_safe_strcmp(const gchar * s, const gchar * t); gchar *g_strstr_lv (gchar *haystack, gchar *needle, gsize lv_distance); gchar *pragha_strstr_lv(gchar *haystack, gchar *needle, PraghaPreferences *preferences); void set_watch_cursor (GtkWidget *widget); void remove_watch_cursor (GtkWidget *widget); GdkPixbuf * pragha_gdk_pixbuf_new_from_memory (gconstpointer data, gsize size); gchar* convert_length_str(gint length); gboolean is_present_str_list(const gchar *str, GSList *list); GSList* delete_from_str_list(const gchar *str, GSList *list); gchar * path_get_dir_as_uri (const gchar *path); gchar* get_display_filename(const gchar *filename, gboolean get_folder); gchar* get_display_name(PraghaMusicobject *mobj); void free_str_list(GSList *list); gint compare_utf8_str(const gchar *str1, const gchar *str2); gchar * pragha_escape_slashes (const gchar *str); gboolean validate_album_art_pattern(const gchar *pattern); void pragha_process_gtk_events (); void open_url(const gchar *url, GtkWidget *parent); void pragha_utils_set_menu_position (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data); #endif /* PRAGHA_UTILS_H */ ���������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-window.c��������������������������������������������������������������������0000664�0000000�0000000�00000054140�13435240150�0016464�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha-window.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include "pragha-playback.h" #include "pragha-toolbar.h" #include "pragha-menubar.h" #include "pragha-playlists-mgmt.h" #include "pragha-session.h" #include "pragha-utils.h" /********************************/ /* Externally visible functions */ /********************************/ gboolean pragha_close_window(GtkWidget *widget, GdkEvent *event, PraghaApplication *pragha) { PraghaStatusIcon *status_icon; PraghaPreferences *preferences; preferences = pragha_application_get_preferences (pragha); if (pragha_preferences_get_hide_instead_close (preferences)) { status_icon = pragha_application_get_status_icon (pragha); if (pragha_preferences_get_show_status_icon (preferences) && gtk_status_icon_is_embedded (GTK_STATUS_ICON(status_icon))) pragha_window_toggle_state(pragha, FALSE); else gtk_window_iconify (GTK_WINDOW(pragha_application_get_window(pragha))); } else { pragha_application_quit (pragha); } return TRUE; } void pragha_window_toggle_state (PraghaApplication *pragha, gboolean ignoreActivity) { GtkWidget *window; gint x = 0, y = 0; window = pragha_application_get_window (pragha); if (gtk_widget_get_visible (window)) { if (ignoreActivity || gtk_window_is_active (GTK_WINDOW(window))){ gtk_window_get_position (GTK_WINDOW(window), &x, &y); gtk_widget_hide (GTK_WIDGET(window)); gtk_window_move (GTK_WINDOW(window), x ,y); } else gtk_window_present (GTK_WINDOW(window)); } else { gtk_widget_show (GTK_WIDGET(window)); } } static void backend_error_dialog_response_cb (GtkDialog *dialog, gint response, PraghaApplication *pragha) { switch (response) { case GTK_RESPONSE_APPLY: { pragha_advance_playback (pragha); break; } case GTK_RESPONSE_ACCEPT: case GTK_RESPONSE_DELETE_EVENT: default: { pragha_backend_stop (pragha_application_get_backend (pragha)); break; } } gtk_widget_destroy(GTK_WIDGET(dialog)); } void gui_backend_error_show_dialog_cb (PraghaBackend *backend, const GError *error, gpointer user_data) { GtkWidget *dialog; PraghaApplication *pragha = user_data; const gchar *file = pragha_musicobject_get_file (pragha_backend_get_musicobject (backend)); dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW(pragha_application_get_window(pragha)), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, _("<b>Error playing current track.</b>\n(%s)\n<b>Reason:</b> %s"), file, error->message); gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Stop"), GTK_RESPONSE_ACCEPT); gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Next"), GTK_RESPONSE_APPLY); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_APPLY); g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(backend_error_dialog_response_cb), pragha); gtk_widget_show_all(dialog); } void gui_backend_error_update_current_playlist_cb (PraghaBackend *backend, const GError *error, PraghaApplication *pragha) { PraghaPlaylist *playlist; playlist = pragha_application_get_playlist (pragha); pragha_playlist_set_track_error (playlist, pragha_backend_get_error (backend)); } static gboolean pragha_window_state_event (GtkWidget *widget, GdkEventWindowState *event, PraghaApplication *pragha) { GtkAction *action_fullscreen; if (event->type == GDK_WINDOW_STATE && (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN)) { action_fullscreen = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Fullscreen"); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action_fullscreen), (event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN) != 0); } return FALSE; } void pragha_window_unfullscreen (GObject *object, PraghaApplication *pragha) { GtkAction *action_fullscreen; action_fullscreen = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Fullscreen"); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action_fullscreen), FALSE); } static void pragha_sidebar_children_changed (PraghaSidebar *sidebar, PraghaApplication *pragha) { GtkAction *action; GAction *baction; GActionMap *map; action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Lateral panel2"); map = G_ACTION_MAP (pragha_application_get_window(pragha)); baction = g_action_map_lookup_action (map, "sidebar2"); if (pragha_sidebar_get_n_panes (sidebar)) { gtk_action_set_visible (action, TRUE); g_simple_action_set_enabled (G_SIMPLE_ACTION (baction), TRUE); gtk_widget_set_visible (GTK_WIDGET(sidebar), TRUE); } else { gtk_action_set_visible (action, FALSE); g_simple_action_set_enabled (G_SIMPLE_ACTION (baction), FALSE); gtk_widget_set_visible (GTK_WIDGET(sidebar), FALSE); } } /* * Public api. */ void pragha_window_add_widget_to_infobox (PraghaApplication *pragha, GtkWidget *widget) { GtkWidget *infobox, *children; GList *list; infobox = pragha_application_get_infobox_container (pragha); list = gtk_container_get_children (GTK_CONTAINER(infobox)); if(list) { children = list->data; gtk_container_remove (GTK_CONTAINER(infobox), children); gtk_widget_destroy(GTK_WIDGET(children)); g_list_free(list); } gtk_container_add (GTK_CONTAINER(infobox), widget); } gint pragha_menubar_append_plugin_action (PraghaApplication *pragha, GtkActionGroup *action_group, const gchar *menu_xml) { GtkUIManager *ui_manager; GError *error = NULL; gint merge_id; ui_manager = pragha_application_get_menu_ui_manager (pragha); gtk_ui_manager_insert_action_group (ui_manager, action_group, -1); merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, menu_xml, -1, &error); if (error) { g_warning ("Adding plugin to menubar: %s", error->message); g_error_free (error); } return merge_id; } void pragha_menubar_remove_plugin_action (PraghaApplication *pragha, GtkActionGroup *action_group, gint merge_id) { GtkUIManager * ui_manager = pragha_application_get_menu_ui_manager (pragha); gtk_ui_manager_remove_ui (ui_manager, merge_id); gtk_ui_manager_remove_action_group (ui_manager, action_group); g_object_unref (action_group); } /* * Create and destroy the main window. */ void pragha_window_save_settings (PraghaApplication *pragha) { PraghaPreferences *preferences; GtkWidget *window, *pane; gint *window_size, *window_position; gint win_width, win_height, win_x, win_y; GdkWindowState state; const gchar *user_config_dir; gchar *pragha_accels_path = NULL; preferences = pragha_preferences_get(); /* Save last window state */ window = pragha_application_get_window (pragha); state = gdk_window_get_state (gtk_widget_get_window (window)); if (pragha_preferences_get_remember_state(preferences)) { if (state & GDK_WINDOW_STATE_FULLSCREEN) pragha_preferences_set_start_mode(preferences, FULLSCREEN_STATE); else if(state & GDK_WINDOW_STATE_WITHDRAWN) pragha_preferences_set_start_mode(preferences, ICONIFIED_STATE); else pragha_preferences_set_start_mode(preferences, NORMAL_STATE); } /* Save geometry only if window is not maximized or fullscreened */ if (!(state & GDK_WINDOW_STATE_MAXIMIZED) || !(state & GDK_WINDOW_STATE_FULLSCREEN)) { window_size = g_new0(gint, 2); gtk_window_get_size(GTK_WINDOW(window), &win_width, &win_height); window_size[0] = win_width; window_size[1] = win_height; window_position = g_new0(gint, 2); gtk_window_get_position(GTK_WINDOW(window), &win_x, &win_y); window_position[0] = win_x; window_position[1] = win_y; pragha_preferences_set_integer_list (preferences, GROUP_WINDOW, KEY_WINDOW_SIZE, window_size, 2); pragha_preferences_set_integer_list (preferences, GROUP_WINDOW, KEY_WINDOW_POSITION, window_position, 2); g_free(window_size); g_free(window_position); } /* Save sidebar size */ pane = pragha_application_get_first_pane (pragha); pragha_preferences_set_sidebar_size(preferences, gtk_paned_get_position(GTK_PANED(pane))); pane = pragha_application_get_second_pane (pragha); pragha_preferences_set_secondary_sidebar_size (preferences, gtk_paned_get_position(GTK_PANED(pane))); /* Save menu accelerators edited */ user_config_dir = g_get_user_config_dir(); pragha_accels_path = g_build_path(G_DIR_SEPARATOR_S, user_config_dir, "/pragha/accels.scm", NULL); gtk_accel_map_save (pragha_accels_path); /* Free memory */ g_object_unref(preferences); g_free(pragha_accels_path); } void pragha_init_gui_state (PraghaApplication *pragha) { PraghaPlaylist *playlist; PraghaLibraryPane *library; PraghaPreferences *preferences; library = pragha_application_get_library (pragha); pragha_library_pane_init_view (library); preferences = pragha_application_get_preferences (pragha); if (pragha_preferences_get_restore_playlist (preferences)) { playlist = pragha_application_get_playlist (pragha); pragha_playlist_init_playlist_state (playlist); } if (info_bar_import_music_will_be_useful(pragha)) { GtkWidget* info_bar = create_info_bar_import_music(pragha); pragha_window_add_widget_to_infobox(pragha, info_bar); } } static void pragha_window_init_menu_actions (PraghaApplication *pragha) { PraghaPreferences *preferences; GtkAction *action = NULL; const gchar *start_mode; preferences = pragha_application_get_preferences (pragha); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Fullscreen"); start_mode = pragha_preferences_get_start_mode (preferences); if(!g_ascii_strcasecmp(start_mode, FULLSCREEN_STATE)) gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action), TRUE); else gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action), FALSE); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Playback controls below"); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION(action), pragha_preferences_get_controls_below (preferences)); } static void pragha_window_init (PraghaApplication *pragha) { PraghaStatusIcon *status_icon; PraghaPreferences *preferences; GtkWidget *window; const gchar *start_mode; /* Init window state */ preferences = pragha_application_get_preferences (pragha); window = pragha_application_get_window (pragha); start_mode = pragha_preferences_get_start_mode (preferences); if(!g_ascii_strcasecmp(start_mode, FULLSCREEN_STATE)) { gtk_widget_show(window); } else if(!g_ascii_strcasecmp(start_mode, ICONIFIED_STATE)) { status_icon = pragha_application_get_status_icon (pragha); if(gtk_status_icon_is_embedded (GTK_STATUS_ICON(status_icon))) { gtk_widget_hide(GTK_WIDGET(window)); } else { g_warning("(%s): No embedded status_icon.", __func__); gtk_window_iconify (GTK_WINDOW(window)); gtk_widget_show(window); } } else { gtk_widget_show(window); } pragha_window_init_menu_actions(pragha); pragha_init_session_support(pragha); } static void prefrences_change_icon_size (PraghaPreferences *preferences, GParamSpec *pspec, GtkWidget *button) { GIcon *icon = NULL; const gchar *fallbacks_icon_menu[] = { "open-menu", "emblem-system", "open-menu-symbolic", "emblem-system-symbolic", NULL, }; icon = g_themed_icon_new_from_names ((gchar **)fallbacks_icon_menu, -1); gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_gicon(icon, pragha_preferences_get_toolbar_size(preferences))); g_object_unref (icon); } void pragha_window_new (PraghaApplication *pragha) { PraghaPreferences *preferences; GtkWidget *window; PraghaPlaylist *playlist; PraghaLibraryPane *library; PraghaSidebar *sidebar1, *sidebar2; PraghaStatusbar *statusbar; PraghaToolbar *toolbar; GtkWidget *menubar, *pane1, *pane2, *infobox; GtkWidget *playlist_statusbar_vbox, *vbox_main; GtkWidget *menu_button; GtkBuilder *menu_ui; GtkCssProvider *css_provider; GIcon *icon = NULL; GError *error = NULL; gint *win_size, *win_position; gchar *css_filename = NULL; gsize cnt = 0; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; const gchar *fallbacks_icon_menu[] = { "open-menu", "emblem-system", "open-menu-symbolic", "emblem-system-symbolic", NULL, }; CDEBUG(DBG_INFO, "Packaging widgets, and initiating the window"); preferences = pragha_application_get_preferences (pragha); /* Collect widgets. */ window = pragha_application_get_window (pragha); playlist = pragha_application_get_playlist (pragha); library = pragha_application_get_library (pragha); sidebar1 = pragha_application_get_first_sidebar (pragha); sidebar2 = pragha_application_get_second_sidebar (pragha); statusbar = pragha_application_get_statusbar (pragha); toolbar = pragha_application_get_toolbar (pragha); menubar = pragha_application_get_menubar (pragha); pane1 = pragha_application_get_first_pane (pragha); pane2 = pragha_application_get_second_pane (pragha); infobox = pragha_application_get_infobox_container (pragha); /* Main window */ g_signal_connect (G_OBJECT(window), "window-state-event", G_CALLBACK(pragha_window_state_event), pragha); g_signal_connect (G_OBJECT(window), "delete_event", G_CALLBACK(pragha_close_window), pragha); /* Set Default Size */ win_size = pragha_preferences_get_integer_list (preferences, GROUP_WINDOW, KEY_WINDOW_SIZE, &cnt); if (win_size) { gtk_window_set_default_size(GTK_WINDOW(window), win_size[0], win_size[1]); g_free(win_size); } else { gtk_window_set_default_size(GTK_WINDOW(window), MIN_WINDOW_WIDTH, MIN_WINDOW_HEIGHT); } /* Set Position */ win_position = pragha_preferences_get_integer_list (preferences, GROUP_WINDOW, KEY_WINDOW_POSITION, &cnt); if (win_position) { gtk_window_move(GTK_WINDOW(window), win_position[0], win_position[1]); g_free(win_position); } else { gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); } /* Pack widgets: [ Playlist ] * [Status Bar] */ playlist_statusbar_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start (GTK_BOX(playlist_statusbar_vbox), GTK_WIDGET(playlist), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX(playlist_statusbar_vbox), GTK_WIDGET(statusbar), FALSE, FALSE, 0); /* Pack widgets: [Sidebar1][ Playlist ] * [ ][Status Bar] */ gtk_paned_pack1 (GTK_PANED (pane1), GTK_WIDGET(sidebar1), FALSE, TRUE); gtk_paned_pack2 (GTK_PANED (pane1), playlist_statusbar_vbox, TRUE, FALSE); gtk_paned_set_position (GTK_PANED (pane1), pragha_preferences_get_sidebar_size (preferences)); /* Pack widgets: [Sidebar1][ Playlist ][Sidebar2] * [ ][Status Bar][ ] */ gtk_paned_pack1 (GTK_PANED (pane2), pane1, TRUE, FALSE); gtk_paned_pack2 (GTK_PANED (pane2), GTK_WIDGET(sidebar2), FALSE, TRUE); gtk_paned_set_position (GTK_PANED (pane2), pragha_preferences_get_secondary_sidebar_size (preferences)); /* Pack widgets: [ Menubar ] * [ Toolbar ] * [ Infobox ] * [Sidebar1][ Playlist ][Sidebar2] * [Sidebar1][Status Bar][Sidebar2] */ vbox_main = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_box_pack_start (GTK_BOX(vbox_main), menubar, FALSE, FALSE, 0); #if GTK_CHECK_VERSION (3, 12, 0) if (pragha_preferences_get_system_titlebar (preferences)) #endif gtk_box_pack_start (GTK_BOX(vbox_main), GTK_WIDGET(toolbar), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(vbox_main), infobox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(vbox_main), pane2, TRUE, TRUE, 2); g_object_bind_property (preferences, "show-menubar", menubar, "visible", binding_flags); /* Add menu-button to toolbar */ menu_button = gtk_menu_button_new (); #if GTK_CHECK_VERSION (3, 12, 0) g_object_set(menu_button, "use-popover", FALSE, NULL); #endif gtk_button_set_relief(GTK_BUTTON(menu_button), GTK_RELIEF_NONE); icon = g_themed_icon_new_from_names ((gchar **)fallbacks_icon_menu, -1); gtk_button_set_image (GTK_BUTTON (menu_button), gtk_image_new_from_gicon(icon, pragha_preferences_get_toolbar_size(preferences))); g_object_unref (icon); menu_ui = pragha_application_get_menu_ui(pragha); gtk_menu_button_set_menu_model (GTK_MENU_BUTTON(menu_button), G_MENU_MODEL (gtk_builder_get_object (menu_ui, "menubar"))); g_object_bind_property (preferences, "show-menubar", menu_button, "visible", binding_flags | G_BINDING_INVERT_BOOLEAN); g_signal_connect (preferences, "notify::toolbar-size", G_CALLBACK (prefrences_change_icon_size), menu_button); pragha_toolbar_add_extra_button (toolbar, menu_button); /* Add library pane to first sidebar. */ pragha_sidebar_attach_plugin (sidebar1, pragha_library_pane_get_widget (library), pragha_library_pane_get_pane_title (library), pragha_library_pane_get_popup_menu (library)); g_object_bind_property (preferences, "lateral-panel", sidebar1, "visible", binding_flags); /* Second sidebar visibility depend on their children */ g_signal_connect (G_OBJECT(sidebar2), "children-changed", G_CALLBACK(pragha_sidebar_children_changed), pragha); pragha_sidebar_style_position (sidebar2, GTK_POS_RIGHT); /* Show the widgets individually. * NOTE: the rest of the widgets, depends on the preferences. */ gtk_widget_show(vbox_main); gtk_widget_show (GTK_WIDGET(toolbar)); gtk_widget_show (infobox); gtk_widget_show (pane1); gtk_widget_show (pane2); gtk_widget_show(playlist_statusbar_vbox); gtk_widget_show_all (GTK_WIDGET(playlist)); /* Pack everyting on the main window. */ gtk_container_add(GTK_CONTAINER(window), vbox_main); /* Attach the custum CSS to main window */ css_filename = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), "/pragha/custom.css", NULL); if (g_file_test(css_filename, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { css_provider = gtk_css_provider_new (); gtk_css_provider_load_from_path (css_provider, css_filename, &error); if (error == NULL) { gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)), GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_USER); } else { g_warning ("Could not attach user css style: %s", error->message); g_error_free (error); } g_object_unref (css_provider); } g_free (css_filename); css_filename = g_build_path(G_DIR_SEPARATOR_S, USRCUSTUMDIR, "custom.css", NULL); if (g_file_test(css_filename, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) { css_provider = gtk_css_provider_new (); gtk_css_provider_load_from_path (css_provider, css_filename, &error); if (error == NULL) { gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)), GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); } else { g_warning ("Could not attach distro css style: %s", error->message); g_error_free (error); } g_object_unref (css_provider); } g_free (css_filename); #if GTK_CHECK_VERSION (3, 12, 0) if (!pragha_preferences_get_system_titlebar (preferences)) gtk_window_set_titlebar (GTK_WINDOW (window), GTK_WIDGET(toolbar)); GtkWidget *song = pragha_toolbar_get_song_box(toolbar); gtk_header_bar_set_custom_title(GTK_HEADER_BAR(toolbar), GTK_WIDGET(song)); #endif gtk_widget_show (GTK_WIDGET(toolbar)); pragha_window_init (pragha); } ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha-window.h��������������������������������������������������������������������0000664�0000000�0000000�00000005016�13435240150�0016467�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2013 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_WINDOW_H #define PRAGHA_WINDOW_H #include <gtk/gtk.h> #include "pragha-backend.h" #include "pragha.h" gboolean pragha_close_window (GtkWidget *widget, GdkEvent *event, PraghaApplication *pragha); void pragha_destroy_window (GtkWidget *widget, PraghaApplication *pragha); void pragha_window_toggle_state (PraghaApplication *pragha, gboolean ignoreActivity); void gui_backend_error_show_dialog_cb (PraghaBackend *backend, const GError *error, gpointer user_data); void gui_backend_error_update_current_playlist_cb (PraghaBackend *backend, const GError *error, PraghaApplication *pragha); void pragha_window_unfullscreen (GObject *object, PraghaApplication *pragha); void pragha_window_add_widget_to_infobox (PraghaApplication *pragha, GtkWidget *widget); gint pragha_menubar_append_plugin_action (PraghaApplication *pragha, GtkActionGroup *action_group, const gchar *menu_xml); void pragha_menubar_remove_plugin_action (PraghaApplication *pragha, GtkActionGroup *action_group, gint merge_id); void pragha_init_gui_state (PraghaApplication *pragha); void pragha_window_save_settings (PraghaApplication *pragha); void pragha_window_new (PraghaApplication *pragha); #endif /* PRAGHA_WINDOW_H */������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha.c���������������������������������������������������������������������������0000664�0000000�0000000�00000117555�13435240150�0015171�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2015 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #if HAVE_CONFIG_H #include <config.h> #endif #include "pragha.h" #if defined(GETTEXT_PACKAGE) #include <glib/gi18n-lib.h> #else #include <glib/gi18n.h> #endif #include <glib.h> #include <locale.h> /* require LC_ALL */ #include <libintl.h> #include <tag_c.h> #include "pragha-hig.h" #include "pragha-window.h" #include "pragha-playback.h" #include "pragha-musicobject-mgmt.h" #include "pragha-menubar.h" #include "pragha-file-utils.h" #include "pragha-utils.h" #include "pragha-music-enum.h" #include "pragha-playlists-mgmt.h" #ifdef G_OS_WIN32 #include "../win32/win32dep.h" #endif gint debug_level; #ifdef DEBUG GThread *pragha_main_thread = NULL; #endif struct _PraghaApplication { GtkApplication base_instance; /* Main window and icon */ GtkWidget *mainwindow; /* Main stuff */ PraghaBackend *backend; PraghaPreferences *preferences; PraghaDatabase *cdbase; PraghaArtCache *art_cache; PraghaMusicEnum *enum_map; PraghaScanner *scanner; PreferencesDialog *setting_dialog; /* Main widgets */ GtkUIManager *menu_ui_manager; GtkBuilder *menu_ui; PraghaToolbar *toolbar; GtkWidget *infobox; GtkWidget *pane1; GtkWidget *pane2; PraghaSidebar *sidebar1; PraghaSidebar *sidebar2; PraghaLibraryPane *library; PraghaPlaylist *playlist; PraghaStatusbar *statusbar; PraghaStatusIcon *status_icon; GBinding *sidebar2_binding; #ifdef HAVE_LIBPEAS PraghaPluginsEngine *plugins_engine; #endif }; G_DEFINE_TYPE (PraghaApplication, pragha_application, GTK_TYPE_APPLICATION); /* * Some calbacks.. */ /* Handler for the 'Open' item in the File menu */ static void pragha_open_files_dialog_close_button_cb (GtkWidget *widget, gpointer data) { gtk_widget_destroy(GTK_WIDGET(data)); } static void pragha_open_files_dialog_add_button_cb (GtkWidget *widget, gpointer data) { PraghaPlaylist *playlist; GSList *files = NULL, *l; gboolean add_recursively; GList *mlist = NULL; GtkWidget *window = g_object_get_data(data, "window"); GtkWidget *chooser = g_object_get_data(data, "chooser"); GtkWidget *toggle = g_object_get_data(data, "toggle-button"); PraghaApplication *pragha = g_object_get_data(data, "pragha"); PraghaPreferences *preferences = pragha_application_get_preferences (pragha); add_recursively = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle)); pragha_preferences_set_add_recursively (preferences, add_recursively); gchar *last_folder = gtk_file_chooser_get_current_folder ((GtkFileChooser *) chooser); pragha_preferences_set_last_folder (preferences, last_folder); g_free (last_folder); files = gtk_file_chooser_get_filenames((GtkFileChooser *) chooser); gtk_widget_destroy(window); if (files) { for (l = files; l != NULL; l = l->next) { mlist = append_mobj_list_from_unknown_filename(mlist, l->data); } g_slist_free_full(files, g_free); playlist = pragha_application_get_playlist (pragha); pragha_playlist_append_mobj_list (playlist, mlist); g_list_free (mlist); } } static gboolean pragha_open_files_dialog_keypress (GtkWidget *dialog, GdkEventKey *event, gpointer data) { if (event->keyval == GDK_KEY_Escape) { gtk_widget_destroy(dialog); return TRUE; } return FALSE; } void pragha_application_open_files (PraghaApplication *pragha) { PraghaPreferences *preferences; GtkWidget *window, *hbox, *vbox, *chooser, *bbox, *toggle, *close_button, *add_button; gpointer storage; gint i = 0; GtkFileFilter *media_filter, *playlist_filter, *all_filter; const gchar *last_folder = NULL; /* Create a file chooser dialog */ window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_title(GTK_WINDOW(window), (_("Select a file to play"))); gtk_window_set_default_size(GTK_WINDOW(window), 700, 450); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_widget_set_name (GTK_WIDGET(window), "GtkFileChooserDialog"); gtk_container_set_border_width(GTK_CONTAINER(window), 0); vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_set_name (GTK_WIDGET(vbox), "dialog-vbox1"); gtk_container_add(GTK_CONTAINER(window), vbox); chooser = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_OPEN); /* Set various properties */ gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(chooser), TRUE); preferences = pragha_application_get_preferences (pragha); last_folder = pragha_preferences_get_last_folder (preferences); if (string_is_not_empty(last_folder)) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), last_folder); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 6); toggle = gtk_check_button_new_with_label(_("Add files recursively")); if(pragha_preferences_get_add_recursively (preferences)) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE); bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL); gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(bbox), 4); close_button = gtk_button_new_with_mnemonic (_("_Cancel")); add_button = gtk_button_new_with_mnemonic (_("_Add")); gtk_container_add(GTK_CONTAINER(bbox), close_button); gtk_container_add(GTK_CONTAINER(bbox), add_button); gtk_box_pack_start(GTK_BOX(hbox), toggle, TRUE, TRUE, 0); gtk_box_pack_end(GTK_BOX(hbox), bbox, FALSE, FALSE, 0); gtk_box_pack_end(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_box_pack_end(GTK_BOX(vbox), chooser, TRUE, TRUE, 0); /* Create file filters */ media_filter = gtk_file_filter_new(); gtk_file_filter_set_name(GTK_FILE_FILTER(media_filter), _("Supported media")); while (mime_wav[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_wav[i++]); i = 0; while (mime_mpeg[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_mpeg[i++]); i = 0; while (mime_flac[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_flac[i++]); i = 0; while (mime_ogg[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_ogg[i++]); i = 0; while (mime_asf[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_asf[i++]); i = 0; while (mime_mp4[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_mp4[i++]); i = 0; while (mime_ape[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_ape[i++]); i = 0; while (mime_tracker[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_tracker[i++]); #ifdef HAVE_PLPARSER i = 0; while (mime_playlist[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_playlist[i++]); i = 0; while (mime_dual[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(media_filter), mime_dual[i++]); #else gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.m3u"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.M3U"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.pls"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.PLS"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.xspf"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.XSPF"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.wax"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(media_filter), "*.WAX"); #endif playlist_filter = gtk_file_filter_new(); #ifdef HAVE_PLPARSER i = 0; while (mime_playlist[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(playlist_filter), mime_playlist[i++]); i = 0; while (mime_dual[i]) gtk_file_filter_add_mime_type(GTK_FILE_FILTER(playlist_filter), mime_dual[i++]); #else gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.m3u"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.M3U"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.pls"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.PLS"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.xspf"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.XSPF"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.wax"); gtk_file_filter_add_pattern(GTK_FILE_FILTER(playlist_filter), "*.WAX"); #endif gtk_file_filter_set_name(GTK_FILE_FILTER(playlist_filter), _("Playlists")); all_filter = gtk_file_filter_new (); gtk_file_filter_set_name (GTK_FILE_FILTER(all_filter), _("All files")); gtk_file_filter_add_pattern (GTK_FILE_FILTER(all_filter), "*"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(chooser), GTK_FILE_FILTER(media_filter)); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(chooser), GTK_FILE_FILTER(playlist_filter)); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER(chooser), GTK_FILE_FILTER(all_filter)); gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(chooser), GTK_FILE_FILTER(media_filter)); storage = g_object_new(G_TYPE_OBJECT, NULL); g_object_set_data(storage, "window", window); g_object_set_data(storage, "chooser", chooser); g_object_set_data(storage, "toggle-button", toggle); g_object_set_data(storage, "pragha", pragha); g_signal_connect (add_button, "clicked", G_CALLBACK(pragha_open_files_dialog_add_button_cb), storage); g_signal_connect (chooser, "file-activated", G_CALLBACK(pragha_open_files_dialog_add_button_cb), storage); g_signal_connect (close_button, "clicked", G_CALLBACK(pragha_open_files_dialog_close_button_cb), window); g_signal_connect (window, "destroy", G_CALLBACK(gtk_widget_destroy), window); g_signal_connect (window, "key-press-event", G_CALLBACK(pragha_open_files_dialog_keypress), NULL); gtk_window_set_transient_for(GTK_WINDOW (window), GTK_WINDOW(pragha_application_get_window(pragha))); gtk_window_set_destroy_with_parent (GTK_WINDOW (window), TRUE); gtk_widget_show_all(window); } /* Build a dialog to get a new playlist name */ static char * totem_open_location_set_from_clipboard (GtkWidget *open_location) { GtkClipboard *clipboard; gchar *clipboard_content; /* Initialize the clipboard and get its content */ clipboard = gtk_clipboard_get_for_display (gtk_widget_get_display (GTK_WIDGET (open_location)), GDK_SELECTION_CLIPBOARD); clipboard_content = gtk_clipboard_wait_for_text (clipboard); /* Check clipboard for "://". If it exists, return it */ if (clipboard_content != NULL && strcmp (clipboard_content, "") != 0) { if (g_strrstr (clipboard_content, "://") != NULL) return clipboard_content; } g_free (clipboard_content); return NULL; } void pragha_application_add_location (PraghaApplication *pragha) { PraghaPlaylist *playlist; PraghaDatabase *cdbase; PraghaMusicobject *mobj; GtkWidget *dialog, *table, *uri_entry, *label_name, *name_entry; const gchar *uri = NULL, *name = NULL; gchar *clipboard_location = NULL, *real_name = NULL; GSList *list = NULL, *i = NULL; GList *mlist = NULL; guint row = 0; gint result; /* Create dialog window */ table = pragha_hig_workarea_table_new (); pragha_hig_workarea_table_add_section_title(table, &row, _("Enter the URL of an internet radio stream")); uri_entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(uri_entry), 255); pragha_hig_workarea_table_add_wide_control (table, &row, uri_entry); label_name = gtk_label_new_with_mnemonic(_("Give it a name to save")); name_entry = gtk_entry_new(); gtk_entry_set_max_length(GTK_ENTRY(name_entry), 255); pragha_hig_workarea_table_add_row (table, &row, label_name, name_entry); /* Get item from clipboard to fill GtkEntry */ clipboard_location = totem_open_location_set_from_clipboard (uri_entry); if (clipboard_location != NULL && strcmp (clipboard_location, "") != 0) { gtk_entry_set_text (GTK_ENTRY(uri_entry), clipboard_location); g_free (clipboard_location); } dialog = gtk_dialog_new_with_buttons (_("Add a location"), GTK_WINDOW(pragha_application_get_window(pragha)), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Ok"), GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), table); gtk_window_set_default_size(GTK_WINDOW (dialog), 450, -1); gtk_entry_set_activates_default (GTK_ENTRY(uri_entry), TRUE); gtk_entry_set_activates_default (GTK_ENTRY(name_entry), TRUE); gtk_widget_show_all(dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); switch(result) { case GTK_RESPONSE_ACCEPT: if (gtk_entry_get_text_length (GTK_ENTRY(uri_entry))) uri = gtk_entry_get_text(GTK_ENTRY(uri_entry)); playlist = pragha_application_get_playlist (pragha); if (string_is_not_empty(uri)) { if (gtk_entry_get_text_length (GTK_ENTRY(name_entry))) name = gtk_entry_get_text(GTK_ENTRY(name_entry)); #ifdef HAVE_PLPARSER list = pragha_totem_pl_parser_parse_from_uri (uri); #else list = g_slist_append (list, g_strdup(uri)); #endif for (i = list; i != NULL; i = i->next) { if (string_is_not_empty(name)) real_name = new_radio (playlist, i->data, name); mobj = new_musicobject_from_location (i->data, real_name); mlist = g_list_append(mlist, mobj); if (real_name) { g_free (real_name); real_name = NULL; } g_free(i->data); } g_slist_free(list); /* Append playlist and save on database */ pragha_playlist_append_mobj_list (playlist, mlist); g_list_free(mlist); cdbase = pragha_application_get_database (pragha); pragha_database_change_playlists_done (cdbase); } break; case GTK_RESPONSE_CANCEL: break; default: break; } gtk_widget_destroy(dialog); return; } /* Handler for 'Add All' action in the Tools menu */ void pragha_application_append_entery_libary (PraghaApplication *pragha) { PraghaPlaylist *playlist; PraghaDatabase *cdbase; GList *list = NULL; PraghaMusicobject *mobj; /* Query and insert entries */ set_watch_cursor (pragha_application_get_window(pragha)); cdbase = pragha_application_get_database (pragha); const gchar *sql = "SELECT id FROM LOCATION"; PraghaPreparedStatement *statement = pragha_database_create_statement (cdbase, sql); while (pragha_prepared_statement_step (statement)) { gint location_id = pragha_prepared_statement_get_int (statement, 0); mobj = new_musicobject_from_db (cdbase, location_id); if (G_LIKELY(mobj)) list = g_list_prepend (list, mobj); else g_warning ("Unable to retrieve details for" " location_id : %d", location_id); pragha_process_gtk_events (); } pragha_prepared_statement_free (statement); remove_watch_cursor (pragha_application_get_window(pragha)); if (list) { list = g_list_reverse(list); playlist = pragha_application_get_playlist (pragha); pragha_playlist_append_mobj_list (playlist, list); g_list_free(list); } } /* Handler for the 'About' action in the Help menu */ void pragha_application_about_dialog (PraghaApplication *pragha) { GtkWidget *mainwindow; mainwindow = pragha_application_get_window (pragha); const gchar *authors[] = { "sujith ( m.sujith@gmail.com )", "matias ( mati86dl@gmail.com )", NULL}; gtk_show_about_dialog(GTK_WINDOW(mainwindow), "logo-icon-name", "pragha", "authors", authors, "translator-credits", _("translator-credits"), "comments", "A lightweight GTK+ music player", "copyright", "(C) 2007-2009 Sujith\n(C) 2009-2019 Matias", "license-type", GTK_LICENSE_GPL_3_0, "name", PACKAGE_NAME, "version", PACKAGE_VERSION, NULL); } static void pragha_library_pane_append_tracks (PraghaLibraryPane *library, PraghaApplication *pragha) { GList *list = NULL; list = pragha_library_pane_get_mobj_list (library); if (list) { pragha_playlist_append_mobj_list (pragha->playlist, list); g_list_free(list); } } static void pragha_library_pane_replace_tracks (PraghaLibraryPane *library, PraghaApplication *pragha) { GList *list = NULL; list = pragha_library_pane_get_mobj_list (library); if (list) { pragha_playlist_remove_all (pragha->playlist); pragha_playlist_append_mobj_list (pragha->playlist, list); g_list_free(list); } } static void pragha_library_pane_replace_tracks_and_play (PraghaLibraryPane *library, PraghaApplication *pragha) { GList *list = NULL; list = pragha_library_pane_get_mobj_list (library); if (list) { pragha_playlist_remove_all (pragha->playlist); pragha_playlist_append_mobj_list (pragha->playlist, list); if (pragha_backend_get_state (pragha->backend) != ST_STOPPED) pragha_playback_next_track(pragha); else pragha_playback_play_pause_resume(pragha); g_list_free(list); } } static void pragha_playlist_update_change_tags (PraghaPlaylist *playlist, gint changed, PraghaMusicobject *mobj, PraghaApplication *pragha) { PraghaBackend *backend; PraghaToolbar *toolbar; PraghaMusicobject *cmobj = NULL; backend = pragha_application_get_backend (pragha); if(pragha_backend_get_state (backend) != ST_STOPPED) { cmobj = pragha_backend_get_musicobject (backend); pragha_update_musicobject_change_tag (cmobj, changed, mobj); toolbar = pragha_application_get_toolbar (pragha); pragha_toolbar_set_title (toolbar, cmobj); } } static void pragha_playlist_update_statusbar_playtime (PraghaPlaylist *playlist, PraghaApplication *pragha) { PraghaStatusbar *statusbar; gint total_playtime = 0, no_tracks = 0; gchar *str, *tot_str; if(pragha_playlist_is_changing(playlist)) return; total_playtime = pragha_playlist_get_total_playtime (playlist); no_tracks = pragha_playlist_get_no_tracks (playlist); tot_str = convert_length_str(total_playtime); str = g_strdup_printf("%i %s - %s", no_tracks, ngettext("Track", "Tracks", no_tracks), tot_str); CDEBUG(DBG_VERBOSE, "Updating status bar with new playtime: %s", tot_str); statusbar = pragha_application_get_statusbar (pragha); pragha_statusbar_set_main_text(statusbar, str); g_free(tot_str); g_free(str); } static void pragha_art_cache_changed_handler (PraghaArtCache *cache, PraghaApplication *pragha) { PraghaBackend *backend; PraghaToolbar *toolbar; PraghaMusicobject *mobj = NULL; gchar *album_art_path = NULL; const gchar *artist = NULL, *album = NULL; backend = pragha_application_get_backend (pragha); if (pragha_backend_get_state (backend) != ST_STOPPED) { mobj = pragha_backend_get_musicobject (backend); artist = pragha_musicobject_get_artist (mobj); album = pragha_musicobject_get_album (mobj); album_art_path = pragha_art_cache_get_uri (cache, artist, album); if (album_art_path) { toolbar = pragha_application_get_toolbar (pragha); pragha_toolbar_set_image_album_art (toolbar, album_art_path); g_free (album_art_path); } } } static void pragha_libary_list_changed_cb (PraghaPreferences *preferences, PraghaApplication *pragha) { GtkWidget *infobar = create_info_bar_update_music (pragha); pragha_window_add_widget_to_infobox (pragha, infobar); } static void pragha_need_restart_cb (PraghaPreferences *preferences, PraghaApplication *pragha) { GtkWidget *infobar = pragha_info_bar_need_restart (pragha); pragha_window_add_widget_to_infobox (pragha, infobar); } #if GTK_CHECK_VERSION (3, 12, 0) static void pragha_system_titlebar_changed_cb (PraghaPreferences *preferences, GParamSpec *pspec, PraghaApplication *pragha) { PraghaToolbar *toolbar; GtkWidget *window, *parent, *menubar; GtkAction *action; window = pragha_application_get_window (pragha); toolbar = pragha_application_get_toolbar (pragha); menubar = pragha_application_get_menubar (pragha); g_object_ref(toolbar); parent = gtk_widget_get_parent (GTK_WIDGET(menubar)); if (pragha_preferences_get_system_titlebar (preferences)) { gtk_widget_hide(GTK_WIDGET(window)); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Fullscreen"); gtk_action_set_sensitive (GTK_ACTION (action), TRUE); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Playback controls below"); gtk_action_set_sensitive (GTK_ACTION (action), TRUE); gtk_window_set_titlebar (GTK_WINDOW (window), NULL); gtk_window_set_title (GTK_WINDOW(window), _("Pragha Music Player")); gtk_box_pack_start (GTK_BOX(parent), GTK_WIDGET(toolbar), FALSE, FALSE, 0); gtk_box_reorder_child(GTK_BOX(parent), GTK_WIDGET(toolbar), 1); pragha_toolbar_set_style(toolbar, TRUE); gtk_widget_show(GTK_WIDGET(window)); } else { gtk_widget_hide(GTK_WIDGET(window)); pragha_preferences_set_controls_below(preferences, FALSE); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Fullscreen"); gtk_action_set_sensitive (GTK_ACTION (action), FALSE); action = pragha_application_get_menu_action (pragha, "/Menubar/ViewMenu/Playback controls below"); gtk_action_set_sensitive (GTK_ACTION (action), FALSE); gtk_container_remove (GTK_CONTAINER(parent), GTK_WIDGET(toolbar)); gtk_window_set_titlebar (GTK_WINDOW (window), GTK_WIDGET(toolbar)); pragha_toolbar_set_style(toolbar, FALSE); gtk_widget_show(GTK_WIDGET(window)); } g_object_unref(toolbar); } #endif static void pragha_enum_map_removed_handler (PraghaMusicEnum *enum_map, gint enum_removed, PraghaApplication *pragha) { pragha_playlist_crop_music_type (pragha->playlist, enum_removed); } /* * Some public actions. */ PraghaPreferences * pragha_application_get_preferences (PraghaApplication *pragha) { return pragha->preferences; } PraghaDatabase * pragha_application_get_database (PraghaApplication *pragha) { return pragha->cdbase; } PraghaArtCache * pragha_application_get_art_cache (PraghaApplication *pragha) { return pragha->art_cache; } PraghaBackend * pragha_application_get_backend (PraghaApplication *pragha) { return pragha->backend; } #ifdef HAVE_LIBPEAS PraghaPluginsEngine * pragha_application_get_plugins_engine (PraghaApplication *pragha) { return pragha->plugins_engine; } #endif PraghaScanner * pragha_application_get_scanner (PraghaApplication *pragha) { return pragha->scanner; } GtkWidget * pragha_application_get_window (PraghaApplication *pragha) { return pragha->mainwindow; } PraghaPlaylist * pragha_application_get_playlist (PraghaApplication *pragha) { return pragha->playlist; } PraghaLibraryPane * pragha_application_get_library (PraghaApplication *pragha) { return pragha->library; } PreferencesDialog * pragha_application_get_preferences_dialog (PraghaApplication *pragha) { return pragha->setting_dialog; } PraghaToolbar * pragha_application_get_toolbar (PraghaApplication *pragha) { return pragha->toolbar; } PraghaSidebar * pragha_application_get_first_sidebar (PraghaApplication *pragha) { return pragha->sidebar1; } PraghaSidebar * pragha_application_get_second_sidebar (PraghaApplication *pragha) { return pragha->sidebar2; } PraghaStatusbar * pragha_application_get_statusbar (PraghaApplication *pragha) { return pragha->statusbar; } PraghaStatusIcon * pragha_application_get_status_icon (PraghaApplication *pragha) { return pragha->status_icon; } GtkBuilder * pragha_application_get_menu_ui (PraghaApplication *pragha) { return pragha->menu_ui; } GtkUIManager * pragha_application_get_menu_ui_manager (PraghaApplication *pragha) { return pragha->menu_ui_manager; } GtkAction * pragha_application_get_menu_action (PraghaApplication *pragha, const gchar *path) { GtkUIManager *ui_manager = pragha_application_get_menu_ui_manager (pragha); return gtk_ui_manager_get_action (ui_manager, path); } GtkWidget * pragha_application_get_menu_action_widget (PraghaApplication *pragha, const gchar *path) { GtkUIManager *ui_manager = pragha_application_get_menu_ui_manager (pragha); return gtk_ui_manager_get_widget (ui_manager, path); } GtkWidget * pragha_application_get_menubar (PraghaApplication *pragha) { GtkUIManager *ui_manager = pragha_application_get_menu_ui_manager (pragha); return gtk_ui_manager_get_widget (ui_manager, "/Menubar"); } GtkWidget * pragha_application_get_infobox_container (PraghaApplication *pragha) { return pragha->infobox; } GtkWidget * pragha_application_get_first_pane (PraghaApplication *pragha) { return pragha->pane1; } GtkWidget * pragha_application_get_second_pane (PraghaApplication *pragha) { return pragha->pane2; } gboolean pragha_application_is_first_run (PraghaApplication *pragha) { return string_is_empty (pragha_preferences_get_installed_version (pragha->preferences)); } static void pragha_application_construct_window (PraghaApplication *pragha) { /* Main window */ pragha->mainwindow = gtk_application_window_new (GTK_APPLICATION (pragha)); gtk_window_set_icon_name (GTK_WINDOW(pragha->mainwindow), "pragha"); /* Get all widgets instances */ pragha->menu_ui_manager = pragha_menubar_new (); pragha->menu_ui = pragha_gmenu_toolbar_new (pragha); pragha->toolbar = pragha_toolbar_new (); pragha->infobox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); pragha->pane1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); pragha->pane2 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL); pragha->sidebar1 = pragha_sidebar_new (); pragha->sidebar2 = pragha_sidebar_new (); pragha->library = pragha_library_pane_new (); pragha->playlist = pragha_playlist_new (); pragha->statusbar = pragha_statusbar_get (); pragha->scanner = pragha_scanner_new(); pragha->status_icon = pragha_status_icon_new (pragha); pragha_menubar_connect_signals (pragha->menu_ui_manager, pragha); /* Contruct the window. */ pragha_window_new (pragha); gtk_window_set_title (GTK_WINDOW(pragha->mainwindow), _("Pragha Music Player")); } static void pragha_application_dispose (GObject *object) { PraghaApplication *pragha = PRAGHA_APPLICATION (object); CDEBUG(DBG_INFO, "Cleaning up"); #ifdef HAVE_LIBPEAS if (pragha->plugins_engine) { g_object_unref (pragha->plugins_engine); pragha->plugins_engine = NULL; } #endif if (pragha->setting_dialog) { pragha_preferences_dialog_free (pragha->setting_dialog); pragha->setting_dialog = NULL; } if (pragha->backend) { g_object_unref (pragha->backend); pragha->backend = NULL; } if (pragha->art_cache) { g_object_unref (pragha->art_cache); pragha->art_cache = NULL; } if (pragha->enum_map) { g_object_unref (pragha->enum_map); pragha->enum_map = NULL; } if (pragha->scanner) { pragha_scanner_free (pragha->scanner); pragha->scanner = NULL; } if (pragha->menu_ui_manager) { g_object_unref (pragha->menu_ui_manager); pragha->menu_ui_manager = NULL; } /* Save Preferences and database. */ if (pragha->preferences) { g_object_unref (pragha->preferences); pragha->preferences = NULL; } if (pragha->cdbase) { g_object_unref (pragha->cdbase); pragha->cdbase = NULL; } G_OBJECT_CLASS (pragha_application_parent_class)->dispose (object); } static void pragha_application_startup (GApplication *application) { PraghaToolbar *toolbar; PraghaPlaylist *playlist; const gchar *version = NULL; const gchar *desktop = NULL; const GBindingFlags binding_flags = G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL; PraghaApplication *pragha = PRAGHA_APPLICATION (application); G_APPLICATION_CLASS (pragha_application_parent_class)->startup (application); /* Allocate memory for simple structures */ pragha->preferences = pragha_preferences_get(); pragha->cdbase = pragha_database_get(); if (pragha_database_start_successfully(pragha->cdbase) == FALSE) { g_error("Unable to init music dbase"); } version = pragha_preferences_get_installed_version (pragha->preferences); if (string_is_not_empty (version) && (g_ascii_strcasecmp (version, "1.3.1") < 0)) { pragha_database_compatibilize_version (pragha->cdbase); } pragha->enum_map = pragha_music_enum_get (); g_signal_connect (pragha->enum_map, "enum-removed", G_CALLBACK(pragha_enum_map_removed_handler), pragha); #ifdef HAVE_LIBPEAS pragha->plugins_engine = pragha_plugins_engine_new (G_OBJECT(pragha)); #endif pragha->art_cache = pragha_art_cache_get (); g_signal_connect (pragha->art_cache, "cache-changed", G_CALLBACK(pragha_art_cache_changed_handler), pragha); pragha->backend = pragha_backend_new (); g_signal_connect (pragha->backend, "finished", G_CALLBACK(pragha_backend_finished_song), pragha); g_signal_connect (pragha->backend, "tags-changed", G_CALLBACK(pragha_backend_tags_changed), pragha); g_signal_connect (pragha->backend, "error", G_CALLBACK(gui_backend_error_show_dialog_cb), pragha); g_signal_connect (pragha->backend, "error", G_CALLBACK(gui_backend_error_update_current_playlist_cb), pragha); g_signal_connect (pragha->backend, "notify::state", G_CALLBACK (pragha_menubar_update_playback_state_cb), pragha); /* * Collect widgets and construct the window. */ pragha_application_construct_window (pragha); /* Connect Signals and Bindings. */ toolbar = pragha->toolbar; g_signal_connect_swapped (toolbar, "prev", G_CALLBACK(pragha_playback_prev_track), pragha); g_signal_connect_swapped (toolbar, "play", G_CALLBACK(pragha_playback_play_pause_resume), pragha); g_signal_connect_swapped (toolbar, "stop", G_CALLBACK(pragha_playback_stop), pragha); g_signal_connect_swapped (toolbar, "next", G_CALLBACK(pragha_playback_next_track), pragha); g_signal_connect (toolbar, "unfull-activated", G_CALLBACK(pragha_window_unfullscreen), pragha); g_signal_connect (toolbar, "album-art-activated", G_CALLBACK(pragha_playback_show_current_album_art), pragha); g_signal_connect_swapped (toolbar, "track-info-activated", G_CALLBACK(pragha_playback_edit_current_track), pragha); g_signal_connect (toolbar, "track-progress-activated", G_CALLBACK(pragha_playback_seek_fraction), pragha); playlist = pragha->playlist; g_signal_connect (playlist, "playlist-set-track", G_CALLBACK(pragha_playback_set_playlist_track), pragha); g_signal_connect (playlist, "playlist-change-tags", G_CALLBACK(pragha_playlist_update_change_tags), pragha); g_signal_connect (playlist, "playlist-changed", G_CALLBACK(pragha_playlist_update_statusbar_playtime), pragha); pragha_playlist_update_statusbar_playtime (playlist, pragha); g_signal_connect (pragha->library, "library-append-playlist", G_CALLBACK(pragha_library_pane_append_tracks), pragha); g_signal_connect (pragha->library, "library-replace-playlist", G_CALLBACK(pragha_library_pane_replace_tracks), pragha); g_signal_connect (pragha->library, "library-replace-playlist-and-play", G_CALLBACK(pragha_library_pane_replace_tracks_and_play), pragha); g_signal_connect (G_OBJECT(pragha->mainwindow), "window-state-event", G_CALLBACK(pragha_toolbar_window_state_event), toolbar); g_signal_connect (G_OBJECT(toolbar), "notify::timer-remaining-mode", G_CALLBACK(pragha_toolbar_show_ramaning_time_cb), pragha->backend); g_signal_connect (pragha->backend, "notify::state", G_CALLBACK(pragha_toolbar_playback_state_cb), toolbar); g_signal_connect (pragha->backend, "tick", G_CALLBACK(pragha_toolbar_update_playback_progress), toolbar); g_signal_connect (pragha->backend, "buffering", G_CALLBACK(pragha_toolbar_update_buffering_cb), toolbar); g_signal_connect (pragha->backend, "notify::state", G_CALLBACK (update_current_playlist_view_playback_state_cb), pragha->playlist); g_object_bind_property (pragha->backend, "volume", toolbar, "volume", binding_flags); g_object_bind_property (pragha->preferences, "timer-remaining-mode", toolbar, "timer-remaining-mode", binding_flags); g_signal_connect (pragha->preferences, "LibraryChanged", G_CALLBACK (pragha_libary_list_changed_cb), pragha); g_signal_connect (pragha->preferences, "NeedRestart", G_CALLBACK (pragha_need_restart_cb), pragha); #if GTK_CHECK_VERSION (3, 12, 0) g_signal_connect (pragha->preferences, "notify::system-titlebar", G_CALLBACK (pragha_system_titlebar_changed_cb), pragha); #endif pragha->sidebar2_binding = g_object_bind_property (pragha->preferences, "secondary-lateral-panel", pragha->sidebar2, "visible", binding_flags); pragha->setting_dialog = pragha_preferences_dialog_new (pragha->mainwindow); #ifdef HAVE_LIBPEAS gboolean sidebar2_visible = // FIXME: Hack to allow hide sidebar when init. pragha_preferences_get_secondary_lateral_panel(pragha->preferences); pragha_plugins_engine_startup (pragha->plugins_engine); pragha_preferences_set_secondary_lateral_panel(pragha->preferences, sidebar2_visible); #endif /* If first run and the desktop is gnome adapts style. */ if (pragha_application_is_first_run (pragha)) { desktop = g_getenv ("XDG_CURRENT_DESKTOP"); if (desktop && (g_strcmp0(desktop, "GNOME") == 0) && gdk_screen_is_composited (gdk_screen_get_default())) { pragha_preferences_set_system_titlebar (pragha->preferences, FALSE); pragha_preferences_set_toolbar_size (pragha->preferences, GTK_ICON_SIZE_SMALL_TOOLBAR); pragha_preferences_set_show_menubar (pragha->preferences, FALSE); } } /* Forse update menubar and toolbar playback actions */ pragha_menubar_update_playback_state_cb (pragha->backend, NULL, pragha); pragha_toolbar_playback_state_cb (pragha->backend, NULL, pragha->toolbar); /* Finally fill the library and the playlist */ pragha_init_gui_state (pragha); } static void pragha_application_shutdown (GApplication *application) { PraghaApplication *pragha = PRAGHA_APPLICATION (application); CDEBUG(DBG_INFO, "Pragha shutdown: Saving curret state."); if (pragha_preferences_get_restore_playlist (pragha->preferences)) pragha_playlist_save_playlist_state (pragha->playlist); pragha_window_save_settings (pragha); pragha_playback_stop (pragha); /* Shutdown plugins can hide sidebar before save settings. */ if (pragha->sidebar2_binding) { g_object_unref (pragha->sidebar2_binding); pragha->sidebar2_binding = NULL; } #ifdef HAVE_LIBPEAS pragha_plugins_engine_shutdown (pragha->plugins_engine); #endif gtk_widget_destroy (pragha->mainwindow); G_APPLICATION_CLASS (pragha_application_parent_class)->shutdown (application); } static void pragha_application_activate (GApplication *application) { PraghaApplication *pragha = PRAGHA_APPLICATION (application); CDEBUG(DBG_INFO, G_STRFUNC); gtk_window_present (GTK_WINDOW (pragha->mainwindow)); } static void pragha_application_open (GApplication *application, GFile **files, gint n_files, const gchar *hint) { PraghaApplication *pragha = PRAGHA_APPLICATION (application); gint i; GList *mlist = NULL; for (i = 0; i < n_files; i++) { gchar *path = g_file_get_path (files[i]); mlist = append_mobj_list_from_unknown_filename (mlist, path); g_free (path); } if (mlist) { pragha_playlist_append_mobj_list (pragha->playlist, mlist); g_list_free (mlist); } gtk_window_present (GTK_WINDOW (pragha->mainwindow)); } static int pragha_application_command_line (GApplication *application, GApplicationCommandLine *command_line) { PraghaApplication *pragha = PRAGHA_APPLICATION (application); int ret = 0; gint argc; gchar **argv = g_application_command_line_get_arguments (command_line, &argc); if (argc <= 1) { pragha_application_activate (application); goto exit; } ret = handle_command_line (pragha, command_line, argc, argv); exit: g_strfreev (argv); return ret; } //it's used for --help and --version static gboolean pragha_application_local_command_line (GApplication *application, gchar ***arguments, int *exit_status) { PraghaApplication *pragha = PRAGHA_APPLICATION (application); gchar **argv = *arguments; gint argc = g_strv_length (argv); *exit_status = handle_command_line (pragha, NULL, argc, argv); return FALSE; } void pragha_application_quit (PraghaApplication *pragha) { g_application_quit (G_APPLICATION (pragha)); } static void pragha_application_class_init (PraghaApplicationClass *class) { GObjectClass *object_class = G_OBJECT_CLASS (class); GApplicationClass *application_class = G_APPLICATION_CLASS (class); object_class->dispose = pragha_application_dispose; application_class->startup = pragha_application_startup; application_class->shutdown = pragha_application_shutdown; application_class->activate = pragha_application_activate; application_class->open = pragha_application_open; application_class->command_line = pragha_application_command_line; application_class->local_command_line = pragha_application_local_command_line; } static void pragha_application_init (PraghaApplication *pragha) { } PraghaApplication * pragha_application_new () { return g_object_new (PRAGHA_TYPE_APPLICATION, "application-id", "org.pragha", "flags", G_APPLICATION_HANDLES_COMMAND_LINE | G_APPLICATION_HANDLES_OPEN, NULL); } gint main(gint argc, gchar *argv[]) { PraghaApplication *pragha; int status; #ifdef DEBUG g_print ("debug enabled\n"); pragha_main_thread = g_thread_self (); #endif debug_level = 0; /* setup translation domain */ setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); /* Force unicode to taglib. */ taglib_set_strings_unicode(TRUE); taglib_set_string_management_enabled(FALSE); /* Setup application name and pulseaudio role */ g_set_application_name(_("Pragha Music Player")); g_setenv("PULSE_PROP_media.role", "audio", TRUE); pragha = pragha_application_new (); status = g_application_run (G_APPLICATION (pragha), argc, argv); g_object_run_dispose (G_OBJECT (pragha)); g_object_unref (pragha); return status; } ���������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/pragha.h���������������������������������������������������������������������������0000664�0000000�0000000�00000014115�13435240150�0015162�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/*************************************************************************/ /* Copyright (C) 2007-2009 sujith <m.sujith@gmail.com> */ /* Copyright (C) 2009-2015 matias <mati86dl@gmail.com> */ /* */ /* This program is free software: you can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation, either version 3 of the License, or */ /* (at your option) any later version. */ /* */ /* This program 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 General Public License for more details. */ /* */ /* You should have received a copy of the GNU General Public License */ /* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /*************************************************************************/ #ifndef PRAGHA_APPLICATION_H #define PRAGHA_APPLICATION_H #if HAVE_CONFIG_H #include <config.h> #endif #include <glib.h> #include <gtk/gtk.h> #include "pragha-album-art.h" #include "pragha-art-cache.h" #include "pragha-backend.h" #include "pragha-database.h" #include "pragha-preferences.h" #include "pragha-preferences-dialog.h" #include "pragha-playlist.h" #include "pragha-library-pane.h" #include "pragha-toolbar.h" #include "pragha-scanner.h" #include "pragha-sidebar.h" #include "pragha-statusbar.h" #include "pragha-statusicon.h" #include "pragha-debug.h" #ifdef HAVE_LIBPEAS #include "pragha-plugins-engine.h" #endif G_BEGIN_DECLS /* Some default preferences. */ #define MIN_WINDOW_WIDTH (gdk_screen_width() * 3 / 4) #define MIN_WINDOW_HEIGHT (gdk_screen_height() * 3 / 4) #define COL_WIDTH_THRESH 30 #define DEFAULT_PLAYLIST_COL_WIDTH ((MIN_WINDOW_WIDTH - DEFAULT_SIDEBAR_SIZE) / 4) typedef struct _PraghaApplication PraghaApplication; void pragha_application_open_files (PraghaApplication *pragha); void pragha_application_add_location (PraghaApplication *pragha); void pragha_application_append_entery_libary(PraghaApplication *pragha); void pragha_application_about_dialog (PraghaApplication *pragha); /* Functions to access private members */ PraghaPreferences *pragha_application_get_preferences (PraghaApplication *pragha); PraghaDatabase *pragha_application_get_database (PraghaApplication *pragha); PraghaArtCache *pragha_application_get_art_cache (PraghaApplication *pragha); PraghaBackend *pragha_application_get_backend (PraghaApplication *pragha); #ifdef HAVE_LIBPEAS PraghaPluginsEngine *pragha_application_get_plugins_engine (PraghaApplication *pragha); #endif PraghaScanner *pragha_application_get_scanner (PraghaApplication *pragha); GtkWidget *pragha_application_get_window (PraghaApplication *pragha); PraghaPlaylist *pragha_application_get_playlist (PraghaApplication *pragha); PraghaLibraryPane *pragha_application_get_library (PraghaApplication *pragha); PreferencesDialog *pragha_application_get_preferences_dialog (PraghaApplication *pragha); PraghaToolbar *pragha_application_get_toolbar (PraghaApplication *pragha); PraghaSidebar *pragha_application_get_first_sidebar (PraghaApplication *pragha); PraghaSidebar *pragha_application_get_second_sidebar (PraghaApplication *pragha); PraghaStatusbar *pragha_application_get_statusbar (PraghaApplication *pragha); PraghaStatusIcon *pragha_application_get_status_icon (PraghaApplication *pragha); GtkBuilder *pragha_application_get_menu_ui (PraghaApplication *pragha); GtkUIManager *pragha_application_get_menu_ui_manager (PraghaApplication *pragha); GtkAction *pragha_application_get_menu_action (PraghaApplication *pragha, const gchar *path); GtkWidget *pragha_application_get_menu_action_widget (PraghaApplication *pragha, const gchar *path); GtkWidget *pragha_application_get_menubar (PraghaApplication *pragha); GtkWidget *pragha_application_get_infobox_container (PraghaApplication *pragha); GtkWidget *pragha_application_get_first_pane (PraghaApplication *pragha); GtkWidget *pragha_application_get_second_pane (PraghaApplication *pragha); gboolean pragha_application_is_first_run (PraghaApplication *pragha); gint handle_command_line (PraghaApplication *pragha, GApplicationCommandLine *command_line, gint argc, gchar **args); /* Info bar import music */ gboolean info_bar_import_music_will_be_useful(PraghaApplication *pragha); GtkWidget* create_info_bar_import_music(PraghaApplication *pragha); GtkWidget* create_info_bar_update_music(PraghaApplication *pragha); GtkWidget *pragha_info_bar_need_restart (PraghaApplication *pragha); /* Pragha app */ #define PRAGHA_TYPE_APPLICATION (pragha_application_get_type ()) #define PRAGHA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PRAGHA_TYPE_APPLICATION, PraghaApplication)) #define PRAGHA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PRAGHA_TYPE_APPLICATION, PraghaApplicationClass)) #define PRAGHA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PRAGHA_TYPE_APPLICATION)) #define PRAGHA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PRAGHA_TYPE_APPLICATION)) #define PRAGHA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PRAGHA_TYPE_APPLICATION, PraghaApplicationClass)) GType pragha_application_get_type (void) G_GNUC_CONST; typedef struct { GtkApplicationClass parent_class; } PraghaApplicationClass; void pragha_application_quit (PraghaApplication *pragha); G_END_DECLS #endif /* PRAGHA_APPLICATION_H */ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/src/xml_helper.c�����������������������������������������������������������������������0000664�0000000�0000000�00000011746�13435240150�0016061�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * This File is part of libclastfm 0.5 (http://liblastfm.sourceforge.net/) * Licenced as GNU General Public License version 3 * http://sourceforge.net/p/liblastfm/code/ci/master/tree/src/lfm_helper.c */ #define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <glib.h> #include "xml_helper.h" const char *HTML_ESCAPE[] = { "&", "&", ""","\"", "–","-", NULL }; /* XML Parser's Element name and content buffer */ #define BUFFER_SIZE 1024*1024 char * unescape_HTML(const char *original) { char *cptr, *dup; int i; if (original == NULL) return NULL; dup = strdup (original); for( i = 0 ; HTML_ESCAPE[i]; i += 2) { cptr = strstr(dup, HTML_ESCAPE[i]); while (cptr) { // This may not work on older systems sprintf (cptr, "%s%s", HTML_ESCAPE[i+1], cptr+strlen(HTML_ESCAPE[i])); cptr = strstr (dup, HTML_ESCAPE[i]); } } return dup; } /* Returns 0 if not entirely white space */ int strisspace(const char *string){ char *i; if(string == NULL)return 1; for(i=(char *)string;*i;i++){ if(!isspace(*i))return 0; } return 1; } static void xmlnode_add(XMLNode **head,XMLNode *node){ XMLNode *walk = NULL; XMLNode *walk_p = NULL; if(*head == NULL){ *head = node; }else{ for(walk = *head ; walk ; walk = walk->next){ walk_p = walk; } walk_p->next = node; } } static XMLNode *xmlnode_new(char *name){ XMLNode *node; node = malloc(sizeof(XMLNode)); node->name = strdup(name); node->content = NULL; node->attributes = NULL; node->children = NULL; node->next = NULL; return node; } static char * _tinycxml_parse(char *xml,XMLNode *parent, char *buffer){ char *c = NULL; char *n = NULL; char *p = NULL; XMLNode *node = NULL; if(xml == NULL) return NULL; if(*xml == 0) return xml; c = strstr(xml,"<"); if(c == NULL) return NULL; c++; if(*c == '/' ) return c; p = buffer; for(;*c && *c != '>' && *c != ' '; c++){ *(p++) = *c; } *p = 0; node = xmlnode_new(buffer); xmlnode_add(&parent->children,node); XMLNode *attrib; if(*c == ' '){ // Attributes p = buffer; n = c; c = strstr(c,">"); for(n++;n<c;n++){ if(*n == '='){ *p = 0; attrib = xmlnode_new(buffer); xmlnode_add(&node->attributes,attrib); p = buffer; // n+=2 // Get past the opening " char for(n+=2;n<c && *n!='"';n++){ *(p++) = *n; } *p = 0; attrib->content = strdup(buffer); p = buffer; }else if (*n != ' '){ *(p++) = *n; } } // Self closing tag? if( *(c-1) == '/' ) return c; } c++; /* There is a lot of XML out there that invalidates * XML spec by using '<' and friends inside a CDATA tag. * Although according to the spec we should just error * out, I prefer to mitigate errors in well known conditions. */ /* Raw copy in the CDATA tag */ /* Assume CDATA is the only content */ if(strncmp(c,"<![CDATA[",9) == 0){ n = strstr(c,"]]>"); n += 3; node->content = g_strndup(c, n-c); n = strstr(n,">"); return (n) ? n+1 : NULL; } while(1){ n = _tinycxml_parse(c,node,buffer); if (n == NULL ) break; if(*n == '/' ) { memcpy(buffer,c,n-c-1); buffer[n-c-1] = 0; if(!strisspace(buffer)){ node->content = strdup(buffer); } n = strstr(n,">"); return (n) ? n+1 : NULL; } if(*n == 0) break; c = n; } return NULL; } XMLNode *tinycxml_parse(char *xml){ char *c = NULL; char *buffer = NULL; XMLNode node; if(xml == NULL) return NULL; node.children = NULL; c = strstr(xml,"<?xml"); if(c){ c = strstr(xml+5,"?>") + 2; } if (c == NULL) c = xml; buffer = malloc(sizeof(char) * BUFFER_SIZE); _tinycxml_parse(c,&node,buffer); free(buffer); return node.children; } void xmlnode_free(XMLNode *node){ if(node == NULL) return; if(node->name) free(node->name); if(node->content) free(node->content); xmlnode_free(node->attributes); xmlnode_free(node->children); xmlnode_free(node->next); free(node); } void tinycxml_dump(XMLNode *root){ if(root == NULL) return; printf("[%p] name = %s, content = %s\n", root,root->name,root->content); tinycxml_dump(root->attributes); tinycxml_dump(root->children); tinycxml_dump(root->next); } static XMLNode *_xmlnode_get_wcontent(XMLNode *root, const char *name, const char *value){ XMLNode *i,*j; for(i = root; i ; i= i->next){ for(j = i->attributes ; j ; j=j->next){ if( strcmp(j->name,name) == 0) { if(value == NULL) return j; if(strcmp(j->content,value) == 0)return i; } } } return NULL; } static XMLNode *_xmlnode_get(XMLNode *root, const char **path, int pos){ XMLNode *walk; if ( root == NULL) return NULL; for(walk = root ; walk ; walk=walk->next){ if(strcmp(walk->name,path[pos])== 0) { if(path[pos + 1] == NULL) return walk; return _xmlnode_get(walk->children,path,pos+1); } } return NULL; } XMLNode *xmlnode_get(XMLNode *root, const char **path, const char *name, const char *value){ XMLNode *node; node = _xmlnode_get(root,path,0); if(name){ return _xmlnode_get_wcontent(node,name,value); }else{ return node; } } ��������������������������pragha-1.3.4/src/xml_helper.h�����������������������������������������������������������������������0000664�0000000�0000000�00000001132�13435240150�0016052�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#include <stdlib.h> #ifndef HELPERS_H #define HELPERS_H #define CCA (const char *[]) /* Nodes can be an element or an attribute */ typedef struct _XMLNode XMLNode; struct _XMLNode { char *name; char *content; XMLNode *attributes; // List of attributes XMLNode *children; // List of child elements XMLNode *next; // List of peer elements }; char *unescape_HTML(const char *original); int strisspace(const char *string); XMLNode *xmlnode_get(XMLNode *root, const char **path, const char *name, const char *value); void xmlnode_free(XMLNode *node); XMLNode *tinycxml_parse(char *xml); #endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/win32/���������������������������������������������������������������������������������0000775�0000000�0000000�00000000000�13435240150�0013720�5����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/win32/README���������������������������������������������������������������������������0000664�0000000�0000000�00000001743�13435240150�0014605�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������OVERVIEW: Here is a brief description of how to compile Pragha to Windows using MinGW from an Fedora host system. Note that these were my tests. Surely there are better ways of doing it. In any case send me a mail. Install deps: # sudo yum install mingw32-gcc mingw32-gtk3 mingw32-gstreamer1 \ mingw32-gstreamer1-plugins-base mingw32-sqlite mingw32-taglib Prepare the build: # git clone https://github.com/matiasdelellis/pragha.git PraghaWin32 # cd PraghaWin32 # ./autogen.sh --host=i586-mingw32msvc --enable-debug # mingw32-configure --host=i586-mingw32msvc --enable-debug Build and install: # make -j5 # sudo make install How to test: # sudo yum install wine # wine /usr/i686-w64-mingw32/sys-root/mingw/bin/pragha.exe It work properly? Probably not, due to lack the support to directsound, and all proprietary codecs. You need install a complete version of Gstreamer SDK Please, continue with the next section: https://github.com/pragha-music-player/pragha-win32-installer �����������������������������pragha-1.3.4/win32/pragha.ico�����������������������������������������������������������������������0000775�0000000�0000000�00000302536�13435240150�0015672�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� �h��V��� ���� �����00���� �%��f��@@���� �(B��;������ �(�6}��(������ ���� �����@������������������m; m;n;˳m;ϳm;ϳm;ϳm;ϳm;ϳm;ϳm;ϳm;ϳm;ϳm;ϳn;˴m;m; m;n<n<}Q۹ǴҧrAn<n<n<n<n<n<n<m;m<˴n<vG˺p?n<n<n<n<n<n<m<˳m<ϴn<ʝ}n<o?˻Өn<n<n<n<n<n<m<ϳm<ϴn<ÔqڸʘuyOo>n<n<n<n<n<m<ϴn<ϵp?rCuFҧrBn<n<n<m<ϷtEϽS{N|Qڹn<ѯܾ}On<n<m<ϸwH\W~SֲwIsCǛ{ʗsn=p?n<m<ϺyKÌe‰`eΟ~~QzM`Π~n<ƚzʗsn<m<ϻ|NǓnŏigϢZU{PزrAÒoٶn<m<ϼ~RʙwȖrÏiͥËc^YɷyKطԫn<m<ϽUΠ̜zʙvėwΡĎgŠbiƒmWo>m<ϾXѦϣ͟˛yřy׷ӪХ͟~{NxIo>ϾWԭҩѦϢ͟~ŕrͧپ¯̝{\W~RrB˵q@ϣְԬҩХ΢͞}˛xɗsĐkďhÌe‰`Wp>m; q@\`^]Ͽ[ϿYϾXϽVϽTϼ~Rϻ}PϺzL˶qAm; ��������������������������������(��� ���@���� �����������������������l< n;Wn<m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;n<n;Wl< m;'m<ͳn;n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;m<ͳm;'p; n;ʹn<n<n<n<n<n<tDÊbɖqƏh{Mn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;ʹp; m<Yn<n<n<n<n<p?Ӫ­~Qn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Yn<n<n<n<n<o=ۼˆ_n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<n<n<n<n<ŽiϨaœyKn<n<n<n<n<n<n<n<n<n<n<n<n<n<m<m<n<n<n<o=سn<n<n=rI޾n=n<n<n<n<n<n<n<n<n<n<n<n<n<m<m<n<n<n<o>Ξ|n<n<n<n<rHXn<n<n<n<n<n<n<n<n<n<n<n<n<m<m<n<n<n<o>˽TxIrAn<n=۸n<n<n<n<n<n<n<n<n<n<n<n<n<m<m<n<n<n<o=Ȧϟ}n<oCuEn<n<n<n<n<n<n<n<n<n<n<n<m<m<n<n<n<n<vMzLn=ϳ̛x|On<n<n<n<n<n<n<n<n<n<m<m<n=sCtDrAqAqRn<i«Tn<n<n<n<n<n<n<n<m<m<wH~R|P{MyKvIbo>n<sHɺΞ{o=n<n<n<n<n<n<m<m<zLWT~R|O{MyK[صrAn<n<n@įo>mAսӨn=n<n<n<n<n<m<m<|O[YVT~Q|OѬ­xIuErAo>o>޾n<n<nA̿ʗrn<n<n<n<n<m<m<~Q_][XVT\zLxJvGtEsCջĮn<n<n<[xIn<n<n<n<m<m<TÌdŠa_]ZfűS}P{NzLxIwGǣʷn<n<n<m>Өn<n<n<n<m<m<VŏhčfËd‰a_•t۷WUR}P{NyKep?n<n<o=Ҷo>n<n<n<m<m<YƒmƐjŏhčeËcqڶ\YWT~R|PwNvGqAo=o=ίxIn<n<n<m<m<\ȕqǔoƒlŐjĎg_î‰`^[YWTzOȺ~RuEsCrAֻ{Mn<n<n<m<m<^ʙvɗsȕqǓnƑl]ڿŏhŠb`][YVš}ŎfxJwGvGvGn<n<n<m<m<‰a̜z˚xʘuɗsȕpől›ԬĎgÌdŠb_][|TѤ|NzLŽio=n<n<n<m<m<Ëc͟~̝|˜z˚wʘuɖr]̛xŏičfÌdŠa_Y˫ĮSSҦq@n<n<n<m<m<čfϢΡ͟~̝{˛yʙwȗs^̜yƑkŏhčfËc‰a}WÉa|OvFsBn=n<m<m<ŏhѦФϢΠ͞~̝{˛yɗt^IJٴɖrƐjŎhče`ɻŠb{MyKwHtEn=m<m<ƑkҩѧХФϢΠ͞}̝{ʙw^̯Ͻܺڷ˸ÌeT~Q|OzMxJsCm<m<ƒlԬӪҩѧХϣΡ͠͞}̜zÑmeɧ­_[XVS}Q|OuEm<n<ŠaְծԬӪҩѧХϣΡ̞͟|̜zɘuŽjbfgeo±ΠŠb_]ZXVSvFn<m<YtEԫױ֯ծԬӪҨѦХϣΡ͟~̝|˜y˚wʘuɖrȔpƒm_dčfÌd‰a_\ZWrAm<Yp; n;ͽUԭ׳ֱկխԫӪҨѦФϢΡ͟~̝{˛yʙwɘtȖrȔoǒmƑkŏhčfËc‰a^{Mn<ʹp; m;'m<ͷuFĎgʚw˚wʙvʘuɗsȖrȕqȔpǓnǒmƑlŐjŏiĎgčfÌd‹cŠa`^]ZSvFn<ͳm;'l< n;Wn<m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;n<n;Wl< ��������������������������������������������������������������������������������������������������������������������������������(���0���`���� �����%������������������l< n;/o<Yn;om;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;um;un;oo<Yn;/l< i=n;;n;n;n;n;m;m;n;m;m;n;n;m;n;n;m;n;n;m;n;n;m;n;m;m;n;m;m;n;m;m;n;m;m;n;m;m;n;n;n;n;n;;i=a:m;Qm<n<n<n<n<n<n<n<n<m<m;m;m<m;m;m<m;m;m<m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;n<m<m;Qa:n;;n;n;n<n<n<n<n<n<n<n<n<p?vF{N{MwGp?n<m<m<n<m<m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;n;n;;o> m<m<n;m<n<n<n<n<n<n<wI̜yî߿͜xyJn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<m<o> m;/m<m;n<m<n<n<n<n<n=ËcǑip>m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m<m;/n<[n;m;n;n<n<n<n<n<ŒmҦrAm;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;m;n<[m<on<n<n;m<n<n<n<zMТo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<om<sn;m;n<m<n<n<o>ϫǘwsFoBuMŸ\n<m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m<sm<sn<m;n;n<n<n<vIТn<n<n<n=l>{WʷwHm;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n;m<sm<sn<n<n;m<n<n<VVn<n<n<n<n<m>zU͜yn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<sm<sn;m;n<m<n<o<\Xm<m;m;m<m;n<m>rϽvGm;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m<sm<sn<m;n;n<n<n=}VװsBo=o=n<n<m<n<mBɕon;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n;m<sm<sn<n<n;m<n<n<tIȴڶٳѤ[p?n<n>a߾o>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<sm<sn;m;n<m<n<n<oAѷΞ{n<n<l@|On<m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m;m<sm<sn<m;n;n<n<n<o?\|Nn<n>μʖq|Np?n<m;m;n<m;m;n<m;m;n<m;m;n<m;m;n;m<sm<sn<n<n<n<n<n<n<oCʫČdn<o=}X¬̚wxIn<n<n<n<n<n<n<n<n<n<n<n<n<n<m<sm<sn<o>uFwHvGtErBrAsKԺXn;n<oCɔnrAm;m;m;m;m;m;m;m;m;m;m;m;m<sm<sn<yK~R}P|O{MyKxJwIrHžíq@n<m<n?ӹݹ|On<n<m;m;n<m;m;n<m;m;n;m<sm<so>}QUS~Q}P|NzMyKxJrG|YܾzMn<n<n<n>šѩvK}ZƸͻTn<n<n<n<n<n<n<n<n<n<m<sm<so>SXVTS}Q|O{NzLyKuIȹײwHo=n<m;m;o>mxIn<n>pGϾRn<m;m;m;m;m;m;m;m;m<sm<so>V[YXVTR}Q|O{N`ݾyJuFsDrAo>n<o=YxIm;m<o>mD̿ȳxIm;n<m;m;n<m;m;n;m<sm<sp>X^\ZYWVT~R~Rյ\xJwIvGuEtDrAp?yQyKn<n<n<n>~[լo>n<n<n<n<n<n<n<m<sm<sp>Z‰`_]\ZYWUUլ|O{MyLxJwHvFuEsCtI{Mm;m;m;n<m@ӺWn<m;m;m;m;m;m;m<sm<sp>]ËdŠb‰`_][ZXfče~R}P|N{MyKxJwHvFsFĴ}Pm<n<n<m<n>fڶp?m<n<n<m<n<n<m<sm<sp?_čgÌeËcŠb‰`^][Ú|\US~Q|P|NzMyKxIuHǥXn<n<n<n<n=vN}On<n<n<n<n<m<m<sm<sp?ŠaŐiŎhčfÌeËcŠa`\ƞλ\XVTS}Q|P{NzLxKjƏgp>n<n<m<n<pCɕon<m<n<m<m<m<m<sm<sp?ËdƒlƑkŐiĎgčfÌdËc_š~˸_[YXVTR}Q|O{NvN͜ysBq@o>n<n<pB֮n=n<n<m<n<n<m<sm<sp?čfǔoǓnƒlƑjŏiĎgčfŠbnČd]\ZYWUT~R}QtJԨuFtDrBq@o=qCݻp>n<n<n<n<m<m<sm<sp?ŏhȖrȕqǔoǓmƑlŐjŏiÍf}Wȓn‰`_]\ZXWUSyNţڶxIvFtEsCrByMܹo=m<n<m<m<m<m<sm<sq@ƑkʘuɗtȖrȕpǔoǒmƑlŐj|TƶѥËdŠb‰`_][ZXWT\ɵ|NxJwHvFuEbٴo=n<n<m<n<n<m<sm<sq@ǒm˚xʙwʘuɗsȖrȕpǓnƒm`įŏhÌeËcŠb‰`^][ZXvMXzMyKxIxIϫΞ|n<n<n<n<n<m<m<sm<sq@Ȕo̝{˛y˚xʙvɘuɗsȕqȔpƒl{V;ϡĎhčfÌeËc‰a`^\[~T}Əh|O{NzLUZn<m<n<m<m<m<m<sm<sq@Ȗr͟~̞|̝{˛y˚xʙvɘtɗsȖq_|ʗrŐiĎhčfÌdËc‰a_^[wOҥ~R}Q}PԱɶwHo=n<n<m<n<n<m<sm<sq@ɗtΡΠ͟~̞|̜{˛y˚wʙvɘtǕq{TгîɖrƑjŏiĎgčfÌdÊb‰a_~U|ŰWTəvȔnuEsCp?n<n<n<m<m<sm<sqAʙvϣϢΡ͠͞}̝|̜z˛yʚwʙuŒmwPѴíʘsƑlƐjŏiĎgČeËdŠb_uNōf̝{ݿzMwHvGtEq@n<m<m<m<sm<sqA˛yѥФϣϢΡ͟͞}̝|̜z˛xʚwƔpxQͮӨȕpƑlŐjŏhĎgČeËdZĢɶV{MyKxJwHvFrBn<n;m<sm<srA̝{ҨѦХФϣ΢Π͟͞}̝{˜z˚xƕp{UĠر͝zȔoƑkŏiŏhʙuȵ^~Q}P{NzMyKxIwHrBn<m<sm<srA͞}ӪҩѧѦХФϢΡΠ͟~͞}̝{˛yɗt[dȹ˸ɵоԱ\VTS}Q|O{NzLyKvGn=m<sm<srAΠԬӫӪҩѧѦХФϢΡΠ͟~͞|̝{˛yĒm|Viдʚx]ZYWVTR}Q|O{NxIn=m<sm<op?͞}ծխԬӫөҨѧѦХϣϢΡΠ͟~̝|̝zʚwƔpb\eÞֽͯսջө‰a_]\ZYWUT~R}PyKn=m<on<[n=ǔnֱ֯ծԭԬӪҩҨѧѦФϣϢΡ͠͞}̝|̜z˛xʙvȖrĒmhffd`|U`Թ֯ÌeŠb‰`_]\ZXWUSyKn<n<[m;/m<|Oխײְ֯ծԭԫӪҩҨѧХФϣϢΡ͟͞}̝|̜z˛xʙwʙuɗtȖrȕpǔoǒmf{S`ďhÌeËcŠb‰`_][ZXVvFm<m;/o> m<n=őkֱײױְկծԭӫӪҩҨѦХФϣ΢Π͟͞}̝{˜z˚xʙwɘuɗsȖrȕpǓnƒlďhŐiŎhčfÌeËcŠa‰`^][Tp>m<o> n;;n;q@ƒlְسײְֱծծԬӫӪҩѧѦХФϣΡΠ͟~̞|̝{˜y˚xʙvɘuɗsȕqȔpǓnƒlƑkŐiĎhčfÌdËc‰a_XtDn<n;;a:m;Qm<o=}QʙuѦөҩҨѧѦХФϣϢ΢Ρ͟͠~̞|̝{˜z˛x˚wʙvɘtɗsȖrȕqǔoǓnƒmƑkŐjŏhĎgčfÌdˆ`[|Oq@m<m;Qa:i=n;;n;n;o=sBuFuFuFuFuFuFuFuFuFuEuEuEuEuEuEtEtEtDtDtDtDtDtDtDtDtCsCsCsCsCsCsBq@o>n<n;n;;i=l< n;/o<Yn;om;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sm;sn;oo<Yn;/l< ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������(���@������� ������B������������������gCn;p<)n<?m;Km<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm;Kn<?p<)n;gCm6l=)n<n;Ǵn;n<n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n<n;n;Ǵn<l=)m6k: n<gn;ٳn;n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;n;ٵn<gk: h9 m;m<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<m;h9 w2n;gn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o>q?q@p?p>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;gw2o<)m;۴n<n<n<n<n<n<n<n<n<n<n<n<n<rBYΞ}ܹ֮޼ٴԪȓm}Pq@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m;۵o<)l>m<n<n<n<n<n<n<n<n<n<n<n<n<qAǒlƲڴYp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<l>o9m<ɴn<n<n<n<n<n<n<n<n<n<n<xKڷӥvFn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<ɺo9n=+n;n<n<n<n<n<n<n<n<n<n<xKƲݺ|Mn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;n=+m<An<n<n<n<n<n<n<n<n<n<sB׷߾zLn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Am=Kn<n<n<n<n<n<n<n<n<n=kҷœàϳرsAn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m=Km<Mn<n<n<n<n<n<n<n<n<sDȷgqBp@n?k?pIǦʖqo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<o=Yɖqn=n<n<n<n=o?h>kTn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<q@Ù|vFn<n<n<n<n<n<o>i<_ذq@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<qAʪĮr@n<n<n<n<n<n<n<o>j>fWn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<pA̭ϽuEn<n<n<n<n<n<n<n<o>i?ѵ֬p?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<oAƥȒlo=n<n<n<n<n<n<n<n<n?uP~Pn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<o@sϠ}†[YU{LrAn<n<n<n=j>Ʀ͜wn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<p@wQ߾ǐiq@n<n<o@uPrAn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<o>nDƶ͚uo=n<o>k?ҷ[n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<n<oBn|Nn<n<n@eͻɔnwHq?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<n<n<n<n<n<p@nEվȓmn<n<o?nFڳʗrRp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<n<n<o=o=o=n=n<n<pCxTʗqn<n<o=lAԼرYp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<n<q@wHyLyKxJwHuEsBrBqE]^n<n<n<n?{ժ{Mn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<o>{N~R}P|O{N{MzLxJxIxIrGvQ־¬sCn<n<n<p@~[˸Ōdp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<rASTS~Q}P|O{NzMyKyJxJtHkCsʺSn<n<n<n<p>pIϮa~ΝzrAn<n<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<rBVVUTS}Q}P|O{NzMyKxKxJmBmطxJo=n<n<n<n<o=nDҧrBo?j>pKǸҤrBn<n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<rCXXWVTS~R}Q}P|O{MzLyKxKrְwIqAo=n<n<n<n<n<nA־Čdn<n<n=m?nGĵСq@n<n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<sCZ[ZXWVTS~R}Q|P|N{M{O׼ܻzLvFtEsCrAo>n<n<n<n@ˬƎfn<n<n<o=n?oIɕoo=n<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<tC\][ZYXWVTS~R}Q}PhYxJwHvGuFtDsCrAp?o<pAǑjn<n<n<n<n=l?yVVn<n<n<n<n<n<n<n<n<n<n<m<Mm<Mn<tD^_^][ZYXWUTS~Sַ͞|{NzLxJxIwHvGuFtDsCrArDjʕon<n<n<n<n<o>i>ͰݹtCn<n<n<n<n<n<n<n<n<n<m<Mm<Mn<tD‰`‰a‰`_^][ZYXWUVпX|O{NzMyKxJxIwHvFuEtDtDzU˙tn<n<n<n<n<n<n@wSǐhn<n<n<n<n<n<n<n<n<n<m<Mm<Mn<uEÊbËdŠb‰aˆ`^]\[ZXXgխS}Q}P|O{NzMyKxJwIwGvFvGqH͝yn<n<n<n<n<n<o>k@tCn<n<n<n<n<n<n<n<n<m<Mm<Mn<uFÌdčfÌeËcŠb‰aˆ`^]\[YĜʖqTS~R}Q}P|O{MzLyKxJwIxHpEǺѣn=n<n<n<n<n<n<m?ßÈ^n<n<n<n<n<n<n<n<n<m<Mm<Mn<uFčfŏhčgčeÌdËcŠb‰`ˆ_^]WɧƏgWVTS~R}Q|P|N{MzLyKxJqEʪ֮p?n<n<n<n<n<n<p@_Ԩo>n<n<n<n<n<n<n<n<m<Mm<Mn<uFŏhƐjŏiĎhčgčeÌdËcŠa‰`ˆ_W̫čeYXWUTS~R}Q|P{N{MzLuIq޻uCp>n<n<n<n<n<o>rIɵsBn<n<n<n<n<n<n<n<m<Mm<Mn<vGƐjǒlƑkŐjŏiĎgčfČeÌdËcŠaXȨōf[ZYXWUTS~Q}P|O{NzMwQȴwHrBq@o>n<n<n<o=rI}On<n<n<n<n<n<n<n<m<Mm<Mn<vGƒlǔnǓmƒlƑkŐjŏhĎgčfČeÌdZǒk]\[ZYXWUTS~Q}P}PpH{NtDsCrBq@o=n<p>rIÈ^n<n<n<n<n<n<n<n<m<Mm<Mn<wHǓnȕqȔpǓnǒmƑlƑkŐjŏhĎgčf^j͜y‰`^]\[ZXWVUT~R~RrHˬWvFuEtDsCrAp?p?xPÊ`n<n<n<n<n<n<n<n<m<Mm<Mn<wHȕqɗsɖrȕqǔoǓnǒmƑlƐjŐiŏhdvQիÊb‰aˆ`^]\[ZXWVTTyNaċbxIvGuFtEtDsCsCm]n<n<n<n<n<n<n<n<m<Mm<Mn<xIɖsʘuɘtɗsȖrȕqǔoǓnǒmƑkƐjŏhuMǸ࿨ĎfËcŠb‰`ˆ_^]\ZYXWVToG̙tyKxJwHvGuFtEuF˩Yn<n<n<n<n<n<n<n<m<Mm<Mn<xIʘt˚wʙvʘuɘtɖrȕqȕpǔoǓnǒmƑk}UʗsčeÌdËcŠa‰`_^][ZYXWtIˬժ|NzLyKxJwHvGxL̿zLn<n<n<n<n<n<n<n<m<Mm<Mn<xJʚw̜z˛x˚wʙvʘuɗtɖrȕqȔpǔnǓmdvQزŏhčfČeÌdËc‰a‰`_^][ZY|S`޽~R{N{MyKxJyJdìrAn<n<n<n<n<n<n<n<m<Mm<Mn<xJ˛y̝|̜z̛y˚xʚwʙvɘuɗtɖrȕqȔpƓmvMȧ˚vŏhĎgčfČeËdÊb‰a‰`_]\[YoFŶX}P|O{NzM{Nٽѥn=n<n<n<n<n<n<n<n<m<Mm<Mn<yK̝{͟~͞}̝{̜z˛y˚xʙwʙuɘtɗsɖrȕqdsNůȔoŐiŏhĎgčfÌeËdŠb‰aˆ`^]\yOfƐi~R}Q}P|OÑm‡]p?n<n<n<n<n<n<n<n<m<Mm<Mn<yK͞}ΡΠ͞~͞}̝{̜z˛y˚xʙwʙuɘtɗsȕqzRkڵǓmƑjŐiŏhĎgčfÌdËcŠb‰aˆ`^[nFƸԨUS~R\ڶwGtDrAn=n<n<n<n<n<n<m<Mm<Mn<yLΟϢΡΠΟ͞~͞|̝{̜z˛y˚xʙvʘuɘtŒmqHزȔnƑkƐjŏiŎhčgčeÌdËcŠb‰`ˆ_zQgƱZV[݈^wGuFtDsBo>n<n<n<n<n<m<Mm<Mn<zLΡФϣϢΡΠ͟~͞}̝|̝{̜z˛x˚wʙvʘuďjpHzڴɖpǒmƑkƐjŏiĎhčgČeÌdËcŠa^nGȒmŎgİϣzLxJwHvGuFtDp?n<n<n<n<m<Mm<Mn<zMϣѥХФϣϢΡΠ͟~͞}̝|̝{̜z˛x˚wʙvÑlrJvȳϠǓnƒlƑkŐjŏhĎgčfČeÌdËc}Tdоծ~Q{MyKxJxIwHvGtEq@n<n<n<m<Mm<Mn<{MХѧѦѥФУϢ΢ΡΠ͟~͞}̝|̜z̛y˚xʚwŒmsKn޽ТɕpǒlƑkŐjŏhĎgčfČe‹dаشT}P|O{NzMyKxJwIwGuFq@n<n<m<Mm<Mn<{MѦҩҨѧѦѥФϣϢΡΡΠ͟~͞}̝{̜z˛y˚xƔpxPyUŶϽڶѣʘtȔoǓmȓm˙tڶҪXS~R}Q}P|O{NzLyKxJwIvFo>n<m<Mm<Mn<{NѧӪөҩҨѧѦХФϣϢΡΡΠ͞~͞}̝{̜z̛yʘu^pHzŔqYWVTS~R}Q|P|N{MzLyKxIp?n<m<Mm<Mn<|NҩԬӫӪөҩҨѦѦХФϣϢΡΠ͟͞~͞|̝{̜z˚xœn|UrM{ôݿb\ZYXWVTS~R}Q|P|N{MyKp?n<m<Mm=Kn<yKӪծԭԬӫӪөҨѧѦѦХФϣϢΡΠ͟~͞}̝|̝{̜zʚwŒn^vOvRtβdzÌd_^][ZYXWUTS~R}P|O{Mq?n<m=Km<An<tDҨ֯ծծԭԬӫӪҩҨѧѦѥХФϣϢΡΠ͟~͞}̝|̝{̜z˚xʘuœocW{TwQ{Vdc__epѸҨËc‰a‰`_^][ZYXWUTS~Q|Oo>n<m<An=+n;p?˛yְֱ֯ծխԭԬӫӪҩҨѧѦѥФУϢ΢ΡΠ͟~͞}̝|̜z̛y˚xʚwʙuɘsȖqǔoǓnƓmƒlŐjčg[tKxTѶ޿ŐiËdŠb‰a‰`^]\[ZYWVUT|Oo=n;n=+o9m<ɴn<[կײְֱ֯ծխԬԫӪӪҩҨѧѦХФϣϢΡΡΠ͟~͞}̝{̜z˛y˚xʙwʙuɘtɗsɖrȕqȔoǓnǓmŐj\qI^ƔnčeÌeËdŠb‰aˆ`^]\[ZXWVyKn<m<ɺo9l>m<n<qA˛x׳ײײְֱ֯ծԭԬӫӪөҩҨѧѦХФϣϢΡΡΟ͞~͞}̝{̜z˛y˚xʙwʙuɘtɗsɖrȕqǔoǓnǒmŏi`čeďhčgčeÌdËcŠb‰aˆ`^]\[ZVsCn<m<l>o<)m;۴n<xJϣشسײױְֱկծԭԬӫӪөҩҧѦѦХФϣϢΡΠ͟͞~͞|̝{̜z˛y˚wʙvʘuɘtɗsȕqȕpǔoǓnƒmƑkƐjŏiŎhčgčeÌdËcŠa‰`_^]Z{Mn=m;۵o<)w2n;gn<n<xJ̝{ײشسײױֱ֯ծծԭԬӫӪөҨѧѦѦХФϣϢΡΠ͟~͞}̝|̝{̜z˛x˚wʙvʘuɗtɖrȕqȕpǔoǓmǒlƑkŐjŏiĎhčfČeÌdËcŠa‰`]}Oo>n<n;gw2h9 m;m<n<rA^Ρծְְְ֯ծխԬԬӫӪҩҨѧѧЦХФϣϢΡΡ͟͠~͞}̝|̜z˜y˛x˙wʙvɘuɗtȗsȖqȕpȔoǓnǒmƑkƐjŐiŏhĎgÌeËc‰`WwIo=m<m;h9 k: n<gn;ٳn;n<qAyKV[[[[[[ZZZZZZYYYYYYXXXWWWVVVVUUUUTSSSS~R~R~Q~Q}P{MvGsBo>n<n;ٵn<gk: m6l=)n<n;Ǵn;n<n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n<n;n;Ǵn<l=)m6gCn;p<)n<?m;Km<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm<Mm;Kn<?p<)n;gC��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������(���������� ������������������������+tF p@s@o7j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@o7s@p@tF +�UUj@ p=m=+p<Ao=Sn=eo<sn;}n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;}o<sn=eo=Sp<Am=+p=j@ UUUUi<n:-n>Wn<n;o<Ӵo=۴n<n<n<n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n<n<n<o=۴o<Ӵn;n<n>Wn:-i<UU�j@ m=+n=eo<n<״n<n<n;n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;n<n<n<״o<n=em=+j@ �UUu@p;Sn;n<ٴn<n;n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;n<n<ٴn;p;Su@UUf3m:#m=mm=Ǵn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m=Ƕm=mm:#f3f3j>)o;m<մn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<մo;j>)f3@@m:#n;n<۴n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<۳n;m:#@@�p=n:mn<յn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<o<o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<մn:mp=�v; o:So=Ǵn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<o<o>q@rBtCtDuEtDtCsBsAq?o=o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o=ǵo:Sv; UUq;+n;m<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<n=q?uEzLVÉ_ǐi̘s͝{Ο}ΜzʗrȓlŎe†[{NvFsBp>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<n;q;+UUx<n<gn<۴n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=p>sC{MÊ`ТݹƲλμǰܸҤǑjVxHr@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<۴n<gx<Ul>-m=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<o>sCT̛xݹλϼῨԩĊaxIp?n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m=l>-Ub; o>Wn<ٳn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<p?yKʗsĮҤ†ZvFp>o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<ٶo>Wb; l;n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n>rCYװ߽ϛw~PrAn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=l;�q;+m<m<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p=uEĎhо׮‡[sCn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m<m<q;+�mIp>Cn;ӳn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=tEők̹ݹǏfwFo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;Ӷp>CmIj@ n;Wn<ݴn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o=tCÍg̺ȔmwGo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<ݵn;Wj@ i<n<gn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o=rAXŲëʓmvGn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<gi<m=m=uo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<r@zMЭȐhuDn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<m=um=oCm=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=tEmƷƷ˽ݹÇ[r@o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<m=oCj@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=q@{Qٽ›~{YtLsKrKrMwSuսի|No=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p>uFq۽atHpCpBpAnAk?g=g>pIeβκ͚vvFo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=qAyNշڸTrBq?p?p?q?p?q@pAn@h=e<oI{ĊasBo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p>sD\ů\p?n<n<n<n<n<o<o<o>p?pAm@e;h@fĵׯRp>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<q?tHě}͛wtDo=n<n<n<n<n<n<n<n<n=p>q@nAh<d=zWҹѿϞzwGo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o=rBvMӵŰUp>n<n<n<n<n<n<n<n<n<n<n<o=p@o@h<c9wRϴ࿨È]p@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p>sCwOŷڳxIo=n<n<n<n<n<n<n<n<n<n<n<n<o<p>q@j>e:uPβңwHo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p?rCxQըvFo<n<n<n<n<n<n<n<n<n<n<n<n<n<n=p>pAj?e:xRӻ†[p?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<q?rDyUԧvEo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p>pAj>f:eП}vFn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<q@qDzV֯xHo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o>p@h=kDǦ߽Xq?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<q@nCxR߾So=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o=p?nAe=xU˿ΝzvFn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<p@oBvQʖpuEn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=qAi>g>{ݹTp>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<p@nBtNݺ†\rBo<o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<p>pBf;rMԻϾʕmrBo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<q@nBqKܶŌczKtCsBsAsBsAr@q@p>o<o<n<n<n<n<n<n<n=o@m@e>i׮yIo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<p?pBnFǦɴرΜy˖qʖp̗q˖nƏfĉ_UyKtCp>n=n<n<n<n<n<o>qAh<rKվĭZp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p>rCk@nнʷ«ٰ˖pTtDo>n<n<n<n<o=q@mAh>v͙tsDo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o>rAk@zVоݸ̗qyKp>n<n<n<n<p?qBg<tPٰ̿{Kn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o=pAmBpJзdzϜxyIo=n<n<n<o<qAl?jBßǰÉ^p@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<p?pDkBkŮǏhsBo<n<n<n<p?oAg<{ZФ{Nq?n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o>qCkAtNٲ}Oo=n<n<n<o<qAj>lG̱μҤXuFq?o<o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n=qAoEkCw˸ʒkrAn<n<n<o<p@oAh?rݼΜy†\yKuDr@o>n<o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<p?sDlAtOεԧvFo<n<n<n<o>qAi>xSŰڲϞ{ƌc~QxHsCp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o<qApEkB`۶yKn<n<n<n<o=p@j@pJԽ˷޽լ˖qWvFq@o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<o>rDnDnF|ݺzKn=n<n<n<o<p@nBjB߾ѡ‡]xHp?n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<n<o=o>p?p?p?p?p?p>o>o>o=o=n<n=p@rElBrMĤٱxGo<n<n<n<n<p>pBi>_íѤ†ZvFp>n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n<n<p?rBuFwIxJxIwIwHvGuFuEtCrAp?p>p?sBqFlBtQǧҥuEo<n<n<n<n<o=qAj>sN̾ཥΝxTsDo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<n=q@vGzM|N|O|O|N{N{MzLyKyJxJwHwHvFtDtCuGsHkCvSƧɔosAo<n<n<n<n<o<p@n@mFͱܶɒkzKp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<p?wH|O~R~Q}Q}P|O|O|N{N{MzLzLyKyKxJwIxHwHxLrGjBrKzݽ~Rp>n<n<n<n<n<n<p?pBmBɴңUrBo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<n<sB|OSS~R~Q~Q}Q}P|O|N|N{N{MzLyKyKyKxJyIyJyLsHj?iA`ҸпƑjsBn=n<n<n<n<n<n<o>qAi@jڲƌcvFo>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<o>uE~RTTTS~R~Q}Q}Q}P|O|N|N{N{MzLyKyKyKyJxJyKuIkAf=rM{̿ʝ|vGo=n<n<n<n<n<n<n<o<q@k@{Xּ̮̘qyKp>o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<o>uFSVUTTTS~R~Q}Q}Q}P|O|N{N{N{MzLyKyKyKxKyKwKpEg>g@xTǧ̼ĔryKq?n<n<n<n<n<n<n<n<o<q@k@rOƟzSnDjAmEzVťDzΝzzLp>o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<o>vGTWVVUTTSS~R~Q}Q}P}P|O|N{N{M{MzLyKyKxKyKzKuIlAd:rNѷܾavGq?n=n<n<n<n<n<n<n<n<o<p@nApIվΠ~zMrAp@oAi>d:jEnͺС~}Op>o<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<o>vGUXXWVUUTTS~R~R~Q}Q}P|O|O|N{N{M{MzLyKyKxKzKwKnChB״WtDp=o<n<n<n<n<n<n<n<n<n<n<p>pBlEʪ֮|Np>o<o=p>p@n@f;e>hоӥ}Po>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<o>vHVYXXXWVUTTTS~R~R~Q}Q}P|O|O|N{N{MzLzLyKyKzLvInGƣԭTuErAo>o=n<n<n<n<n<n<n<n<n<n<p>qBlCҤvFo<n<n<o<o=p@oAh<g>e̾ϾѢ{Lo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<o>wHWZZYXXXWVUTTTS~R~Q~Q}Q}P|O|N|N{N{MzLyKzLxKvO־ֱTwHtDtCrBq@p>o=n<n<n<n<n<n<n<n<o=qAjAkѣuEo<n<n<n<n<n=p?o@h<f=d̹ΝxyJo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>wHX[[ZZYXXWWVUTTTS~R~Q}Q}Q}P|O|N{N{N{M{NzN_ڶWxIvGuEuEtDsCrBrAp?o=n=n<n<n<n<n<o=qAk@~[ӦuFo<n<n<n<n<n<n=q@pAi<g>jȲʕovFo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>wIY\\[[ZYYXXWVVUTTSS~R~Q}Q}Q}P|O|N{N}O}Q˧į‰`yKwGwGvGuFuEtDtDtCsBrAp?o>n=n<n<n<o<q@mAvQԨvGo<n<n<n<n<n<n<o<q@nAh<h@wῧČbsBo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>xIZ^]\[[[ZYXXXWVVUTTSS~R~Q}Q}P}P|P~Rcʘt|OxJxIwHwGwGvGuFuEtDtDtCsBrAp?p>o=n<o<q@nBtM˽֫wGo<n<n<n<n<n<n<n<n=p@oAf;kE ٲSp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>xIZ^^^]\[[[ZYXXXWVUUTTS~R~R~Q~Q~QUЮӪUzLyKxJxJxIwHwGvGvGuFuEtDtDtDsBrAq@p>p=q@pCqJԺ׮vGo<n<n<n<n<n<n<n<n<o=p@m@e;uQȺР~xIn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>yJ\‰`ˆ_^^^]\[[[ZYXXXWVUTTTS~RST_ɳÌc|OzLzLyKyKxJxIxIwHwGvGuFuFuEtDtDsCsCrAq@rBrDpJɬٱxHo<n<n<n<n<n<n<n<n<n<o>qAj>g@İǏfsBo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>yJ\‰a‰`‰`ˆ_^^]]\[[ZZYXXXWVUTTTT~SĜ~ҦT|O{N{MzLyKyKyKxJxIwHwHwGvGuFuFuEtDtDsCsCtDsFpEžڴxIo<n<n<n<n<n<n<n<n<n<n<o?pAe;vQȻٲ~Pp>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>yK]ÊbŠa‰a‰`ˆ_ˆ_^^]]\[[ZZYXXWWVUUU}U׽Dzče~Q|O|N{N{N{MzLyKyKyKxJxIwHwHwGvGuFuEuEtDtDsDtEnCp۷xJo<n<n<n<n<n<n<n<n<n<n<n=q@k@i@~Ͻ̗quDo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>yL_ËcÊbÊbŠa‰a‰`ˆ_ˆ_^^]\\[[ZYYXXWVVT]ժY}R}Q}P|O|N{N{N{MzLyKyKyKxJxIwHwGwGvGuFuEtDtDvFlB_޼zJo<n<n<n<n<n<n<n<n<n<n<n<o?pAf<vRʾ۷Rp>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>zLˆ`ČeÌdËcÊbŠaŠa‰a‰`ˆ_^^^]\[[[ZYXXXX}RpɖpU~R~Q}Q}P}P|O|N{N{M{MzLyKyKxJxJxIwHwGvGvGuFuEwGmBwS߾zLo<n<n<n<n<n<n<n<n<n<n<n<o=q@k@kCŢѿ˘suDo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p>zL‰`čeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^]\[[[ZYXXzRǢ¬ËbTS~R~R~Q}Q}P|O|O|N{N{MzLzLyKyKxJxJxIwHwGvGvGwIpCrKŶ|Nn<n<n<n<n<n<n<n<n<n<n<n<n<p?oBi>iڶ~Qo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?zMŠačfčfčeČeÌdËcËcÊbŠa‰a‰a‰`ˆ_^^^]\[[[ZYyRӷׯ‡\TTTS~R~Q~Q}Q}P|O|O|N{N{MzLzLyKyKxJxIxIwHxGxIsFnF˭íRo=n<n<n<n<n<n<n<n<n<n<n<n<n<pAi>wR͹ǐhrAn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?zMËbŎhĎgčfčfčeČeÌdËcËcÊbŠa‰a‰`‰`ˆ_^^]]\[\XzTȺП~ZVUTTTS~R~Q~Q}Q}P|O|N|N{N{MzLyKyKyKxJxIwHyJuIlBzƲXp?n<n<n<n<n<n<n<n<n<n<n<n<o=q@m@oHֿԨxGn=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?{MÌcŏhŏhŎhĎgčfčečeČeÌdËcÊbÊbŠa‰a‰`ˆ_ˆ_^^]\\TyU͛wZWWVUTTTS~R~Q}Q}Q}P|O|N{N{N{MzLyKyKyKxJyJwJk@^̹Ê`q@n<n<n<n<n<n<n<n<n<n<n<n<o<p@oBlDŤྦྷVp>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?{NČeƐjŐiŏhŎhŎhĎgčfčeČeČeÌdËcÊbŠaŠa‰a‰`ˆ_ˆ_^ˆ^]|RzS˘rZXXWVVUTTSS~R~Q}Q}P}P|O|N{N{N{MzLyKyKxKyKlBtOǑitCo=n<n<n<n<n<n<n<n<n<n<n<n<p>qCjAlϽȓlsBn<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?{NčeƑkƐjƐjŐiŏhŎhĎgĎgčfčeČeČeÌdËcÊbŠaŠa‰a‰`ˆ_‰^^zQyTоʖq[YXXXWVUUTTSS~R~Q}Q}P}P|O|N{N{M{MzLzKzMpEoIԽ̙uwFr?o>o=n<n<n<n<n<n<n<n<n<n<n=qAj?{VӨvFo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?|NōfǒlƑkƑkƐjƐjŐiŏhŎhĎgĎgčfčeČeÌdÌdËcÊbŠa‰a‰aÉ`ˆ^yPyUλɖn\[ZYXXXWVUUTTS~R~R~Q}Q}P|O|O|N{N{MzLzMsHmFŢҢ~xIsAqAq?o>n=n<n<n<n<n<n<n<n<o=q@m@wRܸ{Lo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?|OŎhǒmǒlǒlƑkƑkƐjŐiŐiŏhŎhĎgčfčfčeČeÌdËcËcÊbŠaÊa`yPxR͹ɔo][[[ZYXXXWVUTTTS~R~Q~Q}Q}P|O|N|N{N{NyLkAnժzLtCsBrAq@p?o>n=n<n<n<n<n<n<o<p@nAwQĮWp?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?}OŏhǔnǓnǒmǒlƑkƑkƑkƐjŐiŏhŏhŎhĎgčfčečeČeÌdËcËcËb`yPxRʷɔo^]\[[ZZYXXWWVUTTTS~R~Q~Q}Q}P|O|N|O{NlBzUڲ}OtDsCsBsBrAq@p?o=n<n<n<n<n<o<q?nBvRμǏfr@n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?}PŐiȔoǔnǓnǓnǒmǒlƑkƑkƑkƐjŐiŏhŏhŎhĎgčfčečeČeÌdČcŠa{RtP˽λ˗s‰`^]\\[[ZYYXXWWVUTTTS~R~Q}Q}Q}P}P|PpFqLɻ߼SuFtDtDsCsBsBrAq@p>o=n<n<n<o<q@oCvQ͚usBo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?}PŐjȕpȕpȔoǔnǓnǓnǒmǒlƑkƑkƑkƐjŐiŏhŎhŎhĎgčfčeČečeËc|TrNվΞ{Ċa^^^]\\[[ZYYXXWVVUTTSS~R~Q}Q~P~QuImGˬìYvFuEtDtDtDsCsBrArAq?o>o=n<o<q@oBvPР~uEo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?~QƑkɖrȕqȕpȕpȔoǔnǓnǒmǒmǒlƑkƑkƐjƐjŐiŏhŎhĎgĎgčfčeČdWqL̮ӧċdÊ`ˆ_^^^]\[[[ZYXXXWVUUTTS~R~R~Q~RyNjAkdzĉ`wIvGuFuEtDtDtDsCsBrArAq?o>o=p@pDySϠ}uDo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?~QƒlɖrɖrɖrȕqȕpȔoȔoǔnǓnǒmǒlǒlƑkƑkƐjŐiŐiŏhŎhĎgĎgÌfZoFڱŎfŠa‰a‰`ˆ_^^^]\[[[ZYXXXWVUUTTS~R~S|PkAtQͺǏiyKwGvGvGuFuEtDtDtDsCsBrAq@q?rAqFeΟ|tDo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<p?~RǓnɘtɗsɖrɖrɖrȕqȕpȔoǔnǔnǓnǒmǒlǒlƑkƑkƐjŐiŐiŏhŎhĎf_oFd߽ǒlÊbŠa‰a‰`‰`ˆ_^^]]\[[[ZYXXXWVUTTTT~SqFmDʬʖq|MxIwHwGvGuFuFuEtDtDsCsCsBsAsDtI͝xtCo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q?RǓnʘuɘtɘtɗsɖrɖrɖrȕqȕpȔoǔnǔnǓnǒmǒlƑkƑkƑkƐjŐiŏhŏhcqHvRDzʖqŌdÊbÊbŠa‰a‰`‰`ˆ_^^]]\[[ZZYXXWWVUTTTwKi@kП{~PyJxIwHwHwGvGuFuEuEtDtDsCsCuFvMд̛vtDo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q?RȔoʙvʙuʘuɘtɘtɗsɖrɖrȕqȕqȕpȔoǔnǓnǓnǒmǒlƑkƑkƑkƐjƐičfwOpJԹϠ|ŎgÌdËcÊbÊbŠa‰a‰`ˆ_ˆ_^^]\\[[ZYYXXWVVUU}PlBtQժSzKyKxJxIwHwGwGvGuFuEuEtDtDvGyS̙̾usBo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@SȔp˚wʙvʙvʙuʘuɘtɗsɗsɖrɖrȕqȕpȕpȔoǔnǓnǒmǒmǒlƑkƑkƑkŏhWnF{ٰǒkČeČeÌdËcÊbŠaŠa‰a‰`ˆ_^^^]\[[[ZYYXXWVVUrGlEɫܸXzMyKyKyKxJxIwHwGwGvGuFuEvFwJ]ɔmsAo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@Sȕp˛x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕqȕpȕpȔoǔnǓnǒmǒmǒlƑkŐj^mDzWĮ˙tĎfčeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^]\[[[ZYXXXWVzNjAkĭĉ_|N{MzLyKyKxJxJxIwHwGvGwGwIwL—zλËbq?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@Tɖr̛y˛x˚x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕqȕpȔoȔoǔnǓnǒmǒlǒkčgtLoIϳԨŐjŎfčfčeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^]\[[[ZYXXXTlBtQ̸ȑj~Q{N{MzLzLyKyKxJxIxIwHwHxJzR׻¬Qo>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@Tɗs̝{̜z̛y˛x˚x˚x˚wʙvʙuʘuʘuɘtɗsɖrɖrɖrȕqȕpȔoǔnǔnǓnǒmƐkXkCo޽ʗqŏhĎgčfčfčeČeÌdËcËcÊbŠa‰a‰`‰`ˆ_^^]]\[[[ZYYWsJlEɪ͜wS|N|N{N{MzLyKyKyKxJxIxJzMeذxHo=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@Tʘt̝{̝{̜z̜z̛y˛x˚x˚w˚wʙvʙuʘuɘtɘtɗsɖrɖrȕqȕqȕpȔoǔnǔnǓlcoFsNֿѣƑjŐhŎhĎgčfčečeČeÌdËcÊbÊbŠa‰a‰`‰`ˆ_^^]]\[[ZZY{RjAfԨX}P|O|N|N{N{MzLyKyKzJ{L{Q̩̜wtCo<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@Uʘu͞|͞|̝{̝{̜z̛y̛y˛x˚x˚wʙvʙvʙuʘuɘtɘtɗsɖrɖrȕqȕqȕpȔoȔoĐjzRh@rݺʗsƐjŏhŎhŎhĎgčfčečeČeÌdËcÊbÊbŠa‰a‰`ˆ_ˆ_^^]\\[[ZWoDoJи۶[~R}Q}P|O|N{N{N{MzLzL{M`ϼÉ`q?n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@Uʙv͟~͞}͞|̝{̝{̝{̜z̛y̛y˛x˚x˚wʙvʙvʙuʘuɘtɗsɗsɖrɖrȕqȕpȕpǓnanDrMսլȕoƑjŐiŏhŎhŎhĎgčfčeČeČeÌdËcÊbŠaŠa‰a‰`ˆ_^^^]\[\ZwLi?iŌcS~Q}Q}P}P|O|N{N{M|O~Rϫ޾~Pn>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@V˚wΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˛x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕqȖpől{RhAl˶ҤǒmƐjƐjŐiŏhŎhĎgĎgčfčeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^]\[UlBoJѹλʖpV~R~R~Q}Q}P|O|O|N~QhҥwJp>o=n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@V˛xΡΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕpdnFlHɩΝyȒlƑjƐjŐiŐiŏhŎhĎgčfčfčeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^]ZwLh?iӧZTS~R~R~Q}Q}P~QY׺ʵÊbvFrBq@o>n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@W˛yΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚x˚x˚wʙvʙuʘuʘuɘtɗsɖrɗrƒnWh?xUóݸ˘uƒkǒkƑkƐjŐiŐiŏhŎhĎgčfčfčeČeÌdËcËcÊbŠa‰a‰`‰`ˆ_^^\VlBoJѹݹÊaUTTS~R~QRVˤӨ|MuDtDsCrAp>n=n<n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@W̜yϢϢΡΡΠΟΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y˛x˚x˚w˚wʙvʙuʘuɘtɘtɗsȖrŽivLh=iذʗsƒlǒkƑkƑkƐjŐiŏhŏhŎhĎgčfčečeČeÌdËcÊbÊbŠa‰a‰`ˆ_ˆ_‡^\vMh?k˷ʔnXUTTTSVƖsDz‰_xHuEuEtDtCrBp?o=n<n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@X̜{ϣϢϢΡΡΡΠΟΟ͟~͞}͞|͞|̝{̝{̜z̛y̛y˛x˚x˚wʙvʙvʙuʘuɘtʘtȕqboFiAxׯʗsǒmǒlƑkƑkƑkƐjŐiŏhŎhŎhĎgčfčeČeČeÌdËcÊbÊbŠa‰a‰`ˆ_‡^WlBoJԻӥ\VVUUWj˺Ӥ}OxGvGuFuEtDtDsBq@o>n<n<n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@X͝|УУϣϢϢΡΡΡΠΟ͟~͟~͞}͞|̝{̝{̝{̜z̛y̛y˛x˚x˚wʙvʙvʙuʘuɘtǕpZkBlCuذ˙tȓnǓlǒlƑkƑkƐjƐjŐiŏhŎhŎhĎgčfčeČeČeÌdËcÊbŠaŠa‰aˆ`^vNh?l۸ĊbWWVXđjŲ޿]yJwHwGvGvGuFuEtDtCrAp>n=n<n<n<n<n<n<n<n<n<n<j@j@n<n<n<q@X͞|ХФУϣϣϢϢΡΡΡΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˛x˚x˚wʙvʙuʙuʘtǒnZkAjBsٱ˙uȔnȒmǒmǒlƑkƑkƐjƐjŐiŏhŎhĎgĎgčfčeČeÌdÌdËcÊbŠa‰aˆ`YlCpKҺɵʔo[Y[ǔoŲȖr}OxKxJxIwHwGvGvGuFuEtDsBp?n=n<n<n<n<n<n<n<n<n<j@j@n<n<n<qAY͟}ѥХХФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚x˚x˚wʙvʙuʘtǓo[lCj@oڴ͝yȕoǓnǓmǒlǒlƑkƑkƐjŐiŐiŏhŎhĎgčfčfčeČeÌdËcËcÊbÉb_vOh@dԧČcčfТ̺ФT{MyKyKxJxIxIwHwGvGuFuFuEsCp?o=n<n<n<n<n<n<n<n<j@j@n<n<n<qAY͟~ѦѦѥХФФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y˛x˚x˚x˚wʙvʙuǔo\mEh@lëҧ˗tǔnǓmǒmǒlƑkƑkƑkƐjŐiŏhŏhŎhĎgčfčfčeČeÌdËcËcÊb[mDmFǧɵի۸ѨW|O|MzLyKyKyKxJxIwHwHwGvGuFuEsCq@o>n<n<n<n<n<n<n<j@j@n<n<n<qAYΠѧѦѦѦѥХФФУϣϢϢϢΡΡΠΟΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y˛x˚x˚w˚wʘvƕo^nEfAjܷϠ~ɖqȓnƓmǓmǒlƑkƑkƑkƐjŐiŏhŏhŎhĎgčfčečeČeÌdċd‰a{RlCv֯X}P}N{N{N{MzLyKyKyKxJxIwHwHwGvGuFtDrAo=n<n<n<n<n<n<j@j@n<n<n<qAZΡҨҧѧѦѦѦѥХФУУϣϢϢΡΡΡΠΟΟ͟~͞}͞|͞|̝{̝{̜z̛y̛y˛x˚x˚wʙvǔp_oFg?fɼȴٰΟ}˗sȔpȓnȒmǒlƑkƑkƑkƐjŐiŏhŎhŎhĎgčfčeČeČeÌd_}XͰش\~Q}O}P|O|N{N{N{MzLyKyKyKxJxIwHwGwGvFtEqAo=n<n<n<n<n<j@j@n<n<n<rAZϢҩҨҧҧѧѦѦѥѥХФУУϣϢϢΡΡΡΠΟ͟~͟~͞}͞|̝{̝{̝{̜z̛y˛x˛x˚xʚvȖraoGf=~\Ӹ˸ݸӦ˚wɕqȓmǓmǒlǒkƑkƐjƐjŐiŏhŎhĎgĎgčfčečeďiҰ׳]T~R~Q}Q}P}P|O|N{N{M{MzLyKyKxJxJxIwHwGvGuEq@n=n<n<n<n<j@j@n<n<n<rAZϢөөҩҨҧҧѧѦѦѥѥХФУϣϣϢϢΡΡΡΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˛xʚwȗrcrJg=rMÞíٱѣ͛yʗsȓnǓlƑlƑkŐiƐjŐiŏhƎhŎgƑiȔoөҬ_UTS~R~R~Q}Q}P|O|O|N{N{MzLzLyKyKxJxJxIwHwGtDp?n<n<n<n<j@j@n<n<n<rA[ϣӪӪөөҩҨҧѧѧѦѦѥХХФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚xɘuizQi?kDhŴȳݺ֫Т͜y˙uʗsɖpɗrʗr˘tΝyԩ߾Ϳɝ{[WUTTTS~R~Q~Q}Q}P|O|O|N{N{MzLzLyKyKxJxIxIvGrAo=n<n<n<j@j@n<n<n<rA\УӫӫӪӪөҩҩҨҧѧѦѦѦѥХФФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y̛x˙vœo[nFi>vQκɵȲůDZȴ̹׹hZXWWVUTTTS~R~Q~Q}Q}P|O|N|N{N{MzLyKyKyKxJwHrAo=n<n<n<j@j@n<n<n<rA\ХԬԫӫӪӪӪөҩҨҨҧѧѦѦѦѥХФФУϣϢϢϢΡΡΠΟΟ͟~͞}͞|͞|̝{̝{̜z̜z̜y̚wɗsexPkBkC}Zʫɡ_[[YXXWWVUTTTS~R~Q}Q}Q}P|O|N{N{N{MzLyKyKxIrAo=n<n<n<j@j@n<n<n<rA]ѥԭԬԬԫӫӪӪӪөҩҨҨҧѧѦѦѦѥХФУУϣϢϢΡΡΡΠΟ͟~͟~͞}͞|͞|̝{̝{̜z̛y̛yʙuœo_tKiAlF`ɫŲēp]]\[ZYYXXWVVUTTSS~R~Q}Q}P}P|O|N{N{N{MzLxIrBo=n<n<n<j@j@n<n<n<rA\ѦծխԭԬԬԫӫӪӪӪөҩҨҧҧѧѦѦѥѥХФУϣϣϢϢΡΡΡΠΟ͟~͟~͞}͞|̝{̝{̝{̜z˛y˛xɘuÑm\rKlDmGuPk˭ܽĎi_^]\[[[ZYXXXWVUUTTSS~R~Q}Q}P}P|O|N{N{MyKsBo=n<n<n<j@j@n<n<n<q@ZѦծծծխԭԬԫԫӫӪӪөөҩҨҧѧѧѦѦѥѥХФУϣϣϢϢΡΡΡΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̜yʛxɘtőlazSqHlDoGvQiţïƓmÊ`ˆ`^^^]\[[[ZYXXXWVUUTTS~R~R~Q}Q}P|O|O|NzLsBo=n<n<n<j@oCm=n<n<p?Uѥ֯֯ծծխխԭԬԫӫӫӪӪөөҩҨҧѧѧѦѦѥХХФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛x˚wɘvȖrđl`zSqImFoHqLyTmĤջɽн͞|Ìc‰a‰`‰`ˆ_^^^]\[[[ZYXXXWVUTTTS~R~Q~Q}Q}P|OzLsBo=n<n<m=oCm=m=uo<n<o=|OФְ֯֯֯ծծխխԭԬԫӫӫӪӪөҩҩҨҧѧѦѦѦѥХФФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y˛w˚xʘuȕrĒme[yQqIpGrJtMtOvR|Yiwzwuropt}ÝƤѷܺǑlËcÊbŠa‰a‰`‰`ˆ_^^]]\[[ZZYXXWWVUTTTS~R~Q~Q}Q{MrBn=n<o<m=um=i<n<gn<n<n<yK͟~ְֱ֯֯֯֯ծծխԭԭԬԫӫӪӪӪөҩҨҨҧѧѦѦѦѥХФФУϣϢϢϢΡΡΠΟΟ͟~͞}͞|͞|̝{̝{̜z̛y̛y˛x˚wʙwʙuɖsƕpđkd`Z}UwQtLuMvOxPwPxPvOwOuMsLrKrJoGoH{YɹȕnÌdËcÊbÊbŠa‰a‰`ˆ_ˆ_^^]\\[[ZYYXXWWVUTTTS~R~Q{Mq@n<n<n<n<gi<j@ n;Wn<ݴn<n<uFȔnԭױְֱֱ֯֯ծծծխԭԬԬԫӫӪӪӪөҩҨҨҧѧѦѦѦѥХФУУϣϢϢΡΡΡΠΟ͟~͟~͞}͞|͞|̝{̝{̜z̛y̛y˛x˚xʚwʙuʙuʘtɗsȗrǔoǔoœnƒlƒlőlőkŐkőjďiďhg‹eaWrIjBlCuQѿҤŏhÌeÌdËcÊbŠaŠa‰a‰`ˆ_^^^]\\[[ZYYXXWVVUTTSS{Mq@n<n<n<ݵn;Wj@ mIp>Cn;ӳn<n<q@\Ҩײײױְְֱ֯֯ծծծխԭԬԬԫӫӪӪӪөҩҨҧҧѧѦѦѥѥХФУϣϣϢϢΡΡΡΠΟ͟~͟~͞}͞|̝{̝{̝{̜z̛y˛x˛x˚x˚wʙvʙuəuʙtʙtɗsɗrɖrɖqȖqɕpȕoȔoȔnǓnȒlǑlŏjÌe\vMjAhA}Zʫͼܺ˙tĎfČeÌdÌdËcÊbŠaŠa‰a‰`ˆ_^^^]\[[[ZYXXXWVUUTSzKp?n<n<n;Ӷp>CmI�q;+m<m<n<o=zL͞|ְײײײױְְֱ֯֯ծծծխԭԬԫԫӫӪӪөөҩҨҧѧѧѦѦѥХХФУϣϣϢϢΡΡΡΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˛x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕqȕpȔoȔoǔnǓnǓmǒlƑjf[qIi@nGaʡѥǒkĎečeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^]\[[[ZYXXXWVURwGp>n<m<m<q;+�l;n=n<n<n<sCÊbөײسײײײױְֱ֯֯֯ծծխխԭԬԫӫӫӪӪөҩҩҨҧѧѧѦѦѥХХФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚x˚x˚wʙvʙuʘuʘuɘtɗsɖrɖrɖrȕqȕpȔoǔnǔnǓnǒmǒlƐjd~VrJlDuNbƐičgčfčfčeČeÌdËcËcÊbŠa‰a‰`‰`ˆ_^^]]\[[[ZYXXXV~QsBn<n<n<n=l;b; o>Wn<ٳn<n<o=yK˙vկسسسײײױױְֱ֯֯֯ծծխԭԭԬԫӫӫӪӪөҩҩҨҧѧѦѦѦѥХФФУϣϢϢϢΡΡΠΟΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y˛x˚x˚w˚wʙvʙuʘuɘtɘtɗsɖrɖrɖrȕqȕpȔoǔnǔnǓnǒlǑlŏj‹e[}T]ŎgďhŎhĎgčfčečeČeÌdËcÊbÊbŠa‰a‰`‰`ˆ_^^]]\[[ZZYXVzLq?n<n<n<ٶo>Wb; Ul>-m=n<n<n<q@Wϣײشسسسײײױְֱֱ֯֯֯ծծխԭԭԬԫӫӪӪӪөҩҨҨҧѧѦѦѦѥХФУУϣϢϢϢΡΡΠΟΟ͟~͞}͞|͞|̝{̝{̜z̛y̛y˛x˚x˚w˚wʙvʙuʘuɘtɘtɗsɖrɖrȕqȕqȕpȔoǔnǓnǓnǒlǑkƐjŏiƐiǑjŐiŏhŎhŎhĎgčfčečeČeÌdËcÊbÊbŠa‰a‰`ˆ_ˆ_^^]\\[[ZYSuEo=n<n<m=l>-Ux<n<gn<۴n<n<n=sD`ѧ׳صشسسسײײױְֱֱ֯֯ծծծխԭԬԬԫӫӪӪӪөҩҨҧҧѧѦѦѦѥХФУУϣϢϢΡΡΡΠΟ͟~͟~͞}͞|͞|̝{̝{̜z̛y̛y˛x˚x˚wʙvʙvʙuʘuɘtɗsɗsɖrɖrȕqȕpȕpȔoǔnǓnǒmƒmǒlǒkƑkƑkƐjŐiŏhŎhŎhĎgčfčeČeČeÌdËcÊbŠaŠa‰a‰`ˆ_^^^]\[[WzKp?n<n<n<۴n<gx<UUq;+n;m<n<n<o=vGčeҨسصصشسسײײײױְְֱ֯֯ծծծխԭԬԫԫӫӪӪӪөҩҨҧҧѧѦѦѥѥХФУϣϣϢϢΡΡΡΠΟ͟~͟~͞}͞|̝{̝{̝{̜z̛y˛x˛x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕqȕpȕpȔoǔnǓnǒmǒmǒlƑkƑkƐjƐjŐiŏhŎhĎgĎgčfčeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^^^\Y}PsBn=n<m<n;q;+UUv; o:So=Ǵn<n<n<o=vGŠbФױٴصششسسײײײױְֱ֯֯֯ծծծխԭԬԫԫӫӪӪөөҩҨҧѧѧѦѦѥХХФУϣϣϢϢΡΡΡΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚x˚x˚wʙvʙuʙuʘuɘtɗsɖrɖrɖrȕqȕpȔoȔoǔnǓnǒmǒlǒlƑkƑkƐjŐiŐiŏhŎhĎgčfčfčeČeÌdÌdËcÊbŠa‰a‰a‰`ˆ_^Z~QsDo=n<n<o=ǵo:Sv; �p=n:mn<յn<n<n<o=tDY̜zԬ׳ٴصشسسسײײײױְֱ֯֯֯ծծխխԭԬԫӫӫӪӪөҩҩҨҧѧѧѦѦѥХХФУϣϢϢϢΡΡΠΠΟ͟~͞}͞}͞|̝{̝{̝{̜z̛y˛x˚x˚x˚wʙvʙuʘuʘuɘtɗsɖrɖrɖrȕqȕpȔoǔnǔnǓnǒmǒlƑkƑkƑkƐjŐiŐiŏhŎhĎgčfčfčeČeÌdËcËcÊbŠa‰aˆ_Z}PtDo=n<n<n<մn:mp=�@@m:#n;n<۴n<n<n<n=q@zMČeΡԬײشششسسسײײױױְֱ֯֯֯ծծխԭԭԬԫӫӫӪӪөҩҩҨҧѧѦѦѦѥХФФУϣϢϢϢΡΡΠΟΟ͟~͞}͞}͞|̝{̝{̜z̜z̛y˛x˚x˚w˚wʙvʙuʘuɘtɘtɗsɖrɖrȕqȕqȕpȔoǔnǔnǓnǒmǒlƑkƑkƑkƐjŐiŏhŏhŎhĎgčfčečeČeÌdËc‰`]WyKrAo=n<n<n<۳n;m:#@@f3j>)o;m<մn<n<n<n<o=sD|OËc˛xѧԬխկծծծծխխԬԬԬԫԫԫԫӪӪөҩҩҨҧѧѦѦѦѦХХХФϤϣϣϣϢϢϡΡΠΠΠ͟͟~͟}͞}͞|͝|͝|̝{̜z̜y̜y˛x˛x˚x˙w˙wʙvʙvʘuɘtɗtɗsɗsȖrȖrȖqȕpȕpȔoȔoǔnǓnǓmǒmǒlƑlƑkƐjƐjŐjŏiŏhŎgŎgčfÌdÊb‰aˆ_]VzLtDp?n<n<n<m<մo;j>)f3f3m:#m=mm=Ǵn<n<n<n<n<o>sCxIR]čfǓmɕqɕqɕqɕqȕqȕpȕqȕpȕpȕpȕpȕpȕpȔoȔoȔoȔoȔoǓoǓoǔoǓnǓnǓnǓnǓmǓmǓmǒmǒmǒmǒmǒlǑlƑlƑlƑlƑkƐkƑkƐkƐkŐjŐjŐiŐiŏiŏiŏhŏhŏhďhĎgďhĎgĎgĎfĎfčfčfčeÍeÍeÌeÌdÌdÌcÌdËcËc‹bŠb‹bŠbŠa‰a‰`‰``__^^^[V~R{NyJuFsBp?o=n<n<n<m=Ƕm=mm:#f3UUu@p;Sn;n<ٴn<n;n<n<n<n<o>rAsCuEuFvFvFvFvFvFvFvFvFvFvFvFvFvFvFvFvFvFuFuFvFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuFuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEuEtEtDtDtDtDtDtDtDtDtDtDtDtDtDtDtDtDtDtCtCsCsCrAq@p?p>o=n<n<n;n<n<ٴn;p;Su@UU�j@ m=+n=eo<n<״n<n<n;n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;n<n<n<״o<n=em=+j@ �UUi<n:-n>Wn<n;o<Ӵo=۴n<n<n<n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n<n<n<o=۴o<Ӵn;n<n>Wn:-i<UUUUj@ p=m=+p<Ao=Sn=eo<sn;}n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n<n;}o<sn=eo=Sp<Am=+p=j@ UU�+tF p@s@o7j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@j@o7s@p@tF +���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/win32/pragha.rc������������������������������������������������������������������������0000664�0000000�0000000�00000000071�13435240150�0015506�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "pragha.ico" �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/win32/win32dep.c�����������������������������������������������������������������������0000664�0000000�0000000�00000005227�13435240150�0015525�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * easytag * * File: win32dep.c * Date: June, 2002 * Description: Windows dependant code for Easytag * this code if largely taken from win32 Gaim and Purple * * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ /* Needed for G_OS_WIN32. */ #include <glib.h> #ifdef G_OS_WIN32 #include <gdk/gdkwin32.h> #include "win32dep.h" /* * DEFINES & MACROS */ #define _(x) gettext(x) /* * LOCALS */ static char *install_dir = NULL, *locale_dir = NULL; /* * PUBLIC CODE */ /* Determine Easytag Paths during Runtime */ const gchar * weasytag_install_dir (void) { static gboolean initialized = FALSE; if (!initialized) { gchar *tmp; tmp = g_win32_get_package_installation_directory_of_module (NULL); if (tmp == NULL) { tmp = g_win32_error_message (GetLastError ()); g_debug ("GetModuleFileName error: %s", tmp); g_free (tmp); return NULL; } else { install_dir = tmp; initialized = TRUE; } } return install_dir; } const gchar * weasytag_locale_dir (void) { static gboolean initialized = FALSE; if (!initialized) { const gchar *inst_dir = weasytag_install_dir (); if (inst_dir != NULL) { locale_dir = g_build_filename (inst_dir, "share", "locale", NULL); initialized = TRUE; } else { return NULL; } } return locale_dir; } const gchar * weasytag_pixbuf_dir (void) { static gboolean initialized = FALSE; if (!initialized) { const gchar *inst_dir = weasytag_install_dir (); if (inst_dir != NULL) { locale_dir = g_build_filename (inst_dir, "share", "pixmaps", "pragha", NULL); initialized = TRUE; } else { return NULL; } } return locale_dir; } #endif /* G_OS_WIN32 */ �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pragha-1.3.4/win32/win32dep.h�����������������������������������������������������������������������0000664�0000000�0000000�00000002600�13435240150�0015522�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������/* * easytag * * File: win32dep.h * * Copyright (C) 2002-2003, Herman Bloggs <hermanator12002@yahoo.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program 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 General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #ifndef _WIN32DEP_H_ #define _WIN32DEP_H_ #include <glib.h> /* Needed for G_OS_WIN32. */ #ifdef G_OS_WIN32 G_BEGIN_DECLS /* * Windows helper functions */ /* Determine Pragha paths */ const gchar * weasytag_install_dir (void); const gchar * weasytag_locale_dir (void); const gchar * weasytag_pixbuf_dir (void); #undef DATADIR #undef PACKAGE_LOCALE_DIR #undef PIXMAPDIR #define DATADIR weasytag_install_dir() #define PACKAGE_LOCALE_DIR weasytag_locale_dir() #define PIXMAPDIR weasytag_pixbuf_dir() G_END_DECLS #endif /* G_OS_WIN32 */ #endif /* _WIN32DEP_H_ */ ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������