diff options
author | Stefano Karapetsas <[email protected]> | 2012-07-04 18:01:12 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-07-04 18:01:12 +0200 |
commit | e48fc61bf4cf43a90b7ddf16e3cbb3b247333c89 (patch) | |
tree | 15722913e64320b18a09b2452d0a382ebeb953e9 | |
download | mate-netbook-e48fc61bf4cf43a90b7ddf16e3cbb3b247333c89.tar.bz2 mate-netbook-e48fc61bf4cf43a90b7ddf16e3cbb3b247333c89.tar.xz |
Initial release
80 files changed, 8095 insertions, 0 deletions
@@ -0,0 +1,9 @@ +MATE Netbook: +Stefano Karapetsas <[email protected]> + +Maximus: +Neil Jagdish Patel <[email protected]> + +Window Picker Applet: +Neil Jagdish Patel <[email protected]> +Jason Smith <[email protected]> @@ -0,0 +1,676 @@ + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + 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. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + 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/>. + +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: + + <program> Copyright (C) <year> <name of author> + 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 +<http://www.gnu.org/licenses/>. + + 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 +<http://www.gnu.org/philosophy/why-not-lgpl.html>. + diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ChangeLog @@ -0,0 +1 @@ + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0e846ca --- /dev/null +++ b/Makefile.am @@ -0,0 +1,20 @@ +SUBDIRS = po maximus mate-window-picker-applet + +EXTRA_DIST = intltool-merge.in intltool-extract.in intltool-update.in +DISTCLEANFILES = intltool-merge intltool-update intltool-extract + +MAINTAINERCLEANFILES = aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing + +dist-hook: + @if test -d "$(srcdir)/.bzr"; \ + then \ + echo Creating ChangeLog && \ + ( cd "$(top_srcdir)" && \ + echo '# Generated by Makefile. Do not edit.'; echo; \ + $(top_srcdir)/missing --run bzr log --gnu-changelog ) > ChangeLog.tmp \ + && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ + || (rm -f ChangeLog.tmp; \ + echo Failed to generate ChangeLog >&2 ); \ + else \ + echo Failed to generate ChangeLog >&2; \ + fi @@ -0,0 +1,6 @@ +A simple window management tool which: + * Allows you to set basic rules for a window type, such as maximise|undecorate + * Allows exceptions to the rules, based on string matching for window name + and window class. + * Allows 'reversing' of rules when the user manually changes something: + * Re-decorates windows on un-maximise. @@ -0,0 +1 @@ + diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..3265484 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +PKG_NAME="mate-netbook" + +(test -f $srcdir/configure.ac) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level $PKG_NAME directory" + exit 1 +} + +which mate-autogen || { + echo "You need to install mate-common from the MATE Git" + exit 1 +} + +REQUIRED_AUTOMAKE_VERSION=1.9 +USE_MATE2_MACROS=1 +USE_COMMON_DOC_BUILD=yes + +. mate-autogen diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..b06c7c6 --- /dev/null +++ b/configure.ac @@ -0,0 +1,65 @@ +AC_PREREQ(2.53) +AC_INIT(mate-netbook, 1.3.0, []) +AM_INIT_AUTOMAKE() +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +AC_CONFIG_SRCDIR(maximus/main.c) +AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE + +AC_ISC_POSIX +AC_PROG_CC +AC_STDC_HEADERS +AC_PROG_LIBTOOL + +dnl ========================================================================== +dnl i18n +dnl ========================================================================== + +GETTEXT_PACKAGE=mate-netbook +AC_SUBST(GETTEXT_PACKAGE) +AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name]) +ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`" + +IT_PROG_INTLTOOL([0.34]) + +AM_GLIB_GNU_GETTEXT + +#if test "x$GCC" = "xyes"; then +# GCC_FLAGS="-g -Wall -Werror" +#fi + +AC_SUBST(GCC_FLAGS) + + +PKG_CHECK_MODULES(MAXIMUS_DEPS, + gtk+-2.0 + mateconf-2.0 + libmatewnck + libmateui-2.0 + xtst + libfakekey + unique-1.0 + ) +AC_SUBST(MAXIMUS_DEPS_CFLAGS) +AC_SUBST(MAXIMUS_DEPS_LIBS) + +PKG_CHECK_MODULES(MATEWINDOWPICKER_DEPS, + libmatepanelapplet-3.0 + gtk+-2.0 + glib-2.0 + mateconf-2.0 + libmatewnck + ) +AC_SUBST(MATEWINDOWPICKER_DEPS_CFLAGS) +AC_SUBST(MATEWINDOWPICKER_DEPS_LIBS) + +AC_PATH_PROG(MATECONFTOOL, mateconftool-2) +AM_MATECONF_SOURCE_2 + +AC_OUTPUT([ +Makefile +maximus/Makefile +mate-window-picker-applet/Makefile +po/Makefile.in +]) diff --git a/mate-window-picker-applet/Makefile.am b/mate-window-picker-applet/Makefile.am new file mode 100644 index 0000000..20b39bd --- /dev/null +++ b/mate-window-picker-applet/Makefile.am @@ -0,0 +1,65 @@ +libexec_PROGRAMS=mate-window-picker-applet + +PKGDATADIR = $(datadir)/mate-window-picker-applet +AM_CFLAGS=\ + $(MATEWINDOWPICKER_DEPS_CFLAGS) \ + $(GCC_FLAGS) \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + -D_GNU_SOURCE \ + -DMATELOCALEDIR=\""$(datadir)/locale"\" \ + -DPKGDATADIR=\"$(PKGDATADIR)\" \ + -DMATEWINDOWPICKER_MENU_UI_DIR=\""$(xmluidir)"\" + +mate_window_picker_applet_LDADD = \ + $(MATEWINDOWPICKER_DEPS_LIBS) + +mate_window_picker_applet_SOURCES = \ + applet.c \ + task-item.c \ + task-item.h \ + task-list.c \ + task-list.h \ + task-title.c \ + task-title.h + +appletdir = $(datadir)/mate-panel/applets +applet_in_files = org.mate.panel.MateWindowPicker.mate-panel-applet.in +applet_DATA = $(applet_in_files:.mate-panel-applet.in=.mate-panel-applet) + +$(applet_in_files): $(applet_in_files).in Makefile + $(AM_V_GEN)sed \ + -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \ + $< > $@ + +org.mate.panel.MateWindowPicker.mate-panel-applet: org.mate.panel.MateWindowPicker.mate-panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache + +APPLET_LOCATION=$(libexecdir)/mate-window-picker-applet + +servicedir = $(datadir)/dbus-1/services +service_in_files = org.mate.panel.applet.MateWindowPickerFactory.service.in +service_DATA = $(service_in_files:.service.in=.service) + +org.mate.panel.applet.MateWindowPickerFactory.service: $(service_in_files) + $(AM_V_GEN)sed \ + -e "s|\@LOCATION\@|$(APPLET_LOCATION)|" \ + $< > $@ + +schemasdir = @MATECONF_SCHEMA_FILE_DIR@ +schemas_in_files = mate-window-picker-applet.schemas.in +schemas_DATA = $(schemas_in_files:.schemas.in=.schemas) +@INTLTOOL_SCHEMAS_RULE@ + +xmluidir = $(datadir)/mate-panel/ui +xmlui_DATA = mate-window-picker-applet-menu.xml + +EXTRA_DIST = \ + org.mate.panel.MateWindowPicker.panel-applet.in.in \ + $(service_in_files) \ + $(ui_DATA) \ + $(schemas_in_files) + +CLEANFILES = $(applet_DATA) $(applet_DATA).in $(service_DATA) $(schemas_DATA) + +clean: + rm -f $(desktop_DATA) $(desktop_DATA).in $(server_DATA) $(server_DATA).in diff --git a/mate-window-picker-applet/applet.c b/mate-window-picker-applet/applet.c new file mode 100644 index 0000000..c2b33a6 --- /dev/null +++ b/mate-window-picker-applet/applet.c @@ -0,0 +1,351 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#if HAVE_CONFIG_H +#include <config.h> +#endif + +#include <string.h> +#include <stdlib.h> + +#include <glib.h> +#include <glib/gi18n.h> +#include <gtk/gtk.h> + +#include <libmatewnck/libmatewnck.h> + +#include <mate-panel-applet.h> +#include <mate-panel-applet-mateconf.h> +#include <mateconf/mateconf-client.h> + +#include "task-list.h" +#include "task-title.h" + +#define SHOW_WIN_KEY "show_all_windows" + +typedef struct +{ + GtkWidget *tasks; + GtkWidget *applet; + GtkWidget *title; + +} WinPickerApp; + +static WinPickerApp *mainapp; + +static void cw_panel_background_changed (MatePanelApplet *applet, + MatePanelAppletBackgroundType type, + GdkColor *colour, + GdkPixmap *pixmap, + gpointer user_data); +static void display_about_dialog (GtkAction *action, + WinPickerApp *applet); + +static void display_prefs_dialog (GtkAction *action, + WinPickerApp *applet); + +static const GtkActionEntry window_picker_menu_actions [] = { + { "MenuPrefs", GTK_STOCK_PREFERENCES, N_("_Preferences"), + NULL, NULL, + G_CALLBACK (display_prefs_dialog) }, + { "ShowDesktopAbout", GTK_STOCK_ABOUT, N_("_About"), + NULL, NULL, + G_CALLBACK (display_about_dialog) } +}; + +static const gchar *close_window_authors [] = { + "Neil J. Patel <[email protected]>", + "Stefano Karapetsas <[email protected]>", + NULL +}; + +static void +on_show_all_windows_changed (MateConfClient *client, + guint conn_id, + MateConfEntry *entry, + gpointer data) +{ + WinPickerApp *app; + gboolean show_windows = TRUE; + + app = (WinPickerApp*)data; + + show_windows = mate_panel_applet_mateconf_get_bool (MATE_PANEL_APPLET (app->applet), + SHOW_WIN_KEY, NULL); + + g_object_set (app->tasks, "show_all_windows", show_windows, NULL); +} + +static inline void +force_no_focus_padding (GtkWidget *widget) +{ + static gboolean first_time = TRUE; + + if (first_time) + { + gtk_rc_parse_string ("\n" + " style \"na-tray-style\"\n" + " {\n" + " GtkWidget::focus-line-width=0\n" + " GtkWidget::focus-padding=0\n" + " }\n" + "\n" + " widget \"*.na-tray\" style \"na-tray-style\"\n" + "\n"); + first_time = FALSE; + } + + gtk_widget_set_name (widget, "na-tray"); +} + +static gboolean +cw_applet_fill (MatePanelApplet *applet, + const gchar *iid, + gpointer data) +{ + MatewnckScreen *screen; + WinPickerApp *app; + GtkWidget *eb, *tasks, *title; + GError *error = NULL; + gchar *key; + gchar *ui_path; + GtkActionGroup *action_group; + + if (strcmp (iid, "MateWindowPicker") != 0) + return FALSE; + + bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); + textdomain (GETTEXT_PACKAGE); + + matewnck_set_client_type (MATEWNCK_CLIENT_TYPE_PAGER); + + app = g_slice_new0 (WinPickerApp); + mainapp = app; + screen = matewnck_screen_get_default (); + + /* mateconf prefs */ + mate_panel_applet_add_preferences (applet, + "/schemas/apps/mate-window-picker-applet/prefs", + &error); + if (error) + { + g_warning ("%s", error->message); + g_error_free (error); + } + + key = mate_panel_applet_mateconf_get_full_key (applet, SHOW_WIN_KEY); + mateconf_client_notify_add (mateconf_client_get_default (), key, + on_show_all_windows_changed, app, + NULL, NULL); + g_free (key); + + app->applet = GTK_WIDGET (applet); + force_no_focus_padding (GTK_WIDGET (applet)); + gtk_container_set_border_width (GTK_CONTAINER (applet), 0); + + eb = gtk_hbox_new (FALSE, 6); + gtk_container_add (GTK_CONTAINER (applet), eb); + gtk_container_set_border_width (GTK_CONTAINER (eb), 0); + + tasks = app->tasks = task_list_get_default (); + gtk_box_pack_start (GTK_BOX (eb), tasks, FALSE, FALSE, 0); + + title = app->title = task_title_new (); + gtk_box_pack_start (GTK_BOX (eb), title, TRUE, TRUE, 0); + + gtk_widget_show_all (GTK_WIDGET (applet)); + + on_show_all_windows_changed (NULL, 0, NULL, app); + + /* Signals */ + g_signal_connect (applet, "change-background", + G_CALLBACK (cw_panel_background_changed), NULL); + + + action_group = gtk_action_group_new ("MateWindowPicker Applet Actions"); + gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (action_group, + window_picker_menu_actions, + G_N_ELEMENTS (window_picker_menu_actions), + app); + ui_path = g_build_filename (MATEWINDOWPICKER_MENU_UI_DIR, "mate-window-picker-menu.xml", NULL); + mate_panel_applet_setup_menu_from_file (MATE_PANEL_APPLET (app->applet), + ui_path, action_group); + g_free (ui_path); + g_object_unref (action_group); + + mate_panel_applet_set_flags (MATE_PANEL_APPLET (applet), + MATE_PANEL_APPLET_EXPAND_MAJOR + | MATE_PANEL_APPLET_EXPAND_MINOR + | MATE_PANEL_APPLET_HAS_HANDLE); + + return TRUE; +} + +MATE_PANEL_APPLET_OUT_PROCESS_FACTORY ("MateWindowPickerFactory", + PANEL_TYPE_APPLET, + "MateWindowPicker", + cw_applet_fill, + NULL); + +static void +cw_panel_background_changed (MatePanelApplet *applet, + MatePanelAppletBackgroundType type, + GdkColor *colour, + GdkPixmap *pixmap, + gpointer user_data) +{ + GtkRcStyle *rc_style; + GtkStyle *style; + + /* reset style */ + gtk_widget_set_style (GTK_WIDGET (applet), NULL); + rc_style = gtk_rc_style_new (); + gtk_widget_modify_style (GTK_WIDGET (applet), rc_style); + gtk_rc_style_unref (rc_style); + + gtk_widget_set_style (mainapp->title, NULL); + rc_style = gtk_rc_style_new (); + gtk_widget_modify_style (mainapp->title, rc_style); + gtk_rc_style_unref (rc_style); + + switch (type) + { + case PANEL_NO_BACKGROUND: + break; + case PANEL_COLOR_BACKGROUND: + gtk_widget_modify_bg (GTK_WIDGET (applet), GTK_STATE_NORMAL, colour); + gtk_widget_modify_bg (mainapp->title, GTK_STATE_NORMAL, colour); + break; + + case PANEL_PIXMAP_BACKGROUND: + style = gtk_style_copy (GTK_WIDGET (applet)->style); + if (style->bg_pixmap[GTK_STATE_NORMAL]) + g_object_unref (style->bg_pixmap[GTK_STATE_NORMAL]); + style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (pixmap); + gtk_widget_set_style (GTK_WIDGET (applet), style); + g_object_unref (style); + + /*style = gtk_style_copy (mainapp->title->style); + if (style->bg_pixmap[GTK_STATE_NORMAL]) + g_object_unref (style->bg_pixmap[GTK_STATE_NORMAL]); + style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (pixmap); + gtk_widget_set_style (mainapp->title, style); + g_object_unref (style);*/ + + break; + } +} + +static void +display_about_dialog (GtkAction *action, + WinPickerApp *applet) +{ + GtkWidget *panel_about_dialog; + + panel_about_dialog = gtk_about_dialog_new (); + + g_object_set (panel_about_dialog, + "name", _("Window Picker"), + "comments", _("Window Picker"), + "version", PACKAGE_VERSION, + "authors", close_window_authors, + "logo-icon-name", "system-preferences-windows", + "copyright", "Copyright \xc2\xa9 2008 Canonical Ltd", + NULL); + + gtk_widget_show (panel_about_dialog); + + g_signal_connect (panel_about_dialog, "response", + G_CALLBACK (gtk_widget_destroy), NULL); + + + gtk_window_present (GTK_WINDOW (panel_about_dialog)); +} + +static void +on_checkbox_toggled (GtkToggleButton *check, gpointer null) +{ + gboolean is_active; + + is_active = gtk_toggle_button_get_active (check); + + mate_panel_applet_mateconf_set_bool (MATE_PANEL_APPLET (mainapp->applet), + SHOW_WIN_KEY, is_active, NULL); +} + +static void +display_prefs_dialog (GtkAction *action, + WinPickerApp *applet) +{ + GtkWidget *window, *box, *vbox, *nb, *hbox, *label, *check, *button; + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (window), _("Preferences")); + gtk_window_set_type_hint (GTK_WINDOW (window), + GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_container_set_border_width (GTK_CONTAINER (window), 12); + + box = gtk_vbox_new (FALSE, 8); + gtk_container_add (GTK_CONTAINER (window), box); + + nb = gtk_notebook_new (); + g_object_set (nb, "show-tabs", FALSE, "show-border", TRUE, NULL); + gtk_box_pack_start (GTK_BOX (box), nb, TRUE, TRUE, 0); + + vbox = gtk_vbox_new (FALSE, 8); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); + gtk_notebook_append_page (GTK_NOTEBOOK (nb), vbox, NULL); + + check = gtk_check_button_new_with_label (_("Show windows from all workspaces")); + gtk_box_pack_start (GTK_BOX (vbox), check, FALSE, TRUE, 0); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), + mate_panel_applet_mateconf_get_bool ( + MATE_PANEL_APPLET (mainapp->applet), + SHOW_WIN_KEY, NULL)); + g_signal_connect (check, "toggled", + G_CALLBACK (on_checkbox_toggled), NULL); + + check = gtk_label_new (" "); + gtk_box_pack_start (GTK_BOX (vbox), check, TRUE, TRUE, 0); + + gtk_widget_set_size_request (nb, -1, 100); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0); + + label = gtk_label_new (" "); + gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); + + button = gtk_button_new_from_stock (GTK_STOCK_CLOSE); + gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); + + gtk_widget_show_all (window); + + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_widget_destroy), window); + + g_signal_connect (window, "destroy", + G_CALLBACK (gtk_widget_destroy), window); + g_signal_connect_swapped (button, "clicked", + G_CALLBACK (gtk_widget_destroy), window); + + gtk_window_present (GTK_WINDOW (window)); +} diff --git a/mate-window-picker-applet/mate-window-picker-applet-menu.xml b/mate-window-picker-applet/mate-window-picker-applet-menu.xml new file mode 100644 index 0000000..7649999 --- /dev/null +++ b/mate-window-picker-applet/mate-window-picker-applet-menu.xml @@ -0,0 +1,2 @@ +<menuitem name="PreferencesItem" action="MenuPrefs" /> +<menuitem name="About Item" action="MenuAbout" /> diff --git a/mate-window-picker-applet/mate-window-picker-applet.schemas.in b/mate-window-picker-applet/mate-window-picker-applet.schemas.in new file mode 100644 index 0000000..ccceb1c --- /dev/null +++ b/mate-window-picker-applet/mate-window-picker-applet.schemas.in @@ -0,0 +1,13 @@ +<mateconfschemafile> + <schemalist> + <schema> + <key>/schemas/apps/mate-window-picker-applet/prefs/show_all_windows</key> + <owner>mate-window-picker-applet</owner> + <type>bool</type> + <default>true</default> + <locale name="C"> + <short>Show windows from all workspaces.</short> + </locale> + </schema> + </schemalist> +</mateconfschemafile> diff --git a/mate-window-picker-applet/org.mate.panel.MateWindowPicker.mate-panel-applet.in.in b/mate-window-picker-applet/org.mate.panel.MateWindowPicker.mate-panel-applet.in.in new file mode 100644 index 0000000..ffc4b98 --- /dev/null +++ b/mate-window-picker-applet/org.mate.panel.MateWindowPicker.mate-panel-applet.in.in @@ -0,0 +1,11 @@ +[Applet Factory] +Id=MateWindowPickerFactory +Location=@LOCATION@ +_Name=Window Picker Applet Factory +_Description=Window Picker + +[MateWindowPicker] +_Name=Window Picker +_Description=Window Picker +Icon=preferences-system-windows +BonoboId=OAFIID:MATE_WindowPicker diff --git a/mate-window-picker-applet/org.mate.panel.applet.MateWindowPickerFactory.service.in b/mate-window-picker-applet/org.mate.panel.applet.MateWindowPickerFactory.service.in new file mode 100644 index 0000000..f301b25 --- /dev/null +++ b/mate-window-picker-applet/org.mate.panel.applet.MateWindowPickerFactory.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.mate.panel.applet.MateWindowPickerFactory +Exec=@LOCATION@ diff --git a/mate-window-picker-applet/task-item.c b/mate-window-picker-applet/task-item.c new file mode 100644 index 0000000..3e0dd97 --- /dev/null +++ b/mate-window-picker-applet/task-item.c @@ -0,0 +1,779 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Jason Smith <[email protected]> + * + */ + +#include "task-item.h" +#include "task-list.h" + +#include <math.h> +#include <glib/gi18n.h> +#include <cairo/cairo.h> + +G_DEFINE_TYPE (TaskItem, task_item, GTK_TYPE_EVENT_BOX); + +#define TASK_ITEM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ + TASK_TYPE_ITEM, \ + TaskItemPrivate)) + +#define DEFAULT_TASK_ITEM_HEIGHT 24; +#define DEFAULT_TASK_ITEM_WIDTH 28 + +struct _TaskItemPrivate +{ + MatewnckWindow *window; + MatewnckScreen *screen; + GdkPixbuf *pixbuf; + GdkRectangle area; + + GTimeVal urgent_time; + guint timer; + gboolean mouse_over; +}; + +enum { + TASK_ITEM_CLOSED_SIGNAL, + LAST_SIGNAL +}; + +/* D&D stuff */ +static const GtkTargetEntry drop_types[] = +{ + { "STRING", 0, 0 }, + { "text/plain", 0, 0}, + { "text/uri-list", 0, 0} +}; +static const gint n_drop_types = G_N_ELEMENTS(drop_types); + +static guint task_item_signals[LAST_SIGNAL] = { 0 }; + +static void +update_hints (TaskItem *item) +{ + GtkWidget *parent; + GtkWidget *widget; + MatewnckWindow *window; + gint x, y, x1, y1; + + widget = GTK_WIDGET (item); + window = item->priv->window; + /* Skip problems */ + if (!MATEWNCK_IS_WINDOW (window)) return; + if (!GTK_IS_WIDGET (widget)) return; + + /* Skip invisible windows */ + if (!GTK_WIDGET_VISIBLE (widget)) return; + + x = y = 0; + + /* Recursively compute the button's coordinates */ + for (parent = widget; parent; parent = parent->parent) + { + if (parent->parent) + { + x += parent->allocation.x; + y += parent->allocation.y; + } + else + { + x1 = y1 = 0; + if (GDK_IS_WINDOW (parent->window)) + gdk_window_get_origin (parent->window, &x1, &y1); + x += x1; y += y1; + break; + } + } + + /* Set the minimize hint for the window */ + matewnck_window_set_icon_geometry (window, x, y, + widget->allocation.width, + widget->allocation.height); +} + +static gboolean +on_task_item_button_released (GtkWidget *widget, + GdkEventButton *event, + TaskItem *item) +{ + MatewnckWindow *window; + MatewnckScreen *screen; + MatewnckWorkspace *workspace; + TaskItemPrivate *priv; + + g_return_val_if_fail (TASK_IS_ITEM (item), TRUE); + + priv = item->priv; + window = priv->window; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), TRUE); + + screen = priv->screen; + workspace = matewnck_window_get_workspace (window); + + if (event->button == 1) + { + + if (MATEWNCK_IS_WORKSPACE (workspace) && workspace != matewnck_screen_get_active_workspace (screen)) + { + matewnck_workspace_activate (workspace, GDK_CURRENT_TIME); + } + if (matewnck_window_is_active (window)) + { + matewnck_window_minimize (window); + } + else + { + matewnck_window_activate (window, GDK_CURRENT_TIME); + } + } + return TRUE; +} + +static void +task_item_set_visibility (TaskItem *item) +{ + MatewnckScreen *screen; + MatewnckWindow *window; + MatewnckWorkspace *workspace; + + g_return_if_fail (TASK_IS_ITEM (item)); + + TaskItemPrivate *priv = item->priv; + + if (!MATEWNCK_IS_WINDOW (priv->window)) + { + gtk_widget_hide (GTK_WIDGET (item)); + return; + } + + window = priv->window; + + screen = priv->screen; + workspace = matewnck_screen_get_active_workspace (screen); + + gboolean show_all = task_list_get_show_all_windows (TASK_LIST (task_list_get_default ())); + gboolean show_window = FALSE; + + if (!matewnck_window_is_skip_tasklist (window)) + { + if (matewnck_workspace_is_virtual (workspace)) + { + show_window = matewnck_window_is_in_viewport (window, workspace); + } + else + { + show_window = matewnck_window_is_on_workspace (window, workspace); + } + show_window = show_window || show_all; + } + + if (show_window) + { + gtk_widget_show (GTK_WIDGET (item)); + } + else + { + gtk_widget_hide (GTK_WIDGET (item)); + } +} + +static void +task_item_size_request (GtkWidget *widget, + GtkRequisition *requisition) +{ + /* Candidate for terrible hack of the year award */ + requisition->width = DEFAULT_TASK_ITEM_WIDTH; + requisition->height = DEFAULT_TASK_ITEM_HEIGHT; +} + +static GdkPixbuf * +task_item_sized_pixbuf_for_window (TaskItem *item, + MatewnckWindow *window, + gint size) +{ + GdkPixbuf *pbuf = NULL; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), NULL); + + if (matewnck_window_has_icon_name (window)) + { + const gchar *icon_name = matewnck_window_get_icon_name (window); + GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); + + if (gtk_icon_theme_has_icon (icon_theme, icon_name)) + { + GdkPixbuf *internal = gtk_icon_theme_load_icon (icon_theme, + icon_name, + size, + GTK_ICON_LOOKUP_FORCE_SIZE, + NULL); + pbuf = gdk_pixbuf_copy (internal); + g_object_unref (internal); + } + } + + if (!pbuf) + { + pbuf = gdk_pixbuf_copy (matewnck_window_get_icon (item->priv->window)); + } + + gint width = gdk_pixbuf_get_width (pbuf); + gint height = gdk_pixbuf_get_height (pbuf); + + if (MAX (width, height) != size) + { + gdouble scale = (gdouble) size / (gdouble) MAX (width, height); + + GdkPixbuf *tmp = pbuf; + pbuf = gdk_pixbuf_scale_simple (tmp, (gint) (width * scale), (gint) (height * scale), GDK_INTERP_HYPER); + + g_object_unref (tmp); + } + + return pbuf; +} +static gboolean +task_item_expose_event (GtkWidget *widget, + GdkEventExpose *event) +{ + cairo_t *cr; + TaskItem *item; + GdkRectangle area; + TaskItemPrivate *priv; + GdkPixbuf *desat; + GdkPixbuf *pbuf; + + g_return_val_if_fail (widget != NULL, FALSE); + g_return_val_if_fail (TASK_IS_ITEM (widget), FALSE); + g_return_val_if_fail (event != NULL, FALSE); + + item = TASK_ITEM (widget); + priv = item->priv; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (priv->window), FALSE); + + area = priv->area; + cr = gdk_cairo_create (event->window); + + pbuf = priv->pixbuf; + desat = NULL; + + gint size = MIN (area.height, area.width); + gboolean active = matewnck_window_is_active (priv->window); + gboolean attention = matewnck_window_or_transient_needs_attention (priv->window); + + if (GDK_IS_PIXBUF (pbuf) && + gdk_pixbuf_get_width (pbuf) != size && + gdk_pixbuf_get_height (pbuf) != size) + { + g_object_unref (pbuf); + pbuf = NULL; + } + + if (active) + { + cairo_rectangle (cr, area.x + .5, area.y - 4, area.width - 1, area.height + 8); + cairo_set_source_rgba (cr, .8, .8, .8, .2); + cairo_fill_preserve (cr); + + cairo_set_line_width (cr, 1); + cairo_set_source_rgba (cr, .8, .8, .8, .4); + cairo_stroke (cr); + } + + if (!pbuf) + { + pbuf = priv->pixbuf = task_item_sized_pixbuf_for_window (item, priv->window, size); + } + + if (active || priv->mouse_over || attention) + { + gdk_cairo_set_source_pixbuf (cr, + pbuf, + (area.x + (area.width - gdk_pixbuf_get_width (pbuf)) / 2), + (area.y + (area.height - gdk_pixbuf_get_height (pbuf)) / 2)); + } + else + { + desat = gdk_pixbuf_new (GDK_COLORSPACE_RGB, + TRUE, + gdk_pixbuf_get_bits_per_sample (pbuf), + gdk_pixbuf_get_width (pbuf), + gdk_pixbuf_get_height (pbuf)); + + if (desat) + { + gdk_pixbuf_saturate_and_pixelate (pbuf, + desat, + 0, + FALSE); + } + else /* just paint the colored version as a fallback */ + { + desat = pbuf; + } + gdk_cairo_set_source_pixbuf (cr, + desat, + (area.x + (area.width - gdk_pixbuf_get_width (desat)) / 2), + (area.y + (area.height - gdk_pixbuf_get_height (desat)) / 2)); + } + if (!priv->mouse_over && attention) /* urgent */ + { + GTimeVal current_time; + g_get_current_time (¤t_time); + + gdouble ms = (current_time.tv_sec - priv->urgent_time.tv_sec) * 1000 + + (current_time.tv_usec - priv->urgent_time.tv_usec) / 1000; + + gdouble alpha = .66 + (cos (3.15 * ms / 600) / 3); + cairo_paint_with_alpha (cr, alpha); + } + else if (priv->mouse_over || active) /* focused */ + { + cairo_paint (cr); + } + else /* not focused */ + { + cairo_paint_with_alpha (cr, .65); + } + + if (GDK_IS_PIXBUF (desat)) + g_object_unref (desat); + + cairo_destroy (cr); + + return FALSE; +} + +static void +on_size_allocate (GtkWidget *widget, + GtkAllocation *allocation, + TaskItem *item) +{ + TaskItemPrivate *priv; + + if (allocation->width != allocation->height + 6) + gtk_widget_set_size_request (widget, allocation->height + 6, -1); + + g_return_if_fail (TASK_IS_ITEM (item)); + + priv = item->priv; + priv->area.x = allocation->x; + priv->area.y = allocation->y; + priv->area.width = allocation->width; + priv->area.height = allocation->height; + + update_hints (item); +} + +static gboolean +on_button_pressed (GtkWidget *button, + GdkEventButton *event, + TaskItem *item) +{ + MatewnckWindow *window; + g_return_val_if_fail (TASK_IS_ITEM (item), FALSE); + window = item->priv->window; + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + if (event->button == 3) + { + GtkWidget *menu = matewnck_action_menu_new (window); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + event->button, event->time); + return TRUE; + } + + return FALSE; +} + +static gboolean +on_query_tooltip (GtkWidget *widget, + gint x, gint y, + gboolean keyboard_mode, + GtkTooltip *tooltip, + TaskItem *item) +{ + MatewnckWindow *window = item->priv->window; + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + gtk_tooltip_set_text (tooltip, matewnck_window_get_name(window)); + gtk_tooltip_set_icon (tooltip, matewnck_window_get_icon (window)); + + return TRUE; +} + +static gboolean +on_enter_notify (GtkWidget *widget, + GdkEventCrossing *event, + TaskItem *item) +{ + g_return_val_if_fail (TASK_IS_ITEM (item), FALSE); + + item->priv->mouse_over = TRUE; + gtk_widget_queue_draw (widget); + + return FALSE; +} + +static gboolean +on_leave_notify (GtkWidget *widget, + GdkEventCrossing *event, + TaskItem *item) +{ + g_return_val_if_fail (TASK_IS_ITEM (item), FALSE); + + item->priv->mouse_over = FALSE; + gtk_widget_queue_draw (widget); + + return FALSE; +} + +static gboolean +on_blink (TaskItem *item) +{ + g_return_val_if_fail (TASK_IS_ITEM (item), FALSE); + + gtk_widget_queue_draw (GTK_WIDGET (item)); + + if (matewnck_window_or_transient_needs_attention (item->priv->window)) + { + return TRUE; + } + else + { + item->priv->timer = 0; + return FALSE; + } +} + +static void +on_window_state_changed (MatewnckWindow *window, + MatewnckWindowState changed_mask, + MatewnckWindowState new_state, + TaskItem *item) +{ + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + g_return_if_fail (TASK_IS_ITEM (item)); + + TaskItemPrivate *priv = item->priv; + + if (new_state & MATEWNCK_WINDOW_STATE_URGENT && !priv->timer) + { + priv->timer = g_timeout_add (30, (GSourceFunc)on_blink, item); + g_get_current_time (&priv->urgent_time); + } + + task_item_set_visibility (item); +} + +static void +on_window_workspace_changed (MatewnckWindow *window, TaskItem *item) +{ + g_return_if_fail (TASK_IS_ITEM (item)); + + task_item_set_visibility (item); +} + +static void on_window_icon_changed (MatewnckWindow *window, TaskItem *item) +{ + TaskItemPrivate *priv; + + g_return_if_fail (TASK_IS_ITEM (item)); + + priv = item->priv; + + if (GDK_IS_PIXBUF (priv->pixbuf)) + { + g_object_unref (priv->pixbuf); + priv->pixbuf = NULL; + } + + gtk_widget_queue_draw (GTK_WIDGET (item)); +} + +static void +on_screen_active_window_changed (MatewnckScreen *screen, + MatewnckWindow *old_window, + TaskItem *item) +{ + MatewnckWindow *window; + TaskItemPrivate *priv; + + g_return_if_fail (TASK_IS_ITEM (item)); + + priv = item->priv; + window = priv->window; + + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + if ((MATEWNCK_IS_WINDOW (old_window) && window == old_window) || + window == matewnck_screen_get_active_window (screen)) + { + /* queue a draw to reflect that we are [no longer] the active window */ + gtk_widget_queue_draw (GTK_WIDGET (item)); + } +} + +static void +on_screen_active_workspace_changed (MatewnckScreen *screen, + MatewnckWorkspace *old_workspace, + TaskItem *item) +{ + g_return_if_fail (TASK_IS_ITEM (item)); + + task_item_set_visibility (item); +} + +static void +on_screen_active_viewport_changed (MatewnckScreen *screen, + TaskItem *item) +{ + g_return_if_fail (TASK_IS_ITEM (item)); + + task_item_set_visibility (item); +} + +static void +on_screen_window_closed (MatewnckScreen *screen, + MatewnckWindow *window, + TaskItem *item) +{ + TaskItemPrivate *priv; + + g_return_if_fail (TASK_IS_ITEM (item)); + priv = item->priv; + g_return_if_fail (MATEWNCK_IS_WINDOW (priv->window)); + + if (priv->window == window) + { + g_signal_handlers_disconnect_by_func (screen, G_CALLBACK (on_screen_window_closed), item); + g_signal_handlers_disconnect_by_func (screen, G_CALLBACK (on_screen_active_window_changed), item); + g_signal_handlers_disconnect_by_func (screen, G_CALLBACK (on_screen_active_workspace_changed), item); + g_signal_handlers_disconnect_by_func (screen, G_CALLBACK (on_screen_window_closed), item); + g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_window_workspace_changed), item); + g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_window_state_changed), item); + + g_signal_emit (G_OBJECT (item), task_item_signals[TASK_ITEM_CLOSED_SIGNAL], 0); + } +} + +static gboolean +activate_window (GtkWidget *widget) +{ + gint active; + TaskItemPrivate *priv; + + g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); + g_return_val_if_fail (TASK_IS_ITEM (widget), FALSE); + + priv = TASK_ITEM (widget)->priv; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (priv->window), FALSE); + + active = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "drag-true")); + + if (active) + { + MatewnckWindow *window; + + window = priv->window; + if (MATEWNCK_IS_WINDOW (window)) + matewnck_window_activate (window, time (NULL)); + } + + g_object_set_data (G_OBJECT (widget), "drag-true", GINT_TO_POINTER (0)); + + return FALSE; +} + +static void +on_drag_leave (GtkWidget *item, + GdkDragContext *context, + guint time) +{ + g_object_set_data (G_OBJECT (item), "drag-true", GINT_TO_POINTER (0)); +} + +static gboolean +on_drag_motion (GtkWidget *item, + GdkDragContext *context, + gint x, + gint y, + guint t) +{ + gint active; + + active = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "drag-true")); + + if (!active) + { + g_object_set_data (G_OBJECT (item), "drag-true", GINT_TO_POINTER (1)); + + g_timeout_add (1000, (GSourceFunc)activate_window, item); + } + + return FALSE; +} + +static void +task_item_setup_atk (TaskItem *item) +{ + TaskItemPrivate *priv; + GtkWidget *widget; + AtkObject *atk; + MatewnckWindow *window; + + g_return_if_fail (TASK_IS_ITEM (item)); + + widget = GTK_WIDGET (item); + priv = item->priv; + window = priv->window; + + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + atk = gtk_widget_get_accessible (widget); + atk_object_set_name (atk, _("Window Task Button")); + atk_object_set_description (atk, matewnck_window_get_name (window)); + atk_object_set_role (atk, ATK_ROLE_PUSH_BUTTON); +} + +static void +task_item_finalize (GObject *object) +{ + TaskItemPrivate *priv; + priv = TASK_ITEM_GET_PRIVATE (object); + + /* remove timer */ + if (priv->timer) + { + g_source_remove (priv->timer); + } + + if (GDK_IS_PIXBUF (priv->pixbuf)) + { + g_object_unref (priv->pixbuf); + } + + G_OBJECT_CLASS (task_item_parent_class)->finalize (object); +} + +static void +task_item_class_init (TaskItemClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + + obj_class->finalize = task_item_finalize; + widget_class->expose_event = task_item_expose_event; + widget_class->size_request = task_item_size_request; + + g_type_class_add_private (obj_class, sizeof (TaskItemPrivate)); + + task_item_signals [TASK_ITEM_CLOSED_SIGNAL] = + g_signal_new ("task-item-closed", + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (TaskItemClass, itemclosed), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); +} + +static void +task_item_init (TaskItem *item) +{ + TaskItemPrivate *priv; + priv = item->priv = TASK_ITEM_GET_PRIVATE (item); + + priv->timer = 0; +} + +GtkWidget * +task_item_new (MatewnckWindow *window) +{ + GtkWidget *item = NULL; + TaskItem *task; + TaskItemPrivate *priv; + MatewnckScreen *screen; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), item); + + item = g_object_new (TASK_TYPE_ITEM, + "has-tooltip", TRUE, + "visible-window", FALSE, + "above-child", TRUE, + NULL); + + gtk_widget_add_events (item, GDK_ALL_EVENTS_MASK); + gtk_container_set_border_width (GTK_CONTAINER (item), 0); + + task = TASK_ITEM (item); + priv = task->priv; + priv->window = window; + + screen = matewnck_window_get_screen (window); + priv->screen = screen; + + gtk_drag_dest_set (item, + GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_DROP, + drop_types, n_drop_types, + GDK_ACTION_COPY); + gtk_drag_dest_add_uri_targets (item); + gtk_drag_dest_add_text_targets (item); + g_signal_connect (item, "drag-motion", + G_CALLBACK (on_drag_motion), NULL); + g_signal_connect (item, "drag-leave", + G_CALLBACK (on_drag_leave), NULL); + + g_signal_connect (screen, "viewports-changed", + G_CALLBACK (on_screen_active_viewport_changed), item); + g_signal_connect (screen, "active-window-changed", + G_CALLBACK (on_screen_active_window_changed), item); + g_signal_connect (screen, "active-workspace-changed", + G_CALLBACK (on_screen_active_workspace_changed), item); + g_signal_connect (screen, "window-closed", + G_CALLBACK (on_screen_window_closed), item); + + g_signal_connect (window, "workspace-changed", + G_CALLBACK (on_window_workspace_changed), item); + g_signal_connect (window, "state-changed", + G_CALLBACK (on_window_state_changed), item); + g_signal_connect (window, "icon-changed", + G_CALLBACK (on_window_icon_changed), item); + + g_signal_connect (item, "button-release-event", + G_CALLBACK (on_task_item_button_released), item); + g_signal_connect (item, "button-press-event", + G_CALLBACK (on_button_pressed), item); + g_signal_connect (item, "size-allocate", + G_CALLBACK (on_size_allocate), item); + g_signal_connect (item, "query-tooltip", + G_CALLBACK (on_query_tooltip), item); + g_signal_connect (item, "enter-notify-event", + G_CALLBACK (on_enter_notify), item); + g_signal_connect (item, "leave-notify-event", + G_CALLBACK (on_leave_notify), item); + g_signal_connect (item, "drag-motion", + G_CALLBACK (on_drag_motion), item); + g_signal_connect (item, "drag-leave", + G_CALLBACK (on_drag_leave), item); + + task_item_set_visibility (task); + task_item_setup_atk (task); + + return item; +} diff --git a/mate-window-picker-applet/task-item.h b/mate-window-picker-applet/task-item.h new file mode 100644 index 0000000..bf6ce38 --- /dev/null +++ b/mate-window-picker-applet/task-item.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by: Neil Jagdish Patel <[email protected]> + * Jason Smith <[email protected]> + * + */ + +#ifndef _TASK_ITEM_H_ +#define _TASK_ITEM_H_ + +#include <glib.h> +#include <gtk/gtk.h> +#include <libmatewnck/libmatewnck.h> + +#define TASK_TYPE_ITEM (task_item_get_type ()) + +#define TASK_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + TASK_TYPE_ITEM, TaskItem)) + +#define TASK_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\ + TASK_TYPE_ITEM, TaskItemClass)) + +#define TASK_IS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + TASK_TYPE_ITEM)) + +#define TASK_IS_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\ + TASK_TYPE_ITEM)) + +#define TASK_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\ + TASK_TYPE_ITEM, TaskItemClass)) + +typedef struct _TaskItem TaskItem; +typedef struct _TaskItemClass TaskItemClass; +typedef struct _TaskItemPrivate TaskItemPrivate; + +struct _TaskItem +{ + GtkEventBox parent; + + TaskItemPrivate *priv; +}; + +struct _TaskItemClass +{ + GtkEventBoxClass parent_class; + + void (* itemclosed) (TaskItem *item); +}; + +GType task_item_get_type (void) G_GNUC_CONST; + +GtkWidget * task_item_new (MatewnckWindow *window); + +GtkWidget * task_item_get_default (void); + +gboolean task_item_get_desktop_visible (TaskItem *item); + +#endif /* _TASK_ITEM_H_ */ + diff --git a/mate-window-picker-applet/task-list.c b/mate-window-picker-applet/task-list.c new file mode 100644 index 0000000..43c0d5d --- /dev/null +++ b/mate-window-picker-applet/task-list.c @@ -0,0 +1,246 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#include "task-list.h" +#include "task-item.h" + +#include <libmatewnck/libmatewnck.h> + +G_DEFINE_TYPE (TaskList, task_list, GTK_TYPE_HBOX); + +#define TASK_LIST_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ + TASK_TYPE_LIST, \ + TaskListPrivate)) + +struct _TaskListPrivate +{ + MatewnckScreen *screen; + GHashTable *win_table; + guint timer; + guint counter; + + gboolean show_all_windows; +}; + +enum +{ + PROP_0, + + PROP_SHOW_ALL_WINDOWS +}; + +static void +task_list_set_show_all_windows (TaskList *list, gboolean show_all_windows) +{ + TaskListPrivate *priv = list->priv; + + priv->show_all_windows = show_all_windows; + + g_debug ("Show all windows: %s", show_all_windows ? "true" : "false"); +} + +static void +on_task_item_closed (TaskItem *item, + TaskList *list) +{ + gtk_container_remove (GTK_CONTAINER (list), + GTK_WIDGET (item)); + gtk_widget_destroy (GTK_WIDGET (item)); +} + +static void +on_window_opened (MatewnckScreen *screen, + MatewnckWindow *window, + TaskList *list) +{ + TaskListPrivate *priv; + MatewnckWindowType type; + + g_return_if_fail (TASK_IS_LIST (list)); + priv = list->priv; + + type = matewnck_window_get_window_type (window); + + if (type == MATEWNCK_WINDOW_DESKTOP + || type == MATEWNCK_WINDOW_DOCK + || type == MATEWNCK_WINDOW_SPLASHSCREEN + || type == MATEWNCK_WINDOW_MENU) + return; + + GtkWidget *item = task_item_new (window); + + if (item) + { + gtk_box_pack_start (GTK_BOX (list), item, FALSE, FALSE, 0); + g_signal_connect (TASK_ITEM (item), "task-item-closed", + G_CALLBACK (on_task_item_closed), list); + } +} + +/* GObject stuff */ +static void +task_list_finalize (GObject *object) +{ + TaskListPrivate *priv; + + priv = TASK_LIST_GET_PRIVATE (object); + + /* Remove the blink timer */ + if (priv->timer) g_source_remove (priv->timer); + + G_OBJECT_CLASS (task_list_parent_class)->finalize (object); +} + +static void +task_list_get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + TaskList *list = TASK_LIST (object); + TaskListPrivate *priv; + + g_return_if_fail (TASK_IS_LIST (list)); + priv = list->priv; + + switch (prop_id) + { + case PROP_SHOW_ALL_WINDOWS: + g_value_set_boolean (value, priv->show_all_windows); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +task_list_set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + TaskList *list = TASK_LIST (object); + TaskListPrivate *priv; + + g_return_if_fail (TASK_IS_LIST (list)); + priv = list->priv; + + switch (prop_id) + { + case PROP_SHOW_ALL_WINDOWS: + task_list_set_show_all_windows (list, g_value_get_boolean (value)); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + } +} + +static void +task_list_class_init (TaskListClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS (klass); + + obj_class->finalize = task_list_finalize; + obj_class->set_property = task_list_set_property; + obj_class->get_property = task_list_get_property; + + g_object_class_install_property (obj_class, + PROP_SHOW_ALL_WINDOWS, + g_param_spec_boolean ("show_all_windows", + "Show All Windows", + "Show windows from all workspaces", + TRUE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + + g_type_class_add_private (obj_class, sizeof (TaskListPrivate)); +} + +static void +task_list_init (TaskList *list) +{ + TaskListPrivate *priv; + + priv = list->priv = TASK_LIST_GET_PRIVATE (list); + + priv->screen = matewnck_screen_get_default (); + + priv->win_table = g_hash_table_new (NULL, NULL); + + /* No blink timer */ + priv->timer = 0; + + gtk_container_set_border_width (GTK_CONTAINER (list), 0); + + g_signal_connect (priv->screen, "window-opened", + G_CALLBACK (on_window_opened), list); +} + +GtkWidget * +task_list_new (void) + +{ + GtkWidget *list = NULL; + + list = g_object_new (TASK_TYPE_LIST, + "homogeneous", FALSE, + "spacing", 0, + NULL); + + return list; +} + +GtkWidget * +task_list_get_default (void) +{ + static GtkWidget *list = NULL; + + if (!list) + list = task_list_new (); + + return list; +} + +gboolean +task_list_get_desktop_visible (TaskList *list) +{ + GList *windows, *w; + gboolean all_minimised = TRUE; + + g_return_val_if_fail (TASK_IS_LIST (list), TRUE); + + windows = matewnck_screen_get_windows (list->priv->screen); + for (w = windows; w; w = w->next) + { + MatewnckWindow *window; + + window = w->data; + + if (MATEWNCK_IS_WINDOW (window) && !matewnck_window_is_minimized (window)) + all_minimised = FALSE; + } + + return all_minimised; +} + +gboolean +task_list_get_show_all_windows (TaskList *list) +{ + return list->priv->show_all_windows; +} + diff --git a/mate-window-picker-applet/task-list.h b/mate-window-picker-applet/task-list.h new file mode 100644 index 0000000..87698ba --- /dev/null +++ b/mate-window-picker-applet/task-list.h @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#ifndef _TASK_LIST_H_ +#define _TASK_LIST_H_ + +#include <glib.h> +#include <gtk/gtk.h> + +#define TASK_TYPE_LIST (task_list_get_type ()) + +#define TASK_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + TASK_TYPE_LIST, TaskList)) + +#define TASK_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\ + TASK_TYPE_LIST, TaskListClass)) + +#define TASK_IS_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + TASK_TYPE_LIST)) + +#define TASK_IS_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\ + TASK_TYPE_LIST)) + +#define TASK_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\ + TASK_TYPE_LIST, TaskListClass)) + +typedef struct _TaskList TaskList; +typedef struct _TaskListClass TaskListClass; +typedef struct _TaskListPrivate TaskListPrivate; + +struct _TaskList +{ + GtkHBox parent; + + TaskListPrivate *priv; +}; + +struct _TaskListClass +{ + GtkHBoxClass parent_class; +}; + +GType task_list_get_type (void) G_GNUC_CONST; + +GtkWidget * task_list_new (void); + +GtkWidget * task_list_get_default (void); + +gboolean task_list_get_desktop_visible (TaskList *list); + +gboolean task_list_get_show_all_windows (TaskList *list); + +#endif /* _TASK_LIST_H_ */ + diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c new file mode 100644 index 0000000..4795559 --- /dev/null +++ b/mate-window-picker-applet/task-title.c @@ -0,0 +1,528 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#include "task-title.h" + +#include <libmatewnck/libmatewnck.h> +#include <mate-panel-applet.h> +#include <mate-panel-applet-mateconf.h> + +#include <mateconf/mateconf.h> +#include <mateconf/mateconf-client.h> + +#include "task-list.h" + +G_DEFINE_TYPE (TaskTitle, task_title, GTK_TYPE_EVENT_BOX); + +#define TASK_TITLE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ + TASK_TYPE_TITLE, \ + TaskTitlePrivate)) + +#define LOGOUT "mate-session-save --kill --gui" +#define SHOW_HOME_TITLE_KEY "/apps/window-picker-applet/show_home_title" + +struct _TaskTitlePrivate +{ + MatewnckScreen *screen; + MatewnckWindow *window; + GtkWidget *align; + GtkWidget *box; + GtkWidget *label; + GtkWidget *button; + GtkWidget *button_image; + GdkPixbuf *quit_icon; + + gboolean show_home_title; + gboolean mouse_in_close_button; +}; + +static void disconnect_window (TaskTitle *title); + +static gboolean +on_close_clicked (GtkButton *button, + GdkEventButton *event, + TaskTitle *title) +{ + TaskTitlePrivate *priv; + MatewnckWindow *window; + + g_return_val_if_fail (TASK_IS_TITLE (title), FALSE); + priv = title->priv; + + if (event->button != 1 || !priv->mouse_in_close_button) + return FALSE; + + window = matewnck_screen_get_active_window (priv->screen); + + if (!MATEWNCK_IS_WINDOW (window) + || matewnck_window_get_window_type (window) == MATEWNCK_WINDOW_DESKTOP) + { + gdk_spawn_command_line_on_screen (gdk_screen_get_default (), + LOGOUT, NULL); + } + else + { + if (priv->window == window) + disconnect_window (title); + matewnck_window_close (window, GDK_CURRENT_TIME); + } + gtk_widget_queue_draw (GTK_WIDGET (title)); + + return TRUE; +} + +static gboolean +on_enter_notify (GtkWidget *widget, + GdkEventCrossing *event, + TaskTitle *title) +{ + g_return_val_if_fail (TASK_IS_TITLE (title), FALSE); + + title->priv->mouse_in_close_button = TRUE; + gtk_widget_queue_draw (widget); + + return FALSE; +} + +static gboolean +on_leave_notify (GtkWidget *widget, + GdkEventCrossing *event, + TaskTitle *title) +{ + g_return_val_if_fail (TASK_IS_TITLE (title), FALSE); + + title->priv->mouse_in_close_button = FALSE; + gtk_widget_queue_draw (widget); + + return FALSE; +} + +static gboolean +on_button_expose (GtkWidget *widget, + GdkEventExpose *event, + TaskTitle *title) +{ + g_return_val_if_fail (TASK_IS_TITLE (title), FALSE); + + TaskTitlePrivate *priv; + priv = title->priv; + + if (priv->mouse_in_close_button) + { + GtkStyle *style = gtk_widget_get_style (widget); + gtk_paint_box (style, + event->window, + GTK_STATE_PRELIGHT, + GTK_SHADOW_NONE, + NULL, + NULL, + NULL, + event->area.x, + event->area.y + 2, + event->area.width, + event->area.height - 4); + } + return FALSE; +} + +static void +on_name_changed (MatewnckWindow *window, TaskTitle *title) +{ + TaskTitlePrivate *priv; + + g_return_if_fail (TASK_IS_TITLE (title)); + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + priv = title->priv; + if (priv->window != window) + return; + + gtk_label_set_text (GTK_LABEL (title->priv->label), + matewnck_window_get_name (window)); + gtk_widget_set_tooltip_text (GTK_WIDGET (title), + matewnck_window_get_name (window)); + gtk_widget_queue_draw (GTK_WIDGET (title)); +} + + +static void +on_icon_changed (MatewnckWindow *window, TaskTitle *title) +{ + TaskTitlePrivate *priv; + + g_return_if_fail (TASK_IS_TITLE (title)); + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + priv = title->priv; + if (priv->window != window) + return; + + gtk_widget_queue_draw (GTK_WIDGET (title)); +} + +static void +on_state_changed (MatewnckWindow *window, + MatewnckWindowState changed_mask, + MatewnckWindowState new_state, + TaskTitle *title) +{ + TaskTitlePrivate *priv; + + g_return_if_fail (TASK_IS_TITLE (title)); + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + priv = title->priv; + if (priv->window != window) + return; + + if (matewnck_window_is_maximized (window)) + { + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_ACTIVE); + gtk_widget_show (priv->box); + } + else + { + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL); + gtk_widget_hide (priv->box); + } +} + +static void +disconnect_window (TaskTitle *title) +{ + TaskTitlePrivate *priv = title->priv; + if (!priv->window) + return; + g_signal_handlers_disconnect_by_func (priv->window, on_name_changed, title); + g_signal_handlers_disconnect_by_func (priv->window, on_icon_changed, title); + g_signal_handlers_disconnect_by_func (priv->window, on_state_changed, title); + priv->window = NULL; +} + +static void +on_active_window_changed (MatewnckScreen *screen, + MatewnckWindow *old_window, + TaskTitle *title) +{ + TaskTitlePrivate *priv; + MatewnckWindow *act_window; + MatewnckWindowType type = MATEWNCK_WINDOW_NORMAL; + + g_return_if_fail (TASK_IS_TITLE (title)); + priv = title->priv; + + act_window = matewnck_screen_get_active_window (screen); + if (act_window) + type = matewnck_window_get_window_type (act_window); + + if (MATEWNCK_IS_WINDOW (act_window) + && matewnck_window_is_skip_tasklist (act_window) + && type != MATEWNCK_WINDOW_DESKTOP) + return; + + if (type == MATEWNCK_WINDOW_DOCK + || type == MATEWNCK_WINDOW_SPLASHSCREEN + || type == MATEWNCK_WINDOW_MENU) + return; + + disconnect_window (title); + + if (!MATEWNCK_IS_WINDOW (act_window) + || matewnck_window_get_window_type (act_window) == MATEWNCK_WINDOW_DESKTOP) + { + if (priv->show_home_title) + { + gtk_label_set_text (GTK_LABEL (priv->label), _("Home")); + gtk_image_set_from_pixbuf (GTK_IMAGE (priv->button_image), + priv->quit_icon); + gtk_widget_set_tooltip_text (priv->button, + _("Log off, switch user, lock screen or power " + "down the computer")); + gtk_widget_set_tooltip_text (GTK_WIDGET (title), + _("Home")); gtk_widget_show (priv->box); + } + else + { + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL); + gtk_widget_set_tooltip_text (priv->button, NULL); + gtk_widget_set_tooltip_text (GTK_WIDGET (title), NULL); + gtk_widget_hide (priv->box); + } + } + else + { + gtk_label_set_text (GTK_LABEL (priv->label), + matewnck_window_get_name (act_window)); + gtk_image_set_from_stock (GTK_IMAGE (priv->button_image), + GTK_STOCK_CLOSE, GTK_ICON_SIZE_MENU); + + gtk_widget_set_tooltip_text (GTK_WIDGET (title), + matewnck_window_get_name (act_window)); + gtk_widget_set_tooltip_text (priv->button, _("Close window")); + + g_signal_connect (act_window, "name-changed", + G_CALLBACK (on_name_changed), title); + g_signal_connect (act_window, "icon-changed", + G_CALLBACK (on_icon_changed), title); + g_signal_connect_after (act_window, "state-changed", + G_CALLBACK (on_state_changed), title); + gtk_widget_show (priv->box); + priv->window = act_window; + } + + if (MATEWNCK_IS_WINDOW (act_window) + && !matewnck_window_is_maximized (act_window) + && (priv->show_home_title ? type != MATEWNCK_WINDOW_DESKTOP : 1)) + { + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL); + gtk_widget_hide (priv->box); + } + else if (!MATEWNCK_IS_WINDOW (act_window)) + { + if (task_list_get_desktop_visible (TASK_LIST (task_list_get_default ())) + && priv->show_home_title) + { + gtk_label_set_text (GTK_LABEL (priv->label), _("Home")); + gtk_image_set_from_pixbuf (GTK_IMAGE (priv->button_image), + priv->quit_icon); + gtk_widget_set_tooltip_text (priv->button, + _("Log off, switch user, lock screen or power " + "down the computer")); + gtk_widget_set_tooltip_text (GTK_WIDGET (title), + _("Home")); + gtk_widget_show (priv->box); + } + else + { + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_NORMAL); + gtk_widget_set_tooltip_text (priv->button, NULL); + gtk_widget_set_tooltip_text (GTK_WIDGET (title), NULL); + gtk_widget_hide (priv->box); + } + } + else + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_ACTIVE); + + gtk_widget_queue_draw (GTK_WIDGET (title)); +} + +static gboolean +on_button_release (GtkWidget *title, GdkEventButton *event) +{ + TaskTitlePrivate *priv; + MatewnckWindow *window; + GtkWidget *menu; + + g_return_val_if_fail (TASK_IS_TITLE (title), FALSE); + priv = TASK_TITLE_GET_PRIVATE (title); + + window = matewnck_screen_get_active_window (priv->screen); + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + if (event->button == 3) + { + if (matewnck_window_get_window_type (window) != MATEWNCK_WINDOW_DESKTOP) + { + menu = matewnck_action_menu_new (window); + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + event->button, event->time); + return TRUE; + } + } + else if (event->button == 1) + { + if (event->type == GDK_2BUTTON_PRESS && matewnck_window_is_maximized (window)) + { + matewnck_window_unmaximize (window); + } + } + + return FALSE; +} + + +static gboolean +on_expose (GtkWidget *eb, GdkEventExpose *event) +{ + + if (eb->state == GTK_STATE_ACTIVE) + gtk_paint_box (eb->style, eb->window, + eb->state, GTK_SHADOW_NONE, + NULL, eb, "button", + eb->allocation.x, eb->allocation.y, + eb->allocation.width, eb->allocation.height); + + + gtk_container_propagate_expose (GTK_CONTAINER (eb), + gtk_bin_get_child (GTK_BIN (eb)), + event); + return TRUE; +} + +/* GObject stuff */ +static void +task_title_finalize (GObject *object) +{ + TaskTitlePrivate *priv; + + priv = TASK_TITLE_GET_PRIVATE (object); + disconnect_window (TASK_TITLE (object)); + + g_object_unref (G_OBJECT (priv->quit_icon)); + + G_OBJECT_CLASS (task_title_parent_class)->finalize (object); +} + +static void +task_title_class_init (TaskTitleClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS (klass); + GtkWidgetClass *wid_class = GTK_WIDGET_CLASS (klass); + + obj_class->finalize = task_title_finalize; + wid_class->expose_event = on_expose; + + g_type_class_add_private (obj_class, sizeof (TaskTitlePrivate)); +} + +static void +task_title_init (TaskTitle *title) +{ + TaskTitlePrivate *priv; + MateConfClient *client; + GdkScreen *gdkscreen; + GtkIconTheme *theme; + GtkSettings *settings; + GdkPixbuf *pixbuf; + AtkObject *atk; + int width, height; + + priv = title->priv = TASK_TITLE_GET_PRIVATE (title); + + priv->screen = matewnck_screen_get_default (); + priv->window = NULL; + + client = mateconf_client_get_default (); + priv->show_home_title = mateconf_client_get_bool (client, + SHOW_HOME_TITLE_KEY, + NULL); + g_object_unref (client); + + gtk_widget_add_events (GTK_WIDGET (title), GDK_ALL_EVENTS_MASK); + + priv->align = gtk_alignment_new (0.0, 0.5, 1.0, 1.0); + gtk_alignment_set_padding (GTK_ALIGNMENT (priv->align), + 0, 0, 6, 6); + gtk_container_add (GTK_CONTAINER (title), priv->align); + + priv->box = gtk_hbox_new (FALSE, 2); + gtk_container_add (GTK_CONTAINER (priv->align), priv->box); + gtk_widget_set_no_show_all (priv->box, TRUE); + gtk_widget_show (priv->box); + + priv->label = gtk_label_new (_("Home")); + gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END); + gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5); + + PangoAttrList *attr_list = pango_attr_list_new (); + PangoAttribute *attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD); + pango_attr_list_insert (attr_list, attr); + gtk_label_set_attributes (GTK_LABEL (priv->label), attr_list); + + gtk_box_pack_start (GTK_BOX (priv->box), priv->label, TRUE, TRUE, 0); + gtk_widget_show (priv->label); + + priv->button = g_object_new (GTK_TYPE_EVENT_BOX, + "visible-window", FALSE, + "above-child", TRUE, + NULL); + gtk_box_pack_start (GTK_BOX (priv->box), priv->button, FALSE, FALSE, 0); + gtk_widget_show (priv->button); + + atk = gtk_widget_get_accessible (priv->button); + atk_object_set_name (atk, _("Close")); + atk_object_set_description (atk, _("Close current window.")); + atk_object_set_role (atk, ATK_ROLE_PUSH_BUTTON); + + g_signal_connect (priv->button, "button-release-event", + G_CALLBACK (on_close_clicked), title); + g_signal_connect (priv->button, "enter-notify-event", + G_CALLBACK (on_enter_notify), title); + g_signal_connect (priv->button, "leave-notify-event", + G_CALLBACK (on_leave_notify), title); + g_signal_connect (priv->button, "expose-event", + G_CALLBACK (on_button_expose), title); + + /* Load the quit icon. We have to do this in such a god-forsaken way + because of http://bugzilla.mate.org/show_bug.cgi?id=581359 and the + fact that we support as far back as GTK+ 2.12 (which never passes + FORCE_SIZE in GtkImage). The only way to guarantee icon size is to + load and scale it ourselves. We don't do this for all the other icons + in the source just because we know that this icon doesn't come in the + size we want. */ + gdkscreen = gtk_widget_get_screen (GTK_WIDGET (title)); + theme = gtk_icon_theme_get_for_screen (gdkscreen); + settings = gtk_settings_get_for_screen (gdkscreen); + if (!gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, +&width, &height)) + width = height = 16; + width = MIN(width, height); + pixbuf = gtk_icon_theme_load_icon (theme, "mate-logout", width, 0, NULL); + priv->quit_icon = gdk_pixbuf_scale_simple (pixbuf, width, width, + GDK_INTERP_BILINEAR); + g_object_unref (G_OBJECT (pixbuf)); + + priv->button_image = gtk_image_new_from_pixbuf (priv->quit_icon); + gtk_container_add (GTK_CONTAINER (priv->button), priv->button_image); + gtk_widget_show (priv->button_image); + + gtk_widget_set_tooltip_text (priv->button, + _("Log off, switch user, lock screen or power " + "down the computer")); + gtk_widget_set_tooltip_text (GTK_WIDGET (title), _("Home")); + + if (priv->show_home_title) + gtk_widget_set_state (GTK_WIDGET (title), GTK_STATE_ACTIVE); + else + gtk_widget_hide (priv->box); + + + gtk_widget_add_events (GTK_WIDGET (title), GDK_ALL_EVENTS_MASK); + + g_signal_connect (priv->screen, "active-window-changed", + G_CALLBACK (on_active_window_changed), title); + g_signal_connect (title, "button-press-event", + G_CALLBACK (on_button_release), NULL); +} + +GtkWidget * +task_title_new (void) + +{ + GtkWidget *title = NULL; + + title = g_object_new (TASK_TYPE_TITLE, + "border-width", 0, + "name", "tasklist-button", + "visible-window", FALSE, + NULL); + + return title; +} diff --git a/mate-window-picker-applet/task-title.h b/mate-window-picker-applet/task-title.h new file mode 100644 index 0000000..0a1d7ec --- /dev/null +++ b/mate-window-picker-applet/task-title.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#ifndef _TASK_TITLE_H_ +#define _TASK_TITLE_H_ + +#include <glib.h> +#include <glib/gi18n.h> +#include <gtk/gtk.h> + +#define TASK_TYPE_TITLE (task_title_get_type ()) + +#define TASK_TITLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + TASK_TYPE_TITLE, TaskTitle)) + +#define TASK_TITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\ + TASK_TYPE_TITLE, TaskTitleClass)) + +#define TASK_IS_TITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + TASK_TYPE_TITLE)) + +#define TASK_IS_TITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\ + TASK_TYPE_TITLE)) + +#define TASK_TITLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\ + TASK_TYPE_TITLE, TaskTitleClass)) + +typedef struct _TaskTitle TaskTitle; +typedef struct _TaskTitleClass TaskTitleClass; +typedef struct _TaskTitlePrivate TaskTitlePrivate; + +struct _TaskTitle +{ + GtkEventBox parent; + + TaskTitlePrivate *priv; +}; + +struct _TaskTitleClass +{ + GtkEventBoxClass parent_class; +}; + +GType task_title_get_type (void) G_GNUC_CONST; + +GtkWidget * task_title_new (void); + + +#endif /* _TASK_TITLE_H_ */ + diff --git a/maximus/Makefile.am b/maximus/Makefile.am new file mode 100644 index 0000000..67192c9 --- /dev/null +++ b/maximus/Makefile.am @@ -0,0 +1,51 @@ +bin_PROGRAMS=mate-maximus + +PKGDATADIR = $(datadir)/mate-maximus +DATADIR = $(datadir) +SYSCONFDIR = $(sysconfdir) +AM_CFLAGS = \ + $(MAXIMUS_DEPS_CFLAGS) \ + $(GCC_FLAGS) \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/tidy \ + -D_GNU_SOURCE \ + -DPKGDATADIR=\"$(PKGDATADIR)\" \ + -DDATADIR=\"$(DATADIR)\" \ + -DSYSCONFDIR=\"$(SYSCONFDIR)\" + +mate_maximus_LDADD = \ + $(MAXIMUS_DEPS_LIBS) + +mate_maximus_SOURCES = \ + main.c \ + eggaccelerators.c \ + eggaccelerators.h \ + maximus-app.c \ + maximus-app.h \ + maximus-bind.c \ + maximus-bind.h \ + tomboykeybinder.c \ + tomboykeybinder.h \ + xutils.c \ + xutils.h + +schemadir = $(sysconfdir)/mateconf/schemas +schema_DATA = maximus.schemas + +if MATECONF_SCHEMAS_INSTALL +install-data-local: + -MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) \ + $(MATECONFTOOL) --makefile-install-rule $(schema_DATA) +endif + +if MATECONF_SCHEMAS_INSTALL +uninstall-local: + -MATECONF_CONFIG_SOURCE=$(MATECONF_SCHEMA_CONFIG_SOURCE) \ + $(MATECONFTOOL) --makefile-uninstall-rule $(schema_DATA) +endif + +desktopdir=$(sysconfdir)/xdg/autostart +dist_desktop_DATA=mate-maximus-autostart.desktop + +EXTRA_DIST = $(schema_DATA) diff --git a/maximus/eggaccelerators.c b/maximus/eggaccelerators.c new file mode 100644 index 0000000..5410259 --- /dev/null +++ b/maximus/eggaccelerators.c @@ -0,0 +1,656 @@ +/* eggaccelerators.c + * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik + * Developed by Havoc Pennington, Tim Janik + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + +#include "eggaccelerators.h" + +#include <string.h> +#include <gdk/gdkx.h> +#include <gdk/gdkkeysyms.h> + +enum +{ + EGG_MODMAP_ENTRY_SHIFT = 0, + EGG_MODMAP_ENTRY_LOCK = 1, + EGG_MODMAP_ENTRY_CONTROL = 2, + EGG_MODMAP_ENTRY_MOD1 = 3, + EGG_MODMAP_ENTRY_MOD2 = 4, + EGG_MODMAP_ENTRY_MOD3 = 5, + EGG_MODMAP_ENTRY_MOD4 = 6, + EGG_MODMAP_ENTRY_MOD5 = 7, + EGG_MODMAP_ENTRY_LAST = 8 +}; + +#define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x)) + +typedef struct +{ + EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST]; + +} EggModmap; + +const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap); + +static inline gboolean +is_alt (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'a' || string[1] == 'A') && + (string[2] == 'l' || string[2] == 'L') && + (string[3] == 't' || string[3] == 'T') && + (string[4] == '>')); +} + +static inline gboolean +is_ctl (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'c' || string[1] == 'C') && + (string[2] == 't' || string[2] == 'T') && + (string[3] == 'l' || string[3] == 'L') && + (string[4] == '>')); +} + +static inline gboolean +is_modx (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'm' || string[1] == 'M') && + (string[2] == 'o' || string[2] == 'O') && + (string[3] == 'd' || string[3] == 'D') && + (string[4] >= '1' && string[4] <= '5') && + (string[5] == '>')); +} + +static inline gboolean +is_ctrl (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'c' || string[1] == 'C') && + (string[2] == 't' || string[2] == 'T') && + (string[3] == 'r' || string[3] == 'R') && + (string[4] == 'l' || string[4] == 'L') && + (string[5] == '>')); +} + +static inline gboolean +is_shft (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 's' || string[1] == 'S') && + (string[2] == 'h' || string[2] == 'H') && + (string[3] == 'f' || string[3] == 'F') && + (string[4] == 't' || string[4] == 'T') && + (string[5] == '>')); +} + +static inline gboolean +is_shift (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 's' || string[1] == 'S') && + (string[2] == 'h' || string[2] == 'H') && + (string[3] == 'i' || string[3] == 'I') && + (string[4] == 'f' || string[4] == 'F') && + (string[5] == 't' || string[5] == 'T') && + (string[6] == '>')); +} + +static inline gboolean +is_control (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'c' || string[1] == 'C') && + (string[2] == 'o' || string[2] == 'O') && + (string[3] == 'n' || string[3] == 'N') && + (string[4] == 't' || string[4] == 'T') && + (string[5] == 'r' || string[5] == 'R') && + (string[6] == 'o' || string[6] == 'O') && + (string[7] == 'l' || string[7] == 'L') && + (string[8] == '>')); +} + +static inline gboolean +is_release (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'r' || string[1] == 'R') && + (string[2] == 'e' || string[2] == 'E') && + (string[3] == 'l' || string[3] == 'L') && + (string[4] == 'e' || string[4] == 'E') && + (string[5] == 'a' || string[5] == 'A') && + (string[6] == 's' || string[6] == 'S') && + (string[7] == 'e' || string[7] == 'E') && + (string[8] == '>')); +} + +static inline gboolean +is_meta (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'm' || string[1] == 'M') && + (string[2] == 'e' || string[2] == 'E') && + (string[3] == 't' || string[3] == 'T') && + (string[4] == 'a' || string[4] == 'A') && + (string[5] == '>')); +} + +static inline gboolean +is_super (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 's' || string[1] == 'S') && + (string[2] == 'u' || string[2] == 'U') && + (string[3] == 'p' || string[3] == 'P') && + (string[4] == 'e' || string[4] == 'E') && + (string[5] == 'r' || string[5] == 'R') && + (string[6] == '>')); +} + +static inline gboolean +is_hyper (const gchar *string) +{ + return ((string[0] == '<') && + (string[1] == 'h' || string[1] == 'H') && + (string[2] == 'y' || string[2] == 'Y') && + (string[3] == 'p' || string[3] == 'P') && + (string[4] == 'e' || string[4] == 'E') && + (string[5] == 'r' || string[5] == 'R') && + (string[6] == '>')); +} + +/** + * egg_accelerator_parse_virtual: + * @accelerator: string representing an accelerator + * @accelerator_key: return location for accelerator keyval + * @accelerator_mods: return location for accelerator modifier mask + * + * Parses a string representing a virtual accelerator. The format + * looks like "<Control>a" or "<Shift><Alt>F1" or + * "<Release>z" (the last one is for key release). The parser + * is fairly liberal and allows lower or upper case, and also + * abbreviations such as "<Ctl>" and "<Ctrl>". + * + * If the parse fails, @accelerator_key and @accelerator_mods will + * be set to 0 (zero) and %FALSE will be returned. If the string contains + * only modifiers, @accelerator_key will be set to 0 but %TRUE will be + * returned. + * + * The virtual vs. concrete accelerator distinction is a relic of + * how the X Window System works; there are modifiers Mod2-Mod5 that + * can represent various keyboard keys (numlock, meta, hyper, etc.), + * the virtual modifier represents the keyboard key, the concrete + * modifier the actual Mod2-Mod5 bits in the key press event. + * + * Returns: %TRUE on success. + */ +gboolean +egg_accelerator_parse_virtual (const gchar *accelerator, + guint *accelerator_key, + EggVirtualModifierType *accelerator_mods) +{ + guint keyval; + GdkModifierType mods; + gint len; + gboolean bad_keyval; + + if (accelerator_key) + *accelerator_key = 0; + if (accelerator_mods) + *accelerator_mods = 0; + + g_return_val_if_fail (accelerator != NULL, FALSE); + + bad_keyval = FALSE; + + keyval = 0; + mods = 0; + len = strlen (accelerator); + while (len) + { + if (*accelerator == '<') + { + if (len >= 9 && is_release (accelerator)) + { + accelerator += 9; + len -= 9; + mods |= EGG_VIRTUAL_RELEASE_MASK; + } + else if (len >= 9 && is_control (accelerator)) + { + accelerator += 9; + len -= 9; + mods |= EGG_VIRTUAL_CONTROL_MASK; + } + else if (len >= 7 && is_shift (accelerator)) + { + accelerator += 7; + len -= 7; + mods |= EGG_VIRTUAL_SHIFT_MASK; + } + else if (len >= 6 && is_shft (accelerator)) + { + accelerator += 6; + len -= 6; + mods |= EGG_VIRTUAL_SHIFT_MASK; + } + else if (len >= 6 && is_ctrl (accelerator)) + { + accelerator += 6; + len -= 6; + mods |= EGG_VIRTUAL_CONTROL_MASK; + } + else if (len >= 6 && is_modx (accelerator)) + { + static const guint mod_vals[] = { + EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK, + EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK + }; + + len -= 6; + accelerator += 4; + mods |= mod_vals[*accelerator - '1']; + accelerator += 2; + } + else if (len >= 5 && is_ctl (accelerator)) + { + accelerator += 5; + len -= 5; + mods |= EGG_VIRTUAL_CONTROL_MASK; + } + else if (len >= 5 && is_alt (accelerator)) + { + accelerator += 5; + len -= 5; + mods |= EGG_VIRTUAL_ALT_MASK; + } + else if (len >= 6 && is_meta (accelerator)) + { + accelerator += 6; + len -= 6; + mods |= EGG_VIRTUAL_META_MASK; + } + else if (len >= 7 && is_hyper (accelerator)) + { + accelerator += 7; + len -= 7; + mods |= EGG_VIRTUAL_HYPER_MASK; + } + else if (len >= 7 && is_super (accelerator)) + { + accelerator += 7; + len -= 7; + mods |= EGG_VIRTUAL_SUPER_MASK; + } + else + { + gchar last_ch; + + last_ch = *accelerator; + while (last_ch && last_ch != '>') + { + last_ch = *accelerator; + accelerator += 1; + len -= 1; + } + } + } + else + { + keyval = gdk_keyval_from_name (accelerator); + + if (keyval == 0) + bad_keyval = TRUE; + + accelerator += len; + len -= len; + } + } + + if (accelerator_key) + *accelerator_key = gdk_keyval_to_lower (keyval); + if (accelerator_mods) + *accelerator_mods = mods; + + return !bad_keyval; +} + + +/** + * egg_virtual_accelerator_name: + * @accelerator_key: accelerator keyval + * @accelerator_mods: accelerator modifier mask + * @returns: a newly-allocated accelerator name + * + * Converts an accelerator keyval and modifier mask + * into a string parseable by egg_accelerator_parse_virtual(). + * For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK, + * this function returns "<Control>q". + * + * The caller of this function must free the returned string. + */ +gchar* +egg_virtual_accelerator_name (guint accelerator_key, + EggVirtualModifierType accelerator_mods) +{ + static const gchar text_release[] = "<Release>"; + static const gchar text_shift[] = "<Shift>"; + static const gchar text_control[] = "<Control>"; + static const gchar text_mod1[] = "<Alt>"; + static const gchar text_mod2[] = "<Mod2>"; + static const gchar text_mod3[] = "<Mod3>"; + static const gchar text_mod4[] = "<Mod4>"; + static const gchar text_mod5[] = "<Mod5>"; + static const gchar text_meta[] = "<Meta>"; + static const gchar text_super[] = "<Super>"; + static const gchar text_hyper[] = "<Hyper>"; + guint l; + gchar *keyval_name; + gchar *accelerator; + + accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK; + + keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key)); + if (!keyval_name) + keyval_name = ""; + + l = 0; + if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK) + l += sizeof (text_release) - 1; + if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK) + l += sizeof (text_shift) - 1; + if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK) + l += sizeof (text_control) - 1; + if (accelerator_mods & EGG_VIRTUAL_ALT_MASK) + l += sizeof (text_mod1) - 1; + if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK) + l += sizeof (text_mod2) - 1; + if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK) + l += sizeof (text_mod3) - 1; + if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK) + l += sizeof (text_mod4) - 1; + if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK) + l += sizeof (text_mod5) - 1; + if (accelerator_mods & EGG_VIRTUAL_META_MASK) + l += sizeof (text_meta) - 1; + if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK) + l += sizeof (text_hyper) - 1; + if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK) + l += sizeof (text_super) - 1; + l += strlen (keyval_name); + + accelerator = g_new (gchar, l + 1); + + l = 0; + accelerator[l] = 0; + if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK) + { + strcpy (accelerator + l, text_release); + l += sizeof (text_release) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK) + { + strcpy (accelerator + l, text_shift); + l += sizeof (text_shift) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK) + { + strcpy (accelerator + l, text_control); + l += sizeof (text_control) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_ALT_MASK) + { + strcpy (accelerator + l, text_mod1); + l += sizeof (text_mod1) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK) + { + strcpy (accelerator + l, text_mod2); + l += sizeof (text_mod2) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK) + { + strcpy (accelerator + l, text_mod3); + l += sizeof (text_mod3) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK) + { + strcpy (accelerator + l, text_mod4); + l += sizeof (text_mod4) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK) + { + strcpy (accelerator + l, text_mod5); + l += sizeof (text_mod5) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_META_MASK) + { + strcpy (accelerator + l, text_meta); + l += sizeof (text_meta) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK) + { + strcpy (accelerator + l, text_hyper); + l += sizeof (text_hyper) - 1; + } + if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK) + { + strcpy (accelerator + l, text_super); + l += sizeof (text_super) - 1; + } + + strcpy (accelerator + l, keyval_name); + + return accelerator; +} + +void +egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap, + EggVirtualModifierType virtual_mods, + GdkModifierType *concrete_mods) +{ + GdkModifierType concrete; + int i; + const EggModmap *modmap; + + g_return_if_fail (GDK_IS_KEYMAP (keymap)); + g_return_if_fail (concrete_mods != NULL); + + modmap = egg_keymap_get_modmap (keymap); + + /* Not so sure about this algorithm. */ + + concrete = 0; + i = 0; + while (i < EGG_MODMAP_ENTRY_LAST) + { + if (modmap->mapping[i] & virtual_mods) + concrete |= (1 << i); + + ++i; + } + + *concrete_mods = concrete; +} + +void +egg_keymap_virtualize_modifiers (GdkKeymap *keymap, + GdkModifierType concrete_mods, + EggVirtualModifierType *virtual_mods) +{ + GdkModifierType virtual; + int i; + const EggModmap *modmap; + + g_return_if_fail (GDK_IS_KEYMAP (keymap)); + g_return_if_fail (virtual_mods != NULL); + + modmap = egg_keymap_get_modmap (keymap); + + /* Not so sure about this algorithm. */ + + virtual = 0; + i = 0; + while (i < EGG_MODMAP_ENTRY_LAST) + { + if ((1 << i) & concrete_mods) + { + EggVirtualModifierType cleaned; + + cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK | + EGG_VIRTUAL_MOD3_MASK | + EGG_VIRTUAL_MOD4_MASK | + EGG_VIRTUAL_MOD5_MASK); + + if (cleaned != 0) + { + virtual |= cleaned; + } + else + { + /* Rather than dropping mod2->mod5 if not bound, + * go ahead and use the concrete names + */ + virtual |= modmap->mapping[i]; + } + } + + ++i; + } + + *virtual_mods = virtual; +} + +static void +reload_modmap (GdkKeymap *keymap, + EggModmap *modmap) +{ + XModifierKeymap *xmodmap; + int map_size; + int i; + + /* FIXME multihead */ + xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ()); + + memset (modmap->mapping, 0, sizeof (modmap->mapping)); + + /* there are 8 modifiers, and the first 3 are shift, shift lock, + * and control + */ + map_size = 8 * xmodmap->max_keypermod; + i = 3 * xmodmap->max_keypermod; + while (i < map_size) + { + /* get the key code at this point in the map, + * see if its keysym is one we're interested in + */ + int keycode = xmodmap->modifiermap[i]; + GdkKeymapKey *keys; + guint *keyvals; + int n_entries; + int j; + EggVirtualModifierType mask; + + keys = NULL; + keyvals = NULL; + n_entries = 0; + + gdk_keymap_get_entries_for_keycode (keymap, + keycode, + &keys, &keyvals, &n_entries); + + mask = 0; + j = 0; + while (j < n_entries) + { + if (keyvals[j] == GDK_Num_Lock) + mask |= EGG_VIRTUAL_NUM_LOCK_MASK; + else if (keyvals[j] == GDK_Scroll_Lock) + mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK; + else if (keyvals[j] == GDK_Meta_L || + keyvals[j] == GDK_Meta_R) + mask |= EGG_VIRTUAL_META_MASK; + else if (keyvals[j] == GDK_Hyper_L || + keyvals[j] == GDK_Hyper_R) + mask |= EGG_VIRTUAL_HYPER_MASK; + else if (keyvals[j] == GDK_Super_L || + keyvals[j] == GDK_Super_R) + mask |= EGG_VIRTUAL_SUPER_MASK; + else if (keyvals[j] == GDK_Mode_switch) + mask |= EGG_VIRTUAL_MODE_SWITCH_MASK; + + ++j; + } + + /* Mod1Mask is 1 << 3 for example, i.e. the + * fourth modifier, i / keyspermod is the modifier + * index + */ + modmap->mapping[i/xmodmap->max_keypermod] |= mask; + + g_free (keyvals); + g_free (keys); + + ++i; + } + + /* Add in the not-really-virtual fixed entries */ + modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK; + modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK; + + XFreeModifiermap (xmodmap); +} + +const EggModmap* +egg_keymap_get_modmap (GdkKeymap *keymap) +{ + EggModmap *modmap; + + /* This is all a hack, much simpler when we can just + * modify GDK directly. + */ + + modmap = g_object_get_data (G_OBJECT (keymap), + "egg-modmap"); + + if (modmap == NULL) + { + modmap = g_new0 (EggModmap, 1); + + /* FIXME modify keymap change events with an event filter + * and force a reload if we get one + */ + + reload_modmap (keymap, modmap); + + g_object_set_data_full (G_OBJECT (keymap), + "egg-modmap", + modmap, + g_free); + } + + g_assert (modmap != NULL); + + return modmap; +} diff --git a/maximus/eggaccelerators.h b/maximus/eggaccelerators.h new file mode 100644 index 0000000..18e3ae0 --- /dev/null +++ b/maximus/eggaccelerators.h @@ -0,0 +1,86 @@ +/* eggaccelerators.h + * Copyright (C) 2002 Red Hat, Inc. + * Developed by Havoc Pennington + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ + +#ifndef __EGG_ACCELERATORS_H__ +#define __EGG_ACCELERATORS_H__ + +#include <gtk/gtkaccelgroup.h> +#include <gdk/gdk.h> + +G_BEGIN_DECLS + +/* Where a value is also in GdkModifierType we coincide, + * otherwise we don't overlap. + */ +typedef enum +{ + EGG_VIRTUAL_SHIFT_MASK = 1 << 0, + EGG_VIRTUAL_LOCK_MASK = 1 << 1, + EGG_VIRTUAL_CONTROL_MASK = 1 << 2, + + EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */ + + EGG_VIRTUAL_MOD2_MASK = 1 << 4, + EGG_VIRTUAL_MOD3_MASK = 1 << 5, + EGG_VIRTUAL_MOD4_MASK = 1 << 6, + EGG_VIRTUAL_MOD5_MASK = 1 << 7, + +#if 0 + GDK_BUTTON1_MASK = 1 << 8, + GDK_BUTTON2_MASK = 1 << 9, + GDK_BUTTON3_MASK = 1 << 10, + GDK_BUTTON4_MASK = 1 << 11, + GDK_BUTTON5_MASK = 1 << 12, + /* 13, 14 are used by Xkb for the keyboard group */ +#endif + + EGG_VIRTUAL_META_MASK = 1 << 24, + EGG_VIRTUAL_SUPER_MASK = 1 << 25, + EGG_VIRTUAL_HYPER_MASK = 1 << 26, + EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27, + EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28, + EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29, + + /* Also in GdkModifierType */ + EGG_VIRTUAL_RELEASE_MASK = 1 << 30, + + /* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3 + * 7 f 0 0 0 0 f f + */ + EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff + +} EggVirtualModifierType; + +gboolean egg_accelerator_parse_virtual (const gchar *accelerator, + guint *accelerator_key, + EggVirtualModifierType *accelerator_mods); +void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap, + EggVirtualModifierType virtual_mods, + GdkModifierType *concrete_mods); +void egg_keymap_virtualize_modifiers (GdkKeymap *keymap, + GdkModifierType concrete_mods, + EggVirtualModifierType *virtual_mods); + +gchar* egg_virtual_accelerator_name (guint accelerator_key, + EggVirtualModifierType accelerator_mods); + +G_END_DECLS + + +#endif /* __EGG_ACCELERATORS_H__ */ diff --git a/maximus/main.c b/maximus/main.c new file mode 100644 index 0000000..4855aac --- /dev/null +++ b/maximus/main.c @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#include <glib.h> + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + +#include <gtk/gtk.h> +#include <gdk/gdkx.h> + +#include <libmateui/libmateui.h> +#include <unique/unique.h> + +#include "maximus-app.h" + +static gboolean on_sess_save (MateClient *client, + gint arg1, + MateSaveStyle arg2, + gboolean arg3, + MateInteractStyle arg4, + gboolean arg5); + +static gboolean no_restart = FALSE; +static gboolean version = FALSE; +gboolean no_maximize = FALSE; + +GOptionEntry entries[] = +{ + { + "no-restart", 's', + 0, G_OPTION_ARG_NONE, + &no_restart, + "Do not automatically restart (standalone)", NULL + }, + { + "version", 'v', + 0, G_OPTION_ARG_NONE, + &version, + "Prints the version number", NULL + }, + { + "no-maximize", 'm', + 0, G_OPTION_ARG_NONE, + &no_maximize, + "Do not automatically maximize every window", NULL + }, + { + NULL + } +}; + +gint main (gint argc, gchar *argv[]) +{ + UniqueApp *unique; + MaximusApp *app; + MateClient *client; + GOptionContext *context; + gchar *exec[] = {"maximus"}; + + g_thread_init (NULL); + g_set_application_name ("Maximus"); + + gtk_init (&argc, &argv); + + unique = unique_app_new ("com.canonical.Maximus", NULL); + + if (unique_app_is_running (unique)) + { + return 0; + } + + context = g_option_context_new ("- Maximus"); + g_option_context_add_main_entries (context, entries, "maximus"); + g_option_context_add_group (context, gtk_get_option_group (TRUE)); + g_option_context_parse (context, &argc, &argv, NULL); + g_option_context_free(context); + + if (!no_restart) + { + mate_program_init ("mate-maximus", "1.3.0", LIBMATEUI_MODULE, argc, argv, + MATE_PARAM_NONE, NULL); + + client = mate_master_client (); + mate_client_set_restart_command (client, 1, exec); + mate_client_set_restart_style (client, MATE_RESTART_IMMEDIATELY); + + g_signal_connect (client, "save-yourself", + G_CALLBACK (on_sess_save), NULL); + } + + gdk_error_trap_push (); + app = maximus_app_get_default (); + gdk_error_trap_pop (); + + gtk_main (); + + return EXIT_SUCCESS; +} + +static gboolean on_sess_save (MateClient *client, + gint arg1, + MateSaveStyle arg2, + gboolean arg3, + MateInteractStyle arg4, + gboolean arg5) +{ + return TRUE; +} diff --git a/maximus/mate-maximus-autostart.desktop b/maximus/mate-maximus-autostart.desktop new file mode 100644 index 0000000..c2c85a2 --- /dev/null +++ b/maximus/mate-maximus-autostart.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Maximus Window Management +Comment=Controls the displaying of windows +Icon=preferences-system-windows +Exec=mate-maximus +Terminal=false +Type=Application +Categories= +OnlyShowIn=MATE; +X-MATE-Autostart-Phase=Desktop +X-MATE-Autostart-Notify=false diff --git a/maximus/maximus-app.c b/maximus/maximus-app.c new file mode 100644 index 0000000..be9a2fc --- /dev/null +++ b/maximus/maximus-app.c @@ -0,0 +1,577 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#include <stdio.h> +#include <string.h> +#include <unistd.h> + +#include <gtk/gtk.h> +#include <gdk/gdkx.h> + +#include <mateconf/mateconf.h> +#include <mateconf/mateconf-client.h> + +#include "maximus-app.h" +#include "maximus-bind.h" +#include "xutils.h" + +G_DEFINE_TYPE (MaximusApp, maximus_app, G_TYPE_OBJECT); + +#define MAXIMUS_APP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ + MAXIMUS_TYPE_APP, \ + MaximusAppPrivate)) + +/* Gconf keys */ +#define APP_PATH "/apps/maximus" +#define APP_EXCLUDE_CLASS APP_PATH "/exclude_class" +#define APP_UNDECORATE APP_PATH "/undecorate" +#define APP_NO_MAXIMIZE APP_PATH "/no_maximize" + +/* A set of default exceptions */ +static gchar *default_exclude_classes[] = +{ + "Apport-gtk", + "Bluetooth-properties", + "Bluetooth-wizard", + "Download", /* Firefox Download Window */ + "Ekiga", + "Extension", /* Firefox Add-Ons/Extension Window */ + "Gcalctool", + "Gimp", + "Global", /* Firefox Error Console Window */ + "Mate-dictionary", + "Mate-language-selector", + "Mate-nettool", + "Mate-volume-control", + "Kiten", + "Kmplot", + "Nm-editor", + "Pidgin", + "Polkit-mate-authorization", + "Update-manager", + "Skype", + "Toplevel", /* Firefox "Clear Private Data" Window */ + "Transmission" +}; + +struct _MaximusAppPrivate +{ + MaximusBind *bind; + MatewnckScreen *screen; + + GSList *exclude_class_list; + gboolean undecorate; + gboolean no_maximize; +}; + +static GQuark was_decorated = 0; + +/* <TAKEN FROM GDK> */ +typedef struct { + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; +} MotifWmHints, MwmHints; + +#define MWM_HINTS_FUNCTIONS (1L << 0) +#define MWM_HINTS_DECORATIONS (1L << 1) +#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS" + +static gboolean +matewnck_window_is_decorated (MatewnckWindow *window) +{ + GdkDisplay *display = gdk_display_get_default(); + Atom hints_atom = None; + guchar *data = NULL; + MotifWmHints *hints = NULL; + Atom type = None; + gint format; + gulong nitems; + gulong bytes_after; + gboolean retval; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + hints_atom = gdk_x11_get_xatom_by_name_for_display (display, + _XA_MOTIF_WM_HINTS); + + XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), + matewnck_window_get_xid (window), + hints_atom, 0, sizeof (MotifWmHints)/sizeof (long), + False, AnyPropertyType, &type, &format, &nitems, + &bytes_after, &data); + + if (type == None || !data) return TRUE; + + hints = (MotifWmHints *)data; + + retval = hints->decorations; + + if (data) + XFree (data); + + return retval; +} + +static void +gdk_window_set_mwm_hints (MatewnckWindow *window, + MotifWmHints *new_hints) +{ + GdkDisplay *display = gdk_display_get_default(); + Atom hints_atom = None; + guchar *data = NULL; + MotifWmHints *hints = NULL; + Atom type = None; + gint format; + gulong nitems; + gulong bytes_after; + + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + g_return_if_fail (GDK_IS_DISPLAY (display)); + + hints_atom = gdk_x11_get_xatom_by_name_for_display (display, + _XA_MOTIF_WM_HINTS); + + XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), + matewnck_window_get_xid (window), + hints_atom, 0, sizeof (MotifWmHints)/sizeof (long), + False, AnyPropertyType, &type, &format, &nitems, + &bytes_after, &data); + + if (type != hints_atom || !data) + hints = new_hints; + else + { + hints = (MotifWmHints *)data; + + if (new_hints->flags & MWM_HINTS_FUNCTIONS) + { + hints->flags |= MWM_HINTS_FUNCTIONS; + hints->functions = new_hints->functions; + } + if (new_hints->flags & MWM_HINTS_DECORATIONS) + { + hints->flags |= MWM_HINTS_DECORATIONS; + hints->decorations = new_hints->decorations; + } + } + + _matewnck_error_trap_push (); + XChangeProperty (GDK_DISPLAY_XDISPLAY (display), + matewnck_window_get_xid (window), + hints_atom, hints_atom, 32, PropModeReplace, + (guchar *)hints, sizeof (MotifWmHints)/sizeof (long)); + gdk_flush (); + _matewnck_error_trap_pop (); + + if (data) + XFree (data); +} + +static void +_window_set_decorations (MatewnckWindow *window, + GdkWMDecoration decorations) +{ + MotifWmHints *hints; + + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + /* initialize to zero to avoid writing uninitialized data to socket */ + hints = g_slice_new0 (MotifWmHints); + hints->flags = MWM_HINTS_DECORATIONS; + hints->decorations = decorations; + + gdk_window_set_mwm_hints (window, hints); + + g_slice_free (MotifWmHints, hints); +} + +/* </TAKEN FROM GDK> */ + +gboolean +window_is_too_large_for_screen (MatewnckWindow *window) +{ + static GdkScreen *screen = NULL; + gint x=0, y=0, w=0, h=0; + + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + if (screen == NULL) + screen = gdk_screen_get_default (); + + matewnck_window_get_geometry (window, &x, &y, &w, &h); + + /* some wiggle room */ + return (screen && + (w > (gdk_screen_get_width (screen) + 20) || + h > (gdk_screen_get_height (screen)+20))); +} + +static gboolean +on_window_maximised_changed (MatewnckWindow *window) +{ + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + if (window_is_too_large_for_screen (window)) + { + _window_set_decorations (window, 1); + matewnck_window_unmaximize (window); + } + else + { + _window_set_decorations (window, 0); + } + return FALSE; +} + +static gboolean +enable_window_decorations (MatewnckWindow *window) +{ + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), FALSE); + + _window_set_decorations (window, 1); + return FALSE; +} + +static void +on_window_state_changed (MatewnckWindow *window, + MatewnckWindowState change_mask, + MatewnckWindowState new_state, + MaximusApp *app) +{ + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + + if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "exclude"))==1) + return; + + if (change_mask & MATEWNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY + || change_mask & MATEWNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY) + { + if (matewnck_window_is_maximized (window) && app->priv->undecorate) + { + g_idle_add ((GSourceFunc)on_window_maximised_changed, window); + } + else + { + g_idle_add ((GSourceFunc)enable_window_decorations, window); + } + } +} + +static gboolean +is_excluded (MaximusApp *app, MatewnckWindow *window) +{ + MaximusAppPrivate *priv; + MatewnckWindowType type; + MatewnckWindowActions actions; + gchar *res_name; + gchar *class_name; + GSList *c; + gint i; + + g_return_val_if_fail (MAXIMUS_IS_APP (app), TRUE); + g_return_val_if_fail (MATEWNCK_IS_WINDOW (window), TRUE); + priv = app->priv; + + type = matewnck_window_get_window_type (window); + if (type != MATEWNCK_WINDOW_NORMAL) + return TRUE; + + if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (window), "exclude"))==1) + return TRUE; + + /* Ignore if the window is already fullscreen */ + if (matewnck_window_is_fullscreen (window)) + { + g_debug ("Excluding (is fullscreen): %s\n",matewnck_window_get_name (window)); + return TRUE; + } + + /* Make sure the window supports maximising */ + actions = matewnck_window_get_actions (window); + if (actions & MATEWNCK_WINDOW_ACTION_RESIZE + && actions & MATEWNCK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY + && actions & MATEWNCK_WINDOW_ACTION_MAXIMIZE_VERTICALLY + && actions & MATEWNCK_WINDOW_ACTION_MAXIMIZE) + ; /* Is good to maximise */ + else + return TRUE; + + _matewnck_get_wmclass (matewnck_window_get_xid (window), &res_name, &class_name); + + g_debug ("Window opened: res_name=%s -- class_name=%s", res_name, class_name); + + /* Check internal list of class_ids */ + for (i = 0; i < G_N_ELEMENTS (default_exclude_classes); i++) + { + if ((class_name && default_exclude_classes[i] + && strstr (class_name, default_exclude_classes[i])) + || (res_name && default_exclude_classes[i] && strstr (res_name, + default_exclude_classes[i]))) + { + g_debug ("Excluding: %s\n", matewnck_window_get_name (window)); + return TRUE; + } + } + + /* Check user list */ + for (c = priv->exclude_class_list; c; c = c->next) + { + if ((class_name && c->data && strstr (class_name, c->data)) + || (res_name && c->data && strstr (res_name, c->data) )) + { + g_debug ("Excluding: %s\n", matewnck_window_get_name (window)); + return TRUE; + } + } + + g_free (res_name); + g_free (class_name); + return FALSE; +} + +extern gboolean no_maximize; + +static void +on_window_opened (MatewnckScreen *screen, + MatewnckWindow *window, + MaximusApp *app) +{ + MaximusAppPrivate *priv; + MatewnckWindowType type; + gint exclude = 0; + + g_return_if_fail (MAXIMUS_IS_APP (app)); + g_return_if_fail (MATEWNCK_IS_WINDOW (window)); + priv = app->priv; + + type = matewnck_window_get_window_type (window); + if (type != MATEWNCK_WINDOW_NORMAL) + return; + + /* Ignore undecorated windows */ + exclude = matewnck_window_is_decorated (window) ? 0 : 1; + if (matewnck_window_is_maximized (window)) + exclude = 0; + g_object_set_data (G_OBJECT (window), "exclude", GINT_TO_POINTER (exclude)); + + if (is_excluded (app, window)) + { + g_signal_connect (window, "state-changed", + G_CALLBACK (on_window_state_changed), app); + return; + } + + if (no_maximize || priv->no_maximize) + { + if (matewnck_window_is_maximized(window)) + { + _window_set_decorations (window, 0); + gdk_flush (); + } + g_signal_connect (window, "state-changed", + G_CALLBACK (on_window_state_changed), app); + return; + } + + if (priv->undecorate) + { + /* Only undecorate right now if the window is smaller than the screen */ + if (!window_is_too_large_for_screen (window)) + { + _window_set_decorations (window, 0); + gdk_flush (); + } + } + + matewnck_window_maximize (window); + + g_signal_connect (window, "state-changed", + G_CALLBACK (on_window_state_changed), app); +} + +static void +on_app_no_maximize_changed (MateConfClient *client, + guint cid, + MateConfEntry *entry, + MaximusApp *app) +{ + MaximusAppPrivate *priv; + MateConfValue* value; + + g_return_if_fail (MAXIMUS_IS_APP (app)); + priv = app->priv; + + if (entry == NULL) + { + priv->no_maximize = FALSE; + } + else + { + value = mateconf_entry_get_value(entry); + priv->no_maximize = value != NULL && mateconf_value_get_bool(value); + } +} + +/* MateConf Callbacks */ +static void +on_exclude_class_changed (MateConfClient *client, + guint cid, + MateConfEntry *entry, + MaximusApp *app) +{ + MaximusAppPrivate *priv; + + g_return_if_fail (MAXIMUS_IS_APP (app)); + priv = app->priv; + + if (priv->exclude_class_list) + g_slist_free (priv->exclude_class_list); + + priv->exclude_class_list= mateconf_client_get_list (client, + APP_EXCLUDE_CLASS, + MATECONF_VALUE_STRING, + NULL); +} + +static gboolean +show_desktop (MatewnckScreen *screen) +{ + g_return_val_if_fail (MATEWNCK_IS_SCREEN (screen), FALSE); + + matewnck_screen_toggle_showing_desktop (screen, TRUE); + return FALSE; +} + +static void +on_app_undecorate_changed (MateConfClient *client, + guint cid, + MateConfEntry *entry, + MaximusApp *app) +{ + MaximusAppPrivate *priv; + GList *windows, *w; + + g_return_if_fail (MAXIMUS_IS_APP (app)); + priv = app->priv; + g_return_if_fail (MATEWNCK_IS_SCREEN (priv->screen)); + + priv->undecorate = mateconf_client_get_bool (client, + APP_UNDECORATE, + NULL); + g_debug ("%s\n", priv->undecorate ? "Undecorating" : "Decorating"); + + windows = matewnck_screen_get_windows (priv->screen); + for (w = windows; w; w = w->next) + { + MatewnckWindow *window = w->data; + + if (!MATEWNCK_IS_WINDOW (window)) + continue; + + if (no_maximize || priv->no_maximize) + { + if (!matewnck_window_is_maximized(window)) + continue; + } + + if (!is_excluded (app, window)) + { + gdk_error_trap_push (); + _window_set_decorations (window, priv->undecorate ? 0 : 1); + matewnck_window_unmaximize (window); + matewnck_window_maximize (window); + gdk_flush (); + gdk_error_trap_pop (); + + sleep (1); + } + } + /* We want the user to be left on the launcher/desktop after switching modes*/ + g_timeout_add_seconds (1, (GSourceFunc)show_desktop, priv->screen); +} + + +/* GObject stuff */ +static void +maximus_app_class_init (MaximusAppClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (obj_class, sizeof (MaximusAppPrivate)); +} + +static void +maximus_app_init (MaximusApp *app) +{ + MaximusAppPrivate *priv; + MateConfClient *client = mateconf_client_get_default (); + MatewnckScreen *screen; + + priv = app->priv = MAXIMUS_APP_GET_PRIVATE (app); + + priv->bind = maximus_bind_get_default (); + + was_decorated = g_quark_from_static_string ("was-decorated"); + + mateconf_client_add_dir (client, APP_PATH, MATECONF_CLIENT_PRELOAD_NONE, NULL); + + priv->exclude_class_list= mateconf_client_get_list (client, + APP_EXCLUDE_CLASS, + MATECONF_VALUE_STRING, + NULL); + mateconf_client_notify_add (client, APP_EXCLUDE_CLASS, + (MateConfClientNotifyFunc)on_exclude_class_changed, + app, NULL, NULL); + + priv->undecorate = mateconf_client_get_bool(client, + APP_UNDECORATE, + NULL); + mateconf_client_notify_add (client, APP_UNDECORATE, + (MateConfClientNotifyFunc)on_app_undecorate_changed, + app, NULL, NULL); + + + priv->screen = screen = matewnck_screen_get_default (); + g_signal_connect (screen, "window-opened", + G_CALLBACK (on_window_opened), app); + + priv->no_maximize = mateconf_client_get_bool(client, + APP_NO_MAXIMIZE, + NULL); + g_print ("no maximize: %s\n", priv->no_maximize ? "true" : "false"); + mateconf_client_notify_add (client, APP_NO_MAXIMIZE, + (MateConfClientNotifyFunc)on_app_no_maximize_changed, + app, NULL, NULL); +} + +MaximusApp * +maximus_app_get_default (void) + +{ + static MaximusApp *app = NULL; + + if (!app) + app = g_object_new (MAXIMUS_TYPE_APP, + NULL); + + return app; +} diff --git a/maximus/maximus-app.h b/maximus/maximus-app.h new file mode 100644 index 0000000..8eb64f7 --- /dev/null +++ b/maximus/maximus-app.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#ifndef _MAXIMUS_APP_H_ +#define _MAXIMUS_APP_H_ + +#include <glib-object.h> +#include <gtk/gtk.h> +#include <libmatewnck/libmatewnck.h> + +#define MAXIMUS_TYPE_APP (maximus_app_get_type ()) + +#define MAXIMUS_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + MAXIMUS_TYPE_APP, MaximusApp)) + +#define MAXIMUS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\ + MAXIMUS_TYPE_APP, MaximusAppClass)) + +#define MAXIMUS_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + MAXIMUS_TYPE_APP)) + +#define MAXIMUS_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\ + MAXIMUS_TYPE_APP)) + +#define MAXIMUS_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\ + MAXIMUS_TYPE_APP, MaximusAppClass)) + +typedef struct _MaximusApp MaximusApp; +typedef struct _MaximusAppClass MaximusAppClass; +typedef struct _MaximusAppPrivate MaximusAppPrivate; + +struct _MaximusApp +{ + GObject parent; + + MaximusAppPrivate *priv; +}; + +struct _MaximusAppClass +{ + GObjectClass parent_class; +}; + +GType maximus_app_get_type (void) G_GNUC_CONST; + +MaximusApp * maximus_app_get_default (void); + + +#endif /* _MAXIMUS_APP_H_ */ + diff --git a/maximus/maximus-bind.c b/maximus/maximus-bind.c new file mode 100644 index 0000000..cbbcf2e --- /dev/null +++ b/maximus/maximus-bind.c @@ -0,0 +1,501 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#include <stdio.h> +#include <string.h> + +#include <gtk/gtk.h> +#include <gdk/gdkx.h> + +#include <gdk/gdkkeysyms.h> + +#include <mateconf/mateconf.h> +#include <mateconf/mateconf-client.h> + +#include <libmatewnck/libmatewnck.h> + +#include <X11/Xlib.h> +#include <X11/Xresource.h> +#include <X11/Xutil.h> +#include <X11/extensions/XTest.h> +#include <X11/keysymdef.h> +#include <X11/keysym.h> + +#include <fakekey/fakekey.h> + +#include "maximus-bind.h" + +#include "tomboykeybinder.h" +#include "eggaccelerators.h" + +G_DEFINE_TYPE (MaximusBind, maximus_bind, G_TYPE_OBJECT); + +#define MAXIMUS_BIND_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj),\ + MAXIMUS_TYPE_BIND, \ + MaximusBindPrivate)) + +#define KEY_RELEASE_TIMEOUT 300 +#define STATE_CHANGED_SLEEP 0.5 + +/* Gconf keys */ +#define BIND_PATH "/apps/maximus" +#define BIND_EXCLUDE_CLASS BIND_PATH "/binding" + +#define SYSRULESDIR SYSCONFDIR"/maximus" + +struct _MaximusBindPrivate +{ + FakeKey *fk; + MatewnckScreen *screen; + + gchar *binding; + + GList *rules; +}; + +typedef struct +{ + gchar *wm_class; + gchar *fullscreen; + gchar *unfullscreen; +} MaximusRule; + +static const gchar * +get_fullscreen_keystroke (GList *rules, MatewnckWindow *window) +{ + MatewnckClassGroup *group; + const gchar *class_name; + GList *r; + + group = matewnck_window_get_class_group (window); + class_name = matewnck_class_group_get_name (group); + + g_debug ("Searching rules for %s:\n", matewnck_window_get_name (window)); + + for (r = rules; r; r = r->next) + { + MaximusRule *rule = r->data; + + g_debug ("\t%s ?= %s", class_name, rule->wm_class); + + if (class_name && rule->wm_class && strstr (class_name, rule->wm_class)) + { + g_debug ("\tYES!\n"); + return rule->fullscreen; + } + g_debug ("\tNO!\n"); + } + + return NULL; +} + +static const gchar * +get_unfullscreen_keystroke (GList *rules, MatewnckWindow *window) +{ + MatewnckClassGroup *group; + const gchar *class_name; + GList *r; + + group = matewnck_window_get_class_group (window); + class_name = matewnck_class_group_get_name (group); + + for (r = rules; r; r = r->next) + { + MaximusRule *rule = r->data; + + if (class_name && rule->wm_class && strstr (class_name, rule->wm_class)) + { + return rule->unfullscreen; + } + } + + return NULL; +} +static gboolean +real_fullscreen (MaximusBind *bind) +{ + MaximusBindPrivate *priv; + GdkDisplay *display; + MatewnckWindow *active; + const gchar *keystroke; + + priv = bind->priv; + + display = gdk_display_get_default (); + active = matewnck_screen_get_active_window (priv->screen); + + if (!MATEWNCK_IS_WINDOW (active) + || matewnck_window_get_window_type (active) != MATEWNCK_WINDOW_NORMAL) + return FALSE; + + keystroke = get_fullscreen_keystroke (priv->rules, active); + + if (keystroke) + { + guint keysym = 0; + EggVirtualModifierType modifiers = 0; + + if (egg_accelerator_parse_virtual (keystroke, &keysym, &modifiers)) + { + guint mods = 0; + + if (modifiers & EGG_VIRTUAL_SHIFT_MASK) + mods |= FAKEKEYMOD_SHIFT; + if (modifiers & EGG_VIRTUAL_CONTROL_MASK) + mods |= FAKEKEYMOD_CONTROL; + if (modifiers & EGG_VIRTUAL_ALT_MASK) + mods |= FAKEKEYMOD_ALT; + if (modifiers & EGG_VIRTUAL_META_MASK) + mods |= FAKEKEYMOD_META; + + g_debug ("Sending fullscreen special event: %s = %d %d", + keystroke, keysym, mods); + fakekey_press_keysym (priv->fk, keysym, mods); + fakekey_release (priv->fk); + + return FALSE; + } + } + + if (!matewnck_window_is_fullscreen (active)) + { + g_debug ("Sending fullscreen F11 event"); + fakekey_press_keysym (priv->fk, XK_F11, 0); + fakekey_release (priv->fk); + } + + sleep (STATE_CHANGED_SLEEP); + + if (!matewnck_window_is_fullscreen (active)) + { + g_debug ("Forcing fullscreen matewnck event"); + matewnck_window_set_fullscreen (active, TRUE); + } + + return FALSE; +} + +static void +fullscreen (MaximusBind *bind, MatewnckWindow *window) +{ + MaximusBindPrivate *priv; + + priv = bind->priv; + + g_timeout_add (KEY_RELEASE_TIMEOUT, (GSourceFunc)real_fullscreen, bind); +} + +static gboolean +real_unfullscreen (MaximusBind *bind) +{ + MaximusBindPrivate *priv; + GdkDisplay *display; + MatewnckWindow *active; + const gchar *keystroke; + + priv = bind->priv; + + display = gdk_display_get_default (); + active = matewnck_screen_get_active_window (priv->screen); + + if (!MATEWNCK_IS_WINDOW (active) + || matewnck_window_get_window_type (active) != MATEWNCK_WINDOW_NORMAL) + return FALSE; + + keystroke = get_unfullscreen_keystroke (priv->rules, active); + + if (keystroke) + { + guint keysym = 0; + EggVirtualModifierType modifiers = 0; + + if (egg_accelerator_parse_virtual (keystroke, &keysym, &modifiers)) + { + guint mods = 0; + + if (modifiers & EGG_VIRTUAL_SHIFT_MASK) + mods |= FAKEKEYMOD_SHIFT; + if (modifiers & EGG_VIRTUAL_CONTROL_MASK) + mods |= FAKEKEYMOD_CONTROL; + if (modifiers & EGG_VIRTUAL_ALT_MASK) + mods |= FAKEKEYMOD_ALT; + if (modifiers & EGG_VIRTUAL_META_MASK) + mods |= FAKEKEYMOD_META; + + g_debug ("Sending fullscreen special event: %s = %d %d", + keystroke, keysym, mods); + fakekey_press_keysym (priv->fk, keysym, mods); + fakekey_release (priv->fk); + + return FALSE; + } + } + if (matewnck_window_is_fullscreen (active)) + { + g_debug ("Sending un-fullscreen F11 event"); + fakekey_press_keysym (priv->fk, XK_F11, 0); + fakekey_release (priv->fk); + } + + sleep (STATE_CHANGED_SLEEP); + + if (matewnck_window_is_fullscreen (active)) + { + g_debug ("Forcing un-fullscreen matewnck event"); + matewnck_window_set_fullscreen (active, FALSE); + } + + return FALSE; +} + +static void +unfullscreen (MaximusBind *bind, MatewnckWindow *window) +{ + MaximusBindPrivate *priv; + + priv = bind->priv; + + g_timeout_add (KEY_RELEASE_TIMEOUT, (GSourceFunc)real_unfullscreen, bind); +} + + +static void +on_binding_activated (gchar *keystring, MaximusBind *bind) +{ + MaximusBindPrivate *priv; + MatewnckWindow *active; + + g_return_if_fail (MAXIMUS_IS_BIND (bind)); + priv = bind->priv; + + active = matewnck_screen_get_active_window (priv->screen); + + if (matewnck_window_get_window_type (active) != MATEWNCK_WINDOW_NORMAL) + return; + + if (matewnck_window_is_fullscreen (active)) + { + unfullscreen (bind, active); + } + else + { + fullscreen (bind, active); + } +} + +/* Callbacks */ +static gboolean +binding_is_valid (const gchar *binding) +{ + gboolean retval = TRUE; + + if (!binding || strlen (binding) < 1 || strcmp (binding, "disabled") == 0) + retval = FALSE; + + return retval; +} + +static void +on_binding_changed (MateConfClient *client, + guint cid, + MateConfEntry *entry, + MaximusBind *bind) +{ + MaximusBindPrivate *priv; + + g_return_if_fail (MAXIMUS_IS_BIND (bind)); + priv = bind->priv; + + if (binding_is_valid (priv->binding)) + tomboy_keybinder_unbind (priv->binding, + (TomboyBindkeyHandler)on_binding_changed); + g_free (priv->binding); + + priv->binding = mateconf_client_get_string (client, + BIND_EXCLUDE_CLASS, + NULL); + + if (binding_is_valid (priv->binding)) + tomboy_keybinder_bind (priv->binding, + (TomboyBindkeyHandler)on_binding_activated, + bind); + + g_print ("Binding changed: %s\n", priv->binding); +} + + +/* GObject stuff */ +static void +create_rule (MaximusBind *bind, const gchar *filename) +{ +#define RULE_GROUP "Fullscreening" +#define RULE_WMCLASS "WMClass" +#define RULE_FULLSCREEN "Fullscreen" +#define RULE_UNFULLSCREEN "Unfullscreen" + MaximusBindPrivate *priv; + GKeyFile *file; + GError *error = NULL; + MaximusRule *rule; + + priv = bind->priv; + + file = g_key_file_new (); + g_key_file_load_from_file (file, filename, 0, &error); + if (error) + { + g_warning ("Unable to load %s: %s\n", filename, error->message); + g_error_free (error); + return; + } + + rule = g_slice_new0 (MaximusRule); + + rule->wm_class = g_key_file_get_string (file, + RULE_GROUP, RULE_WMCLASS, + NULL); + rule->fullscreen = g_key_file_get_string (file, + RULE_GROUP, RULE_FULLSCREEN, + NULL); + rule->unfullscreen = g_key_file_get_string (file, + RULE_GROUP, RULE_UNFULLSCREEN, + NULL); + if (!rule->wm_class || !rule->fullscreen || !rule->unfullscreen) + { + g_free (rule->wm_class); + g_free (rule->fullscreen); + g_free (rule->unfullscreen); + g_slice_free (MaximusRule, rule); + + g_warning ("Unable to load %s, missing strings", filename); + } + else + priv->rules = g_list_append (priv->rules, rule); + + g_key_file_free (file); +} + +static void +load_rules (MaximusBind *bind, const gchar *path) +{ + MaximusBindPrivate *priv; + GDir *dir; + const gchar *name; + + priv = bind->priv; + + dir = g_dir_open (path, 0, NULL); + + if (!dir) + return; + + while ((name = g_dir_read_name (dir))) + { + gchar *filename; + + filename= g_build_filename (path, name, NULL); + + create_rule (bind, filename); + + g_free (filename); + } + + + g_dir_close (dir); +} + +static void +maximus_bind_finalize (GObject *obj) +{ + MaximusBind *bind = MAXIMUS_BIND (obj); + MaximusBindPrivate *priv; + GList *r; + + g_return_if_fail (MAXIMUS_IS_BIND (bind)); + priv = bind->priv; + + for (r = priv->rules; r; r = r->next) + { + MaximusRule *rule = r->data; + + g_free (rule->wm_class); + g_free (rule->fullscreen); + g_free (rule->unfullscreen); + + g_slice_free (MaximusRule, rule); + } + g_free (priv->binding); + + G_OBJECT_CLASS (maximus_bind_parent_class)->finalize (obj); +} + +static void +maximus_bind_class_init (MaximusBindClass *klass) +{ + GObjectClass *obj_class = G_OBJECT_CLASS (klass); + + obj_class->finalize = maximus_bind_finalize; + + g_type_class_add_private (obj_class, sizeof (MaximusBindPrivate)); +} + +static void +maximus_bind_init (MaximusBind *bind) +{ + MaximusBindPrivate *priv; + MateConfClient *client = mateconf_client_get_default (); + GdkDisplay *display = gdk_display_get_default (); + MatewnckScreen *screen; + + priv = bind->priv = MAXIMUS_BIND_GET_PRIVATE (bind); + + priv->fk = fakekey_init (GDK_DISPLAY_XDISPLAY (display)); + priv->screen = screen = matewnck_screen_get_default (); + priv->rules = NULL; + + tomboy_keybinder_init (); + + mateconf_client_add_dir (client, BIND_PATH, MATECONF_CLIENT_PRELOAD_NONE, NULL); + + priv->binding = mateconf_client_get_string (client, + BIND_EXCLUDE_CLASS, + NULL); + mateconf_client_notify_add (client, BIND_EXCLUDE_CLASS, + (MateConfClientNotifyFunc)on_binding_changed, + bind, NULL, NULL); + + if (binding_is_valid (priv->binding)) + tomboy_keybinder_bind (priv->binding, + (TomboyBindkeyHandler)on_binding_activated, + bind); + + load_rules (bind, SYSRULESDIR); +} + +MaximusBind * +maximus_bind_get_default (void) + +{ + static MaximusBind *bind = NULL; + + if (!bind) + bind = g_object_new (MAXIMUS_TYPE_BIND, + NULL); + + return bind; +} diff --git a/maximus/maximus-bind.h b/maximus/maximus-bind.h new file mode 100644 index 0000000..d8aee9a --- /dev/null +++ b/maximus/maximus-bind.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2008 Canonical Ltd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * 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/>. + * + * Authored by Neil Jagdish Patel <[email protected]> + * + */ + +#ifndef _MAXIMUS_BIND_H_ +#define _MAXIMUS_BIND_H_ + +#include <glib-object.h> +#include <gtk/gtk.h> + +#define MAXIMUS_TYPE_BIND (maximus_bind_get_type ()) + +#define MAXIMUS_BIND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + MAXIMUS_TYPE_BIND, MaximusBind)) + +#define MAXIMUS_BIND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\ + MAXIMUS_TYPE_BIND, MaximusBindClass)) + +#define MAXIMUS_IS_BIND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + MAXIMUS_TYPE_BIND)) + +#define MAXIMUS_IS_BIND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\ + MAXIMUS_TYPE_BIND)) + +#define MAXIMUS_BIND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),\ + MAXIMUS_TYPE_BIND, MaximusBindClass)) + +typedef struct _MaximusBind MaximusBind; +typedef struct _MaximusBindClass MaximusBindClass; +typedef struct _MaximusBindPrivate MaximusBindPrivate; + +struct _MaximusBind +{ + GObject parent; + + MaximusBindPrivate *priv; +}; + +struct _MaximusBindClass +{ + GObjectClass parent_class; +}; + +GType maximus_bind_get_type (void) G_GNUC_CONST; + +MaximusBind * maximus_bind_get_default (void); + + +#endif /* _MAXIMUS_BIND_H_ */ + diff --git a/maximus/maximus.schemas b/maximus/maximus.schemas new file mode 100644 index 0000000..a348e9b --- /dev/null +++ b/maximus/maximus.schemas @@ -0,0 +1,54 @@ +<mateconfschemafile> + <schemalist> + <schema> + <key>/schemas/apps/maximus/exclude_class</key> + <applyto>/apps/maximus/exclude_class</applyto> + <owner>maximus</owner> + <type>list</type> + <list_type>string</list_type> + <default>[Totem]</default> + <locale name="C"> + <short>A list of exclusion strings which apply to the window class.</short> + <long>A list of exclusion strings which apply to the window class</long> + </locale> + </schema> + + <schema> + <key>/schemas/apps/maximus/binding</key> + <applyto>/apps/maximus/binding</applyto> + <owner>maximus</owner> + <type>string</type> + <default>disabled</default> + <locale name="C"> + <short>A binding</short> + <long>A binding</long> + </locale> + </schema> + + <schema> + <key>/schemas/apps/maximus/undecorate</key> + <applyto>/apps/maximus/undecorate</applyto> + <owner>maximus</owner> + <type>bool</type> + <default>1</default> + <locale name="C"> + <short>Undecorate windows when maximized</short> + <long>Undecorate windows when maximized</long> + </locale> + </schema> + + <schema> + <key>/schemas/apps/maximus/no_maximize</key> + <applyto>/apps/maximus/no_maximize</applyto> + <owner>maximus</owner> + <type>bool</type> + <default>0</default> + <locale name="C"> + <short>Do not automatically maximize newly opened windows</short> + <long>Do not automatically maximize newly opened windows. If undecorate is set, will still undecorate maximised windows.</long> + </locale> + </schema> + + </schemalist> +</mateconfschemafile> + diff --git a/maximus/tomboykeybinder.c b/maximus/tomboykeybinder.c new file mode 100644 index 0000000..0c50cc0 --- /dev/null +++ b/maximus/tomboykeybinder.c @@ -0,0 +1,337 @@ +/* tomboykeybinder.c + * Copyright (C) 2008 Novell + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ +#include <string.h> + +#include <gdk/gdk.h> +#include <gdk/gdkwindow.h> +#include <gdk/gdkx.h> +#include <X11/Xlib.h> + +#include "eggaccelerators.h" +#include "tomboykeybinder.h" + +/* Uncomment the next line to print a debug trace. */ +/* #define DEBUG */ + +#ifdef DEBUG +# define TRACE(x) x +#else +# define TRACE(x) do {} while (FALSE); +#endif + +typedef struct _Binding { + TomboyBindkeyHandler handler; + gpointer user_data; + char *keystring; + uint keycode; + uint modifiers; +} Binding; + +static GSList *bindings = NULL; +static guint32 last_event_time = 0; +static gboolean processing_event = FALSE; + +static guint num_lock_mask, caps_lock_mask, scroll_lock_mask; + +static void +lookup_ignorable_modifiers (GdkKeymap *keymap) +{ + egg_keymap_resolve_virtual_modifiers (keymap, + EGG_VIRTUAL_LOCK_MASK, + &caps_lock_mask); + + egg_keymap_resolve_virtual_modifiers (keymap, + EGG_VIRTUAL_NUM_LOCK_MASK, + &num_lock_mask); + + egg_keymap_resolve_virtual_modifiers (keymap, + EGG_VIRTUAL_SCROLL_LOCK_MASK, + &scroll_lock_mask); +} + +static void +grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin, + Binding *binding, + gboolean grab) +{ + guint mod_masks [] = { + 0, /* modifier only */ + num_lock_mask, + caps_lock_mask, + scroll_lock_mask, + num_lock_mask | caps_lock_mask, + num_lock_mask | scroll_lock_mask, + caps_lock_mask | scroll_lock_mask, + num_lock_mask | caps_lock_mask | scroll_lock_mask, + }; + int i; + + for (i = 0; i < G_N_ELEMENTS (mod_masks); i++) { + if (grab) { + XGrabKey (GDK_WINDOW_XDISPLAY (rootwin), + binding->keycode, + binding->modifiers | mod_masks [i], + GDK_WINDOW_XWINDOW (rootwin), + False, + GrabModeAsync, + GrabModeAsync); + } else { + XUngrabKey (GDK_WINDOW_XDISPLAY (rootwin), + binding->keycode, + binding->modifiers | mod_masks [i], + GDK_WINDOW_XWINDOW (rootwin)); + } + } +} + +static gboolean +do_grab_key (Binding *binding) +{ + GdkKeymap *keymap = gdk_keymap_get_default (); + GdkWindow *rootwin = gdk_get_default_root_window (); + + EggVirtualModifierType virtual_mods = 0; + guint keysym = 0; + + if (keymap == NULL || rootwin == NULL) + return FALSE; + + if (!egg_accelerator_parse_virtual (binding->keystring, + &keysym, + &virtual_mods)) + return FALSE; + + TRACE (g_print ("Got accel %d, %d\n", keysym, virtual_mods)); + + binding->keycode = XKeysymToKeycode (GDK_WINDOW_XDISPLAY (rootwin), + keysym); + if (binding->keycode == 0) + return FALSE; + + TRACE (g_print ("Got keycode %d\n", binding->keycode)); + + egg_keymap_resolve_virtual_modifiers (keymap, + virtual_mods, + &binding->modifiers); + + TRACE (g_print ("Got modmask %d\n", binding->modifiers)); + + gdk_error_trap_push (); + + grab_ungrab_with_ignorable_modifiers (rootwin, + binding, + TRUE /* grab */); + + gdk_flush (); + + if (gdk_error_trap_pop ()) { + g_warning ("Binding '%s' failed!\n", binding->keystring); + return FALSE; + } + + return TRUE; +} + +static gboolean +do_ungrab_key (Binding *binding) +{ + GdkWindow *rootwin = gdk_get_default_root_window (); + + TRACE (g_print ("Removing grab for '%s'\n", binding->keystring)); + + grab_ungrab_with_ignorable_modifiers (rootwin, + binding, + FALSE /* ungrab */); + + return TRUE; +} + +static GdkFilterReturn +filter_func (GdkXEvent *gdk_xevent, GdkEvent *event, gpointer data) +{ + GdkFilterReturn return_val = GDK_FILTER_CONTINUE; + XEvent *xevent = (XEvent *) gdk_xevent; + guint event_mods; + GSList *iter; + + TRACE (g_print ("Got Event! %d, %d\n", xevent->type, event->type)); + + switch (xevent->type) { + case KeyPress: + TRACE (g_print ("Got KeyPress! keycode: %d, modifiers: %d\n", + xevent->xkey.keycode, + xevent->xkey.state)); + + /* + * Set the last event time for use when showing + * windows to avoid anti-focus-stealing code. + */ + processing_event = TRUE; + last_event_time = xevent->xkey.time; + + event_mods = xevent->xkey.state & ~(num_lock_mask | + caps_lock_mask | + scroll_lock_mask); + + for (iter = bindings; iter != NULL; iter = iter->next) { + Binding *binding = (Binding *) iter->data; + + if (binding->keycode == xevent->xkey.keycode && + binding->modifiers == event_mods) { + + TRACE (g_print ("Calling handler for '%s'...\n", + binding->keystring)); + + (binding->handler) (binding->keystring, + binding->user_data); + } + } + + processing_event = FALSE; + break; + case KeyRelease: + TRACE (g_print ("Got KeyRelease! \n")); + break; + } + + return return_val; +} + +static void +keymap_changed (GdkKeymap *map) +{ + GdkKeymap *keymap = gdk_keymap_get_default (); + GSList *iter; + + TRACE (g_print ("Keymap changed! Regrabbing keys...")); + + for (iter = bindings; iter != NULL; iter = iter->next) { + Binding *binding = (Binding *) iter->data; + do_ungrab_key (binding); + } + + lookup_ignorable_modifiers (keymap); + + for (iter = bindings; iter != NULL; iter = iter->next) { + Binding *binding = (Binding *) iter->data; + do_grab_key (binding); + } +} + +void +tomboy_keybinder_init (void) +{ + GdkKeymap *keymap = gdk_keymap_get_default (); + GdkWindow *rootwin = gdk_get_default_root_window (); + + lookup_ignorable_modifiers (keymap); + + gdk_window_add_filter (rootwin, + filter_func, + NULL); + + g_signal_connect (keymap, + "keys_changed", + G_CALLBACK (keymap_changed), + NULL); +} + +void +tomboy_keybinder_bind (const char *keystring, + TomboyBindkeyHandler handler, + gpointer user_data) +{ + Binding *binding; + gboolean success; + + binding = g_new0 (Binding, 1); + binding->keystring = g_strdup (keystring); + binding->handler = handler; + binding->user_data = user_data; + + /* Sets the binding's keycode and modifiers */ + success = do_grab_key (binding); + + if (success) { + bindings = g_slist_prepend (bindings, binding); + } else { + g_free (binding->keystring); + g_free (binding); + } +} + +void +tomboy_keybinder_unbind (const char *keystring, + TomboyBindkeyHandler handler) +{ + GSList *iter; + + for (iter = bindings; iter != NULL; iter = iter->next) { + Binding *binding = (Binding *) iter->data; + + if (strcmp (keystring, binding->keystring) != 0 || + handler != binding->handler) + continue; + + do_ungrab_key (binding); + + bindings = g_slist_remove (bindings, binding); + + g_free (binding->keystring); + g_free (binding); + break; + } +} + +/* + * From eggcellrenderkeys.c. + */ +gboolean +tomboy_keybinder_is_modifier (guint keycode) +{ + gint i; + gint map_size; + XModifierKeymap *mod_keymap; + gboolean retval = FALSE; + + mod_keymap = XGetModifierMapping (gdk_display); + + map_size = 8 * mod_keymap->max_keypermod; + + i = 0; + while (i < map_size) { + if (keycode == mod_keymap->modifiermap[i]) { + retval = TRUE; + break; + } + ++i; + } + + XFreeModifiermap (mod_keymap); + + return retval; +} + +guint32 +tomboy_keybinder_get_current_event_time (void) +{ + if (processing_event) + return last_event_time; + else + return GDK_CURRENT_TIME; +} diff --git a/maximus/tomboykeybinder.h b/maximus/tomboykeybinder.h new file mode 100644 index 0000000..97c1887 --- /dev/null +++ b/maximus/tomboykeybinder.h @@ -0,0 +1,43 @@ +/* tomboykeybinder.h + * Copyright (C) 2008 Novell + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA + */ +#ifndef __TOMBOY_KEY_BINDER_H__ +#define __TOMBOY_KEY_BINDER_H__ + +#include <glib/gtypes.h> + +G_BEGIN_DECLS + +typedef void (* TomboyBindkeyHandler) (char *keystring, gpointer user_data); + +void tomboy_keybinder_init (void); + +void tomboy_keybinder_bind (const char *keystring, + TomboyBindkeyHandler handler, + gpointer user_data); + +void tomboy_keybinder_unbind (const char *keystring, + TomboyBindkeyHandler handler); + +gboolean tomboy_keybinder_is_modifier (guint keycode); + +guint32 tomboy_keybinder_get_current_event_time (void); + +G_END_DECLS + +#endif /* __TOMBOY_KEY_BINDER_H__ */ + diff --git a/maximus/xutils.c b/maximus/xutils.c new file mode 100644 index 0000000..f131f81 --- /dev/null +++ b/maximus/xutils.c @@ -0,0 +1,102 @@ +/* Xlib utils */ +/* vim: set sw=2 et: */ + +/* + * Copyright (C) 2001 Havoc Pennington + * Copyright (C) 2005-2007 Vincent Untz + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include <config.h> +#include "xutils.h" +#include <string.h> +#include <stdio.h> +#include <libmatewnck/libmatewnck.h> + +void +_matewnck_error_trap_push (void) +{ + gdk_error_trap_push (); +} + +int +_matewnck_error_trap_pop (void) +{ + XSync (gdk_display, False); + return gdk_error_trap_pop (); +} + +static char* +latin1_to_utf8 (const char *latin1) +{ + GString *str; + const char *p; + + str = g_string_new (NULL); + + p = latin1; + while (*p) + { + g_string_append_unichar (str, (gunichar) *p); + ++p; + } + + return g_string_free (str, FALSE); +} + +void +_matewnck_get_wmclass (Window xwindow, + char **res_class, + char **res_name) +{ + XClassHint ch; + char *retval; + + _matewnck_error_trap_push (); + + ch.res_name = NULL; + ch.res_class = NULL; + + XGetClassHint (gdk_display, xwindow, + &ch); + + _matewnck_error_trap_pop (); + + retval = NULL; + + if (res_class) + *res_class = NULL; + + if (res_name) + *res_name = NULL; + + if (ch.res_name) + { + if (res_name) + *res_name = latin1_to_utf8 (ch.res_name); + + XFree (ch.res_name); + } + + if (ch.res_class) + { + if (res_class) + *res_class = latin1_to_utf8 (ch.res_class); + + XFree (ch.res_class); + } +} diff --git a/maximus/xutils.h b/maximus/xutils.h new file mode 100644 index 0000000..58e1d6e --- /dev/null +++ b/maximus/xutils.h @@ -0,0 +1,49 @@ +/* Xlib utilities */ +/* vim: set sw=2 et: */ + +/* + * Copyright (C) 2001 Havoc Pennington + * Copyright (C) 2005-2007 Vincent Untz + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef MATEWNCK_XUTILS_H +#define MATEWNCK_XUTILS_H + +#include <glib.h> +#include <X11/Xlib.h> +#include <X11/Xatom.h> +#include <gdk/gdk.h> +#include <gdk/gdkx.h> + +G_BEGIN_DECLS + +void +_matewnck_error_trap_push (void); + +int +_matewnck_error_trap_pop (void); + +void +_matewnck_get_wmclass (Window xwindow, + char **res_class, + char **res_name); + + +G_END_DECLS + +#endif /* MATEWNCK_XUTILS_H */ diff --git a/po/ChangeLog b/po/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/po/ChangeLog diff --git a/po/LINGUAS b/po/LINGUAS new file mode 100644 index 0000000..6e969b4 --- /dev/null +++ b/po/LINGUAS @@ -0,0 +1 @@ +ar ast bg bs ca cs da de el en_CA en_GB es eu fi fr gl he hr hu id it ja ko lv nb nl pl pt_BR pt ro ru sk sl sr sv th tr uk zh_CN zh_TW diff --git a/po/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..f35d883 --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,4 @@ +mate-window-picker-applet/org.mate.panel.MateWindowPicker.mate-panel-applet.in.in +mate-window-picker-applet/applet.c +mate-window-picker-applet/task-title.c +mate-window-picker-applet/task-item.c diff --git a/po/POTFILES.skip b/po/POTFILES.skip new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/po/POTFILES.skip @@ -0,0 +1 @@ + diff --git a/po/ar.po b/po/ar.po new file mode 100644 index 0000000..f03a2fc --- /dev/null +++ b/po/ar.po @@ -0,0 +1,59 @@ +# Arabic translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Arabic\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: Plural-Forms: nplurals=4; plural=n==1 ? 0 : n==2 ? 1 : n>=3 && " +"n<=10 ? 2 : 3\n" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Window Picker" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "التفضيلات" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "إظهار النوافذ من كافة أماكن العمل" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "الصفحة الرئيسية" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"قم بتسجيل الخروج أو تحويل مستخدم أو قفل الشاشة أو إيقاف تشغيل الكمبيوترقم " +"بتسجيل الخروج أو تحويل مستخدم أو قفل الشاشة أو إيقاف تشغيل الكمبيوتر" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "إغلاق النافذة" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "إغلاق النافذة" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/ast.po b/po/ast.po new file mode 100644 index 0000000..6f765f6 --- /dev/null +++ b/po/ast.po @@ -0,0 +1,57 @@ +# Language ast translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Asturian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Esbillador de ventanes" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferencies" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Amosar les ventanes de tolos espacios de trabayu" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Home" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Acabar la sesión, camudar d'usuariu, bloquear la pantalla o apagar l'equipu" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Pesllar ventana" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Pesllar ventana" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/bg.po b/po/bg.po new file mode 100644 index 0000000..fb23686 --- /dev/null +++ b/po/bg.po @@ -0,0 +1,58 @@ +# Bulgarian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Bulgarian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Избиране на прозорци" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Настройки" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Показване на прозорците от всички работни плотове" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Начална страница" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Излизане, превключване на потребител, заключване на екрана или изключване на " +"компютъра" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Затваряне на прозореца" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Затваряне на прозореца" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/bs.po b/po/bs.po new file mode 100644 index 0000000..3957926 --- /dev/null +++ b/po/bs.po @@ -0,0 +1,58 @@ +# Bosnian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Bosnian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Birač prozora" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Postavke" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Prikaži prozore sa svih radnih površina" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Lična fascikla" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Odjava, promjena korisnika, zaključavanje ekrana ili gašenje kompjutera" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Zatvori prozor" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Zatvori prozor" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 0000000..51da519 --- /dev/null +++ b/po/ca.po @@ -0,0 +1,58 @@ +# Catalan translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Catalan\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Selector de finestres" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferències" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Mostra les finestres de tots els espais de treball" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Inici" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Finalitzeu la sessió, canvieu d'usuari, bloqueu la pantalla o apagueu " +"l'ordinador." + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Tanca la finestra" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Tanca la finestra" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 0000000..30b5837 --- /dev/null +++ b/po/cs.po @@ -0,0 +1,56 @@ +# Czech translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Czech\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Volič oken" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Předvolby" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Zobrazit okna ze všech pracovních prostorů" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Domů" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Odhlásit, přepnout uživatele, zamknout obrazovku nebo vypnout počítač" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Zavřít okno" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Zavřít okno" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/da.po b/po/da.po new file mode 100644 index 0000000..ed77573 --- /dev/null +++ b/po/da.po @@ -0,0 +1,56 @@ +# Danish translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Danish\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Vinduesvælger" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Indstillinger" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Vis vinduer fra alle arbejdsområder" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Start" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Log af, skift bruger, lås skærmen, eller sluk computeren" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Luk vinduet" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Luk vinduet" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/de.po b/po/de.po new file mode 100644 index 0000000..f68a445 --- /dev/null +++ b/po/de.po @@ -0,0 +1,59 @@ +# German translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: German\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Window Picker" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Voreinstellungen" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Fenster von allen Arbeitsflächen anzeigen" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Home" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Abmelden, Benutzer wechseln, Bildschirm sperren oder Computer " +"herunterfahrenAbmelden, Benutzer wechseln, Bildschirm sperren oder Computer " +"herunterfahren" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Fenster schließen" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Fenster schließen" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/el.po b/po/el.po new file mode 100644 index 0000000..e21cd53 --- /dev/null +++ b/po/el.po @@ -0,0 +1,59 @@ +# Greek translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Greek\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Επιλογέας παραθύρου" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Προτιμήσεις" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Να εμφανίζονται τα παράθυρα από όλους τους χώρους εργασίας" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Αρχική" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Αποσύνδεση, αλλαγή χρήστη, κλείδωμα οθόνης ή τερματισμός λειτουργίας " +"υπολογιστήΑποσύνδεση, αλλαγή χρήστη, κλείδωμα οθόνης ή τερματισμός " +"λειτουργίας υπολογιστή" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Κλείσιμο παραθύρου" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Κλείσιμο παραθύρου" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/en_CA.po b/po/en_CA.po new file mode 100644 index 0000000..2a5f648 --- /dev/null +++ b/po/en_CA.po @@ -0,0 +1,56 @@ +# English translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: English\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Window Picker" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferences" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Show windows from all workspaces" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Home" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Log off, switch user, lock screen or power down the computer" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Close window" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Close window" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/en_GB.po b/po/en_GB.po new file mode 100644 index 0000000..7c55808 --- /dev/null +++ b/po/en_GB.po @@ -0,0 +1,55 @@ +# English translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: English (British)\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +msgid "Close current window." +msgstr "" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/es.po b/po/es.po new file mode 100644 index 0000000..5e57636 --- /dev/null +++ b/po/es.po @@ -0,0 +1,58 @@ +# Spanish translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Spanish\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Selector de ventanas" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferencias" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Mostrar las ventanas de todos los espacios de trabajo" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Inicio" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Terminar la sesión, cambiar de usuario, bloquear la pantalla o apagar el " +"equipo" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Cerrar la ventana" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Cerrar la ventana" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/eu.po b/po/eu.po new file mode 100644 index 0000000..b3dd2b5 --- /dev/null +++ b/po/eu.po @@ -0,0 +1,59 @@ +# Basque translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Basque\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Leiho biltzailea" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Hobespenak" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Laneko espazio guztien leihoak erakusten ditu." + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Hasierako orria" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Logetik irten, erabiltzailearen aldatu, pantaila blokeatu edo ordenagailua " +"itzaliDeskonektatu, erabiltzailetik irten, pantaila blokeatu eta " +"ordenagailua itzali" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Leihoa itxi" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Leihoa itxi" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/fi.po b/po/fi.po new file mode 100644 index 0000000..936f84b --- /dev/null +++ b/po/fi.po @@ -0,0 +1,56 @@ +# Finnish translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Finnish\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Window Picker" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Oletusasetukset" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Näytä kaikkien työtilojen ikkunat" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Alkuun" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Kirjaudu ulos, vaihda käyttäjä tai sammuta tietokoneesta virta." + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Sulje ikkuna" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Sulje ikkuna" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/fr.po b/po/fr.po new file mode 100644 index 0000000..3802c59 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,58 @@ +# French translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: French\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Sélecteur de fenêtres" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Préférences" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Afficher les fenêtres de tous les espaces de travail" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Accueil" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Fermer la session, changer d'utilisateur, verrouiller l'écran ou éteindre " +"l'ordinateur" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Fermer la fenêtre" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Fermer la fenêtre" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/gl.po b/po/gl.po new file mode 100644 index 0000000..1caeeeb --- /dev/null +++ b/po/gl.po @@ -0,0 +1,58 @@ +# Galician translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Galician\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Seleccionador de fiestra" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferencias" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Mostrar fiestras de área de traballo" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Inicio" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Pechar a sesión, cambiar de usuario, bloquear a pantalla ou apagar o " +"computador" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Pechar fiestra" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Pechar fiestra" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/he.po b/po/he.po new file mode 100644 index 0000000..d0a7f77 --- /dev/null +++ b/po/he.po @@ -0,0 +1,56 @@ +# Hebrew translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Hebrew\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "בורר החלונות" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "העדפות" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "הצגת חלונות מכל סביבות העבודה" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "בית" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "ניתוק, החלפת משתמש, נעילת מסך או כיבוי המחשב" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "סגירת החלון" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "סגירת החלון" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/hr.po b/po/hr.po new file mode 100644 index 0000000..39f10e6 --- /dev/null +++ b/po/hr.po @@ -0,0 +1,57 @@ +# Croatian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Croatian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Birač prozora" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Osobitosti" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Prikaži prozore sa svih radnih površina" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Osobna mapa" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Odjava, promjena korisnika, zaključavanje zaslona ili gašenje računala" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Zatvori prozor" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Zatvori prozor" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/hu.po b/po/hu.po new file mode 100644 index 0000000..4e81ee2 --- /dev/null +++ b/po/hu.po @@ -0,0 +1,58 @@ +# Hungarian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Hungarian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Ablakválasztó" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Beállítások" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Ablakok megjelenítése minden munkaterületről" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Kezdőlap" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Kijelentkezés, felhasználóváltás, képernyő zárolása vagy a számítógép " +"kikapcsolása" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Ablak bezárása" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Ablak bezárása" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/id.po b/po/id.po new file mode 100644 index 0000000..b3e022d --- /dev/null +++ b/po/id.po @@ -0,0 +1,56 @@ +# Indonesian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Indonesian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Pemilih Jendela" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferensi" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Tampilkan jendela dari semua ruang kerja" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Rumah" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Keluar, ganti pengguna, kunci layar, atau matikan komputer" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Tutup jendela" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Tutup jendela" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/it.po b/po/it.po new file mode 100644 index 0000000..63b0efd --- /dev/null +++ b/po/it.po @@ -0,0 +1,57 @@ +# Italian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Italian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Selettore finestra" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferenze" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Mostrare le finestre di tutti gli spazi di lavoro" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Home" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Chiude la sessione, cambia utente, blocca lo schermo o spegne il computer" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Chiude la finestra" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Chiude la finestra" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/ja.po b/po/ja.po new file mode 100644 index 0000000..4e6eb58 --- /dev/null +++ b/po/ja.po @@ -0,0 +1,58 @@ +# Japanese translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Japanese\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "ウィンドウ ピッカー" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "ユーザー設定" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "すべての作業領域のウィンドウを表示する" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "ホーム" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"ログオフ、ユーザーの切り替え、画面のロック、またはコンピュータの電源を遮断し" +"ます。" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "ウィンドウを閉じる" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "ウィンドウを閉じる" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/ko.po b/po/ko.po new file mode 100644 index 0000000..fffa6ef --- /dev/null +++ b/po/ko.po @@ -0,0 +1,56 @@ +# Korean translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Korean\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "창 선택기" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "기본 설정" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "모든 작업 공간에 창 표시" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "홈" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "로그 오프, 사용자 전환, 화면 잠그기 또는 컴퓨터 전원 끄기" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "창 닫기" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "창 닫기" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/lv.po b/po/lv.po new file mode 100644 index 0000000..994def5 --- /dev/null +++ b/po/lv.po @@ -0,0 +1,57 @@ +# Latvian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Latvian\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 != 0 ? 1 : " +"2);\n" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Logu izvēlētājs" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Iestatījumi" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Parādīt logus no visām darba vietām" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Mājas" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Atteikties, nomainīt lietotāju, noslēgt ekrānu vai izslēgt datoru" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Aizvērt logu" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Aizvērt logu" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/mate-netbook.pot b/po/mate-netbook.pot new file mode 100644 index 0000000..b5f038b --- /dev/null +++ b/po/mate-netbook.pot @@ -0,0 +1,70 @@ +# 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: 2012-07-04 15:08+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <[email protected]>\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: ../mate-window-picker-applet/applet.c:64 +msgid "_Preferences" +msgstr "" + +#: ../mate-window-picker-applet/applet.c:67 +msgid "_About" +msgstr "" + +#: ../mate-window-picker-applet/applet.c:266 +#: ../mate-window-picker-applet/applet.c:267 +msgid "Window Picker" +msgstr "" + +#: ../mate-window-picker-applet/applet.c:301 +msgid "Preferences" +msgstr "" + +#: ../mate-window-picker-applet/applet.c:317 +msgid "Show windows from all workspaces" +msgstr "" + +#: ../mate-window-picker-applet/task-title.c:251 +#: ../mate-window-picker-applet/task-title.c:258 +#: ../mate-window-picker-applet/task-title.c:301 +#: ../mate-window-picker-applet/task-title.c:308 +#: ../mate-window-picker-applet/task-title.c:440 +#: ../mate-window-picker-applet/task-title.c:499 +msgid "Home" +msgstr "" + +#: ../mate-window-picker-applet/task-title.c:255 +#: ../mate-window-picker-applet/task-title.c:305 +#: ../mate-window-picker-applet/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" + +#: ../mate-window-picker-applet/task-title.c:277 +msgid "Close window" +msgstr "" + +#: ../mate-window-picker-applet/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../mate-window-picker-applet/task-title.c:461 +msgid "Close current window." +msgstr "" + +#: ../mate-window-picker-applet/task-item.c:650 +msgid "Window Task Button" +msgstr "" diff --git a/po/nb.po b/po/nb.po new file mode 100644 index 0000000..12efaa7 --- /dev/null +++ b/po/nb.po @@ -0,0 +1,56 @@ +# Norwegian Bokmal translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Norwegian Bokmal\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Vindusvelger" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Innstillinger" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Vis vinduer fra alle arbeidsområder" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Hjem" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Logg av, bytt bruker, lås skjermen eller slå av datamaskinen" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Lukk vindu" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Lukk vindu" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/nl.po b/po/nl.po new file mode 100644 index 0000000..cb99544 --- /dev/null +++ b/po/nl.po @@ -0,0 +1,57 @@ +# Dutch translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Dutch\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Venster kiezen" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Voorkeuren" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Vensters van alle werkruimten tonen" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Startpagina" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Afmelden, andere gebruiker, scherm vergrendelen of de computer uitzetten" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Venster sluiten" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Venster sluiten" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/pl.po b/po/pl.po new file mode 100644 index 0000000..a1dfc2d --- /dev/null +++ b/po/pl.po @@ -0,0 +1,57 @@ +# Polish translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Polish\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Wybieracz okien" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferencje" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Wyświetlaj okna ze wszystkich obszarów roboczych" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Strona główna" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Wyloguj się, przełącz użytkowników, zablokuj ekran lub wyłącz komputer" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Zamknij okno" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Zamknij okno" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/pt.po b/po/pt.po new file mode 100644 index 0000000..12e4f70 --- /dev/null +++ b/po/pt.po @@ -0,0 +1,58 @@ +# Portuguese translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Portuguese\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Seleccionador de Janelas" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferências" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Mostrar janelas de todos os espaços de trabalho" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Início" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Terminar sessão, mudar de utilizador, bloquear o ecrã ou encerrar o " +"computador" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Fechar a janela" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Fechar a janela" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 0000000..1eaea3d --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,56 @@ +# Portuguese translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Brazilian Portuguese\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Selecionador de janelas" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferências" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Exibir janelas de todas as áreas de trabalho" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Início" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Fazer logoff, trocar usuário, bloquear tela ou desligar o computador" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Fechar janela" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Fechar janela" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/ro.po b/po/ro.po new file mode 100644 index 0000000..d8e4eb0 --- /dev/null +++ b/po/ro.po @@ -0,0 +1,57 @@ +# Romanian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Romanian\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==0 || (n%100 > 0 && n%100 < " +"20)) ? 1 : 2;\n" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Selector ferestre" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Preferințe" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Arată ferestrele din toate spațiile de lucru" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Acasă" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Ieșire, comutare utilizator, blocare ecran sau oprire calculator" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Închide fereastra" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Închide fereastra" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/ru.po b/po/ru.po new file mode 100644 index 0000000..7a4dd38 --- /dev/null +++ b/po/ru.po @@ -0,0 +1,59 @@ +# Russian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Russian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Указатель окон" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Параметры" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Показывать окна со всех рабочих мест" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Домой" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Завершить сеанс, сменить пользователя, заблокировать экран или выключить " +"компьютер" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Закрыть окно" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Закрыть окно" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/sk.po b/po/sk.po new file mode 100644 index 0000000..b8d6215 --- /dev/null +++ b/po/sk.po @@ -0,0 +1,59 @@ +# Slovak translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Slovak\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Window Picker" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Predvoľby" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Ukázať okná zo všetkých pracovných priestorov" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Domov" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Odhlásiť sa, prepnúť používateľa, uzamknúť obrazovku alebo vypnúť " +"počítačOdhlásiť sa, prepnúť používateľa, uzamknúť obrazovku alebo vypnúť " +"počítač" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Zatvoriť okno" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Zatvoriť okno" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..129b328 --- /dev/null +++ b/po/sl.po @@ -0,0 +1,58 @@ +# Slovenian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Slovenian\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%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Izbirnik Windows" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Domov" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Odjava, preklop med uporabniki, zaklepanje zaslona ali izklop računalnika" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Zapri okno" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Zapri okno" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/sr.po b/po/sr.po new file mode 100644 index 0000000..ad89117 --- /dev/null +++ b/po/sr.po @@ -0,0 +1,56 @@ +# Serbian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Serbian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +msgid "Close current window." +msgstr "" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/sv.po b/po/sv.po new file mode 100644 index 0000000..e13678c --- /dev/null +++ b/po/sv.po @@ -0,0 +1,56 @@ +# Swedish translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Swedish\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Fönsterväljare" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Inställningar" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Visa fönster från alla arbetsytor" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Startsida" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Logga ut, byt användare, lås skärmen eller stäng av datorn" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Stäng fönster" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Stäng fönster" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/th.po b/po/th.po new file mode 100644 index 0000000..5848b2d --- /dev/null +++ b/po/th.po @@ -0,0 +1,56 @@ +# Thai translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Thai\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "การกำหนดค่า" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "แสดงหน้าต่างจากพื้นที่ทำงานทั้งหมด" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "บ้าน" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "ออกจากระบบ, เปลี่ยนผู้ใช้, ล็อกจอ หรือ ปิดเครื่องคอมพิวเตอร์" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "ปิดหน้าต่าง" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "ปิดหน้าต่าง" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/tr.po b/po/tr.po new file mode 100644 index 0000000..7b3dfc4 --- /dev/null +++ b/po/tr.po @@ -0,0 +1,56 @@ +# Turkish translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Turkish\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Pencere Seçicisi" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Tercihler" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Tüm çalışma yerlerinden pencereleri göster" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Ana" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "Çık, kullanıcı değiştir, ekranı kilitle veya bilgisayarı kapat" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Pencereyi kapat" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Pencereyi kapat" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/uk.po b/po/uk.po new file mode 100644 index 0000000..415ba9e --- /dev/null +++ b/po/uk.po @@ -0,0 +1,58 @@ +# Ukrainian translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Ukrainian\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "Вибір вікон" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "Налаштування" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "Показувати вікна з усіх робочих областей" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "Домашня тека" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "" +"Вийти, змінити користувача, заблокувати екран чи вимкнути живлення комп'ютера" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "Закрити вікно" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "Закрити вікно" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 0000000..321a1f6 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,56 @@ +# Chinese translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Chinese (simplified)\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "窗口选择程序" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "首选项" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "显示所有工作区的窗口" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "主页" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "注销、切换用户、锁定屏幕或关闭计算机" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "关闭窗口" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "关闭窗口" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100644 index 0000000..0a7d9d4 --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,56 @@ +# Chinese translations for window-picker-applet package. +# Copyright (C) 2009 THE window-picker-applet'S COPYRIGHT HOLDER +# This file is distributed under the same license as the window-picker-applet package. +# Kyle Nitzsche <[email protected]>, 2009. +# +msgid "" +msgstr "" +"Project-Id-Version: window-picker-applet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-09-09 12:54-0400\n" +"PO-Revision-Date: 2009-09-09 15:10-0400\n" +"Last-Translator: Ubuntu Translators\n" +"Language-Team: Chinese (traditional)\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" + +#: ../data/MATE_WindowPicker.server.in.in.h:1 ../src/applet.c:268 +#: ../src/applet.c:269 +msgid "Window Picker" +msgstr "視窗選擇程式" + +#: ../src/applet.c:304 +msgid "Preferences" +msgstr "偏好設定" + +#: ../src/applet.c:320 +msgid "Show windows from all workspaces" +msgstr "顯示所有工作區的視窗" + +#: ../src/task-title.c:251 ../src/task-title.c:258 ../src/task-title.c:301 +#: ../src/task-title.c:308 ../src/task-title.c:440 ../src/task-title.c:499 +msgid "Home" +msgstr "首頁" + +#: ../src/task-title.c:255 ../src/task-title.c:305 ../src/task-title.c:497 +msgid "Log off, switch user, lock screen or power down the computer" +msgstr "登出、切換使用者、鎖定螢幕或關閉電腦" + +#: ../src/task-title.c:277 +msgid "Close window" +msgstr "關閉視窗" + +#: ../src/task-title.c:460 +msgid "Close" +msgstr "" + +#: ../src/task-title.c:461 +#, fuzzy +msgid "Close current window." +msgstr "關閉視窗" + +#: ../src/task-item.c:631 +msgid "Window Task Button" +msgstr "" |