pax_global_header00006660000000000000000000000064124656264150014525gustar00rootroot0000000000000052 comment=f600c0863c8e095f8669890fef0f29f6e969fa0c .default000066400000000000000000000016051246562641500125200ustar00rootroot00000000000000PACKAGE = LilyTerm BINARY = lilyterm VERSION = 0.9.9.4 AUTHOR = Lu, Chao-Ming (Tetralet) BUGREPORT = tetrlet@gmail.com MAINSITE = http://lilyterm.luna.com.tw/ GITHUBURL = https://github.com/Tetralet/LilyTerm BLOG = http://tetralet.luna.com.tw WIKI = https://github.com/Tetralet/LilyTerm/wiki ISSUES = https://github.com/Tetralet/LilyTerm/issues IRC = \#hime@freenode.net LANG_LIST = de fr es it nl pl pt_BR ru sk tr uk zh_CN zh_TW YEAR = $(shell date +%Y) ECHO = $(shell whereis "echo" | tr -s ' ' '\n' | grep "bin/""echo""$$" | head -n 1) PRINTF = $(shell whereis "printf" | tr -s ' ' '\n' | grep "bin/""printf""$$" | head -n 1) PREFIX = /usr/local ETCDIR = $(PREFIX)/etc/xdg BINDIR = $(PREFIX)/bin DATADIR = $(PREFIX)/share MANDIR = $(DATADIR)/man/man1 DOCDIR = $(DATADIR)/doc/$(BINARY) EXAMPLES_DIR = $(DATADIR)/doc/$(BINARY)/examples LOCALEDIR = $(DATADIR)/locale ICONDIR = $(DATADIR)/pixmaps .gitignore000066400000000000000000000003311246562641500130560ustar00rootroot00000000000000.config *.swp src/*.o src/*.swp src/lilyterm src/lilyterm_dbg src/lilyterm_dev src/unit_test src/unit_test.c src/unit_test.o src/gdb_batch src/gdb.log src/valgrind.log src/vgcore.* po/*.mo po/*.swp data/lilyterm.1.gz AUTHORS000066400000000000000000000013771246562641500121510ustar00rootroot00000000000000Authors: Lu, Chao-Ming (Tetralet) Homepage: http://lilyterm.luna.com.tw/ (Main site) https://github.com/Tetralet/LilyTerm (Github site) Blog: http://tetralet.luna.com.tw Wiki: https://github.com/Tetralet/LilyTerm/wiki Issues: https://github.com/Tetralet/LilyTerm/issues IRC: #hime@freenode.net Translators: Adrian Buyssens: Flemish/Dutch translation Bogusz Kowalski: Polish translation GoGoNKT: Simplified Chinese translation Marco Paolome: Italian translation Mario Blättermann: German translation Niels Martignène: French translation P.L. Francisco: Spanish translation Rafael Ferreira: Portuguese translation Samed Beyribey: Turkish translation Slavko: Slovak translation Vladimir: Russian and Ukrainian translation COPYING000066400000000000000000001045131246562641500121300ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ChangeLog000066400000000000000000001317701246562641500126540ustar00rootroot000000000000002013-02-28 Lu, Chao-Ming (Tetralet) Version 0.9.9.4, it is a hotfix version of 0.9.9.3. FIX: * Also dim the foreground color when inactive. * The cursor_color settings doesn't work correctly. Very thanks to aeglos for reporting this bug. * The color of cursor should not been reset after changing the color of foreground color. Very thanks to aeglos and cmchao for reporting this bug. * Don't try to clean the environs when launching LilyTerm. Very thanks to captnfab for reporting this bug. * [Disable functions keys] didn't apply immediately. * Fix several possible memory leaks and segfault errors. 2013-02-23 Lu, Chao-Ming (Tetralet) Version 0.9.9.3. New Feature: * Roll back autotools build system. * Support for -n/--tab_names command line option to specify tab names, separate with . Very Thanks daroczig for this idea. * Added a [-j/--join] command line option to integrate new created tabs to the last accessed window. VERY THANKS daroczig for this great idea. * Implement a dialog for adjusting the colors of ANSI themes. Very Thanks PaBLoX-CL for this idea. * Better behavior for setting ANSI color themes. FIX: * Better compatible with OpenBSD. Very thanks vext01 for reporting this bug. * Fix compilation error due to missing comment. Very thanks Jekyll Wu for fixing this bug. * Fix compilation failure by missing #includes. Very thanks Jekyll Wu for fixing this bug. 2012-06-16 Lu, Chao-Ming (Tetralet) Version 0.9.9.2, it is a hotfix version of 0.9.9.1. New Feature: * More lovely configure script output. * Better compatible with `hier' file systems used by FreeBSD/OpenBSD. * Better compatible with FreeBSD. FIX: * Smarter 'whereis' commands for finding the full path of a program. Very thanks to Enlik for reporting this bug. close #11. * Use '=' in the configure test expression. Very thanks to Enlik for reporting this bug. * Don't exit if invalid option is given when running configure script. 2012-06-06 Lu, Chao-Ming (Tetralet) Version 0.9.9.1, it is a hotfix version of 0.9.9. New Feature: * Added a new option "embedded_copy_paste_menu" to embed the copy/paste menu to the main right click menu, and is enabled by default. VERY THANKS to Slavko for this great idea. * Added a new command line option [-H/--hold], may hold the terminal window open when the command following -e/-x terminated. VERY THANKS to Douglas McFadzean for this great idea. * Applied new Portuguese translation. VERY THANKS to Rafael Ferreira! * de.po, ru.po, uk.po, sk.po, it.po and pt_BR.po have been updated. Very thanks to Mario Blttermann, Vladimir Smolyar, Slavko, Marco Paolone, and Rafael Ferreira for the translation! FIX: * Urgent bell should be disabled if the window is getting focus. VERY THANKS to daspostloch for reporting this bug. * Respect to the PATH environment, or the -e option won't work if the command is not in /usr/bin. VERY THANKS to Douglas McFadzean for reporting this bug. * Added a missed '\' before '-' in the manpage file. VERY THANKS to Slavko for the patch. * Update the ansi color codes of xterm theme. Very thanks to caleb for reporting this bug! * Short the help messages to fit in 80 columns. VERY THANKS to Rafael Ferreira for reporting this bug. * Using ETCDIR instead of g_get_system_config_dirs(). VERY THANKS to Rafael Ferreira for reporting this bug! * The settings for [always show/hide the tabs bar] don't be saved as excepted. VERY THANKS to BV1AL for reporting this bug. 2012-04-04 Lu, Chao-Ming (Tetralet) Version 0.9.9. Trying to migrate to GTK3+ but failed. Still having big trouble in handling geometry. New Feature: * May use and keys as function key. Thanks BV1AL for this idea. * Added a menuitem "Always hide the tabs bar". Thanks BV1AL for this idea. * Added a menuitem "Always show the tabs bar". Thanks Slavko for this idea. * Applied new Polish translation. VERY THANKS to Bogusz Kowalski. * Add a new menu item [Visible bell]. * Add a new menu item [Urgent bell]. VERY THANKS to captnfab for this idea and patch. Be notice that for performance reason, the Urgent bell will disable if the LilyTerm window is in focus. i.e. It only works only when the LilyTerm window is losing focus. * Add new menu item [View clipboard] and [View primary clipboard]. * Add a new menu item [Paste to every Vte Terminal]. VERY THANKS to Bogusz Kowalski for this idea. * Add a new menu item [Launch File Manager]. Thanks Slavko for this idea. * Confirm before pasting more than 1 lines to the Vte Terminal. May add a programs to "paste_texts_whitelist" in profile so that LilyTerm will not warn you when trying to paste lines to it. Set confirm_to_paste = 0 in user profile to disable this feature. * The function key "Edit Label" is disabled by default, and the menu item [Rename this tab] is shown by default. * Add a menu item [Add other locales...] to [Change text encoding] menu subitem. Thanks BV1AL for this idea. * Add a new menu item [Reload settings]. * A new key binding , open a new windows with current directory. Thanks mrknacky for this idea. * Using to edit tab name is disable by default. Thanks Rodolfo Quesada-Zumbado for this idea. * Support solarized ansi color themes from http://ethanschoonover.com/solarized. Thanks medicalwei for this idea. * New handmade build system. autotools had been dropped. * Added a button to [Confirm to paste texts] dialog. * Add a new make target: update-po to po/Makefile. Thanks caleb for this idea. * Better about dialog. Thanks Mario Blättermann for this idea. * Added a new menu item: [Invert Color]. * Add a new option and a new menuitem 'Cursor shape'. Thanks ralesi for this great idea. * Add a new option and a new menuitem 'Change the color of cursor'. Thanks ralesi for this great idea. * Add a new option and a new menuitem 'Auto save settings'. FIX: * Remove '>' from URL matching. Thanks BrainWorker for reporting this bug. * Fix some typo and syntax in translations texts. VERY THANKS to Vladimir Smolyar. 2011-06-15 Lu, Chao-Ming (Tetralet) version 0.9.9~rc9, It will be the version of 0.9.9, Release as a rc version in case I forget something. FIX: * A race condition segfault bug if the locale settings is incorrect and the -e option is failed at the same time. * The profile path in help message may not updated after saving the profile. Thanks 夢見草 for reporting this bug. * Some translation strings missed. Thanks Vladimir Smolyar and Niels Martignène for reporting this bug. New Feature: * Add "screen" to foreground_program_whitelist. * A new menu item "Window opacity when inactive" and a new check box menu item "Dim window when inactive", may dim the window when inactive if the screen is composited. Thanks keenerd for this great idea. * Add a new color theme 'grayscale'. Thanks BV1AL for this idea. * Applied new Franch translation. VERY THANKS to Niels Martignène. * Applied new Slovak translation. VERY THANKS to Slavko. 2010-12-10 Lu, Chao-Ming (Tetralet) version 0.9.9~rc8 It is a hotfix version for 0.9.9~rc7. FIX: * Can not keep correct geometry size under kwin/xfwm4. VERY THANKS to Marco Paolone and Vladimir Smolyar for reporting this stupid bug. 2010-12-6 Lu, Chao-Ming (Tetralet) version 0.9.9~rc7 It is the final preview version of LilyTerm 0.9.9. CALL FOR TRANSLATORS! FIX: * The default function key of 'Copy the text to clipboard' is changed into 'Ctrl Delete', and the default function key of 'Paste the text in clipboard' is changed into 'Ctrl Insert', Thanks Renato for reporting this bug. * The profile option 'window_opacity', 'background_saturation', 'font_resize_ratio', 'window_resize_ratio', 'brightness' and 'inactive_brightness' won't be saved correctly under it_IT locale. VERY THANKS to Marco Paolone for reporting this strange bug. New Feature: * Applied new Flemish/Dutch translations. VERY THANKS to Adrian Buyssens. * New Dialog: [Find String], but it is almost unusable. Please visit https://bugzilla.gnome.org/show_bug.cgi?id=627886 for more details. * New function key: to launch the search string dialog, to find the next string matching the search regex, and to find the previous string matching the search regex. * New command line option [-g/--geometry] and new profile option [geometry], may specify the geometry (size and position) of window when starting. Very thanks Adrian Buyssens and Hámorszky Balázs for this idea. * Better [Set function keys] dialog. 2010-10-25 Lu, Chao-Ming (Tetralet) version 0.9.9~rc6 FIX: * No response under Ubuntu. Thanks 老杜, 夢見草 and bb for reporting this bug. * Switch to $HOME if the init dir is invalid. New Feature: * Defensive programming, making LilyTerm behave in a predictable manner despite unexpected inputs. 2010-09-26 Lu, Chao-Ming (Tetralet) version 0.9.9~rc5 New Feature: * Better support the --name and --title option from Gtk+2. VERY THANKS to caleb and letoh for this idea. * May set the 'default_locale' and 'locales list' via right click menu. 2010-09-21 Lu, Chao-Ming (Tetralet) version 0.9.9~rc4 FIX: * Fixed a segfault bug when launched with -e option. 2010-09-21 Lu, Chao-Ming (Tetralet) version 0.9.9~rc3 FIX: * Fixed a stupid double free() segfault bug. VERY THANKS to Aeglos Lin, Solomon Huang and letoh for reporting and testing this bug. 2010-09-21 Lu, Chao-Ming (Tetralet) version 0.9.9~rc2 FIX: * Speed up when initing and starting. VERY THANKS to caleb and letoh for reporting this bug. 2010-09-18 Lu, Chao-Ming (Tetralet) version 0.9.9~rc It is the final version of LilyTerm 0.9.9. CALL FOR TRANSLATORS! FIX: * The foreground texts will also dim when inactive. * The profile option "show_transparent_menu" is renamed to "show_background_menu". * The profile option "window_shows_current_page" is renamed to "window_title_shows_current_page". * Fix some typo and syntax in translations texts. VERY THANKS to Vladimir. * Sometimes translations will be mixed with different language when switching between locales. VERY THANKS to Vladimir for reporting and testing this bug. * Better behavior when draging a tab to another window. * May use + in function keys. New Feature: * Applied new Russian and Ukrainian translations. VERY THANKS to Vladimir. * Applied updated Simplified Chinese translation. VERY THANKS to GoGoNKT. * New function key : May Emulate a mouse Scroll Up/Down event on Vte Terminal box. Thanks qotsa for this idea, and caleb for the codes! * New function key : Asks to Scroll Up/Down 1 line on Vte Terminal box. Thanks qotsa for this idea. * New [Usage] dialog. * Better [Set function keys] dialog. * New profile option: "window_title_append_package_name" May get rid of 'LilyTerm' on the window title. Thanks qotsa for this idea. * New menuitem [Set background image], and New profile option: "background_image" and "scroll_background". Thanks caleb for this idea. * May apply new settings from another profile directly via right click menu. Thanks BV1AL for this idea. * [New tab with locale] may pop up a warning dialog if the locale is invalid. * Move some rare used menuitems into [Misc] submenu. * May use a simplified locale name (like 'zh_TW') in profile option 'default_locale' and 'locales_list'. * Using vte_terminal_set_background_image_file(vte, "/dev/null") to clear the background image. Thanks caleb for this great idea. * Manual page updated. DROP: * The profile option "default_encoding" and "encodings_list" is obsoleted. LilyTerm will detect correct encoding automaticly. * The profile option "fixed_page_width" is obsoleted. The page width will always be fixed on LilyTerm now. * The profile option "show_get_function_key_menu" is obsoleted. 2010-07-13 Lu, Chao-Ming (Tetralet) version 0.9.9~pre7 FIX: * Better compatibility for vte (0.25.1) and gtk (< 2.10). * Added csh, dash, ksh, tcsh, and zsh to foreground_program_whitelist and background_program_whitelist. Thanks nasofe for reporting this bug. * Better behavior when there is no '/proc' or the '/proc' is empty. * Better behavior if the child process has became zombie or exited immediately. New Feature: * New menuitem: [Set the function key] instead of [Get the function key value]. * A warning dialog if some feature needs GTK >= 2.12 or VTE >= 0.16. 2010-05-31 Lu, Chao-Ming (Tetralet) version 0.9.9~pre6 FIX: * Better compatibility for gtk (2.8 ~ 2.20) and vte (0.16 ~ 0.24). * The default value for scrollback_lines sets back to 1024. scrollback_lines = -1 only works under vte > 0.22.3. Very thanks 蒜頭 for reporting this bug. New Feature: * Applied new Spanish translation. VERY THANKS to P.L. Francisco. * New menuitem: "Change ANSI color theme". * New menuitem: "Adjust the brightness when inactive". * New menuitem: "Erase Binding". 2010-05-01 Lu, Chao-Ming (Tetralet) version 0.9.9~pre5 The default user profile is moved to ~/.config/lilyterm/default.conf. Please do it manually and sorry for the inconvenience. FIX: * Fix a segfault bug when saving settings if the 1st page was closed. * Closing a tab that is not on focus with clicking the [X] button on it may cause wrong tab to be focus. VERY THANKS to caleb for reporting this bug. * LilyTerm will confirm twice if there is a foreground running program in a tab when closing it. New Feature: * Applied new Italian translation. VERY THANKS to Marco Paolone. * Reduce the size of [X] button on the tab. VERY THANKS to caleb for this idea. * New profile option: "default_encoding". May specify the default encoding when starting up. * New profile option: "default_locale". May specify the default locale when starting up. * New profile option: "fullscreen" May change to fullscreen mode when starting up. Thanks BV1AL for this idea. * New menuitem: "New window with profile". May launch a new window of Lilyterm with specified profile listed in ~/.config/lilyterm/. * New menuitem: "Save settings as". May save the settings into a new profile. * Now [transparent_background] and [background_color] may use at the same time even though the window is not composited. * Set the default value of profile option "scrollback_lines" to -1, It means the lines of scrollback history is unlimited. VERY THANKS to caleb for this idea. * The default key for move_tab_forward changed into "Ctrl ]". * The default key for move_tab_backward changed into "Ctrl [". 2010-02-26 Lu, Chao-Ming (Tetralet) version 0.9.9~pre4 New Feature: * The default key for "move_tab_forward" recover to "Ctrl Left". The default key for "move_tab_backward" recover to "Ctrl Right". * New profile option: "execute_command_whitelist". Don't need to confirm for executing a program if it's in the whitelist. * New profile option: "execute_command_in_new_tab". May launch executed command in a new tab of last actived window, instead of opening a new window. It is enabled by default. Thanks to nasofe for this idea. * New profile option: "foreground_program_whitelist". If a program is running on foreground, Don't need to confirm for terminating it if it's in the whitelist. * New profile option: "background_program_whitelist". If a program is running in background, Don't need to confirm for terminating it if it's in the whitelist. * New profile option: "show_close_button_on_tab". May Show a close button [X] on current tab. It is enabled by default. Thanks Andrew for this idea. * New profile option: "show_close_button_on_all_tabs". May Show a close button [X] on all tabs. It is disabled by default. * Show a list of all running program of a LilyTerm window and confirm to close it if click the [X] of the window title. 2010-02-19 Lu, Chao-Ming (Tetralet) version 0.9.9~pre3 FIX: * Better behavior when closing multi-page and confirming to close running application. * Trying not to use kill() when there is no child process of this page, or the bash history will not write back to ~/.bash_history. Thanks to Douglas McFadzean, 老杜, winlin, and robert for reporting this bug. * Some compile warning under Debian Lenny AMD64 system. * "confirm_to_execute_command" will always set to "1" when starting up without -e option. VERY THANKS to Douglas McFadzean for reporting this bug. New Feature: * Man page updated. * New profile option: "show_exit_menu". May enable/disable menu item [Exit LilyTerm]. It is disabled by default. * The default key for move_tab_forward changed into "Ctrl Insert". * The default key for move_tab_backward changed into "Ctrl Delete". * A confirm window when trying to close a tab with child process in it, and an option to use kill() or not. 2010-02-03 Lu, Chao-Ming (Tetralet) version 0.9.9~pre2 FIX: * [New tab with specified locale] will always set the encoding of new tab to "ANSI_X3.4-1968". 2010-02-02 Lu, Chao-Ming (Tetralet) version 0.9.9~pre1 FIX: * Ignore anything beyond -e or -x options. VERY THANKS to Douglas McFadzean for reporting this stupid bug. New Feature: * Code cleanup. * Added a man page. * Update the year of copyright to 2008-2010. Thanks to caleb for reporting this bug. * Added a -? command option. * New profile option: "confirm_to_execute_command". May disable/enable the confirm dialog when executing a command. It is enabled by default. VERY THANKS to letoh and Douglas McFadzean for this idea. * New profile option: "encodings_list" and "locales_list". Profile option "locales_list" is splited into two options: "encodings_list" and "locales_list". Please review and update your profile to response this change. 2009-12-15 Lu, Chao-Ming (Tetralet) version 0.9.8 FIX: * Wrong pages may be closed when adjusting the color of page name. * Wrong pages may be closed after confirm to close multi pages. * New added tab may not get focus correctly, and it may cause segfault if close this tab immediately. * The window title may not be updated when creating a new window. * A compile warning when using clang as default compiler. VERY THANKS to caleb for reporting this bug. New Feature: * Applied updated German translation. VERY THANKS to Mario Blättermann. * Applied updated Turkish translation. VERY THANKS to Samed Beyribey. * Applied updated Simplified Chinese translation. VERY THANKS to caleb. * A check box to exit lilyterm directly when closing multi pages or terminating a running command. * May disable/enable the confirm dialog when closing multi pages via editing the profile. It is disabled by default. * Using -l/--login option to make the shell be invoked as a login shell. VERY THANKS to caleb for reporting this bug. * Support gnome-default-applications-properties, may configure lilyterm as a default x terminal emulator entry in the default applications preferences in GNOME control center. Please see the following links for more details: http://live.gnome.org/ControlCenter/AddingDefaultApplications You need to complie lilyterm with gnome-control-center-dev package (>2.26.0 I think) to enable this options. VERY THANKS to caleb for reporting this bug and providing the lilyterm.xml. * New menu item: [Dim text when inactive]. * New menu item: [Exit LilyTerm]. 2009-9-6 Lu, Chao-Ming (Tetralet) version 0.9.7 Relicense under GPLv3. Drop the support of gtk+2 < 2.10 Due to the huge changes of profile, the configure file is renamed to lilyterm.conf. Redesign the web site. VERY THANKS to Cameron Sampson. FIX: * Use g_get_current_dir() instead of g_getenv("PWD"). (0.9.7~pre1) VERY THANKS to caleb for reporting this bug. * The window title will be updated when losing focus. (0.9.7~pre1) * Fix the encoding of 2nd LilyTerm if it's launched with "zh_TW lilyterm" (not "zh_TW.Big5 lilyterm") when the 1st LilyTerm is launched with "zh_TW.UTF-8 lilyterm". (0.9.7~pre7) * Better behavior when run with LC_ALL=zh_TW (not zh_TW.Big5). (0.9.7~pre7) Thanks to Balázs Hámorszky for reporting and testing this bug. * Using gdk_spawn_on_screen_with_pipes() instead of vfork()/execvp() when clicking on a hyperlink, or it will cause zombie process. (0.9.7~pre8) Thanks to icman for reporting this bug. * Fixed a double free() segfault bug in update_page_name(). (0.9.7~pre8) VERY THANKS to Balázs Hámorszky for reporting this bug. * Function keys don't work with ibus >= 1.1.0.20090508. ibus will modify the value of key->state causing lilyterm could not get correct key value. VERY THANKS to nasofe for reporting this bug. (0.9.7~pre11) * Better behavior if there were " " in environments or -e option. (0.9.7~pre13) * Sometimes the tab name won't update to pwd when exiting from a running command. (0.9.7~pre14) * A segfault bug if LC_* is unset in environments. VERY THANKS to caleb for reporting this bug. (0.9.7~pre14) * A lot of memory leak fix with valgrind. (0.9.7~pre14) * A strange segfault error when using GSList with menuitem. Thanks to YoungKing for reporting this bug. (0.9.7~pre14) * Better behavior when handling environments. (0.9.7~pre15) * A strange "dialog(20): menu_active_window = NULL" dialog after a new version of LilyTerm was installed. Thanks Aeglos Lin for reporting this bug. (0.9.7~pre15) * The VTE_CJK_WIDTH is setted to 'narrow' by default. (0.9.7~pre15). * The environ and command for hyperlink should be separated with . (0.9.7~pre15) * Needless "MODE1" (=Alt) in [Get Function Key Value]. (0.9.7~pre16) * Wrong tab may be closed when confirming to close multi tabs. (0.9.7~pre17) * The tabs bar won't be shown when changing the tab's color if it was set to hidden manual. (0.9.7~pre17) * The geometry may be incorrect when recover from fullscreen. Thanks BV1AL for reporting this bug. (0.9.7~pre18) * Can't launch the later LilyTerm window in current pwd. (0.9.7~pre18) * Using to closing current tab may show incorrect running foreground cmdline on dialog. (0.9.7~pre19) * The tab name will not be updated if the text is non-UFT-8. (0.9.7~pre19) * Update the year of copyright to 2008-2009. Thanks to caleb for reporting this bug. (0.9.7~pre19) * A strange "dialog(3): menu_active_window = NULL" dialog when logout from X. (0.9.7~pre20) * Can't use relative path to specify the profile. Thanks BV1AL for reporting this bug. (0.9.7~pre20) * Don't take the parameter after -e option. (0.9.7~pre20) * The default key for "Hide window decoration and full screen" changed to . Thanks BV1AL for reporting this bug. (0.9.7~pre21) * Add "src/profile.c" to po/POTFILES.in. Thanks oahong for reporting this bug. (0.9.7) * Bold text will also be dim when lost focus. (0.9.7) * The geometry may be incorrect when draging a page. (0.9.7) * The text of running command for hyperlink on error dialog will be separated with space (not tab). (0.9.7) * Better compatibility with hyperlink. Now it supports "," and ";" in the URL. Thanks BV1AL for reporting this bug. (0.9.7) New Feature: * New menu item: [Copy URL], [Copy] and [Paste], But it is disabled by default. (FIX: enabled by default in 0.9.7~pre16) You may enable it via editing the profile. (0.9.7~pre6) VERY THANKS to Balázs Hámorszky for the patch and idea. * Applied initial Turkish translation. (0.9.7) VERY THANKS to Samed Beyribey. * Applied initial Simplified Chinese translation. (0.9.7~pre1) VERY THANKS to caleb. * Applied updated German translation. (0.9.7) VERY THANKS to Mario Blättermann. * Drag and drop a tab to another LilyTerm window, or drop it to root window for creating a new LilyTerm window. (0.9.7~pre1) * Add -d/--directory command line options support. (0.9.7~pre1) * New menu item: [Show the tabs bar] and [Hide the tabs bar]. For drag and drop a single tab easier. (0.9.7~pre1) * New menu item: [Cursor Blinks]. (0.9.7~pre1) Thanks Hydonsingore for this idea. * Use to switch fullscreen/unfullscreen state. (0.9.7~pre2) Thanks BV1AL for this idea. BTW, fluxbox don't work well with this function, Please update to fluxbox 1.1.1 to fix this problem. * May custom the ansi color theme via editing the profile. (0.9.7~pre3) Please click menu item [Save Settings] first, then edit it manually. Possible values are linux, xterm, rxvt, tango, and vte_fixed. The default value is "vte_fixed". (0.9.7~pre5) Thanks gnome-terminal and caleb for the color codes. * May custom the ansi colors used in terminal respectively via editing the profile. (0.9.7~pre3) Thanks 予兒 and freealan for this idea. * New menu item: [Adjust the brightness of ANSI colors]. (0.9.7~pre4) * New menu item: [Audible Bell]. (0.9.7~pre5) * May enable visible bell via setting `visible_bell = 1' in profile. Thanks freealan for this idea. (0.9.7~pre5) * May using to dump the run time data of current vte for debugging if compiled with -DDEBUG. (0.9.7~pre7) * Add a format version in profile. (0.9.7~pre12) * Add a socket version when sending socket data. (0.9.7~pre12) * Support -T/--title option. (0.9.7~pre12) Please visit the following URL for more details: http://www.debian.org/doc/debian-policy/ch-customized-programs.html. * A confirm dialog for -e option. (0.9.7~pre13) * Bold the command line in the confirm dialog for -e option. (0.9.7~pre14) * Bold the key value in the [Get the function key value] dialog. (0.9.7~pre14) * May custom the 'emulate terminal type' via editing the profile. default value is 'xterm'. (0.9.7~pre15) * The scrollbar will be hidden if menu item [Scrollback Lines] is disabled. Thanks BV1AL for this idea. (0.9.7~pre15) * The text of vte will be dim when lost focus. May use "inactive_brightness =" in profile to disable this feature. (0.9.7~pre15) * Hide the scrollbar when startup via editing the profile. (0.9.7~pre15) * May custom the 'Delete' or 'Backspace' keys values via editing the profile. (0.9.7~pre15) Thanks oahong and caleb for this idea. * Menu item [Copy] will copy to the pclipboard too. * The tab bar and scroll bar will hidden when fullscreen. (0.9.7~pre16) Thanks BV1AL for this idea. * Menu item [Copy URL], [Copy] and [Paste] are enabled by default. (0.9.7~pre16) * The default function key of fullscreen is changed to . (0.9.7~pre17) * May use 'true_fullscreen =0/1' to control the tabs bar and scroll bar will be hidden or not when fullscreen. Thanks caleb for this idea. (0.9.7~pre17) * Bold the profile path in the dialogs. (0.9.7~pre17) * fullscreen was splited into two function keys: (0.9.7~pre18) = Full window, hide window decoration and fullcreen. = Also Hide tab bar and scroll bar when fullscreen. * Better behavior when keeping window geometry. (0.9.7~pre18) * Support for window title, like xterm. (0.9.7~pre18) Thanks lun-b612 and adrian for this idea. (0.9.7~pre18) * Convert the text on tab to UTF-8 if the encoding of this tab is non-UTF8. (0.9.7~pre19) * Shows a tool tips on tab. (0.9.7~pre20) * Reformated profile. (0.9.7~pre20) * A warning dialog if the specified profile is invalid. (0.9.7~pre20) * Convert the text on the dialog to UTF-8 if the encoding of this tab is non-UTF8. (0.9.7~pre21) * Add version info on "Usage" dialog, and the text is also updated. Thanks BV1AL for this idea. (0.9.7~pre21) * Better support if the profile is a symbolic link. (0.9.7~pre21) Thanks letoh and lloydhuang for the technique support. * No warning dialog if there is no "format version" in profile. Thanks caleb for this idea. (0.9.7) * The new page will be placed next to the current page. (0.9.7) 2008-7-25 Lu, Chao-Ming (Tetralet) version 0.9.6 For GJK users: If your vte is >= 0.16.14 (Debian Lenny), and you want to enable VTE_CJK_WIDTH, Please make sure that you have applied the patch on http://bugzilla.gnome.org/show_bug.cgi?id=542795. FIX: * Better behavior when run with LC_ALL=zh_TW (not zh_TW.Big5). Thanks Balázs Hámorszky for reporting this bug. * The label of GtkNotebook won't be on-focus-able when tab number = 2. Thanks PCMan for fixing this bug. * Better compatibility with hyperlink. New Feature: * Applied updated German translation. VERY THANKS to Mario Blättermann. * Switch VTE_CJK_WIDTH = wide/narrow via right click menu. * Better hyperlink support. You may specify the VTE_CJK_WIDTH and environment used for the hyperlink via editing the profile. * Every LilyTerm window may use separate environment in single process mode. * <`> will disable mouse right click menu too. 2008-7-8 Lu, Chao-Ming (Tetralet) version 0.9.5 FIX: * Better compatibility with -e command line option. New Feature: * Applied updated German translation. VERY THANKS to Mario Blättermann. * Hyperlink support. You may specify the command used for the hyperlink via editing the profile. You may use <`> to disable it for temporarily. You may disable it by setting `enable_hyperlink = 0' in profile. * Disable font anti-alias via setting `font_anti_alias = 2' in profile. * Make the tab to fill the tab bar via setting `fill_tab_bar = 1' in profile. * Use `tabbar_position = 1' to move the tab bar to the bottom of window. * Use `scrollbar_position = 2' to place the scroll bar on the right of vte terminal. Using `scrollbar_position = 0' to don't use scroll bar. * You may specify the font/window resize ratio by editing the `font_resize_ratio' and `window_resize_ratio' in profile. * Support audible_bell by default. 2008-7-1 Lu, Chao-Ming (Tetralet) version 0.9.4 For GCIN Users: If it always segfault when close the 1st page of LilyTerm, Please update GCIN to 1.4.1 to avoid this problem. LilyTerm supports 'Single Process Mode' from this version. When LilyTerm is running with 'Single Process Mode', Multi LilyTerm will use only one process. The newer launched LilyTerm will be just a new window of 1st launched LilyTerm, so that we may reduce the usage of memory. Unlike roxterm, gnome-terminal or xfce4-terminal, Every single window of LilyTerm is independent. They may has it's own settings and profile, and won't bother each other. The disadvantage of 'Single Process' mode is, if the LilyTerm crashed, All the LilyTerm will be dead at the same time. You may use -s/--separate command line options to run LilyTerm in 'Separate Process Mode'. New Feature: * Applied updated German translation. VERY THANKS to Mario Blättermann. * A warning dialog when creating child process fail. * Add [New tab with specified locale] to right click menu. You need to set the locales_list with full locale name in profile to enable this. for instance with locales_list = ja_JP.EUC-JP zh_CN.GB2312 zh_TW.Big5. * If you used a specified profile with -p option, [Save Settings] will save the settings on the specified profile. * Add -x and -t/--tab command line options support. -x is the same as -e/-execute. For compatible with gnome-terminal. (BTW, xterm is support -e only.) And, you may use -t/--tab {number} to open multi tabs when startup. * Shows the encoding on page name. You may disable it by put `page_shows_encoding = 0' in your profile. 2008-6-7 Lu, Chao-Ming (Tetralet) version 0.9.3 The default function key to close a tab is changed to . FIX: * Applied updated German translation. VERY THANKS to Mario Blättermann. * The page name won't be updated if page_shows_current_cmdline = 0 and page_shows_current_dir = 1. * Better compatibility with fluxbox and evilwm. Now the size of LilyTerm should be increased/decreased correctly in all window managers. New Feature: * The text on tab will be bold when on focus or action. You may use bold_current_page_name = 0 in profile to disable this. * The text color of tab will be changed if running command with root privileges. * The text color can be changed by right click menu. 2008-5-27 Lu, Chao-Ming (Tetralet) version 0.9.2, a hotfix for 0.9.1 FIX: * All the function keys will be disabled after confirm to close a running vte terminal. 2008-5-25 Lu, Chao-Ming (Tetralet) version 0.9.1 The size of LilyTerm can't decrease in fluxbox and evilwm. They are insensitive in gtk+2 focus event, which is used for keep correct geometry in LilyTerm. There is another project named LilyTerm already, so that LilyTerm will renamed to LunaTerm, and relicense to GPLv3 in next release. FIX: * page_shows_current_cmdline only updates for current page. New Feature: * Applied updated German translation. VERY THANKS to Mario Blättermann. * Support colorful tab. You may specify the color with: page_cmdline_color = darkblue page_dir_color = darkgreen page_custom_color = darkred page_normal_color = black in your profile, or use `use_color_page = 0' to disable it. * Shows the PWD (current directory) on page name. Enable it will NOT cause performance problem. Lilyterm with 100 tabs causes around 2.3% CPU loading on a Celeron 850 PC. You may use `page_shows_current_dir = 0' in profile to disable it. * Shows PWD or Cmdline on page name will stop updating when LilyTerm is not on focus. * You may use `page_width' in your profile to specify the max size of page, and use `fixed_page_width' to fix the size of page width. * Always move window to top-left when initing. * You may use `show_get_function_key_menu' to disable "Get function key value" menu item. * Add comments in profile. 2008-5-9 Lu, Chao-Ming (Tetralet) version 0.9.0 FIX: * don't work under emacs. Thanks yoyo for reporting this bug. * page_shows_current_cmdline only enabled under GNU/Linux for temporary. New Feature: * Applied German translation. VERY THANKS to Mario Blättermann. * New menu item: [Scrollback lines] and [Clean scrollback lines of this tab]. Thanks lpinkliow for this idea. * New menu item: [Change the foreground color] and [Change the background color]. You man move the cursor in the color selection dialog and see the result in the vtebox at the same time. You man use `show_color_selection_menu = 0' in your profile to disable color selection menu items. * New menu item: [Save settings]. DROP: * menu item [Profile sample] is obsoleted. 2008-5-1 Lu, Chao-Ming (Tetralet) version 0.8.9 FIX: * rgba won't be enabled by default if the screen is composited. * Better compatibility when the font rendering / theme changed too fast. New Feature: * Window opacity is supported, and it will enabled by default if the screen is composited. You may use `window_opacity = 0.15' in your profile to specify the opacity. You may use `transparent_window = 0' in your profile to disable it. * May use `show_transparent_menu = 0' to disable transparent/opacity menu items. * New menu item: [Transparent Window] and [Window Opacity]. 2008-4-27 Lu, Chao-Ming (Tetralet) version 0.8.8 FIX: * Better compatibility with evilwm. Thanks to caleb for reporting this bug. * rgba don't work with xcompmgr even though `use_rgba = 1'. Thanks to caleb for reporting this bug. * Better behavior when using transparent background. * Better behavior when resizing font/window size. New Feature: * [Increase window size] and [Decrease window size] will resize fonts with */ 1.12. * Using <+> and <-> will resize fonts with +- 1. 2008-4-25 Lu, Chao-Ming (Tetralet) version 0.8.7 FIX: * Now LilyTerm works fine with kwin. (It is the window manager of KDE). Thanks to swyear and caleb for reporting this bug. * Better compatibility with some xorg build in video modules when rgba is enabled. If you still encounter trouble, like black screen, transparent or colorless text, please insure the following setting: option "XAANoOffscreenPixmaps" is in your /etc/X11/xorg.conf. * Better compatibility when the font rendering / theme changed. * Use <`> (NOT <~>) to disable function keys. Thanks to BV1AL for reporting this bug. * `screen_width' is rename to `column' in profile. * `screen_height' is rename to `row' in profile. New Feature: * If you're using a composited window manager, rgba will be enabled by default. You may use use_rgba = 0 to turn off True Opacity if you're using a composited window manager but you don't want to enable it in LilyTerm. You may use use_rgba = 1 to turn on True Opacity if you're using xcompmgr, which can't be resolved by gdk_screen_is_composited(). * you may use show_resize_menu = 0 to disable [Increase window size], [Decrease window size], [Reset to default font/size] and [Reset to system font/size] in menu. * Now [Change Font] in right click menu will change the font of all tabs. * Now [Transparent Background] and [Background Saturation] will apply to all tabs. * New menu item: [Reset to default font/size] will reset every tab to user default font and size. * New menu item: [Reset to system font/size] will reset every tab to system default font (Monospace 12) and size (80x24). DROP: * menu item [Change Font for current tab] is obsoleted. 2008-4-19 Lu, Chao-Ming (Tetralet) version 0.8.6 New Feature: * support gtk-alternative-button-order. * Use <`> to disable/enable function keys. * Support true opacity (rgba) now. (auto detect the screen is composited or not) FIX: * The size of vtebox won't be changed if the font rendering / theme changed. (hope so.) 2008-4-12 Lu, Chao-Ming (Tetralet) version 0.8.5 FIX: * The serial no of the tab will shown when reorder the tab if page_names_no=0. * Use to select all the text in vte box. is used in rtorrent to start a torrent download. * The size of vtebox won't be changed if the themes changed. New Feature: * Reuse the page names. * Shows the foreground program command on tab. * Shows the foreground program command on window title. * Confirm to close a tab if there was a running application. * Use kill() to kill running shell when use or to force close this tab. or the sub-process of this tab will be closed at the same time. * Add [Change the font of every tab] to menu. 2008-4-7 Lu, Chao-Ming (Tetralet) version 0.8.4: FIX: * `screen_with' is rename to `screen_width' in profile. New Feature: * switch to 1st ~ 12th tab. * Add [Get the function key value] to menu. * Mutli tab names. but it had been disabled by default. You need add page_names = blah blah blah (separate with space) in profile to enable it. * Add a serial no in tab name. * Use to select all the text in vte box. is the function key of screen. * Use to copy the selected text to clipboard. is used to terminate a program in shell. * Use to paste the text in clipboard. * Use <+> to Increase font size * Use <-> to Decrease font size * Use to Reset font_size * Add [Increase window size], [Decrease window size], [Reset font and window size] to right click menu. * Add [Profile sample] to menu. * Add [Usage] to menu. * Add [Change font for this tab] to menu. * Menu have icons now. 2008-4-1 Lu, Chao-Ming (Tetralet) version 0.8.3: New Feature: * Input method menu. but it had been disabled by default. You need add show_input_method_menu = 1 in your profile to enable it. * System config supported. /etc/xdg/lilyterm.rc by default. * Confirm before close multi tabs. FIX: * Fixed a segmentation fault error when closing LilyTerm by click [X] on the window title bar directly. Using autotools to generate configure/Makefile now. 2008-3-20 Lu, Chao-Ming (Tetralet) version 0.8.2: FIX: * A patch from caleb to trim lilyterm. THANKS to caleb! New Feature: * Change the background saturation by right click. * Now supports -u/--user_profile to use a specified profile. * Reset current tab by right click. 2008-3-19 Lu, Chao-Ming (Tetralet) version 0.8.1: No more input method patches. Please patch libvte instead! Now LilyTerm works fine with SCIM. New Feature: * Using transparent background or not by right click. * May use `pre_tab_key = NULL' to disable a function key. 2008-3-16 Lu, Chao-Ming (Tetralet) version 0.8.0: FIX: * The window size of Lilyterm now can resize correctly when adding/removing tabs without dirty patches. * The window size of Lilyterm will change if opened too many tabs. New Feature: * Add L10n/i18n support. Call for translators! * Add command line options support. Now -h/--help -v/--version -p/-profile and -e/-execute supported. 2008-3-14 Lu, Chao-Ming (Tetralet) version 0.7.9: FIX: * - was transfered into - when solving function key. Thanks Silice for reporting this bug. New Feature: * Use to move current page forward. * Use to move current page backward. * Use to move current page to first. * Use to move current page to last. 2008-3-12 Lu, Chao-Ming (Tetralet) version 0.7.8: FIX: * The size of resized window will be recovered to original size if opening a new tab later. * Improve (again) the performance when solving function key. Add a refile example `lilyterm.rc' at /usr/share/doc/lilyterm/examples/. 2008-3-11 Lu, Chao-Ming (Tetralet) version 0.7.7: `pre_tab_key' is rename to `prev_tab_key' in rcfile. FIX: * FIX: don't work in screen. New Feature: * show the text column x row information when move/drag the window with mouse. (need Window Manager supports it too.) * The window of LilyTerm now can resize correctly. * The window increment when resizing is based on the size of single character. * May use `pre_tab_key = ' to disable a function key. But it won't increase the performance. 2008-3-8 Lu, Chao-Ming (Tetralet) version 0.7.6: New Feature: * Now we can use to change the name of current tab. 2008-3-7 Lu, Chao-Ming (Tetralet) version 0.7.5: FIX: * Function keys won't work if there is no default rc file. a stupid bug. 2008-3-7 Lu, Chao-Ming (Tetralet) version 0.7.4: FIX: * Will go to next tab when close current tab. a stupid bug... * Improve (again) the performance when solving function key. New Feature: * LilyTerm has a window icon now. 2008-3-5 Lu, Chao-Ming (Tetralet) version 0.7.3: New Feature: * Improve the performance when solving function key. * The directory of new tab will use current tab's PWD. 2008-3-4 Lu, Chao-Ming (Tetralet) version 0.7.2: New Feature: * Now we can configure the function key via config file. * Default Default Keys: New Tab: Ctrl T Close Tab: Ctrl W Pre Tab: Ctrl Page_Up Next Tab: Ctrl Page_Down First Tab: Ctrl Home Last Tab: Ctrl End COPYING: Change from 3-clause BSD to 2-clause BSD. Add Copyright in every file. Add lilyterm.desktop. Add a lots of LilyTerm icons. 2008-3-2 Lu, Chao-Ming (Tetralet) version 0.7.1: FIX: * A segmentation fault error fixed. VERY THANKS to letoh.bbs@bbs.sayya.org! * Default Function Keys: Use to add a new page. Use to close current page. This bug is reported by letoh: was used by vim to delete a word. was used by vim to pop tag stack. New Feature: * Use to switch to the first page. * Use to switch to the first page. * to pase clipboard. It was done in libvte. Makefile: Remove useless '--libs' when compile *.o. Thanks to letoh again! INSTALL: Update some typo. `make' will compile *with* the dirty im-patch. `make no-im-patch' will complile without the dirty im-patch. AUTHORS: Update homepage, blog, phorum, IRC information. 2008-3-2 Lu, Chao-Ming (Tetralet) version 0.7.0: * Initial release. * Started recording ChangeLog. 2008-2-25 Lu, Chao-Ming (Tetralet) version 0.1.0 * Initial revision. Makefile000066400000000000000000000017511246562641500125350ustar00rootroot00000000000000include .default -include .config DIR = src data ifeq ($(NLS), Y) DIR += po endif .PHONY: all all: $(DIR) .PHONY: src src: @ $(MAKE) -C src .PHONY: data data: @ $(MAKE) -C data .PHONY: po po: @ $(MAKE) -C po clean: @ $(MAKE) -C src clean @ $(MAKE) -C data clean @ $(MAKE) -C po clean install: all @ $(MAKE) -C src install @ $(MAKE) -C data install ifeq ($(NLS), Y) @ $(MAKE) -C po install endif uninstall: @ $(MAKE) -C src uninstall @ $(MAKE) -C data uninstall ifeq ($(NLS), Y) @ $(MAKE) -C po uninstall endif @ if [ -z "`ls -A "$(DESTDIR)/$(PREFIX)"`" ]; then \ $(ECHO) "===========================================" ; \ $(PRINTF) "\033[1;31m** WARNING: \"\033[1;34m$(DESTDIR)/$(PREFIX)\033[1;31m\" is empty. Please remove it manually if necessary.\033[0m\n" ; \ $(ECHO) "===========================================" ; \ fi distclean: clean @ if [ -f .config ]; then \ $(PRINTF) "\033[1;35m** deleting \033[1;32m.config\033[1;35m ...\033[0m\n" ; \ rm .config ; \ fi Makefile.am000066400000000000000000000000261246562641500131230ustar00rootroot00000000000000SUBDIRS = src po data NEWS000066400000000000000000000000001246562641500115560ustar00rootroot00000000000000README000066400000000000000000000143731246562641500117610ustar00rootroot00000000000000NAME LilyTerm - A light and eazy-to-use terminal emulator for X. SYNOPSIS lilyterm [-? | -h | --help] [-T TITLE | --title TITLE] [-t NUMBER | --tab NUMBER] [-n TAB NAMES | --tab_names TAB NAMES] [-d DIRECTORY | --directory DIRECTORY] [-g GEOMETRY | --geometry GEOMETRY] [-l | -ls | --login] [-ut] [-H | --hold] [-s | --separate] [-j | --join] [-p | --profile] [-u PROFILE | --user_profile PROFILE] [-v | --version] [-e COMMAND | -x COM MAND | --execute COMMAND] DESCRIPTION LilyTerm is a terminal emulator for the X Window System, based on the libvte library, and aims to be fast and lightweight. OPTIONS -? | -h | --help Display a brief help message. -T TITLE | --title TITLE Specify the window title. -t NUMBER | --tab NUMBER Open multi tabs when starting up. -n TAB NAMES | --tab_names TAB NAMES Specify the tab names, separate with . -d DIRECTORY | --directory DIRECTORY Specify the init directory when starting up. -g GEOMETRY | --geometry GEOMETRY Specify the geometry of window when starting. A reasonable example value is "80x24+0+0", witch means "width x height {+-} xoffset {+-} yoffset" (without space). -l | -ls | --login Make the shell invoked as a login shell. -ut Disable recording the session in lastlog, utmp and wtmp. -H | --hold Hold the terminal window open when the command following -e/-x ter minated. -s | --separate Run in separate process. -j | --join Integrate new created tabs to the last accessed window. It may be useful for launching multi commands with LilyTerm in a shell script. -p | --profile Got a profile sample. -u PROFILE | --user_profile PROFILE Use a specified profile. -v | --version Show the version information. -e COMMAND | -x COMMAND | --execute COMMAND Run a command when starting up. Must be the final option. KEYBOARD CONTROL The following key bindings may custom or disable by the right click menu [Set key binding]. <> Disable/Enable hyperlinks, function keys and right click menu for temporary. Add a New tab with current directory. Switch to Prev/Next tab. Switch to First/Last tab. <[/]> Move current tab Forward/Backward. Move current tab to First/Last. Switch to 1st ~ 12th tab. Select all the text in the Vte Terminal box. <+/-/Enter> Increase/Decrease/Reset the font size of current tab. Switch between fullwindow/unfullwindow and fullscreen/unfullscreen state. Emulate a mouse Scroll Up/Down event on Vte Termi nal box. Asks to scroll Up/Down 1 line on Vte Terminal box. Asks to scroll Up/Down on Vte Terminal box. Copy the text to clipboard / Paste the text in clipboard. Copy the text to primary clipboard / Paste the text in primary clipboard. i.e. Emulate a middle button mouse click to copy/paste the text. Some key bindings that disabled by default but maybe useful: Close current tab. Using or exit to close tabs is recommended. Open a new window with current directory. Rename the current tab. FILE /etc/xdg/lilyterm.conf System configure file ~/.config/lilyterm/default.conf Users profile. Use [Save settings] in the right click menu to save the current tabs settings as default to the specified profile. TIPS Display UTF-8 character under C locale Execute the following command under LilyTerm: bind "set convert-meta off" bind "set output-meta on" And use the right click menu to set the text encoding to "UTF-8". Launch LilyTerm under a chroot jail Extract xauth info to a file (under X): xauth extract /PathToChroot/tmp/display $DISPLAY Mount the devpts device and /tmp (may not necessary) before chroot into a chroot jail: mount /dev/pts /PathToChroot/dev/pts -t devpts mount -o bind /tmp /PathToChroot/tmp (may not necessary) Merge the extracted xauth info and set the DISPLAY environ after chroot into the chroot jail: xauth merge /tmp/display export DISPLAY=:0 Launch LilyTerm directly, or run it under Xnest/Xephyr: xinit ~/.xinitrc -- /usr/bin/Xnest :1 -ac -geometry 800x600 or xinit ~/.xinitrc -- /usr/bin/Xephyr :1 -ac -screen 800x600 and dont work under VIM: Use the following command to turn off flow-Control under LilyTerm: stty raw or stty -ixon BSD Users: Please mount the procfs before launch LilyTerm: mount -t procfs procfs /proc ENVIRONMENT TERM Sets what type of terminal attempts to emulate. Please always set to "xterm" under LilyTerm. VTE_CJK_WIDTH Controls the width of some ideographs should be "single width (narrow)" or "double width (wide)" in a vte temi nal. This environment should be set before creating a vte widget. In LilyTerm, you may set the VTE_CJK_WIDTH of a new tab to wide with right click menu New tab with specified locale -> xx_XX.UTF-8 (Wide) or UTF-8 (Wide). PROMPT_COMMAND Customs the "Window Title" for shell. The following is a reasonable example ~/.bashrc for bash: case $TERM in xterm*) PROMPT_COMMAND=echo -ne "\033]0;${HOST NAME}: ${PWD}\007" ;; *) ;; esac The following is a reasonable example ~/.cshrc for csh/tcsh: switch ($TERM) case "xterm*": setenv TITLE "%{\033]0;%m: %~\007%}" breaksw endsw set prompt = "${TITLE}%# " Please visit http://tldp.org/HOWTO/Xterm-Title.html for more details. AUTHOR Lu, Chao-Ming (Tetralet) SEE ALSO xterm(1) TODO000066400000000000000000000017441246562641500115670ustar00rootroot00000000000000BUG: the dialog of find text behavior strange. recheck the geometry of gtk2. the text of running command is wrapped? GtkWidget in unit test... [Open new tab with locale] -> [Set as default locale] check window_resizable add a new tab, and increase the font size of 1st tab, close 2nd tab, the window size is incorrect. check every externs... the environ won't copy from last tab <- very hard to fix it. * antialias don't work in new libvte ** [LilyTerm Default & System Default] don't behave the same? TODO: * reload settings (Window Title may cause problems) * apply to every window * response from unix sockets check vte_data->column ** confirm to save settings before exit * double click to select more... add programs to 'whitelist' when warning dialog appeared. sort menu via profile a scroll bar menu Save settings that diff and full ** check the focus of dialogs * replace sleep with time_out ** check the pagename if page_shows_cmdline = 0 ** fullscreen and fullwindow in profile. autogen.sh000077500000000000000000000035741246562641500131030ustar00rootroot00000000000000#!/bin/sh CONF_FILE='.default' AC_FILE='configure.ac' Replace_Parameter() { # Find the parameter from CONF_FILE Parameter=`grep "^$* = " $CONF_FILE | sed -e "s|$* = ||g" | tr -d '\\\\'` if [ $? != 0 ]; then echo "Can Not find the string for "$*" from $CONF_FILE. exit..." >&2 exit 1 fi if [ -n "`echo $Parameter | grep '^\$(shell .*)$'`" ]; then Parameter=`$(echo $Parameter | sed -e 's/^\$(shell \(.*\))$/\1/g')` fi echo "$AC_FILE: Replacing variable '$*' with '$Parameter'..." >&2 # Replace the parameter in AC_FILE sed -i "s|\$_$*|$Parameter|g" $AC_FILE if [ $? != 0 ]; then echo "Something goes wrong when replace '$*' with '$Parameter' for $AC_FILE. exit..." >&2 exit 1 fi } echo "" Replace_Parameter BINARY Replace_Parameter PACKAGE Replace_Parameter VERSION Replace_Parameter BUGREPORT Replace_Parameter ISSUES Replace_Parameter YEAR Replace_Parameter AUTHOR Replace_Parameter MAINSITE Replace_Parameter GITHUBURL Replace_Parameter BLOG Replace_Parameter WIKI Replace_Parameter IRC Replace_Parameter LANG_LIST AC_FILE='src/Makefile.am' Replace_Parameter BINARY echo "" # for GTK3+ pkg-config --cflags gtk+-2.0 > /dev/null 2>&1 if [ $? != 0 ]; then sed -i 's/^AM_PATH_GTK_2_0.*/PKG_CHECK_MODULES([GTK], [gtk+-3.0])/g' configure.ac pkg-config --cflags vte-2.91 > /dev/null 2>&1 if [ $? = 0 ]; then sed -i 's/^PKG_CHECK_MODULES(vte, \[vte >= .*/PKG_CHECK_MODULES(vte, [vte-2.91 >= 0.38.0],, AC_MSG_ERROR([You need libvte-2.91 >= 0.38.0 to build $_PACKAGE]))/g' configure.ac sed -i 's/^lilyterm_LDADD\(.*\)$/lilyterm_LDADD\1 -lX11/g' src/Makefile.am else sed -i 's/^PKG_CHECK_MODULES(vte, \[vte >= .*/PKG_CHECK_MODULES(vte, [vte-2.90 >= 0.30.0],, AC_MSG_ERROR([You need libvte-2.90 >= 0.30.0 to build $_PACKAGE]))/g' configure.ac fi fi set -x aclocal autoheader intltoolize --automake --copy --force automake --add-missing --copy autoconf configure000077500000000000000000000247351246562641500130130ustar00rootroot00000000000000#!/bin/sh PACKAGE=`grep "^PACKAGE = " .default | awk -F ' = ' '{print $2}'` PREFIX=`grep "^PREFIX = " .default | awk -F ' = ' '{print $2}'` DATADIR=`grep "^DATADIR = " .default | awk -F ' = ' '{print $2}'` ETCDIR=`grep "^ETCDIR = " .default | awk -F ' = ' '{print $2}'` BSD=0 UNAME="`uname`" if [ "$UNAME" = "FreeBSD" -o "$UNAME" = "OpenBSD" -o "$UNAME" = "NetBSD" ]; then BSD=1 fi GTK=gtk+-2.0 VERBOSITY=N DEBUG=N NLS=Y SAFEMODE=Y BACKGROUND=N STRIP=N GNOME_CONTROL_CENTER=Y GTK_SPC=0 NLS_SPC=0 GNOME_CONTROL_CENTER_SPC=0 if [ -z "$CC" ]; then CC=gcc fi if [ -z "$CFLAGS" ]; then CFLAGS="-Wall -O -g" fi MAKE=`whereis "gmake" | tr -s ' ' '\n' | grep "bin/""gmake""$" | head -n 1` if [ -z "$MAKE" ]; then MAKE=`whereis "make" | tr -s ' ' '\n' | grep "bin/""make""$" | head -n 1` else GMAKE="$MAKE" fi ECHO=`whereis "echo" | tr -s ' ' '\n' | grep "bin/""echo""$" | head -n 1` PRINTF=`whereis "printf" | tr -s ' ' '\n' | grep "bin/""printf""$" | head -n 1` WC=`whereis "wc" | tr -s ' ' '\n' | grep "bin/""wc""$" | head -n 1` ERR() { $PRINTF "\033[1;31m$*\033[0m" >&2 } WARN() { $PRINTF "\033[1;35m$*\033[0m" } INFO() { $PRINTF "\033[1;36m$*\033[0m" } IMPORTANT() { $PRINTF "\033[1;33m$*\033[0m" } NORMAL() { $PRINTF "\033[1;32m$*\033[0m" } CHECK_MESSAGE() { DOTS=30 $ECHO -n " Checking " NORMAL "$*" $ECHO -n " " total=$(($DOTS-`$ECHO "$*" | $WC -m`)) while [ $total -ge 0 ]; do $ECHO -n "." total=$(($total-1)) done $ECHO -n " " } PACKAGE_MESSAGE() { ERR "\n\n Please install " COUNT_PKG=1 for PKG in $*; do if [ $COUNT_PKG -ge 2 ]; then if [ $COUNT_PKG -eq $# ]; then ERR " or " else ERR ", " fi fi ERR "\"" WARN "$PKG" ERR "\"" COUNT_PKG=$(($COUNT_PKG+1)) done ERR " package. ABORT!\n\n" } VERSION_MESSAGE() { ERR "$1 ERROR: " WARN "$2" ERR " > " WARN "$3" ERR " is needed to build $PACKAGE. ABORT!\n\n" } if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]; then $ECHO "" WARN "Usage: $0 [OPTION]... [VAR=VALUE]...\n" $ECHO "" $ECHO "Installation directories:" $ECHO " `INFO '--prefix=PREFIX'` : install in PREFIX (e.g. /usr) `NORMAL '[default: /usr/local]'`" $ECHO " `INFO '--sysconfdir=ETCDIR'` : system conf file install dir `NORMAL '[default: $PREFIX/etc/xdg]'`" $ECHO "" $ECHO "Optional Packages:" $ECHO " `INFO '--with-gtk=2.0|3.0'` : which gtk+ version to compile against `NORMAL '[default: 2.0]'`" $ECHO "" $ECHO "Optional Features:" $ECHO " `INFO '--enable-verbosity'` : enable verbosity output `NORMAL '[default: disable]'`" $ECHO " `INFO '--enable-debug'` : enable debug mode `NORMAL '[default: disable]'`" $ECHO " `INFO '--disable-nls'` : disable Native Language Support `NORMAL '[default: enable]'`" $ECHO " `INFO '--disable-safe-mode'` : disable run in safe mode `NORMAL '[default: enable]'`" $ECHO " `INFO '--enable-background'` : enable background for vte > 0.34.8 `NORMAL '[default: disable]'`" $ECHO "" $ECHO "run \``IMPORTANT 'make clean'`' to clean $PACKAGE builded files." $ECHO "run \``IMPORTANT 'make distclean'`' to clean $PACKAGE builded and configure files." $ECHO "run \``IMPORTANT 'make'`' to build $PACKAGE, include binary, data and translations." $ECHO "run \``IMPORTANT 'make install'`' to install $PACKAGE to your system." $ECHO "run \``IMPORTANT 'make uninstall'`' to unstall $PACKAGE in `NORMAL "$PREFIX"` from your system." $ECHO "" exit 0 fi PKGCONFIG=`whereis "pkg-config" | tr -s ' ' '\n' | grep "bin/""pkg-config""$" | head -n 1` if [ -z "$PKGCONFIG" ]; then ERR "\n ERROR: \`" WARN "pkg-config" ERR "' package is needed to run this configure script. ABORT!\n\n" exit 1 fi for opt do case "$opt" in --enable-verbosity) VERBOSITY=Y ;; --disable-verbosity) VERBOSITY=N ;; --enable-debug) DEBUG=Y ;; --disable-debug) DEBUG=N ;; --prefix=*) PREFIX=`$ECHO $opt | cut -d '=' -f 2` ;; --sysconfdir=*) ETCDIR=`$ECHO $opt | cut -d '=' -f 2` ;; --with-gtk=2.0) GTK_SPC=1 ;; --with-gtk=3.0) GTK=gtk+-3.0 GTK_SPC=1 ;; --enable-nls) NLS_SPC=1 ;; --disable-nls) NLS=N ;; --disable-safe-mode) SAFEMODE=N ;; --enable-background) BACKGROUND=Y ;; --enable-strip) STRIP=Y ;; --enable-gnome-control-center) GNOME_CONTROL_CENTER_SPC=1 ;; --disable-gnome-control-center) GNOME_CONTROL_CENTER=N ;; *) WARN "\n WARN: invalid option \"" IMPORTANT "$opt" WARN "\" !!\n" ;; esac done $ECHO "" # ---- Build Requirement ---- # $PKGCONFIG --exists 'glib-2.0 >= 2.12' > /dev/null 2>&1 if [ $? != 0 ]; then VERSION_MESSAGE "" "Glib" "2.12" exit 1 fi # ---- GTK ---- # if [ "$GTK" = "gtk+-2.0" ]; then CHECK_MESSAGE 'GTK+2' else CHECK_MESSAGE 'GTK+3' fi $PKGCONFIG --cflags $GTK > /dev/null 2>&1 if [ $? != 0 ]; then if [ "$GTK" = "gtk+-2.0" -a $GTK_SPC -eq 0 ]; then $ECHO "[NO]. Trying GTK+3 ..." GTK=gtk+-3.0 CHECK_MESSAGE 'GTK+3' $PKGCONFIG --cflags $GTK > /dev/null 2>&1 if [ $? != 0 ]; then ERR "[NG]" PACKAGE_MESSAGE "libgtk2.0-dev/libgtk-3-dev" exit 1 else INFO "[OK] " WARN "(NOT RECOMMEND)\n" fi else if [ "$GTK" = "gtk+-2.0" ]; then ERR "[NG]" PACKAGE_MESSAGE "libgtk2.0-dev" else ERR "[NG]" PACKAGE_MESSAGE "libgtk-3-dev" fi exit 1 fi else if [ "$GTK" = gtk+-2.0 ]; then $PKGCONFIG --exists 'gtk+-2.0 >= 2.8' > /dev/null 2>&1 if [ $? != 0 ]; then ERR "[NG]" VERSION_MESSAGE "\n\n" "Gtk+2" "2.8" exit 1 fi $PKGCONFIG --exists 'gtk+-2.0 < 2.12' > /dev/null 2>&1 if [ $? != 0 ]; then INFO "[OK]\n" else WARN "[OK]. But using Gtk+2 > 2.12 is recommended to build $PACKAGE.\n" fi else INFO "[OK].\n" fi fi # ---- VTE ---- # if [ "$GTK" = 'gtk+-2.0' ]; then CHECK_MESSAGE 'VTE' VTE=vte else CHECK_MESSAGE 'VTE 0.38' VTE=vte-2.91 fi $PKGCONFIG --cflags $VTE > /dev/null 2>&1 if [ $? != 0 ]; then if [ "$GTK" = 'gtk+-2.0' ]; then ERR "[NG]" PACKAGE_MESSAGE "libvte-dev" exit 1 else $ECHO "[NO]. Trying VTE 0.29 ..." VTE=vte-2.90 CHECK_MESSAGE 'VTE 0.29' $PKGCONFIG --cflags $VTE > /dev/null 2>&1 if [ $? != 0 ]; then ERR "[NG]" PACKAGE_MESSAGE "libvte-2.90-dev" "libvte-2.91-dev" exit 1 else INFO "[OK]\n" fi fi else if [ "$VTE" = 'vte' ]; then $PKGCONFIG --exists 'vte >= 0.12' > /dev/null 2>&1 if [ $? != 0 ]; then ERR "[NG]" VERSION_MESSAGE "\n\n" "VTE" "0.12" exit 1 fi fi INFO "[OK]\n" fi $PKGCONFIG --exists "$VTE < 0.34.8" > /dev/null 2>&1 if [ $? = 0 ]; then BACKGROUND=N fi $PKGCONFIG --exists "$VTE >= 0.38.0" > /dev/null 2>&1 if [ $? = 0 ]; then BACKGROUND=N fi # ---- NLS ---- # if [ "$NLS" = 'Y' ]; then CHECK_MESSAGE 'Native Language Support' GETTEXT=`whereis "msgfmt" | tr -s ' ' '\n' | grep "bin/""msgfmt""$" | head -n 1` if [ -z "$GETTEXT" ]; then if [ $NLS_SPC -eq 1 ]; then ERR "[NG]" PACKAGE_MESSAGE "gettext" exit 1 fi WARN "[NO]\n" NLS=N else INFO "[OK]\n" fi fi # ---- GNOME_CONTROL_CENTER ---- # if [ "$GNOME_CONTROL_CENTER" = 'Y' ]; then GNOME_CONTROL_CENTER_DIR=`pkg-config --variable=defappsdir --define-variable=datadir='$(DATADIR)' gnome-default-applications 2>&1` if [ $? != 0 ]; then if [ $GNOME_CONTROL_CENTER_SPC -eq 1 ]; then CHECK_MESSAGE 'Gnome Control Center' ERR "[NG]" PACKAGE_MESSAGE "gnome-control-center-dev" exit 1 fi GNOME_CONTROL_CENTER_DIR= GNOME_CONTROL_CENTER=N else CHECK_MESSAGE 'Gnome Control Center' INFO "[OK]\n" fi fi $ECHO "" # ---- REPORT ---- # INFO "=================================================\n" IMPORTANT " PREFIX = $PREFIX\n" IMPORTANT " ETCDIR = $ETCDIR\n" if [ "$VERBOSITY" = 'Y' ]; then IMPORTANT " VERBOSITY = $VERBOSITY\n" fi if [ "$DEBUG" = 'Y' ]; then IMPORTANT " DEBUG = $DEBUG\n" else $ECHO " DEBUG = $DEBUG" fi if [ "$NLS" = 'N' ]; then IMPORTANT " NLS = $NLS\n" else $ECHO " NLS = $NLS" fi if [ "$SAFEMODE" = 'N' ]; then IMPORTANT " SAFEMODE = $SAFEMODE\n" else $ECHO " SAFEMODE = $SAFEMODE" fi if [ "$BACKGROUND" = 'Y' ]; then IMPORTANT " BACKGROUND = $BACKGROUND\n" fi if [ "$STRIP" = 'Y' ]; then IMPORTANT " STRIP = $STRIP\n" fi CHECK_CC=`whereis "$CC" | tr -s ' ' '\n' | grep "bin/""$CC""$" | head -n 1` if [ -n "$CHECK_CC" ]; then if [ "$CC" != 'gcc' ]; then IMPORTANT " CC = $CC\n" fi else ERR " CC = $CC\n" fi if [ -n "$CPPFLAGS" ]; then IMPORTANT " CPPFLAGS = $CPPFLAGS\n" fi if [ "$CFLAGS" != '-Wall -O -g' ]; then IMPORTANT " CFLAGS = $CFLAGS\n" else $ECHO " CFLAGS = $CFLAGS" fi if [ -n "$LDFLAGS" ]; then IMPORTANT " LDFLAGS = $LDFLAGS\n" fi if [ -n "$GMAKE" ]; then IMPORTANT " MAKE = $MAKE\n" else if [ -z "$MAKE" ]; then ERR " MAKE = $MAKE\n" fi fi $ECHO " GTK = $GTK" $ECHO " VTE = $VTE" if [ $BSD -eq 1 ]; then IMPORTANT " MANDIR = \$(PREFIX)/man/man1\n" IMPORTANT " EXAMPLES_DIR = \$(DATADIR)/examples/\$(BINARY)\n" fi if [ "$GNOME_CONTROL_CENTER" = 'Y' ]; then IMPORTANT " GNOME_CONTROL_CENTER = $GNOME_CONTROL_CENTER\n" IMPORTANT " GNOME_CONTROL_CENTER_DIR = $GNOME_CONTROL_CENTER_DIR\n" fi INFO "=================================================\n" $ECHO "" if [ -n "$GMAKE" ]; then WARN "Please be sure to use \`" IMPORTANT "gmake" WARN "' instead of \`" IMPORTANT "make" WARN "' to compile $PACKAGE\!\!\n\n" fi $ECHO "BSD = $BSD" > .config $ECHO "PREFIX = $PREFIX" >> .config $ECHO "ETCDIR = $ETCDIR" >> .config if [ $BSD -eq 1 ]; then $ECHO "MANDIR = \$(PREFIX)/man/man1" >> .config $ECHO "EXAMPLES_DIR = \$(DATADIR)/examples/\$(BINARY)" >> .config fi $ECHO "NLS = $NLS" >> .config $ECHO "VERBOSITY = $VERBOSITY" >> .config $ECHO "DEBUG = $DEBUG" >> .config $ECHO "NLS = $NLS" >> .config $ECHO "SAFEMODE = $SAFEMODE" >> .config $ECHO "FORCE_ENABLE_VTE_BACKGROUND = $BACKGROUND" >> .config $ECHO "STRIP = $STRIP" >> .config $ECHO "CC = $CC" >> .config $ECHO "CPPFLAGS = $CPPFLAGS" >> .config $ECHO "CFLAGS = $CFLAGS" >> .config $ECHO "LDFLAGS = $LDFLAGS" >> .config $ECHO "MAKE = $MAKE" >> .config $ECHO "GTK = $GTK" >> .config $ECHO "VTE = $VTE" >> .config $ECHO "GNOME_CONTROL_CENTER = $GNOME_CONTROL_CENTER" >> .config $ECHO "GNOME_CONTROL_CENTER_DIR = $GNOME_CONTROL_CENTER_DIR" >> .config configure.ac000066400000000000000000000047241246562641500133660ustar00rootroot00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) AC_INIT($_PACKAGE, $_VERSION, $_BUGREPORT) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_HEADERS([config.h]) # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O # Checks for libraries. AM_PATH_GTK_2_0(2.8.0,,AC_MSG_ERROR([You need Gtk+ >= 2.8.0 to build $_PACKAGE])) AM_PATH_GLIB_2_0(2.12.0,,AC_MSG_ERROR([You need Glib >= 2.12.0 to build $_PACKAGE])) PKG_CHECK_MODULES(vte, [vte >= 0.12.0],, AC_MSG_ERROR([You need libvte >= 0.12.0 to build $_PACKAGE])) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable debug mode]), CFLAGS="$CFLAGS -g" AC_DEFINE(DEBUG,, [enable debug mode])) AC_ARG_ENABLE(safe-mode, AC_HELP_STRING([--disable-safe-mode], [disable run in safe mode]), CFLAGS="$CFLAGS -g" AC_DEFINE(REALMODE,, [disable run in safe mode])) PKG_CHECK_EXISTS(gtk+-2.0 < 2.12, AC_MSG_WARN([Using Gtk+ >= 2.12.0 to build $_PACKAGE is recommended])) AC_MSG_CHECKING([whether to install GNOME control-center default application definition]) if $PKG_CONFIG --variable=keysdir gnome-default-applications >/dev/null ; then AC_MSG_RESULT([yes]) DEFAULTAPPS_DIR="`$PKG_CONFIG --variable=defappsdir gnome-default-applications`" AC_SUBST(DEFAULTAPPS_DIR) else AC_MSG_RESULT([no]) DEFAULTAPPS_DIR="" fi AM_CONDITIONAL([DEFAULT_APPS_DEFINITION],[test -n "$DEFAULTAPPS_DIR"]) AC_DEFINE([BINARY], ["$_BINARY"], "The binary file name of LilyTerm.") AC_DEFINE([ISSUES], ["$_ISSUES"], "The web site for reporting issues.") AC_DEFINE([YEAR], ["$_YEAR"], "The current year.") AC_DEFINE([AUTHOR], ["$_AUTHOR"], "The author's name.") AC_DEFINE([MAINSITE], ["$_MAINSITE"], "The main site.") AC_DEFINE([GITHUBURL], ["$_GITHUBURL"], "The github site.") AC_DEFINE([BLOG], ["$_BLOG"], "The blog site.") AC_DEFINE([WIKI], ["$_WIKI"], "The wiki site.") AC_DEFINE([IRC], ["$_IRC"], "The irc channel.") AC_DEFINE([BUGREPORT], ["$_BUGREPORT"], "The author's email address.") AC_PROG_INTLTOOL ALL_LINGUAS="$_LANG_LIST" GETTEXT_PACKAGE="$_BINARY" AC_SUBST(GETTEXT_PACKAGE) AM_GLIB_GNU_GETTEXT AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([locale.h stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_PID_T # Checks for library functions. AC_CHECK_FUNCS([setlocale]) AC_CONFIG_FILES([ Makefile src/Makefile po/Makefile.in data/Makefile ]) AC_OUTPUT data/000077500000000000000000000000001246562641500120025ustar00rootroot00000000000000data/Makefile000066400000000000000000000106211246562641500134420ustar00rootroot00000000000000include ../.default -include ../.config ifeq ($(VERBOSITY), Y) VERBOSITY_OUTPUT = else VERBOSITY_OUTPUT = @ endif DESKTOP_DIR ?= $(DATADIR)/applications GNOME_CONTROL_CENTER ?= Y GNOME_CONTROL_CENTER_DIR ?= $(DATADIR)/gnome-control-center/default-apps MAIN_BINARY := $(shell if [ -f ../src/$(BINARY)_dev ]; then echo $(BINARY)_dev; fi) MAIN_BINARY := $(shell if [ -f ../src/$(BINARY)_dbg ]; then echo $(BINARY)_dbg; fi) ifeq ($(MAIN_BINARY), ) MAIN_BINARY = $(BINARY) endif RomveFileList = $(DESTDIR)/$(ETCDIR)/$(BINARY).conf \ $(DESTDIR)/$(DOCDIR)/AUTHORS \ $(DESTDIR)/$(DOCDIR)/COPYING \ $(DESTDIR)/$(DOCDIR)/ChangeLog \ $(DESTDIR)/$(MANDIR)/$(BINARY).1.gz \ $(DESTDIR)/$(DESKTOP_DIR)/$(BINARY).desktop \ $(DESTDIR)/$(ICONDIR)/$(BINARY).png \ $(DESTDIR)/$(ICONDIR)/$(BINARY).xpm \ $(DESTDIR)/$(EXAMPLES_DIR)/$(BINARY).conf ifeq ($(GNOME_CONTROL_CENTER), Y) ifneq ($(GNOME_CONTROL_CENTER_DIR), ) RomveFileList += $(DESTDIR)/$(GNOME_CONTROL_CENTER_DIR)/$(BINARY).xml endif endif .PHONY: all all: $(BINARY).conf $(BINARY).1.gz $(BINARY).conf: # @ if [ ! -f ../src/$(BINARY) -a \ # ! -f ../src/$(BINARY)_dbg -a \ # ! -f ../src/$(BINARY)_dev ]; then \ # cd ../src ; \ # $(MAKE) ; \ # fi # @ $(PRINTF) "\033[1;33m** creating $(BINARY).conf...\033[0m\n" # @ ../src/$(MAIN_BINARY) -p > $(BINARY).conf $(BINARY).1.gz: @ if [ -f $(BINARY).1 ]; then \ $(PRINTF) "\033[1;33m** adding \033[1;32m$(BINARY).1\033[1;33m ...\033[0m\n" ; \ gzip $(BINARY).1 ; \ fi .PHONY: clean clean: @ # @ if [ -f $(BINARY).conf ]; then \ # $(PRINTF) "\033[1;35m** deleteing $(BINARY).conf...\033[0m\n" ; \ # rm $(BINARY).conf ; \ # fi @ if [ -f $(BINARY).1.gz ]; then \ $(PRINTF) "\033[1;35m** unziping \033[1;32m$(BINARY).1\033[1;35m ...\033[0m\n" ; \ gzip -d $(BINARY).1.gz ; \ fi .PHONY: install install: all @ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY).conf\033[1;33m to \033[1;34m$(DESTDIR)/$(ETCDIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(ETCDIR) $(VERBOSITY_OUTPUT) install -m 644 $(BINARY).conf $(DESTDIR)/$(ETCDIR) @ $(PRINTF) "\033[1;33m** installing \033[1;32mAUTHORS COPYING ChangeLog\033[1;33m to \033[1;34m$(DESTDIR)/$(DOCDIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(DOCDIR) $(VERBOSITY_OUTPUT) install -m 644 ../AUTHORS ../COPYING ../ChangeLog $(DESTDIR)/$(DOCDIR) @ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY).1.gz\033[1;33m to \033[1;34m$(DESTDIR)/$(MANDIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(MANDIR) $(VERBOSITY_OUTPUT) install -m 644 $(BINARY).1.gz $(DESTDIR)/$(MANDIR) @ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY).desktop\033[1;33m to \033[1;34m$(DESTDIR)/$(DESKTOP_DIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(DESKTOP_DIR) $(VERBOSITY_OUTPUT) install -m 644 $(BINARY).desktop $(DESTDIR)/$(DESKTOP_DIR) @ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY).png $(BINARY).xpm\033[1;33m to \033[1;34m$(DESTDIR)/$(ICONDIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(ICONDIR) $(VERBOSITY_OUTPUT) install -m 644 $(BINARY).png $(BINARY).xpm $(DESTDIR)/$(ICONDIR) @ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY).conf\033[1;33m to \033[1;34m$(DESTDIR)/$(EXAMPLES_DIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(EXAMPLES_DIR) $(VERBOSITY_OUTPUT) install -m 644 $(BINARY).conf $(DESTDIR)/$(EXAMPLES_DIR) ifeq ($(GNOME_CONTROL_CENTER), Y) ifneq ($(GNOME_CONTROL_CENTER_DIR), ) @ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY).xml\033[1;33m to \033[1;34m$(DESTDIR)/$(GNOME_CONTROL_CENTER_DIR)\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) install -d $(DESTDIR)/$(GNOME_CONTROL_CENTER_DIR) $(VERBOSITY_OUTPUT) install -m 644 $(BINARY).xml $(DESTDIR)/$(GNOME_CONTROL_CENTER_DIR) endif endif .PHONY: uninstall uninstall: @ - for FileName in $(RomveFileList) ; do \ if [ -f "$$FileName" ]; then \ $(PRINTF) "\033[1;35m** deleting \033[1;32m$$FileName\033[1;35m ...\033[0m\n" ; \ rm -f "$$FileName" ; \ DirName=`dirname $$FileName` ; \ until [ -n "`ls -A $$DirName`" -o "$$DirName" = "$(DESTDIR)/$(PREFIX)" ]; do \ $(PRINTF) "\033[1;35m** deleting directory \033[1;34m$$DirName\033[1;35m ...\033[0m\n" ; \ rmdir "$$DirName" ; \ DirName=`dirname $$DirName` ; \ done \ else \ $(PRINTF) "\033[1;31m** \033[1;32m$$FileName\033[1;31m is NOT exist!\033[0m\n"; \ fi ; \ done data/Makefile.am000066400000000000000000000014401246562641500140350ustar00rootroot00000000000000authordir = $(datadir)/doc/$(PACKAGE) author_DATA = ../AUTHORS copyingdir = $(datadir)/doc/$(PACKAGE) copying_DATA = ../COPYING changlogdir = $(datadir)/doc/$(PACKAGE) changlog_DATA = ../ChangeLog man_MANS=$(PACKAGE).1 etcdir = $(sysconfdir)/xdg etc_DATA = $(PACKAGE).conf desktopdir = $(datadir)/applications desktop_DATA = $(PACKAGE).desktop pixmapsdir = $(datadir)/pixmaps pixmaps_DATA = $(PACKAGE).png $(PACKAGE).xpm examplesdir = $(datadir)/doc/$(PACKAGE)/examples examples_DATA = $(PACKAGE).conf EXTRA_DIST = $(author_DATA) $(copying_DATA) $(changlog_DATA) $(etc_DATA) $(desktop_DATA) $(pixmaps_DATA) $(examples_DATA) xml_in_files = $(PACKAGE).xml.in if DEFAULT_APPS_DEFINITION xmldir = $(DEFAULTAPPS_DIR) xml_DATA = $(xml_in_files:.xml.in=.xml) endif @INTLTOOL_XML_RULE@ data/lilyterm.1000066400000000000000000000164511246562641500137340ustar00rootroot00000000000000.\" Process this file with .\" groff -man -Tascii lilyterm.1 .\" .TH LilyTerm 1 "March 2013" "LilyTerm 0.9.9.5" "A light and eazy\-to\-use terminal emulator" .SH NAME LilyTerm \- A light and eazy\-to\-use terminal emulator for X. .\" Disable justification (adjust text to left margin only) .ad l .SH SYNOPSIS .HP 9 \fBlilyterm\fR [\fB\-?\fR | \fB\-h\fR | \fB\-\-help\fR] [\fB\-T\fR \fITITLE\fR | \fB\-\-title\fR \fITITLE\fR] [\fB\-R\fR \fIROLE\fR | \fB\-\-role\fR \fIROLE\fR] [\fB\-t\fR \fINUMBER\fR | \fB\-\-tab\fR \fINUMBER\fR] [\fB\-n\fR \fITAB NAMES\fR | \fB\-\-tab_names\fR \fITAB NAMES\fR] [\fB\-d\fR \fIDIRECTORY\fR | \fB\-\-directory\fR \fIDIRECTORY\fR] [\fB\-g\fR \fIGEOMETRY\fR | \fB\-\-geometry\fR \fIGEOMETRY\fR] [\fB\-l\fR | \fB\-ls\fR | \fB\-\-login\fR] [\fB\-ut\fR] [\fB\-H\fR | \fB\-\-hold\fR] [\fB\-s\fR | \fB\-\-separate\fR] [\fB\-j\fR | \fB\-\-join\fR] [\fB\-p\fR | \fB\-\-profile\fR] [\fB\-u\fR \fIPROFILE\fR | \fB\-\-user_profile\fR \fIPROFILE\fR] [\fB\-v\fR | \fB\-\-version\fR] [\fB\-e\fR \fICOMMAND\fR | \fB\-x\fR \fICOMMAND\fR | \fB\-\-execute\fR \fICOMMAND\fR] .SH DESCRIPTION LilyTerm is a terminal emulator for the X Window System, based on the \fBlibvte\fR library, and aims to be fast and lightweight. .SH OPTIONS .PP \fB\-?\fR | \fB\-h\fR | \fB\-\-help\fR .RS 4 Display a brief help message. .RE .PP \fB\-T\fR \fITITLE\fR | \fB\-\-title\fR \fITITLE\fR .RS 4 Specify the window title. .RE .PP \fB\-R\fR \fIROLE\fR | \fB\-\-role\fR \fIROLE\fR .RS 4 Specify the WM_WINDOW_ROLE string of window. .RE .PP \fB\-t\fR \fINUMBER\fR | \fB\-\-tab\fR \fINUMBER\fR .RS 4 Open multi tabs when starting up. .RE .PP \fB\-n\fR \fITAB NAMES\fR | \fB\-\-tab_names\fR \fITAB NAMES\fR .RS 4 Specify the tab names, separate with . .RE .PP \fB\-d\fR \fIDIRECTORY\fR | \fB\-\-directory\fR \fIDIRECTORY\fR .RS 4 Specify the init directory when starting up. .RE .PP \fB\-g\fR \fIGEOMETRY\fR | \fB\-\-geometry\fR \fIGEOMETRY\fR .RS 4 Specify the geometry of window when starting. .br A reasonable example value is "80x24+0+0", witch means "width x height {+\-} xoffset {+\-} yoffset" (without space). .RE .PP \fB\-l\fR | \fB\-ls\fR | \fB\-\-login\fR .RS 4 Make the shell invoked as a login shell. .RE .PP \fB\-ut\fR .RS 4 Disable recording the session in lastlog, utmp and wtmp. .RE .PP \fB\-H\fR | \fB\-\-hold\fR .RS 4 Hold the terminal window open when the command following \-e/\-x terminated. .RE .PP \fB\-s\fR | \fB\-\-separate\fR .RS 4 Run in separate process. .RE .PP \fB\-j\fR | \fB\-\-join\fR .RS 4 Integrate new created tabs to the last accessed window. .br It may be useful for launching multi commands with LilyTerm in a shell script. .RE .PP \fB\-p\fR | \fB\-\-profile\fR .RS 4 Got a profile sample. .RE .PP \fB\-u\fR \fIPROFILE\fR | \fB\-\-user_profile\fR \fIPROFILE\fR .RS 4 Use a specified profile. .RE .PP \fB\-v\fR | \fB\-\-version\fR .RS 4 Show the version information. .RE .PP \fB\-e\fR \fICOMMAND\fR | \fB\-x\fR \fICOMMAND\fR | \fB\-\-execute\fR \fICOMMAND\fR .RS 4 Run a command when starting up. Must be the final option. .RE .SH KEYBOARD CONTROL The following key bindings may custom or disable by the right click menu \fB[Set key binding]\fR. .PP .PD 0 .TP 20 .BI <`> Disable/Enable hyperlinks, function keys and right click menu for temporary. .TP .BI Add a New tab with current directory. .TP .BI Switch to Prev/Next tab. .TP .BI Switch to First/Last tab. .TP .BI <[/]> Move current tab Forward/Backward. .TP .BI Move current tab to First/Last. .TP .BI Switch to 1st ~ 12th tab. .TP .BI Select all the text in the Vte Terminal box. .TP .BI <+/\-/Enter> Increase/Decrease/Reset the font size of current tab. .TP .BI Switch between fullwindow/unfullwindow and fullscreen/unfullscreen state. .TP .BI Emulate a mouse Scroll Up/Down event on Vte Terminal box. .TP .BI Asks to scroll Up/Down 1 line on Vte Terminal box. .TP .BI Asks to scroll Up/Down on Vte Terminal box. .TP .BI Copy the text to clipboard / Paste the text in clipboard. .TP .BI Copy the text to primary clipboard / Paste the text in primary clipboard. .br i.e. Emulate a middle button mouse click to copy/paste the text. .RE Some key bindings that disabled by default but maybe useful: .TP .BI Close current tab. .br \fIUsing \fR\fB\fR\fI or '\fR\fBexit\fR\fI' to close tabs is recommended.\fR .TP .BI Open a new window with current directory. .TP .BI Rename the current tab. .SH FILE .PP .PD 0 .TP 32 .BI /etc/xdg/lilyterm.conf System configure file .TP .BI ~/.config/lilyterm/default.conf User's profile. .RE Use \fB[Save settings]\fR in the right click menu to save the current tab's settings as default to the specified profile. .SH TIPS .PP \fBDisplay UTF\-8 character under C locale\fR .RS 4 Execute the following command under LilyTerm: .RS 4 bind "set convert\-meta off" .br bind "set output\-meta on" .RE And use the right click menu to set the text encoding to "\fBUTF\-8\fR". .RE .PP \fBLaunch LilyTerm under a chroot jail\fR .RS 4 Extract \fBxauth info\fR to a file (under X): .RS 4 xauth extract /PathToChroot/tmp/display $DISPLAY .RE Mount the \fBdevpts\fR device and \fB/tmp\fR (may not necessary) before chroot into a chroot jail: .RS 4 mount /dev/pts /PathToChroot/dev/pts \-t devpts .br mount \-o bind /tmp /PathToChroot/tmp (may not necessary) .RE Merge the extracted \fBxauth info\fR and set the \fBDISPLAY\fR environ after chroot into the chroot jail: .RS 4 xauth merge /tmp/display .br export DISPLAY=:0 .RE Launch LilyTerm directly, or run it under \fBXnest\fR/\fBXephyr\fR: .RS 4 xinit ~/.xinitrc \-\- /usr/bin/Xnest :1 \-ac \-geometry 800x600 .RE or .RS 4 xinit ~/.xinitrc \-\- /usr/bin/Xephyr :1 \-ac \-screen 800x600 .RE .RE .PP \fB and don't work under VIM:\fR .RS 4 Use the following command to turn off '\fBflow\-Control\fR' under LilyTerm: .RS 4 stty raw .RE or .RS 4 stty \-ixon .RE .RE .PP \fBBSD Users:\fR .RS 4 Please mount the procfs before launch LilyTerm: .RS 4 mount \-t procfs procfs /proc .RE .SH ENVIRONMENT .PP .PD 0 .TP 15 .BI TERM Sets what type of terminal attempts to emulate. Please always set to "\fBxterm\fR" under LilyTerm. .TP .BI VTE_CJK_WIDTH Controls the width of some ideographs should be "single width (narrow)" or "double width (wide)" in a vte teminal. .br This environment should be set \fBbefore\fR creating a vte widget. .br In LilyTerm, you may set the VTE_CJK_WIDTH of a new tab to 'wide' with right click menu 'New tab with specified locale' \-> 'xx_XX.UTF\-8 (Wide)' or 'UTF\-8 (Wide)'. .TP .BI PROMPT_COMMAND Customs the "Window Title" for shell. .br The following is a reasonable example ~/.bashrc for bash: .RS 19 .br case $TERM in .br xterm*) PROMPT_COMMAND='echo \-ne "\\033]0;${HOSTNAME}: ${PWD}\\007"' ;; .br *) ;; .br esac .br .RE .RS 15 The following is a reasonable example ~/.cshrc for csh/tcsh: .RS 4 .br switch ($TERM) case "xterm*": setenv TITLE "%{\\033]0;%m: %~\\007%}" breaksw .br endsw set prompt = "${TITLE}%# " .br .RE .RE .RS 15 Please visit \fIhttp://tldp.org/HOWTO/Xterm\-Title.html\fR for more details. .RE .SH AUTHOR Lu, Chao\-Ming (Tetralet) .SH SEE ALSO xterm(1) data/lilyterm.conf000066400000000000000000000403041246562641500145130ustar00rootroot00000000000000[main] # Auto save settings when closing window. auto_save = 0 # The version of this profile's format. DO NOT EDIT IT! version = 0.9.9 # The default font name of vte terminal. font_name = Monospace 12 # The default column of vte terminal. column = 80 # The default row of vte terminal. row = 24 # Use true opacity in vte box. # 0: do NOT use rgba, 1: force to use rgba. # Left it blank will enable it automatically # if the window manager were composited. # Disable it will disable transparent_window, too. use_rgba = # Start up with fullscreen. fullscreen = 0 # Transparent window. Only enabled when the window manager were composited. transparent_window = 0 # The opacity of transparent window. window_opacity = 0.050 # The opacity of transparent window when inactive. # Left it blank to disable this feature. window_opacity_inactive = 0.200 # Use transparent background. # It will use true transparent if the window manager were composited. transparent_background = 0 # The saturation of transparent background. background_saturation = 0.150 # Scroll the background image along with the text. scroll_background = 0 # Sets a background image. background_image = # Confirm to execute command with -e/-x/--execute option. confirm_to_execute_command = 1 # Don't need to confirm for executing a program if it's in the whitelist, # separate with . execute_command_whitelist = # Launching executed command in a new tab instead of opening a new window. execute_command_in_new_tab = 1 # If a program is running on foreground, # Don't need to confirm for terminating it if it's in the whitelist, # separate with . foreground_program_whitelist = bash dash csh ksh tcsh zsh screen # If a program is running in background, # Don't need to confirm for terminating it if it's in the whitelist, # separate with . background_program_whitelist = bash dash csh ksh tcsh zsh su # Confirm before pasting texts to vte terminal. confirm_to_paste = 1 # If the program is running on foreground,, # Don't need to confirm for pasting texts to it if it's in the whitelist, # separate with . paste_texts_whitelist = editor vi vim elvis nano emacs emacs23 nano joe ne mg ssh # Confirm to close multi tabs. confirm_to_close_multi_tabs = 0 # Shows [Transparent Background], [Background Saturation] # [Transparent Window] and [Window Opacity] on right click menu. show_background_menu = 1 # Shows [Change the foreground color] # and [Change the background color] on right click menu. show_color_selection_menu = 1 # The normal text color used in vte terminal. # You may use black, #000000 or #000000000000 here. foreground_color = white # Sets the background color for text which is under the cursor. # You may use black, #000000 or #000000000000 here. cursor_color = #55B5E7 # The background color used in vte terminal. # You may use black, #000000 or #000000000000 here. background_color = black # Shows [Increase window size], [Decrease window size], # [Reset to default font/size] and [Reset to system font/size] # on right click menu. show_resize_menu = 1 # The ratio when resizing font via function key <+> and <->. # 0: the font size is +/- 1 when resizing. font_resize_ratio = 0.000 # The ratio when resizing window via right click menu. # 0: the font size is +/- 1 when resizing window. window_resize_ratio = 1.120 # When user double clicks on a text, which character will be selected. word_chars = -A-Za-z0-9_.+!@&=/~% # The lines of scrollback history. -1 means unlimited (vte >= 0.22.3). scrollback_lines = 1024 # Shows scroll_bar or not. # 0: Never shows the scroll_bar; 1: Always shows the scroll_bar. # Left it blank: Hide when fullscreen, or scrollback_lines = 0. show_scroll_bar = # The position of scroll_bar. # 0: scroll_bar is on left; 1: scroll_bar is on right. scroll_bar_position = 1 # Shows input method menu on right click menu. show_input_method_menu = 0 # Shows change page name menu on right click menu. show_change_page_name_menu = 1 # Shows exit menu on right click menu. show_exit_menu = 1 # Enable hyperlink in vte terminal. enable_hyperlink = 1 # Sets whether or not the cursor will blink in vte terminal. # 0: Follow GTK+ settings for cursor blinking. # 1: Cursor blinks. # 2: Cursor does not blink. cursor_blinks = 0 # Shows copy/paste menu on right click menu. show_copy_paste_menu = 1 # Embed the copy/paste menu to the main menu. embedded_copy_paste_menu = 1 # Sets whether or not the terminal will beep # when the child outputs the "bl" sequence. audible_bell = 1 # Sets whether or not the terminal will flash # when the child outputs the "bl" sequence. visible_bell = 0 # Sets whether or not the window's urgent tag will be set # when the child outputs the "bl" sequence. urgent_bell = 1 # Which string the terminal should send to an application # when the user presses the Delete or Backspace keys. # 0: VTE_ERASE_AUTO # 1: VTE_ERASE_ASCII_BACKSPACE # 2: VTE_ERASE_ASCII_DELETE # 3: VTE_ERASE_DELETE_SEQUENCE # 4: VTE_ERASE_TTY erase_binding = 2 # Sets the shape of the cursor drawn. # 0: VTE_CURSOR_SHAPE_BLOCK # 1: VTE_CURSOR_SHAPE_IBEAM # 2: VTE_CURSOR_SHAPE_UNDERLINE cursor_shape = 0 # The default locale used when initing a vte terminal. # You may use "zh_TW", "zh_TW.Big5", or "zh_TW.UTF-8" here. default_locale = # The locales list on right click menu, separate with . # You may use "ja_JP", "ja_JP.EUC-JP", or "ja_JP.UTF-8" here. # You may want to use "UTF-8" here if you have no locale data installed. # Left it blank will disable locale and encoding select menu items. locales_list = UTF-8 # Sets what type of terminal attempts to emulate. # It will also set the TERM environment. # Unless you are interested in this feature, always use "xterm". emulate_term = xterm # The environment 'VTE_CJK_WIDTH' used when initing a vte terminal. # 0: get via environment; 1: use narrow ideograph; 2: use wide ideograph. VTE_CJK_WIDTH = 1 # The geometry of window when starting. # A reasonable example value is "80x24+0+0", # witch means "WIDTH x HEIGHT {+-} XOFFSET {+-} YOFFSET", and NO SPACE in it. # Notice that it will overwrite the default column and row settings above. geometry = [page] # The max character width of page name. page_width = 16 # Show the tabs bar or not. # 0: Never shows the tabs ; 1: Always shows the tabs bar. # Left it blank: Hide when fullscreen, or tabs number = 1. show_tabs_bar = # The position of tabs bar. # 0: Top, 1: bottom. tabs_bar_position = 0 # The label of tabs will fill the tab bar. fill_tabs_bar = 0 # The page name used for a new page. page_name = Terminal # The page names list used for new pages, separate with . page_names = Terminal # Reuse the page name in the page names list. reuse_page_names = 1 # Shows a (number no) on the page name. page_shows_number = 1 # Shows the foreground running command on the page name. page_shows_current_cmdline = 1 # Shows the terminal's idea of what the window's title should be. page_shows_window_title = 1 # Shows current directory on the page name. page_shows_current_dir = 1 # Check if the running command is root privileges. check_root_privileges = 1 # Shows current encoding on the page name. page_shows_encoding = 1 # Bold the text of current page name. bold_current_page_name = 1 # Bold the text of action page name. bold_action_page_name = 1 # Shows the page name of current page on window title. window_title_shows_current_page = 1 # Append a package name (- LilyTerm) to the window title. window_title_append_package_name = 1 # Shows a close button [X] on current tab. show_close_button_on_tab = 1 # Shows a close button [X] on all tabs. show_close_button_on_all_tabs = 0 # Use colorful text on page. use_color_page = 1 # The color used for showing Window Title on page name. # You may use black, #000000 or #000000000000 here. page_win_title_color = #9A6401 # The color used for showing Running Command on page name. # You may use black, #000000 or #000000000000 here. page_cmdline_color = #1C1CDC # The color used for showing Current Dir on page name. # You may use black, #000000 or #000000000000 here. page_dir_color = #215E3E # The color used for showing Custom Tab Name on page name. # You may use black, #000000 or #000000000000 here. page_custom_color = #9C0A81 # The color used for showing Root Privileges on page name. # You may use black, #000000 or #000000000000 here. page_root_color = #BE0020 # The color used for showing Normal Text on page name. # You may use black, #000000 or #000000000000 here. page_normal_color = #333333 [key] # Disable/Enable hyperlinks, function keys and right click menu. # Left it blank to disable this function key. disable_key_binding = Ctrl grave # Add a new tab. # Left it blank to disable this function key. new_tab_key = Ctrl T # Close current tab. # Left it blank to disable this function key. close_tab_key = # Rename the page name of current tab. # Left it blank to disable this function key. edit_label_key = # Find the strings matching the search regex. # Left it blank to disable this function key. find_key = Ctrl F # Find the previous string matching the search regex. # Left it blank to disable this function key. find_key_prev = Shift F3 # Find the next string matching the search regex. # Left it blank to disable this function key. find_key_next = F3 # Switch to prev tab. # Left it blank to disable this function key. prev_tab_key = Ctrl Page_Up # Switch to next tab. # Left it blank to disable this function key. next_tab_key = Ctrl Page_Down # Switch to first tab. # Left it blank to disable this function key. first_tab_key = Ctrl Home # Switch to last tab. # Left it blank to disable this function key. last_tab_key = Ctrl End # Move current page forward. # Left it blank to disable this function key. move_tab_forward = Ctrl bracketleft # Move current page backward. # Left it blank to disable this function key. move_tab_backward = Ctrl bracketright # Move current page to first. # Left it blank to disable this function key. move_tab_first = Ctrl Up # Move current page to last. # Left it blank to disable this function key. move_tab_last = Ctrl Down # Switch to #1 tab directly. # Left it blank to disable this function key. switch_to_tab_1 = Ctrl F1 # Switch to #2 tab directly. # Left it blank to disable this function key. switch_to_tab_2 = Ctrl F2 # Switch to #3 tab directly. # Left it blank to disable this function key. switch_to_tab_3 = Ctrl F3 # Switch to #4 tab directly. # Left it blank to disable this function key. switch_to_tab_4 = Ctrl F4 # Switch to #5 tab directly. # Left it blank to disable this function key. switch_to_tab_5 = Ctrl F5 # Switch to #6 tab directly. # Left it blank to disable this function key. switch_to_tab_6 = Ctrl F6 # Switch to #7 tab directly. # Left it blank to disable this function key. switch_to_tab_7 = Ctrl F7 # Switch to #8 tab directly. # Left it blank to disable this function key. switch_to_tab_8 = Ctrl F8 # Switch to #9 tab directly. # Left it blank to disable this function key. switch_to_tab_9 = Ctrl F9 # Switch to #10 tab directly. # Left it blank to disable this function key. switch_to_tab_10 = Ctrl F10 # Switch to #11 tab directly. # Left it blank to disable this function key. switch_to_tab_11 = Ctrl F11 # Switch to #12 tab directly. # Left it blank to disable this function key. switch_to_tab_12 = Ctrl F12 # Open a new window with current dir. # Left it blank to disable this function key. new_window = # Select all the text in the Vte Terminal box. # Left it blank to disable this function key. select_all = Ctrl O # Copy the text to clipboard. # Left it blank to disable this function key. copy_clipboard = Ctrl Delete # Paste the text in clipboard. # Left it blank to disable this function key. paste_clipboard = Ctrl Insert # Paste the text in the primary clipboard. # Left it blank to disable this function key. paste_clipboard in primary = Shift Insert # Increase the font size of current tab. # Left it blank to disable this function key. increase_font_size = Ctrl equal # Decrease the font size of current tab. # Left it blank to disable this function key. decrease_font_size = Ctrl minus # Reset the font of current tab to original size. # Left it blank to disable this function key. reset_font_size = Ctrl Return # Try to maximize the window to use all available space on your display. # Left it blank to disable this function key. max_window = Alt F11 # Asks to place window in the fullscreen/unfullscreen state. # Left it blank to disable this function key. full_screen = Alt Return # Emulate a mouse scroll up event on Vte Terminal box. # Left it blank to disable this function key. scroll_up = Shift Left # Emulate a mouse scroll down event on Vte Terminal box. # Left it blank to disable this function key. scroll_down = Shift Right # Asks to scroll up 1 line on Vte Terminal box. # Left it blank to disable this function key. scroll_up_1_line = Shift Up # Asks to scroll down 1 line on Vte Terminal box. # Left it blank to disable this function key. scroll_down_1_line = Shift Down [color] # The main ansi color theme used in vte. # Possible values are linux, xterm, rxvt, tango, grayscale or solarized. # or left it blank to use the default settings form libvte. theme = # Invert the ansi colors, like invert the darkred to red, darkblue to blue. invert_color = 0 # The brightness for ansi colors used in terminal. brightness = 0.200 # The brightness for ansi colors used in terminal when inactive. # Left it blank to disable this feature. inactive_brightness = -2.000 # The ANSI color code for Normal Black # You may use black, #000000 or #000000000000 here. Color0 = # The ANSI color code for Normal Red # You may use black, #000000 or #000000000000 here. Color1 = # The ANSI color code for Normal Green # You may use black, #000000 or #000000000000 here. Color2 = # The ANSI color code for Normal Yellow # You may use black, #000000 or #000000000000 here. Color3 = # The ANSI color code for Normal Blue # You may use black, #000000 or #000000000000 here. Color4 = # The ANSI color code for Normal Magenta # You may use black, #000000 or #000000000000 here. Color5 = # The ANSI color code for Normal Cyan # You may use black, #000000 or #000000000000 here. Color6 = # The ANSI color code for Normal White # You may use black, #000000 or #000000000000 here. Color7 = # The ANSI color code for Bright Black # You may use black, #000000 or #000000000000 here. Color8 = # The ANSI color code for Bright Red # You may use black, #000000 or #000000000000 here. Color9 = # The ANSI color code for Bright Green # You may use black, #000000 or #000000000000 here. Color10 = # The ANSI color code for Bright Yellow # You may use black, #000000 or #000000000000 here. Color11 = # The ANSI color code for Bright Blue # You may use black, #000000 or #000000000000 here. Color12 = # The ANSI color code for Bright Magenta # You may use black, #000000 or #000000000000 here. Color13 = # The ANSI color code for Bright Cyan # You may use black, #000000 or #000000000000 here. Color14 = # The ANSI color code for Bright White # You may use black, #000000 or #000000000000 here. Color15 = [command] # The parameters of the APPLICATION should be separated with , if any. # # method = {0,1,2} # 0: Open the hyperlink in new tab. # Use it if the command were using CLI, like w3m. # 1: Open the hyperlink with gdk_spawn_on_screen_with_pipes(). # Use it if the command were using GUI, like chromium. # 2: Open the hyperlink in new window, # Use it if you not sure. # # VTE_CJK_WIDTH = {0,1,2} # 0: get via environment # 1: use narrow ideograph # 2: use wide ideograph. # # The ENVIRONS will apply to the application, separated with , too. # # The LOCALE will apply to the application as locale environs. # You may use "zh_TW", "zh_TW.Big5", or "zh_TW.UTF-8" here. # Left it blank to use the locale environs from current page. # The web browser using for http(s):// web_browser = xdg-open web_method = 1 web_VTE_CJK_WIDTH = 0 web_environ = web_locale = # The ftp client using for ftp(s):// ftp_client = xdg-open ftp_method = 1 ftp_VTE_CJK_WIDTH = 0 ftp_environ = ftp_locale = # The file manager using for file:// and [Open current directory with file manager] file_manager = xdg-open file_method = 1 file_VTE_CJK_WIDTH = 0 file_environ = file_locale = # The email client using for user@host email_client = xdg-open email_method = 1 email_VTE_CJK_WIDTH = 0 email_environ = email_locale = data/lilyterm.desktop000066400000000000000000000017621246562641500152440ustar00rootroot00000000000000[Desktop Entry] Name=LilyTerm GenericName=Terminal Comment=A light and easy to use libvte based X Terminal Emulator Comment[zh_TW]=輕巧人性化、基於 libvte 的 X 終端機模擬程式 Comment[de]=Leichtgewichtiger und benutzerfreundlicher, libvte-basierter Terminal emulator Comment[it]=Un emulatore di terminale per X basato su libvte, leggero e facile da usare Comment[ru]=Лёгкий и простой эмулятор терминала, основанный на libvte Comment[uk]=Легкий та простий емулятор терміналу, заснований на libvte Comment[nl]=Een lichte, eenvoudige en makkelijk te gebruiken X Terminal Emulator met als basis libvte Comment[tr]=libvte tabanlı hafif ve kolay kullanımlı bir X Terminal Öykünücüsü Comment[sk]=Odľahčený a ľahko použiteľný emulátor terminálu pre X, založený na libvte TryExec=lilyterm Exec=lilyterm Icon=lilyterm Type=Application Terminal=false Categories=GTK;Utility;System;TerminalEmulator; data/lilyterm.png000066400000000000000000000040461246562641500143550ustar00rootroot00000000000000PNG  IHDR00WsRGBbKGD pHYs  tIME GCtEXtCommentCreated with GIMPWIDAThKުh$0لDA2ޅ,$ob֋|]Zq&`%(8/tOw9Y[5==V sv5շn9 |q>laivOn[o]ů{qoԼap""";cffu2X,y(!"TU|>rIUUuM۶h, />4lb^ۗ._yLVt Bm"&es&{&{Fw{׿>pj#SUzSF8QUZS:x f&ԅ6?gr @$I4S+JUcQhM3$ޏ6`^ܻW.Ԕi^L'3DM]4K~s9qM$ެS*iWLQ(ϙL0=Y'8焤% ]e~wywDU%E5\E b933tT%W H\d""Qy /{V@ m"ie2@qS#JomK۶=YsNwxȲL<,<B4MC8D>v ̚|&RtBКC$^KFE1"rs*MP5eY&i䢣L:D $Od2΄ѨTUrLwzvA{l]ĉ4r1.\`ww(B,LM%'f &sHd@IyNQL&&D!"˲n2p^)'<`%8w $)h%%@dYs > T:u<;etn6֯fkI*жm M!tQIe䮙 S_3M ׅo&E"Bwܲ,ҸmB!v65_ 2 Cg+,:!YbSX<E1*g`kan<8Wi@۶TUM]iZTC ;+ iylhʉyop7m`g3Ͽ;wn˭[7{ - 9ٌCfrAYV4MC luR̾$+)HH)Kqoy'i,Y,, %eIUU4M~v 560)`lC!)H$]]oM0͸r mbf}%2iÒN*z hBQ ۆQ|>1 ~7)6; jhZ{;'srjr֙XU uwNF 0Q5^{|oO~/IT c:%Vy?JR!&] !}D2S{F8q+/Ic:i &6s2gk8 AHcZ޽{=펎mAnPe]fLakf\|}TFU "e69mĸOD!WUmUutL3T2i(bOngO\]X]W'g*}ʝK.L M!>vzGo!f)m)W5  ڵ"+9ƐuXzӕ8;Vꇾ ιN%/>t::Nu^*Y#+Ue>Su]37FEAUUTUSk;KKs34'!|٠|R: _JK3c6,T` (G9$i.Ya?c4 ~uӧ9N;B_Lσ8|o;'>>IENDB`data/lilyterm.xml000066400000000000000000000005441246562641500143700ustar00rootroot00000000000000 LilyTerm lilyterm lilyterm %s terminal -e data/lilyterm.xpm000066400000000000000000000076071246562641500144030ustar00rootroot00000000000000/* XPM */ static char * favicon_xpm[] = { "32 32 109 2", " c None", ". c #A1A7B0", "+ c #9FA5AD", "@ c #A0A5AD", "# c #9FA4AD", "$ c #A0A4AD", "% c #A9ADB5", "& c #ADB1B8", "* c #ABAFB6", "= c #A1A5AC", "- c #9CA0A6", "; c #91959B", "> c #7A7E84", ", c #29292A", "' c #2F2F31", ") c #343435", "! c #353536", "~ c #2F2F30", "{ c #2A2A2A", "] c #252525", "^ c #212122", "/ c #1E1E1F", "( c #19191A", "_ c #989DA4", ": c #141414", "< c #797D84", "[ c #3A3A3B", "} c #474748", "| c #555556", "1 c #585859", "2 c #4B4B4D", "3 c #3E3E3F", "4 c #2A2A2C", "5 c #1F2021", "6 c #131313", "7 c #404041", "8 c #79797A", "9 c #808081", "0 c #636364", "a c #464647", "b c #383839", "c c #303031", "d c #2B2B2C", "e c #202021", "f c #7A7E85", "g c #424243", "h c #5E5E5F", "i c #868687", "j c #8D8D8E", "k c #6C6C6D", "l c #49494A", "m c #39393A", "n c #303032", "o c #2B2B2D", "p c #979CA3", "q c #121212", "r c #797E84", "s c #474749", "t c #515152", "u c #6B6B6C", "v c #717172", "w c #59595A", "x c #434344", "y c #373738", "z c #9A9FA7", "A c #181818", "B c #464648", "C c #4A4A4B", "D c #4C4C4D", "E c #444445", "F c #3A3A3C", "G c #333335", "H c #2E2E2F", "I c #2A2A2B", "J c #1F1F20", "K c #989CA4", "L c #7B7F85", "M c #434345", "N c #545456", "O c #373739", "P c #2E2E30", "Q c #282829", "R c #1E1E20", "S c #111111", "T c #83868D", "U c #393A3C", "V c #3A3B3D", "W c #494A4C", "X c #3D3E40", "Y c #38393B", "Z c #363739", "` c #343537", " . c #333436", ".. c #313234", "+. c #2E2F31", "@. c #979CA4", "#. c #8D9197", "$. c #909499", "%. c #8E9197", "&. c #8B8F94", "*. c #878C91", "=. c #8A8E94", "-. c #888C91", ";. c #86898E", ">. c #82868B", ",. c #7E8288", "'. c #81848A", "). c #7C7F84", "!. c #101010", " ", " ", " ", " ", " ", " ", " . . + + @ @ # # # # $ $ % % & & * * = = - - ; ; ", " . . + + @ @ # # # # $ $ % % & & * * = = - - ; ; ", " > > , , ' ' ) ) ! ! ~ ~ { { ] ] ^ ^ / / ( ( _ _ : : ", " > > , , ' ' ) ) ! ! ~ ~ { { ] ] ^ ^ / / ( ( _ _ : : ", " < < [ [ } } | | 1 1 2 2 3 3 ! ! ~ ~ 4 4 5 5 _ _ 6 6 ", " < < [ [ } } | | 1 1 2 2 3 3 ! ! ~ ~ 4 4 5 5 _ _ 6 6 ", " < < 7 7 1 1 8 8 9 9 0 0 a a b b c c d d e e _ _ 6 6 ", " < < 7 7 1 1 8 8 9 9 0 0 a a b b c c d d e e _ _ 6 6 ", " f f g g h h i i j j k k l l m m n n o o e e p p q q ", " f f g g h h i i j j k k l l m m n n o o e e p p q q ", " r r s s t t u u v v w w x x y y ' ' d d e e z z A A ", " r r s s t t u u v v w w x x y y ' ' d d e e z z A A ", " < < B B v v C C D D E E F F G G H H I I J J K K 6 6 ", " < < B B v v C C D D E E F F G G H H I I J J K K 6 6 ", " L L D D M M N N g g O O G G P P d d Q Q R R p p S S ", " L L D D M M N N g g O O G G P P d d Q Q R R p p S S ", " T T U U V V W W X X Y Y Z Z ` ` . .....+.+.@.@.q q ", " T T U U V V W W X X Y Y Z Z ` ` . .....+.+.@.@.q q ", " #.#.$.$.%.%.&.&.*.*.=.=.-.-.;.;.>.>.,.,.'.'.).).!.!. ", " #.#.$.$.%.%.&.&.*.*.=.=.-.-.;.;.>.>.,.,.'.'.).).!.!. ", " ", " ", " ", " ", " ", " "}; po/000077500000000000000000000000001246562641500115075ustar00rootroot00000000000000po/Makefile000066400000000000000000000121621246562641500131510ustar00rootroot00000000000000include ../.default -include ../.config ifeq ($(VERBOSITY), Y) VERBOSITY_OUTPUT = else VERBOSITY_OUTPUT = @ endif PO_LIST ?= $(LANG_LIST:=.po) MO_LIST ?= $(LANG_LIST:=.mo) XGETTEXT := $(shell whereis "xgettext" | tr -s ' ' '\n' | grep "bin/""xgettext""$$" | head -n 1) ifneq ($(XGETTEXT), ) XGETTEXT_PARAMETER = -k_ SUPPORT_FROM_CODE = $(shell $(XGETTEXT) --help | grep -q -- '--from-code' && echo Y) ifeq ($(SUPPORT_FROM_CODE), Y) XGETTEXT_PARAMETER += --from-code=UTF-8 endif SUPPORT_COPYRIGHT_HOLDER = $(shell $(XGETTEXT) --help | grep -q -- '--copyright-holder' && echo Y) ifeq ($(SUPPORT_COPYRIGHT_HOLDER), Y) XGETTEXT_PARAMETER += --copyright-holder="$(YEAR) FULL NAME " endif SUPPORT_PACKAGE_NAME = $(shell $(XGETTEXT) --help | grep -q -- '--package-name' && echo Y) ifeq ($(SUPPORT_PACKAGE_NAME), Y) XGETTEXT_PARAMETER += --package-name=$(PACKAGE) endif SUPPORT_PACKAGE_VERSION = $(shell $(XGETTEXT) --help | grep -q -- '--package-version' && echo Y) ifeq ($(SUPPORT_PACKAGE_VERSION), Y) XGETTEXT_PARAMETER += --package-version="$(VER)" endif endif MSGCMP := $(shell whereis "msgcmp" | tr -s ' ' '\n' | grep "bin/""msgcmp""$$" | head -n 1) ifneq ($(MSGCMP), ) SUPPORT_USE_UNTRANSLATED = $(shell $(MSGCMP) --help | grep -q -- '--use-untranslated' && echo Y) ifeq ($(SUPPORT_USE_UNTRANSLATED), Y) MSGCMP_PARAMETER += --use-untranslated endif endif MSGMERGE := $(shell whereis "msgmerge" | tr -s ' ' '\n' | grep "bin/""msgmerge""$$" | head -n 1) ifneq ($(MSGMERGE), ) SUPPORT_PREVIOUS = $(shell $(MSGMERGE) --help | grep -q -- '--previous' && echo Y) ifeq ($(SUPPORT_PREVIOUS), Y) MSGMERGE_PARAMETER += --previous endif endif MSGFMT := $(shell whereis "msgfmt" | tr -s ' ' '\n' | grep "bin/""msgfmt""$$" | head -n 1) TOUCH := $(shell whereis "touch" | tr -s ' ' '\n' | grep "bin/""touch""$$" | head -n 1) .PHONY: all all: $(MO_LIST) .PHONY: update-po update-po: pot $(PO_LIST) .PHONY: pot pot: ifeq ($(XGETTEXT), ) @ $(PRINTF) "\033[1;31mERROR: '\033[1;32mxgettext\033[1;31m' command can NOT found!\033[0m\n" @ $(PRINTF) "\033[1;31mERROR: \033[1;32mgettext\033[1;31m package is needed to make pot. ABORT!\033[0m\n" @ exit 1 endif ifeq ($(MSGCMP), ) @ $(PRINTF) "\033[1;31mERROR: '\033[1;32mmsgcmp\033[1;31m' command can NOT found!\033[0m\n" @ $(PRINTF) "\033[1;31mERROR: \033[1;32mgettext\033[1;31m package is needed to make pot. ABORT!\033[0m\n" @ exit 1 endif @ cd ../src ; \ $(XGETTEXT) $(XGETTEXT_PARAMETER) --add-comments='TRANSLATE NOTE:' -o ../po/$(BINARY).po *.c @# echo '' >> $(BINARY).po @# echo 'msgid "A light and easy to use libvte based X Terminal Emulator"' >> $(BINARY).po @# echo 'msgstr ""' >> $(BINARY).po @ if ($(MSGCMP) $(MSGCMP_PARAMETER) $(BINARY).pot $(BINARY).po > /dev/null 2>&1) then \ rm $(BINARY).po ; \ else \ $(PRINTF) "\033[1;36m** creating \033[1;32m$(BINARY).pot\033[1;36m ...\033[0m\n" ; \ mv $(BINARY).po $(BINARY).pot ; \ echo "" ; \ fi $(BINARY).pot: pot .PHONY: reset reset: @ $(TOUCH) $(BINARY).pot .PHONY: po po: $(PO_LIST) %.po: $(BINARY).pot ifeq ($(MSGMERGE), ) @ $(PRINTF) "\033[1;31mERROR: '\033[1;32mmsgmerge\033[1;31m' command can NOT found!\033[0m\n" @ $(PRINTF) "\033[1;31mERROR: \033[1;32mgettext\033[1;31m package is needed to make po files. ABORT!\033[0m\n" @ exit 1 endif @ $(PRINTF) "\033[1;33m** msgmerge \033[1;32m$@\033[1;33m ...\033[0m\n" -$(VERBOSITY_OUTPUT) $(MSGMERGE) $(MSGMERGE_PARAMETER) $@ $< -o $@ %.mo: %.po $(BINARY).pot ifeq ($(MSGFMT), ) @ $(PRINTF) "\033[1;31mERROR: '\033[1;32mmsgfmt\033[1;31m' command can NOT found!\033[0m\n" @ $(PRINTF) "\033[1;31mERROR: \033[1;32mgettext\033[1;31m package is needed to make mo files. ABORT!\033[0m\n" @ exit 1 endif @ $(PRINTF) "\033[1;33m** creating \033[1;32m$@\033[1;33m ...\033[0m\n" -$(VERBOSITY_OUTPUT) $(MSGFMT) --check --statistics $< -o $@ .PHONY: clean clean: @ for FILE in $(MO_LIST); do \ if [ -f $$FILE ]; then \ $(PRINTF) "\033[1;35m** deleting \033[1;32m$$FILE\033[1;35m...\033[0m\n" ; \ rm $$FILE ; \ fi ; \ done .PHONY: install install: all @ for FILE in $(LANG_LIST); do \ if [ -f $$FILE.mo ]; then \ install -d $(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/ ; \ $(PRINTF) "\033[1;33m** installing \033[1;32m$$FILE.mo\033[1;33m to \033[1;34m$(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/\033[1;32m ...\033[0m\n" ; \ install -m 644 $$FILE.mo $(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/$(BINARY).mo ; \ fi ; \ done .PHONY: uninstall uninstall: @ - for FILE in $(LANG_LIST); do \ if [ -f $(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/$(BINARY).mo ]; then \ $(PRINTF) "\033[1;35m** \033[1;32mdeleting $(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/$(BINARY).mo\033[1;35m ...\033[0m\n" ; \ rm "$(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/$(BINARY).mo" ; \ DirName="$(DESTDIR)/$(LOCALEDIR)/$$FILE/LC_MESSAGES/" ; \ until [ -n "`ls -A $$DirName`" -o "$$DirName" = "$(DESTDIR)/$(PREFIX)" ]; do \ $(PRINTF) "\033[1;35m** deleting directory \033[1;34m$$DirName\033[1;35m ...\033[0m\n" ; \ rmdir "$$DirName" ; \ DirName=`dirname $$DirName` ; \ done \ else \ $(PRINTF) "\033[1;31m** \033[1;32m$(DESTDIR)/$(LOCALEDIR)/$$FILE\033[1;31m is NOT exist!\033[0m\n" ; \ fi ; \ done po/POTFILES.in000066400000000000000000000001461246562641500132650ustar00rootroot00000000000000src/console.c src/window.c src/profile.c src/dialog.c src/main.c src/menu.c src/notebook.c src/misc.c po/de.po000066400000000000000000001231261246562641500124440ustar00rootroot00000000000000# German translation for LilyTerm. # Copyright (C) 2008 Mario Blättermann , 2008, 2009, 2011, 2012. # This file is distributed under the same license as the LilyTerm package. # Mario Blättermann , 2008-2012. # msgid "" msgstr "" "Project-Id-Version: 0.9.9.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-05-24 20:50+0100\n" "Last-Translator: Mario Blättermann \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: German\n" "X-Poedit-Country: GERMANY\n" "X-Poedit-SourceCharset: utf-8\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Fehler bitte melden an »%s«.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Danke dass Sie %s verwenden!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s ist ein auf Libvte basierender Terminalemulator für X.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Verwenden Sie -T/--title {Titel}, um den Fenstertitel festzulegen.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Verwenden Sie -T/--title {Titel}, um den Fenstertitel festzulegen.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "" "Verwenden Sie -t/--tab {Anzahl}, um mehrere Reiter beim Start zu öffnen.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Verwenden Sie -d/--directory {Ordner}, um den beim Start zu öffnenden Ordner " "festzulegen.\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Verwenden Sie -g/--geometry {BREITExHÖHE[+-]X-VERSATZ[+-]Y-VERSATZ}, um die " "Fenstergeometrie festzulegen.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "" "Verwenden Sie -l/-ls/--login, um diese Shell als Anmeldeshell zu starten.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" "Verwenden Sie -H/--hold, um das Terminalfenster offen zu halten, wenn -e/-x " "Befehl beendet ist.\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "" "Verwenden Sie -s/--separate zur Ausführung in einem separaten Prozess.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "Verwenden Sie -p/--profile für eine Beispielkonfiguration.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Verwenden Sie -u/--user_profile {%s}, um ein bestimmtes Profil zu " "verwenden.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Verwenden Sie -v/--version, um die Versionsinformationen anzuzeigen.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command. (Must be the final " #| "option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Verwenden Sie -e/-x/--execute {Befehl}, um einen Befehl beim Start " "auszuführen.\n" " Dies muss als letzte Option angegeben werden.\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "Die systemweite Konfiguration von %s: %s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "Ihr %s-Benutzerprofil: " #: console.c:224 msgid "Default key binding:" msgstr "Standard-Tastenkürzel:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Deaktivieren/Aktivieren der " "Hyperlinks,\n" " Funktionstasten und des Rechtsklickmenüs" #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr "" " * Neuen Reiter im aktuellen Ordner " "hinzufügen\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr "" " * Zum vorherigen/nächsten Reiter " "wechseln\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr "" " * Zum ersten/letzten Reiter wechseln\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr "" " * Aktuellen Reiter nach links/rechts " "verschieben\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr "" " * Aktuellen Reiter ganz nach links/rechts " "verschieben\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr "" " * Zum ersten ~ zwölften Reiter springen\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Eingabe> Schrift im aktuellen Reiter vergrößern/" "verkleinern/zurücksetzen\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Bedienung des Mausrades nach oben/unten " "im Vte-Terminal emulieren.\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Eine Zeile im Terminal nach oben/unten " "rollen\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Gtk+Standardverhalten, im Vte-Terminal " "nach oben/unten rollen.\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Gtk+-Standardverhalten, im Vte-Terminal " "ganz nach oben/unten rollen.\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Zwischen Vollbild- und Fenstermodus " "sowie\n" " maximiertem/unmaximierten Modus " "umschalten\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Text im Vte-Terminal suchen.\n" " Mit / nächsten/" "vorherigen suchen.\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr "" " * Gesamten Inhalt des Vte-Terminals " "auswählen.\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * Text in Zwischenablage kopieren oder " "einfügen.\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * Text in die primäre Zwischenablage " "kopieren oder einfügen.\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (Emuliert die mittlere Maustaste, um " "Text zu kopieren/einzufügen)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" "Folgende Tastenkürzel sind per Vorgabe deaktiviert, aber vielleicht dennoch " "nützlich:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr "" " * Versuchen, den aktuellen Reiter zu " "schließen\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " ( oder »Beenden« wird zum " "Schließen von Reitern empfohlen)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" " * Ein neues Fenster im aktuellen Ordner " "öffnen.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Aktuellen Reiter umbenennen.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Hinweis: Diese Tastenkürzel können im Kontextmenü deaktiviert\n" " oder geändert werden [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Tastenkürzel festlegen" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "Folgender Fehler ist aufgetreten:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Diesen Reiter umbenennen" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Geben Sie den Namen für diesen Reiter ein:" #: dialog.c:211 msgid "Label Name:" msgstr "Beschriftung:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Zeichenkette suchen" #: dialog.c:235 msgid "Find: " msgstr "Suchen:" #: dialog.c:258 msgid "Find previous string" msgstr "Vorherige Zeichenkette suchen" #: dialog.c:264 msgid "Find next string" msgstr "Nächste Zeichenkette suchen" #: dialog.c:275 msgid "Case sensitive" msgstr "Groß-/Kleinschreibung berücksichtigen" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Perl-kompatible reguläre Ausdrücke verwenden" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Texte in jedes Vte-Terminal einfügen" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Geben Sie den Text ein, der in jedes Vte-Terminal eingefügt wird:" #: dialog.c:343 msgid "Text:" msgstr "Text:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Eine am Ende des Texts anfügen." #: dialog.c:388 msgid "Grab keys" msgstr "Tasten aufzeichnen" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Die aufgezeichnete Taste in die Vte-Terminals einfügen.\n" "Dies ist insbesondere beim Einfügen von Kombinationen nützlich (wie " ")." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Tastencode:" #: dialog.c:423 msgid "Entry" msgstr "Eintrag" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Neue Spracheinstellungen hinzufügen und Vorgabe festlegen" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "Die Standard-Spracheinstellung, die beim Initiieren eines Vte-Terminals " "verwendet wird.\n" "Sie können hier »de_DE«, »de_DE.ISO8859-15« oder »de_DE.UTF-8« verwenden." #: dialog.c:451 msgid "Default locale:" msgstr "Standard-Spracheinstellung:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Die Liste der Spracheinstellungen im Kontextmenü, durch Leerzeichen " "getrennt.\n" "Sie können hier »de_DE«, »de_DE.ISO8859-15« oder »de_DE.UTF-8« verwenden.\n" "Verwenden Sie hier »UTF-8«, falls keine Spracheinstellungen installiert sind." #: dialog.c:463 msgid "Locales list:" msgstr "Liste der Spracheinstellungen:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Durchsichtigkeit des Hintergrunds ändern" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Durchsichtigkeit des Hintergrunds ändern:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Vordergrundfarbe des Terminals ändern" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Hintergrundfarbe des Terminals ändern" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Farbe der Eingabemarke des Terminals ändern" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the cursor color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Farbe der Eingabemarke des Terminals ändern" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Helligkeit der ANSI-Farben anpassen" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Farbe umkehren" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Farbe »%s« für den Reiter ändern" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Fetter Beispieltext" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Schließen mehrerer Reiter bestätigen" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Sie sind dabei, mehrere Reiter zu schließen. Trotzdem fortsetzen?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "diese Reiter" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Drücken Sie + ,\n" "um den für das Tastenkürzel verwendeten Tastenwert zu ermitteln." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Wert der Funktionstaste ermitteln" #: dialog.c:922 msgid "Function Key Name" msgstr "Name der Funktionstaste" #: dialog.c:926 msgid "Key Bindings" msgstr "Tastenkürzel" #: dialog.c:934 msgid "Key Group: " msgstr "Tastengruppe:" #: dialog.c:944 msgid "Note: " msgstr "Hinweis: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Alle Funktionstasten deaktivieren" #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Verwendung von %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "" "Vergessen Sie nicht, nach jeder Änderung die Einstellungen zu speichern!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Anwendung" #: dialog.c:1031 msgid "Key binding" msgstr "Tastenkürzel" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "Copyright (c) %s-%s %s. Alle Rechte vorbehalten.\n" "\n" "%s ist freie Software, Sie können sie weitergeben und/oder\n" "verändern solange Sie sich an die Regeln der GNU General Public License\n" "halten, so wie sie von der Free Software Foundation festgelegt wurden;\n" "entweder in Version 2 der Lizenz oder (nach Ihrem Ermessen) in jeder " "folgenden Lizenz.\n" "\n" "%s wurde mit dem Ziel veröffentlicht, dass Sie es nützlich finden,\n" "jedoch OHNE JEDWEDE GARANTIE, sogar ohne eine implizite Garantie\n" "der VERKAUFBARKEIT oder der NUTZBARKEIT FÜR EINEN SPEZIELLEN ZWECK.\n" "Schauen Sie für weitere Informationen bitte in der GNU General Public " "License (GNU GPL) nach.\n" "\n" "Mit %s sollten Sie außerdem eine Kopie der GNU General Public License " "erhalten\n" "haben. Wenn dem nicht so ist, siehe ." #: dialog.c:1052 msgid "License" msgstr "Lizenz" #: dialog.c:1067 msgid "Translators" msgstr "Übersetzer" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Webseite:" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Wiki: %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Blog: %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Wiki: %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Probleme: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "Info" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "Es läuft noch ein Vordergrund-Programm im Reiter #%d:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" "Falls nicht mehr ansprechbar, wird das Beenden mit »kill -9 %d« empfohlen." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Trotzdem fortsetzen?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Tipp:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Schließen eines Programms bestätigen" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "dieser Reiter" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Deckkraft des Fensters ändern" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Deckkraft des Fensters ändern:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Deckkraft des inaktiven Fensters ändern" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Deckkraft des inaktiven Fensters ändern:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Helligkeit der ANSI-Farben im Terminal anpassen" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Helligkeit der ANSI-Farben bei Inaktivität anpassen" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr "versucht den folgenden Befehl auszuführen:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Bestätigung der Ausführung eines Befehls mit -e/-x/--execute" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "Die folgenden Programme laufen noch im Reiter #%d:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr " oder »Beenden« wird zum Schließen von Reitern empfohlen" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Schließen eines Reiters mit laufendem Unterprozess bestätigen" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "Die folgenden Programme laufen noch in diesem Fenster:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Schließen eines Fensters mit laufendem Unterprozess bestätigen" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Schließen von %s bestätigen" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "Die folgenden Programme laufen noch in %s:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Es wird versucht, folgenden Text in das Vte-Terminal einzufügen:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Einfügen von Text in das Vte-Terminal bestätigen" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "%s abwürgen mit SIGKILL(), um dessen Programme zu beenden!\n" "(KANN DATENVERLUST ZUR FOLGE HABEN!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Schließen aller Reiter und Fenster erzwingen und %s beenden" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Deaktiviert, Duplikat von [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Deaktiviert)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Die Spracheinstellung »%s« wird von Ihrem System\n" "offensichtlich nicht unterstützt! Falls Sie kürzlich neue\n" "Spracheinstellungen hinzugefügt haben sollten, schließen\n" "Sie bitte alle Fenster von %s und versuchen Sie es erneut." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Nicht unterstützte Spracheinstellung!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Sie sollten auf %s aktualisieren und %s neu kompilieren, um dieses " "Funktionsmerkmal nutzen zu können." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Kein unterstütztes Funktionsmerkmal" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Alle Funktionstasten der Gruppe [%s] deaktivieren." #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Die vom Socket erhaltenen Daten scheinen\n" "inkorrekt zu sein.\n" "\n" "\tEmpfangene Socket-Version: %s\n" "\tErwartete Socket-Version: %s\n" "\n" "Falls Sie %s kürzlich aktualisiert haben,\n" "schließen Sie bitte alle Fenster von %s\n" "und versuchen Sie es erneut." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Das Format Ihrer Socket-Daten ist nicht mehr aktuell" #: menu.c:59 msgid "Change text encoding" msgstr "Zeichenkodierung ändern" #: menu.c:60 msgid "New tab" msgstr "Neuer Reiter" #: menu.c:61 msgid "New tab with specified locale" msgstr "Neuer Reiter mit neuer Spracheinstellung" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Neues Fenster mit angegebenem Profil" #: menu.c:80 msgid "Change the font" msgstr "Schriften ändern" #: menu.c:87 msgid "Change colors" msgstr "Farben anpassen" #: menu.c:90 msgid "Change the cursor color" msgstr "Farbe der Eingabemarke ändern" #: menu.c:94 msgid "Change the foreground color" msgstr "Vordergrundfarbe ändern" #: menu.c:99 #, fuzzy #| msgid "Change the cursor color" msgid "Change the ANSI colors" msgstr "Farbe der Eingabemarke ändern" #: menu.c:104 msgid "Change the background color" msgstr "Hintergrundfarbe ändern" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Helligkeit der ANSI-Farben anpassen" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Abdunklung bei Inaktivität anpassen" #: menu.c:138 msgid "Change ANSI color theme" msgstr "ANSI-Farbthema ändern" #: menu.c:148 msgid "Background" msgstr "Hintergrund" #: menu.c:154 msgid "Transparent window" msgstr "Transparentes Fenster" #: menu.c:159 msgid "Window opacity" msgstr "Deckkraft des Fensters" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Deckkraft des Fensters bei Inaktivität" #: menu.c:172 msgid "Transparent background" msgstr "Transparenter Hintergrund" #: menu.c:175 msgid "Background saturation" msgstr "Sättigung des Hintergrunds" #: menu.c:179 msgid "Set background image" msgstr "Hintergrundbild festlegen" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Zwischenablage" #: menu.c:196 msgid "Copy URL" msgstr "URL kopieren" #: menu.c:201 msgid "Copy" msgstr "Kopieren" #: menu.c:205 msgid "Paste" msgstr "Einfügen" #: menu.c:212 msgid "View clipboard" msgstr "Zwischenablage anzeigen" #: menu.c:216 msgid "View primary clipboard" msgstr "Primäre Zwischenablage ansehen" #: menu.c:227 msgid "Scrollback lines" msgstr "Shell-Befehlsspeicher" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Shell-Befehlsspeicher löschen" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Verschiedenes" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "In jedes Vte-Terminal einfügen" #: menu.c:247 msgid "Launch file manager" msgstr "Dateiverwaltung öffnen" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Bindung lösen" #: menu.c:275 msgid "Cursor Shape" msgstr "Eingabemarke" #: menu.c:292 msgid "Dim text when inactive" msgstr "Text bei Inaktivität abdunkeln" #: menu.c:297 msgid "Dim window when inactive" msgstr "Fenster bei Inaktivität abdunkeln" #: menu.c:302 msgid "Cursor blinks" msgstr "Blinkender Cursor" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Systemglocke" #: menu.c:327 msgid "Visible bell" msgstr "Visuelle Glocke" #: menu.c:332 msgid "Urgent bell" msgstr "Systemglocke" #: menu.c:342 msgid "Switch input methods" msgstr "Eingabemethode ändern" #: menu.c:361 msgid "Show the tabs bar" msgstr "Reiterleiste anzeigen" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Reiterleiste verbergen" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Reiterleiste immer anzeigen" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Reiterleiste immer verbergen" #: menu.c:391 msgid "Increase window size" msgstr "Fenster vergrößern" #: menu.c:394 msgid "Decrease window size" msgstr "Fenster verkleinern" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Zurücksetzen auf benutzerdefinierte Schrift und Schriftgröße" #: menu.c:404 msgid "Reset to system font/size" msgstr "Zurücksetzen auf Systemschrift und -größe" #: menu.c:409 msgid "Reset the content" msgstr "Inhalt zurücksetzen" #: menu.c:424 msgid "User profile" msgstr "Benutzerprofil" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "%s beenden" #: menu.c:502 msgid "grayscale" msgstr "Graustufen" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Benutzerdefiniert" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Eine Seite nach unten springen." #: menu.c:1099 msgid " (Wide)" msgstr " (Breit)" #: menu.c:1554 msgid "Font Selection" msgstr "Schriftauswahl" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Weitere Spracheinstellungen ̣…" #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Andere Einstellungen …" #: menu.c:1963 msgid "Save settings automatically" msgstr "Einstellungen automatisch speichern" #: menu.c:1968 msgid "Save settings" msgstr "Einstellungen speichern" #: menu.c:1971 msgid "Save settings as..." msgstr "Einstellungen speichern unter …" #: menu.c:1977 msgid "Reload settings" msgstr "Einstellungen neu laden" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s Vorgabe" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Systemvorgabe" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Die folgenden Einstellungen:\n" "\n" "%s\n" "können NICHT auf die Terminals des aktuellen Fensters angewendet werden.\n" "Bitte verwenden Sie stattdessen [%s]." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Die folgenden Einstellungen können nicht angewendet werden" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "" "Deaktivieren: Stattdessen versuchen, [Transparenten Hintergrund] zu " "verwenden." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Das Hintergrundbild mit dem Text rollen" #: menu.c:2719 msgid "Open File" msgstr "Datei öffnen" #: menu.c:2721 msgid "Save File" msgstr "Datei speichern" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "Folgender Fehler ist aufgetreten: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Fehler beim Starten des Kindprozesses:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Fehler beim Erzeugen des Kindprozesses!\n" "Bitte überprüfen Sie, ob /dev/pts als devpts-Dateisystem eingehängt ist!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Fehler beim Starten des Kindprozesses" #: profile.c:854 msgid "Tab operation" msgstr "Reiter-Operation" #: profile.c:855 msgid "Switch tab" msgstr "Reiter wechseln" #: profile.c:856 msgid "Move tab" msgstr "Reiter verschieben" #: profile.c:857 msgid "Switch to #? tab" msgstr "Zum Reiter Nr.… wechseln" #: profile.c:858 msgid "Text operation" msgstr "Text-Operation" #: profile.c:859 msgid "Scroll up/down" msgstr "Nach oben/unten rollen" #: profile.c:860 msgid "Font" msgstr "Schrift" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Funktionen aktivieren/deaktivieren" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Deaktivieren/Aktivieren der Hyperlinks, der Funktionstasten und des " "Rechtsklickmenüs." #: profile.c:869 msgid "Add new tab" msgstr "Neuen Reiter hinzufügen" #: profile.c:871 msgid "Add a new tab." msgstr "Einen neuen Reiter hinzufügen." #: profile.c:873 msgid "Close tab" msgstr "Reiter schließen" #: profile.c:875 msgid "Close current tab." msgstr "Den aktuellen Reiter schließen." #: profile.c:877 msgid "Rename page name" msgstr "Umbenennen" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Namen des aktuellen Reiters ändern." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Zeichenketten anhand regulärer Ausdrücke suchen." #: profile.c:884 msgid "Find previous" msgstr "Rückwärts suchen" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Vorige Zeichenkette anhand regulärer Ausdrücke suchen." #: profile.c:887 msgid "Find next" msgstr "Weitersuchen" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Vorige Zeichenkette anhand regulärer Ausdrücke suchen." #: profile.c:891 msgid "Switch to prev tab" msgstr "Zum vorigen Reiter wechseln" #: profile.c:893 msgid "Switch to prev tab." msgstr "Zum vorigen Reiter wechseln." #: profile.c:895 msgid "Switch to next tab" msgstr "Zum nächsten Reiter wechseln" #: profile.c:897 msgid "Switch to next tab." msgstr "Zum nächsten Reiter wechseln" #: profile.c:899 msgid "Switch to first tab" msgstr "Zum ersten Reiter wechseln" #: profile.c:901 msgid "Switch to first tab." msgstr "Zum ersten Reiter wechseln." #: profile.c:903 msgid "Switch to last tab" msgstr "Zum letzten Reiter wechseln" #: profile.c:905 msgid "Switch to last tab." msgstr "Zum letzten Reiter wechseln." #: profile.c:907 msgid "Move page forward" msgstr "Eine Seite nach unten" #: profile.c:909 msgid "Move current page forward." msgstr "Eine Seite nach unten springen." #: profile.c:911 msgid "Move page backward" msgstr "Eine Seite nach oben" #: profile.c:913 msgid "Move current page backward." msgstr "Eine Seite nach oben springen." #: profile.c:915 msgid "Move page to first" msgstr "Zur ersten Seite" #: profile.c:917 msgid "Move current page to first." msgstr "Zur ersten Seite springen." #: profile.c:919 msgid "Move page to last" msgstr "Zur letzten Seite" #: profile.c:921 msgid "Move current page to last." msgstr "Zur letzten Seite springen." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Zum %d. Reiter wechseln" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Direkt zu %d. Reiter wechseln." #: profile.c:932 msgid "New window" msgstr "Neues Fenster" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Ein neues Fenster im aktuellen Ordner öffnen." #: profile.c:936 msgid "Select all" msgstr "Alles auswählen" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Gesamten Inhalt des Vte-Terminals auswählen." #: profile.c:940 msgid "Copy to clipboard" msgstr "In die Zwischenablage kopieren" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Den markierten Text in die Zwischenablage kopieren." #: profile.c:944 msgid "Paste the text" msgstr "Den Text einfügen" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Gesamten Inhalt des Vte-Terminals auswählen." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Den markierten Text in die Zwischenablage kopieren." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Text aus der Zwischenablage einfügen." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Schrift vergrößern" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Schrift im aktuellen Reiter vergrößern." #: profile.c:960 msgid "Decrease font size" msgstr "Schrift verkleinern" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Schrift im aktuellen Reiter verkleinern." #: profile.c:964 msgid "Reset font size" msgstr "Schriftgröße zurücksetzen" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "" "Die Schrift des aktuellen Reiters auf die ursprüngliche Größe zurücksetzen." #: profile.c:968 msgid "Maximize the window" msgstr "Das Fenster maximieren" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Das Fenster so maximieren, dass sämtlicher verfügbarer Platz auf Ihrem " "Bildschirm ausgefüllt wird." #: profile.c:972 msgid "Full screen" msgstr "Vollbild" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Vollbildmodus des Fensters setzen/zurücknehmen." #: profile.c:976 msgid "Scroll up" msgstr "Nach oben rollen" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Bewegung des Mausrades nach oben im Vte-Terminal emulieren." #: profile.c:980 msgid "Scroll down" msgstr "Nach unten rollen" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Bewegung des Mausrades nach oben im Vte-Terminal emulieren." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Eine Zeile nach oben rollen" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Eine Zeile im Vte-Terminal nach oben rollen." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Eine Zeile nach unten rollen" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Eine Zeile im Vte-Terminal nach unten rollen." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Shell-Befehlsspeicher löschen" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Fehlerdiagnosedaten protokollieren" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Fehlerdiagnosedaten zur Laufzeit von LilyTerm speichern." #: profile.c:1033 msgid "Window Title" msgstr "Fenstertitel" #: profile.c:1034 msgid "Running Command" msgstr "Ausgeführter Befehl" #: profile.c:1035 msgid "Current Dir" msgstr "Aktueller Ordner" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Benutzerdefinierter Name des Reiters" #: profile.c:1037 msgid "Root Privileges" msgstr "Systemverwalter-Rechte" #: profile.c:1038 msgid "Normal Text" msgstr "Normaler Text" #: profile.c:1072 msgid "Shift" msgstr "Umschalt" #: profile.c:1076 msgid "Ctrl" msgstr "Strg" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Hintergrund" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Vordergrundfarbe ändern" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Die Zieldatei ist nicht vorhanden" #: profile.c:2996 msgid "The target file is a directory" msgstr "Die Zieldatei ist ein Ordner" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Fehler beim Speichern des Profils »%s«:" #: profile.c:3049 msgid "Error when writing profile" msgstr "Fehler beim Speichern des Profils" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Einige Profileinträge wurden in dieser Version hinzugefügt, entfernt oder " "geändert.\n" "Bitte verwenden Sie »Einstellungen speichern« aus dem Kontextmenü,\n" "um Ihre Einstellungen zu speichern. Falls nötig, können Sie diese\n" "manuell bearbeiten.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Ihr Profil ist %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Das Format Ihres Profils ist nicht mehr aktuell" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Das Profil »%s« ist ungültig:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Das Profil ist ungültig" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tFenster #%d, Seite #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tSeite #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Systemvorgabe" #~ msgid "Join and paste" #~ msgstr "Bestätigen und einfügen" #~ msgid "%s (Main site)" #~ msgstr "%s (Hauptseite)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (Seite in traditionellem Chinesisch)" #~ msgid "%s (Github site)" #~ msgstr "%s (Github-Seite)" #~ msgid "Your %s profile is: " #~ msgstr "Ihr %s-Benutzerprofil: " po/es.po000066400000000000000000001254701246562641500124670ustar00rootroot00000000000000# Spanish translation of LilyTerm. # Copyright (C) 2010 P.L. Francisco # This file is distributed under the same license as the LilyTerm package. # # P.L. Francisco , 2010. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2010-05-09 16:52-0500\n" "Last-Translator: P.L. Francisco \n" "Language-Team: lilyterm\n" "Language: es_MX\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Virtaal 0.5.2\n" #: console.c:121 #, fuzzy, c-format #| msgid "Please report bug to %s. Thank you for using %s!\n" msgid "Please report bug at <%s>.\n" msgstr "Reporte cualquier error a %s. ¡Gracias por usar %s!\n" #: console.c:122 dialog.c:1078 #, fuzzy, c-format #| msgid "Please report bug to %s. Thank you for using %s!\n" msgid "Thank you for using %s!" msgstr "Reporte cualquier error a %s. ¡Gracias por usar %s!\n" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s es un terminal X basado en libvte. \n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Use -T/--title {título} para especificar el título de la ventana.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Use -T/--title {título} para especificar el título de la ventana.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "Use -t/--tab {número} para abrir múltiples solapas al comienzo.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Use -d/--directory {directorio} para especificar el directorio donde se " "ubicará inicialmente.\n" #: console.c:146 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "Use -T/--title {título} para especificar el título de la ventana.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "Use -l/-ls/--login para logearse con una shell al comienzo.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Use -s/--separate para arrancar varios procesos.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 #, fuzzy #| msgid "Use -p/--profile to got a profile sample.\n" msgid "Use -p/--profile to get a profile sample.\n" msgstr "Use -p/--profile para ver un ejemplo de perfil.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Use -u/--perfil_usuario {%s} para especificar un perfil.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Use -v/--version para mostrar la versión del programa.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command when starting up. (Must be " #| "the final option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Use -e/-x/--execute {Comando} para ejecutar un programa al arrancar el " "terminal. (Este debe ser el último parámetro).\n" #: console.c:159 #, fuzzy, c-format #| msgid "The %s system config is: %s/%s\n" msgid "The %s system configure file is: %s\n" msgstr "La configuración de %s es: %s/%s\n" #: console.c:193 #, fuzzy, c-format #| msgid "" #| "And your %s profile is: %s/%s\n" #| "\n" msgid "And your %s profile is: " msgstr "" "Y el del perfil %s es: %s/%s\n" "\n" #: console.c:224 msgid "Default key binding:" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 #, fuzzy #| msgid "" #| " * <`>\t\tDisable/Enable hyperlinks, function keys and right click " #| "menu\n" msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`>\t\tDeshabilita/Habilita hipervínculos, atajos de funciones y " "el menú secundario\n" #: console.c:229 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab\n" msgid " * Add a New tab with current directory.\n" msgstr " * \t\tAgrega/Elimina una solapa\n" #: console.c:230 #, fuzzy #| msgid " * \tSwitch to Prev/Next tab\n" msgid " * Switch to Prev/Next tab.\n" msgstr " * \tCambia a la Siguiente/Previa solapa\n" #: console.c:231 #, fuzzy #| msgid " * \tSwitch to First/Last tab\n" msgid " * Switch to First/Last tab.\n" msgstr " * \tCambia a la Última/Primera solapa\n" #: console.c:232 #, fuzzy #| msgid " * <[/]>\tMove current tab Forward/Backward\n" msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr "" " * \tMueve la solapa actual a la Siguiente/Previa\n" #: console.c:233 #, fuzzy #| msgid " * \tMove current tab to First/Last\n" msgid " * Move current tab to First/Last.\n" msgstr "" " * \tMueve la solapa actual al Último/Primer lugar\n" #: console.c:234 #, fuzzy #| msgid " * \tSwitch to 1st ~ 12th tab\n" msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * \tCambia a la 1ra ~ 12va solapa\n" #: console.c:235 #, fuzzy #| msgid "" #| " * <+/-/Enter>\tIncrease/Decrease/Reset the font size of current " #| "tab\n" msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter>\tIncrementa/Disminuye/Reinicializa el tamaño de la " "fuente en la solapa actual\n" #: console.c:236 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: console.c:237 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: console.c:238 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: console.c:239 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: console.c:240 #, fuzzy #| msgid "" #| " * \tSwitch between fullwindow/unfullwindow and " #| "fullscreen/unfullscreen state\n" msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr " * \tCambiar a pantalla completa\n" #: console.c:241 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: console.c:243 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid " * Select all the text in the terminal.\n" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: console.c:244 #, fuzzy #| msgid "" #| " * \t\tCopy the text to clipboard / Paste the text in " #| "clipboard\n" msgid " * Copy/Paste the text in clipboard.\n" msgstr " * \t\tCopia/Pega el texto desde y hacia el portapapeles\n" #: console.c:245 #, fuzzy #| msgid "" #| " * \t\tCopy the text to clipboard / Paste the text in " #| "clipboard\n" msgid " * Copy/Paste the text in primary clipboard.\n" msgstr " * \t\tCopia/Pega el texto desde y hacia el portapapeles\n" #: console.c:246 #, fuzzy #| msgid "" #| "\t\t\t(i.e. Emulate a middle button mouse click to paste the text)\n" #| "\n" msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" "\t\t\t(p.e. Simula el tercer botón del mouse)\n" "\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" #: console.c:249 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab\n" msgid " * Trying to close current tab.\n" msgstr " * \t\tAgrega/Elimina una solapa\n" #: console.c:250 #, fuzzy #| msgid "Using or 'exit' to close tabs is recommended" msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "Use o 'exit' para cerrar correctamente las solapas" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" #: console.c:252 #, fuzzy #| msgid " * \t\tRename current tab\n" msgid " * Rename the current tab.\n" msgstr " * \t\tRenombra la solapa actual\n" #: console.c:259 #, fuzzy, c-format #| msgid "" #| "Default shortcut key: (It may custom or disable by editing user's " #| "profile)\n" #| "\n" msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Atajos por defecto: (pueden configurarse o deshabilitarse editando el perfil " "del usuario)\n" "\n" #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "" #: dialog.c:122 dialog.c:3352 menu.c:2885 #, fuzzy #| msgid "The following error is occurred:" msgid "The following error occurred:" msgstr "Ha ocurrido el siguiente error:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Renombra esta solapa" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Introduzca el nombre para esta solapa:" #: dialog.c:211 msgid "Label Name:" msgstr "Nombre de la etiqueta:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "" #: dialog.c:235 msgid "Find: " msgstr "" #: dialog.c:258 msgid "Find previous string" msgstr "" #: dialog.c:264 msgid "Find next string" msgstr "" #: dialog.c:275 msgid "Case sensitive" msgstr "" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "" #: dialog.c:324 dialog.c:397 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Paste texts to every Vte Terminal" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: dialog.c:342 #, fuzzy #| msgid "Please input the Label Name of this tab:" msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Introduzca el nombre para esta solapa:" #: dialog.c:343 msgid "Text:" msgstr "" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "" #: dialog.c:388 msgid "Grab keys" msgstr "" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" #: dialog.c:417 dialog.c:956 #, fuzzy msgid "Key Value:" msgstr "Valor de la clave:" #: dialog.c:423 msgid "Entry" msgstr "" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" #: dialog.c:451 msgid "Default locale:" msgstr "" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" #: dialog.c:463 msgid "Locales list:" msgstr "" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Cambia la saturación del color del fondo de la terminal" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Modificar la saturación del fondo:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Modificar el color de primer plano de la terminal" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Modificar el color de fondo de la terminal" #: dialog.c:556 #, fuzzy #| msgid "Change the background color in terminal" msgid "Change the cursor color in terminal" msgstr "Modificar el color de fondo de la terminal" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the background color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Modificar el color de fondo de la terminal" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Ajustar el brillo de los colores ANSI" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 #, fuzzy #| msgid "Change colors" msgid "Invert color" msgstr "Modificar colores" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Modificar el color %s en la solapa" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Texto en negritas" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Confirmar cuando intente cerrar varias solapas al mismo tiempo" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Esta a punto de cerrar varias solapas. ¿Desea continuar?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" #: dialog.c:869 #, fuzzy msgid "Get the key value for function key" msgstr "Obtener el valor de la clave que se usa en el perfil" #: dialog.c:922 #, fuzzy msgid "Function Key Name" msgstr "Obtener el valor de la función" #: dialog.c:926 msgid "Key Bindings" msgstr "" #: dialog.c:934 #, fuzzy msgid "Key Group: " msgstr "Valor de la clave:" #: dialog.c:944 msgid "Note: " msgstr "" #: dialog.c:966 msgid "Disable all the function keys." msgstr "" #: dialog.c:999 #, fuzzy, c-format msgid "Usage for %s %s" msgstr "Forma de uso de %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Forma de uso" #: dialog.c:1031 msgid "Key binding" msgstr "" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "" #: dialog.c:1067 msgid "Translators" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "" #: dialog.c:1084 msgid "About" msgstr "" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "Aún existe un proceso corriendo en segundo plano en la solapa #%d:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "Use `kill -9 %d' para finalizar un proceso que no este respondiendo." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "¿Desea continuar?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Tip:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "" "Confirmar para cerrar mientras aún se ejecutan programas en segundo plano" #: dialog.c:1137 dialog.c:1319 #, fuzzy #| msgid "Rename this tab" msgid "this tab" msgstr "Renombra esta solapa" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Modificar la opacidad de la ventana" #: dialog.c:1146 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window:" msgstr "Modificar la opacidad de la ventana" #: dialog.c:1156 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive" msgstr "Modificar la opacidad de la ventana" #: dialog.c:1158 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive:" msgstr "Modificar la opacidad de la ventana" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Ajustar el brillo de los colores ANSI que se usan en la terminal" #: dialog.c:1211 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Ajustar el brillo de los colores ANSI" #: dialog.c:1255 #, fuzzy #| msgid "is trying to execute the following command:" msgid " is trying to execute the following command:" msgstr "está tratando de ejecutar el siguiente comando:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Confirmar para ejecutar -e/-x/--execute comando" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "Los siguientes programas aún se estan ejecutando en la solapa #%d:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Use o 'exit' para cerrar correctamente las solapas" #: dialog.c:1301 #, fuzzy #| msgid "Confirm to close a tab with child proccess" msgid "Confirm to close a tab with child process" msgstr "Confirmar para cerrar solapas mientras aún se ejecutan procesos" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "Los siguientes programas aún se estan ejecutando en esta ventana:" #: dialog.c:1331 #, fuzzy #| msgid "Confirm to close a window with child proccess" msgid "Confirm to close a window with child process" msgstr "Confirmar para cerrar ventanas mientras aún se ejecutan procesos" #: dialog.c:1352 #, fuzzy, c-format msgid "Confirm to close %s" msgstr "Comfirmar para cerrar %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "Los siguientes programas aún se estan ejecutando en %s:" #: dialog.c:1383 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Trying to paste the following texts to the Vte Terminal:" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: dialog.c:1390 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Confirm to paste texts to the Vte Terminal" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, fuzzy, c-format #| msgid "" #| "Try to kill this tab with SIGKILL to avoid terminate those programs!\n" #| "(MAY CAUSE DATA LOSS!!)" msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Intente finalizar la solapa con la señal SIGKILL para evitar cerrar sus " "aplicaciones\n" "(¡PUEDE PROVOCAR PERDIDA DE DATOS!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "¡Forzar el cierre de todas las solapas y ventanas %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "" #: dialog.c:3289 #, fuzzy, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Los datos del socket están corruptos.\n" "Si ha actualizado %s recientemente,\n" "Cierre todas las solapas y vuelva a intentarlo." #: dialog.c:3293 msgid "Not supported locale!" msgstr "" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" #: dialog.c:3365 msgid "Not supported feature!" msgstr "" #: dialog.c:3513 #, fuzzy, c-format #| msgid "" #| " * <`>\t\tDisable/Enable hyperlinks, function keys and right click " #| "menu\n" msgid "Disable all the function keys of [%s] group." msgstr "" " * <`>\t\tDeshabilita/Habilita hipervínculos, atajos de funciones y " "el menú secundario\n" #: main.c:657 #, fuzzy, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Los datos del socket están corruptos.\n" "Si ha actualizado %s recientemente,\n" "Cierre todas las solapas y vuelva a intentarlo." #: main.c:665 #, fuzzy msgid "The format of socket data is out of date" msgstr "El formato de los datos del socket está desactualizado" #: menu.c:59 msgid "Change text encoding" msgstr "Modificar la codificación del texto" #: menu.c:60 msgid "New tab" msgstr "Nueva pestaña" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nueva solapa con ubicación especificada" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Abrir nueva ventada con el perfil especificado" #: menu.c:80 msgid "Change the font" msgstr "Modificar fuente" #: menu.c:87 msgid "Change colors" msgstr "Modificar colores" #: menu.c:90 #, fuzzy #| msgid "Change the background color" msgid "Change the cursor color" msgstr "Modificar el color de fondo" #: menu.c:94 msgid "Change the foreground color" msgstr "Modificar el color de primer plano" #: menu.c:99 #, fuzzy #| msgid "Change the background color" msgid "Change the ANSI colors" msgstr "Modificar el color de fondo" #: menu.c:104 msgid "Change the background color" msgstr "Modificar el color de fondo" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Ajustar el brillo de los colores ANSI" #: menu.c:113 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "Adjust the brightness when inactive" msgstr "Ajustar el brillo de los colores ANSI" #: menu.c:138 #, fuzzy #| msgid "Change the font" msgid "Change ANSI color theme" msgstr "Modificar fuente" #: menu.c:148 #, fuzzy #| msgid "Background saturation" msgid "Background" msgstr "Saturación del fondo" #: menu.c:154 msgid "Transparent window" msgstr "Ventana transparente" #: menu.c:159 msgid "Window opacity" msgstr "Opacidad de la ventana" #: menu.c:162 #, fuzzy #| msgid "Dim text when inactive" msgid "Window opacity when inactive" msgstr "Obscurecer texto cuando se este inactivo" #: menu.c:172 msgid "Transparent background" msgstr "Fondo transparente" #: menu.c:175 msgid "Background saturation" msgstr "Saturación del fondo" #: menu.c:179 #, fuzzy #| msgid "Transparent background" msgid "Set background image" msgstr "Fondo transparente" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "" #: menu.c:196 msgid "Copy URL" msgstr "Copiar URL" #: menu.c:201 msgid "Copy" msgstr "Copiar" #: menu.c:205 msgid "Paste" msgstr "Pegar" #: menu.c:212 msgid "View clipboard" msgstr "" #: menu.c:216 msgid "View primary clipboard" msgstr "" #: menu.c:227 msgid "Scrollback lines" msgstr "Líneas de desfile hacia atrás" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Limpiar líneas de desfile hacia atrás" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "" #: menu.c:244 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Paste to every Vte Terminal" msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: menu.c:247 msgid "Launch file manager" msgstr "" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "" #: menu.c:275 msgid "Cursor Shape" msgstr "" #: menu.c:292 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim text when inactive" msgstr "Obscurecer texto cuando se este inactivo" #: menu.c:297 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim window when inactive" msgstr "Obscurecer texto cuando se este inactivo" #: menu.c:302 msgid "Cursor blinks" msgstr "Parpadeo del cursor" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Timbre audible" #: menu.c:327 #, fuzzy #| msgid "Audible bell" msgid "Visible bell" msgstr "Timbre audible" #: menu.c:332 msgid "Urgent bell" msgstr "" #: menu.c:342 msgid "Switch input methods" msgstr "Cambiar método de entrada" #: menu.c:361 msgid "Show the tabs bar" msgstr "Mostrar la barra de solapas" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Ocultar la barra de solapas" #: menu.c:374 #, fuzzy #| msgid "Show the tabs bar" msgid "Always show the tabs bar" msgstr "Mostrar la barra de solapas" #: menu.c:381 #, fuzzy #| msgid "Hide the tabs bar" msgid "Always hide the tabs bar" msgstr "Ocultar la barra de solapas" #: menu.c:391 msgid "Increase window size" msgstr "Aumentar el tamaño de la ventana" #: menu.c:394 msgid "Decrease window size" msgstr "Reducir el tamaño de la ventana" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Restablecer el tamaño/fuente personalizado del usuario" #: menu.c:404 msgid "Reset to system font/size" msgstr "Restablecer el tamaño y fuente del sistema" #: menu.c:409 msgid "Reset the content" msgstr "Restablecer el contenido" #: menu.c:424 msgid "User profile" msgstr "Perfil del usuario" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Salir de %s" #: menu.c:502 msgid "grayscale" msgstr "" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, c-format msgid "%s + custom" msgstr "" #: menu.c:655 msgid "View current page information" msgstr "" #: menu.c:1099 msgid " (Wide)" msgstr " (anchura)" #: menu.c:1554 msgid "Font Selection" msgstr "Selección de la tipografía" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "" #: menu.c:1948 menu.c:1998 #, fuzzy #| msgid "Save settings as..." msgid "Other settings..." msgstr "Guardar preferencias como..." #: menu.c:1963 #, fuzzy #| msgid "Save settings as..." msgid "Save settings automatically" msgstr "Guardar preferencias como..." #: menu.c:1968 msgid "Save settings" msgstr "Guardar preferencias" #: menu.c:1971 msgid "Save settings as..." msgstr "Guardar preferencias como..." #: menu.c:1977 #, fuzzy #| msgid "Save settings" msgid "Reload settings" msgstr "Guardar preferencias" #: menu.c:2012 #, fuzzy, c-format msgid "%s default" msgstr "Perfil % por defecto" #: menu.c:2034 #, fuzzy msgid "System default" msgstr "Preferencias del sistema" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "" #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "" #: menu.c:2719 msgid "Open File" msgstr "" #: menu.c:2721 msgid "Save File" msgstr "" #: menu.c:2883 #, fuzzy, c-format #| msgid "The following error is occurred:" msgid "The following error occurred: %s" msgstr "Ha ocurrido el siguiente error:" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Error al crear el proceso hijo:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" #: notebook.c:749 msgid "Error when creating child process" msgstr "Error al crear el proceso hijo" #: profile.c:854 msgid "Tab operation" msgstr "" #: profile.c:855 msgid "Switch tab" msgstr "" #: profile.c:856 #, fuzzy #| msgid "New tab" msgid "Move tab" msgstr "Nueva pestaña" #: profile.c:857 msgid "Switch to #? tab" msgstr "" #: profile.c:858 msgid "Text operation" msgstr "" #: profile.c:859 msgid "Scroll up/down" msgstr "" #: profile.c:860 msgid "Font" msgstr "" #: profile.c:865 msgid "Disable/Enable functions" msgstr "" #: profile.c:867 #, fuzzy #| msgid "" #| " * <`>\t\tDisable/Enable hyperlinks, function keys and right click " #| "menu\n" msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" " * <`>\t\tDeshabilita/Habilita hipervínculos, atajos de funciones y " "el menú secundario\n" #: profile.c:869 #, fuzzy #| msgid "New tab" msgid "Add new tab" msgstr "Nueva pestaña" #: profile.c:871 msgid "Add a new tab." msgstr "" #: profile.c:873 #, fuzzy #| msgid "New tab" msgid "Close tab" msgstr "Nueva pestaña" #: profile.c:875 msgid "Close current tab." msgstr "" #: profile.c:877 msgid "Rename page name" msgstr "" #: profile.c:879 #, fuzzy #| msgid "Please input the Label Name of this tab:" msgid "Rename the page name of current tab." msgstr "Introduzca el nombre para esta solapa:" #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "" #: profile.c:884 msgid "Find previous" msgstr "" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "" #: profile.c:887 msgid "Find next" msgstr "" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "" #: profile.c:891 msgid "Switch to prev tab" msgstr "" #: profile.c:893 msgid "Switch to prev tab." msgstr "" #: profile.c:895 msgid "Switch to next tab" msgstr "" #: profile.c:897 msgid "Switch to next tab." msgstr "" #: profile.c:899 msgid "Switch to first tab" msgstr "" #: profile.c:901 msgid "Switch to first tab." msgstr "" #: profile.c:903 msgid "Switch to last tab" msgstr "" #: profile.c:905 msgid "Switch to last tab." msgstr "" #: profile.c:907 msgid "Move page forward" msgstr "" #: profile.c:909 msgid "Move current page forward." msgstr "" #: profile.c:911 msgid "Move page backward" msgstr "" #: profile.c:913 msgid "Move current page backward." msgstr "" #: profile.c:915 msgid "Move page to first" msgstr "" #: profile.c:917 msgid "Move current page to first." msgstr "" #: profile.c:919 msgid "Move page to last" msgstr "" #: profile.c:921 msgid "Move current page to last." msgstr "" #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "" #: profile.c:932 msgid "New window" msgstr "" #: profile.c:934 msgid "Open a new window with current dir." msgstr "" #: profile.c:936 msgid "Select all" msgstr "" #: profile.c:938 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Select all the text in the Vte Terminal box." msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: profile.c:940 msgid "Copy to clipboard" msgstr "" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "" #: profile.c:944 #, fuzzy #| msgid "Reset the content" msgid "Paste the text" msgstr "Restablecer el contenido" #: profile.c:946 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Paste the text in clipboard to the Vte Terminal box." msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: profile.c:948 #, fuzzy #| msgid " * \tPaste the text in primary clipboard\n" msgid "Copy the text to primary clipboard" msgstr " * \tPega en el portapeles\n" #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid " * \tPaste the text in primary clipboard\n" msgid "Paste the text in primary clipboard" msgstr " * \tPega en el portapeles\n" #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 #, fuzzy #| msgid "Increase window size" msgid "Increase font size" msgstr "Aumentar el tamaño de la ventana" #: profile.c:958 #, fuzzy #| msgid "" #| " * <+/-/Enter>\tIncrease/Decrease/Reset the font size of current " #| "tab\n" msgid "Increase the font size of current tab." msgstr "" " * <+/-/Enter>\tIncrementa/Disminuye/Reinicializa el tamaño de la " "fuente en la solapa actual\n" #: profile.c:960 #, fuzzy #| msgid "Decrease window size" msgid "Decrease font size" msgstr "Reducir el tamaño de la ventana" #: profile.c:962 #, fuzzy #| msgid "" #| " * <+/-/Enter>\tIncrease/Decrease/Reset the font size of current " #| "tab\n" msgid "Decrease the font size of current tab." msgstr "" " * <+/-/Enter>\tIncrementa/Disminuye/Reinicializa el tamaño de la " "fuente en la solapa actual\n" #: profile.c:964 #, fuzzy #| msgid "Reset to system font/size" msgid "Reset font size" msgstr "Restablecer el tamaño y fuente del sistema" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "" #: profile.c:968 msgid "Maximize the window" msgstr "" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" #: profile.c:972 msgid "Full screen" msgstr "" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "" #: profile.c:976 msgid "Scroll up" msgstr "" #: profile.c:978 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: profile.c:980 msgid "Scroll down" msgstr "" #: profile.c:982 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: profile.c:984 #, fuzzy #| msgid "Scrollback lines" msgid "Scroll up 1 line" msgstr "Líneas de desfile hacia atrás" #: profile.c:986 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: profile.c:988 #, fuzzy #| msgid "Scrollback lines" msgid "Scroll down 1 line" msgstr "Líneas de desfile hacia atrás" #: profile.c:990 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box\n" msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr " * \t\tSelecciona todo el texto de la terminal\n" #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Limpiar líneas de desfile hacia atrás" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "" #: profile.c:1033 msgid "Window Title" msgstr "Título de la ventana" #: profile.c:1034 msgid "Running Command" msgstr "Comando en ejecución" #: profile.c:1035 msgid "Current Dir" msgstr "Directorio actual" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Nombre de la solapa personalizado" #: profile.c:1037 msgid "Root Privileges" msgstr "Privilegios de super usuario" #: profile.c:1038 msgid "Normal Text" msgstr "Texto normal" #: profile.c:1072 msgid "Shift" msgstr "" #: profile.c:1076 msgid "Ctrl" msgstr "" #: profile.c:1078 msgid "Alt" msgstr "" #: profile.c:1088 msgid "Win" msgstr "" #: profile.c:1132 #, fuzzy #| msgid "Background saturation" msgid "Background Color" msgstr "Saturación del fondo" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Modificar el color de primer plano" #: profile.c:2985 #, fuzzy #| msgid "The target file is NOT exists" msgid "The target file does NOT exist" msgstr "El archivo destino NO existe" #: profile.c:2996 msgid "The target file is a directory" msgstr "El archivo destino es un directorio" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Error al escribir el perfil '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Error al escribir el perfil" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Alguna opción pudo ser agregada, removida o modificada en este versión.\n" "Use [Guardar preferencias] en el menú secundario para guardar sus " "preferencias,\n" "editela manualmente de ser necesario.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Su perfil es %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "El formato de su perfil esta desactualizado" #: profile.c:3226 profile.c:3229 #, fuzzy, c-format #| msgid "The profile \"%s\" is invalid: %s" msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "El perfil \"%s\" es invalido: %s" #: profile.c:3237 #, fuzzy #| msgid "The profile \"%s\" is invalid: %s" msgid "The profile is invalid!" msgstr "El perfil \"%s\" es invalido: %s" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tVentana #%d, página #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tPágina #%d: (%d) %s\n" #, fuzzy #~ msgid "System default (SCHEME)" #~ msgstr "Preferencias del sistema" #, fuzzy #~ msgid "System default (PROFILE)" #~ msgstr "Preferencias del sistema" #, fuzzy #~| msgid "" #~| "And your %s profile is: %s/%s\n" #~| "\n" #~ msgid "Your %s profile is: " #~ msgstr "" #~ "Y el del perfil %s es: %s/%s\n" #~ "\n" #, fuzzy #~| msgid "Please report bug to %s. Thank you for using %s!\n" #~ msgid "Thank you for using %s!\n" #~ msgstr "Reporte cualquier error a %s. ¡Gracias por usar %s!\n" #, fuzzy #~| msgid " * \tPaste the text in primary clipboard\n" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr " * \tPega en el portapeles\n" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "¿Desea continuar?" #, fuzzy #~| msgid "Please report bug to %s. Thank you for using %s!\n" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "Reporte cualquier error a %s. ¡Gracias por usar %s!\n" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "" #~ "%s es un terminal X basado en libvte. \n" #~ "\n" #, fuzzy #~ msgid "Set function key value" #~ msgstr "Obtener el valor de la función" #, fuzzy #~| msgid "Reset the content" #~ msgid "Paste to every vte" #~ msgstr "Restablecer el contenido" #~ msgid "Change the Opacity of window:" #~ msgstr "Cambiar la opacidad de la ventana:" #~ msgid "\t\t\t(" #~ msgstr "\t\t\t(" #~ msgid ")\n" #~ msgstr ")\n" #~ msgid "" #~ "You may press any key here to get the key value for using in profile.\n" #~ "\n" #~ "Press [Copy] to copy the key value to clipboard;\n" #~ "And press [Close] to exit." #~ msgstr "" #~ "Presione cualquier teclar para obtener el valor de la cleve que se usa en " #~ "el perfil.\n" #~ "\n" #~ "Presione [Copiar] para copiar el valor al portapeles;\n" #~ "O [Cerrar] para salir." po/fr.po000066400000000000000000001245241246562641500124660ustar00rootroot00000000000000msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-04-03 15:35+0100\n" "Last-Translator: Niels Martignène \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Veuillez s'il vous plaît reporter les bogues à %s.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Merci d'utiliser %s !" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s est un émulateur de terminal basé sur libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Utilisez -T/--title {titre} pour modifier le titre de la fenêtre.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Utilisez -T/--title {titre} pour modifier le titre de la fenêtre.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "" "Utilisez -t/--tab {nombre} pour ouvrir plusieurs onglets au démarrage.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Utilisez -d/--directory {répertoire} pour modifier le répertoire courant.\n" #: console.c:146 #, fuzzy #| msgid "" #| "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " #| "geometry of window.\n" msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Utilisez -g/--geometry {LARGEURxHAUTEUR[+-]DÉCALAGE_X[+-]DÉCALAGE_Y} pour " "spécifier la géométrie de la fenêtre.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "" "Utilisez -l/-ls/--login pour invoquer le shell en tant que shell de login.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Utilisez -s/--separate pour utiliser un processus séparé.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 #, fuzzy #| msgid "Use -p/--profile to got a profile sample.\n" msgid "Use -p/--profile to get a profile sample.\n" msgstr "Utilisez -p/--profile pour créer un exemple de profil.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Utilisez -u/--user_profile {%s} pour utiliser le profil spécifié.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Utilisez -v/--version pour afficher les informations de version.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command when starting up. (Must be " #| "the final option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Utilisez -e/-x/--execute {commande} pour exécuter une commande au lancement " "(doit être la dernière option).\n" #: console.c:159 #, fuzzy, c-format #| msgid "The %s system configure file is: %s/%s\n" msgid "The %s system configure file is: %s\n" msgstr "La configuration système de %s est dans: %s/%s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "Votre profil %s est :" #: console.c:224 msgid "Default key binding:" msgstr "Raccourcis claviers par défaut :" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 #, fuzzy #| msgid "" #| " * <`> Disable/Enable hyperlinks, function keys and " #| "right click menu." msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Désactiver/activer les hyperliens, les raccourcis et " "le menu contextuel." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr "" " * Ouvrir un nouvel onglet dans le répertoire courant.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Basculer vers l'onglet précédent/suivant.\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Basculer vers le premier/dernier onglet.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr "" " * <[/]> Déplacer l'onglet courant vers la gauche ou la " "droite.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr "" " * Déplacer l'onglet courant en premier ou en dernier.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Basculer vers l'onglet 1 à 12.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter> Augmenter/Diminuer/Remettre à zéro la taille de " "police de l'onglet courant.\n" #: console.c:236 #, fuzzy #| msgid "" #| " * Emulate a mouse Scroll Up/Down event on Vte " #| "Terminal box.\n" msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Émuler un défilement de souris sur le terminal.\n" #: console.c:237 #, fuzzy #| msgid "" #| " * Asks to Scroll Up/Down 1 line on Vte Terminal " #| "box.\n" msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Effectuer un défilement d'une ligne vers le haut ou " "le bas.\n" #: console.c:238 #, fuzzy #| msgid "" #| " * Gtk+ default behavior, Scroll Up/Down on Vte " #| "Terminal box.\n" msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Comportement par défaut de Gtk+, défilement vers le " "haut ou le bas.\n" #: console.c:239 #, fuzzy #| msgid "" #| " * Gtk+ default behavior, Scroll the Terminal box to " #| "to Top/Bottom.\n" msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Comportement par défaut de Gtk+, défilement au début " "ou à la fin.\n" #: console.c:240 #, fuzzy #| msgid "" #| " * Switch between fullwindow/unfullwindow and " #| "fullscreen/unfullscreen state.\n" msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Basculer entre les modes maximisé/normal et plein " "écran/normal.\n" #: console.c:241 #, fuzzy #| msgid "" #| " * Find text in the Vte Terminal box. Use /" #| " to find Next/Prev.\n" msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Rechercher dans le terminal courant. Utilisez /" " pour aller au précédent/suivant.\n" #: console.c:243 #, fuzzy #| msgid "" #| " * Select all the text in the Vte Terminal box.\n" msgid " * Select all the text in the terminal.\n" msgstr " * Sélectionner tout le texte du terminal.\n" #: console.c:244 #, fuzzy #| msgid "" #| " * Copy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * Copier le texte vers le presse-papiers / Coller le " "texte du presse-papiers.\n" #: console.c:245 #, fuzzy #| msgid "" #| " * Copy the text to primary clipboard / Paste the " #| "text in primary clipboard.\n" msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * Copier le texte vers le sélecteur primaire / Coller " "le texte du sélecteur primaire.\n" #: console.c:246 #, fuzzy #| msgid "" #| " (i.e. Emulate a middle button mouse click to copy/" #| "paste the text)\n" msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (i.e. Simuler un clic du milieu pour copier/coller " "le texte)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "Raccourcis potentiellement utiles mais désactivés par défaut :\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * Fermer l'onglet courant.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (Utilisez de préférence ou 'exit' pour " "fermer les onglets)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" " * Ouvrir une nouvelle fenêtre dans le répertoire " "courant.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Renommer l'onglet courant.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Conseil : Ces raccourcis par défaut peuvent être modifier ou désactiver via " "le menu contextuel [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Modifier les raccourcis claviers" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "L'erreur suivante s'est produite :" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Renommer cet onglet" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Veuillez entrer le titre de cet onglet :" #: dialog.c:211 msgid "Label Name:" msgstr "Titre :" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Rechercher une chaîne" #: dialog.c:235 msgid "Find: " msgstr "Rechercher :" #: dialog.c:258 msgid "Find previous string" msgstr "Rechercher vers le haut" #: dialog.c:264 msgid "Find next string" msgstr "Rechercher vers le bas" #: dialog.c:275 msgid "Case sensitive" msgstr "Sensible à la casse" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Utiliser des expressions régulières compatibles Perl" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Copier des textes dans tous les terminaux Vte" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "" "Veuillez entrer le le texte qui sera copié dans tous les terminaux Vte :" #: dialog.c:343 msgid "Text:" msgstr "Texte :" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Ajouter une nouvelle ligne à la fin du texte." #: dialog.c:388 msgid "Grab keys" msgstr "Capturer les touches" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Applique le raccourci clavier à tous les terminaux.\n" "Utile lorsque vous voulez coller des raccourcis combinés, comme ." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Raccourci actif :" #: dialog.c:423 msgid "Entry" msgstr "Valider" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Ajouter de nouvelles locales et modifier la locale par défaut" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "La locale par défaut utilisée en ouvrant un terminal Vte.\n" "Vous pouvez utiliser \"fr_FR\", \"fr_FR.UTF-8\", ou \"en_US.UTF-8\" par " "exemple." #: dialog.c:451 msgid "Default locale:" msgstr "Locale par défaut :" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Liste des locales du menu contextuel séparées par un .\n" "Utilisez par exemple \"fr_FR\", \"fr_FR.UTF-8\" ou \"en_US.UTF-8\".\n" "Vous pouvez utiliser simplement \"UTF-8\" si vous n'avez pas de locales " "installées." #: dialog.c:463 msgid "Locales list:" msgstr "Liste des locales :" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Modifier la saturation du fond" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Modifier la saturation du fond :" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Modifier la couleur d'avant-plan du terminal" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Modifier la couleur du fond dans le terminal" #: dialog.c:556 #, fuzzy #| msgid "Change the background color in terminal" msgid "Change the cursor color in terminal" msgstr "Modifier la couleur du fond dans le terminal" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the background color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Modifier la couleur du fond dans le terminal" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Régler la brillance des couleurs ANSI" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Inverser les couleurs" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Modifier la couleur %s de l'onglet" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Exemple Texte Gras" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Confirmer la fermeture de plusieurs onglets" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "" "Vous êtes sur le point de fermer plusieurs onglets. Voulez-vous continuer ?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "ces onglets" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Vous pouvez appuyer sur + \n" "pour modifier le raccourci." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Lire le raccourci d'une action" #: dialog.c:922 msgid "Function Key Name" msgstr "Nom de l'action" #: dialog.c:926 msgid "Key Bindings" msgstr "Raccourcis claviers" #: dialog.c:934 msgid "Key Group: " msgstr "Groupe de raccourcis : " #: dialog.c:944 msgid "Note: " msgstr "Description : " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Désactiver tous les raccourcis claviers" #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Usage pour %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "N'oubliez pas d'enregistrer les réglages pour garder vos changements !" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Utilisation" #: dialog.c:1031 msgid "Key binding" msgstr "Raccourci clavier" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "Licence" #: dialog.c:1067 msgid "Translators" msgstr "Traducteurs" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Page web :" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Wiki : %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Blog : %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Wiki : %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Problèmes: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC : %s" #: dialog.c:1084 msgid "About" msgstr "À propos" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "Il y a encore un programme qui tourne en avant-plan de l'onglet #%d :" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "Fermez ce programme avec la commande 'kill -9 %d' s'il ne répond pas" #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Continuer malgré tout ?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Conseil :" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Confirmez la fenêtre du programme en avant-plan" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "cet onglet" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Modifier l'opacité de la fenêtre" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Modifier l'opacité de la fenêtre :" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Modifier l'opacité de la fenêtre lorsqu'elle est inactive" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Modifier l'opacité de la fenêtre lorsqu'elle est inactive :" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Régler la brillance des couleurs ANSI utilisées dans le terminal" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Diminuer la brillance des couleurs ANSI lorsqu'inactif" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " essaie d'exécuter la commande suivante :" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Confirmez pour exécuter la commande -e/-x/--execute" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "Les programmes suivants sont en cours dans l'onglet #%d :" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "" "Il est recommandé d'utiliser ou 'exit' pour fermer les onglets" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Confirmez la fermeture d'un onglet avec un processus enfant" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "Les programmes suivants sont en cours dans cette fenêtre :" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Confirmez la fermeture d'une fenêtre avec un processus enfant" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Confirmez pour fermer %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "Les programmes suivants sont encore exécutés dans %s :" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Copier le texte suivant dans tous le terminal :" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Confirmez la copie du texte dans le terminal" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Essayez de fermer %s par un SIGKILL() pour éviter de terminer ces " "programmes !\n" "(PEUT ENTRAÎNER DES PERTES DE DONNÉES!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Forcer la fermeture de toutes les fenêtres et onglet, et quitter %s !" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Désactivé, dupliqué par [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Désactivé)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "La locale \"%s\" ne semble pas supportées par votre système !\n" "Si vous avez ajouté les données des locales récemment,\n" "Veuillez fermer toutes les fenêtres de %s et essayer à nouveau." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Locale non supportée !" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Utilisez la version %s et recompiler %s pour utiliser cette fonctionnalité." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Option non supportée !" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Désactiver tous les raccourcis claviers du groupe [%s]" #: main.c:657 #, fuzzy, c-format #| msgid "" #| "The data got from socket seems incorrect.\n" #| "\n" #| "\tRecieved socket version: %s\n" #| "\tExpected socket version: %s\n" #| "\n" #| "If you just updated %s recently,\n" #| "Please close all the windows of %s and try again." msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Les données reçues sur le socket semblent incorrectes.\n" "\n" "\tVersion reçue : %s\n" "\tVersion attendue : %s\n" "\n" "Si vous avez mis à jour %s récemment\n" ",fermez toutes les fenêtres de %s et réessayez." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Le format des données du socket est dépassé" #: menu.c:59 msgid "Change text encoding" msgstr "Codage des caractères" #: menu.c:60 msgid "New tab" msgstr "Nouvel onglet" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nouvel onglet avec la locale spécifiée" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Nouvelle fenêtre avec le profil spécifié" #: menu.c:80 msgid "Change the font" msgstr "Modifier la police" #: menu.c:87 msgid "Change colors" msgstr "Modifier les couleurs" #: menu.c:90 #, fuzzy #| msgid "Change the background color" msgid "Change the cursor color" msgstr "Modifier la couleur du fond" #: menu.c:94 msgid "Change the foreground color" msgstr "Modifier la couleur du texte" #: menu.c:99 #, fuzzy #| msgid "Change the background color" msgid "Change the ANSI colors" msgstr "Modifier la couleur du fond" #: menu.c:104 msgid "Change the background color" msgstr "Modifier la couleur du fond" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Régler la brillance des couleurs ANSI" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Ajuster la brillance lorsqu'inactif" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Modifier le thème de couleurs ANSI" #: menu.c:148 msgid "Background" msgstr "Arrière-plan" #: menu.c:154 msgid "Transparent window" msgstr "Fenêtre transparente" #: menu.c:159 msgid "Window opacity" msgstr "Opacité de la fenêtre" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Assombrir le texte lorsque la fenêtre est inactive" #: menu.c:172 msgid "Transparent background" msgstr "Utiliser un fond transparent" #: menu.c:175 msgid "Background saturation" msgstr "Modifier la saturation du fond" #: menu.c:179 msgid "Set background image" msgstr "Choisir une image de fond" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Presse-papiers" #: menu.c:196 msgid "Copy URL" msgstr "Copier le lien" #: menu.c:201 msgid "Copy" msgstr "Copier" #: menu.c:205 msgid "Paste" msgstr "Coller" #: menu.c:212 msgid "View clipboard" msgstr "Afficher le presse-papiers" #: menu.c:216 msgid "View primary clipboard" msgstr "Afficher le sélecteur primaire" #: menu.c:227 msgid "Scrollback lines" msgstr "Afficher la barre de défilement" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Effacer les lignes du cache" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Autres options" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Copier dans tous les terminaux Vte" #: menu.c:247 msgid "Launch file manager" msgstr "Exécuter le gestionnaire de fichiers" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Mode d'effacement" #: menu.c:275 msgid "Cursor Shape" msgstr "" #: menu.c:292 msgid "Dim text when inactive" msgstr "Assombrir le texte lorsque la fenêtre est inactive" #: menu.c:297 msgid "Dim window when inactive" msgstr "Assombrir la fenêtre lorsqu'elle est inactive" #: menu.c:302 msgid "Cursor blinks" msgstr "Le curseur clignote" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Alertes audibles" #: menu.c:327 msgid "Visible bell" msgstr "Alertes visuelles" #: menu.c:332 msgid "Urgent bell" msgstr "Alertes urgentes" #: menu.c:342 msgid "Switch input methods" msgstr "Changer de méthode d'entrée" #: menu.c:361 msgid "Show the tabs bar" msgstr "Afficher les onglets" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Cacher les onglets" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Toujours afficher les onglets" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Toujours cacher les onglets" #: menu.c:391 msgid "Increase window size" msgstr "Augmenter la taille de la fenêtre" #: menu.c:394 msgid "Decrease window size" msgstr "Diminuer la taille de la fenêtre" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Remettre à la police utilisateur" #: menu.c:404 msgid "Reset to system font/size" msgstr "Remettre à la police système" #: menu.c:409 msgid "Reset the content" msgstr "Effacer le contenu" #: menu.c:424 msgid "User profile" msgstr "Profil courant" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Quitter %s" #: menu.c:502 msgid "grayscale" msgstr "gradient de gris" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Personnalisé" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Déplacer l'onglet courant vers la droite." #: menu.c:1099 msgid " (Wide)" msgstr " (large)" #: menu.c:1554 msgid "Font Selection" msgstr "Sélection de la police" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Ajouter d'autres locales..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Autres réglages..." #: menu.c:1963 #, fuzzy #| msgid "Save settings as..." msgid "Save settings automatically" msgstr "Enregistrer les réglages sous..." #: menu.c:1968 msgid "Save settings" msgstr "Enregistrer les réglages" #: menu.c:1971 msgid "Save settings as..." msgstr "Enregistrer les réglages sous..." #: menu.c:1977 msgid "Reload settings" msgstr "Recharger les réglages" #: menu.c:2012 #, c-format msgid "%s default" msgstr "Défaut %s" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Défaut système" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Les réglages suivants :\n" "\n" "%s\n" "Ne peuvent pas être appliqués aux terminaux de la fenêtre courant.\n" "Utilisez %s à la place." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Les réglages suivants ne peuvent pas être appliqués" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Désactiver : Utiliser un fond transparent à la place." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Faire défiler l'image de fond avec le texte" #: menu.c:2719 msgid "Open File" msgstr "Ouvrir" #: menu.c:2721 msgid "Save File" msgstr "Enregistrer" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "L'erreur suivant s'est produite : %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Erreur lors de la création du processus enfant :" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Erreur lors de la création du processus enfant !\n" "Assuez-vous que /dev/pts est monté en tant que système de fichiers devpts !" #: notebook.c:749 msgid "Error when creating child process" msgstr "Erreur lors de la création du processus enfant" #: profile.c:854 msgid "Tab operation" msgstr "Opérations sur les onglets" #: profile.c:855 msgid "Switch tab" msgstr "Bascule d'onglet" #: profile.c:856 msgid "Move tab" msgstr "Déplacement d'onglet" #: profile.c:857 msgid "Switch to #? tab" msgstr "Basculer vers l'onglet #?" #: profile.c:858 msgid "Text operation" msgstr "Opérations sur le texte" #: profile.c:859 msgid "Scroll up/down" msgstr "Défiler vers le haut/le bas" #: profile.c:860 msgid "Font" msgstr "Police" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Activer/désactiver les racccourcis" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Activer/désactiver les hyperliens, les raccourcis et le menu contextuel." #: profile.c:869 msgid "Add new tab" msgstr "Ouvrir un nouvel onglet" #: profile.c:871 msgid "Add a new tab." msgstr "Ouvrir un nouvel onglet." #: profile.c:873 msgid "Close tab" msgstr "Fermer l'onglet" #: profile.c:875 msgid "Close current tab." msgstr "Fermer l'onglet courant." #: profile.c:877 msgid "Rename page name" msgstr "Renommer l'onglet" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Renommer l'onglet courant." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Rechercher des chaînes à l'aide d'expressions régulières." #: profile.c:884 msgid "Find previous" msgstr "Rechercher vers le haut" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Continuer la recherche vers le haut." #: profile.c:887 msgid "Find next" msgstr "Rechercher vers le bas" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Continuer la recherche vers le bas." #: profile.c:891 msgid "Switch to prev tab" msgstr "Basculer vers l'onglet précédent" #: profile.c:893 msgid "Switch to prev tab." msgstr "Basculer vers l'onglet précédent." #: profile.c:895 msgid "Switch to next tab" msgstr "Basculer vers l'onglet suivant" #: profile.c:897 msgid "Switch to next tab." msgstr "Basculer vers l'onglet suivant." #: profile.c:899 msgid "Switch to first tab" msgstr "Basculer vers le premier onglet" #: profile.c:901 msgid "Switch to first tab." msgstr "Basculer vers le premier onglet." #: profile.c:903 msgid "Switch to last tab" msgstr "Basculer vers le dernier onglet" #: profile.c:905 msgid "Switch to last tab." msgstr "Basculer vers le dernier onglet." #: profile.c:907 msgid "Move page forward" msgstr "Déplacer l'onglet vers la droite" #: profile.c:909 msgid "Move current page forward." msgstr "Déplacer l'onglet courant vers la droite." #: profile.c:911 msgid "Move page backward" msgstr "Déplacer l'onglet vers la gauche" #: profile.c:913 msgid "Move current page backward." msgstr "Déplacer l'onglet courant vers la gauche." #: profile.c:915 msgid "Move page to first" msgstr "Déplacer l'onglet au début" #: profile.c:917 msgid "Move current page to first." msgstr "Déplacer l'onglet courant au début." #: profile.c:919 msgid "Move page to last" msgstr "Déplacer l'onglet à la fin" #: profile.c:921 msgid "Move current page to last." msgstr "Déplacer l'onglet courant à la fin." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Basculer vers l'onglet #%d" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Basculer directement vers l'onglet #%d." #: profile.c:932 msgid "New window" msgstr "Nouvelle fenêtre" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Ouvrir une nouvelle fenêtre dans le répertoire courant." #: profile.c:936 msgid "Select all" msgstr "Sélectionner tout" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Sélectionner tout le texte du terminal." #: profile.c:940 #, fuzzy #| msgid "Copy to clipboard." msgid "Copy to clipboard" msgstr "Copier dans le presse-papiers" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Copier le texte dans le presse-papiers." #: profile.c:944 msgid "Paste the text" msgstr "Coller le texte" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Sélectionner tout le texte du terminal." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Copier le texte dans le presse-papiers." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Coller le texte du presse-papiers." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Augmenter la taille de la police" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Augmenter la taille de la police de l'onglet courant." #: profile.c:960 msgid "Decrease font size" msgstr "Diminuer la taille de la police" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Diminuer la taille de la police de l'onglet courant." #: profile.c:964 msgid "Reset font size" msgstr "Remettre la taille de la police à zéro" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Remettre la police de l'onglet courant à sa taille originale." #: profile.c:968 msgid "Maximize the window" msgstr "Maximiser la fenêtre" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "Maximiser la fenêtre pour utiliser tout l'espace disponible." #: profile.c:972 msgid "Full screen" msgstr "Plein écran" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Active/désactiver le mode plein écran." #: profile.c:976 msgid "Scroll up" msgstr "Défiler vers le haut" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Simuler un défilement vers le haut dans le terminal." #: profile.c:980 msgid "Scroll down" msgstr "Défiler vers le bas" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Simuler un défilement vers le bas dans le terminal." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Défiler d'une ligne vers le haut" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Demande à défiler d'une ligne vers le haut." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Défiler d'une ligne vers le bas" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Demande à défiler d'une ligne vers le bas." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Effacer les lignes du cache" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Décharger les données de débogage" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Décharger les données de débogage de LilyTerm." #: profile.c:1033 msgid "Window Title" msgstr "Titre de la fenêtre" #: profile.c:1034 msgid "Running Command" msgstr "Exécute une commande" #: profile.c:1035 msgid "Current Dir" msgstr "Répertoire courant" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Titre d'onglet personnalisé" #: profile.c:1037 msgid "Root Privileges" msgstr "Prilivères administrateur (root)" #: profile.c:1038 msgid "Normal Text" msgstr "Texte normal" #: profile.c:1072 msgid "Shift" msgstr "Maj" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Arrière-plan" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Modifier la couleur du texte" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Le fichier de destination n'existe pas" #: profile.c:2996 msgid "The target file is a directory" msgstr "Le fichier de destination est un répertoire" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Erreur en enregistrant le profil '%s' :" #: profile.c:3049 msgid "Error when writing profile" msgstr "Erreur en enregistrant le profil" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "La configuration du profil a changé dans cette version.\n" "Utilisez l'option [Enregistrer les réglages] du menu contextuel,\n" "et modifiez les options si nécessaire.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Votre profil est %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Le format de votre profil n'est plus à jour" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Le profil \"%s\" n'est pas valide :\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Le profil n'est pas valide !" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tFenêtre #%d, Page #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tOnglet #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Défaut système" #~ msgid "Join and paste" #~ msgstr "Joindre et coller" #~ msgid "%s (Main site)" #~ msgstr "%s (Site principal)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (Site Chinois)" #~ msgid "%s (Github site)" #~ msgstr "%s (site Github)" #~ msgid "Your %s profile is: " #~ msgstr "Votre profil %s est :" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Veuillez s'il vous plaît reporter les bogues à %s. Merci d'utiliser %s !" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tComportement par défaut de Vte, coller le texte dans " #~ "le presse-papiers primaire (sélection).\n" #~ msgid "Set function key value" #~ msgstr "Définir les raccourcis" #~ msgid "Shortcut Key" #~ msgstr "Touche de raccourci" po/it.po000066400000000000000000001234431246562641500124720ustar00rootroot00000000000000# Italian translation of LilyTerm # Copyright (C) 2010 Marco Paolone # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9~pre4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-05-21 22:47+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: Italian \n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Segnalare bug a <%s>.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Grazie per utilizzare %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s è un emulatore di terminale per X basato su libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Usare -T/--title {titolo} per specificare il titolo della finestra.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Usare -T/--title {titolo} per specificare il titolo della finestra.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "Usare -t/--tab {numero} per aprire schede multiple all'avvio.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Usare -d/--directory {cartella} per specificare la cartella iniziale " "all'avvio.\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Usare -g/--geometry {LARGHEZZAxALTEZZA[+-]XOFFSET[+-]YOFFSET} per " "specificare la geometria della finestra.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "Usare -l/-ls/--login per invocare la shell come shell di login.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" "Usare -H/--hold per mantenere la finestra del terminale aperta al termine " "dell'esecuzione di un comando con -e/-x.\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Usare -s/--separate per eseguire in un processo separato.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "Usare -p/--profile per impostare un profilo di esempio.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Usare -u/--user_profile {%s} per un profilo specifico.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Usare -v/--version per visualizzare le informazioni di versione.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command. (Must be the final " #| "option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Usare -e/-x/--execute {comando} per eseguire un comando. (Deve essere " "l'opzione finale).\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "Il file di configurazione di sistema di %s è: %s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "E il profilo personale %s è: " #: console.c:224 msgid "Default key binding:" msgstr "Combinazioni tasti predefinite:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Disabilita/Abilita collegamenti ipertestuali, tasti " "funzione e menu del tasto destro." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr "" " * Aggiunge una nuova scheda con la cartella " "corrente.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Passa alla scheda precedente/successiva\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Passa alla prima/ultima scheda.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> Sposta la scheda corrente avanti/indietro.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr "" " * Sposta la scheda corrente in prima/ultima " "posizione.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Passa alla 1a ~ 12a scheda.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Invio>\t Aumenta/Diminuisce/Ripristina la dimensione del font " "della scheda corrente.\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Emula un evento scorrimento in alto/basso del " "mouse nel terminale.\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Chiede di scorrere in alto/basso di una riga nel " "terminale.\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Comportamento predefinito di Gtk+, scorre in alto/" "basso nel terminale.\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Comportamento predefinito di Gtk+, scorre il " "terminale in alto/basso.\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Passa tra gli stati di finestra intera/minimizzata " "e schermo intero/uscita da schermo intero.\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Trova il testo nel terminale.\n" " Usare / per trovare il successivo/" "precedente.\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr " * Seleziona tutto il testo nel terminale.\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * Copia il testo negli appunti / incolla il testo " "dagli appunti.\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * Copia il testo negli appunti / incolla il testo " "dagli appunti principali.\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (es. emula un click del tasto centrale del mouse per " "incollare il testo)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" "Alcune combinazioni sono disabilitate per default, ma possono rivelarsi " "utili:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr "" " * \t Apre una nuova scheda/chiude scheda corrente.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (Si raccomanda di usare o 'exit' per " "chiudere le schede)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" " * Apre una nuova finestra con la cartella corrente.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Rinomina la scheda corrente.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Suggerimento: queste associazioni di tasti possono essere personalizzate o " "disabilitate dal menu del tasto destro [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Imposta combinazioni dei tasti" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "Si è verificato il seguente errore:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Rinomina questa scheda" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Inserire il nome etichetta per questa scheda:" #: dialog.c:211 msgid "Label Name:" msgstr "Nome etichetta:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Cerca stringa" #: dialog.c:235 msgid "Find: " msgstr "Cerca: " #: dialog.c:258 msgid "Find previous string" msgstr "Cerca stringa precedente" #: dialog.c:264 msgid "Find next string" msgstr "Trova stringa successiva" #: dialog.c:275 msgid "Case sensitive" msgstr "Ricerca esatta" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Usa le espressioni regolari compatibili con Perl" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Incolla il testo in tutti i box terminali Vte." #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Inserire il testo che verrà incollato nei terminali Vte:" #: dialog.c:343 msgid "Text:" msgstr "Testo:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Aggiungere alla fine del testo." #: dialog.c:388 msgid "Grab keys" msgstr "Cattura chiavi" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Incolla la chiave ottenuta nei terminali vte.\n" "Può risultare utile se si desidera incollare chiavi combinate, come " "." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Valore tasto:" #: dialog.c:423 msgid "Entry" msgstr "Voce" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Aggiunge nuove localizzazioni e imposta la localizzazione predefinita" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "La localizzazione predefinita quando viene avviato un terminale Vte.\n" "È possibile usare \"it_IT\", \"it_IT.UTF-8\", oppure \"it_CH.UTF-8\"." #: dialog.c:451 msgid "Default locale:" msgstr "Localizzazione predefinita:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "La lista delle localizzazioni nel menu del tasto destro, separate da " "\n" "È possibile usare \"it_IT\", \"it_IT.UTF-8\", oppure \"it_CH.UTF-8\".\n" "È possibile inoltre usare \"UTF-8\" nel caso non ci siano localizzazioni " "installate." #: dialog.c:463 msgid "Locales list:" msgstr "Elenco localizzazioni:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Cambia la saturazione dello sfondo" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Cambia saturazione dello sfondo:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Cambia il colore di primo piano nel terminale" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Cambia il colore di sfondo nel terminale" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Cambia il colore del cursore nel terminale" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the cursor color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Cambia il colore del cursore nel terminale" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Modifica luminosità dei colori ANSI" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Inverti colori" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Cambia il colore %s sulla scheda" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Testo dimostrativo in grassetto" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Conferma chiusura di schede multiple" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Stanno per essere chiuse schede multiple. Continuare?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "quelle schede" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "È possibile premere + per\n" "ottenere il valore del tasto usato per la combinazione." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Ottiene il valore tasto per il tasto funzione" #: dialog.c:922 msgid "Function Key Name" msgstr "Nome del tasto funzione" #: dialog.c:926 msgid "Key Bindings" msgstr "Combinazioni tasto" #: dialog.c:934 msgid "Key Group: " msgstr "Gruppo tasti: " #: dialog.c:944 msgid "Note: " msgstr "Nota: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Disabilita tutti i tasti funzione" #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Uso per %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "Non dimenticare di salvare le impostazioni dopo qualunque modifica!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Guida" #: dialog.c:1031 msgid "Key binding" msgstr "Combinazioni dei tasti" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "Licenza" #: dialog.c:1067 msgid "Translators" msgstr "Traduttori" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Pagina principale:" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Wiki: %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Blog: %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Wiki: %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Errori: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "Informazioni su" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "C'è ancora un processo in esecuzione nella scheda #%d:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" "Si raccomanda di terminare utilizzando `kill -9 %d` se non si ottiene " "risposta." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Continuare comunque?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Suggerimento:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Conferma la chiusura dei programmi in esecuzione" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "questa scheda" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Cambia l'opacità della finestra" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Cambia l'opacità della finestra:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Cambia l'opacità della finestra quando inattiva" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Cambia l'opacità della finestra quando inattiva:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Modifica la luminosità dei colori ANSI utilizzati nel terminale" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Modifica luminosità dei colori ANSI quando inattivi" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " sta cercando di eseguire il seguente comando:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Conferma di esegure -e/-x/--execute comando" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "I seguenti programmi sono ancora in esecuzione nella scheda #%d:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Si raccomanda di usare o 'exit' per chiudere le schede" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Conferma la chiusura di una scheda con processo figlio" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "I seguenti programmi sono ancora in esecuzione in questa finestra:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Conferma la chiusura di una finestra con processo figlio" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Conferma la chiusura di %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "I seguenti programmi sono ancora in esecuzione nella scheda %s:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Cerca di incollare il testo seguente nel terminale vte:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Conferma di voler incollare il testo nel terminale vte." #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Tentare di eliminare %s con SIGKILL() per evitare di terminare questi " "programmi!\n" "(POTREBBE CAUSARE PERDITA DI DATI!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "" "Forza la chiusura di tutte le schede e tutte le finestre, ed esce da %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Disabilitato, duplicato con [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Disabilitato)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Il locale \"%s\" NON sembra essere supportato dal sistema!\n" "Se i dati locali sono stati aggiornati di recente,\n" "chiudere tutte le finestre di %s e provare di nuovo." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Locale non supportato!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "È necessario aggiornare a %s e ricompilare %s per supportare questa " "caratteristica." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Funzionalità non supportata!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Disabilita tutti i tasti funzione del gruppo [%s]" #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "I dati ricevuti dal socket sembrano non corretti.\n" "\n" "\tVersione del socket ricevuta: %s\n" "\tVersione del socket attesa: %s\n" "\n" "Se %s è stato aggiornato di recente,\n" "chiudere tutte le finestre di %s e provare di nuovo." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Il formato del socket dati non è aggiornato" #: menu.c:59 msgid "Change text encoding" msgstr "Cambia codifica del testo" #: menu.c:60 msgid "New tab" msgstr "Nuova scheda" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nuova scheda con locale specificato" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Nuova finestra con il profilo specificato" #: menu.c:80 msgid "Change the font" msgstr "Cambia font" #: menu.c:87 msgid "Change colors" msgstr "Cambia colori" #: menu.c:90 msgid "Change the cursor color" msgstr "Cambia colore del cursore" #: menu.c:94 msgid "Change the foreground color" msgstr "Cambia colore di primo piano" #: menu.c:99 #, fuzzy #| msgid "Change the cursor color" msgid "Change the ANSI colors" msgstr "Cambia colore del cursore" #: menu.c:104 msgid "Change the background color" msgstr "Cambia colore di sfondo" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Modifica luminosità dei colori ANSI" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Modifica luminosità quando inattivo" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Cambia tema colori ANSI" #: menu.c:148 msgid "Background" msgstr "Sfondo" #: menu.c:154 msgid "Transparent window" msgstr "Finestra trasparente" #: menu.c:159 msgid "Window opacity" msgstr "Opacità finestra" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Opacità della finestra quando inattiva" #: menu.c:172 msgid "Transparent background" msgstr "Sfondo trasparente" #: menu.c:175 msgid "Background saturation" msgstr "Saturazione sfondo" #: menu.c:179 msgid "Set background image" msgstr "Imposta immagine di sfondo" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Appunti" #: menu.c:196 msgid "Copy URL" msgstr "Copia URL" #: menu.c:201 msgid "Copy" msgstr "Copia" #: menu.c:205 msgid "Paste" msgstr "Incolla" #: menu.c:212 msgid "View clipboard" msgstr "Mostra appunti" #: menu.c:216 msgid "View primary clipboard" msgstr "Mostra appunti principali" #: menu.c:227 msgid "Scrollback lines" msgstr "Righe della cronologia" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Pulisci righe della cronologia" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Altro" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Incolla in tutti i terminali vte" #: menu.c:247 msgid "Launch file manager" msgstr "Avvia gestore dei file" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Combinazione per comando Erase" #: menu.c:275 msgid "Cursor Shape" msgstr "Forma del cursor" #: menu.c:292 msgid "Dim text when inactive" msgstr "Opacizza testo quando inattivo" #: menu.c:297 msgid "Dim window when inactive" msgstr "Opacizza finestra quando inattiva" #: menu.c:302 msgid "Cursor blinks" msgstr "Cursore lampeggiante" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Avviso udibile" #: menu.c:327 msgid "Visible bell" msgstr "Avviso visibile" #: menu.c:332 msgid "Urgent bell" msgstr "Avviso urgente" #: menu.c:342 msgid "Switch input methods" msgstr "Cambia metodo di input" #: menu.c:361 msgid "Show the tabs bar" msgstr "Mostra barra delle schede" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Nasconde barra delle schede" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Mostra sempre la barra delle schede" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Nasconde sempre barra delle schede" #: menu.c:391 msgid "Increase window size" msgstr "Aumenta dimensione finestra" #: menu.c:394 msgid "Decrease window size" msgstr "Diminuisci dimensione finestra" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Ripristina al font/dimensione dell'utente" #: menu.c:404 msgid "Reset to system font/size" msgstr "RIpristina al font/dimensione di sistema" #: menu.c:409 msgid "Reset the content" msgstr "Ripristina il contenuto" #: menu.c:424 msgid "User profile" msgstr "Profilo utente" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Esci da %s" #: menu.c:502 msgid "grayscale" msgstr "scala di grigi" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Personalizzato" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Sposta la pagina corrente in avanti." #: menu.c:1099 msgid " (Wide)" msgstr " (Ampio)" #: menu.c:1554 msgid "Font Selection" msgstr "Selezione font" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Aggiungi altre localizzazioni..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Altre impostazioni..." #: menu.c:1963 msgid "Save settings automatically" msgstr "Salva impostazioni automaticamente" #: menu.c:1968 msgid "Save settings" msgstr "Salva impostazioni" #: menu.c:1971 msgid "Save settings as..." msgstr "Salva impostazioni come..." #: menu.c:1977 msgid "Reload settings" msgstr "Ricarica impostazioni" #: menu.c:2012 #, c-format msgid "%s default" msgstr "predefinito di %s" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Predefinito di sistema" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Le seguenti impostazioni:\n" "\n" "%s\n" "NON possono essere applicate nei terminali delle finestre correnti.\n" "Per favore utilizzare [%s]." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Le seguenti impostazioni NON possono essere applicate" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Disabilitato: utilizzare in sostituzione [Sfondo trasparente]." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Scorre l'immagine di sfondo insieme al testo" #: menu.c:2719 msgid "Open File" msgstr "Apri file" #: menu.c:2721 msgid "Save File" msgstr "Salva file" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "Si è verificato il seguente errore: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Errore nella creazione del processo figlio:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Errore nella creazione del processo figlio!\n" "Per favore assicurarsi che /dev/pts sia montato come filesystem devpts!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Errore nella creazione del processo figlio" #: profile.c:854 msgid "Tab operation" msgstr "Operazione sulla scheda" #: profile.c:855 msgid "Switch tab" msgstr "Passaggio alla scheda" #: profile.c:856 msgid "Move tab" msgstr "Sposta scheda" #: profile.c:857 msgid "Switch to #? tab" msgstr "Passa alla scheda #?" #: profile.c:858 msgid "Text operation" msgstr "Operazione sul testo" #: profile.c:859 msgid "Scroll up/down" msgstr "Scorri in alto/basso" #: profile.c:860 msgid "Font" msgstr "Font" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Disabilita/abilita funzioni" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Disabilita/abilita collegamenti ipertestuali, tasti funzione e menu del " "tasto destro." #: profile.c:869 msgid "Add new tab" msgstr "Aggiungi nuova scheda" #: profile.c:871 msgid "Add a new tab." msgstr "Aggiunge una nuova scheda." #: profile.c:873 msgid "Close tab" msgstr "Chiudi scheda" #: profile.c:875 msgid "Close current tab." msgstr "Chiude la scheda corrente." #: profile.c:877 msgid "Rename page name" msgstr "Rinomina scheda" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Rinominare la pagina della scheda corrente." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Cerca le stringhe corrispondenti all'espressione regolare." #: profile.c:884 msgid "Find previous" msgstr "Cerca precedente" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Cerca la stringa precedente corrispondente all'espressione regolare." #: profile.c:887 msgid "Find next" msgstr "Cerca successiva" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Trova la stringa successiva corrispondente all'espressione regolare." #: profile.c:891 msgid "Switch to prev tab" msgstr "Passa alla scheda precedente" #: profile.c:893 msgid "Switch to prev tab." msgstr "Passa alla scheda precedente." #: profile.c:895 msgid "Switch to next tab" msgstr "Passa alla scheda successiva" #: profile.c:897 msgid "Switch to next tab." msgstr "Passa alla scheda successiva." #: profile.c:899 msgid "Switch to first tab" msgstr "Passa alla prima scheda" #: profile.c:901 msgid "Switch to first tab." msgstr "Passa alla prima scheda." #: profile.c:903 msgid "Switch to last tab" msgstr "Passa all'ultima scheda" #: profile.c:905 msgid "Switch to last tab." msgstr "Passa all'ultima scheda." #: profile.c:907 msgid "Move page forward" msgstr "Sposta pagina in avanti" #: profile.c:909 msgid "Move current page forward." msgstr "Sposta la pagina corrente in avanti." #: profile.c:911 msgid "Move page backward" msgstr "Sposta pagina indietro" #: profile.c:913 msgid "Move current page backward." msgstr "Sposta la pagina corrente indietro" #: profile.c:915 msgid "Move page to first" msgstr "Sposta pagina alla prima" #: profile.c:917 msgid "Move current page to first." msgstr "Sposta la pagina corrente alla prima." #: profile.c:919 msgid "Move page to last" msgstr "Sposta pagina all'ultima" #: profile.c:921 msgid "Move current page to last." msgstr "Sposta la pagina corrente all'ultima." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Passa alla scheda #%d" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Passa direttamente alla scheda #%d." #: profile.c:932 msgid "New window" msgstr "Nuova finestra" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Apre una nuova finestra con la cartella corrente." #: profile.c:936 msgid "Select all" msgstr "Seleziona tutto" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Seleziona tutto il testo nel box Terminale Vte." #: profile.c:940 msgid "Copy to clipboard" msgstr "Copia negli appunti" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Copia il testo negli appunti." #: profile.c:944 msgid "Paste the text" msgstr "Incolla il testo" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Seleziona tutto il testo nel box Terminale Vte." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Copia il testo negli appunti." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Incolla il testo negli appunti." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Aumenta dimensione font" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Aumenta la dimensione del font nella scheda corrente." #: profile.c:960 msgid "Decrease font size" msgstr "Diminuisci dimensione font" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Diminuisce la dimensione del font nella scheda corrente." #: profile.c:964 msgid "Reset font size" msgstr "Ripristina dimensione font" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Ripristina il font della scheda corrente alla dimensione originale." #: profile.c:968 msgid "Maximize the window" msgstr "Massimizza finestra" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Cerca di massimizzare la finestra per usare tutto lo spazio disponibile sul " "display." #: profile.c:972 msgid "Full screen" msgstr "Schermo intero" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Chiede di posizionare la finestra nello stato schermo intero/ridotto" #: profile.c:976 msgid "Scroll up" msgstr "Scorri in alto" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Emula lo scorrimento del mouse verso l'alto sul box Terminale Vte." #: profile.c:980 msgid "Scroll down" msgstr "Scorri in basso" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Emula lo scorrimento del mouse verso il basso sul box Terminale Vte." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Scorri in alto di una riga" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Chiede di scorrere verso l'alto di una riga nel box Terminale Vte." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Scorri in basso di una riga" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Chiede di scorrere verso il basso di una riga nel box Terminale Vte." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Pulisci righe della cronologia" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Esegue il dump dei dati di debug in runtime" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Esegue il dump dei dati in runtime di LilyTerm per il debug." #: profile.c:1033 msgid "Window Title" msgstr "Titolo finestra" #: profile.c:1034 msgid "Running Command" msgstr "Comando in esecuzione" #: profile.c:1035 msgid "Current Dir" msgstr "Cartella corrente" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Nome scheda personalizzato" #: profile.c:1037 msgid "Root Privileges" msgstr "Privilegi di root" #: profile.c:1038 msgid "Normal Text" msgstr "Testo normale" #: profile.c:1072 msgid "Shift" msgstr "Maiusc" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Meta" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Sfondo" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Cambia colore di primo piano" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Il file di destinazione NON esiste" #: profile.c:2996 msgid "The target file is a directory" msgstr "Il file di destinazione è una cartella" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Errore nella scrittura del profilo: '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Errore durante la scrittura del profilo" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "In questa versione alcune voci nel profilo sono state aggiunte, cambiate o " "rimosse.\n" "Usare [Salva impostazioni] dal menu del testo destro per salvare le proprie " "impostazioni,\n" "e modificarle manualmente se necessario.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Il proprio profilo è %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Il formato del profilo non è aggiornato" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Profilo \"%s\" non valido:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Profilo non valido!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tFinestra #%d, Pagina #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tPagina #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Predefinito di sistema" #~ msgid "Join and paste" #~ msgstr "Unisci e incolla" #~ msgid "%s (Main site)" #~ msgstr "%s (Sito principale)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (Sito in cinese tradizionale)" #~ msgid "%s (Github site)" #~ msgstr "%s (Sito Github)" #~ msgid "Your %s profile is: " #~ msgstr "Il profilo personale %s è: " #~ msgid "Thank you for using %s!\n" #~ msgstr "Grazie per utilizzare %s!\n" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tComportamento predefinito di Vte, incolla il testo " #~ "negli appunti principali.\n" #~ msgid "Shortcut Key" #~ msgstr "Scorciatoia" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "Continuare comunque?" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Segnalare bug a %s. Grazie per utilizzare %s!" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "" #~ "%s è un emulatore di terminale per X basato su libvte.\n" #~ "\n" #~ msgid "Set function key value" #~ msgstr "Imposta il valore del tasto funzione" #, fuzzy #~| msgid "Paste the text" #~ msgid "Paste to every vte" #~ msgstr "Incolla il testo" #~ msgid "Change the Opacity of window:" #~ msgstr "Cambia opacità della finestra:" #~ msgid "The locale \"%s\" seems NOT supported by your system!" #~ msgstr "Il locale \"%s\" sembra NON essere supportato dal sistema!" #~ msgid "\t\t\t(" #~ msgstr "\t\t\t(" #~ msgid ")\n" #~ msgstr ")\n" #~ msgid "" #~ "You may press any key here to get the key value for using in profile.\n" #~ "\n" #~ "Press [Copy] to copy the key value to clipboard;\n" #~ "And press [Close] to exit." #~ msgstr "" #~ "Digitare un tasto qualsiasi per ottenere il valore chiave da utilizzare " #~ "nel profilo.\n" #~ "\n" #~ "Premere [Copia] per copiare il valore chiave negli appunti;\n" #~ "e premere [Chiudi] per uscire." #, fuzzy #~| msgid "Window opacity" #~ msgid "Window #%p:\n" #~ msgstr "Finestra #%p:\n" po/lilyterm.pot000066400000000000000000000645721246562641500141120ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR 2014 FULL NAME # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: LilyTerm \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "" #: console.c:142 msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "" #: console.c:155 #, c-format msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "" #: console.c:157 msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "" #: console.c:224 msgid "Default key binding:" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr "" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr "" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr "" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr "" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr "" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr "" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr "" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr "" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr "" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" #: console.c:252 msgid " * Rename the current tab.\n" msgstr "" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "" #: dialog.c:211 msgid "Label Name:" msgstr "" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "" #: dialog.c:235 msgid "Find: " msgstr "" #: dialog.c:258 msgid "Find previous string" msgstr "" #: dialog.c:264 msgid "Find next string" msgstr "" #: dialog.c:275 msgid "Case sensitive" msgstr "" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "" #: dialog.c:343 msgid "Text:" msgstr "" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "" #: dialog.c:388 msgid "Grab keys" msgstr "" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "" #: dialog.c:423 msgid "Entry" msgstr "" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" #: dialog.c:451 msgid "Default locale:" msgstr "" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" #: dialog.c:463 msgid "Locales list:" msgstr "" #: dialog.c:471 msgid "Change the saturation of background" msgstr "" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, c-format msgid "Change the ansi color [%s] in terminal" msgstr "" #: dialog.c:617 msgid "The brightness of ANSI colors:" msgstr "" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" #: dialog.c:869 msgid "Get the key value for function key" msgstr "" #: dialog.c:922 msgid "Function Key Name" msgstr "" #: dialog.c:926 msgid "Key Bindings" msgstr "" #: dialog.c:934 msgid "Key Group: " msgstr "" #: dialog.c:944 msgid "Note: " msgstr "" #: dialog.c:966 msgid "Disable all the function keys." msgstr "" #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "" #: dialog.c:1031 msgid "Key binding" msgstr "" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "" #: dialog.c:1067 msgid "Translators" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "" #: dialog.c:1084 msgid "About" msgstr "" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "" #: dialog.c:1103 #, c-format msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr "" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" #: dialog.c:3293 msgid "Not supported locale!" msgstr "" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" #: dialog.c:3365 msgid "Not supported feature!" msgstr "" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "" #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" #: main.c:665 msgid "The format of socket data is out of date" msgstr "" #: menu.c:59 msgid "Change text encoding" msgstr "" #: menu.c:60 msgid "New tab" msgstr "" #: menu.c:61 msgid "New tab with specified locale" msgstr "" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "" #: menu.c:80 msgid "Change the font" msgstr "" #: menu.c:87 msgid "Change colors" msgstr "" #: menu.c:90 msgid "Change the cursor color" msgstr "" #: menu.c:94 msgid "Change the foreground color" msgstr "" #: menu.c:99 msgid "Change the ANSI colors" msgstr "" #: menu.c:104 msgid "Change the background color" msgstr "" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "" #: menu.c:138 msgid "Change ANSI color theme" msgstr "" #: menu.c:148 msgid "Background" msgstr "" #: menu.c:154 msgid "Transparent window" msgstr "" #: menu.c:159 msgid "Window opacity" msgstr "" #: menu.c:162 msgid "Window opacity when inactive" msgstr "" #: menu.c:172 msgid "Transparent background" msgstr "" #: menu.c:175 msgid "Background saturation" msgstr "" #: menu.c:179 msgid "Set background image" msgstr "" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "" #: menu.c:196 msgid "Copy URL" msgstr "" #: menu.c:201 msgid "Copy" msgstr "" #: menu.c:205 msgid "Paste" msgstr "" #: menu.c:212 msgid "View clipboard" msgstr "" #: menu.c:216 msgid "View primary clipboard" msgstr "" #: menu.c:227 msgid "Scrollback lines" msgstr "" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "" #: menu.c:247 msgid "Launch file manager" msgstr "" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "" #: menu.c:275 msgid "Cursor Shape" msgstr "" #: menu.c:292 msgid "Dim text when inactive" msgstr "" #: menu.c:297 msgid "Dim window when inactive" msgstr "" #: menu.c:302 msgid "Cursor blinks" msgstr "" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "" #: menu.c:327 msgid "Visible bell" msgstr "" #: menu.c:332 msgid "Urgent bell" msgstr "" #: menu.c:342 msgid "Switch input methods" msgstr "" #: menu.c:361 msgid "Show the tabs bar" msgstr "" #: menu.c:367 msgid "Hide the tabs bar" msgstr "" #: menu.c:374 msgid "Always show the tabs bar" msgstr "" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "" #: menu.c:391 msgid "Increase window size" msgstr "" #: menu.c:394 msgid "Decrease window size" msgstr "" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "" #: menu.c:404 msgid "Reset to system font/size" msgstr "" #: menu.c:409 msgid "Reset the content" msgstr "" #: menu.c:424 msgid "User profile" msgstr "" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "" #: menu.c:502 msgid "grayscale" msgstr "" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, c-format msgid "%s + custom" msgstr "" #: menu.c:655 msgid "View current page information" msgstr "" #: menu.c:1099 msgid " (Wide)" msgstr "" #: menu.c:1554 msgid "Font Selection" msgstr "" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "" #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "" #: menu.c:1963 msgid "Save settings automatically" msgstr "" #: menu.c:1968 msgid "Save settings" msgstr "" #: menu.c:1971 msgid "Save settings as..." msgstr "" #: menu.c:1977 msgid "Reload settings" msgstr "" #: menu.c:2012 #, c-format msgid "%s default" msgstr "" #: menu.c:2034 msgid "System default" msgstr "" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "" #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "" #: menu.c:2719 msgid "Open File" msgstr "" #: menu.c:2721 msgid "Save File" msgstr "" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" #: notebook.c:749 msgid "Error when creating child process" msgstr "" #: profile.c:854 msgid "Tab operation" msgstr "" #: profile.c:855 msgid "Switch tab" msgstr "" #: profile.c:856 msgid "Move tab" msgstr "" #: profile.c:857 msgid "Switch to #? tab" msgstr "" #: profile.c:858 msgid "Text operation" msgstr "" #: profile.c:859 msgid "Scroll up/down" msgstr "" #: profile.c:860 msgid "Font" msgstr "" #: profile.c:865 msgid "Disable/Enable functions" msgstr "" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" #: profile.c:869 msgid "Add new tab" msgstr "" #: profile.c:871 msgid "Add a new tab." msgstr "" #: profile.c:873 msgid "Close tab" msgstr "" #: profile.c:875 msgid "Close current tab." msgstr "" #: profile.c:877 msgid "Rename page name" msgstr "" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "" #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "" #: profile.c:884 msgid "Find previous" msgstr "" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "" #: profile.c:887 msgid "Find next" msgstr "" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "" #: profile.c:891 msgid "Switch to prev tab" msgstr "" #: profile.c:893 msgid "Switch to prev tab." msgstr "" #: profile.c:895 msgid "Switch to next tab" msgstr "" #: profile.c:897 msgid "Switch to next tab." msgstr "" #: profile.c:899 msgid "Switch to first tab" msgstr "" #: profile.c:901 msgid "Switch to first tab." msgstr "" #: profile.c:903 msgid "Switch to last tab" msgstr "" #: profile.c:905 msgid "Switch to last tab." msgstr "" #: profile.c:907 msgid "Move page forward" msgstr "" #: profile.c:909 msgid "Move current page forward." msgstr "" #: profile.c:911 msgid "Move page backward" msgstr "" #: profile.c:913 msgid "Move current page backward." msgstr "" #: profile.c:915 msgid "Move page to first" msgstr "" #: profile.c:917 msgid "Move current page to first." msgstr "" #: profile.c:919 msgid "Move page to last" msgstr "" #: profile.c:921 msgid "Move current page to last." msgstr "" #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "" #: profile.c:932 msgid "New window" msgstr "" #: profile.c:934 msgid "Open a new window with current dir." msgstr "" #: profile.c:936 msgid "Select all" msgstr "" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "" #: profile.c:940 msgid "Copy to clipboard" msgstr "" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "" #: profile.c:944 msgid "Paste the text" msgstr "" #: profile.c:946 msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "" #: profile.c:948 msgid "Copy the text to primary clipboard" msgstr "" #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 msgid "Paste the text in primary clipboard" msgstr "" #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "" #: profile.c:960 msgid "Decrease font size" msgstr "" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "" #: profile.c:964 msgid "Reset font size" msgstr "" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "" #: profile.c:968 msgid "Maximize the window" msgstr "" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" #: profile.c:972 msgid "Full screen" msgstr "" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "" #: profile.c:976 msgid "Scroll up" msgstr "" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "" #: profile.c:980 msgid "Scroll down" msgstr "" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "" #: profile.c:984 msgid "Scroll up 1 line" msgstr "" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "" #: profile.c:988 msgid "Scroll down 1 line" msgstr "" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "" #: profile.c:994 msgid "Asks to clean scrollback lines." msgstr "" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "" #: profile.c:1033 msgid "Window Title" msgstr "" #: profile.c:1034 msgid "Running Command" msgstr "" #: profile.c:1035 msgid "Current Dir" msgstr "" #: profile.c:1036 msgid "Custom Tab Name" msgstr "" #: profile.c:1037 msgid "Root Privileges" msgstr "" #: profile.c:1038 msgid "Normal Text" msgstr "" #: profile.c:1072 msgid "Shift" msgstr "" #: profile.c:1076 msgid "Ctrl" msgstr "" #: profile.c:1078 msgid "Alt" msgstr "" #: profile.c:1088 msgid "Win" msgstr "" #: profile.c:1132 msgid "Background Color" msgstr "" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 msgid "Foreground Color" msgstr "" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "" #: profile.c:2996 msgid "The target file is a directory" msgstr "" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "" #: profile.c:3049 msgid "Error when writing profile" msgstr "" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" #: profile.c:3237 msgid "The profile is invalid!" msgstr "" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "" po/nl.po000066400000000000000000001260311246562641500124630ustar00rootroot00000000000000# Flemish/Dutch translation of LilyTerm. # Copyright (C) 2010 Adrian Buyssens # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2010-11-19 17:08+0100\n" "Last-Translator: Adrian Buyssens \n" "Language-Team: Adrian Buyssens \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, fuzzy, c-format #| msgid "Please report bug to %s. Thank you for using %s!" msgid "Please report bug at <%s>.\n" msgstr "Rapporteer bugs aan %s. Bedankt om %s te gebruiken!" #: console.c:122 dialog.c:1078 #, fuzzy, c-format #| msgid "Please report bug to %s. Thank you for using %s!" msgid "Thank you for using %s!" msgstr "Rapporteer bugs aan %s. Bedankt om %s te gebruiken!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "%s is een op libvte gebaseerde X Terminal Emulator\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Gebruik -T/--title {titel} om het venster te benoemen.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Gebruik -T/--title {titel} om het venster te benoemen.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "Gebruik -t/--tab {getal} om meerdere tabs te openen bij het starten.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "Gebruik -d/--directory {map} om in een specifieke map te starten.\n" #: console.c:146 #, fuzzy #| msgid "Use -g/--geometry {geometry} to specify the geometry of window.\n" msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "Gebruik -g/--geometry {coördinaten} om de venstergrootte te bepalen.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "Gebruik -l/-ls/--login om de terminal te starten als inlog shell.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Gebruik -s/--separate om de terminal in een ander proces te starten.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 #, fuzzy #| msgid "Use -p/--profile to got a profile sample.\n" msgid "Use -p/--profile to get a profile sample.\n" msgstr "Gebruik -p/--profile om een voorbeeld profiel te krijgen.\n" # MSGID of 154 should read as following: # "Use -p/--profile to GET a profile sample.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Gebruik -u/--user_profile {%s} om een specifiek profiel te laden.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Gebruik -v/--version om de versie te zien.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command when starting up. (Must be " #| "the final option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Gebruik -e/-x/--execute {commando} om een commando uit te voeren bij het " "starten. (Dit moet de laatste optie zijn.)\n" #: console.c:159 #, fuzzy, c-format #| msgid "The %s system config is: %s/%s\n" msgid "The %s system configure file is: %s\n" msgstr "Het %s systeem configuratiebestand is: %s/%s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "En uw %s profiel is: " #: console.c:224 #, fuzzy #| msgid "Erase Binding" msgid "Default key binding:" msgstr "Wis binding" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 #, fuzzy #| msgid "" #| " * <`>\t\tDisable/Enable hyperlinks, function keys and right click " #| "menu.\n" msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`>\t\tActiveer/Desactiveer hyperlinks, functie toetsenen het " "rechterklikmenu.\n" #: console.c:229 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab.\n" msgid " * Add a New tab with current directory.\n" msgstr " * \t\tOpen een nieuwe tab/Sluit de huidige tab.\n" #: console.c:230 #, fuzzy #| msgid " * \tSwitch to Prev/Next tab.\n" msgid " * Switch to Prev/Next tab.\n" msgstr " * \tVerander naar vorige/volgende tab.\n" #: console.c:231 #, fuzzy #| msgid " * \tSwitch to First/Last tab.\n" msgid " * Switch to First/Last tab.\n" msgstr " * \tVerander naar eerste/laatste tab.\n" #: console.c:232 #, fuzzy #| msgid " * <[/]>\t\tMove current tab Forward/Backward.\n" msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]>\t\tVerplaats huidige tab voorwaarts/achterwaarts.\n" #: console.c:233 #, fuzzy #| msgid " * \tMove current tab to First/Last.\n" msgid " * Move current tab to First/Last.\n" msgstr "" " * \tVerplaats huidige tab naar eerste/laatsteplaats.\n" #: console.c:234 #, fuzzy #| msgid " * \tSwitch to 1st ~ 12th tab.\n" msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * \tVerander naar eerste ~ twaalfde tab.\n" #: console.c:235 #, fuzzy #| msgid "" #| " * <+/-/Enter>\tIncrease/Decrease/Reset the font size of current " #| "tab.\n" msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter>\tVergroot/verklein/reset de lettertypegroottevan " "huidige tab.\n" #: console.c:236 #, fuzzy #| msgid "" #| " * \tEmulate a mouse Scroll Up/Down event on Vte " #| "Terminal box.\n" msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * \tEmuleer omhoog/omlaag scrollen met de muisin Vte " "Terminalvenster.\n" #: console.c:237 #, fuzzy #| msgid "" #| " * \tAsks to Scroll Up/Down 1 line on Vte Terminal box.\n" msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr " * \tVraag om een lijn omhoog/omlaag te scrollen.\n" #: console.c:238 #, fuzzy #| msgid "" #| " * \tAsks to Scroll Up/Down 1 line on Vte Terminal box.\n" msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr " * \tVraag om een lijn omhoog/omlaag te scrollen.\n" #: console.c:239 #, fuzzy #| msgid "" #| " * \tGtk+ default behavior, Scroll the Terminal box to " #| "to Top/Bottom.\n" msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * \tStandaard Gtk+ gedrag; scroll helemaal naarboven/" "beneden.\n" #: console.c:240 #, fuzzy #| msgid "" #| " * \tSwitch between fullwindow/unfullwindow and " #| "fullscreen/unfullscreen state.\n" msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * \tVerander tussen wel/niet schermvullend venster.\n" #: console.c:241 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box.\n" msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr " * \t\tSelecteer alle tekst in de Vte Terminal.\n" #: console.c:243 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box.\n" msgid " * Select all the text in the terminal.\n" msgstr " * \t\tSelecteer alle tekst in de Vte Terminal.\n" #: console.c:244 #, fuzzy #| msgid "" #| " * \t\tCopy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in clipboard.\n" msgstr " * \t\tKopieer/knip de tekst naar klembord.\n" #: console.c:245 #, fuzzy #| msgid "" #| " * \t\tCopy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in primary clipboard.\n" msgstr " * \t\tKopieer/knip de tekst naar klembord.\n" #: console.c:246 #, fuzzy #| msgid "\t\t\t(i.e. Emulate a middle button mouse click to paste the text)" msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "\t\t\t(wat betekent: emuleer de middelmuisklik om tekst te plakken)" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" #: console.c:249 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab.\n" msgid " * Trying to close current tab.\n" msgstr " * \t\tOpen een nieuwe tab/Sluit de huidige tab.\n" #: console.c:250 #, fuzzy #| msgid "\t\t\t(Using or 'exit' to close tabs is recommended)\n" msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" "\t\t\t( of 'exit' gebruiken om tabs te sluiten is aangeraden)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" #: console.c:252 #, fuzzy #| msgid " * \t\tRename current tab.\n" msgid " * Rename the current tab.\n" msgstr " * \t\tHernoem huidige tab.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "" #: dialog.c:122 dialog.c:3352 menu.c:2885 #, fuzzy #| msgid "The following error is occurred:" msgid "The following error occurred:" msgstr "De volgende fout is gebeurd:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Hernoem deze tab" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Vul de labelnaam in van deze tab:" #: dialog.c:211 msgid "Label Name:" msgstr "Labelnaam:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Zoek string" #: dialog.c:235 msgid "Find: " msgstr "Zoek: " #: dialog.c:258 msgid "Find previous string" msgstr "Zoek vorige string" #: dialog.c:264 msgid "Find next string" msgstr "Zoek volgende string" #: dialog.c:275 msgid "Case sensitive" msgstr "Hoofdlettergevoelig" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Gebruik Perlcompatibele reguliere expressies" #: dialog.c:324 dialog.c:397 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste texts to every Vte Terminal" msgstr "Selecteer alle tekst in het Vte Terminal venster." #: dialog.c:342 #, fuzzy #| msgid "Please input the Label Name of this tab:" msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Vul de labelnaam in van deze tab:" #: dialog.c:343 msgid "Text:" msgstr "" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "" #: dialog.c:388 msgid "Grab keys" msgstr "" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Toetswaarde: " #: dialog.c:423 msgid "Entry" msgstr "" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Voeg nieuwe locales toe en stel de standaard locale in" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 #, fuzzy #| msgid "" #| "The default locale used when initing a vte terminal.\n" #| "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "De standaard locale die gebruikt wordt bij het starten.\n" "U mag hier \"nl_NL.ISO8859-15\", \"nl_NL.UTF-8\", \"nl_BE.ISO8859-15\" of " "\"nl_BE.UTF8\" gebruiken." #: dialog.c:451 msgid "Default locale:" msgstr "Standaard locale:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "The lijst met locales in rechterklikmenu, scheid met .\n" "U mag hier \"nl_NL@euro\", \"nl_NL.UTF-8\", \"nl_BE@euro\"of \"nl_BE.UTF8\" " "gebruiken.\n" "U kunt hier best \"UTF-8\" gebruiken indien u geen locales hebt " "geïnstalleerd." #: dialog.c:463 msgid "Locales list:" msgstr "Lijst met locales:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Wijzig de kleurverzadiging van de achtergrond" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Wijzig de Kleurverzadiging van de achtergrond" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Wijzig de voorgrondkleur van de terminal" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Wijzig de achtergrondkleur in terminal" #: dialog.c:556 #, fuzzy #| msgid "Change the background color in terminal" msgid "Change the cursor color in terminal" msgstr "Wijzig de achtergrondkleur in terminal" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the background color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Wijzig de achtergrondkleur in terminal" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Wijzig de helderheid van de ANSI kleuren" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 #, fuzzy #| msgid "Change colors" msgid "Invert color" msgstr "Wijzig de kleuren" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Wijzig de %s kleur in tab" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Voorbeeld vette tekst" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Bevestig het sluiten van meerdere tabs" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "U gaat meer dan een tab sluiten. Wilt u doorgaan?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "die tabs" #: dialog.c:867 #, fuzzy #| msgid "" #| "You may press + here\n" #| "to get the key value used for the function key." msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "U kan hier + hier\n" "om de waarde van de toetscode te krijgen voor de functietoets." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Krijg de waarde van de toetscode voor de functietoets" #: dialog.c:922 msgid "Function Key Name" msgstr "Functietoets naam" #: dialog.c:926 #, fuzzy #| msgid "Erase Binding" msgid "Key Bindings" msgstr "Wis binding" #: dialog.c:934 msgid "Key Group: " msgstr "Groep van toetsen: " #: dialog.c:944 msgid "Note: " msgstr "Nota: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Desactiveer alle functietoetsen." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Gebruik voor %s %s" #: dialog.c:1024 #, fuzzy #| msgid "Don't forget to save your settings after making any change!\n" msgid "Don't forget to save your settings after making any change!" msgstr "Vergeet je instellingen niet te saven na wijzigingen te maken!\n" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Gebruik" #: dialog.c:1031 #, fuzzy #| msgid "Erase Binding" msgid "Key binding" msgstr "Wis binding" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "" #: dialog.c:1067 msgid "Translators" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "" #: dialog.c:1084 msgid "About" msgstr "" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "Er loopt nog steeds een programma in de voorgrond in tab #%d: " #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" "Beëindig het door 'kill -9 %d' te gebruiken, aangeraden wanneer het niet " "meer reageerd." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Ga toch door?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Tip:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Bevestig om het lopende programma af te sluiten" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "deze tab" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Wijzig de doorzichtigheid van het venster" #: dialog.c:1146 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window:" msgstr "Wijzig de doorzichtigheid van het venster" #: dialog.c:1156 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive" msgstr "Wijzig de doorzichtigheid van het venster" #: dialog.c:1158 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive:" msgstr "Wijzig de doorzichtigheid van het venster" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Wijzig de helderheid van de ANSI kleuren gebruikt in de terminal" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Wijzig de helderheid van ANSI kleuren bij inactiviteit" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " wilt het volgende commando uitvoeren: " #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Bevestig om uit te voeren -e/-x/--execute commando" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "De volgende programma's lopen nog onder tab #%d:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Het is aangeraden om of 'exit' gebruiken om tabs te sluiten" #: dialog.c:1301 #, fuzzy #| msgid "Confirm to close a tab with child proccess" msgid "Confirm to close a tab with child process" msgstr "Bevestig om een tab te sluiten met een child proces" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "De volgende programma's lopen nog in dit venster: " #: dialog.c:1331 #, fuzzy #| msgid "Confirm to close a window with child proccess" msgid "Confirm to close a window with child process" msgstr "Bevestig om het venster met child proces te sluiten" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Bestig om %s te sluiten" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "De volgende programma's lopen nog onder %s:" #: dialog.c:1383 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Selecteer alle tekst in het Vte Terminal venster." #: dialog.c:1390 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Confirm to paste texts to the Vte Terminal" msgstr "Selecteer alle tekst in het Vte Terminal venster." #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Probeer %s af te sluiten met SIGKILL() om het sluiten van die programma's te " "vermijden!\n" "(KAN DATAVERLIES VEROORZAKEN!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Forceer het sluiten van alle tabs en vensters en %s te sluiten!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Niet geactiveerd, gekopieerd met [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Niet geactiveerd)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "De locale \"%s\" blijkt NIET te worden ondersteund door uw installatie!\n" "Als u de locales data zonet heeft toegevoegd,\n" "Gelieve eerst alle %s vensters te sluiten en opnieuw te proberen." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Locale wordt niet ondersteund!" #: dialog.c:3364 #, fuzzy, c-format #| msgid "You should upgrade to %s to support this feature." msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "Om deze functie te gebruiken moet u upgraden naar %s." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Functie wordt niet ondersteund!" #: dialog.c:3513 #, fuzzy, c-format #| msgid "Disable all the function keys." msgid "Disable all the function keys of [%s] group." msgstr "Desactiveer alle functietoetsen." #: main.c:657 #, fuzzy, c-format #| msgid "" #| "The data got from socket seems incorrect.\n" #| "If you just updated %s recently,\n" #| "Please close all the windows of %s and try again." msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "De van socket verkregen data lijkt foutief.\n" "Als u zonet %s heeft geüpdate, sluit eerst alle %s vensters,\n" "en probeer opnieuw." #: main.c:665 msgid "The format of socket data is out of date" msgstr "De stijl van de socket data is outdatet" #: menu.c:59 msgid "Change text encoding" msgstr "Verander de tekst encodering" #: menu.c:60 msgid "New tab" msgstr "Nieuwe tab" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nieuwe tab met specifieke locale" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Nieuw venster met specifiek profiel" #: menu.c:80 msgid "Change the font" msgstr "Wijzig het lettertype" #: menu.c:87 msgid "Change colors" msgstr "Wijzig de kleuren" #: menu.c:90 #, fuzzy #| msgid "Change the background color" msgid "Change the cursor color" msgstr "Wijzig de achtergrondkleur" #: menu.c:94 msgid "Change the foreground color" msgstr "Wijzig de voorgrondkleur" #: menu.c:99 #, fuzzy #| msgid "Change the background color" msgid "Change the ANSI colors" msgstr "Wijzig de achtergrondkleur" #: menu.c:104 msgid "Change the background color" msgstr "Wijzig de achtergrondkleur" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Wijzig de helderheid van de ANSI kleuren" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Wijzig de helderheid bij inactiviteit" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Wijzig het ANSI kleurthema" #: menu.c:148 #, fuzzy #| msgid "Background saturation" msgid "Background" msgstr "Kleurverzadiging achtergrond" #: menu.c:154 msgid "Transparent window" msgstr "Transparant venster" #: menu.c:159 msgid "Window opacity" msgstr "Doorzichtigheid van venster" #: menu.c:162 #, fuzzy #| msgid "Dim text when inactive" msgid "Window opacity when inactive" msgstr "Schemer tekst bij inactiviteit" #: menu.c:172 msgid "Transparent background" msgstr "Transparante achtergrond" #: menu.c:175 msgid "Background saturation" msgstr "Kleurverzadiging achtergrond" #: menu.c:179 msgid "Set background image" msgstr "Kies achtergrondafbeelding" #: menu.c:192 window.c:3862 #, fuzzy #| msgid "Copy to clipboard." msgid "Clipboard" msgstr "Kopieer naar klembord." #: menu.c:196 msgid "Copy URL" msgstr "Kopieer URI" #: menu.c:201 msgid "Copy" msgstr "Kopieer" #: menu.c:205 msgid "Paste" msgstr "Plak" #: menu.c:212 #, fuzzy #| msgid "Copy to clipboard." msgid "View clipboard" msgstr "Kopieer naar klembord." #: menu.c:216 #, fuzzy #| msgid "Copy to clipboard." msgid "View primary clipboard" msgstr "Kopieer naar klembord." #: menu.c:227 msgid "Scrollback lines" msgstr "Terugscroll lijnen" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Verwijder terugscroll lijnen" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Varia" #: menu.c:244 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste to every Vte Terminal" msgstr "Selecteer alle tekst in het Vte Terminal venster." #: menu.c:247 msgid "Launch file manager" msgstr "" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Wis binding" #: menu.c:275 msgid "Cursor Shape" msgstr "" #: menu.c:292 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim text when inactive" msgstr "Schemer tekst bij inactiviteit" #: menu.c:297 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim window when inactive" msgstr "Schemer tekst bij inactiviteit" #: menu.c:302 msgid "Cursor blinks" msgstr "Cursor blinkt" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Geluidssignaal" #: menu.c:327 #, fuzzy #| msgid "Audible bell" msgid "Visible bell" msgstr "Geluidssignaal" #: menu.c:332 msgid "Urgent bell" msgstr "" #: menu.c:342 msgid "Switch input methods" msgstr "Verander invoermethode" #: menu.c:361 msgid "Show the tabs bar" msgstr "Toon de tabbalk" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Verberg de tabbalk" #: menu.c:374 #, fuzzy #| msgid "Show the tabs bar" msgid "Always show the tabs bar" msgstr "Toon de tabbalk" #: menu.c:381 #, fuzzy #| msgid "Hide the tabs bar" msgid "Always hide the tabs bar" msgstr "Verberg de tabbalk" #: menu.c:391 msgid "Increase window size" msgstr "Vergroot venster" #: menu.c:394 msgid "Decrease window size" msgstr "Verklein venster" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Herstel naar gebruikers eigen lettertype en -grootte" #: menu.c:404 msgid "Reset to system font/size" msgstr "Herstel naar standaard lettertype en -grootte" #: menu.c:409 msgid "Reset the content" msgstr "Herstel de inhoud" #: menu.c:424 msgid "User profile" msgstr "Gebruikersprofiel" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Sluit %s af" #: menu.c:502 msgid "grayscale" msgstr "" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Gebruikers eigen" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Verplaats huidige pagina voorwaarts." #: menu.c:1099 msgid " (Wide)" msgstr " (Breed)" #: menu.c:1554 msgid "Font Selection" msgstr "Lettertypekeuze" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Voeg andere locales toe..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Andere instellingen..." #: menu.c:1963 #, fuzzy #| msgid "Save settings as..." msgid "Save settings automatically" msgstr "Sla instellingen op als..." #: menu.c:1968 msgid "Save settings" msgstr "Sla instellingen op" #: menu.c:1971 msgid "Save settings as..." msgstr "Sla instellingen op als..." #: menu.c:1977 #, fuzzy #| msgid "Save settings" msgid "Reload settings" msgstr "Sla instellingen op" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s standaard" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Systeem standaard" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "De volgende instellingen:\n" "\n" "%s\n" "Kunnen NIET toegepast worden op terminals van het huidige venster.\n" "Gebruik a.u.b. [%s] in de plaats." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "De volgende instellingen kunnen NIET toegepast worden" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "" "Desactiveer: Nu aan het proberen om [Transparante Achtergrond] tegebruiken." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Scroll de achtergrondafbeelding tesamen met de tekst" #: menu.c:2719 msgid "Open File" msgstr "" #: menu.c:2721 msgid "Save File" msgstr "" #: menu.c:2883 #, fuzzy, c-format #| msgid "The following error is occurred:" msgid "The following error occurred: %s" msgstr "De volgende fout is gebeurd:" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Error bij het creëren van hetn child proces:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Error bij het creëren van het child proces!\n" "Bent u zeker dat /dev/pts is gemount als een devpts file systeem?" #: notebook.c:749 msgid "Error when creating child process" msgstr "Error wanneer child proces gecreëerd wordt" #: profile.c:854 msgid "Tab operation" msgstr "Tab operatie" #: profile.c:855 msgid "Switch tab" msgstr "Verander tab" #: profile.c:856 msgid "Move tab" msgstr "Verplaats tab" #: profile.c:857 msgid "Switch to #? tab" msgstr "Verander naar #? tab" #: profile.c:858 msgid "Text operation" msgstr "Text operatie" #: profile.c:859 msgid "Scroll up/down" msgstr "Scroll naar boven/beneden" #: profile.c:860 msgid "Font" msgstr "Lettertype" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Des-/Activeer functies" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "Des-/Activeer hyperlinks, functietoetsen en rechterklikmenu." #: profile.c:869 msgid "Add new tab" msgstr "Maak nieuwe tab" #: profile.c:871 msgid "Add a new tab." msgstr "Maak een nieuwe tab" #: profile.c:873 msgid "Close tab" msgstr "Sluit tab" #: profile.c:875 msgid "Close current tab." msgstr "Sluit huidige tab" #: profile.c:877 msgid "Rename page name" msgstr "Hernoem paginanaam" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Hernoem paginanaam van huidige tab." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Vind string gelijk aan de zoekterm" #: profile.c:884 msgid "Find previous" msgstr "Vind vorige" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Vind vorige string gelijk aan de zoekterm" #: profile.c:887 msgid "Find next" msgstr "Vind volgende" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Vind de volgende string gelijk aan de zoekterm" #: profile.c:891 msgid "Switch to prev tab" msgstr "Verander naar vorige tab" #: profile.c:893 msgid "Switch to prev tab." msgstr "Verander naar vorige tab." #: profile.c:895 msgid "Switch to next tab" msgstr "Verander naar volgende tab" #: profile.c:897 msgid "Switch to next tab." msgstr "Verander naar volgende tab." #: profile.c:899 msgid "Switch to first tab" msgstr "Verander naar eerste tab" #: profile.c:901 msgid "Switch to first tab." msgstr "Verander naar eerste tab." #: profile.c:903 msgid "Switch to last tab" msgstr "Verander naar laatste tab" #: profile.c:905 msgid "Switch to last tab." msgstr "Verander naar laatste tab." #: profile.c:907 msgid "Move page forward" msgstr "Ga pagina vooruit" #: profile.c:909 msgid "Move current page forward." msgstr "Verplaats huidige pagina voorwaarts." #: profile.c:911 msgid "Move page backward" msgstr "Ga pagina achterwaarts" #: profile.c:913 msgid "Move current page backward." msgstr "Verplaats huidge pagina achterwaarts." #: profile.c:915 msgid "Move page to first" msgstr "Plaats pagina als eerste" #: profile.c:917 msgid "Move current page to first." msgstr "Plaats huidige pagina als eerste. " #: profile.c:919 msgid "Move page to last" msgstr "Plaats pagina als laatste" #: profile.c:921 msgid "Move current page to last." msgstr "Plaats huidige pagina als laatste." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Verander naar #%d tab" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Verander direct naar #%d tab." #: profile.c:932 msgid "New window" msgstr "" #: profile.c:934 msgid "Open a new window with current dir." msgstr "" #: profile.c:936 msgid "Select all" msgstr "Selecteer alles" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Selecteer alle tekst in het Vte Terminal venster." #: profile.c:940 #, fuzzy #| msgid "Copy to clipboard." msgid "Copy to clipboard" msgstr "Kopieer naar klembord." #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Kopieer de tekst naar het klembord." #: profile.c:944 msgid "Paste the text" msgstr "Plak de tekst" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Selecteer alle tekst in het Vte Terminal venster." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Kopieer de tekst naar het klembord." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Plak de tekst in het klembord." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Vergroot lettergrootte" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Vergroot lettergrootte in huidige tab." #: profile.c:960 msgid "Decrease font size" msgstr "Verklein lettergrootte" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Verklein lettergroote in huidige tab." #: profile.c:964 msgid "Reset font size" msgstr "Reset lettergrootte" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Reset lettergrootte in huidige tab naar oorspronkelijke grootte." #: profile.c:968 msgid "Maximize the window" msgstr "Maximaliseer venster" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Probeer het venster zo te maximaliseren om alle schermruimte te benutten." #: profile.c:972 msgid "Full screen" msgstr "Volledig scherm" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Vraagt om het venster in on-/volledig scherm te tonen" #: profile.c:976 msgid "Scroll up" msgstr "Scroll naar boven" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Emuleer een muisscroll naar boven in Vte Terminal venster." #: profile.c:980 msgid "Scroll down" msgstr "Scroll naar beneden" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Emuleer een muisscroll naar beneden in Vte Terminal venster." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Ga een lijn naar boven" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Vraagt om een lijn naar boven te scrollen in Vte Terminal venster." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Ga een lijn naar beneden" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Vraagt om een lijn naar onder te scrollen in Vte Terminal venster." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Verwijder terugscroll lijnen" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Dump de lopende debug data" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Dump alle lopende data van LilyTerm voor debuggen." #: profile.c:1033 msgid "Window Title" msgstr "Venstertitel" #: profile.c:1034 msgid "Running Command" msgstr "Commando aan het uitvoeren" #: profile.c:1035 msgid "Current Dir" msgstr "Huidige Map" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Aangepaste Tabnaam" #: profile.c:1037 msgid "Root Privileges" msgstr "Root Privileges" #: profile.c:1038 msgid "Normal Text" msgstr "Normale Tekst" #: profile.c:1072 msgid "Shift" msgstr "" #: profile.c:1076 msgid "Ctrl" msgstr "" #: profile.c:1078 msgid "Alt" msgstr "" #: profile.c:1088 msgid "Win" msgstr "" #: profile.c:1132 #, fuzzy #| msgid "Background saturation" msgid "Background Color" msgstr "Kleurverzadiging achtergrond" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Wijzig de voorgrondkleur" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Het doelbestand bestaat NIET" #: profile.c:2996 msgid "The target file is a directory" msgstr "Het doelbestand is een map" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Error bij saven van profiel '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Error bij saven profiel" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Er is iets toegevoegd, verwijderd of veranderd van het profiel.\n" "Gebruik [Save instellingen] in het rechterklikmenu om uw instellingen\n" "te saven en bewerk het manueel indien nodig.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Uw profiel is %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Het formaat van uw profiel is outdatet" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Het profiel \"%s\" is ongeldig:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Het profiel is ongeldig!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tVenster #%d, Pagina #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tPagina #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Systeem standaard" #~ msgid "Your %s profile is: " #~ msgstr "Uw %s profiel is:" #, fuzzy #~| msgid "Please report bug to %s. Thank you for using %s!" #~ msgid "Thank you for using %s!\n" #~ msgstr "Rapporteer bugs aan %s. Bedankt om %s te gebruiken!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tStandaard Vte gedrag; plaats tekst in " #~ "primaireklembord.\n" #~ msgid "Shortcut Key" #~ msgstr "Sneltoets" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "Ga toch door?" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Rapporteer bugs aan %s. Bedankt dat u %s gebruikt!" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "%s is een op libvte gebaseerde X Terminal Emulator\n" #~ msgid "Set function key value" #~ msgstr "Geef functietoetswaarde" #, fuzzy #~| msgid "Paste the text" #~ msgid "Paste to every vte" #~ msgstr "Plak de tekst" #~ msgid "Change the Opacity of window:" #~ msgstr "Wijzig de Doorzichtigheid van het venster" po/pl.po000066400000000000000000001254701246562641500124730ustar00rootroot00000000000000# Polish translation of LilyTerm # Copyright (C) 2011, 2012 # This file is distributed under the same license as the LilyTerm package. # Bogusz Kowalski , 2012. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9~final5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-04-14 18:23+0200\n" "Last-Translator: Bogusz Kowalski \n" "Language-Team: polski >\n" "Language: pl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n!=1);\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Proszę zgłaszać błędy do <%s>.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Dziękuję za używanie %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s jest emulatorem terminala opartym o libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Użyj -T/--title {tytuł} aby ustawić tytuł okna.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Użyj -T/--title {tytuł} aby ustawić tytuł okna.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "Użyj -t/--tab {liczba} aby otworzyć wiele kart przy starcie.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Użyj -d/--directory {katalog} aby ustawić katalog roboczy przy starcie.\n" #: console.c:146 #, fuzzy #| msgid "" #| "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " #| "geometry of window.\n" msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Użyj -g/--geometry {SZEROKOŚĆXWYSOKOŚĆ[+-]XOFFSET[+-]YOFFSET} aby ustawić " "geometrię okna.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "Użyj -l/-ls/--login aby wywołać powłokę jako login shell.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Użyj -s/--separate aby uruchomić osobny proces.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 #, fuzzy #| msgid "Use -p/--profile to got a profile sample.\n" msgid "Use -p/--profile to get a profile sample.\n" msgstr "Użyj -p/--profile aby zobaczyć przykładową konfigurację profilu.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Użyj -u/--user_profile {%s} aby użyć własnego profilu.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Użyj -v/--cersion aby zobaczyć informacje o wersji.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command when starting up. (Must be " #| "the final option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Użyj -e/-x/--execute {Polecenie} aby uruchomić program po starcie. (Musi być " "ostatnią podaną opcją).\n" #: console.c:159 #, fuzzy, c-format #| msgid "The %s system configure file is: %s/%s\n" msgid "The %s system configure file is: %s\n" msgstr "%s używa pliku z konfiguracją systemową: %s/%s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "%s używa twojego własnego profilu: " #: console.c:224 msgid "Default key binding:" msgstr "Domyślne przypisanie:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 #, fuzzy #| msgid "" #| " * <`> Disable/Enable hyperlinks, function keys and " #| "right click menu." msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Wyłącz/Włącz odsyłacze, klawisze funkcyjne i menu " "prawego klawisza myszy." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr "" " * Dodaj nową kartę kartę z bieżącym katalogiem.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Przełącz na Poprzednią/Następną kartę.\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Przełącz na Pierwszą/Ostatnią kartę.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> Przesuń bieżącą kartę Naprzód/Wstecz.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr " * Przesuń bieżącą kartę na Początek/Koniec.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Przełącz na 1. ~ 12. kartę.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter> Zwiększ/Pomniejsz/Zresetuj rozmiar czcionki w " "bieżącej karcie.\n" #: console.c:236 #, fuzzy #| msgid "" #| " * Emulate a mouse Scroll Up/Down event on Vte " #| "Terminal box.\n" msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Przewijaj W górę/W dół (jako zdarzenie terminala " "Vte).\n" #: console.c:237 #, fuzzy #| msgid "" #| " * Asks to Scroll Up/Down 1 line on Vte Terminal " #| "box.\n" msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr " * Przewiń W górę/W dół o 1 linię.\n" #: console.c:238 #, fuzzy #| msgid "" #| " * Gtk+ default behavior, Scroll Up/Down on Vte " #| "Terminal box.\n" msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Domyślne zachowanie Gtk+, przewijanie W górę/W dół.\n" #: console.c:239 #, fuzzy #| msgid "" #| " * Gtk+ default behavior, Scroll the Terminal box to " #| "to Top/Bottom.\n" msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Domyślne zachowanie Gtk+, przewinięcie Na samą górę/" "Na sam dół terminala.\n" #: console.c:240 #, fuzzy #| msgid "" #| " * Switch between fullwindow/unfullwindow and " #| "fullscreen/unfullscreen state.\n" msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Przełącz maksymalizację okna/przywróć rozmiar okna i " "włącz pełny ekran/normalne okno.\n" #: console.c:241 #, fuzzy #| msgid "" #| " * Find text in the Vte Terminal box. Use /" #| " to find Next/Prev.\n" msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Znajdź tekst. Użyj / aby znaleźć " "Następne/Poprzednie wystąpienie.\n" #: console.c:243 #, fuzzy #| msgid "" #| " * Select all the text in the Vte Terminal box.\n" msgid " * Select all the text in the terminal.\n" msgstr " * Zaznacz cały tekst w terminalu Vte.\n" #: console.c:244 #, fuzzy #| msgid "" #| " * Copy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in clipboard.\n" msgstr " * Kopiuj do schowka / Wklej ze schowka .\n" #: console.c:245 #, fuzzy #| msgid "" #| " * Copy the text to primary clipboard / Paste the " #| "text in primary clipboard.\n" msgid " * Copy/Paste the text in primary clipboard.\n" msgstr " * \tKopiuj do / Wklej ze schowka podstawowego.\n" #: console.c:246 #, fuzzy #| msgid "" #| " (i.e. Emulate a middle button mouse click to copy/" #| "paste the text)\n" msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (np. Emuluj środkowy przycisk myszy by skopiować/" "wkleić tekst)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" "Niektóre z tych domyślnie wyłączonych przypisań klawiszy mogą okazać się " "przydatne:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * Spróbuj zamknąć bieżącą zakładkę.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (Użycie lub 'exit' jest zalecane by " "zamknąć zakładkę)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr " * Otwórz nowe okno z bieżącym katalogiem.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Zmień nazwę bieżącej karty.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "TIP: Te przypisania klawiszy mogą być zmienione lub wyłączone przez menu pod " "prawym klawiszem [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Ustaw przypisanie klawiszy" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "Wystąpił następujący błąd:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Zmień nazwę tej karty" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Wpisz Etykietę dla tej zakładki:" #: dialog.c:211 msgid "Label Name:" msgstr "Etykieta:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Znajdź wyrażenie" #: dialog.c:235 msgid "Find: " msgstr "Szukaj: " #: dialog.c:258 msgid "Find previous string" msgstr "Poprzednie wystąpienie" #: dialog.c:264 msgid "Find next string" msgstr "Następne wystąpienie" #: dialog.c:275 msgid "Case sensitive" msgstr "Uwzględniaj wielkość liter" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Używaj Perlowych RegExpów" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Wklej tekst do KAŻDEGO terminala" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Proszę podać tekst do wklejenia do KAŻDEGO z terminali:" #: dialog.c:343 msgid "Text:" msgstr "Tekst:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Dodaj na końcu tekstu." #: dialog.c:388 msgid "Grab keys" msgstr "Przechwyć klawisze" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Wklej przechwyconą kombinację klwiszy do terminala.\n" "Może to być przydatne gdy chcesz wkleić kombinację klawiszym, np. ." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Kombinacja:" #: dialog.c:423 msgid "Entry" msgstr "Wpis" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Dodaj nowe ustawienia językowe i ustaw domyślne" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "Przy starcie terminala Vte użyto domyślnych ustawień językowych.\n" "Możesz użyć także \"pl_PL\", \"pl_PL.ISO-8859-2\" lub \"pl_PL.UTF-8\"." #: dialog.c:451 msgid "Default locale:" msgstr "Domyślne ustawienia językowe:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Lista ustawień językowych dostępna pod prawym klawiszem myszy, oddzielaj je " ".\n" "Możesz tu użyć także \"pl_PL\", \"pl_PL.ISO-8859-2\" lub \"pl_PL.UTF-8\"." "Możesz również chcieć użyć po prostu \"UTF-8\" jeśli nie masz " "zainstalowanych innych ustawień." #: dialog.c:463 msgid "Locales list:" msgstr "Lista ustawień:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Zmień nasycenie tła" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Zmień nasycenie tła" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Zmień kolor pierwszego planu terminala" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Zmień kolor tła terminala" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Zmień kolor kursora" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the cursor color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Zmień kolor kursora" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Dopasuj jasność kolorów ANSI" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Zamień kolory" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Zmień kolor %sa na karcie" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Pogrubiony tekst demo" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Potwierdź chęć zamknięcia wielu kart" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Chciałbyś zamknąć wiele kart. Czy mam kontynuować?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "te karty" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Możesz tu wcisnąć + \n" "aby dostać kod kombinacji klawiszy." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Pobierz kod kombinacji" #: dialog.c:922 msgid "Function Key Name" msgstr "Nazwa kombinacji" #: dialog.c:926 msgid "Key Bindings" msgstr "Przypisanie klawiszy" #: dialog.c:934 msgid "Key Group: " msgstr "Grupa klawiszy: " #: dialog.c:944 msgid "Note: " msgstr "Uwaga: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Wyłącz wszystkie kombinacje klawiszy." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Użycie %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "Nie zapomnij zapisać swoich ustawień po dokonaniu zmian!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Użycie" #: dialog.c:1031 msgid "Key binding" msgstr "Przypisanie klawiszy" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." #: dialog.c:1052 msgid "License" msgstr "Licencja" #: dialog.c:1067 msgid "Translators" msgstr "Tłumacze" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Strona główna:" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Wiki: %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Blog: %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Wiki: %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Problemy: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "O programie" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "W #%d karcie wciąż działa program:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "Jeśli nie odpowiada zalecane jest zatrzymanie go poprzez `kill -9 %d`." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Czy chcesz kontynuować?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Wskazówka:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Potwierdź chęć zamknięcia działającego programu" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "ta karta" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Zmień przezroczystość okna" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Zmień przezroczystość okna:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Zmień przezroczystość nieaktywnego okna" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Zmień przezroczystość nieaktywnego okna:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Dopasuj jasność kolorów ANSI użytych w terminalu" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Dopasuj jasność kolorów ANSI nieaktywnego terminala" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " próbuje wykonać następujące polecenie:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Potwierdz chęć wykonania -e/-x/--execute polecenie" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "Następujące programy wciąż działają w #%d karcie:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Aby zamknąć karty zalecane jest użycie lub 'exit'" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Potwierdz chęć zamknięcia karty z procesem potomnym" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "Następujące programy wciąż działają w tym oknie:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Potwierdz chęć zamknięcia okna z procesem potomnym" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Potwierdz chęć zamknięcia %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "Następujące programy wciąż działają w %s:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Próbuj wkleić podany tekst do terminala:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Potwierdź chęć wklejenia tekstu do terminala" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Spróbuj zabić %s sygnałem SIGKILL() aby zapobiec zakończeniu tych " "programów!'n(MOŻE SPOWODOWAĆ UTRATĘ DANYCH!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Zamknij siłą wszystkie karty, okna i wyjdź z %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Wyłączone, powielone z [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Wyłączone)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Ustawienia językowe \"%s\" wyglądają na NIE obsługiwane przez twój system!\n" "Jeśli właśnie dodałeś obsługę ustawień językowych, \n" "proszę o zamknięcie wszystkich okien %s i ponowną próbę." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Nie obsługiwane ustawienia językowe!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "Powinieneś uaktualnić %s i zrekompilować %s do obsługi tej funkcji." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Funkcja niedostępna!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Wyłącz wszystkie kombinacje klawiszy z grupy [%s]." #: main.c:657 #, fuzzy, c-format #| msgid "" #| "The data got from socket seems incorrect.\n" #| "\n" #| "\tRecieved socket version: %s\n" #| "\tExpected socket version: %s\n" #| "\n" #| "If you just updated %s recently,\n" #| "Please close all the windows of %s and try again." msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Dane otrzymane z socketu wyglądają na nieprawidłowe.\n" "\n" "\tOtrzymana wersja z socketu: %s\n" "\tOczekiwana wersja socketu: %s\n" "Jeśli właśnie zaktualizowałeś %s,\n" "Proszę o zamknięcie wszystkich okien %s i ponowną próbę." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Format danych z socketa jest nieaktualny" #: menu.c:59 msgid "Change text encoding" msgstr "Zmień kodowanie znaków" #: menu.c:60 msgid "New tab" msgstr "Nowa karta" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nowa karta z ustawionym językiem" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Nowe okno z wybranymi ustawieniami profilu" #: menu.c:80 msgid "Change the font" msgstr "Zmień czcionkę" #: menu.c:87 msgid "Change colors" msgstr "Zmień kolory" #: menu.c:90 msgid "Change the cursor color" msgstr "Zmień kolor kursora" #: menu.c:94 msgid "Change the foreground color" msgstr "Zmień kolor pierwszego planu" #: menu.c:99 #, fuzzy #| msgid "Change the cursor color" msgid "Change the ANSI colors" msgstr "Zmień kolor kursora" #: menu.c:104 msgid "Change the background color" msgstr "Zmień kolor tła" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Dopasuj jasność kolorów ANSI" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Dopasuj jasność gdy nieaktywny" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Zmień schemat kolorów ANSI" #: menu.c:148 msgid "Background" msgstr "Tło" #: menu.c:154 msgid "Transparent window" msgstr "Przezroczyste okno" #: menu.c:159 msgid "Window opacity" msgstr "Przezroczystość okna" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Przezroczystość nieaktywnego okna" #: menu.c:172 msgid "Transparent background" msgstr "Przezroczyste tło" #: menu.c:175 msgid "Background saturation" msgstr "Nasycenie tła" #: menu.c:179 msgid "Set background image" msgstr "Ustaw obrazek tła" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Schowek" #: menu.c:196 msgid "Copy URL" msgstr "Kopiuj URL" #: menu.c:201 msgid "Copy" msgstr "Kopiuj" #: menu.c:205 msgid "Paste" msgstr "Wklej" #: menu.c:212 msgid "View clipboard" msgstr "Widok schowka." #: menu.c:216 msgid "View primary clipboard" msgstr "Widok schowka podstawowego" #: menu.c:227 msgid "Scrollback lines" msgstr "Historia scrollback" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Wyczyść historię scrollback" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Różne" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Wklej do KAŻDEGO terminala" #: menu.c:247 msgid "Launch file manager" msgstr "Uruchom menedżer plików" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Wymaż przypisanie" #: menu.c:275 msgid "Cursor Shape" msgstr "Kształt kursora" #: menu.c:292 msgid "Dim text when inactive" msgstr "Przyciemnij tekst gdy nieaktywny" #: menu.c:297 msgid "Dim window when inactive" msgstr "Przyciemnij okno gdy nieaktywne" #: menu.c:302 msgid "Cursor blinks" msgstr "Migający kursor" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Dzwonek dźwiękowy" #: menu.c:327 msgid "Visible bell" msgstr "Dzwonek dźwiękowy" #: menu.c:332 msgid "Urgent bell" msgstr "Dzwonek ponaglający" #: menu.c:342 msgid "Switch input methods" msgstr "Przełącz metodę wprowadzania" #: menu.c:361 msgid "Show the tabs bar" msgstr "Pokaż pasek kart" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Ukryj pasek kart" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Zawsze pokazuj pasek kart" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Zawsze ukrywaj pasek kart" #: menu.c:391 msgid "Increase window size" msgstr "Powiększ rozmiar okna" #: menu.c:394 msgid "Decrease window size" msgstr "Zmniejsz rozmiar okna" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Zresetuj czcionkę/rozmiar na wybraną przez użytkownika" #: menu.c:404 msgid "Reset to system font/size" msgstr "Zresetuj czcionkę/rozmiar na systemową" #: menu.c:409 msgid "Reset the content" msgstr "Zresetuj wszystkie ustawienia" #: menu.c:424 msgid "User profile" msgstr "Profil użytkownika" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Opuść %s" #: menu.c:502 msgid "grayscale" msgstr "skala szarości" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "niestandardowy użytkownika" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Przenieś bieżącą kartę do przodu." #: menu.c:1099 msgid " (Wide)" msgstr " (Szeroki)" #: menu.c:1554 msgid "Font Selection" msgstr "Wybór czcionki" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Dodaj inne ustawienia językowe..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Inne ustawienia..." #: menu.c:1963 msgid "Save settings automatically" msgstr "Automatycznie zapisz ustawienia" #: menu.c:1968 msgid "Save settings" msgstr "Zapisz ustawienia" #: menu.c:1971 msgid "Save settings as..." msgstr "Zapisz ustawienia jako..." #: menu.c:1977 msgid "Reload settings" msgstr "Przeładuj ustawienia" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s domyślny" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Domyślny systemowy" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Następujące ustawienia:\n" "\n" "%s\n" "NIE mogą być użyte w obecnym oknie terminala.\n" "Zamiast użyj [%s]." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Następujące ustawienia NIE mogą być użyte" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Wyłącz: Zamiast próbuję użyć [Przezroczyste tło]." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Przewijaj obraz tła razem z tekstem" #: menu.c:2719 msgid "Open File" msgstr "Otwórz plik" #: menu.c:2721 msgid "Save File" msgstr "Zapisz plik" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "Wystąpił następujący błąd: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Błąd podczas tworzenia procesu potomnego:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Błąd podczas tworzenia procesu potomnego!\n" "Upewnij się proszę czy /dev/pts jest zamontowane jako system plików devpts!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Błąd podczas tworzenia procesu potomnego" #: profile.c:854 msgid "Tab operation" msgstr "Operacje na kartach" #: profile.c:855 msgid "Switch tab" msgstr "Przełącz kartę" #: profile.c:856 msgid "Move tab" msgstr "Przesuń kartę" #: profile.c:857 msgid "Switch to #? tab" msgstr "Przełącz na #? kartę" #: profile.c:858 msgid "Text operation" msgstr "Operacje tekstowe" #: profile.c:859 msgid "Scroll up/down" msgstr "Przewiń w górę/w dół" #: profile.c:860 msgid "Font" msgstr "Czcionka" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Wyłącz/Włącz funkcje" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Wyłącz/Włącz odsyłacze, klawisze funkcyjne i menu prawego klawisza myszy." #: profile.c:869 msgid "Add new tab" msgstr "Dodaj nową kartę" #: profile.c:871 msgid "Add a new tab." msgstr "Dodaj nową kartę." #: profile.c:873 msgid "Close tab" msgstr "Zamknij kartę" #: profile.c:875 msgid "Close current tab." msgstr "Zamknij bieżącą kartę." #: profile.c:877 msgid "Rename page name" msgstr "Zmień nazwę karty" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Zmień nazwę bieżącej karty." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Szukaj wystąpień pasujących do kryterium wyszukiwania." #: profile.c:884 msgid "Find previous" msgstr "Znajdź poprzednie" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Znajdź poprzednie wystąpienie pasujące do kryterium wyszukiwania." #: profile.c:887 msgid "Find next" msgstr "Znajdź następne" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Znajdź następne wystąpienie pasujące do kryterium wyszukiwania." #: profile.c:891 msgid "Switch to prev tab" msgstr "Przełącz na poprzednią kartę" #: profile.c:893 msgid "Switch to prev tab." msgstr "Przełącz na poprzednią kartę." #: profile.c:895 msgid "Switch to next tab" msgstr "Przełącz na następną kartę" #: profile.c:897 msgid "Switch to next tab." msgstr "Przełącz na następną kartę." #: profile.c:899 msgid "Switch to first tab" msgstr "Przełącz na pierwszą kartę" #: profile.c:901 msgid "Switch to first tab." msgstr "Przełącz na pierwszą kartę." #: profile.c:903 msgid "Switch to last tab" msgstr "Przełącz na ostatnią kartę" #: profile.c:905 msgid "Switch to last tab." msgstr "Przełącz na ostatnią kartę." #: profile.c:907 msgid "Move page forward" msgstr "Przenieś kartę do przodu" #: profile.c:909 msgid "Move current page forward." msgstr "Przenieś bieżącą kartę do przodu." #: profile.c:911 msgid "Move page backward" msgstr "Przenieś kartę wstecz" #: profile.c:913 msgid "Move current page backward." msgstr "Przenieś bieżącą kartę wstecz." #: profile.c:915 msgid "Move page to first" msgstr "Przenieś kartę na początek" #: profile.c:917 msgid "Move current page to first." msgstr "Przenieś bieżącą kartę na początek." #: profile.c:919 msgid "Move page to last" msgstr "Przenieś kartę na koniec" #: profile.c:921 msgid "Move current page to last." msgstr "Przenieś bieżącą kartę na koniec." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Przełącz na #%d kartę" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Przełącz bezpośrednio na #%d kartę." #: profile.c:932 msgid "New window" msgstr "Nowe okno" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Otwórz nowe okno z bieżącym katalogiem." #: profile.c:936 msgid "Select all" msgstr "Zaznacz wszystko" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Zaznacz cały tekst w oknie terminala." #: profile.c:940 #, fuzzy #| msgid "Copy to clipboard." msgid "Copy to clipboard" msgstr "Kopiuj do schowka." #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Kopiuj tekst do schowka." #: profile.c:944 msgid "Paste the text" msgstr "Wklej" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Zaznacz cały tekst w oknie terminala." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Kopiuj tekst do schowka." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Wklej tekst ze schowka." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Powiększ rozmiar czcionki" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Powiększ rozmiar czcionki w bieżącej karcie." #: profile.c:960 msgid "Decrease font size" msgstr "Zmniejsz rozmiar czcionki" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Zmniejsz rozmiar czcionki w bieżącej karcie." #: profile.c:964 msgid "Reset font size" msgstr "Zresetuj rozmiar czcionki" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Zresetuj czcionkę do oryginalnego rozmiaru w bieżącej karcie." #: profile.c:968 msgid "Maximize the window" msgstr "Maksymalizuj okno" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Spróbuj zmaksymalizować okno aby zajmowało całe dostępne miejsce na twoim " "ekranie." #: profile.c:972 msgid "Full screen" msgstr "Pełny ekran" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Zmienia stan okna aby zajmowało pełny ekran." #: profile.c:976 msgid "Scroll up" msgstr "Przewiń w górę" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Wywołuje zdarzenie przewijania w górę w terminalu." #: profile.c:980 msgid "Scroll down" msgstr "Przewiń w dół" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Wywołuje zdarzenie przewijania w dół w terminalu." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Przewiń o 1 linię w górę" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Przewija terminal o jedną linię w górę." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Przewiń o 1 linię w dół" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Przewija terminal o jedną linię w dół." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Wyczyść historię scrollback" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Zrzuć informacje do debugowania" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Lilyterm zrzuca informacje potrzebne do debugowania." #: profile.c:1033 msgid "Window Title" msgstr "Tytuł okna" #: profile.c:1034 msgid "Running Command" msgstr "Wykonywany program" #: profile.c:1035 msgid "Current Dir" msgstr "Bieżący katalog" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Własna nazwa karty" #: profile.c:1037 msgid "Root Privileges" msgstr "Prawa Roota" #: profile.c:1038 msgid "Normal Text" msgstr "Zwyczajny tekst" #: profile.c:1072 msgid "Shift" msgstr "Shift" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Tło" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Zmień kolor pierwszego planu" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Wskazany plik nie istnieje" #: profile.c:2996 msgid "The target file is a directory" msgstr "Wskazany plik jest katalogiem" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Błąd podczas zapisywania profilu '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Błąd podczas zapisywania profilu" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Któreś ustawienie profilu zostało dodane, usunięte lub zmienione.\n" "Użyj opcji [Zapisz ustawienia] dostępnej w menu prawego klawisza aby zapisać " "swoje ustawienia,\n" "i jeśli to konieczne edytuj je ręcznie.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Twój profil to %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Format twoich ustawień profilu jest nieaktualny" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Profil \"%s\" jest nieprawidłowy:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Profil jest nieprawidłowy!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tOkno #%d, Karta #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tKarta #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Profil domyślny systemowy" #~ msgid "Join and paste" #~ msgstr "Złącz i wklej" #~ msgid "%s (Main site)" #~ msgstr "%s (Strona główna)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (Strona w języku chińskim)" #~ msgid "%s (Github site)" #~ msgstr "%s (Strona Githuba)" #~ msgid "Your %s profile is: " #~ msgstr "Twój profil, z którego korzysta %s to: " #, fuzzy #~| msgid "Please report bug to %s. Thank you for using %s!" #~ msgid "Thank you for using %s!\n" #~ msgstr "Proszę raportować błędy do %s. Dziękuję za używanie %s!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tDomyślne zachowanie terminala Vte, wklej tekst z " #~ "pierwszego schowka.\n" #~ msgid "Shortcut Key" #~ msgstr "Skrót klawiszowy" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "Czy chcesz kontynuować?" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Proszę raportować błędy do %s. Dziękuję za używanie %s!" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "" #~ "%s jest emulatorem terminala opartym o libvte.\n" #~ "\n" #~ msgid "Set function key value" #~ msgstr "Ustaw przypisanie klawiszy" #, fuzzy #~| msgid "Paste the text" #~ msgid "Paste to every vte" #~ msgstr "Wklej" po/pt_BR.po000066400000000000000000001211141246562641500130550ustar00rootroot00000000000000# Brazilian Portuguese translation of LilyTerm. # Copyright (C) 2014 Lu, Chao-Ming (Tetralet) # This file is distributed under the same license as the LilyTerm package. # Rafael Ferreira , 2012, 2013, 2014 # msgid "" msgstr "" "Project-Id-Version: LilyTerm\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2014-12-03 00:44-0300\n" "Last-Translator: Rafael Ferreira \n" "Language-Team: \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 1.6.11\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Favor relatar bugs em <%s>.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Obrigado por usar o %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s é um emulador de terminal X baseado em libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Use -T/--title {título} para especificar o título da janela.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Use -T/--title {título} para especificar o título da janela.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "Use -t/--tab {número} para abrir múltiplas abas ao iniciar.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" "Use -n/--tab_names {nomes de abas} para especificar nomes de abas, separados " "por .\n" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Use -d/--directory {diretório} para especificar o diretório de inicialização " "ao iniciar.\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Use -g/--geometry {LARGURAxALTURA[+-]POSIÇÃOX[+-]POSIÇÃOY} para especificar " "a geometria.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "" "Use -l/-s/--login para fazer com que o shell invocada ser um shell de " "login.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "Use -ut para desabilitar gravação da sessão no lastlog, utmp e wtmp.\n" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" "Use -H/--hold para manter a janela de terminal aberta quando o comando -e/x " "terminar.\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Use -s/--separate para executar em um processo separado.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" "Use -j/--join para integrar novas abas recém-criadas à última janela " "acessada.\n" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "Use -p/--profile para adquirir um perfil exemplificativo.\n" #: console.c:155 #, c-format msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "Use -u/--user_profile {%s} para usar um perfil especificado.\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Use -v/--version para mostrar a versão.\n" #: console.c:157 msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Use -e/-x/--execute {comando} para executar um comando. (deve ser a última " "opção).\n" "\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "O arquivo de configuração de sistema do %s é: %s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "E seu perfil de %s é: " #: console.c:224 msgid "Default key binding:" msgstr "Teclas de atalho padrão:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Desabilitar/habilitar hyperlinks, teclas de função e " "menu." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr " * Adicionar uma nova aba com diretório atual.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Mudar para a aba anterior/posterior.\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Mudar para a primeira/última aba.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> Mover a aba atual para frente/para trás.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr " * Mover a aba atual para primeira/última.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Mudar para 1ª ~ 12ª aba.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter> Aumentar/diminuir/reiniciar o tamanho da fonte da " "aba atual.\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Emular um evento de rolagem para cima/para baixo de " "mouse no terminal.\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Pede que haja rolagem para cima/para baixo uma linha " "no terminal.\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Comportamento padrão Gtk+, rolar para cima/rolar " "para baixo no terminal.\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Comportamento padrão do Gtk+, rolar o terminal para " "topo/base.\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Alternar entre estado de janela maximizada, ou não, " "e tela cheia, ou não.\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Pesquisar texto na janela do terminal.\n" " Use / para pesquisar seguinte/" "anterior.\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr "" " * Selecionar todo o texto das telas do terminal.\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * Copiar o texto para / Colar o texto na área de " "transferência.\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * Copiar o texto para / Colar o texto na área de " "transferência primária.\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (ex: Emular o clique de um botão do meio do mouse " "para copiar/colar o texto)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" "Algumas teclas de atalho que estão desabilitadas por padrão, mas podem ser " "úteis:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * Tentar fechar a aba atual.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (É recomendado o uso de ou 'exit' para " "fechar as abas)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr " * Abrir uma nova janela no diretório atual.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Renomear a aba atual.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "DICA: Essas teclas de atalho podem ser personalizadas ou desabilitadas no " "menu de botão direito [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Definir teclas de atalho" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "O seguinte erro ocorreu:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Renomear esta aba" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Favor inserir o nome do título desta aba:" #: dialog.c:211 msgid "Label Name:" msgstr "Nome da aba:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Pesquisar palavra" #: dialog.c:235 msgid "Find: " msgstr "Pesquisar: " #: dialog.c:258 msgid "Find previous string" msgstr "Pesquisar string anterior" #: dialog.c:264 msgid "Find next string" msgstr "Pesquisar string seguinte" #: dialog.c:275 msgid "Case sensitive" msgstr "Difer. maiúsc/minúsc." #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Usar expressões regulares compatíveis com Perl" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Colar textos em todos terminais Vte" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Favor inserir os textos que serão colados nos terminais Vte:" #: dialog.c:343 msgid "Text:" msgstr "Texto:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Acrescentar uma ao fim do texto." #: dialog.c:388 msgid "Grab keys" msgstr "Adquire teclas" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Colar as teclas adquiridas nos terminais Vte.\n" "Será útil se você quiser colar teclas cominadas, como ." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Valor da tecla:" #: dialog.c:423 msgid "Entry" msgstr "Registro" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Adicionar novas localizações e definir a padrão" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "A localização padrão usado ao iniciar um terminal Vte.\n" "Você pode usar \"pt_BR\" (ISO-8859-1) ou \"pt_BR.UTF-8\" aqui." #: dialog.c:451 msgid "Default locale:" msgstr "Localização padrão:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "A lista de localizações no menu de botão direito, separado com .\n" "Você pode usar \"pt_BR\" (ISO-8859-1) ou \"pt_BR.UTF-8\" aqui.\n" "Você provavelmente vai querer \"UTF-8\" aqui se não tiver localizações " "instalados." #: dialog.c:463 msgid "Locales list:" msgstr "Lista de localizações:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Alterar a saturação do plano de fundo" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Alterar a saturação do plano de fundo:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Alterar a cor do texto no terminal" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Alterar a cor de fundo do terminal" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Alterar a cor do cursor no terminal" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, c-format msgid "Change the ansi color [%s] in terminal" msgstr "Alterar a cor ansi [%s] no terminal" #: dialog.c:617 msgid "The brightness of ANSI colors:" msgstr "O brilho das cores ANSI:" #: dialog.c:633 msgid "ANSI Colors:" msgstr "Cores ANSI:" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Inverter cores" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Alterar a cor do %s na aba" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Negritar texto de demonstração" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Confirmar para fechar múltiplas abas" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Você fechará múltiplas abas. Continuar mesmo assim?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "aquelas abas" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Você pode pressionar + aqui\n" "para adquirir o valor da tecla usada para o atalho de teclado." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Adquire o valor da tecla para tecla de função" #: dialog.c:922 msgid "Function Key Name" msgstr "Noma da tecla de função" #: dialog.c:926 msgid "Key Bindings" msgstr "Tecla de atalhos" #: dialog.c:934 msgid "Key Group: " msgstr "Grupo de teclas: " #: dialog.c:944 msgid "Note: " msgstr "Nota: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Desabilitar todas as teclas de função." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Uso para %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "" "Não se esqueça de salvar as suas configurações após qualquer alteração!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Uso" #: dialog.c:1031 msgid "Key binding" msgstr "Teclas de atalho" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "Copyright (c) %s-%s %s. Todos direitos reservados.\n" "\n" "O %s é um software livre; você pode redistribuí-lo e/ou modificá-lo\n" "sob os termos da Licença Pública Geral GNU (GNU GPL) como publicada\n" "pela Free Software Foundation; tanto a versão 3 da Licença ou (a sua\n" "escolha) qualquer versão posterior.\n" "\n" "O %s é distribuído na esperança de que será útil, mas SEM QUALQUER\n" "GARANTIA; até mesmo sem a garantia implícita de COMERCIALIZAÇÃO ou\n" "ADEQUAÇÃO A UM PROPÓSITO EM PARTICULAR. Veja a Licença\n" "Pública Geral GNU (GNU GPL) para mais detalhes.\n" "\n" "Você deve ter recebido uma cópia da Licença Pública Geral GNU (GPL)\n" "junto com o %s; se não, veja ." #: dialog.c:1052 msgid "License" msgstr "Licença" #: dialog.c:1067 msgid "Translators" msgstr "Tradutores" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "Site: %s" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "Github: %s" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "Blog: %s" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "Wiki: %s" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "Falhas: %s" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "Sobre" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "Ainda há um programa em primeiro plano em execução na aba #%d:" #: dialog.c:1103 #, c-format msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" "Terminá-lo usando \"kill -9 %d\" é recomendado, se não estiver respondendo." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Continuar mesmo assim?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Dica:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "" "Confirmar para fechar programa fechar programa em primeiro plano em execução" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "esta aba" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Alterar a opacidade da janela" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Alterar a opacidade da janela:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Alterar a opacidade da janela quando inativa" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Alterar a opacidade da janela com inativa:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Ajustar o brilho das cores ANSI usadas no terminal" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Ajustar o brilho das cores ANSI quando inativo" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr "está tentando executar o seguinte comando:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Confirmar para executar o comando -e/-x/--execute" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "Os seguintes programas ainda estão em execução na aba #%d:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "É recomendado o uso de ou \"Sair\" para fechar abas" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Confirmar para fechar uma aba com processo filho" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "Os seguintes programas ainda estão em execução nesta janela:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Confirmar para fechar uma janela com processo filho" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Confirmar para fechar %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "Os seguintes programas ainda estão em execução sob %s:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Tentando colar os seguintes textos no terminal Vte:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Confirmar para colar textos no terminal Vte" #: dialog.c:1408 msgid "Join" msgstr "Juntar" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "Remover '' no texto" #: dialog.c:1421 msgid "Strip" msgstr "Dividir" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" "Remover '', \"\\\", e \"\\<\" no texto, então " "juntar '' e '' em um único ''" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Tente matar %s com SIGKILL() para que se evite terminar aqueles programas!\n" "(PODE CAUSAR PERDA DE DADOS!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Forçar fechar todas as abas e janelas, e sair %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Desabilitado, duplicado de [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Desabilitado)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Não parece haver suporte à localização \"%s\" no seu sistema!\n" "Se você recentemente adicionar os dados desta localização,\n" "por favor feche todas as janelas do %s e tente novamente." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Localização sem suporte!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Você deveria atualizar o %s e recompilar o %s para ter suporte a este " "recurso." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Recurso sem suporte!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Desabilitar todas as teclas de funções do grupo [%s]." #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Os dados adquiridos do socket parecem estar incorretos.\n" "\n" "\tVersão do socket recebida: %s\n" "\tVersão do socket esperada: %s\n" "\n" "Se você atualizou o %s recentemente,\n" "Feche todas as janelas do %s e tente novamente." #: main.c:665 msgid "The format of socket data is out of date" msgstr "O formato dos dados do socket está desatualizado" #: menu.c:59 msgid "Change text encoding" msgstr "Alterar codificação do texto" #: menu.c:60 msgid "New tab" msgstr "Nova aba" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nova aba com localização especificada" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Nova janela com perfil especificado" #: menu.c:80 msgid "Change the font" msgstr "Alterar a fonte" #: menu.c:87 msgid "Change colors" msgstr "Alterar cores" #: menu.c:90 msgid "Change the cursor color" msgstr "Alterar a cor do cursor" #: menu.c:94 msgid "Change the foreground color" msgstr "Alterar a cor do texto" #: menu.c:99 msgid "Change the ANSI colors" msgstr "Alterar as cores ANSI" #: menu.c:104 msgid "Change the background color" msgstr "Alterar a cor do fundo" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Alterar o brilho das cores ANSI" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Ajustar o brilho quando inativo" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Alterar tema de cores ANSI" #: menu.c:148 msgid "Background" msgstr "Plano de fundo" #: menu.c:154 msgid "Transparent window" msgstr "Janela transparente" #: menu.c:159 msgid "Window opacity" msgstr "Opacidade da janela" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Opacidade da janela quando inativo" #: menu.c:172 msgid "Transparent background" msgstr "Plano de fundo transparente" #: menu.c:175 msgid "Background saturation" msgstr "Saturação do plano de fundo" #: menu.c:179 msgid "Set background image" msgstr "Definir a imagem do plano de fundo" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Área de transferência" #: menu.c:196 msgid "Copy URL" msgstr "Copiar URL" #: menu.c:201 msgid "Copy" msgstr "Copiar" #: menu.c:205 msgid "Paste" msgstr "Colar" #: menu.c:212 msgid "View clipboard" msgstr "Ver área de transferência" #: menu.c:216 msgid "View primary clipboard" msgstr "Ver área de transferência primária" #: menu.c:227 msgid "Scrollback lines" msgstr "Linhas de rolagem para trás" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Limpar linhas de rolagem para trás" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Miscelânea" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Colar em todos terminais Vte" #: menu.c:247 msgid "Launch file manager" msgstr "Iniciar o gerenciador de arquivos" #: menu.c:252 msgid "View page info" msgstr "Ver informação da página" #: menu.c:260 msgid "Erase Binding" msgstr "Tecla de remoção" #: menu.c:275 msgid "Cursor Shape" msgstr "Formato do Cursor" #: menu.c:292 msgid "Dim text when inactive" msgstr "Esmaecer texto quando inativo" #: menu.c:297 msgid "Dim window when inactive" msgstr "Esmaecer janela quando inativo" #: menu.c:302 msgid "Cursor blinks" msgstr "Piscar cursor" #: menu.c:306 msgid "Allow bold text" msgstr "Permitir texto em negrito" #: menu.c:313 msgid "Need pressed to open URL" msgstr "Precisar pressionad para abrir URL" #: menu.c:316 msgid "Disable URL when pressed" msgstr "Desabilitar URL quando pressionado" #: menu.c:323 msgid "Audible bell" msgstr "Sino audível" #: menu.c:327 msgid "Visible bell" msgstr "Sino visível" #: menu.c:332 msgid "Urgent bell" msgstr "Sino urgente" #: menu.c:342 msgid "Switch input methods" msgstr "Alterar métodos de entrada" #: menu.c:361 msgid "Show the tabs bar" msgstr "Mostrar a barra de abas" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Ocultar a barra de abas" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Sempre mostrar a barra de abas" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Sempre ocultar a barra de abas" #: menu.c:391 msgid "Increase window size" msgstr "Aumentar tamanho da janela" #: menu.c:394 msgid "Decrease window size" msgstr "Diminuir tamanho de janela" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Reiniciar para fonte/tamanho personalizadas" #: menu.c:404 msgid "Reset to system font/size" msgstr "Reiniciar para fonte/tamanho do sistema" #: menu.c:409 msgid "Reset the content" msgstr "Reiniciar o conteúdo" #: menu.c:424 msgid "User profile" msgstr "Perfil do usuário" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Sair do %s" #: menu.c:502 msgid "grayscale" msgstr "Tons de cinza" #: menu.c:505 msgid "(build-in)" msgstr "(embarcado)" #: menu.c:518 #, c-format msgid "%s + custom" msgstr "%s + personalizado" #: menu.c:655 msgid "View current page information" msgstr "Ver informação da página atual" #: menu.c:1099 msgid " (Wide)" msgstr " (Wide)" #: menu.c:1554 msgid "Font Selection" msgstr "Seleção de fonte" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Adicionar outros locales..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Outras configurações..." #: menu.c:1963 msgid "Save settings automatically" msgstr "Salvar configurações automaticamente" #: menu.c:1968 msgid "Save settings" msgstr "Salvar configurações" #: menu.c:1971 msgid "Save settings as..." msgstr "Salvar configurações como..." #: menu.c:1977 msgid "Reload settings" msgstr "Recarregar configurações" #: menu.c:2012 #, c-format msgid "%s default" msgstr "Padrão do %s" #: menu.c:2034 msgid "System default" msgstr "Padrão do sistema" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "As seguintes configurações:\n" "\n" "%s\n" "NÃO podem ser aplicadas as telas de terminal da janela atual.\n" "Favor use [%s] ao invés." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "As seguintes configurações podem NÃO ser aplicadas" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Desabilitar: Tentando usar [Plano de fundo transparente], ao invés." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Rolar a imagem de plano de fundo junto com o texto" #: menu.c:2719 msgid "Open File" msgstr "Abrir arquivo" #: menu.c:2721 msgid "Save File" msgstr "Salvar arquivo" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "O seguinte erro ocorreu: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Erro enquanto criava o processo filho:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Erro enquanto criava o processo filho!\n" "Favor tenha certeza que /dev/pts está montado como arquivo de sistema devpts!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Erro enquanto criava o processo filho" #: profile.c:854 msgid "Tab operation" msgstr "Operação de aba" #: profile.c:855 msgid "Switch tab" msgstr "Mudar aba" #: profile.c:856 msgid "Move tab" msgstr "Mover aba" #: profile.c:857 msgid "Switch to #? tab" msgstr "Mudar para a aba #?" #: profile.c:858 msgid "Text operation" msgstr "Operação de texto" #: profile.c:859 msgid "Scroll up/down" msgstr "Rolar para cima/baixo" #: profile.c:860 msgid "Font" msgstr "Fonte" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Desabilitar/habilitar funções" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Desabilitar/habilitar hyperlinks, teclas de funções e menu de botão direito." #: profile.c:869 msgid "Add new tab" msgstr "Adicionar nova aba" #: profile.c:871 msgid "Add a new tab." msgstr "Adicionar uma nova aba." #: profile.c:873 msgid "Close tab" msgstr "Fechar aba" #: profile.c:875 msgid "Close current tab." msgstr "Fechar a aba atual." #: profile.c:877 msgid "Rename page name" msgstr "Renomear página" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Renomear a página da aba atual." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Pesquisar as palavras que correspondam com a expressão regular." #: profile.c:884 msgid "Find previous" msgstr "Pesquisar anterior" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "" "Pesquisar as palavras anteriores que correspondam com a expressão regular." #: profile.c:887 msgid "Find next" msgstr "Pesquisar seguinte" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "" "Pesquisar as palavras seguintes que correspondam com a expressão regular." #: profile.c:891 msgid "Switch to prev tab" msgstr "Mudar para aba anterior" #: profile.c:893 msgid "Switch to prev tab." msgstr "Mudar para aba anterior." #: profile.c:895 msgid "Switch to next tab" msgstr "Mudar para aba seguinte" #: profile.c:897 msgid "Switch to next tab." msgstr "Mudar para aba seguinte." #: profile.c:899 msgid "Switch to first tab" msgstr "Mudar para primeira aba" #: profile.c:901 msgid "Switch to first tab." msgstr "Mudar para primeira aba." #: profile.c:903 msgid "Switch to last tab" msgstr "Mudar para última aba" #: profile.c:905 msgid "Switch to last tab." msgstr "Mudar para última aba." #: profile.c:907 msgid "Move page forward" msgstr "Mover página para frente" #: profile.c:909 msgid "Move current page forward." msgstr "Mover página atual para frente." #: profile.c:911 msgid "Move page backward" msgstr "Mover página para trás" #: profile.c:913 msgid "Move current page backward." msgstr "Mover página atual para trás." #: profile.c:915 msgid "Move page to first" msgstr "Mover página para o início" #: profile.c:917 msgid "Move current page to first." msgstr "Mover página atual para o início." #: profile.c:919 msgid "Move page to last" msgstr "Mover página para o final" #: profile.c:921 msgid "Move current page to last." msgstr "Mover página atual para o final." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Mudar para aba #%d" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Mudar para aba #%d diretamente." #: profile.c:932 msgid "New window" msgstr "Nova janela" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Abrir uma nova janela com o diretório atual." #: profile.c:936 msgid "Select all" msgstr "Selecionar tudo" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Selecionar todo o texto no Terminal Vte." #: profile.c:940 msgid "Copy to clipboard" msgstr "Copiar para a área de transferência" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Copiar o texto para a área de transferência." #: profile.c:944 msgid "Paste the text" msgstr "Colar o texto" #: profile.c:946 msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Cole o text da área de transferência na caixa de terminal Vte." #: profile.c:948 msgid "Copy the text to primary clipboard" msgstr "Copiar o texto para a área de transferência primária" #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" "Copia o texto para a área de trasferência primária.\n" "Normalmente ele já é copiado para a área de trasferência\n" "primária quando você selecionada algum texto com o mouse." #: profile.c:952 msgid "Paste the text in primary clipboard" msgstr "Colar o texto na área de transferência primária" #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" "Cola o texto da área de trasferência primária para a caixa de terminal Vte.\n" "O atalho de teclado padrão é no libvte, se você desabilitou-" "o aqui." #: profile.c:956 msgid "Increase font size" msgstr "Aumentar o tamanho da fonte" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Aumentar o tamanho da fonte da aba atual." #: profile.c:960 msgid "Decrease font size" msgstr "Diminuir o tamanho da fonte" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Diminuir o tamanho da fonte da aba atual." #: profile.c:964 msgid "Reset font size" msgstr "Reiniciar o tamanho da fonte" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Reiniciar a fonte da aba atual para o tamanho original." #: profile.c:968 msgid "Maximize the window" msgstr "Maximizar janela" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Tentar maximizar a janela para usar todo o espaço disponível no seu visor." #: profile.c:972 msgid "Full screen" msgstr "Tela cheia" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Fazer com que o estado da janela mude de tela cheia/não tela cheia." #: profile.c:976 msgid "Scroll up" msgstr "Rolar para cima" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Emular o evento do mouse de rolagem para cima no Terminal Vte." #: profile.c:980 msgid "Scroll down" msgstr "Rolar para baixo" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Emular o evento do mouse de rolagem para baixo no Terminal Vte." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Rolar para cima 1 linha" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Fazer rolar para cima 1 linha na janela do Terminal Vte." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Rolar para baixo 1 linha" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Fazer rolar para baixo 1 linha na janela do Terminal Vte." #: profile.c:994 msgid "Asks to clean scrollback lines." msgstr "Solicita a limpeza das linhas de rolagem para trás." #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Despejar dados de depuração de execução" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Despejar dados de execução do LilyTerm para depuração." #: profile.c:1033 msgid "Window Title" msgstr "Título da janela" #: profile.c:1034 msgid "Running Command" msgstr "Comando em execução" #: profile.c:1035 msgid "Current Dir" msgstr "Diretório atual" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Nome personalizado de aba" #: profile.c:1037 msgid "Root Privileges" msgstr "Privilégios de root" #: profile.c:1038 msgid "Normal Text" msgstr "Texto normal" #: profile.c:1072 msgid "Shift" msgstr "Shift" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 msgid "Background Color" msgstr "Cor do fundo" #: profile.c:1133 msgid "Dark Red" msgstr "Vermelho escuro" #: profile.c:1134 msgid "Dark Green" msgstr "Verde escuro" #: profile.c:1135 msgid "Dark Yellow" msgstr "Amarelo escuro" #: profile.c:1136 msgid "Dark Blue" msgstr "Azul escuro" #: profile.c:1137 msgid "Dark Magenta" msgstr "Magenta escuro" #: profile.c:1138 msgid "Dark Cyan" msgstr "Ciano escuro" #: profile.c:1139 msgid "Dark White" msgstr "Cinza claro" #: profile.c:1140 msgid "Bright Black" msgstr "Cinza escuro" #: profile.c:1141 msgid "Bright Red" msgstr "Vermelho escuro" #: profile.c:1142 msgid "Bright Green" msgstr "Verde claro" #: profile.c:1143 msgid "Bright Yellow" msgstr "Amarelo claro" #: profile.c:1144 msgid "Bright Blue" msgstr "Azul claro" #: profile.c:1145 msgid "Bright Magenta" msgstr "Magenta claro" #: profile.c:1146 msgid "Bright Cyan" msgstr "Ciano claro" #: profile.c:1147 msgid "Foreground Color" msgstr "Cor do texto" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "O arquivo alvo NÃO existe" #: profile.c:2996 msgid "The target file is a directory" msgstr "O arquivo alvo é um diretório" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Erro na escrita do perfil \"%s\":" #: profile.c:3049 msgid "Error when writing profile" msgstr "Erro na escrita do perfil" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Alguns registros de perfil foram adicionados, removidos ou alterados nesta " "versão.\n" "Favor tente [Salvar configurações] no menu de botão direito para salvar suas " "configurações,\n" "e edite-as manualmente, se necessário.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Seu perfil é %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "O formato do seu perfil está desatualizado" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "O perfil \"%s\" é inválido:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "O perfil é inválido!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tJanela #%d, Página #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tPágina #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Padrão do sistema (PERFIL)" #~ msgid "Join and paste" #~ msgstr "Juntar e colar" #~ msgid "%s (Main site)" #~ msgstr "%s (site principal)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (site em Chinês Tradicional)" #~ msgid "%s (Github site)" #~ msgstr "%s (site Github)" #~ msgid "Your %s profile is: " #~ msgstr "Seu perfil de %s: " po/ru.po000066400000000000000000001432511246562641500125030ustar00rootroot00000000000000# Russian translation of LilyTerm. # Copyright (C) 2010 Vladimir Smolyar # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-05-22 17:20+0300\n" "Last-Translator: Vladimir Smolyar \n" "Language-Team: Russian\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Russian\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Пожалуйста, сообщайте об ошибках на <%s>.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Благодарим за использование %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s - это эмулятор терминала, основанный на libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Используйте -T/--title {заголовок} для указания заголовка окна.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Используйте -T/--title {заголовок} для указания заголовка окна.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "" "Используйте -t/--tab {количество} для открытия нескольких вкладок при " "запуске программы.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Используйте -d/--directory {каталог} для указания начального каталога при " "запуске.\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Используйте -g/--geometry {ШИРИНАxВЫСОТА[+-]ГОР.СМЕЩЕНИЕ[+-]ВЕРТ.СМЕЩЕНИЕ} " "для указания геометрии окна.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "" "Используйте -l/-ls/--login для открытия оболочки входа в систему (ввода " "логина).\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" "Используйте -H/--hold для удержания окна терминала открытым после выполнения " "команды по -e/-x .\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Используйте -s/--separate для запуска отдельного процесса.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "Используйте -p/--profile для получения образца профиля.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Используйте -u/--user_profile {%s} для выбора определённого профиля.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "" "Используйте -v/--version для отображения информации о версии программы.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command. (Must be the final " #| "option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Используйте -e/-x/--execute {команда} для выполнения команды при запуске " "программы.\n" "(Должно быть последним параметром).\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "Общесистемная конфигурация %s: %s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "Ваш профиль %s:" #: console.c:224 msgid "Default key binding:" msgstr "Комбинация клавиш по умолчанию:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Запретить/Разрешить гиперссылки, сочетания клавиш и " "меню правой кнопки мыши." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr " * Добавить новую вкладку в текущем каталоге.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Перейти на предыдущую/следующую вкладку.\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Перейти на первую/последнюю вкладку.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> Преместить текущую вкладку вперёд/назад.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr " * Переместить текущую вкладку в начало/конец.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Перейти на 1ю - 12ю вкладку.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter> Увеличить/уменьшить/сбросить размер шрифта в текущей " "вкладке.\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Эмулировать прокрутку мыши вверх/вниз в терминале.\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Запрашивает прокрутку вверх/вниз на 1 строку в " "терминале.\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Поведение Gtk+ по умолчанию, прокрутка вверх/вниз в " "терминале.\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Поведение Gtk+ по умолчанию, прокрутка в начало/" "конец.\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Развернуть/свернуть окно и переключение " "полноэкранного режима.\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Поиск текста в терминале.\n" " / - поиск Вперёд/Назад.\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr " * Выделить весь текст в терминалt.\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * Скопировать текст в буфер обмена / Вставить текст из " "буфера обмена.\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * Скопировать текст в главный буфер обмена / Вставить " "текст из главного буфера обмена.\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (т.е. эмулировать нажатие средней клавиши мыши для " "вставки текста)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "Некоторые полезные сочетания клавиш, отключённые по умолчанию:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * Закрыть текущую вкладку.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (Рекомендуется закрывать вкладки при помощи " " или команды 'exit')\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr " * Открыть новое окно с текущим каталогом.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Переименовать текущую вкладку.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Подсказка: Это сочетания клавиш можно выбрать или отключить в контекстном " "меню [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Установить сочетание клавиш" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "Возникла следующая ошибка:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Переименование текущей вкладки" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Пожалуйста, введите название для этой вкладки:" #: dialog.c:211 msgid "Label Name:" msgstr "Название:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Найти строку" #: dialog.c:235 msgid "Find: " msgstr "Найти:" #: dialog.c:258 msgid "Find previous string" msgstr "Найти предыдущую строку" #: dialog.c:264 msgid "Find next string" msgstr "Найти следующую строку" #: dialog.c:275 msgid "Case sensitive" msgstr "С учётом регистра" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Использовать регулярные выражения Perl" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Вставить текст во все терминалы Vte" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Пожалуйста, введите текст для вставки в терминалы Vte:" #: dialog.c:343 msgid "Text:" msgstr "Текст:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Добавить перевод строки в конец текста." #: dialog.c:388 msgid "Grab keys" msgstr "Захватить клавиши" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Вставить захваченную клавишу в терминалы Vte.\n" "Это полезно, когда вы хотите вставить комбинацию клавиш, как ." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr " Значение сочетания клавиш: " #: dialog.c:423 msgid "Entry" msgstr "Содержимое" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Добавление новых локализаций и установка локализации по умолчанию" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "Локализация, используемая по умолчанию при инициализации терминала Vte.\n" "Например, можно использовать \"ru_RU\", \"ru_RU.KOI8-R\" или \"ru_RU.UTF-8\"." #: dialog.c:451 msgid "Default locale:" msgstr "Локализация по умолчанию:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Список локализаций в меню правой кнопки мыши, разделённых пробелами.\n" "Например, можно использовать \"ru_RU\", \"ru_RU.KOI8-R\", или \"ru_RU." "UTF-8\".\n" "Если данные о локализациях не установлены, можно использовать \"UTF-8\"." #: dialog.c:463 msgid "Locales list:" msgstr "Список локализаций:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Изменить насыщенность фона" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Изменить насыщенность фона:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Изменить цвет текста в терминале" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Изменить цвет фона терминала" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Изменить цвет курсора в терминале" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the cursor color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Изменить цвет курсора в терминале" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Настроить яркость ANSI цветов" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Инвертировать цвета" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Изменить цвет %s на вкладке" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Жирный текст" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Подтверждение закрытия нескольких вкладок" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Вы собираетесь закрыть сразу несколько вкладок. Продолжать?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "эти вкладки" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Вы можете нажать + <клавиша> здесь,\n" "чтобы получить значение сочетания клавиш." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Получение значения сочетания клавиш" #: dialog.c:922 msgid "Function Key Name" msgstr "Имя комбинации клавиш" #: dialog.c:926 msgid "Key Bindings" msgstr "Комбинация клавиш" #: dialog.c:934 msgid "Key Group: " msgstr " Группа клавиш: " #: dialog.c:944 msgid "Note: " msgstr "Примечание: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Запретить все сочетания клавиш." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Использование для %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "Не забудьте сохранить настройки после изменения их!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Использование" #: dialog.c:1031 msgid "Key binding" msgstr "Комбинация клавиш" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "Copyright (c) %s-%s %s. Все права защищены.\n" "\n" "%s является свободным программным обеспечением; вы можете распространять\n" "её и/или изменять по условиям Универсальной общественной лицензии GNU в " "виде,\n" " опубликованном Фондом свободного программного обеспечения; как версии 3, " "так и (по вашему усмотрению) любой более поздней версии.\n" "%s распространяется в надежде, что она будет полезной, но БЕЗ КАКОЙ-ЛИБО\n" "ГАРАНТИИ; даже без подразумеваемой гарантии ТОВАРНОЙ ПРИГОДНОСТИ\n" "или СООТВЕТСТВИЯ КОНКРЕТНОМУ НАЗНАЧЕНИЮ. Для более детальной\n" "информации см. Универсальную общественную лицензию GNU.\n" "Вы должны были получить копию Универсальной общественной лицензии GNU\n" "вместе с %s; если нет, то посетите ." #: dialog.c:1052 msgid "License" msgstr "Лицензия" #: dialog.c:1067 msgid "Translators" msgstr "Переводчики" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Сайт программы:" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Вики: %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Блог: %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Вики: %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Ошибки: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "О программе" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "Во вкладке №%d всё ещё выполняется программа:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" "Рекомендуется прервать выполнение командой\n" "`kill -9 %d', если процесс не отвечает." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Всё равно продолжить?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Подсказка:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Подтверждение закрытия выполняющейся программы" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "эту вкладку" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Изменить прозрачность окна" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Изменить прозрачность окна:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Изменить прозрачность неактивного окна" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Изменить прозрачность неактивного окна:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Настроить яркость ANSI цветов терминале" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Настроить яркость ANSI цветов в неактивном состоянии" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " пытается выполнить следующую команду:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Подтверждение выполнения -e/-x/--execute команды" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "На вкладке №%d всё ещё работают следующие программы:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Рекомендуется закрывать вкладки при помощи или 'exit'" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Подтвердите закрытие вкладки с дочерним процессом" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "В этом окне всё ещё выполняются следующие команды:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Подтвердите закрытие окна с дочерними процессами" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Подтверждение закрытия %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "В %s всё ещё выполняются следующие программы:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Попытка вставить следующий текст в терминал Vte:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Подтвердите вставку текста в терминала Vte." #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Попробовать убить %s сигналом SIGKILL(), чтобы предотвратить\n" "прерывание этих программ!(МОЖЕТ ПРИВЕСТИ К ПОТЕРЕ ДАННЫХ!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Принудительно закрыть все вкладки и окна и выйти из %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Запрещено, совпадает с [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Запрещено)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Похоже, локализация \"%s\" НЕ поддерживается вашей системой!\n" "Если вы недавно обновили данные локализаций,\n" "пожалуйста, закройте все окна %s и попробуйте снова." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Неподдерживаемая локализация!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Вам необходимо обновить до %s и перекомпилировать %s, чтобы получить " "поддержку этой возможности." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Неподдерживаемая функция!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Запретить все сочетания клавиш группы [%s]." #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Данные, полученные из сокета, похоже, неверны.\n" "\n" "\tПолученная версия сокета: %s\n" "\tОжидаемая версия сокета: %s\n" "\n" "Если вы недавно обновили %s,\n" "пожалуйста, закройте все окна %s и попробуйте снова." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Формат данных сокета устарел" #: menu.c:59 msgid "Change text encoding" msgstr "Изменить кодировку текста" #: menu.c:60 msgid "New tab" msgstr "Новая вкладка" #: menu.c:61 msgid "New tab with specified locale" msgstr "Новая вкладка с указанной локализацией" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Новое окно с указанным профилем" #: menu.c:80 msgid "Change the font" msgstr "Изменить шрифт" #: menu.c:87 msgid "Change colors" msgstr "Изменить цвета" #: menu.c:90 msgid "Change the cursor color" msgstr "Изменить цвет курсора" #: menu.c:94 msgid "Change the foreground color" msgstr "Изменить цвет текста" #: menu.c:99 #, fuzzy #| msgid "Change the cursor color" msgid "Change the ANSI colors" msgstr "Изменить цвет курсора" #: menu.c:104 msgid "Change the background color" msgstr "Изменить цвет фона" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Настроить яркость ANSI цветов" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Настроить яркость в неактивном режиме" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Изменить схему цветов ANSI" #: menu.c:148 msgid "Background" msgstr "Фон" #: menu.c:154 msgid "Transparent window" msgstr "Прозрачное окно" #: menu.c:159 msgid "Window opacity" msgstr "Прозрачность окна" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Прозрачность неактивного окна" #: menu.c:172 msgid "Transparent background" msgstr "Прозрачный фон" #: menu.c:175 msgid "Background saturation" msgstr "Насыщенность фона" #: menu.c:179 msgid "Set background image" msgstr "Установить фоновый рисунок" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Буфер обмена" #: menu.c:196 msgid "Copy URL" msgstr "Скопировать URL" #: menu.c:201 msgid "Copy" msgstr "Копировать" #: menu.c:205 msgid "Paste" msgstr "Вставить" #: menu.c:212 msgid "View clipboard" msgstr "Просмотреть буфер обмена" #: menu.c:216 msgid "View primary clipboard" msgstr "Просмотреть основной буфер обмена" #: menu.c:227 msgid "Scrollback lines" msgstr "Обратная прокрутка строк" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Очистить строки обратной прокрутки" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Разное " #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Вставить во все Vte терминалы." #: menu.c:247 msgid "Launch file manager" msgstr "Запустить файловый менеджер" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Привязка для стирания" #: menu.c:275 msgid "Cursor Shape" msgstr "Форма курсора" #: menu.c:292 msgid "Dim text when inactive" msgstr "Потускнение текста в неактивном режиме" #: menu.c:297 msgid "Dim window when inactive" msgstr "Потускнение неактивного окна" #: menu.c:302 msgid "Cursor blinks" msgstr "Мигание курсора" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Звуковой сигнал" #: menu.c:327 msgid "Visible bell" msgstr "Визуальный сигнал" #: menu.c:332 msgid "Urgent bell" msgstr "Экстренный сигнал" #: menu.c:342 msgid "Switch input methods" msgstr "Переключение методов ввода" #: menu.c:361 msgid "Show the tabs bar" msgstr "Показать панель вкладок" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Спрятать панель вкладок" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Всегда показывать панель вкладок" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Всегда прятать панель вкладок" #: menu.c:391 msgid "Increase window size" msgstr "Увеличить размер окна" #: menu.c:394 msgid "Decrease window size" msgstr "Уменьшить размер окна" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Сбросить шрифт на пользовательский" #: menu.c:404 msgid "Reset to system font/size" msgstr "Сбросить шрифт на системный" #: menu.c:409 msgid "Reset the content" msgstr "Сбросить содержимое" #: menu.c:424 msgid "User profile" msgstr "Пользовательский профиль" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Выйти из %s" #: menu.c:502 msgid "grayscale" msgstr "градации серого" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Пользовательская" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Переместить текущую страницу вперёд." #: menu.c:1099 msgid " (Wide)" msgstr "(широкий)" #: menu.c:1554 msgid "Font Selection" msgstr "Выбор шрифта" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Добавить другие локализации..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Другие настройки..." #: menu.c:1963 msgid "Save settings automatically" msgstr "Автоматически сохранять настройки" #: menu.c:1968 msgid "Save settings" msgstr "Сохранить настройки" #: menu.c:1971 msgid "Save settings as..." msgstr "Сохранить настройки как..." #: menu.c:1977 msgid "Reload settings" msgstr "Перезагрузить настройки" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s по умолчанию" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Системная по умолчанию" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Следующие параметры:\n" "\n" "%s\n" "НЕ могут быть применены к терминалам в текущем окне\n" "Используйте вместо этого [%s]." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Следующие параметры НЕ могут быть применены" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Запрещено: Попробуйте использовать [Прозрачный фон] вместо этого." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Прокручивать фоновый рисунок вместе с текстом" #: menu.c:2719 msgid "Open File" msgstr "Открыть файл" #: menu.c:2721 msgid "Save File" msgstr "Сохранить файл" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "Возникла следующая ошибка: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Ошибка при создании дочернего процесса:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Ошибка создания дочернего процесса!\n" "Убедитесь, что /dev/pts подмонтирована как файловая система devpts!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Ошибка создания дочернего процесса" #: profile.c:854 msgid "Tab operation" msgstr "Управление вкладками " #: profile.c:855 msgid "Switch tab" msgstr "Переключение вкладок " #: profile.c:856 msgid "Move tab" msgstr "Перемещение вкладок " #: profile.c:857 msgid "Switch to #? tab" msgstr "Переход на ?-ю вкладку " #: profile.c:858 msgid "Text operation" msgstr "Операции с текстом " #: profile.c:859 msgid "Scroll up/down" msgstr "Прокрутка вверх/вниз " #: profile.c:860 msgid "Font" msgstr "Шрифт " #: profile.c:865 msgid "Disable/Enable functions" msgstr "Запретить/Разрешить функции" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Запретить/Разрешить гиперссылки, сочетания \n" "клавиш и меню правой кнопки мыши." #: profile.c:869 msgid "Add new tab" msgstr "Добавить новую вкладку" #: profile.c:871 msgid "Add a new tab." msgstr "Добавить новую вкладку." #: profile.c:873 msgid "Close tab" msgstr "Закрыть вкладку" #: profile.c:875 msgid "Close current tab." msgstr "Закрыть текущую вкладку." #: profile.c:877 msgid "Rename page name" msgstr "Переименовать страницу" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Изменить имя страницы для данной вкладки." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Найти строки по шаблону." #: profile.c:884 msgid "Find previous" msgstr "Найти предыдущее" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Найти предыдущую строку по шаблону поиска." #: profile.c:887 msgid "Find next" msgstr "Найти следующее" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Найти следующую строку по шаблону поиска." #: profile.c:891 msgid "Switch to prev tab" msgstr "Перейти на предыдущую вкладку" #: profile.c:893 msgid "Switch to prev tab." msgstr "Перейти на предыдущую вкладку." #: profile.c:895 msgid "Switch to next tab" msgstr "Перейти на следующую вкладку" #: profile.c:897 msgid "Switch to next tab." msgstr "Перейти на следующую вкладку." #: profile.c:899 msgid "Switch to first tab" msgstr "Перейти на первую вкладку" #: profile.c:901 msgid "Switch to first tab." msgstr "Перейти на первую вкладку." #: profile.c:903 msgid "Switch to last tab" msgstr "Перейти на последнюю вкладку" #: profile.c:905 msgid "Switch to last tab." msgstr "Перейти на последнюю вкладку." #: profile.c:907 msgid "Move page forward" msgstr "Переместить страницу вперёд" #: profile.c:909 msgid "Move current page forward." msgstr "Переместить текущую страницу вперёд." #: profile.c:911 msgid "Move page backward" msgstr "Переместить страницу назад" #: profile.c:913 msgid "Move current page backward." msgstr "Переместить текущую страницу назад." #: profile.c:915 msgid "Move page to first" msgstr "Сделать страницу первой" #: profile.c:917 msgid "Move current page to first." msgstr "Сделать текущую страницу первой." #: profile.c:919 msgid "Move page to last" msgstr "Сделать страницу последней" #: profile.c:921 msgid "Move current page to last." msgstr "Сделать текущую страницу последней." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Перейти на %d-ю вкладку" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Перейти прямо на %d-ю вкладку." #: profile.c:932 msgid "New window" msgstr "Новое окно" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Открыть новое окно для текущего каталога." #: profile.c:936 msgid "Select all" msgstr "Выбрать всё" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Выбрать весь текст в окне терминала Vte." #: profile.c:940 msgid "Copy to clipboard" msgstr "Скопировать в буфер обмена" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Скопировать текст в буфер обмена." #: profile.c:944 msgid "Paste the text" msgstr "Вставить текст" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Выбрать весь текст в окне терминала Vte." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Скопировать текст в буфер обмена." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Вставить текст из буфера обмена." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Увеличить размер шрифта" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Увеличить размер шрифта на текущей вкладке." #: profile.c:960 msgid "Decrease font size" msgstr "Уменьшить размер шрифта" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Уменьшить размер шрифта на текущей вкладке." #: profile.c:964 msgid "Reset font size" msgstr "Сбросить размер шрфита" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "" "Сбросить размер шрифта текущей вкладки\n" "к начальному значению." #: profile.c:968 msgid "Maximize the window" msgstr "Максимизировать окно" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Попробовать максимизировать окно для использования\n" "всего доступного пространства вашего экрана." #: profile.c:972 msgid "Full screen" msgstr "Полноэкранный режим" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Запросить перевод окна в полноэкранный/обычный режим" #: profile.c:976 msgid "Scroll up" msgstr "Прокрутка вверх" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "" "Эмулировать прокрутку мыши вверх\n" "в окне терминала Vte." #: profile.c:980 msgid "Scroll down" msgstr "Прокрутка вниз" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "" "Эмулировать прокрутку мыши вниз\n" "в окне терминала Vte." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Прокрутка вверх на 1 строку" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "" "Запрашивает прокрутку на 1 строку вверх\n" "в окне терминала Vte." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Прокрутка вниз на 1 строку" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "" "Запрашивает прокрутку вниз на 1 строку\n" "в окне терминала Vte." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Очистить строки обратной прокрутки" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Дамп данных отладки" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Дамп данных для отладки LilyTerm." #: profile.c:1033 msgid "Window Title" msgstr "заголовка окна" #: profile.c:1034 msgid "Running Command" msgstr "выполняющейся команды" #: profile.c:1035 msgid "Current Dir" msgstr "текущего каталога" #: profile.c:1036 msgid "Custom Tab Name" msgstr "пользовательского имени вкладки" #: profile.c:1037 msgid "Root Privileges" msgstr "привилегий администратора" #: profile.c:1038 msgid "Normal Text" msgstr "обычного текста" #: profile.c:1072 msgid "Shift" msgstr "Shift" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Фон" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Изменить цвет текста" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Файл назначения НЕ существует" #: profile.c:2996 msgid "The target file is a directory" msgstr "Файл назначения является каталогом" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Ошибка записи профиля '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Ошибка записи профиля" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "В этой версии добавлены, удалены или изменены некоторые параметры профиля.\n" "Пожалуйста, используйте [Сохранить настройки] в меню правой кнопки мыши, \n" "чтобы сохранить ваши настройки, и отредактируйте его вручную при " "необходимости.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Ваш профиль - %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Формат вашего профиля устарел" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Профиль \"%s\" неверен:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Профиль неверен!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tОкно №%d, Страница №%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tСтраница №%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Системный по умолчанию" #~ msgid "Join and paste" #~ msgstr "Объединить и вставить" #~ msgid "%s (Main site)" #~ msgstr "%s (главная страница)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (страница на традиционном китайском)" #~ msgid "%s (Github site)" #~ msgstr "%s (страница на Github)" #~ msgid "Your %s profile is: " #~ msgstr "Ваш профиль %s:" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Пожалуйста, сообщайте об ошибках на %s.\n" #~ "Благодарим за использование %s!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tПоведение Vte по умолчанию, вставить текст из " #~ "основного буфера обмена\n" #~ msgid "Shortcut Key" #~ msgstr "Сочетание клавиш" #~ msgid "Set function key value" #~ msgstr "Установить сочетания клавиш" po/sk.po000066400000000000000000001235131246562641500124710ustar00rootroot00000000000000# Slovak translations for lilyterm package # Slovenské preklady pre balík lilyterm. # Copyright (C) 2011 THE lilyterm'S COPYRIGHT HOLDER # This file is distributed under the same license as the lilyterm package. # Slavko , 2011, 2012. # msgid "" msgstr "" "Project-Id-Version: lilyterm 0.9.9~rc9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-05-22 15:03+0200\n" "Last-Translator: Slavko \n" "Language-Team: slovenčina \n" "Language: sk\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" "X-POFile-SpellExtra: Vte Blog kill UTF-8 soketu pts libvte SIGKILL devpts\n" "X-POFile-SpellExtra: title version tj ls Emulovať exit Perlom Github\n" "X-POFile-SpellExtra: License separate ŠÍRKAxVÝŠKA LilyTerm IRC Wiki\n" "X-POFile-SpellExtra: execute Foundation Ctrl geometry Win POSUNX General\n" "X-POFile-SpellExtra: behové kláv directory login skSK implikovanej Free\n" "X-POFile-SpellExtra: Očakáv userprofile GTK shellu\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Prosím, chyby hláste na <%s>.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Ďakujem, že používate %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s je emulátor terminálu pre X založený na libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Použite -T/--title {titulok} na nastavenie titulku okna.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Použite -T/--title {titulok} na nastavenie titulku okna.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "Použite -t/--tab {číslo} na otvorenie viacerých záložiek pri štarte.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Použite -d/--directory {adresár} na nastavenie počiatočného adresára pri " "štarte.\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Použite -g/--geometry {ŠÍRKAxVÝŠKA[+-]POSUNX[+-]POSUNY} na nastavenie " "geometrie.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "Použite -l/-ls/--login na spustenie ako prihlasovacieho shellu.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" "Použite -H/--hold na ponechanie okna otvoreného po prerušení -e/-x príkaz.\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Použite -s/--separate na spustenie v samostatnom procese.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "Použite -p/--profile na získanie vzorového profilu.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Použite -u/--user_profile {%s} na použitie zadaného profilu.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Použite -v/--version na zobrazenie informácií o verzii.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command. (Must be the final " #| "option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Použite -e/-x/--execute {Príkaz} na spustenie príkazu. (Musí byť ako " "posledná voľba).\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "Systémový konfiguračný súbor %s je: %s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "A váš %s profil je: " #: console.c:224 msgid "Default key binding:" msgstr "Predvolená skratka:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Zapnúť/Vypnúť hypertextové odkazy, funkčné klávesy a " "menu." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr " * Pridať novú záložku aktuálneho adresára.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Prepnúť na Predošlú/Ďalšiu záložku.\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Prepnúť na Prvú/Poslednú záložku.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> Presunúť aktuálnu záložku Dopredu/Dozadu.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr "" " * Presunúť aktuálnu záložku na Prvé/Posledné miesto.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Prepnúť na 1. – 12. záložku.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter> Zväčšiť/Zmenšiť/Obnoviť veľkosť písma aktuálnej " "záložky.\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Emulovať udalosti myši Rolovať hore/dole v " "termináli.\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Požiadať o Rolovanie hore/Dole o 1 riadok v " "termináli.\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Predvolené správanie GTK+, Rolovať hore/dole v " "termináli.\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Predvolené správanie GTK+, Rolovať terminál na " "Začiatok/Koniec.\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Prepnúť režimy celé/nie celé okno a celá/nie celá " "obrazovka.\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Nájsť text v okne Vte Terminálu.\n" " Použite / na ďalší/predošlý.\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr " * Vybrať všetok text v okne terminálu.\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr " * Kopírovať/Vvložiť text v schránke.\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr " * Kopírovať/Vložiť text v primárnej schránke.\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (tj. Emulovať stlačenie prostredného tlačidla myši " "na kopírovanie/vloženie)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "Niektoré klávesové skratky, predvolene vypnuté, ale možno užitočné:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * Skúsiť zatvoriť aktuálnu záložku.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (Na zatváranie záložiek je odporúčané použiť " " alebo „exit”)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr " * Otvoriť nové okno s aktuálnym adresárom.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Premenovať aktuálnu záložku.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "TIP: Tieto klávesové skratky môžete prispôsobiť alebo vypnúť pomocou " "kontextového menu [%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Nastaviť kláv. skratky" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "Nastala nasledujúca chyba:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Premenovať túto záložku" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Prosím zadajte menovku tejto záložky:" #: dialog.c:211 msgid "Label Name:" msgstr "Menovka:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Nájsť reťazec" #: dialog.c:235 msgid "Find: " msgstr "Nájsť:" #: dialog.c:258 msgid "Find previous string" msgstr "Nájsť predošlý" #: dialog.c:264 msgid "Find next string" msgstr "Nájsť ďalší" #: dialog.c:275 msgid "Case sensitive" msgstr "Rozlišovať veľkosť" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Použiť regulárne výrazy kompatibilné s Perlom" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Vložiť text do každého Vte Terminálu" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Prosím, zadajte text, ktorý bude vložený do terminálov Vte:" #: dialog.c:343 msgid "Text:" msgstr "Text:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Na koniec textu pridať ." #: dialog.c:388 msgid "Grab keys" msgstr "Zaznamenať klávesy" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Vloží zaznamenaný kláves do terminálov Vte.\n" "Využijete to, keď chcete vložiť kombináciu klávesov, napr. ." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Hodnota klávesa:" #: dialog.c:423 msgid "Entry" msgstr "Položka" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Pridať novú lokalizáciu a nastaviť ju ako predvolenú" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "Predvolená lokalizácia použitá pri inicializácii terminálu Vte.\n" "Môžete tu použiť „sk_SK” alebo „sk_SK.UTF-8”." #: dialog.c:451 msgid "Default locale:" msgstr "Predvolená lokalizácia:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Zoznam lokalizácií v kontextovom menu, oddeľujte pomocou .\n" "Môžete tu použiť „sk_SK” alebo „sk_SK.UTF-8”.\n" "Možno budete chcieť použiť „UTF-8”, ak nemáte nainštalované lokalizačné dáta." #: dialog.c:463 msgid "Locales list:" msgstr "Zoznam lokalizácií:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Zmeniť saturáciu pozadia" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Zmeniť saturáciu pozadia:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Zmeniť farbu písma v termináli" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Zmeniť farbu pozadia pozadia v termináli" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Zmeniť farbu kurzora v termináli" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the cursor color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Zmeniť farbu kurzora v termináli" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Prispôsobiť jas farieb ANSI" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Invertovať farbu" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Zmeniť farbu %s v záložke" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Tučný demo text" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Potvrdiť zatvorenie viacerých záložiek" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Zatvárate viaceré záložky. Pokračovať?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "tieto záložky" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Môžete tu stlačiť + ,\n" "čím získate hodnotu, použitú pre klávesovú skratku." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Získať hodnotu pre funkčný kláves" #: dialog.c:922 msgid "Function Key Name" msgstr "Meno funkčného klávesu" #: dialog.c:926 msgid "Key Bindings" msgstr "Klávesové skratky" #: dialog.c:934 msgid "Key Group: " msgstr "Skupina klávesov:" #: dialog.c:944 msgid "Note: " msgstr "Poznámka: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Vypnúť všetky funkčné klávesy." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Použitie %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "Po vykonaní akejkoľvek zmeny nezabudnite uložiť svoje nastavenia!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Použitie" #: dialog.c:1031 msgid "Key binding" msgstr "Klávesové skratky" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "Copyright (c) %s-%s %s. Všetky práva rezervované.\n" "\n" "%s je slobodný softvér: môžete ho distribuovať a/alebo upravovať\n" "pri dodržaní podmienok GNU General Public License, tak ako ju\n" "zverejňuje Free Software Foundation, buď verzie 3 Licencie, alebo\n" "(podľa vašej voľby) akejkoľvek neskoršej verzie.\n" "\n" "%s je distribuovaný v nádeji, že bude užitočný, ale\n" "BEZ AKEJKOĽVEK ZÁRUKY; dokonca aj bez implikovanej záruky\n" "PREDAJNOSTI alebo VHODNOSTI NA URČITÝ ÚČEL. Viac podrobností\n" "hľadajte v GNU General Public License.\n" "\n" "Kópiu GNU General Public License by ste mali získať spolu s\n" "%s. Ak nie, pozrite ." #: dialog.c:1052 msgid "License" msgstr "Licencia" #: dialog.c:1067 msgid "Translators" msgstr "Prekladatelia" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Domovská stránka:" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Wiki: %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Blog: %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Wiki: %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Problémy: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "O ..." #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "V %d. záložke stále beží program:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "Ak neodpovedá, je odporúčané jeho ukončenie pomocou `kill -9 %d'." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Pokračovať?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Tip:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Potvrďte ukončenie bežiaceho programu" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "táto záložka" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Zmeniť priehľadnosť okna" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Zmeniť priehľadnosť okna:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Zmeniť priehľadnosť okna, keď nie je aktívne" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Zmeniť priehľadnosť okna, keď nie je aktívne:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Prispôsobiť jas farieb ANSI použitých v termináli" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Prispôsobiť jas farieb ANSI, keď nie je aktívny" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " sa pokúša spustiť nasledujúci príkaz:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Potvrdiť spustenie príkazu -e/-x/--execute" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "Nasledujúce programy stále bežia v %d. záložke:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Na zatvorenie záložky je odporúčané použiť alebo 'exit'" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Potvrďte zatvorenie záložky s procesom potomka" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "V tomto okne stále bežia nasledujúce programy:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Potvrďte zatvorenia okna s procesom potomka" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Potvrdiť zatvorenie %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "V %s stále bežia nasledujúce programy:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Pokus o vloženie nasledujúceho textu do terminálu Vte:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Potvrďte vloženie textu do terminálu Vte" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Skúste zabiť %s pomocou SIGKILL() aby ste predišli ukončeniu týchto " "programov!\n" "(MÔŽE SPÔSOBIŤ STRATU DÁT!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Vynútiť zatvorenie všetkých záložiek a okien a ukončiť %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Vypnuté, duplikované s [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Vypnuté)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Vyzerá to, že lokalizácia „%s” nie je podporovaná vašim systémom!\n" "Ak ste práve pridali lokalizačné dáta,\n" "prosím zatvorte všetky okná %s a skúste znova." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Nepodporovaná lokalizácia!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Musíte aktualizovať na %s a prekompilovať %s, aby bola táto vlastnosť " "podporovaná." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Nepodporovaná vlastnosť!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Vypnúť všetky funkčné klávesy skupiny [%s]." #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Dáta získané zo soketu vyzerajú byť nesprávne.\n" "\n" "\tPrijatá verzia soketu: %s\n" "\tOčakáv. verzia soketu: %s\n" "\n" "Ak ste práve aktualizovali %s,\n" "prosím zatvorte všetky okná %s a skúste to znova." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Formát dát soketu je neaktuálny" #: menu.c:59 msgid "Change text encoding" msgstr "Zmeniť kódovanie textu" #: menu.c:60 msgid "New tab" msgstr "Nová záložka" #: menu.c:61 msgid "New tab with specified locale" msgstr "Nová záložka so zadanou lokalizáciou" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Nové okno so zadaným profilom" #: menu.c:80 msgid "Change the font" msgstr "Zmeniť písmo" #: menu.c:87 msgid "Change colors" msgstr "Zmeniť farby" #: menu.c:90 msgid "Change the cursor color" msgstr "Zmeniť farbu kurzora" #: menu.c:94 msgid "Change the foreground color" msgstr "Zmeniť farbu popredia" #: menu.c:99 #, fuzzy #| msgid "Change the cursor color" msgid "Change the ANSI colors" msgstr "Zmeniť farbu kurzora" #: menu.c:104 msgid "Change the background color" msgstr "Zmeniť farbu pozadia" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Prispôsobiť jas farieb ANSI" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Prispôsobiť jas, keď nie je aktívne" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Zmeniť farebnú schému ANSI" #: menu.c:148 msgid "Background" msgstr "Pozadie" #: menu.c:154 msgid "Transparent window" msgstr "Priehľadné okno" #: menu.c:159 msgid "Window opacity" msgstr "Priehľadnosť okna" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Priehľadnosť okna, keď nie je aktívny" #: menu.c:172 msgid "Transparent background" msgstr "Priehľadné pozadie" #: menu.c:175 msgid "Background saturation" msgstr "Saturácia pozadia" #: menu.c:179 msgid "Set background image" msgstr "Nastaviť obrázok pozadia" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Schránka" #: menu.c:196 msgid "Copy URL" msgstr "Kopírovať URL" #: menu.c:201 msgid "Copy" msgstr "Kopírovať" #: menu.c:205 msgid "Paste" msgstr "Vložiť" #: menu.c:212 msgid "View clipboard" msgstr "Zobraziť schránku" #: menu.c:216 msgid "View primary clipboard" msgstr "Zobraziť primárnu schránku" #: menu.c:227 msgid "Scrollback lines" msgstr "Rolovanie riadkov" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Vymazať rolovanie riadkov" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Rôzne" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Vložiť do každého terminálu Vte" #: menu.c:247 msgid "Launch file manager" msgstr "Spustiť správcu súborov" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Väzba mazania" #: menu.c:275 msgid "Cursor Shape" msgstr "Tvar kurzora" #: menu.c:292 msgid "Dim text when inactive" msgstr "Stmaviť, keď nie je aktívny" #: menu.c:297 msgid "Dim window when inactive" msgstr "Stmaviť okno, keď nie je aktívny" #: menu.c:302 msgid "Cursor blinks" msgstr "Blikajúci kurzor" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Zvukový zvonček" #: menu.c:327 msgid "Visible bell" msgstr "Viditeľný zvonček" #: menu.c:332 msgid "Urgent bell" msgstr "Naliehavý zvonček" #: menu.c:342 msgid "Switch input methods" msgstr "Prepnúť vstupnú metódu" #: menu.c:361 msgid "Show the tabs bar" msgstr "Zobraziť záložky" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Skryť záložky" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Vždy zobraziť panel záložiek" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Vždy skryť panel záložiek" #: menu.c:391 msgid "Increase window size" msgstr "Zväčšiť veľkosť okna" #: menu.c:394 msgid "Decrease window size" msgstr "Zmenšiť veľkosť okna" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Vrátiť používateľské písmo/veľkosť" #: menu.c:404 msgid "Reset to system font/size" msgstr "Vrátiť systémové písmo/veľkosť" #: menu.c:409 msgid "Reset the content" msgstr "Vymazať obsah" #: menu.c:424 msgid "User profile" msgstr "Používateľský profil" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Skončiť %s" #: menu.c:502 msgid "grayscale" msgstr "Stupne sivej" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Používateľská" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Presunie aktuálnu stranu vpred." #: menu.c:1099 msgid " (Wide)" msgstr " (Široký)" #: menu.c:1554 msgid "Font Selection" msgstr "Výber písma" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Pridať ďalšie lokalizácie..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Ďalšie nastavenia..." #: menu.c:1963 msgid "Save settings automatically" msgstr "Uložiť nastavenia automaticky" #: menu.c:1968 msgid "Save settings" msgstr "Uložiť nastavenia" #: menu.c:1971 msgid "Save settings as..." msgstr "Uložiť nastavenia ako..." #: menu.c:1977 msgid "Reload settings" msgstr "Znova načítať nastavenia" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s predvolený" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Systémová schéma" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Nasledujúce nastavenia:\n" "\n" "%s\n" "Nemôžu byť použité na okná terminálov aktuálneho okna.\n" "Prosím, použite miesto toho [%s]." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Nasledujúce nastavenia nemôžu byť použité" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Zakázať: Skúšam namiesto toho použiť [Priehľadné pozadie]." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Rolovať obrázok pozadia spolu s textom" #: menu.c:2719 msgid "Open File" msgstr "Otvoriť súbor" #: menu.c:2721 msgid "Save File" msgstr "Zatvoriť súbor" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "Nastala nasledujúca chyba: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Chyb pri vytváraní procesu potomka:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Chyba pri vytváraní procesu potomka!\n" "Prosím overte, že je /dev/pts pripojený ako súborový systém devpts!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Chyba pri vytváraní procesu potomka" #: profile.c:854 msgid "Tab operation" msgstr "Operácie záložiek" #: profile.c:855 msgid "Switch tab" msgstr "Prepnúť záložku" #: profile.c:856 msgid "Move tab" msgstr "Presunúť záložku" #: profile.c:857 msgid "Switch to #? tab" msgstr "Prepnúť na záložku" #: profile.c:858 msgid "Text operation" msgstr "Textové operácie" #: profile.c:859 msgid "Scroll up/down" msgstr "Rolovanie hore/dole" #: profile.c:860 msgid "Font" msgstr "Písmo" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Zapnúť/Vypnúť funkčné" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "Zapína/vypína hypertextové odkazy, funkčné klávesy a kontextové menu" #: profile.c:869 msgid "Add new tab" msgstr "Pridať novú záložku" #: profile.c:871 msgid "Add a new tab." msgstr "Pridá novú záložku." #: profile.c:873 msgid "Close tab" msgstr "Zatvoriť záložku" #: profile.c:875 msgid "Close current tab." msgstr "zatvorí aktuálnu záložku." #: profile.c:877 msgid "Rename page name" msgstr "Premenovať meno stránky" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Premenuje meno stránky aktuálnej záložky" #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Nájde reťazce vyhovujúce hľadanému regulárnemu výrazu." #: profile.c:884 msgid "Find previous" msgstr "Nájsť predošlý" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Nájsť predošlý reťazec, vyhovujúci hľadanému regulárnemu výrazu." #: profile.c:887 msgid "Find next" msgstr "Nájsť ďalší" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Nájsť ďalší reťazec, vyhovujúci hľadanému regulárnemu výrazu." #: profile.c:891 msgid "Switch to prev tab" msgstr "Prepnúť na predošlú záložku" #: profile.c:893 msgid "Switch to prev tab." msgstr "Prepne na predošlú záložku." #: profile.c:895 msgid "Switch to next tab" msgstr "Prepnúť na ďalšiu záložku" #: profile.c:897 msgid "Switch to next tab." msgstr "Prepne na ďalšiu záložku." #: profile.c:899 msgid "Switch to first tab" msgstr "Prepnúť na prvú záložku" #: profile.c:901 msgid "Switch to first tab." msgstr "Prepne na prvú záložku." #: profile.c:903 msgid "Switch to last tab" msgstr "Prepnúť na poslednú záložku" #: profile.c:905 msgid "Switch to last tab." msgstr "Prepne na poslednú záložku." #: profile.c:907 msgid "Move page forward" msgstr "Presunúť stranu vpred" #: profile.c:909 msgid "Move current page forward." msgstr "Presunie aktuálnu stranu vpred." #: profile.c:911 msgid "Move page backward" msgstr "Presunúť stranu vzad" #: profile.c:913 msgid "Move current page backward." msgstr "Presunie aktuálnu stranu vzad." #: profile.c:915 msgid "Move page to first" msgstr "Presunúť stranu na prvú" #: profile.c:917 msgid "Move current page to first." msgstr "Presunie aktuálnu stranu na prvé miesto." #: profile.c:919 msgid "Move page to last" msgstr "Presunúť stranu na posledné miesto" #: profile.c:921 msgid "Move current page to last." msgstr "Presunie aktuálnu stranu na posledné miesto." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Prepnúť na %d. záložku" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Prepne priamo na %d. záložku." #: profile.c:932 msgid "New window" msgstr "Nové okno" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Otvorí nové okno s aktuálnym adresárom." #: profile.c:936 msgid "Select all" msgstr "Vybrať všetko" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "vyberie všetok text v okne Vte Terminálu" #: profile.c:940 msgid "Copy to clipboard" msgstr "Kopírovať do schránky" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Kopíruje text do schránky." #: profile.c:944 msgid "Paste the text" msgstr "Vložiť zo schránky" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "vyberie všetok text v okne Vte Terminálu" #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Kopíruje text do schránky." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Vloží text zo schránky." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Zväčšiť písmo" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Zväčší veľkosť písma aktuálnej záložky." #: profile.c:960 msgid "Decrease font size" msgstr "Zmenšiť písmo" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Zmenší veľkosť písma aktuálnej záložky." #: profile.c:964 msgid "Reset font size" msgstr "Obnoviť veľkosť písma" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Obnoví veľkosť písma aktuálnej záložky na pôvodnú veľkosť." #: profile.c:968 msgid "Maximize the window" msgstr "Maximalizovať okno" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Pokúsi sa maximalizovať okno tak, aby použilo celé dostupné miesto obrazovky" #: profile.c:972 msgid "Full screen" msgstr "Celá obrazovka" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Požiada o prepnutie umiestnenia okna v režime celej obrazovky" #: profile.c:976 msgid "Scroll up" msgstr "Rolovať hore" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Emuluje udalosť rolovania myšou v okne Vte Terminálu." #: profile.c:980 msgid "Scroll down" msgstr "Rolovať dole" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Emuluje udalosť rolovania myšou v okne Vte Terminálu." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Rolovať 1 riadok hore" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Požiada rolovať 1 riadok hore v okne Vte Terminálu." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Rolovať 1 riadok dole" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Požiada rolovať 1 riadok dole v okne Vte Terminálu." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Vymazať rolovanie riadkov" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Vypísať behové ladiace dáta" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Vypíše behové dáta LilyTerm, kvôli ladeniu." #: profile.c:1033 msgid "Window Title" msgstr "Titulok okna" #: profile.c:1034 msgid "Running Command" msgstr "Bežiaci príkaz" #: profile.c:1035 msgid "Current Dir" msgstr "Aktuálny adresár" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Vlastné meno záložky" #: profile.c:1037 msgid "Root Privileges" msgstr "Práva root" #: profile.c:1038 msgid "Normal Text" msgstr "Normálny text" #: profile.c:1072 msgid "Shift" msgstr "Shift" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Pozadie" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Zmeniť farbu popredia" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Cieľový súbor neexistuje" #: profile.c:2996 msgid "The target file is a directory" msgstr "Cieľový súbor je adresár" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Chyba pri zápise profilu '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Chyba pri zápise profilu" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Niektoré položky profilu sú v tejto verzii pridané, odstránené alebo " "zmenené.\n" "Prosím použite [Uložiť nastavenia] v kontextovom menu na uloženie svojich " "nastavení\n" "a upravte ich manuálne, ak je to potrebné.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Váš profil je %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Formát vášho profilu je neaktuálny" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Profil „%s” je neplatný:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Profil je neplatný!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tOkno %d, Strana %d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tStrana %d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Systémový profil" #~ msgid "Join and paste" #~ msgstr "Spojiť a vložiť" #~ msgid "%s (Main site)" #~ msgstr "%s (hlavná stránka)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (stránka v tradičnej čínštine)" #~ msgid "%s (Github site)" #~ msgstr "%s (stránka Github)" #~ msgid "Your %s profile is: " #~ msgstr "Váš %s profil je: " #, fuzzy #~| msgid "Please report bug to %s. Thank you for using %s!" #~ msgid "Thank you for using %s!\n" #~ msgstr "Chyby prosím hláste na %s. Ďakujem, že používate %s!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tPredvolené správanie Vte, Vložiť text z primárnej " #~ "schránke.\n" #~ msgid "Shortcut Key" #~ msgstr "Klávesová skratka" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "Pokračovať?" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Prosím chyby hláste na %s. Ďakujem, že používate %s!" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "" #~ "%s je emulátor terminálu pre X založený na libvte.\n" #~ "\n" #~ msgid "Set function key value" #~ msgstr "Nastaviť funkčné klávesy" #, fuzzy #~| msgid "Paste the text" #~ msgid "Paste to every vte" #~ msgstr "Vložiť zo schránky" #~ msgid "Change the Opacity of window:" #~ msgstr "Zmeniť priehľadnosť okna:" po/tr.po000066400000000000000000001340371246562641500125040ustar00rootroot00000000000000# Translation of LilyTerm. # Copyright (C) 2008-2009 Samed Beyribey # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2010-12-14 19:09+0200\n" "Last-Translator: Samed Beyribey \n" "Language-Team: GNU-TR \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, fuzzy, c-format #| msgid "Please report bug to %s. Thank you for using %s!" msgid "Please report bug at <%s>.\n" msgstr "" "Lütfen hataları %s adresine bildiriniz. %s programını kullandığınız için " "teşekkürler!" #: console.c:122 dialog.c:1078 #, fuzzy, c-format #| msgid "Please report bug to %s. Thank you for using %s!" msgid "Thank you for using %s!" msgstr "" "Lütfen hataları %s adresine bildiriniz. %s programını kullandığınız için " "teşekkürler!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s libvte tabanlı bir X Terminal Öykünücüsüdür.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Pencere başlığını belirlemek için -T/--title {başlık} kullanın.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Pencere başlığını belirlemek için -T/--title {başlık} kullanın.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "" "Açılışta birden fazla sekme oluşturmak için -t / --tab {sayı} kullanın.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Açılışta içerisinde işlem yapılacak dizini belirtmek için -d/--directory " "{dizin} kullanın.\n" #: console.c:146 #, fuzzy #| msgid "Use -g/--geometry {geometry} to specify the geometry of window.\n" msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Pencerenin boyutlarını değiştirmek için -g/--geometry {boyut} kullanın.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "Kabuğu giriş kabuğu olarak belirlemek için -l/-ls/--login kullanın.\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Ayrı süreçlerde çalıştırmak için -s/--seperate kullanın.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 #, fuzzy #| msgid "Use -p/--profile to got a profile sample.\n" msgid "Use -p/--profile to get a profile sample.\n" msgstr "Profil örneğini görüntülemek için -p/--profile kullanın.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Belirli bir profil kullanmak için -u/--user_profile {%s} kullanın.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "Sürüm bilgisini görüntülemek için -v/--version kullanın.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command when starting up. (Must be " #| "the final option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Açılışta bir programın çalıştırılması için -e / -x / --execute {Komut} " "kullanın. (Bu parametre en son kullanılmalıdır).\n" #: console.c:159 #, fuzzy, c-format #| msgid "The %s system config is: %s/%s\n" msgid "The %s system configure file is: %s\n" msgstr "%s sistem geneli yapılandırma dosyası: %s/%s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "%s profiliniz:" #: console.c:224 #, fuzzy #| msgid "Erase Binding" msgid "Default key binding:" msgstr "Erase Binding" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 #, fuzzy #| msgid "" #| " * <`>\t\tDisable/Enable hyperlinks, function keys and right click " #| "menu.\n" msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`>\t\tBağlantıları, fonksiyon tuşlarını ve sağ tıklama ile açılan " "menüyü etkinleştirir/devredışı bırakır.\n" #: console.c:229 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab.\n" msgid " * Add a New tab with current directory.\n" msgstr " * \t\tYeni Sekme Açar/Mevcut sekmeyi kapatır.\n" #: console.c:230 #, fuzzy #| msgid " * \tSwitch to Prev/Next tab.\n" msgid " * Switch to Prev/Next tab.\n" msgstr " * \tÖnceki/Sonraki sekmeye geçiş yapar.\n" #: console.c:231 #, fuzzy #| msgid " * \tSwitch to First/Last tab.\n" msgid " * Switch to First/Last tab.\n" msgstr " * \tİlk/Son sekmeye geçiş yapar.\n" #: console.c:232 #, fuzzy #| msgid " * <[/]>\t\tMove current tab Forward/Backward.\n" msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]>\t\tSekmenin yerini değiştirir.\n" #: console.c:233 #, fuzzy #| msgid " * \tMove current tab to First/Last.\n" msgid " * Move current tab to First/Last.\n" msgstr " * \tMevcut sekmeyi en başa veya en sona taşır.\n" #: console.c:234 #, fuzzy #| msgid " * \tSwitch to 1st ~ 12th tab.\n" msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * \t1 ile 12. sekmeler arasında geçiş yapar.\n" #: console.c:235 #, fuzzy #| msgid "" #| " * <+/-/Enter>\tIncrease/Decrease/Reset the font size of current " #| "tab.\n" msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter>\tMevcut sekmenin yazıtipi boyutunu Artırır/Azaltır/" "Sıfırlar.\n" #: console.c:236 #, fuzzy #| msgid "" #| " * \tEmulate a mouse Scroll Up/Down event on Vte " #| "Terminal box.\n" msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * \tVte terminalinde farenin yukarı/aşağı kaydırma tuşunu " "taklit eder.\n" #: console.c:237 #, fuzzy #| msgid "" #| " * \tAsks to Scroll Up/Down 1 line on Vte Terminal box.\n" msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * \tVte terminalinde 1 satır aşağı/yukarı kaydırma " "yapar.\n" #: console.c:238 #, fuzzy #| msgid "" #| " * \tGtk+ default behavior, Scroll Up/Down on Vte " #| "Terminal box.\n" msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * \tGtk+ öntanımlı davranışı, terminalde yukarı/aşağı " "gider.\n" #: console.c:239 #, fuzzy #| msgid "" #| " * \tGtk+ default behavior, Scroll the Terminal box to " #| "to Top/Bottom.\n" msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * \tGtk+ öntanımlı davranışı, terminalde en üste/alta " "gider.\n" #: console.c:240 #, fuzzy #| msgid "" #| " * \tSwitch between fullwindow/unfullwindow and " #| "fullscreen/unfullscreen state.\n" msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * \tTam ekran moduna giriş yapar/Tam ekran modundan çıkış " "yapar\n" #: console.c:241 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box.\n" msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr " * \t\tVte Terminalindeki tüm yazıları seçer.\n" #: console.c:243 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box.\n" msgid " * Select all the text in the terminal.\n" msgstr " * \t\tVte Terminalindeki tüm yazıları seçer.\n" #: console.c:244 #, fuzzy #| msgid "" #| " * \tCopy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * \tYazıyı panoya kopyalar / Panodaki yazıyı yapıştırır.\n" #: console.c:245 #, fuzzy #| msgid "" #| " * \tCopy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * \tYazıyı panoya kopyalar / Panodaki yazıyı yapıştırır.\n" #: console.c:246 #, fuzzy #| msgid "\t\t\t(i.e. Emulate a middle button mouse click to paste the text)" msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "\t\t\t(ör. Yapıştırmak için farenin orta tuşunun yaptığı işlemi yapar)" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" #: console.c:249 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab.\n" msgid " * Trying to close current tab.\n" msgstr " * \t\tYeni Sekme Açar/Mevcut sekmeyi kapatır.\n" #: console.c:250 #, fuzzy #| msgid "\t\t\t(Using or 'exit' to close tabs is recommended)\n" msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" "\t\t\t(Sekmeleri veya 'exit' kullanarak kapatmanız tavsiye " "edilir)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" #: console.c:252 #, fuzzy #| msgid " * \t\tRename current tab.\n" msgid " * Rename the current tab.\n" msgstr " * \t\tMevcut sekmeyi yeniden adlandırır.\n" #: console.c:259 #, fuzzy, c-format #| msgid "" #| "Default shortcut key: (It may custom or disable by right click menu [Set " #| "function key value])" msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Öntanımlı kısayol tuşu: (Sağ tık menüsünden değiştirilebilir/kaldırılabilir " "[Fonksiyon tuşu değeri])" #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "" #: dialog.c:122 dialog.c:3352 menu.c:2885 #, fuzzy #| msgid "The following error is occurred:" msgid "The following error occurred:" msgstr "Hata çıktısı:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Sekmeyi yeniden adlandır" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Pencere başlığında görüntülenecek ismi giriniz:" #: dialog.c:211 msgid "Label Name:" msgstr "İsim:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "İfadeyi bul" #: dialog.c:235 msgid "Find: " msgstr "Bul:" #: dialog.c:258 msgid "Find previous string" msgstr "Önceki ifadeyi ara" #: dialog.c:264 msgid "Find next string" msgstr "Sonraki ifadeyi bul" #: dialog.c:275 msgid "Case sensitive" msgstr "Büyük küçük harfe duyarlı" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Perl uyumlu düzenli ifadeler kullanın" #: dialog.c:324 dialog.c:397 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste texts to every Vte Terminal" msgstr "Vte terminalindeki tüm yazıyı seç." #: dialog.c:342 #, fuzzy #| msgid "Please input the Label Name of this tab:" msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Pencere başlığında görüntülenecek ismi giriniz:" #: dialog.c:343 msgid "Text:" msgstr "" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "" #: dialog.c:388 msgid "Grab keys" msgstr "" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "Tuş:" #: dialog.c:423 msgid "Entry" msgstr "" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "Yeni yerel ekleyin ve öntanımlı yereli atayın" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 #, fuzzy #| msgid "" #| "The default locale used when initing a vte terminal.\n" #| "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "vte terminal başlatılırken kullanılacak öntanımlı yerel.\n" "Burada \"tr_TR\", \"tr_TR.ISO8859-9\", veya \"tr_TR.UTF-8\" " "kullanabilirsiniz." #: dialog.c:451 msgid "Default locale:" msgstr "Öntanımlı yerel:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Sağ tık menüsünde, boşluk ile ayrılmış yereller.\n" "Burada Burada \"tr_TR\", \"tr_TR.ISO8859-9\", veya \"tr_TR.UTF-8\" " "kullanabilirsiniz.\n" "Eğer herhangi bir yerel kurulu değilse burada \"UTF-8\" kullanmak " "isteyebilirsiniz." #: dialog.c:463 msgid "Locales list:" msgstr "Yerel listesi:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Arkaplan doygunluğunu değiştir" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Arkaplan doygunluğunu ayarlayın:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Önplan rengini değiştir" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Arkaplan rengini değiştir" #: dialog.c:556 #, fuzzy #| msgid "Change the background color in terminal" msgid "Change the cursor color in terminal" msgstr "Arkaplan rengini değiştir" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the background color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Arkaplan rengini değiştir" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "ANSI renklerin parlaklığını ayarla" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 #, fuzzy #| msgid "Change colors" msgid "Invert color" msgstr "Renkleri değiştir" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Sekmedeki %s rengini değiştir" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Kalın Yazı Örneği" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Birden çok sekme açık olduğu için onayınız gerekiyor" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Birden fazla sekme kapatılacak. Devam etmek istiyor musunuz?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "bu sekmeler" #: dialog.c:867 #, fuzzy #| msgid "" #| "You may press + here\n" #| "to get the key value used for the function key." msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Fonksiyon tuşu için kullanılan tuş değerini almak için\n" "+ kullanabilirsiniz." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Fonksiyon tuşu için tuş değerini al" #: dialog.c:922 msgid "Function Key Name" msgstr "Fonksiyon Tuşu Adı" #: dialog.c:926 #, fuzzy #| msgid "Erase Binding" msgid "Key Bindings" msgstr "Erase Binding" #: dialog.c:934 msgid "Key Group: " msgstr "Tuş Grubu:" #: dialog.c:944 msgid "Note: " msgstr "Not:" #: dialog.c:966 msgid "Disable all the function keys." msgstr "Tüm fonksiyon tuşlarını pasifleştir." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "%s %s kullanımı" #: dialog.c:1024 #, fuzzy #| msgid "Don't forget to save your settings after making any change!\n" msgid "Don't forget to save your settings after making any change!" msgstr "" "Herhangi bir değişiklik yaptıktan sonra ayarlarınızı kaydetmeyi unutmayın!\n" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Kullanım" #: dialog.c:1031 #, fuzzy #| msgid "Erase Binding" msgid "Key binding" msgstr "Erase Binding" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "" #: dialog.c:1067 msgid "Translators" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "" #: dialog.c:1084 msgid "About" msgstr "" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "#%d numaralı sekmede hala çalışmakta olan bir uygulama var:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "Yanıt vermiyorsa `kill -9 %d' kullanmanız tavsiye edilir." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Devam etmek istiyor musunuz?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "İpucu" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Arkaplanda çalışan programı kapatmak için onayınız gerekiyor" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "bu sekme" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Pencere donukluğunu değiştir" #: dialog.c:1146 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window:" msgstr "Pencere donukluğunu değiştir" #: dialog.c:1156 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive" msgstr "Pencere donukluğunu değiştir" #: dialog.c:1158 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive:" msgstr "Pencere donukluğunu değiştir" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Uçbirimde kullanılacak ANSI renklerinin parlaklığını ayarla" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "İşlem yapılmadığı zaman ANSI renklerinin parlaklığını değiştir" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr "aşağıdaki komutu çalıştırmayı deniyor:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Çalıştırma komutu -e/-x/--execute komut için onaylayın " #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "#%d sekmesinde hala çalışmakta olan uygulamalar var:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Sekmeleri 'exit' veya kullanarak kapatmanız tavsiye edilir" #: dialog.c:1301 #, fuzzy #| msgid "Confirm to close a tab with child proccess" msgid "Confirm to close a tab with child process" msgstr "Alt süreçlerin çalıştığı sekmeyi kapatmak için onayınız gerekiyor" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "Aşağıdaki uygulamalar bu pencere altında çalışmaya devam ediyor:" #: dialog.c:1331 #, fuzzy #| msgid "Confirm to close a window with child proccess" msgid "Confirm to close a window with child process" msgstr "Alt süreçlerin çalıştığı pencereyi kapatmak için onayınız gerekiyor" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "%s kapatılması için onayınız gerekiyor" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "%s altında hala çalışmakta olan bir uygulama var:" #: dialog.c:1383 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Vte terminalindeki tüm yazıyı seç." #: dialog.c:1390 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Confirm to paste texts to the Vte Terminal" msgstr "Vte terminalindeki tüm yazıyı seç." #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Uygulamaları sonlandırmak için %s sürecini SIGKILL() kullanın!\n" "(VERİ KAYBINA YOL AÇABİLİR!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "" "Bütün sekmeleri ve pencereleri kapatmaya zorla ve %s uygulamasından çık!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Pasif, [%s] ile çakışıyor)" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Pasif)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Belirtilen \"%s\" yereli sisteminiz tarafından desteklenmiyor!\n" "Eğer yereli yeni eklemişseniz,\n" "Lütfen %s uygulamasının tüm pencerelerini kapatıp yeniden deneyin." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Desteklenmeyen yerel!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Bu özelliğin kullanılabilmesi için %s güncellenmeli ve %s tekrar derlenmeli." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Desteklenmeyen özellik!" #: dialog.c:3513 #, fuzzy, c-format #| msgid "Disable all the function keys of this group." msgid "Disable all the function keys of [%s] group." msgstr "" " * <`>\t\tLinkleri, fonksiyon tuşlarını ve sağ tıklama ile açılan " "menüyü etkinleştirir/devredışı bırakır\n" #: main.c:657 #, fuzzy, c-format #| msgid "" #| "The data got from socket seems incorrect.\n" #| "If you just updated %s recently,\n" #| "Please close all the windows of %s and try again." msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Soketten alınan veri hatalı gibi görünüyor.\n" "Eğer %s uygulamasını henüz güncellemişseniz,\n" "Lütfen %s uygulamasının pencerelerini kapatın ve tekrar deneyin. " #: main.c:665 msgid "The format of socket data is out of date" msgstr "Soket verisi biçimi güncel değil" #: menu.c:59 msgid "Change text encoding" msgstr "Yazı kodlamasını değiştir" #: menu.c:60 msgid "New tab" msgstr "Yeni sekme" #: menu.c:61 msgid "New tab with specified locale" msgstr "Belirli bir yerel ile yeni sekme aç" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Belirtilen profil ile yeni pencere" #: menu.c:80 msgid "Change the font" msgstr "Yazıtipini değiştir" #: menu.c:87 msgid "Change colors" msgstr "Renkleri değiştir" #: menu.c:90 #, fuzzy #| msgid "Change the background color" msgid "Change the cursor color" msgstr "Arkaplan rengini değiştir" #: menu.c:94 msgid "Change the foreground color" msgstr "Önplan rengini değiştir" #: menu.c:99 #, fuzzy #| msgid "Change the background color" msgid "Change the ANSI colors" msgstr "Arkaplan rengini değiştir" #: menu.c:104 msgid "Change the background color" msgstr "Arkaplan rengini değiştir" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "ANSI renklerin parlaklığını ayarla" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "İşlem yapılmadığı zaman parlaklığı ayarla" #: menu.c:138 msgid "Change ANSI color theme" msgstr "ANSI renk temasını değiştir" #: menu.c:148 #, fuzzy #| msgid "Background saturation" msgid "Background" msgstr "Arkaplan doygunluğu" #: menu.c:154 msgid "Transparent window" msgstr "Şeffaf pencere" #: menu.c:159 msgid "Window opacity" msgstr "Pencere donukluğu" #: menu.c:162 #, fuzzy #| msgid "Dim text when inactive" msgid "Window opacity when inactive" msgstr "Etkin değilken yazıyı bulanıklaştır" #: menu.c:172 msgid "Transparent background" msgstr "Şeffaf arkaplan" #: menu.c:175 msgid "Background saturation" msgstr "Arkaplan doygunluğu" #: menu.c:179 msgid "Set background image" msgstr "Arkaplan resmini değiştir" #: menu.c:192 window.c:3862 #, fuzzy #| msgid "Copy to clipboard." msgid "Clipboard" msgstr "Panoya kopyala." #: menu.c:196 msgid "Copy URL" msgstr "Adresi kopyala" #: menu.c:201 msgid "Copy" msgstr "Kopyala" #: menu.c:205 msgid "Paste" msgstr "Yapıştır" #: menu.c:212 #, fuzzy #| msgid "Copy to clipboard." msgid "View clipboard" msgstr "Panoya kopyala." #: menu.c:216 #, fuzzy #| msgid "Copy to clipboard." msgid "View primary clipboard" msgstr "Panoya kopyala." #: menu.c:227 msgid "Scrollback lines" msgstr "Geçmiş Satırlar" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Geçmiş satırları temizle" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Çeşitli" #: menu.c:244 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste to every Vte Terminal" msgstr "Vte terminalindeki tüm yazıyı seç." #: menu.c:247 msgid "Launch file manager" msgstr "" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Erase Binding" #: menu.c:275 msgid "Cursor Shape" msgstr "" #: menu.c:292 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim text when inactive" msgstr "Etkin değilken yazıyı bulanıklaştır" #: menu.c:297 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim window when inactive" msgstr "Etkin değilken yazıyı bulanıklaştır" #: menu.c:302 msgid "Cursor blinks" msgstr "Yanıp sönen imleç" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Sistem zili" #: menu.c:327 #, fuzzy #| msgid "Audible bell" msgid "Visible bell" msgstr "Sistem zili" #: menu.c:332 msgid "Urgent bell" msgstr "" #: menu.c:342 msgid "Switch input methods" msgstr "Girdi yöntemini değiştir" #: menu.c:361 msgid "Show the tabs bar" msgstr "Sekme çubuğunu göster" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Sekme çubuğunu gizle" #: menu.c:374 #, fuzzy #| msgid "Show the tabs bar" msgid "Always show the tabs bar" msgstr "Sekme çubuğunu göster" #: menu.c:381 #, fuzzy #| msgid "Hide the tabs bar" msgid "Always hide the tabs bar" msgstr "Sekme çubuğunu gizle" #: menu.c:391 msgid "Increase window size" msgstr "Pencereyi Büyült" #: menu.c:394 msgid "Decrease window size" msgstr "Pencereyi Küçült" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Kullanıcının yazıtipine/boyutuna sıfırla" #: menu.c:404 msgid "Reset to system font/size" msgstr "Sistem yazıtipine/boyutuna sıfırla" #: menu.c:409 msgid "Reset the content" msgstr "İçeriği sıfırla" #: menu.c:424 msgid "User profile" msgstr "Kullanıcı profili" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "%s kapat" #: menu.c:502 msgid "grayscale" msgstr "" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Kullanıcı tanımlı" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Mevcut sayfayı öne taşır." #: menu.c:1099 msgid " (Wide)" msgstr " (Geniş)" #: menu.c:1554 msgid "Font Selection" msgstr "Yazıtipi Seçimi" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Farklı yerel ekle..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Diğer ayarlar..." #: menu.c:1963 #, fuzzy #| msgid "Save settings as..." msgid "Save settings automatically" msgstr "Ayarları farklı kaydet..." #: menu.c:1968 msgid "Save settings" msgstr "Ayarları kaydet" #: menu.c:1971 msgid "Save settings as..." msgstr "Ayarları farklı kaydet..." #: menu.c:1977 #, fuzzy #| msgid "Save settings" msgid "Reload settings" msgstr "Ayarları kaydet" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s öntanımlı" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Sistem öntanımlı (SCHEME)" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Aşağıdaki ayarlar:\n" "\n" "%s\n" "Mevcut penceredeki terminallere uygulanamayacak.\n" "Bunun yerine [%s] kullanın." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Aşağıdaki ayarlar UYGULANAMAYACAK" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Pasif: [Şeffaf Arkaplan] kullanılacak." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Yazıyla birlikte arkaplan resmini de kaydır" #: menu.c:2719 msgid "Open File" msgstr "" #: menu.c:2721 msgid "Save File" msgstr "" #: menu.c:2883 #, fuzzy, c-format #| msgid "The following error is occurred:" msgid "The following error occurred: %s" msgstr "Hata çıktısı:" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Alt süreç oluşturulurken hata meydana geldi:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Alt süreç oluşturulurken bir hata meydana geldi!\n" "/dev/pts'in devpts dosya sistemi olarak bağlı olduğundan emin olun!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Alt işlem oluşturulurken hata meydana geldi" #: profile.c:854 msgid "Tab operation" msgstr "Sekme işlemi" #: profile.c:855 msgid "Switch tab" msgstr "Sekme değiştir" #: profile.c:856 msgid "Move tab" msgstr "Sekmeyi taşı" #: profile.c:857 msgid "Switch to #? tab" msgstr "#? sekmesine geç" #: profile.c:858 msgid "Text operation" msgstr "Yazı işlemi" #: profile.c:859 msgid "Scroll up/down" msgstr "Yukarı/aşağı kaydır" #: profile.c:860 msgid "Font" msgstr "Yazıtipi" #: profile.c:865 msgid "Disable/Enable functions" msgstr "Fonksiyonları etkinleştir/pasifleştir" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Bağlantıları, fonksiyon tuşlarını ve sağ tık menüsünü etkinleştir/" "pasifleştir." #: profile.c:869 msgid "Add new tab" msgstr "Yeni sekme ekle" #: profile.c:871 msgid "Add a new tab." msgstr "Yeni sekme ekle." #: profile.c:873 msgid "Close tab" msgstr "Sekmeyi kapat" #: profile.c:875 msgid "Close current tab." msgstr "Mevcut sekmeyi kapat." #: profile.c:877 msgid "Rename page name" msgstr "Sayfa adını değiştir" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Mevcut sekmenin sayfa adını değiştir." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Aranan ifadeyle eşleşen dizgileri bulur." #: profile.c:884 msgid "Find previous" msgstr "Önceki" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Eşleşen bir önceki arama ifadesine geçer." #: profile.c:887 msgid "Find next" msgstr "Sonraki" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Eşleşen diğer arama ifadesine geçer." #: profile.c:891 msgid "Switch to prev tab" msgstr "Önceki sekmeye geç" #: profile.c:893 msgid "Switch to prev tab." msgstr "Önceki sekmeye geçiş yapar." #: profile.c:895 msgid "Switch to next tab" msgstr "Sonraki sekmeye geç" #: profile.c:897 msgid "Switch to next tab." msgstr "Sonraki sekmeye geçiş yapar." #: profile.c:899 msgid "Switch to first tab" msgstr "İlk sekmeye geç" #: profile.c:901 msgid "Switch to first tab." msgstr "İlk sekmeye geçiş yapar." #: profile.c:903 msgid "Switch to last tab" msgstr "Son sekmeye geç" #: profile.c:905 msgid "Switch to last tab." msgstr "Son sekmeye geçiş yapar." #: profile.c:907 msgid "Move page forward" msgstr "Sayfayı öne taşı" #: profile.c:909 msgid "Move current page forward." msgstr "Mevcut sayfayı öne taşır." #: profile.c:911 msgid "Move page backward" msgstr "Sayfayı arkaya taşı" #: profile.c:913 msgid "Move current page backward." msgstr "Mevcut sayfayı arkaya taşır." #: profile.c:915 msgid "Move page to first" msgstr "Sayfayı başa taşı" #: profile.c:917 msgid "Move current page to first." msgstr "Mevcut sayfayı başa taşır." #: profile.c:919 msgid "Move page to last" msgstr "Sayfayı sona taşı" #: profile.c:921 msgid "Move current page to last." msgstr "Mevcut sayfayı sona taşır." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "#%d sekmesine geç" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Doğrudan #%d sekmesine geçiş yapar." #: profile.c:932 msgid "New window" msgstr "" #: profile.c:934 msgid "Open a new window with current dir." msgstr "" #: profile.c:936 msgid "Select all" msgstr "Tümünü seç" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Vte terminalindeki tüm yazıyı seç." #: profile.c:940 #, fuzzy #| msgid "Copy to clipboard." msgid "Copy to clipboard" msgstr "Panoya kopyala." #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Yazıyı panoya kopyala." #: profile.c:944 msgid "Paste the text" msgstr "Yazıyı yapıştır" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Vte terminalindeki tüm yazıyı seç." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Yazıyı panoya kopyala." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Panodaki yazıyı yapıştır." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Yazıtipi boyutunu büyüt" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Mevcut sekmenin yazıtipi boyutunu büyüt." #: profile.c:960 msgid "Decrease font size" msgstr "Yazıtipi boyutunu küçült" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Mevcut sekmenin yazıtipi boyutunu küçült." #: profile.c:964 msgid "Reset font size" msgstr "Yazıtipi boyutunu sıfırla" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "Yazıtipini öntanımlı değere sıfırla." #: profile.c:968 msgid "Maximize the window" msgstr "Pencereyi Büyüt" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "Pencereyi ekranın kullanılabilir kısmının tamamına yayar." #: profile.c:972 msgid "Full screen" msgstr "Tam ekran" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Pencereyi normal görünümde veya tam ekranda görüntülemeyi sağlar." #: profile.c:976 msgid "Scroll up" msgstr "Yukarı kaydır" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "Vte terminalinde farenin yukarı kaydırma tuşunu taklit et." #: profile.c:980 msgid "Scroll down" msgstr "Aşağı kaydır" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "Vte terminalinde farenin aşağı kaydırma tuşunu taklit et." #: profile.c:984 msgid "Scroll up 1 line" msgstr "1 satır yukarı kaydır" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "Vte terminalinde 1 satır yukarıya kaydırmanızı istemektedir." #: profile.c:988 msgid "Scroll down 1 line" msgstr "1 satır aşağı kaydır" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "Vte terminalinde 1 satır aşağıya kaydırmanızı istemektedir." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Geçmiş satırları temizle" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Açılış hata ayıklama çıktısını bas" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "" "Hata ayıklama çıktısını görmek için Lilyterm'in açılış verisini gösterir." #: profile.c:1033 msgid "Window Title" msgstr "Pencere Başlığı" #: profile.c:1034 msgid "Running Command" msgstr "Çalışan Komut" #: profile.c:1035 msgid "Current Dir" msgstr "Dizin" #: profile.c:1036 msgid "Custom Tab Name" msgstr "Özel Sekme Adı" #: profile.c:1037 msgid "Root Privileges" msgstr "Root Yetkileri" #: profile.c:1038 msgid "Normal Text" msgstr "Normal Yazı" #: profile.c:1072 msgid "Shift" msgstr "" #: profile.c:1076 msgid "Ctrl" msgstr "" #: profile.c:1078 msgid "Alt" msgstr "" #: profile.c:1088 msgid "Win" msgstr "" #: profile.c:1132 #, fuzzy #| msgid "Background saturation" msgid "Background Color" msgstr "Arkaplan doygunluğu" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Önplan rengini değiştir" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Hedef dosya mevcut DEĞİL" #: profile.c:2996 msgid "The target file is a directory" msgstr "Hedef dosya bir dizin" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "'%s' profili yazılırken hata oluştu:" #: profile.c:3049 msgid "Error when writing profile" msgstr "Profil kaydedilirken hata oluştu" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "Bu sürümde profil dosyasında çeşitli değişiklikler var.\n" "Lütfen menüye sağ tıklayarak [Ayarları kaydet] seçeneğini kullanın\n" "veya yapılandırma dosyasını elle düzenleyin.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Kullandığınız profil %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Profil biçiminiz güncel değil" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Profil, \"%s\" geçersiz:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Profil geçersiz!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tPencere #%d, Sayfa #%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tSayfa #%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Sistem öntanımlı (PROFILE)" #~ msgid "Your %s profile is: " #~ msgstr "%s profiliniz:" #, fuzzy #~| msgid "Please report bug to %s. Thank you for using %s!" #~ msgid "Thank you for using %s!\n" #~ msgstr "" #~ "Lütfen hataları %s adresine bildiriniz. %s programını kullandığınız için " #~ "teşekkürler!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tVte öntanımlı davranışı, Esas panodaki yazıyı " #~ "yapıştır.\n" #~ msgid "Shortcut Key" #~ msgstr "Kısayol Tuşu" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "Devam etmek istiyor musunuz?" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Lütfen hataları %s adresine bildirin. %s kullandığınız için teşekkürler!" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "" #~ "%s libvte tabanlı bir X Terminal Öykünücüsüdür.\n" #~ "\n" #~ msgid "Set function key value" #~ msgstr "Fonksiyon tuşu değerini ata" #, fuzzy #~| msgid "Paste the text" #~ msgid "Paste to every vte" #~ msgstr "Yazıyı yapıştır" #~ msgid "Change the Opacity of window:" #~ msgstr "Pencere donukluğunu ayarlayın:" #~ msgid "" #~ "You may press any key here to get the key value for using in profile.\n" #~ "\n" #~ "Press [Copy] to copy the key value to clipboard;\n" #~ "And press [Close] to exit." #~ msgstr "" #~ "Profilde kullanmak için herhangi bir tuşa basıp ayarlayabilirsiniz.\n" #~ "\n" #~ "Panoya kopyalamak için [Kopyala] düğmesine basınız;\n" #~ "Çıkmak için [Kapat] düğmesine basınız." #~| msgid "Window opacity" #~ msgid "Window #%p:\n" #~ msgstr "Pencere donukluğu" #~| msgid "Force to close all the tabs and windows!" #~ msgid "Force to close all the tabs and windows, and exit " #~ msgstr "Bütün sekmeleri ve pencereleri kapatmaya zorla!" #~ msgid "" #~ "\t\t\tThis option will be ignored when using with -e/-x/--execute " #~ "option.\n" #~ msgstr "" #~ "\t\t\tBu seçenek -e/-x/--execute seçeneği kullanıldığında gözardı " #~ "edilecektir.\n" #~ msgid "Change the command line color on tab" #~ msgstr "Sekmedeki komut satırı rengini değiştir" #~ msgid "Change the current directory color on tab" #~ msgstr "Sekmedeki mevcut dizin rengini değiştir" #~ msgid "Change the custom tab text color" #~ msgstr "Özel sekme yazı rengini değiştir" #~ msgid "Change the root privileges color on tab" #~ msgstr "Sekmedeki root yetkileri rengini değiştir" #~ msgid "Change the normal tab text color" #~ msgstr "Normal sekme yazı rengini değiştir" #~ msgid "Change the cmdline color on tab" #~ msgstr "Komut satırına ait sekmenin rengini değiştir" #~ msgid "Change the custom color on tab" #~ msgstr "Sekmedeki özel rengi değiştir" #~ msgid "Change the root color on tab" #~ msgstr "Root haklarına sahip sekmenin rengini değiştir" #~ msgid "Change the normal color on tab" #~ msgstr "Normal sekme rengini değiştir" #, fuzzy #~ msgid "" #~ "%s\n" #~ "Your profile is %s/%s." #~ msgstr "" #~ "Kullandığınız %s profil dosyası: %s/%s\n" #~ "\n" #~ msgid "" #~ "Error while writing profile '%s/%s':\n" #~ "\n" #~ "%s\n" #~ msgstr "" #~ "Profil '%s/%s' kaydedilirken hata oluştu:\n" #~ "\n" #~ "%s\n" #~ msgid "Reset to default font/size" #~ msgstr "Öntanımlı font ve boyuta sıfırla" po/uk.po000066400000000000000000001433211246562641500124720ustar00rootroot00000000000000# Ukrainian translation of LilyTerm. # Copyright (C) 2010 Vladimir Smolyar # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2012-05-23 10:30+0300\n" "Last-Translator: Vladimir Smolyar \n" "Language-Team: Ukrainian\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Ukrainian\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "Будь ласка, повідомляйте про помилки на <%s>.\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "Дякуємо за використання %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s - це емулятор терміналу, заснований на libvte.\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "Використовуйте -T/--title {заголовок} для вказання заголовка вікна.\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "Використовуйте -T/--title {заголовок} для вказання заголовка вікна.\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "" "Використовуйте -t/--tab {кількість} для відкриття кількох вкладок під час " "запуску програми.\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "" "Використовуйте -d/--directory {каталог} для вказання початкового каталогу " "під час запуску.\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "" "Використовуйте -g/--geometry {ШИРИНАxВИСОТА[+-]ГОР.ЗСУВ[+-]ВЕРТ.ЗСУВ} для " "вказання геометрії вікна.\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "" "Використовуйте -l/-ls/--login для відкриття оболонки входу до системи (вводу " "логіна).\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" "Використовуйте -H/--hold для утримання вікна терміналу відкритим після " "завершення команди за -e/-x .\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "Використовуйте -s/--separate для запуску окремого процесу.\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "Використовуйте -p/--profile для отримання зразка профілю.\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "Використовуйте -u/--user_profile {%s} для вибору певного профілю.\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "" "Використовуйте -v/--version для відображення інформації про версію " "програми.\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command. (Must be the final " #| "option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "Використовуйте -e/-x/--execute {команда} для виконання команди під час " "запуску програми.\n" " (Має бути останнім параметром).\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "Системна конфігурація %s: %s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "Ваш профіль %s:" #: console.c:224 msgid "Default key binding:" msgstr "Комбінація клавіш за замовчуванням:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr "" " * <`> Заборонити/Дозволити гіперпосилання, сполучення " "клавіш та меню правої кнопки миші." #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr " * Додати нову вкладку у поточному каталозі.\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * Перейти до попередньої/наступної вкладки.\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * Перейти до першої/останньої вкладки.\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> Премістити поточну вкладку вперед/назад.\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr "" " * Перемістити поточну вкладку на початок/кінець.\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * Перейти до 1-ї ÷ 12-ї вкладки.\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr "" " * <+/-/Enter> Збільшити/зменшити/скинути розмір шрифту на поточній " "вкладці.\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * Емулювати прокрутку миші вгору/вниз у терміналі.\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr "" " * Запитує прокрутку вгору/вниз на 1 рядок у " "терміналі.\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * Поведінка Gtk+ за замовчуванням, прокрутка вгору/" "вниз у терміналі.\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr "" " * Поведінка Gtk+ за замовчуванням, прокрутка на " "початок/кінець.\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * Розгорнути/згорнути вікно та перемикання " "повноекранного режиму.\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * Знайти текст у терміналі.\n" " Використовуйте / для пошуку Вперед/" "Назад.\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr " * Виділити увесь текст у терміналі.\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr "" " * Скопіювати текст до буферу обміну / Вставити текст з " "буферу обміну.\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr "" " * Скопіювати текст до головного буферу обміну / " "Вставити текст з головного буферу обміну.\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "" " (тобто емулювати натиснення середньої клавіші миші " "для вставки тексту)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "Деякі корисні сполучення клавіш, вимкнені за замовчуванням:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * Закрити поточну вкладку.\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (Рекомендується закривати вкладки за допомогою " " або команди 'exit')\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr " * Відкрити нове вікно із поточним каталогом.\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * Перейменувати поточну вкладку.\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "" "Підказка: Ці сполучення клавіш можна змінити та вимкнути у контекстному меню " "[%s]." #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "Встановити сполучення клавіш" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "Виникла наступна помилка:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "Перейменування поточної вкладки" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "Будь ласка, уведіть назву для цієї вкладки:" #: dialog.c:211 msgid "Label Name:" msgstr "Назва:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "Знайти рядок" #: dialog.c:235 msgid "Find: " msgstr "Знайти:" #: dialog.c:258 msgid "Find previous string" msgstr "Знайти попередній рядок" #: dialog.c:264 msgid "Find next string" msgstr "Знайти наступний рядок" #: dialog.c:275 msgid "Case sensitive" msgstr "З урахуванням регістру" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "Використовувати регулярні вирази Perl" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "Вставити текст до всіх терміналів Vte" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "Будь ласка, уведіть текст для вставки до терміналів Vte:" #: dialog.c:343 msgid "Text:" msgstr "Текст:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "Додати переведення рядку до кінця тексту." #: dialog.c:388 msgid "Grab keys" msgstr "Захопити клавіші" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "Вставити захоплені клавіші до терміналів Vte.\n" "Це може бути корисним для вставки комбінацій клавіш, як ." #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr " Значення сполучення клавіш: " #: dialog.c:423 msgid "Entry" msgstr "Уміст" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "" "Додавання нових локалізацій та встановлення локалізації за замовчуванням" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "Локалізація, встановлювана за замовчуванням під час ініціалізації терміналу " "Vte.\n" "Наприклад, можна використати \"uk_UA\", \"uk_UA.KOI8-U\", або \"uk_UA." "UTF-8\"." #: dialog.c:451 msgid "Default locale:" msgstr "Локалізація за замовчуванням:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "Список локалізацій у меню правої клавіші миші, розділених пробілами.\n" "Наприклад, можна використати \"uk_UA\", \"uk_UA.KOI8-U\", або \"uk_UA." "UTF-8\".\n" "Якщо дані про локалізації не встановлено, можна використати \"UTF-8\"." #: dialog.c:463 msgid "Locales list:" msgstr "Список локалізацій:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "Зміна насиченості тла" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "Змінити насиченість тла:" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "Змінити колір тексту у терміналі" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "Змінити колір тла терміналу" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "Змінити колір курсору у терміналі" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the cursor color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "Змінити колір курсору у терміналі" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "Налаштувати яскравість кольорів ANSI" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "Інвертувати кольори" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "Змінити колір %s на вкладці" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "Жирний текст" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "Підтвердження закриття кількох вкладок" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "Ви збираєтеся закрити одразу кілька вкладок. Продовжити?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "ці вкладки" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "Ви можете натиснути + <клавіша> тут,\n" "щоб отримати значення сполучення клавіш." #: dialog.c:869 msgid "Get the key value for function key" msgstr "Отримання значення сполучення клавіш" #: dialog.c:922 msgid "Function Key Name" msgstr "Назва сполучення клавіш" #: dialog.c:926 msgid "Key Bindings" msgstr "Сполучення клавіш" #: dialog.c:934 msgid "Key Group: " msgstr " Група клавіш: " #: dialog.c:944 msgid "Note: " msgstr "Примітка: " #: dialog.c:966 msgid "Disable all the function keys." msgstr "Заборонити усі сполучення клавіш." #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "Використання для %s %s" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "Не забувайте зберігати налаштування після їх зміни!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "Використання" #: dialog.c:1031 msgid "Key binding" msgstr "Сполучення клавіш" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "Copyright (c) %s-%s %s. Усі права захищено.\n" "\n" "%s є вільним програмним забезпеченням; ви можете поширювати його та/або\n" "змінювати на умовах Універсальної громадської ліцензії GNU у тому вигляді,\n" "у якому її було опубліковано Фондом вільного програмного забезпечення;\n" "як версії 3, так і (за вашим розсудом) будь-якої більш пізньої версії.\n" "\n" "%s поширюється у надії, що вона буде корисною, але БЕЗ ЖОДНОЇ ГАРАНТІЇ;\n" "навіть без обов'язкової гарантії ТОВАРНОЇ ПРИДАТНОСТІ або ПРИДАТНОСТІ\n" "ДО ПЕВНОГО ПРИЗНАЧЕННЯ.\n" "Для більш детальної інформації див. Універсальну громадську ліцензію GNU.\n" "\n" "Ви мали отримати копію Універсальної громадської ліцензії GNU разом з %s;\n" "якщо ні, то відвідайте ." #: dialog.c:1052 msgid "License" msgstr "Ліцензія" #: dialog.c:1067 msgid "Translators" msgstr "Перекладачі" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, fuzzy, c-format #| msgid "Homepage:" msgid "HomePage: %s" msgstr "Сайт програми:" #: dialog.c:1073 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Github: %s" msgstr "Wiki: %s" #: dialog.c:1074 #, fuzzy, c-format #| msgid "Blog: %s" msgid "Blog: %s" msgstr "Блог: %s" #: dialog.c:1075 #, fuzzy, c-format #| msgid "Wiki: %s" msgid "Wiki: %s" msgstr "Wiki: %s" #: dialog.c:1076 #, fuzzy, c-format #| msgid "Issues: %s" msgid "Issues: %s" msgstr "Помилки: %s" #: dialog.c:1077 #, fuzzy, c-format #| msgid "IRC: %s" msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "Про програму" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "У вкладці №%d все ще виконується програма:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "" "Рекомендується перервати виконання командою\n" "`kill -9 %d', якщо процес не відповідає." #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "Все одно продовжити?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "Підказка:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "Підтвердження закриття програми, що виконується" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "цю вкладку" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "Змінити прозорість вікна" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "Змінити прозорість вікна:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "Змінити прозорість неактивного вікна" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "Змінити прозорість неактивного вікна:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "Налаштувати яскравість кольорів ANSI у терміналі" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "Налаштувати яскравість кольорів ANSI у неактивному стані" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr " намагається виконати наступну команду:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "Підтвердження виконання -e/-x/--execute команди" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "На вкладці №%d все ще працюють наступні програми:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "Рекомендується закривати вкладки за допомогою або 'exit'" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "Підтвердіть закриття вкладки із дочірнім процесом" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "У цьому вікні все ще виконуються наступні команди:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "Підтвердіть закриття вікна із дочірніми процесами" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "Підтвердіть закриття %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "У %s все ще виконуються наступні програми:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "Спроба вставити наступний текст до терміналу Vte:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "Підтвердіть вставку тексту до терміналу Vte" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "Спробувати вбити %s сигналом SIGKILL(), щоб запобігти\n" "перериванню цих програм! (МОЖЕ ПРИЗВЕСТИ ДО ВТРАТИ ДАНИХ!!)" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "Примусово закрити усі вкладки й вікна та вийти з %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(Заборонено, співпадає з [%s])" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(Заборонено)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "Схоже, локалізація \"%s\" НЕ підтримується вашою системою!\n" "Якщо ви нещодавно оновили дані локалізацій,\n" "будь ласка, закрийте усі вікна %s і спробуйте знову." #: dialog.c:3293 msgid "Not supported locale!" msgstr "Непідтримувана локалізація!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "" "Вам необхідно оновити до %s та перекомпілювати %s, щоб отримати підтримку " "цієї можливості." #: dialog.c:3365 msgid "Not supported feature!" msgstr "Непідтримувана функція!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "Заборонити усі сполучення клавіш групи [%s]." #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "Дані, отримані з сокета, схоже, неправильні.\n" "\n" "\tОтримана версія сокета: %s\n" "\tОчікувана версія сокета: %s\n" "\n" "Якщо ви нещодавно оновили %s,\n" "будь ласка, закрийте усі вікна %s і спробуйте знову." #: main.c:665 msgid "The format of socket data is out of date" msgstr "Формат даних сокета застарів" #: menu.c:59 msgid "Change text encoding" msgstr "Змінити кодування тексту" #: menu.c:60 msgid "New tab" msgstr "Нова вкладка" #: menu.c:61 msgid "New tab with specified locale" msgstr "Нова вкладка із вказаною локалізацією" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "Нове вікно із вказаним профілем" #: menu.c:80 msgid "Change the font" msgstr "Змінити шрифт" #: menu.c:87 msgid "Change colors" msgstr "Змінити кольори" #: menu.c:90 msgid "Change the cursor color" msgstr "Змінити колір курсору" #: menu.c:94 msgid "Change the foreground color" msgstr "Змінити колір тексту" #: menu.c:99 #, fuzzy #| msgid "Change the cursor color" msgid "Change the ANSI colors" msgstr "Змінити колір курсору" #: menu.c:104 msgid "Change the background color" msgstr "Змінити колір тла" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "Налаштувати яскравість кольорів ANSI" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "Налаштувати яскравість у неактивному стані" #: menu.c:138 msgid "Change ANSI color theme" msgstr "Змінити схему кольорів ANSI" #: menu.c:148 msgid "Background" msgstr "Тло" #: menu.c:154 msgid "Transparent window" msgstr "Прозоре вікно" #: menu.c:159 msgid "Window opacity" msgstr "Прозорість вікна" #: menu.c:162 msgid "Window opacity when inactive" msgstr "Прозорість неактивного вікна" #: menu.c:172 msgid "Transparent background" msgstr "Прозоре тло" #: menu.c:175 msgid "Background saturation" msgstr "Насиченість тла" #: menu.c:179 msgid "Set background image" msgstr "Встановити фонове зображення" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "Буфер обміну" #: menu.c:196 msgid "Copy URL" msgstr "Скопіювати URL" #: menu.c:201 msgid "Copy" msgstr "Копіювати" #: menu.c:205 msgid "Paste" msgstr "Вставити" #: menu.c:212 msgid "View clipboard" msgstr "Переглянути буфер обміну" #: menu.c:216 msgid "View primary clipboard" msgstr "Переглянути основний буфер обміну" #: menu.c:227 msgid "Scrollback lines" msgstr "Зворотна прокрутка рядків" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "Очистити рядки зворотної прокрутки" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "Різне " #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "Вставити до усіх терміналів Vte" #: menu.c:247 msgid "Launch file manager" msgstr "Запустити файловий менеджер" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "Прив'язування для стирання" #: menu.c:275 msgid "Cursor Shape" msgstr "Форма курсору" #: menu.c:292 msgid "Dim text when inactive" msgstr "Потьмарення тексту у неактивному стані" #: menu.c:297 msgid "Dim window when inactive" msgstr "Потьмарення неактивного вікна" #: menu.c:302 msgid "Cursor blinks" msgstr "Блимання курсора" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "Звуковий сигнал" #: menu.c:327 msgid "Visible bell" msgstr "Візуальний сигнал" #: menu.c:332 msgid "Urgent bell" msgstr "Екстрений сигнал" #: menu.c:342 msgid "Switch input methods" msgstr "Перемикання методів вводу" #: menu.c:361 msgid "Show the tabs bar" msgstr "Показати панель вкладок" #: menu.c:367 msgid "Hide the tabs bar" msgstr "Сховати панель вкладок" #: menu.c:374 msgid "Always show the tabs bar" msgstr "Завжди показувати панель вкладок" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "Завжди ховати панель вкладок" #: menu.c:391 msgid "Increase window size" msgstr "Збільшити розмір вікна" #: menu.c:394 msgid "Decrease window size" msgstr "Зменшити розмір вікна" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "Скинути шрифт на власний" #: menu.c:404 msgid "Reset to system font/size" msgstr "Скинути шрифт на системний" #: menu.c:409 msgid "Reset the content" msgstr "Скинути вміст" #: menu.c:424 msgid "User profile" msgstr "Профіль користувача" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "Вийти з %s" #: menu.c:502 msgid "grayscale" msgstr "градації сірого" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "Власна" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "Перемістити поточну сторінку вперед." #: menu.c:1099 msgid " (Wide)" msgstr "(широкий)" #: menu.c:1554 msgid "Font Selection" msgstr "Вибір шрифту" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "Додати інші локалізації..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "Інші налаштування..." #: menu.c:1963 msgid "Save settings automatically" msgstr "Автоматично зберігати налаштування" #: menu.c:1968 msgid "Save settings" msgstr "Зберегти налаштування" #: menu.c:1971 msgid "Save settings as..." msgstr "Зберегти налаштування як..." #: menu.c:1977 msgid "Reload settings" msgstr "Перезавантажити налаштування" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s за замовчуванням" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "Системна за замовчуванням" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "Наступні параметри:\n" "\n" "%s\n" "НЕ можуть бути застосовані до терміналів у поточному вікні.\n" "Скористайтеся замість цього [%s]." #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "Наступні параметри НЕ можуть бути застосовані " #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "Заборонено: Спробуйте використати [Прозоре тло] замість цього." #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "Прокручувати фонове зображення разом із текстом" #: menu.c:2719 msgid "Open File" msgstr "Відкрити файл" #: menu.c:2721 msgid "Save File" msgstr "Зберегти файл" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "Виникла наступна помилка: %s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "Помилка під час створення дочірнього процесу:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "Помилка створення дочірнього процесу!\n" "Переконайтеся, що /dev/pts підмонтовано як файлову систему devpts!" #: notebook.c:749 msgid "Error when creating child process" msgstr "Помилка створення дочірнього процесу" #: profile.c:854 msgid "Tab operation" msgstr "Управлінння вкладками " #: profile.c:855 msgid "Switch tab" msgstr "Перемикання вкладок " #: profile.c:856 msgid "Move tab" msgstr "Переміщення вкладок " #: profile.c:857 msgid "Switch to #? tab" msgstr "Перехід на вкладку №? " #: profile.c:858 msgid "Text operation" msgstr "Операції з текстом " #: profile.c:859 msgid "Scroll up/down" msgstr "Прокрутка вгору/вниз " #: profile.c:860 msgid "Font" msgstr "Шрифт " #: profile.c:865 msgid "Disable/Enable functions" msgstr "Заборонити/Дозволити функції" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "" "Заборонити/Дозволити гіперпосилання, сполучення\n" "клавіш та меню правої кнопки миші." #: profile.c:869 msgid "Add new tab" msgstr "Додати нову вкладку" #: profile.c:871 msgid "Add a new tab." msgstr "Додати нову вкладку." #: profile.c:873 msgid "Close tab" msgstr "Закрити вкладку" #: profile.c:875 msgid "Close current tab." msgstr "Закрити поточну вкладку." #: profile.c:877 msgid "Rename page name" msgstr "Перейменувати сторінку" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "Змінити ім'я сторінки для поточної вкладки." #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "Знайти рядки за шаблоном." #: profile.c:884 msgid "Find previous" msgstr "Знайти попереднє" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "Знайти попередній рядок за шаблоном пошуку." #: profile.c:887 msgid "Find next" msgstr "Знайти наступне" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "Знайти наступний рядок за шаблоном пошуку." #: profile.c:891 msgid "Switch to prev tab" msgstr "Перейти на попередню вкладку" #: profile.c:893 msgid "Switch to prev tab." msgstr "Перейти на попередню вкладку." #: profile.c:895 msgid "Switch to next tab" msgstr "Перейти на наступну вкладку" #: profile.c:897 msgid "Switch to next tab." msgstr "Перейти на наступну вкладку." #: profile.c:899 msgid "Switch to first tab" msgstr "Перейти на перушу вкладку" #: profile.c:901 msgid "Switch to first tab." msgstr "Перейти на першу вкладку." #: profile.c:903 msgid "Switch to last tab" msgstr "Перейти на останню вкладку" #: profile.c:905 msgid "Switch to last tab." msgstr "Перейти на останню вкладку." #: profile.c:907 msgid "Move page forward" msgstr "Перемістити сторінку вперед" #: profile.c:909 msgid "Move current page forward." msgstr "Перемістити поточну сторінку вперед." #: profile.c:911 msgid "Move page backward" msgstr "Перемістити сторінку назад" #: profile.c:913 msgid "Move current page backward." msgstr "Перемістити поточну сторінку назад." #: profile.c:915 msgid "Move page to first" msgstr "Зробити сторінку першою" #: profile.c:917 msgid "Move current page to first." msgstr "Зробити сторінку першою." #: profile.c:919 msgid "Move page to last" msgstr "Зробити сторінку останньою" #: profile.c:921 msgid "Move current page to last." msgstr "Зробити поточну сторінку останньою." #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "Перейти на вкладку №%d" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "Перейти прямо на вкладку №%d." #: profile.c:932 msgid "New window" msgstr "Нове вікно" #: profile.c:934 msgid "Open a new window with current dir." msgstr "Відкрити нове вікно із поточним каталогом." #: profile.c:936 msgid "Select all" msgstr "Вибрати все" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "Вибрати увесь текст у вікні терміналу Vte." #: profile.c:940 msgid "Copy to clipboard" msgstr "Скопіювати до буферу обміну" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "Скопіювати текст до буферу обміну." #: profile.c:944 msgid "Paste the text" msgstr "Вставити текст" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "Вибрати увесь текст у вікні терміналу Vte." #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "Скопіювати текст до буферу обміну." #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "Вставити текст з буферу обміну." #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "Збільшити розмір шрифту" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "Збільшити розмір шрифту на поточній вкладці." #: profile.c:960 msgid "Decrease font size" msgstr "Зменшити розмір шрифту" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "Зменшити розмір шрифту на поточній вкладці." #: profile.c:964 msgid "Reset font size" msgstr "Скинути розмір шрифту" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "" "Скинути розмір шрифту на поточній вкладці\n" "до початкового значення." #: profile.c:968 msgid "Maximize the window" msgstr "Максимізувати вікно" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "" "Спробувати максимізувати вікно для використання\n" "усього простору вашого екрану." #: profile.c:972 msgid "Full screen" msgstr "Повноекранний режим" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "Запит переведення вікна до повноекранного/звичайного режиму" #: profile.c:976 msgid "Scroll up" msgstr "Прокрутка вгору" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "" "Емулювати прокрутку миші вгору\n" "у вікні терміналу Vte." #: profile.c:980 msgid "Scroll down" msgstr "Прокрутка вниз" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "" "Емулювати прокрутку миші вниз\n" "у вікні терміналу Vte." #: profile.c:984 msgid "Scroll up 1 line" msgstr "Прокрутка вгору на 1 рядок" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "" "Запит прокрутки на 1 рядок вгору\n" "у вікні терміналу Vte." #: profile.c:988 msgid "Scroll down 1 line" msgstr "Прокрутка вниз на 1 рядок" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "" "Запит прокрутки вниз на 1 рядок\n" "у вікні терміналу Vte." #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "Очистити рядки зворотної прокрутки" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "Дамп даних відлагодження" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "Дамп даних для відлагодження LilyTerm." #: profile.c:1033 msgid "Window Title" msgstr "заголовка вікна" #: profile.c:1034 msgid "Running Command" msgstr "команди, що виконується" #: profile.c:1035 msgid "Current Dir" msgstr "поточного каталогу" #: profile.c:1036 msgid "Custom Tab Name" msgstr "своєї назви вкладки" #: profile.c:1037 msgid "Root Privileges" msgstr "привілеїв адміністратора" #: profile.c:1038 msgid "Normal Text" msgstr "звичайного тексту" #: profile.c:1072 msgid "Shift" msgstr "Shift" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 #, fuzzy #| msgid "Background" msgid "Background Color" msgstr "Тло" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "Змінити колір тексту" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "Файл призначення НЕ існує" #: profile.c:2996 msgid "The target file is a directory" msgstr "Файл призначення є каталогом" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "Помилка запису профілю '%s':" #: profile.c:3049 msgid "Error when writing profile" msgstr "Помилка запису профілю" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "У цій версії додано, видалено чи змінено деякі параметри профілю.\n" "Будь ласка, використовуйте [Зберегти налаштування] у меню правої кнопки " "миші,\n" "щоб зберегти ваші налаштування, і відредагуйте його вручну за необхідності.\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "Ваш профіль - %s." #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "Формат вашого профілю застарів" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "Профіль \"%s\" некоректний:\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "Профіль некоректний!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\tВікно №%d, Сторінка №%d: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\tСторінка №%d: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "Системний за замовчуванням" #~ msgid "Join and paste" #~ msgstr "Об'єднати та вставити" #~ msgid "%s (Main site)" #~ msgstr "%s (Головна сторінка)" #~ msgid "%s (Traditional Chinese site)" #~ msgstr "%s (Сторінка традиційною китайською)" #~ msgid "%s (Github site)" #~ msgstr "%s (сторінка на Github)" #~ msgid "Your %s profile is: " #~ msgstr "Ваш профіль %s:" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "Будь ласка, повідомляйте про помилки на %s.\n" #~ "Дякуємо за використання %s!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr "" #~ " * \tПоведінка Vte за замовчуванням, вставити текст з " #~ "основного буферу обміну\n" #~ msgid "Shortcut Key" #~ msgstr "Сполучення клавіш" #~ msgid "Set function key value" #~ msgstr "Встановити сполучення клавіш" po/zh_CN.po000066400000000000000000001217771246562641500130670ustar00rootroot00000000000000# Simplified Chinese translation of LilyTerm. # Copyright (C) 2010 GoGoNKT # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2008-03-21 00:30+0800\n" "Last-Translator: GoGoNKT \n" "Language-Team: GoGoNKT \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, fuzzy, c-format #| msgid "" #| "\n" #| "Please report bug to %s. Thank you for using %s!" msgid "Please report bug at <%s>.\n" msgstr "" "\n" "请向 %s 回报错误。感谢您使用 %s!" #: console.c:122 dialog.c:1078 #, fuzzy, c-format #| msgid "" #| "\n" #| "Please report bug to %s. Thank you for using %s!" msgid "Thank you for using %s!" msgstr "" "\n" "请向 %s 回报错误。感谢您使用 %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s 是 libvte X 终端模拟器。\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "使用 -T/--title {标题} 来指定窗口的标题。\n" #: console.c:142 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "使用 -T/--title {标题} 来指定窗口的标题。\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "使用 -t/--tab {数目} 来在启动后开启多个分页。\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "使用 -d/--directory {目录} 来指定启动后的初始目录。\n" #: console.c:146 #, fuzzy #| msgid "Use -T/--title {title} to specify the window title.\n" msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "使用 -T/--title {标题} 来指定窗口的标题。\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "使用 -l/-ls/--login 来在呼叫 shell 时启用 login shell。\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "使用 -s/--separate 来以独立行程运行。\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "" #: console.c:153 #, fuzzy #| msgid "Use -p/--profile to got a profile sample.\n" msgid "Use -p/--profile to get a profile sample.\n" msgstr "使用 -p/--profile 以生成设置样板。\n" #: console.c:155 #, fuzzy, c-format #| msgid "" #| "Use -u/--user_profile {%s} to use a specified profile.\n" #| "\n" msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "" "以 -u/--user_profile {%s} 指定配置文件。\n" "\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "使用 -v/--version 来显示版本信息。\n" #: console.c:157 #, fuzzy #| msgid "" #| "Use -e/-x/--execute {Command} to run a command when starting up. (Must be " #| "the final option).\n" msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "使用 -e/-x/--execute {命令} 来在启动后执行某一特定程序。(须为最后一个选" "项)\n" #: console.c:159 #, fuzzy, c-format #| msgid "The %s system config is: %s/%s\n" msgid "The %s system configure file is: %s\n" msgstr "%s 的系统配置文件为:%s/%s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "而 %s 个人配置文件是:" #: console.c:224 #, fuzzy #| msgid "Erase Binding" msgid "Default key binding:" msgstr "删除键值" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 #, fuzzy #| msgid "" #| " * <`>\t\tDisable/Enable hyperlinks, function keys and right click " #| "menu.\n" msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr " * <`>\t\t激活/关闭超链接、功能键,及右键菜单。\n" #: console.c:229 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab.\n" msgid " * Add a New tab with current directory.\n" msgstr " * \t\t增加分页/关闭当前分页。\n" #: console.c:230 #, fuzzy #| msgid " * \tSwitch to Prev/Next tab.\n" msgid " * Switch to Prev/Next tab.\n" msgstr " * \t切换至上/下分页。\n" #: console.c:231 #, fuzzy #| msgid " * \tSwitch to First/Last tab.\n" msgid " * Switch to First/Last tab.\n" msgstr " * \t切换至第一/最后分页。\n" #: console.c:232 #, fuzzy #| msgid " * <[/]>\t\tMove current tab Forward/Backward.\n" msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]>\t\t往前移/后移该分页。\n" #: console.c:233 #, fuzzy #| msgid " * \tMove current tab to First/Last.\n" msgid " * Move current tab to First/Last.\n" msgstr " * \t将该分页移至第一/最后一页。\n" #: console.c:234 #, fuzzy #| msgid " * \tSwitch to 1st ~ 12th tab.\n" msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * \t切换到 1~12 分页。\n" #: console.c:235 #, fuzzy #| msgid "" #| " * <+/-/Enter>\tIncrease/Decrease/Reset the font size of current " #| "tab.\n" msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr " * <+/-/Enter>\t放大/缩小/重置目前分页的字体大小。\n" #: console.c:236 #, fuzzy #| msgid "" #| " * \tEmulate a mouse Scroll Up/Down event on Vte " #| "Terminal box.\n" msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr "" " * \t在 Vte 终端窗口里模拟一个鼠标滚轮向上/下卷动事件。\n" #: console.c:237 #, fuzzy #| msgid "" #| " * \tAsks to Scroll Up/Down 1 line on Vte Terminal box.\n" msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr " * \t试着在 Vte 终端窗口里向上/下卷动一行。\n" #: console.c:238 #, fuzzy #| msgid "" #| " * \tGtk+ default behavior, Scroll Up/Down on Vte " #| "Terminal box.\n" msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr "" " * \tGtk+ 默认功能,在 Vte 终端窗口里向上/下卷动。\n" #: console.c:239 #, fuzzy #| msgid "" #| " * \tGtk+ default behavior, Scroll the Terminal box to " #| "to Top/Bottom.\n" msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr " * \tGtk+ 默认功能,将 Vte 终端窗口卷至顶/底部。\n" #: console.c:240 #, fuzzy #| msgid "" #| " * \tSwitch between fullwindow/unfullwindow and " #| "fullscreen/unfullscreen state.\n" msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr " * \t窗口 全窗口/非全窗口 及 全屏/非全屏 模式切换。\n" #: console.c:241 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box.\n" msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr " * \t\t全选 Vte 终端窗口里的文字。\n" #: console.c:243 #, fuzzy #| msgid " * \t\tSelect all the text in the Vte Terminal box.\n" msgid " * Select all the text in the terminal.\n" msgstr " * \t\t全选 Vte 终端窗口里的文字。\n" #: console.c:244 #, fuzzy #| msgid "" #| " * \t\tCopy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in clipboard.\n" msgstr " * \t\t将文字复制至剪贴板/贴上剪贴板中的文字。\n" #: console.c:245 #, fuzzy #| msgid "" #| " * \t\tCopy the text to clipboard / Paste the text in " #| "clipboard.\n" msgid " * Copy/Paste the text in primary clipboard.\n" msgstr " * \t\t将文字复制至剪贴板/贴上剪贴板中的文字。\n" #: console.c:246 #, fuzzy #| msgid "\t\t\t(i.e. Emulate a middle button mouse click to paste the text)" msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr "\t\t\t(即:模拟按下了鼠标中键贴上文字)" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "" #: console.c:249 #, fuzzy #| msgid " * \t\tAdd a New tab/Close current tab.\n" msgid " * Trying to close current tab.\n" msgstr " * \t\t增加分页/关闭当前分页。\n" #: console.c:250 #, fuzzy #| msgid "\t\t\t(Using or 'exit' to close tabs is recommended)\n" msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "\t\t\t(建议使用 或 exit 关闭分页)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr "" #: console.c:252 #, fuzzy #| msgid " * \t\tRename current tab.\n" msgid " * Rename the current tab.\n" msgstr " * \t\t更改目前分页名字。\n" #: console.c:259 #, fuzzy, c-format #| msgid "" #| "Default shortcut key: (It may custom or disable by right click menu [Set " #| "function key value])" msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "默认快捷键:(在鼠标右键菜单中【设置功能键值】里设置或关闭)" #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "" #: dialog.c:122 dialog.c:3352 menu.c:2885 #, fuzzy #| msgid "The following error is occurred:" msgid "The following error occurred:" msgstr "发生了以下的错误:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "更改此分页的名字" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "请输入这个分页的名字:" #: dialog.c:211 msgid "Label Name:" msgstr "分页名字:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "" #: dialog.c:235 msgid "Find: " msgstr "" #: dialog.c:258 msgid "Find previous string" msgstr "" #: dialog.c:264 msgid "Find next string" msgstr "" #: dialog.c:275 msgid "Case sensitive" msgstr "" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "" #: dialog.c:324 dialog.c:397 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste texts to every Vte Terminal" msgstr "全选 Vte 终端窗口里的文字。" #: dialog.c:342 #, fuzzy #| msgid "Please input the Label Name of this tab:" msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "请输入这个分页的名字:" #: dialog.c:343 msgid "Text:" msgstr "" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "" #: dialog.c:388 msgid "Grab keys" msgstr "" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "键值:" #: dialog.c:423 msgid "Entry" msgstr "" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" #: dialog.c:451 msgid "Default locale:" msgstr "" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" #: dialog.c:463 msgid "Locales list:" msgstr "" #: dialog.c:471 msgid "Change the saturation of background" msgstr "改变背景透明度" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "改变背景透明度" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "改变终端文字颜色" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "更改终端背景颜色" #: dialog.c:556 #, fuzzy #| msgid "Change the background color in terminal" msgid "Change the cursor color in terminal" msgstr "更改终端背景颜色" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "" #: dialog.c:588 dialog.c:2234 #, fuzzy, c-format #| msgid "Change the background color in terminal" msgid "Change the ansi color [%s] in terminal" msgstr "更改终端背景颜色" #: dialog.c:617 #, fuzzy #| msgid "Adjust the brightness of ANSI colors" msgid "The brightness of ANSI colors:" msgstr "调整 ANSI 颜色亮度" #: dialog.c:633 msgid "ANSI Colors:" msgstr "" #: dialog.c:638 menu.c:471 #, fuzzy #| msgid "Change colors" msgid "Invert color" msgstr "改变颜色" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "改变分页上的 %s 颜色" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "粗体文字范例" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "确认是否关闭多个分页" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "将会关闭多个分页。是否无论如何仍继续?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "这些分页" #: dialog.c:867 #, fuzzy #| msgid "" #| "You may press + here\n" #| "to get the key value used for the function key." msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "您可以在此按下 加上 <任何键>\n" "以取功能键可用的键值。" #: dialog.c:869 msgid "Get the key value for function key" msgstr "取得功能键的键值" #: dialog.c:922 #, fuzzy #| msgid "Set function key value" msgid "Function Key Name" msgstr "设置功能键值" #: dialog.c:926 #, fuzzy #| msgid "Erase Binding" msgid "Key Bindings" msgstr "删除键值" #: dialog.c:934 msgid "Key Group: " msgstr "键群组:" #: dialog.c:944 msgid "Note: " msgstr "说明:" #: dialog.c:966 msgid "Disable all the function keys." msgstr "关闭所有的功能键。" #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "%s %s 的使用说明" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "使用说明" #: dialog.c:1031 #, fuzzy #| msgid "Erase Binding" msgid "Key binding" msgstr "删除键值" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" #: dialog.c:1052 msgid "License" msgstr "" #: dialog.c:1067 msgid "Translators" msgstr "" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "" #: dialog.c:1084 msgid "About" msgstr "" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "在 #%d 分页上有个前台程序尚在执行:" #: dialog.c:1103 #, fuzzy, c-format #| msgid "" #| "Terminate it by using `kill -9 %d' is recommend if it is non-response." msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "若失去响应,建议使用 `kill -9 %d' 来终止它。" #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "是否无论如何仍继续?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "小技巧:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "确认是否关闭正在前台运行的程序" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "此分页" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "改变窗口透明度" #: dialog.c:1146 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window:" msgstr "改变窗口透明度" #: dialog.c:1156 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive" msgstr "改变窗口透明度" #: dialog.c:1158 #, fuzzy #| msgid "Change the opacity of window" msgid "Change the opacity of window when inactive:" msgstr "改变窗口透明度" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "调整终端里的 ANSI 颜色亮度" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "调整未激活时 ANSI 颜色亮度" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr "正尝试执行以下命令:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "确认是否执行 -e/-x/--execute 命令" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "以下程序尚在 #%d 分页里执行:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "建议用 或 exit 来关闭分页" #: dialog.c:1301 #, fuzzy #| msgid "Confirm to close a tab with child proccess" msgid "Confirm to close a tab with child process" msgstr "确认是否关闭尚有子行程的分页" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "以下程序尚在此窗口执行:" #: dialog.c:1331 #, fuzzy #| msgid "Confirm to close a window with child proccess" msgid "Confirm to close a window with child process" msgstr "确认是否关闭尚有子行程的窗口" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "确认是否关闭 %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "以下程序尚在 %s 里执行:" #: dialog.c:1383 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "全选 Vte 终端窗口里的文字。" #: dialog.c:1390 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Confirm to paste texts to the Vte Terminal" msgstr "全选 Vte 终端窗口里的文字。" #: dialog.c:1408 msgid "Join" msgstr "" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "" #: dialog.c:1421 msgid "Strip" msgstr "" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "尝试用 SIGKILL() 强制关闭%s以免中断这些程序!\n" "【 可 能 导 致 资 料 丟 失 ! ! 】" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "强制关闭所有分页及窗口,并退出 %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(已关闭)" #: dialog.c:3289 #, fuzzy, c-format #| msgid "" #| "The data got from socket seems incorrect.\n" #| "If you just updated %s recently,\n" #| "Please close all the windows of %s and try again." msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "经由 Socket 所取得的数据似乎不太正确。\n" "如果您刚刚升级了 %s,\n" "请关闭所有的 %s 窗口并再试一次。" #: dialog.c:3293 msgid "Not supported locale!" msgstr "不被支持的 locale!" #: dialog.c:3364 #, fuzzy, c-format #| msgid "You should upgrade to %s to support this feature." msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "您应当升级至 %s 以支持这个功能。" #: dialog.c:3365 msgid "Not supported feature!" msgstr "不被支持的功能!" #: dialog.c:3513 #, fuzzy, c-format #| msgid "Disable all the function keys of this group." msgid "Disable all the function keys of [%s] group." msgstr "关闭该群组的功能键。" #: main.c:657 #, fuzzy, c-format #| msgid "" #| "The data got from socket seems incorrect.\n" #| "If you just updated %s recently,\n" #| "Please close all the windows of %s and try again." msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "经由 Socket 所取得的数据似乎不太正确。\n" "如果您刚刚升级了 %s,\n" "请关闭所有的 %s 窗口并再试一次。" #: main.c:665 msgid "The format of socket data is out of date" msgstr "Socket 资料的格式已过时" #: menu.c:59 msgid "Change text encoding" msgstr "改变文字编码" #: menu.c:60 msgid "New tab" msgstr "新分页" #: menu.c:61 msgid "New tab with specified locale" msgstr "以特定 locale 开新分页" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "使用特定配置开启新窗口" #: menu.c:80 msgid "Change the font" msgstr "改变字体" #: menu.c:87 msgid "Change colors" msgstr "改变颜色" #: menu.c:90 #, fuzzy #| msgid "Change the background color" msgid "Change the cursor color" msgstr "改变背景颜色" #: menu.c:94 msgid "Change the foreground color" msgstr "改变文字颜色" #: menu.c:99 #, fuzzy #| msgid "Change the background color" msgid "Change the ANSI colors" msgstr "改变背景颜色" #: menu.c:104 msgid "Change the background color" msgstr "改变背景颜色" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "调整 ANSI 颜色亮度" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "调整未激活时颜色亮度" #: menu.c:138 msgid "Change ANSI color theme" msgstr "改变 ANSI 颜色主题" #: menu.c:148 #, fuzzy #| msgid "Background saturation" msgid "Background" msgstr "背景透明度" #: menu.c:154 msgid "Transparent window" msgstr "透明窗口" #: menu.c:159 msgid "Window opacity" msgstr "窗口透明度" #: menu.c:162 #, fuzzy #| msgid "Dim text when inactive" msgid "Window opacity when inactive" msgstr "未激活时将文字变暗" #: menu.c:172 msgid "Transparent background" msgstr "透明背景" #: menu.c:175 msgid "Background saturation" msgstr "背景透明度" #: menu.c:179 msgid "Set background image" msgstr "设置背景图片" #: menu.c:192 window.c:3862 #, fuzzy #| msgid "Copy to clipboard." msgid "Clipboard" msgstr "复制至剪贴板。" #: menu.c:196 msgid "Copy URL" msgstr "复制 URL" #: menu.c:201 msgid "Copy" msgstr "复制" #: menu.c:205 msgid "Paste" msgstr "粘贴" #: menu.c:212 #, fuzzy #| msgid "Copy to clipboard." msgid "View clipboard" msgstr "复制至剪贴板。" #: menu.c:216 #, fuzzy #| msgid "Copy to clipboard." msgid "View primary clipboard" msgstr "复制至剪贴板。" #: menu.c:227 msgid "Scrollback lines" msgstr "历史卷轴" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "清除历史卷轴" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "其他" #: menu.c:244 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste to every Vte Terminal" msgstr "全选 Vte 终端窗口里的文字。" #: menu.c:247 msgid "Launch file manager" msgstr "" #: menu.c:252 msgid "View page info" msgstr "" #: menu.c:260 msgid "Erase Binding" msgstr "删除键值" #: menu.c:275 msgid "Cursor Shape" msgstr "" #: menu.c:292 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim text when inactive" msgstr "未激活时将文字变暗" #: menu.c:297 #, fuzzy #| msgid "Dim text when inactive" msgid "Dim window when inactive" msgstr "未激活时将文字变暗" #: menu.c:302 msgid "Cursor blinks" msgstr "游标闪烁" #: menu.c:306 msgid "Allow bold text" msgstr "" #: menu.c:313 msgid "Need pressed to open URL" msgstr "" #: menu.c:316 msgid "Disable URL when pressed" msgstr "" #: menu.c:323 msgid "Audible bell" msgstr "发出哔声" #: menu.c:327 #, fuzzy #| msgid "Audible bell" msgid "Visible bell" msgstr "发出哔声" #: menu.c:332 msgid "Urgent bell" msgstr "" #: menu.c:342 msgid "Switch input methods" msgstr "切换输入法" #: menu.c:361 msgid "Show the tabs bar" msgstr "显示分页栏" #: menu.c:367 msgid "Hide the tabs bar" msgstr "隐藏分页栏" #: menu.c:374 #, fuzzy #| msgid "Show the tabs bar" msgid "Always show the tabs bar" msgstr "显示分页栏" #: menu.c:381 #, fuzzy #| msgid "Hide the tabs bar" msgid "Always hide the tabs bar" msgstr "隐藏分页栏" #: menu.c:391 msgid "Increase window size" msgstr "放大窗口" #: menu.c:394 msgid "Decrease window size" msgstr "缩小窗口" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "重置为使用者自订的字体及大小" #: menu.c:404 msgid "Reset to system font/size" msgstr "重置为系统字体及大小" #: menu.c:409 msgid "Reset the content" msgstr "重置分页的内容" #: menu.c:424 msgid "User profile" msgstr "使用者配置文件" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "退出 %s" #: menu.c:502 msgid "grayscale" msgstr "" #: menu.c:505 msgid "(build-in)" msgstr "" #: menu.c:518 #, fuzzy, c-format #| msgid "User custom" msgid "%s + custom" msgstr "用户设置" #: menu.c:655 #, fuzzy #| msgid "Move current page forward." msgid "View current page information" msgstr "往前移动该分页。" #: menu.c:1099 msgid " (Wide)" msgstr "(宽)" #: menu.c:1554 msgid "Font Selection" msgstr "选择字体" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "" #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "其它配置文件…" #: menu.c:1963 #, fuzzy #| msgid "Save settings as..." msgid "Save settings automatically" msgstr "储存设置为…" #: menu.c:1968 msgid "Save settings" msgstr "储存设置" #: menu.c:1971 msgid "Save settings as..." msgstr "储存设置为…" #: menu.c:1977 #, fuzzy #| msgid "Save settings" msgid "Reload settings" msgstr "储存设置" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s 默认值" #: menu.c:2034 #, fuzzy #| msgid "System default (SCHEME)" msgid "System default" msgstr "系统默认值" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "以下设置:\n" "\n" "%s\n" "无法套用至这个窗口里的终端。\n" "请用【%s】代替。" #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "无法套用以下设置" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "关闭:尝试以【透明背景】代替。" #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "随着文字卷动背景图片" #: menu.c:2719 msgid "Open File" msgstr "" #: menu.c:2721 msgid "Save File" msgstr "" #: menu.c:2883 #, fuzzy, c-format #| msgid "The following error is occurred:" msgid "The following error occurred: %s" msgstr "发生了以下的错误:" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "在建立此子行程时发生错误:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" #: notebook.c:749 msgid "Error when creating child process" msgstr "在建立子行程时发生错误" #: profile.c:854 msgid "Tab operation" msgstr "分页操作" #: profile.c:855 msgid "Switch tab" msgstr "切换分页" #: profile.c:856 msgid "Move tab" msgstr "移动分页" #: profile.c:857 msgid "Switch to #? tab" msgstr "切换至 #? 分页" #: profile.c:858 msgid "Text operation" msgstr "文字操作" #: profile.c:859 msgid "Scroll up/down" msgstr "向上/下卷动" #: profile.c:860 msgid "Font" msgstr "字体" #: profile.c:865 msgid "Disable/Enable functions" msgstr "关闭/启用功能" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "关闭/启用超链接、功能键,及右键菜单。" #: profile.c:869 msgid "Add new tab" msgstr "新增分页" #: profile.c:871 msgid "Add a new tab." msgstr "新增一个分页。" #: profile.c:873 msgid "Close tab" msgstr "关闭分页" #: profile.c:875 msgid "Close current tab." msgstr "关闭当前的分页。" #: profile.c:877 msgid "Rename page name" msgstr "更改分页名程" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "更改当前分页的名字。" #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "" #: profile.c:884 msgid "Find previous" msgstr "" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "" #: profile.c:887 msgid "Find next" msgstr "" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "" #: profile.c:891 msgid "Switch to prev tab" msgstr "切换至上个分页" #: profile.c:893 msgid "Switch to prev tab." msgstr "切换至上个分页。" #: profile.c:895 msgid "Switch to next tab" msgstr "切换至下个分页" #: profile.c:897 msgid "Switch to next tab." msgstr "切换至下个分页。" #: profile.c:899 msgid "Switch to first tab" msgstr "切换至第一个分页" #: profile.c:901 msgid "Switch to first tab." msgstr "切换至第一个分页。" #: profile.c:903 msgid "Switch to last tab" msgstr "切换至最后一个分页" #: profile.c:905 msgid "Switch to last tab." msgstr "切换至最后一个分页。" #: profile.c:907 msgid "Move page forward" msgstr "往前移动分页" #: profile.c:909 msgid "Move current page forward." msgstr "往前移动该分页。" #: profile.c:911 msgid "Move page backward" msgstr "往后移动分页" #: profile.c:913 msgid "Move current page backward." msgstr "往后移动该分页。" #: profile.c:915 msgid "Move page to first" msgstr "将分页移至第一页" #: profile.c:917 msgid "Move current page to first." msgstr "将该分页移至第一页。" #: profile.c:919 msgid "Move page to last" msgstr "将分页移至最后一页" #: profile.c:921 msgid "Move current page to last." msgstr "将该分页移至最后一页。" #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "切换至第 %d 分页" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "直接切换至第 %d 分页。" #: profile.c:932 msgid "New window" msgstr "" #: profile.c:934 msgid "Open a new window with current dir." msgstr "" #: profile.c:936 msgid "Select all" msgstr "全选" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "全选 Vte 终端窗口里的文字。" #: profile.c:940 #, fuzzy #| msgid "Copy to clipboard." msgid "Copy to clipboard" msgstr "复制至剪贴板。" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "将文字复制至剪贴板。" #: profile.c:944 msgid "Paste the text" msgstr "贴上文字" #: profile.c:946 #, fuzzy #| msgid "Select all the text in the Vte Terminal box." msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "全选 Vte 终端窗口里的文字。" #: profile.c:948 #, fuzzy #| msgid "Copy the text to clipboard." msgid "Copy the text to primary clipboard" msgstr "将文字复制至剪贴板。" #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" #: profile.c:952 #, fuzzy #| msgid "Paste the text in clipboard." msgid "Paste the text in primary clipboard" msgstr "贴上剪贴板中的文字。" #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" #: profile.c:956 msgid "Increase font size" msgstr "放大字体" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "放大目前分页的字体。" #: profile.c:960 msgid "Decrease font size" msgstr "缩小字体" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "缩小目前分页的字体。" #: profile.c:964 msgid "Reset font size" msgstr "重置字体大小" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "将目前分页的字体重置为原始大小。" #: profile.c:968 msgid "Maximize the window" msgstr "窗口放至最大" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "将窗口放至最大以使用您所有的显示空间。" #: profile.c:972 msgid "Full screen" msgstr "全屏幕" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "尝试让窗口在全屏幕/正常屏幕中切换。" #: profile.c:976 msgid "Scroll up" msgstr "向上卷动" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "在 Vte 终端窗口里模拟一个鼠标滚轮向上卷动事件。" #: profile.c:980 msgid "Scroll down" msgstr "向下卷动" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "在 Vte 终端窗口里模拟一个鼠标滚轮向下卷动事件。" #: profile.c:984 msgid "Scroll up 1 line" msgstr "向上卷动一行" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "试着在 Vte 终端窗口里向上卷动一行。" #: profile.c:988 msgid "Scroll down 1 line" msgstr "向下卷动一行" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "试着在 Vte 终端窗口里向下卷动一行。" #: profile.c:994 #, fuzzy #| msgid "Clean scrollback lines" msgid "Asks to clean scrollback lines." msgstr "清除历史卷轴" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "印出即时除错信息" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "印出 LilyTerm 的即时信息以便除错。" #: profile.c:1033 msgid "Window Title" msgstr "窗口标题" #: profile.c:1034 msgid "Running Command" msgstr "正在执行的命令" #: profile.c:1035 msgid "Current Dir" msgstr "目前目录" #: profile.c:1036 msgid "Custom Tab Name" msgstr "自订的分页名字" #: profile.c:1037 msgid "Root Privileges" msgstr "Root 权限" #: profile.c:1038 msgid "Normal Text" msgstr "一般文字" #: profile.c:1072 msgid "Shift" msgstr "" #: profile.c:1076 msgid "Ctrl" msgstr "" #: profile.c:1078 msgid "Alt" msgstr "" #: profile.c:1088 msgid "Win" msgstr "" #: profile.c:1132 #, fuzzy #| msgid "Background saturation" msgid "Background Color" msgstr "背景透明度" #: profile.c:1133 msgid "Dark Red" msgstr "" #: profile.c:1134 msgid "Dark Green" msgstr "" #: profile.c:1135 msgid "Dark Yellow" msgstr "" #: profile.c:1136 msgid "Dark Blue" msgstr "" #: profile.c:1137 msgid "Dark Magenta" msgstr "" #: profile.c:1138 msgid "Dark Cyan" msgstr "" #: profile.c:1139 msgid "Dark White" msgstr "" #: profile.c:1140 msgid "Bright Black" msgstr "" #: profile.c:1141 msgid "Bright Red" msgstr "" #: profile.c:1142 msgid "Bright Green" msgstr "" #: profile.c:1143 msgid "Bright Yellow" msgstr "" #: profile.c:1144 msgid "Bright Blue" msgstr "" #: profile.c:1145 msgid "Bright Magenta" msgstr "" #: profile.c:1146 msgid "Bright Cyan" msgstr "" #: profile.c:1147 #, fuzzy #| msgid "Change the foreground color" msgid "Foreground Color" msgstr "改变文字颜色" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "目标文件并不存在" #: profile.c:2996 msgid "The target file is a directory" msgstr "目标文件是个目录" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "写入配置文件 %s 时发生错误:" #: profile.c:3049 msgid "Error when writing profile" msgstr "写入配置文件时发生错误" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "这个版本里的个人配置文件中已新增/移除/修改了某些项目,\n" "请使用右键菜单中的【储存设置】来储存您的设置,\n" "并视形况加以修改。\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "您的个人配置文件为:%s。" #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "您的配置文件格式已过时" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "无法取得配置文件 \"%s\":\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "配置文件无效!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\t第 #%d 窗口,第 #%d 分页: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\t第 #%d 分页: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "系统默认值" #, fuzzy #~| msgid "And your %s profile is: " #~ msgid "Your %s profile is: " #~ msgstr "而 %s 个人配置文件是:" #, fuzzy #~| msgid "" #~| "\n" #~| "Please report bug to %s. Thank you for using %s!" #~ msgid "Thank you for using %s!\n" #~ msgstr "" #~ "\n" #~ "请向 %s 回报错误。感谢您使用 %s!" #~ msgid "" #~ " * \tVte default behavior, Paste the text in primary " #~ "clipboard.\n" #~ msgstr " * \tVte 默认功能,贴上主剪贴板中的文字。\n" #, fuzzy #~| msgid "Continue anyway?" #~ msgid "Continue anyway?\n" #~ msgstr "是否无论如何仍继续?" #~ msgid "" #~ "\n" #~ "Please report bug to %s. Thank you for using %s!" #~ msgstr "" #~ "\n" #~ "请向 %s 回报错误。感谢您使用 %s!" #, fuzzy #~| msgid "" #~| "%s is a libvte based X Terminal Emulator.\n" #~| "\n" #~ msgid "A light and easy to use libvte based X Terminal Emulator" #~ msgstr "" #~ "%s 是 libvte X 终端模拟器。\n" #~ "\n" #~ msgid "Set function key value" #~ msgstr "设置功能键值" #, fuzzy #~| msgid "Paste the text" #~ msgid "Paste to every vte" #~ msgstr "贴上文字" #~ msgid "Change the Opacity of window:" #~ msgstr "改变窗口透明度:" #~ msgid "The locale \"%s\" seems NOT supported by your system!" #~ msgstr "您的系统似乎并不支持 locale \"%s\"" po/zh_TW.po000066400000000000000000001143051246562641500131060ustar00rootroot00000000000000# Traditional Chinese translation of LilyTerm. # Copyright (C) 2012 Tetralet # This file is distributed under the same license as the LilyTerm package. # msgid "" msgstr "" "Project-Id-Version: LilyTerm 0.9.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-12-27 11:40+0800\n" "PO-Revision-Date: 2008-03-21 00:30+0800\n" "Last-Translator: Tetralet \n" "Language-Team: Tetralet \n" "Language: zh_TW\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: console.c:121 #, c-format msgid "Please report bug at <%s>.\n" msgstr "請於 <%s> 回報錯誤。\n" #: console.c:122 dialog.c:1078 #, c-format msgid "Thank you for using %s!" msgstr "感謝您使用 %s!" #. TRANSLATE NOTE: Please be care of the length of the following usage translation, #. TRANSLATE NOTE: It should be shorter than 80 columns. #: console.c:140 #, c-format msgid "" "%s is a libvte based X Terminal Emulator.\n" "\n" msgstr "" "%s 是基於 libvte 的 X 終端機模擬器。\n" "\n" #: console.c:141 msgid "Use -T/--title {title} to specify the window title.\n" msgstr "使用 -T/--title {標題} 來指定視窗的標題。\n" #: console.c:142 msgid "Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n" msgstr "使用 -R/--role {名稱} 來指定視窗的 WM_WINDOW_ROLE 字串。\n" #: console.c:143 msgid "Use -t/--tab {number} to open multi tabs when starting up.\n" msgstr "使用 -t/--tab {數目} 來在啟動後開啟多個分頁。\n" #: console.c:144 msgid "" "Use -n/--tab_names {tab names} to specify tab names, separate with .\n" msgstr "" "使用 -n/--tab_names {分頁名稱} 來指定各個分頁的名稱,以【空白】分隔。\n" #: console.c:145 msgid "" "Use -d/--directory {directory} to specify the init directory when starting " "up.\n" msgstr "使用 -d/--directory {目錄} 來指定啟動後的初始目錄。\n" #: console.c:146 msgid "" "Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the " "geometry.\n" msgstr "使用 -g/--geometry {寬x高[+-]X位移[+-]Y位移} 來指定大小及位置。\n" #: console.c:147 msgid "Use -l/-ls/--login to make the shell invoked as a login shell.\n" msgstr "使用 -l/-ls/--login 來在呼叫 shell 時啟用 login shell。\n" #: console.c:148 msgid "Use -ut to disable recording the session in lastlog, utmp and wtmp.\n" msgstr "使用 -ut 來避免在 lastlog、utmp 及 wtmp 裡留下執行緒記錄。\n" #: console.c:149 msgid "" "Use -H/--hold to hold the terminal window open when -e/-x command " "terminated.\n" msgstr "使用 -H/--hold 來在 -e/-x 指令結束後,仍保留終端機視窗不被關閉。\n" #: console.c:151 msgid "Use -s/--separate to run in separate process.\n" msgstr "使用 -s/--separate 來以獨立行程運行。\n" #: console.c:152 msgid "" "Use -j/--join to integrate new created tabs to the last accessed window.\n" msgstr "使用 -j/--join 把新開啟的分頁整合到最後存取的視窗裡。\n" #: console.c:153 msgid "Use -p/--profile to get a profile sample.\n" msgstr "使用 -p/--profile 以取得設定檔範例。\n" #: console.c:155 #, c-format msgid "Use -u/--user_profile {%s} to use a specified profile.\n" msgstr "使用 -u/--user_profile {%s} 來指定使用某個特定的設定檔。\n" #: console.c:156 msgid "Use -v/--version to show the version information.\n" msgstr "使用 -v/--version 來顯示版本資訊。\n" #: console.c:157 msgid "" "Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n" "\n" msgstr "" "使用 -e/-x/--execute {指令} 來執行某一特定程式。(須為最後一個選項)\n" "\n" #: console.c:159 #, c-format msgid "The %s system configure file is: %s\n" msgstr "%s 的系統設定檔為:%s\n" #: console.c:193 #, c-format msgid "And your %s profile is: " msgstr "而您的 %s 個人設定檔則為:" #: console.c:224 msgid "Default key binding:" msgstr "預設的功能鍵:" #. TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. #: console.c:227 msgid "" " * <`> Disable/Enable hyperlinks, function keys and menu." msgstr " * <`> 啟用/關閉超連結、功能鍵,及選單。" #: console.c:229 msgid " * Add a New tab with current directory.\n" msgstr " * 以當前的目錄新增分頁。\n" #: console.c:230 msgid " * Switch to Prev/Next tab.\n" msgstr " * 切換至上/下一個分頁。\n" #: console.c:231 msgid " * Switch to First/Last tab.\n" msgstr " * 切換至第一/最後一個分頁。\n" #: console.c:232 msgid " * <[/]> Move current tab Forward/Backward.\n" msgstr " * <[/]> 往前/後移動該分頁。\n" #: console.c:233 msgid " * Move current tab to First/Last.\n" msgstr " * 將該分頁移至第一/最後一頁。\n" #: console.c:234 msgid " * Switch to 1st ~ 12th tab.\n" msgstr " * \t切換到第 1 至 12 個分頁。\n" #: console.c:235 msgid "" " * <+/-/Enter> Increase/Decrease/Reset the font size of current " "tab.\n" msgstr " * <+/-/Enter> 放大/縮小/重置目前分頁的字體。\n" #: console.c:236 msgid "" " * Emulate a mouse Scroll Up/Down event on terminal.\n" msgstr " * 在終端機裡模擬一個滑鼠滾輪向上/下捲動事件。\n" #: console.c:237 msgid " * Asks to Scroll Up/Down 1 line on terminal.\n" msgstr " * 試著在終端機裡向上/下捲動一行。\n" #: console.c:238 msgid "" " * Gtk+ default behavior, Scroll Up/Down on terminal.\n" msgstr " * Gtk+ 預設功能,在終端機裡向上/下捲動。\n" #: console.c:239 msgid "" " * Gtk+ default behavior, Scroll terminal to Top/" "Bottom.\n" msgstr " * Gtk+ 預設功能,將終端機捲至頂/底部。\n" #: console.c:240 msgid "" " * Switch between full/unfullwindow and full/" "unfullscreen.\n" msgstr "" " * 將視窗在 全視窗/非全視窗 及 全螢幕/非全螢幕 中切" "換。\n" #: console.c:241 msgid "" " * Find text in the terminal.\n" " Use / to find Next/Prev.\n" msgstr "" " * 在終端機中尋找文字。使用 / 來尋找下/上" "一個。\n" #: console.c:243 msgid " * Select all the text in the terminal.\n" msgstr " * 全選終端機裡的文字。\n" #: console.c:244 msgid " * Copy/Paste the text in clipboard.\n" msgstr " * 複製/貼上剪貼簿中的文字。\n" #: console.c:245 msgid " * Copy/Paste the text in primary clipboard.\n" msgstr " * 複製/貼上主要剪貼簿中的文字。。\n" #: console.c:246 msgid "" " (i.e. Emulate middle button mouse click to Copy/" "Paste)\n" msgstr " (即:模擬滑鼠中鍵以複製/貼上文字)\n" #: console.c:248 msgid "Some key bindings that disabled by default but maybe useful:\n" msgstr "一些預設上關閉但可能很有用處的功能鍵:\n" #: console.c:249 msgid " * Trying to close current tab.\n" msgstr " * 試著關閉目前的分頁。\n" #: console.c:250 msgid "" " (Using or 'exit' to close tabs is " "recommended)\n" msgstr "" " (使用 或 exit 來關閉分頁是比較建議的作" "法)\n" #: console.c:251 msgid " * Open a new window with current directory.\n" msgstr " * 以當前目錄開啟新視窗。\n" #: console.c:252 msgid " * Rename the current tab.\n" msgstr " * 更改目前分頁的名稱。\n" #: console.c:259 #, c-format msgid "TIP: These key bindings may custom or disable by right click menu [%s]." msgstr "小技巧:這些功能鍵可經由滑鼠右鍵選單【%s】來自訂或關閉。" #: console.c:259 menu.c:420 msgid "Set key binding" msgstr "設定功能鍵" #: dialog.c:122 dialog.c:3352 menu.c:2885 msgid "The following error occurred:" msgstr "發生了以下的錯誤:" #: dialog.c:187 menu.c:348 msgid "Rename this tab" msgstr "更改此分頁的名稱" #: dialog.c:210 msgid "Please input the Label Name of this tab:" msgstr "請輸入這個分頁的名稱:" #: dialog.c:211 msgid "Label Name:" msgstr "分頁名稱:" #: dialog.c:218 profile.c:881 msgid "Find string" msgstr "尋找字串" #: dialog.c:235 msgid "Find: " msgstr "尋找:" #: dialog.c:258 msgid "Find previous string" msgstr "尋找上個字串" #: dialog.c:264 msgid "Find next string" msgstr "尋找下個字串" #: dialog.c:275 msgid "Case sensitive" msgstr "大小寫相符" #: dialog.c:283 msgid "Use Perl compatible regular expressions" msgstr "使用相容於 Perl 的正規表示式" #: dialog.c:324 dialog.c:397 msgid "Paste texts to every Vte Terminal" msgstr "將文字貼至所有的 Vte 終端機視窗" #: dialog.c:342 msgid "Please input the texts that will be paste to the Vte Terminals:" msgstr "請輸入要貼入 Vte 終端機視窗的文字:" #: dialog.c:343 msgid "Text:" msgstr "文字:" #: dialog.c:352 msgid "Append a to the end of the text." msgstr "附加 <新行> 至文字結尾。" #: dialog.c:388 msgid "Grab keys" msgstr "截取鍵值" #: dialog.c:394 msgid "" "Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ." msgstr "" "將截取到的鍵值貼至 Vte 終端機視窗。\n" "如果您想貼上的是複合鍵,像 時,將會很有用。" #: dialog.c:417 dialog.c:956 msgid "Key Value:" msgstr "鍵值:" #: dialog.c:423 msgid "Entry" msgstr "輸入欄" #: dialog.c:428 msgid "Add new locales and set the default locale" msgstr "新增新的 locale 及設定預設的 locale" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", #. TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". #: dialog.c:447 msgid "" "The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here." msgstr "" "在初始化 Vte 終端機視窗時所使用的預設 locale。\n" "您可以在此使用 \"zh_TW\"、\"zh_TW.Big5\" 或 \"zh_TW.UTF-8\"。" #: dialog.c:451 msgid "Default locale:" msgstr "預設的 locale:" #. TRANSLATE NOTE: You may replace the following locales with the locale name of your country. #. TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", #. TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". #: dialog.c:458 msgid "" "The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed." msgstr "" "出現於滑鼠右鍵的 locale 列表,以【空白】分隔。\n" "您可以在此使用 \"zh_TW\"、\"zh_TW.Big5\" 或 \"zh_TW.UTF-8\"。\n" "若您沒有安裝任何的 locale 資料,可以在此使用 \"UTF-8\"。" #: dialog.c:463 msgid "Locales list:" msgstr "locale 列表:" #: dialog.c:471 msgid "Change the saturation of background" msgstr "改變背景的透明度" #: dialog.c:480 msgid "Change the Saturation of background:" msgstr "改變背景的透明度" #: dialog.c:505 msgid "Change the foreground color in terminal" msgstr "改變終端機的文字顏色" #: dialog.c:532 msgid "Change the background color in terminal" msgstr "改變終端機的背景顏色" #: dialog.c:556 msgid "Change the cursor color in terminal" msgstr "改變終端機的遊標顏色" #: dialog.c:577 msgid "" "Drawn the text under the cursor with foreground and background colors " "reversed" msgstr "使用文字及背景的反像顏色來繪製該文字的遊標。" #: dialog.c:588 dialog.c:2234 #, c-format msgid "Change the ansi color [%s] in terminal" msgstr "改變終端機的 ANSI 顏色 [%s]" #: dialog.c:617 msgid "The brightness of ANSI colors:" msgstr "ANSI 顏色的亮度:" #: dialog.c:633 msgid "ANSI Colors:" msgstr "ANSI 顏色:" #: dialog.c:638 menu.c:471 msgid "Invert color" msgstr "顏色反轉" #: dialog.c:706 menu.c:125 #, c-format msgid "Change the %s color on tab" msgstr "改變分頁上的 %s 顏色" #: dialog.c:791 dialog.c:3170 msgid "Bold Demo Text" msgstr "粗體範例文字" #: dialog.c:845 msgid "Confirm to close multi tabs" msgstr "確認是否關閉多個分頁" #: dialog.c:854 msgid "You are about to close multi tabs. Continue anyway?" msgstr "您將要關閉多個分頁。是否無論如何仍繼續?" #: dialog.c:861 dialog.c:1348 msgid "those tabs" msgstr "這些分頁" #: dialog.c:867 msgid "" "You may press + here\n" "to get the key value used for the key binding." msgstr "" "您可以在此按下 加上 <任何鍵>\n" "以取得功能鍵可用的鍵值。" #: dialog.c:869 msgid "Get the key value for function key" msgstr "取得功能鍵的鍵值" #: dialog.c:922 msgid "Function Key Name" msgstr "功能鍵名稱" #: dialog.c:926 msgid "Key Bindings" msgstr "功能鍵" #: dialog.c:934 msgid "Key Group: " msgstr "鍵群組:" #: dialog.c:944 msgid "Note: " msgstr "說明:" #: dialog.c:966 msgid "Disable all the function keys." msgstr "關閉所有的功能鍵。" #: dialog.c:999 #, c-format msgid "Usage for %s %s" msgstr "%s %s 的使用說明" #: dialog.c:1024 msgid "Don't forget to save your settings after making any change!" msgstr "在進行了任何更動之後,別忘了儲存您的設定!" #: dialog.c:1027 menu.c:416 msgid "Usage" msgstr "使用說明" #: dialog.c:1031 msgid "Key binding" msgstr "功能鍵值" #. TRANSLATE NOTE: The following license declaration is just a notice, not full license text. #. TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. #. TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, #. TRANSLATE NOTE: But it seems be safe to translate the following license declaration. #. TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. #: dialog.c:1039 #, c-format msgid "" "Copyright (c) %s-%s %s. All rights reserved.\n" "\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n" "\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n" "\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ." msgstr "" "版權所有 © %s-%s %s。保留所有權利。\n" "\n" "%s 是自由軟體:您可以在自由軟體基金會 (Free Software Foundation)\n" "所頒行的 GNU General Public License 第三版(或依您需求)以上版本的授權\n" "條款下,自由得重新散佈及/或修改這個軟體。\n" "\n" "在此發佈 %s 乃是希望能助您一臂之力,但【不提供任何保固】。即使其\n" "中涉及了『商業行為』,或是進行了『客製化』,也不暗指它得因此提供保固。\n" "請參閱 GNU General Public License 以取得更詳盡資訊。\n" "\n" "在取得 %s 的同時,您應該也取得了一份 GNU General Public License\n" "的複本。如果沒有,請參閱 。" #: dialog.c:1052 msgid "License" msgstr "授權" #: dialog.c:1067 msgid "Translators" msgstr "翻譯者" #. TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. #. TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. #: dialog.c:1072 #, c-format msgid "HomePage: %s" msgstr "首頁: %s" #: dialog.c:1073 #, c-format msgid "Github: %s" msgstr "GitHub: %s" #: dialog.c:1074 #, c-format msgid "Blog: %s" msgstr "部落格: %s" #: dialog.c:1075 #, c-format msgid "Wiki: %s" msgstr "維基文庫:%s" #: dialog.c:1076 #, c-format msgid "Issues: %s" msgstr "錯誤回報:%s" #: dialog.c:1077 #, c-format msgid "IRC: %s" msgstr "IRC: %s" #: dialog.c:1084 msgid "About" msgstr "關於" #: dialog.c:1101 #, c-format msgid "There is still a running foreground program on #%d tab:" msgstr "在 #%d 分頁上有個前景程式尚在執行:" #: dialog.c:1103 #, c-format msgid "" "Terminate it by using `kill -9 %d' is recommended if it is non-response." msgstr "若它已失去回應,建議使用 `kill -9 %d' 來中止它。" #: dialog.c:1109 dialog.c:1261 dialog.c:1293 dialog.c:1329 dialog.c:1362 #: dialog.c:1387 msgid "Continue anyway?" msgstr "是否無論如何仍繼續?" #: dialog.c:1111 dialog.c:1295 msgid "Tip:" msgstr "小技巧:" #: dialog.c:1120 msgid "Confirm to close running foreground program" msgstr "確認是否關閉正在前景執行中的程式" #: dialog.c:1137 dialog.c:1319 msgid "this tab" msgstr "此分頁" #: dialog.c:1144 msgid "Change the opacity of window" msgstr "改變視窗的透明度" #: dialog.c:1146 msgid "Change the opacity of window:" msgstr "改變視窗的透明度:" #: dialog.c:1156 msgid "Change the opacity of window when inactive" msgstr "改變未作用時視窗的透明度" #: dialog.c:1158 msgid "Change the opacity of window when inactive:" msgstr "改變未作用時視窗的透明度:" #: dialog.c:1206 msgid "Adjust the brightness of ANSI colors used in terminal" msgstr "調整在終端機裡的 ANSI 顏色的亮度" #: dialog.c:1211 msgid "Adjust the brightness of ANSI colors when inactive" msgstr "調整未作用時 ANSI 顏色的亮度" #: dialog.c:1255 msgid " is trying to execute the following command:" msgstr "正試圖執行以下指令:" #: dialog.c:1264 msgid "Confirm to execute -e/-x/--execute command" msgstr "確認是否執行 -e/-x/--execute 指令" #: dialog.c:1284 #, c-format msgid "The following programs are still running under #%d tab:" msgstr "以下程式尚在 #%d 分頁裡執行:" #: dialog.c:1286 msgid "Using or 'exit' to close tabs is recommended" msgstr "使用 或 exit 來關閉分頁是比較建議的作法" #: dialog.c:1301 msgid "Confirm to close a tab with child process" msgstr "確認是否關閉尚有子行程的分頁" #: dialog.c:1325 msgid "The following programs are still running under this window:" msgstr "以下程式尚在這個視窗裡執行:" #: dialog.c:1331 msgid "Confirm to close a window with child process" msgstr "確認是否關閉尚有子行程的視窗" #: dialog.c:1352 #, c-format msgid "Confirm to close %s" msgstr "確認是否關閉 %s" #: dialog.c:1355 #, c-format msgid "The following programs are still running under %s:" msgstr "以下程式尚在 %s 裡執行:" #: dialog.c:1383 msgid "Trying to paste the following texts to the Vte Terminal:" msgstr "將要把以下的文字貼入 Vte 終端機視窗裡:" #: dialog.c:1390 msgid "Confirm to paste texts to the Vte Terminal" msgstr "確認是否要將文字貼入 Vte 終端機視窗裡" #: dialog.c:1408 msgid "Join" msgstr "合併" #: dialog.c:1410 msgid "Remove '' in the text" msgstr "移除文字中的【斷行】" #: dialog.c:1421 msgid "Strip" msgstr "整理" #: dialog.c:1423 msgid "" "Remove '', \"\\\", and \"\\<\" in the text, " "then join '' and '' into a single ''" msgstr "" "移除文字中的【斷行】、【\\斷行】及【\\斷行<空白】,然後把【跳位】及【空白】合" "併成單一【空白】" #: dialog.c:2778 #, c-format msgid "" "Try to kill %s with SIGKILL() to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)" msgstr "" "試著用 SIGKILL() 來強制關閉 %s 以避免中斷這些程式!\n" "【 可 能 導 致 資 料 遺 失 ! ! 】" #: dialog.c:2792 #, c-format msgid "Force to close all the tabs and windows, and exit %s!" msgstr "強制關閉所有的分頁及視窗,並關閉 %s!" #: dialog.c:2917 #, c-format msgid "(Disabled, duplicated with [%s])" msgstr "(已關閉,和【%s】重複)" #: dialog.c:2926 dialog.c:3505 dialog.c:3556 msgid "(Disabled)" msgstr "(已關閉)" #: dialog.c:3289 #, c-format msgid "" "The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again." msgstr "" "您的系統似乎並不支援 local \"%s\"!\n" "如果您剛剛才新增了 locale 資訊,\n" "請關閉所有的 %s 視窗並再試一次。" #: dialog.c:3293 msgid "Not supported locale!" msgstr "不被支援的 locale!" #: dialog.c:3364 #, c-format msgid "You should upgrade to %s and recompile %s to support this feature." msgstr "您應當升級至 %s 並重新編譯 %s 以支援這個功能。" #: dialog.c:3365 msgid "Not supported feature!" msgstr "不被支援的功能!" #: dialog.c:3513 #, c-format msgid "Disable all the function keys of [%s] group." msgstr "關閉群組【%s】的所有功能鍵。" #: main.c:657 #, c-format msgid "" "The data got from socket seems incorrect.\n" "\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n" "\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again." msgstr "" "經由 Socket 所取得的資料似乎不太正確。\n" "\n" "\t得到的 Socket 版本:%s\n" "\t預期的 Socket 版本:%s\n" "\n" "如果您剛剛升級了 %s,\n" "請關閉所有的 %s 視窗並再試一次。" #: main.c:665 msgid "The format of socket data is out of date" msgstr "Socket 資料的格式已過舊" #: menu.c:59 msgid "Change text encoding" msgstr "改變文字編碼" #: menu.c:60 msgid "New tab" msgstr "新分頁" #: menu.c:61 msgid "New tab with specified locale" msgstr "以特定 locale 開新分頁" #: menu.c:70 menu.c:2397 msgid "New window with specified profile" msgstr "使用特定設定檔開啟新視窗" #: menu.c:80 msgid "Change the font" msgstr "改變字型" #: menu.c:87 msgid "Change colors" msgstr "改變顏色" #: menu.c:90 msgid "Change the cursor color" msgstr "改變遊標的顏色" #: menu.c:94 msgid "Change the foreground color" msgstr "改變文字的顏色" #: menu.c:99 msgid "Change the ANSI colors" msgstr "改變 ANSI 的顏色" #: menu.c:104 msgid "Change the background color" msgstr "改變背景的顏色" #: menu.c:109 msgid "Adjust the brightness of ANSI colors" msgstr "調整 ANSI 顏色的亮度" #: menu.c:113 msgid "Adjust the brightness when inactive" msgstr "調整未作用時顏色的亮度" #: menu.c:138 msgid "Change ANSI color theme" msgstr "改變 ANSI 顏色主題" #: menu.c:148 msgid "Background" msgstr "背景" #: menu.c:154 msgid "Transparent window" msgstr "透明視窗" #: menu.c:159 msgid "Window opacity" msgstr "視窗透明度" #: menu.c:162 msgid "Window opacity when inactive" msgstr "未作用時將視窗變暗" #: menu.c:172 msgid "Transparent background" msgstr "透明背景" #: menu.c:175 msgid "Background saturation" msgstr "背景透明度" #: menu.c:179 msgid "Set background image" msgstr "設定背景圖片" #: menu.c:192 window.c:3862 msgid "Clipboard" msgstr "剪貼簿" #: menu.c:196 msgid "Copy URL" msgstr "複製 URL" #: menu.c:201 msgid "Copy" msgstr "複製" #: menu.c:205 msgid "Paste" msgstr "貼上" #: menu.c:212 msgid "View clipboard" msgstr "檢視剪貼簿" #: menu.c:216 msgid "View primary clipboard" msgstr "檢視主要剪貼簿" #: menu.c:227 msgid "Scrollback lines" msgstr "歷史捲軸" #: menu.c:236 profile.c:992 msgid "Clean scrollback lines" msgstr "清除歷史捲軸" #: menu.c:242 profile.c:853 msgid "Misc" msgstr "雜項" #: menu.c:244 msgid "Paste to every Vte Terminal" msgstr "貼至所有的 Vte 終端機視窗" #: menu.c:247 msgid "Launch file manager" msgstr "呼叫檔案管理程式" #: menu.c:252 msgid "View page info" msgstr "檢視分頁資訊" #: menu.c:260 msgid "Erase Binding" msgstr "刪除鍵值" #: menu.c:275 msgid "Cursor Shape" msgstr "遊標形狀" #: menu.c:292 msgid "Dim text when inactive" msgstr "未作用時將文字變暗" #: menu.c:297 msgid "Dim window when inactive" msgstr "未作用時將視窗變暗" #: menu.c:302 msgid "Cursor blinks" msgstr "遊標閃爍" #: menu.c:306 msgid "Allow bold text" msgstr "顯示粗體" #: menu.c:313 msgid "Need pressed to open URL" msgstr "需按下 以開啟 URL" #: menu.c:316 msgid "Disable URL when pressed" msgstr "按下 時,關閉 URL" #: menu.c:323 msgid "Audible bell" msgstr "發出嗶聲" #: menu.c:327 msgid "Visible bell" msgstr "發出嗶聲時閃爍螢幕" #: menu.c:332 msgid "Urgent bell" msgstr "發出嗶聲時閃爍視窗" #: menu.c:342 msgid "Switch input methods" msgstr "切換輸入法" #: menu.c:361 msgid "Show the tabs bar" msgstr "顯示分頁列" #: menu.c:367 msgid "Hide the tabs bar" msgstr "隱藏分頁列" #: menu.c:374 msgid "Always show the tabs bar" msgstr "總是顯示分頁列" #: menu.c:381 msgid "Always hide the tabs bar" msgstr "總是隱藏分頁列" #: menu.c:391 msgid "Increase window size" msgstr "放大視窗" #: menu.c:394 msgid "Decrease window size" msgstr "縮小視窗" #: menu.c:401 msgid "Reset to user custom font/size" msgstr "重置為使用者自訂的字型及大小" #: menu.c:404 msgid "Reset to system font/size" msgstr "重置為系統字型及大小" #: menu.c:409 msgid "Reset the content" msgstr "重置分頁的內容" #: menu.c:424 msgid "User profile" msgstr "使用者設定檔" #: menu.c:432 #, c-format msgid "Quit %s" msgstr "關閉 %s" #: menu.c:502 msgid "grayscale" msgstr "灰階" #: menu.c:505 msgid "(build-in)" msgstr "(內建)" #: menu.c:518 #, c-format msgid "%s + custom" msgstr "%s + 自訂" #: menu.c:655 msgid "View current page information" msgstr "檢視該分頁的資訊" #: menu.c:1099 msgid " (Wide)" msgstr "(寬)" #: menu.c:1554 msgid "Font Selection" msgstr "選擇字型" #: menu.c:1857 menu.c:1864 msgid "Add other locales..." msgstr "新增其它的 locale..." #: menu.c:1948 menu.c:1998 msgid "Other settings..." msgstr "其它設定檔…" #: menu.c:1963 msgid "Save settings automatically" msgstr "自動儲存設定" #: menu.c:1968 msgid "Save settings" msgstr "儲存設定" #: menu.c:1971 msgid "Save settings as..." msgstr "儲存設定為…" #: menu.c:1977 msgid "Reload settings" msgstr "重新載入設定" #: menu.c:2012 #, c-format msgid "%s default" msgstr "%s 預設值" #: menu.c:2034 msgid "System default" msgstr "系統預設值" #: menu.c:2393 #, c-format msgid "" "The following settings:\n" "\n" "%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead." msgstr "" "以下的設定:\n" "\n" "%s\n" "無法套用至這個視窗裡的終端機。\n" "請替而使用【%s】。" #: menu.c:2399 msgid "The following settings can NOT be applied" msgstr "無法套用以下設定" #: menu.c:2518 msgid "Disable: Trying to use [Transparent Background] instead." msgstr "關閉:試著替而使用【透明背景】。" #: menu.c:2524 msgid "Scroll the background image along with the text" msgstr "隨著文字捲動背景圖片" #: menu.c:2719 msgid "Open File" msgstr "開啟檔案" #: menu.c:2721 msgid "Save File" msgstr "儲存檔案" #: menu.c:2883 #, c-format msgid "The following error occurred: %s" msgstr "發生了以下的錯誤:%s" #. TRANSLATE NOTE: The "↲" is a replace character for (, or ). #. TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". #: misc.c:692 msgid "↲" msgstr "↲" #: notebook.c:727 msgid "Error while creating the child process:" msgstr "在建立此子行程時發生錯誤:" #: notebook.c:736 msgid "" "Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!" msgstr "" "在建立此子行程時發生錯誤!\n" "請確認 /dev/pts 已掛載為 devpts 檔案系統!" #: notebook.c:749 msgid "Error when creating child process" msgstr "在建立子行程時發生錯誤" #: profile.c:854 msgid "Tab operation" msgstr "分頁操作" #: profile.c:855 msgid "Switch tab" msgstr "切換分頁" #: profile.c:856 msgid "Move tab" msgstr "搬移分頁" #: profile.c:857 msgid "Switch to #? tab" msgstr "切換至 #? 分頁" #: profile.c:858 msgid "Text operation" msgstr "文字操作" #: profile.c:859 msgid "Scroll up/down" msgstr "向上/下捲動" #: profile.c:860 msgid "Font" msgstr "字型" #: profile.c:865 msgid "Disable/Enable functions" msgstr "關閉/啟用功能" #: profile.c:867 msgid "Disable/Enable hyperlinks, function keys and right click menu." msgstr "關閉/啟用超連結、功能鍵,及右鍵選單。" #: profile.c:869 msgid "Add new tab" msgstr "新增分頁" #: profile.c:871 msgid "Add a new tab." msgstr "新增一個分頁。" #: profile.c:873 msgid "Close tab" msgstr "關閉分頁" #: profile.c:875 msgid "Close current tab." msgstr "關閉當前的分頁。" #: profile.c:877 msgid "Rename page name" msgstr "更改分頁名稱" #: profile.c:879 msgid "Rename the page name of current tab." msgstr "更改當前分頁的名稱。" #: profile.c:883 msgid "Find the strings matching the search regex." msgstr "尋找符合搜尋規則的字串。" #: profile.c:884 msgid "Find previous" msgstr "尋找上一個" #: profile.c:886 msgid "Find the previous string matching the search regex." msgstr "尋找上一個符合搜尋規則的字串。" #: profile.c:887 msgid "Find next" msgstr "尋找下一個" #: profile.c:889 msgid "Find the next string matching the search regex." msgstr "尋找下一個符合搜尋規則的字串。" #: profile.c:891 msgid "Switch to prev tab" msgstr "切換至上個分頁" #: profile.c:893 msgid "Switch to prev tab." msgstr "切換至上個分頁。" #: profile.c:895 msgid "Switch to next tab" msgstr "切換至下個分頁" #: profile.c:897 msgid "Switch to next tab." msgstr "切換至下個分頁。" #: profile.c:899 msgid "Switch to first tab" msgstr "切換至第一個分頁" #: profile.c:901 msgid "Switch to first tab." msgstr "切換至第一個分頁。" #: profile.c:903 msgid "Switch to last tab" msgstr "切換至最後一個分頁" #: profile.c:905 msgid "Switch to last tab." msgstr "切換至最後一個分頁。" #: profile.c:907 msgid "Move page forward" msgstr "往前移動分頁" #: profile.c:909 msgid "Move current page forward." msgstr "往前移動該分頁。" #: profile.c:911 msgid "Move page backward" msgstr "往後移動分頁" #: profile.c:913 msgid "Move current page backward." msgstr "往後移動該分頁。" #: profile.c:915 msgid "Move page to first" msgstr "將分頁移至第一頁" #: profile.c:917 msgid "Move current page to first." msgstr "將該分頁移至第一頁。" #: profile.c:919 msgid "Move page to last" msgstr "將分頁移至最後一頁" #: profile.c:921 msgid "Move current page to last." msgstr "將該分頁移至最後一頁。" #: profile.c:926 #, c-format msgid "Switch to #%d tab" msgstr "切換至第 %d 分頁" #: profile.c:928 #, c-format msgid "Switch #%d tab directly." msgstr "直接切換至第 %d 分頁。" #: profile.c:932 msgid "New window" msgstr "新視窗" #: profile.c:934 msgid "Open a new window with current dir." msgstr "以當前目錄開啟新視窗。" #: profile.c:936 msgid "Select all" msgstr "全選" #: profile.c:938 msgid "Select all the text in the Vte Terminal box." msgstr "全選 Vte 終端機視窗裡的文字。" #: profile.c:940 msgid "Copy to clipboard" msgstr "複製至剪貼簿。" #: profile.c:942 msgid "Copy the text to clipboard." msgstr "將文字複製至剪貼簿。" #: profile.c:944 msgid "Paste the text" msgstr "貼上文字" #: profile.c:946 msgid "Paste the text in clipboard to the Vte Terminal box." msgstr "把剪貼簿裡的文字貼至 Vte 終端機。" #: profile.c:948 msgid "Copy the text to primary clipboard" msgstr "將文字複製至主要剪貼簿。" #: profile.c:950 msgid "" "Copy the text to the primary clipboard.\n" "Normally it is copied to the primary clipboard already\n" "when you selected some text with mouse." msgstr "" "將文字複製至主要剪貼簿。\n" "在一般情況下,當您用滑鼠來選取文字時,它已被複製至主要剪貼簿了。" #: profile.c:952 msgid "Paste the text in primary clipboard" msgstr "貼上主要剪貼簿中的文字。" #: profile.c:954 msgid "" "Paste the text in the primary clipboard to the Vte Terminal box.\n" "The default key binding is in libvte if you disable it here." msgstr "" "把主要剪貼簿裡的文字貼至 Vte 終端機。\n" "如果您在此關閉這個功能,則會使用 libvte 預設的 組合鍵。" #: profile.c:956 msgid "Increase font size" msgstr "放大字體" #: profile.c:958 msgid "Increase the font size of current tab." msgstr "放大目前分頁的字體。" #: profile.c:960 msgid "Decrease font size" msgstr "縮小字體" #: profile.c:962 msgid "Decrease the font size of current tab." msgstr "縮小目前分頁的字體。" #: profile.c:964 msgid "Reset font size" msgstr "重置字體大小" #: profile.c:966 msgid "Reset the font of current tab to original size." msgstr "將目前分頁的字體重置為原始大小。" #: profile.c:968 msgid "Maximize the window" msgstr "視窗放至最大" #: profile.c:970 msgid "Try to maximize the window to use all available space on your display." msgstr "將視窗放至最大以使用您所有的顯示空間。" #: profile.c:972 msgid "Full screen" msgstr "全螢幕" #: profile.c:974 msgid "Asks to place window in the fullscreen/unfullscreen state." msgstr "試著讓視窗在全螢幕/正常螢幕中切換。" #: profile.c:976 msgid "Scroll up" msgstr "向上捲動" #: profile.c:978 msgid "Emulate a mouse scroll up event on Vte Terminal box." msgstr "在 Vte 終端機視窗裡模擬一個滑鼠滾輪向上捲動事件。" #: profile.c:980 msgid "Scroll down" msgstr "向下捲動" #: profile.c:982 msgid "Emulate a mouse scroll down event on Vte Terminal box." msgstr "在 Vte 終端機視窗裡模擬一個滑鼠滾輪向下捲動事件。" #: profile.c:984 msgid "Scroll up 1 line" msgstr "向上捲動一行" #: profile.c:986 msgid "Asks to scroll up 1 line on Vte Terminal box." msgstr "試著在 Vte 終端機視窗裡向上捲動一行。" #: profile.c:988 msgid "Scroll down 1 line" msgstr "向下捲動一行" #: profile.c:990 msgid "Asks to scroll down 1 line on Vte Terminal box." msgstr "試著在 Vte 終端機視窗裡向下捲動一行。" #: profile.c:994 msgid "Asks to clean scrollback lines." msgstr "試著清除歷史捲軸。" #: profile.c:1003 msgid "Dump runtime debug data" msgstr "印出即時除錯資訊" #: profile.c:1005 msgid "Dump the runtime data of LilyTerm for debug." msgstr "印出 LilyTerm 的即時資訊以利除錯。" #: profile.c:1033 msgid "Window Title" msgstr "視窗標題" #: profile.c:1034 msgid "Running Command" msgstr "正在執行的指令" #: profile.c:1035 msgid "Current Dir" msgstr "目前的目錄" #: profile.c:1036 msgid "Custom Tab Name" msgstr "自訂的分頁名稱" #: profile.c:1037 msgid "Root Privileges" msgstr "Root 權限" #: profile.c:1038 msgid "Normal Text" msgstr "一般文字" #: profile.c:1072 msgid "Shift" msgstr "Shift" #: profile.c:1076 msgid "Ctrl" msgstr "Ctrl" #: profile.c:1078 msgid "Alt" msgstr "Alt" #: profile.c:1088 msgid "Win" msgstr "Win" #: profile.c:1132 msgid "Background Color" msgstr "背景顏色" #: profile.c:1133 msgid "Dark Red" msgstr "紅" #: profile.c:1134 msgid "Dark Green" msgstr "暗綠" #: profile.c:1135 msgid "Dark Yellow" msgstr "暗黃" #: profile.c:1136 msgid "Dark Blue" msgstr "深藍" #: profile.c:1137 msgid "Dark Magenta" msgstr "深紫" #: profile.c:1138 msgid "Dark Cyan" msgstr "暗青" #: profile.c:1139 msgid "Dark White" msgstr "暗白" #: profile.c:1140 msgid "Bright Black" msgstr "亮黑" #: profile.c:1141 msgid "Bright Red" msgstr "亮紅" #: profile.c:1142 msgid "Bright Green" msgstr "亮綠" #: profile.c:1143 msgid "Bright Yellow" msgstr "亮黃" #: profile.c:1144 msgid "Bright Blue" msgstr "亮藍" #: profile.c:1145 msgid "Bright Magenta" msgstr "亮紫" #: profile.c:1146 msgid "Bright Cyan" msgstr "亮青" #: profile.c:1147 msgid "Foreground Color" msgstr "文字顏色" #: profile.c:2985 msgid "The target file does NOT exist" msgstr "目的地檔案並不存在" #: profile.c:2996 msgid "The target file is a directory" msgstr "目的地檔案是個目錄" #: profile.c:3044 #, c-format msgid "Error while writing profile '%s':" msgstr "在寫入設定檔 %s 時發生錯誤:" #: profile.c:3049 msgid "Error when writing profile" msgstr "在寫入設定檔時發生錯誤" #: profile.c:3189 msgid "" "Some entry in profile is added, removed, or changed in this version.\n" "Please use [Save settings] on the right click menu to save your settings,\n" "and edit it manually if necessary.\n" msgstr "" "在這個版本裡的個人設定檔中已新增/移除/修改了某些項目,\n" "請使用右鍵選單中的【儲存設定】來儲存您的設定,\n" "並視形況加以修改。\n" #: profile.c:3195 #, c-format msgid "" "%s\n" "Your profile is %s." msgstr "" "%s\n" "您的個人設定檔為:%s。" #: profile.c:3198 msgid "The format of your profile is out of date" msgstr "您的設定檔格式已過舊" #: profile.c:3226 profile.c:3229 #, c-format msgid "" "The profile \"%s\" is invalid:\n" "\n" "\t%s" msgstr "" "無法取用設定檔 \"%s\":\n" "\n" "\t%s" #: profile.c:3237 msgid "The profile is invalid!" msgstr "設定檔無效!" #: window.c:770 #, c-format msgid "\tWindow #%d, Page #%d: (%d) %s\n" msgstr "\t第 #%d 視窗,第 #%d 分頁: (%d) %s\n" #: window.c:774 #, c-format msgid "\tPage #%d: (%d) %s\n" msgstr "\t第 #%d 分頁: (%d) %s\n" #~ msgid "System default (PROFILE)" #~ msgstr "系統預設值" #~ msgid "Join and paste" #~ msgstr "合併後貼上" src/000077500000000000000000000000001246562641500116605ustar00rootroot00000000000000src/Makefile000066400000000000000000000232701246562641500133240ustar00rootroot00000000000000# This is a sample Makefile for debuging LilyTerm. # # Usage: # make clean: delete lilyterm binary files. # make debug: compile lilyeterm_dbg with CLAGS -g. # make dev: compile lilyeterm_dev with CLAGS -g. # make vdev: compile lilyeterm_dev with full compiling command message. # make ddev: compile lilyeterm_dev with -DSAFEMODE compile option. # make ut: run a tiny unit testing script with gdb debug information. # make uto: build *.o binary files for using in the unit testing programs. # make utb: build the the unit testing programs only. # make utd: run a tiny unit testing script with full runtime debug information. # make utf: run a tiny unit testing script with glib, gtk, gdb and valgrind debug information. # make geometry: compile lilyeterm_dev with geometry debug information. # make detail: compile lilyeterm_dev with detail runtime debug information. # make full: compile lilyeterm_dev with full runtime debug information. # make memory: compile lilyeterm_dev for memory lack testing. # make data: compile po and $(BINARY).conf files. # # grep 'g_debug *( *" *[^\!@+\?-]' * | grep -v '\/\/' # (\(console\|dialog\|font\|main\|menu\|misc\|notebook\|pagename\|profile\|property\|window\).c:[0-9]*) # MANWIDTH=80 man data/lilyterm.1 | col -b > README include ../.default -include ../.config PKGCONFIG := $(shell whereis "pkg-config" | tr -s ' ' '\n' | grep "bin/""pkg-config""$$" | head -n 1) STRIP := $(shell whereis "strip" | tr -s ' ' '\n' | grep "bin/""strip""$$" | head -n 1) VTE ?= ifneq ($(PKGCONFIG), ) ifeq ($(VTE), vte) GTK := $(shell $(PKGCONFIG) --exists 'gtk+-2.0' && $(ECHO) 'gtk+-2.0') endif ifeq ($(VTE), vte-2.91) GTK := $(shell $(PKGCONFIG) --exists 'gtk+-3.0' && $(ECHO) 'gtk+-3.0') endif ifeq ($(VTE), vte-2.90) GTK := $(shell $(PKGCONFIG) --exists 'gtk+-3.0' && $(ECHO) 'gtk+-3.0') endif ifeq ($(VTE), ) VTE := $(shell $(PKGCONFIG) --exists 'vte' && $(ECHO) 'vte') GTK := $(shell $(PKGCONFIG) --exists 'gtk+-2.0' && $(ECHO) 'gtk+-2.0') endif ifeq ($(VTE), ) VTE := $(shell $(PKGCONFIG) --exists 'vte-2.91' && $(ECHO) 'vte-2.91') GTK := $(shell $(PKGCONFIG) --exists 'gtk+-3.0' && $(ECHO) 'gtk+-3.0') endif ifeq ($(VTE), ) VTE := $(shell $(PKGCONFIG) --exists 'vte-2.90' && $(ECHO) 'vte-2.90') GTK := $(shell $(PKGCONFIG) --exists 'gtk+-3.0' && $(ECHO) 'gtk+-3.0') endif endif BINDIR = $(PREFIX)/bin date = `date +%Y-%m-%d` CC ?= gcc CFLAGS ?= -Wall -Werror -Os #CFLAGS = $$CFLAGS -Wall -Wextra -Os -std=c99 \ # -DG_DISABLE_DEPRECATED \ # -DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED \ # -DGDK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED \ # -DGTK_DISABLE_SINGLE_INCLUDES -DGSEAL_ENABLE LDFLAGS += -L$(prefix)/local/lib ifeq ($(VTE), vte-2.91) LDFLAGS += -lX11 endif OBJ_PKG_CMD = $(PKGCONFIG) --cflags $(GTK) $(VTE) BINARY_PKG_CMD = $(PKGCONFIG) --cflags --libs $(GTK) $(VTE) SOURCE_FILES = menu.c profile.c dialog.c pagename.c notebook.c font.c \ property.c window.c misc.c console.c main.c OBJ = $(SOURCE_FILES:.c=.o) AUTHOR_CONVERT = $(shell echo "$(AUTHOR)" | sed -e 's/\([ ()]\)/\\\1/g') INCLUDES = -DBINARY=\"$(BINARY)\" \ -DPACKAGE=\"$(PACKAGE)\" \ -DBUGREPORT=\"$(BUGREPORT)\" \ -DMAINSITE=\"$(MAINSITE)\" \ -DGITHUBURL=\"$(GITHUBURL)\" \ -DBLOG=\"$(BLOG)\" \ -DWIKI=\"$(WIKI)\" \ -DISSUES=\"$(ISSUES)\" \ -DIRC=\"$(IRC)\" \ -DYEAR=\"$(YEAR)\" \ -DETCDIR=\"$(ETCDIR)\" \ -DLOCALEDIR=\"$(LOCALEDIR)\" \ -DICONDIR=\"$(ICONDIR)\" ifeq ($(BSD), 1) INCLUDES += -DBSD endif ifeq ($(VERBOSITY), Y) VERBOSITY_OUTPUT = else VERBOSITY_OUTPUT = @ endif .PHONY: all all: default ifeq ($(DEBUG), N) @ $(PRINTF) "\033[1;36m** striping \033[1;32m$(BINARY)\033[1;36m ...\033[0m\n" $(VERBOSITY_OUTPUT) $(STRIP) --remove-section=.comment --remove-section=.note $(BINARY) endif .PHONY: default ifneq ($(SAFEMODE), N) default: CFLAGS += -DSAFEMODE else default: CFLAGS += -DREALMODE endif default: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DVERSION=\"$(VERSION)\ \($(date)\)\" ifeq ($(DEBUG), Y) default: INCLUDES += -DDEBUG -DFATAL endif default: $(BINARY) .PHONY: debug debug: CFLAGS := $(CFLAGS) -g debug: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DDEBUG -DFATAL -DFORCE_ENABLE_VTE_BACKGROUND -DVERSION=\"$(VERSION)\ Debug\ Version\ \($(date)\)\" debug: BINARY := $(BINARY)_dbg debug: $(BINARY) .PHONY: dev dev: develop .PHONY: develop # develop: CFLAGS := -pedantic -pipe -fno-common -W -Wall -Wcast-align -Wformat=2 -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -O3 -g develop: CFLAGS := $(CFLAGS) -g develop: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DREALMODE -DDEBUG -DFATAL -DFORCE_ENABLE_VTE_BACKGROUND -DDEVELOP -DVERSION=\"$(VERSION)\ Develop\ Version\ \($(date)\)\" develop: BINARY := $(BINARY)_dev develop: $(BINARY) .PHONY: vdev vdev: verbosity-output .PHONY: verbosity-output verbosity-output: VERBOSITY_OUTPUT := verbosity-output: develop .PHONY: ddev ddev: defensive-develop .PHONY: defensive-develop defensive-develop: CFLAGS := $(CFLAGS) -g defensive-develop: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DSAFEMODE -DDEBUG -DFATAL -DDEVELOP -DVERSION=\"$(VERSION)\ Develop\ Version\ \($(date)\)\" defensive-develop: BINARY := $(BINARY)_dev defensive-develop: $(BINARY) .PHONY: detail detail: CFLAGS := $(CFLAGS) -g detail: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DGEOMETRY -DDEBUG -DFATAL -DDEVELOP -DDETAIL -DVERSION=\"$(VERSION)\ Develop\ Version\ \($(date)\)\" detail: BINARY := $(BINARY)_dev detail: $(BINARY) .PHONY: full full: CFLAGS = -Wall -Werror -Wformat -Wformat-security -Werror=format-security -Os -g full: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DGEOMETRY -DDEBUG -DFATAL -DDEVELOP -DDETAIL -DFULL -DVERSION=\"$(VERSION)\ Develop\ Version\ \($(date)\)\" full: BINARY := $(BINARY)_dev full: $(BINARY) .PHONY: geometry geometry: CFLAGS := $(CFLAGS) -g geometry: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DGEOMETRY -DDEBUG -DFATAL -DDEVELOP -DVERSION=\"$(VERSION)\ Develop\ Version\ \($(date)\)\" geometry: BINARY := $(BINARY)_dev geometry: $(BINARY) .PHONY: ut ut: unit_test .PHONY: unit_test unit_test: CFLAGS := $(CFLAGS) -g unit_test: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(PACKAGE)\" -DSAFEMODE -DDEBUG -DFATAL -DDEVELOP -DUNIT_TEST -DVERSION=\"$(VERSION)_UNIT_TEST_$(date)\" unit_test: $(OBJ) @ sh unit_test.sh "$(INCLUDES)" --enable-gdb --test_all .PHONY: uto uto: unit_test_object .PHONY: unit_test_object unit_test_object: CFLAGS := $(CFLAGS) -g unit_test_object: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(PACKAGE)\" -DSAFEMODE -DGEOMETRY -DDEBUG -DFATAL -DDEVELOP -DDETAIL -DFULL -DUNIT_TEST -DVERSION=\"$(VERSION)_UNIT_TEST_$(date)\" unit_test_object: $(OBJ) .PHONY: utb utb: unit_test_build .PHONY: unit_test_build unit_test_build: CFLAGS := $(CFLAGS) -g unit_test_build: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(PACKAGE)\" -DSAFEMODE -DGEOMETRY -DDEBUG -DFATAL -DDEVELOP -DDETAIL -DFULL -DUNIT_TEST -DVERSION=\"$(VERSION)_UNIT_TEST_$(date)\" unit_test_build: $(OBJ) @ sh unit_test.sh "$(INCLUDES)" --build_program_only .PHONY: utd utd: unit_test_debug .PHONY: unit_test_debug unit_test_debug: CFLAGS := $(CFLAGS) -g unit_test_debug: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(PACKAGE)\" -DSAFEMODE -DGEOMETRY -DDEBUG -DFATAL -DDEVELOP -DDETAIL -DFULL -DUNIT_TEST -DVERSION=\"$(VERSION)_UNIT_TEST_$(date)\" unit_test_debug: $(OBJ) @ sh unit_test.sh "$(INCLUDES)" --enable-glib-debugger --enable-gtk-debugger --enable-gdb .PHONY: utf utf: unit_test_full .PHONY: unit_test_full unit_test_full: CFLAGS := $(CFLAGS) -g unit_test_full: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(PACKAGE)\" -DSAFEMODE -DDEBUG -DFATAL -DDEVELOP -DUNIT_TEST -DVERSION=\"$(VERSION)_UNIT_TEST_$(date)\" unit_test_full: $(OBJ) @ sh unit_test.sh "$(INCLUDES)" --enable-glib-debugger --enable-gtk-debugger --enable-gdb --enable-valgrind .PHONY: memory memory: CFLAGS = -Wall -Wformat -Wformat-security -Werror=format-security -O2 memory: INCLUDES := $(INCLUDES) -DAUTHOR=\"$(AUTHOR_CONVERT)\" -DDEBUG -DFATAL -DDEVELOP -DSAFEMODE -DOUT_OF_MEMORY -DVERSION=\"$(VERSION)\ Develop\ Version\ \($(date)\)\" memory: BINARY := $(BINARY)_dev memory: $(BINARY) .PHONY: clean clean: -@ for FileName in $(BINARY) $(BINARY)_dev $(BINARY)_dbg $(OBJ) unit_test unit_test.[co] gdb_batch gdb.log valgrind.log vgcore.*; \ do \ if [ -f "$$FileName" ]; then \ $(PRINTF) "\033[1;35m** deleting \033[1;32m$$FileName\033[1;35m ...\033[0m\n"; \ rm "$$FileName"; \ fi; \ done %.o: %.c %.h data.h $(BINARY).h @ $(PRINTF) "\033[1;33m** compiling \033[1;32m$@\033[1;33m ...\033[0m\n" $(VERBOSITY_OUTPUT) $(CC) $(CPPFLAGS) $(CFLAGS) $(INCLUDES) -c $< `$(OBJ_PKG_CMD)` $(BINARY): $(OBJ) @ $(PRINTF) "\033[1;36m** compiling \033[1;32m$(BINARY)\033[1;36m ...\033[0m\n" $(VERBOSITY_OUTPUT) $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -o $(BINARY) $(OBJ) `$(BINARY_PKG_CMD)` .PHONY: data data: debug @ $(MAKE) -C ../po po .PHONY: install install: $(BINARY) @ install -d $(DESTDIR)/$(BINDIR) @ if [ -f $(BINARY) ]; then \ $(PRINTF) "\033[1;33m** installing \033[1;32m$(BINARY)\033[1;33m to \033[1;34m$(DESTDIR)/$(BINDIR)\033[1;33m ...\033[0m\n" ; \ install -m 755 $(BINARY) $(DESTDIR)/$(BINDIR) ; \ fi ; \ .PHONY: uninstall uninstall: @ - if [ -f $(DESTDIR)/$(BINDIR)/$(BINARY) ]; then \ $(PRINTF) "\033[1;35m** deleting \033[1;32m$(DESTDIR)/$(BINDIR)/$(BINARY)\033[1;35m ...\033[0m\n" ; \ rm "$(DESTDIR)/$(BINDIR)/$(BINARY)" ; \ DirName="$(DESTDIR)/$(BINDIR)" ; \ until [ -n "`ls -A $$DirName`" -o "$$DirName" = "$(DESTDIR)/$(PREFIX)" ]; do \ $(PRINTF) "\033[1;35m** deleting directory \033[1;34m$$DirName\033[1;35m ...\033[0m\n" ; \ rmdir "$$DirName" ; \ DirName=`dirname $$DirName` ; \ done \ else \ $(PRINTF) "\033[1;31m** \033[1;32m$(DESTDIR)/$(BINDIR)/$(BINARY)\033[1;31m is NOT exist!\033[0m\n" ; \ fi src/Makefile.am000066400000000000000000000010031246562641500137060ustar00rootroot00000000000000INCLUDES = -DICONDIR=\"$(datadir)/pixmaps\" -DETCDIR=\"$(sysconfdir)/xdg\" bin_PROGRAMS = $_BINARY lilyterm_CFLAGS = $(GTK_CFLAGS) $(vte_CFLAGS) lilyterm_LDADD = $(GTK_LIBS) $(vte_LIBS) $(INTLLIBS) lilyterm_SOURCES = data.h lilyterm.h \ misc.h misc.c \ console.h console.c \ menu.h menu.c \ profile.h profile.c \ property.h property.c \ dialog.h dialog.c \ pagename.h pagename.c \ notebook.h notebook.c \ font.h font.c \ window.h window.c \ main.h main.c src/console.c000066400000000000000000000253611246562641500134750ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "console.h" extern gboolean single_process; extern gchar *profile_dir; void command_option(int argc, char *argv[]) { #ifdef DETAIL g_debug("! Launch command_option()!"); #endif #ifdef SAFEMODE if (argv==NULL) return; #endif gint i; for (i=0; istr); // g_string_free (help_msg, TRUE); exit (0); } else if ((!strcmp(argv[i], "-p")) || (!strcmp(argv[i], "--profile"))) { GString *settings = save_user_settings(NULL, NULL); #ifdef SAFEMODE if (settings) #endif g_print("%s", settings->str); g_string_free(settings, TRUE); exit (0); } else if ((!strcmp(argv[i], "-s")) || (!strcmp(argv[i], "--separate"))) { single_process = FALSE; } else if ((!strcmp(argv[i], "-e")) || (!strcmp(argv[i], "-x")) || (!strcmp(argv[i], "--execute"))) { // If -e or -x options specified then ignore anything beyond them break; } else if (!strcmp(argv[i], "--name")) { if (++i==argc) g_critical("missing program name after --name!\n"); else { extern gchar *wmclass_name; wmclass_name = argv[i]; } } else if (!strcmp(argv[i], "--class")) { if (++i==argc) g_critical("missing program class after --class!\n"); else { extern gchar *wmclass_class; wmclass_class = argv[i]; } } } } // It will be ok if profile=NULL here. gchar *get_help_message(gchar *profile) { #ifdef DETAIL g_debug("! Launch get_help_message()!"); #endif GString *help_message = g_string_new(NULL); gchar *usage = get_help_message_usage(profile, FALSE); #ifdef SAFEMODE if (usage) #endif g_string_append(help_message, usage); gchar *key_binding = get_help_message_key_binding(FALSE); #ifdef SAFEMODE if (key_binding) #endif g_string_append(help_message, key_binding); g_string_append(help_message, "\n"); g_string_append_printf(help_message, _("Please report bug at <%s>.\n"), ISSUES); g_string_append_printf(help_message, _("Thank you for using %s!"), PACKAGE); g_string_append(help_message, "\n"); g_free(usage); g_free(key_binding); return g_string_free(help_message, FALSE); } // It will be ok if profile=NULL here. gchar *get_help_message_usage(gchar *profile, gboolean convert_to_html) { #ifdef DETAIL g_debug("! Launch get_help_message_usage() with profile = %s, convert_to_html = %d!", profile, convert_to_html); #endif GString *help_message = g_string_new(NULL); // TRANSLATE NOTE: Please be care of the length of the following usage translation, // TRANSLATE NOTE: It should be shorter than 80 columns. g_string_append_printf(help_message, _("%s is a libvte based X Terminal Emulator.\n\n"), PACKAGE); g_string_append(help_message, _("Use -T/--title {title} to specify the window title.\n")); g_string_append(help_message, _("Use -R/--role {role} to specify the WM_WINDOW_ROLE string of window.\n")); g_string_append(help_message, _("Use -t/--tab {number} to open multi tabs when starting up.\n")); g_string_append(help_message, _("Use -n/--tab_names {tab names} to specify tab names, separate with .\n")); g_string_append(help_message, _("Use -d/--directory {directory} to specify the init directory when starting up.\n")); g_string_append(help_message, _("Use -g/--geometry {WIDTHxHEIGHT[+-]XOFFSET[+-]YOFFSET} to specify the geometry.\n")); g_string_append(help_message, _("Use -l/-ls/--login to make the shell invoked as a login shell.\n")); g_string_append(help_message, _("Use -ut to disable recording the session in lastlog, utmp and wtmp.\n")); g_string_append(help_message, _("Use -H/--hold to hold the terminal window open when -e/-x command terminated.\n")); // g_string_append(help_message, _("\t\t\tThis option will be ignored when using with -e/-x/--execute option.\n")); g_string_append(help_message, _("Use -s/--separate to run in separate process.\n")); g_string_append(help_message, _("Use -j/--join to integrate new created tabs to the last accessed window.\n")); g_string_append(help_message, _("Use -p/--profile to get a profile sample.\n")); g_string_append_printf(help_message, _("Use -u/--user_profile {%s} to use a specified profile.\n"), PROFILE); g_string_append(help_message, _("Use -v/--version to show the version information.\n")); g_string_append(help_message, _("Use -e/-x/--execute {Command} to run a command. (Must be the final option).\n\n")); g_string_append_printf(help_message, _("The %s system configure file is: %s\n"), PACKAGE, SYS_PROFILE); gchar *current_profile = NULL; // g_debug("get_help_message_usage(): profile = %s", profile); if (profile) current_profile = g_strdup(profile); else current_profile = g_strdup_printf("%s/%s", profile_dir, USER_PROFILE); #ifdef SAFEMODE if (current_profile) { #endif if (convert_to_html) { gchar *msg_str = g_string_free(help_message, FALSE); gchar *new_help_message = convert_text_to_html (&msg_str, TRUE, NULL, "tt", NULL); #ifdef SAFEMODE if (new_help_message) #endif help_message = g_string_new(new_help_message); #ifdef SAFEMODE else help_message = g_string_new(""); #endif g_free(new_help_message); current_profile = convert_text_to_html (¤t_profile, TRUE, "darkgreen", "tt", NULL); } else { gchar *new_current_profile = g_strdup_printf("%s\n\n", current_profile); g_free(current_profile); current_profile = new_current_profile; } gchar *profile_message = g_strdup_printf(_("And your %s profile is: "), PACKAGE); #ifdef SAFEMODE if (profile_message) #endif if (convert_to_html) profile_message = convert_text_to_html(&profile_message, TRUE, NULL, "tt", NULL); // g_debug("FINAL: profile_message = %s", profile_message); #ifdef SAFEMODE if (profile_message) #endif g_string_append(help_message, profile_message); #ifdef SAFEMODE if (current_profile) #endif g_string_append(help_message, current_profile); g_free(profile_message); #ifdef SAFEMODE } #endif g_free(current_profile); return g_string_free(help_message, FALSE); } gchar *get_help_message_key_binding(gboolean convert_to_html) { #ifdef DETAIL g_debug("! Launch get_help_message_key_binding() with convert_to_html = %d!", convert_to_html); #endif gchar *msg_head = _("Default key binding:"); // TRANSLATE NOTE: Please be care of the spacing when translating the following key binding description. // TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [Key binding] page after translating. gchar *disable_key_binding = _(" * <`> Disable/Enable hyperlinks, function keys and menu."); GString *message = g_string_new(NULL); g_string_append(message, _(" * Add a New tab with current directory.\n")); g_string_append(message, _(" * Switch to Prev/Next tab.\n")); g_string_append(message, _(" * Switch to First/Last tab.\n")); g_string_append(message, _(" * <[/]> Move current tab Forward/Backward.\n")); g_string_append(message, _(" * Move current tab to First/Last.\n")); g_string_append(message, _(" * Switch to 1st ~ 12th tab.\n")); g_string_append(message, _(" * <+/-/Enter> Increase/Decrease/Reset the font size of current tab.\n")); g_string_append(message, _(" * Emulate a mouse Scroll Up/Down event on terminal.\n")); g_string_append(message, _(" * Asks to Scroll Up/Down 1 line on terminal.\n")); g_string_append(message, _(" * Gtk+ default behavior, Scroll Up/Down on terminal.\n")); g_string_append(message, _(" * Gtk+ default behavior, Scroll terminal to Top/Bottom.\n")); g_string_append(message, _(" * Switch between full/unfullwindow and full/unfullscreen.\n")); g_string_append(message, _(" * Find text in the terminal.\n" " Use / to find Next/Prev.\n")); g_string_append(message, _(" * Select all the text in the terminal.\n")); g_string_append(message, _(" * Copy/Paste the text in clipboard.\n")); g_string_append(message, _(" * Copy/Paste the text in primary clipboard.\n")); g_string_append(message, _(" (i.e. Emulate middle button mouse click to Copy/Paste)\n")); g_string_append(message,"\n"); g_string_append(message, _("Some key bindings that disabled by default but maybe useful:\n")); g_string_append(message, _(" * Trying to close current tab.\n")); g_string_append(message, _(" (Using or 'exit' to close tabs is recommended)\n")); g_string_append(message, _(" * Open a new window with current directory.\n")); g_string_append(message, _(" * Rename the current tab.\n")); gchar *final_message = NULL; if (convert_to_html) { gchar *str[5]; str[0] = g_strdup_printf (_("TIP: These key bindings may custom or disable by right click menu [%s]."), _("Set key binding")); str[1] = convert_text_to_html(&msg_head, FALSE, NULL, "tt", NULL); str[2] = convert_text_to_html(&disable_key_binding, FALSE, "darkred", "tt", NULL); str[3] = convert_text_to_html(&(message->str), FALSE, NULL, "tt", NULL); str[4] = convert_text_to_html(&str[0], FALSE, "darkblue", "tt", "b", NULL); final_message = g_strdup_printf("%s\n%s\n%s\n%s", str[1], str[2], str[3], str[4]); gint i; for (i=0; i<5; i++) g_free(str[i]); } else final_message = g_strdup_printf("%s\n%s\n%s", msg_head, disable_key_binding, message->str); g_string_free (message, TRUE); return final_message; } src/console.h000066400000000000000000000020031246562641500134660ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include // for L10n #include #include // for exit() #include // for va_start(), va_arg(), va_end() #include // for strcmp() #include #include "lilyterm.h" gchar *get_help_message(gchar *profile); src/data.h000066400000000000000000001461421246562641500127520ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #ifndef DATA_H #define DATA_H #include #include // // **************************** data.h **************************** // #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifdef REALMODE #undef SAFEMODE #else #ifndef SAFEMODE #define SAFEMODE #endif #endif #ifdef OUT_OF_MEMORY // GString *g_string_append() // GString *g_string_prepend() // #define g_dir_read_name(x) NULL #define g_get_tmp_dir() NULL // #define g_get_user_config_dir() NULL #define g_get_user_name() NULL #define g_getenv(x) NULL /* #define g_new0(x,y) NULL */ #define g_strerror(x) NULL #define gtk_entry_get_text(x) NULL #define gtk_widget_get_name(x) NULL #define gtk_file_chooser_get_preview_filename(x) NULL #define pango_font_description_to_string(x) NULL #define vte_terminal_match_check(a,b,c,d) NULL #define vte_terminal_get_encoding(x) NULL #define vte_terminal_get_window_title(x) NULL /* #define g_strsplit(x,y,z) NULL */ #define g_strsplit fake_g_strsplit #define g_strsplit_set(x,y,z) NULL #define g_convert_with_fallback(a,b,c,d,e,f,g,h) NULL #define g_file_read_link(x,y) NULL #define g_get_current_dir() NULL #define g_key_file_get_value(a,b,c,d) NULL #define g_markup_escape_text(x,y) NULL #define g_path_get_basename(x) NULL #define g_path_get_dirname(x) NULL #define g_strconcat(...) NULL /* #define g_strdup(x) NULL */ #define g_strdup fake_g_strdup /* #define g_strdup_printf fake_g_strdup_printf */ #define g_strdup_printf(...) NULL #define gdk_color_to_string(x) NULL #define gdk_keyval_name(x) NULL #define gtk_clipboard_wait_for_text(x) NULL #define gtk_file_chooser_get_filename(x) NULL #define gtk_font_selection_dialog_get_font_name(x) NULL #define gtk_tree_path_to_string(x) NULL #endif // define get_pid_stat(x,y) NULL // define split_string(x,y,z) NULL // define check_string_value(a, b, c, d) NULL // define convert_array_to_string(x,y) NULL // define convert_str_to_utf8(x,y) NULL // define convert_text_to_html(a, b, c, d, ...) NULL // define dialog_key_press_join_string(x,y,z) NULL // define get_VTE_CJK_WIDTH_str(x) NULL // define get_cmdline(x) NULL // define get_colorful_profile(x) NULL // define get_current_pwd_by_pid(x) NULL // define get_default_lc_data(x) NULL // define get_encoding_from_locale(x) NULL // define get_help_message(x) NULL // define get_help_message_key_binding(x) NULL // define get_help_message_usage(x,y) NULL // define get_locale_list(x) NULL // define get_proc_data(x,y,z) NULL // define get_profile(x) NULL // define get_resize_font(x,y) NULL // define get_tab_name_with_cmdline(x) NULL // define get_tab_name_with_current_dir(x) NULL // define get_tab_name_with_page_names(x) NULL // define get_url (x,y,z) NULL // define get_user_profile_path(x,y,z) NULL // define join_strings_to_string(x,y,z,...) NULL // define load_profile_from_dir(x,y) NULL // // **************************** data.h **************************** // // for key value #include #define PROFILE BINARY ".conf" #define SYS_PROFILE ETCDIR "/" PROFILE #define USER_PROFILE "default.conf" #define SOCKET_DATA_VERSION PACKAGE "-0.9.9~rc6" #define PROFILE_FORMAT_VERSION "0.9.9.3" #define NOTEBOOK_GROUP 8 #define ICON_PATH ICONDIR G_DIR_SEPARATOR_S BINARY ".png" #define NULL_DEVICE "/dev/null" #define SYSTEM_FONT_NAME "Monospace 12" #define SYSTEM_COLUMN 80 #define SYSTEM_ROW 24 #define LANGUAGE 255 #if GTK_CHECK_VERSION(2,9,0) // SINCE: gtk+-2.9.0/gtk/gtknotebook.h: gtk_notebook_set_tab_reorderable() #define ENABLE_TAB_REORDER #define ENABLE_PAGE_ADDED // SINCE: gtk+-2.9.0/gtk/gtknotebook.h: gtk_notebook_set_group_id() // END: gtk+-2.24.5/gtk/gtknotebook.h: gtk_notebook_set_group_id() #define ENABLE_DRAG_AND_DROP #else #define DISABLE_TAB_REORDER #define DISABLE_PAGE_ADDED #ifndef GDK_SUPER_MASK // SINCE: gtk+-2.9.0/gdk/gdktypes.h: GDK_SUPER_MASK = 1 << 26 #define GDK_SUPER_MASK 1<<26 #endif #endif #if GTK_CHECK_VERSION(2,11,0) // SINCE: gtk+-2.11.0/gtk/gtkwindow.h: gtk_window_set_opacity() #define ENABLE_RGBA // SINCE: gtk+-2.11.0/gdk/gdkcolor.h: gdk_color_to_string() #define ENABLE_GDKCOLOR_TO_STRING // SINCE: gtk+-2.11.0/gdk/gdk.h: gdk_notify_startup_complete_with_id() #define ENABLE_X_STARTUP_NOTIFICATION_ID #endif #if GTK_CHECK_VERSION(2,11,3) // SINCE: gtk+-2.11.3/gtk/gtkwidget.h: gtk_widget_set_tooltip_text() #define ENABLE_SET_TOOLTIP_TEXT #endif #if GTK_CHECK_VERSION(2,13,0) // SINCE: gtk+-2.13.0/gtk/gtktestutils.h: gtk_test_widget_click() #define ENABLE_MOUSE_SCROLL #else // SINCE: gtk+-2.13.0/gtk/gtkstock.h: #define GTK_STOCK_PAGE_SETUP "gtk-page-setup" #define GTK_FAKE_STOCK_PAGE_SETUP GTK_STOCK_INDEX #endif #if GTK_CHECK_VERSION(2,13,4) // SINCE: gtk+-2.13.4/gtk/gtkwidget.h: gtk_widget_get_allocation() #define USE_GTK_ALLOCATION #else // SINCE: gtk+-2.13.4/gtk/gtkdialog.h: gtk_dialog_get_content_area() #define gtk_dialog_get_content_area(x) x->vbox // SINCE: gtk+-2.13.4/gtk/gtkdialog.h: gtk_dialog_get_action_area() #define gtk_dialog_get_action_area(x) x->action_area // SINCE: gtk+-2.13.4/gtk/gtkwidget.h: gtk_widget_get_window #define gtk_widget_get_window(x) x->window #endif #if ! GTK_CHECK_VERSION(2,15,0) // SINCE: gtk+-2.15.0/gtk/gtkmenuitem.h: gtk_menu_item_set_label() #define gtk_menu_item_set_label(x,y) gtk_label_set_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN(x))), y) #endif #if ! GTK_CHECK_VERSION(2,17,5) // SINCE: gtk+-2.17.5/gtk/gtkwidget.h: gtk_widget_set_can_focus() #define gtk_widget_set_can_focus(x,FALSE) GTK_WIDGET_UNSET_FLAGS(x,GTK_CAN_FOCUS) # ifdef UNIT_TEST #define gtk_widget_get_visible gtk_widget_is_focus #define gtk_widget_get_allocation(x,y) gtk_widget_is_focus(x) # endif #endif #if ! GTK_CHECK_VERSION(2,19,5) // SINCE: gtk+-2.19.5/gtk/gtkwidget.h: gtk_widget_get_mapped() #define gtk_widget_get_mapped(x) GTK_WIDGET_MAPPED(x) #endif #if ! GTK_CHECK_VERSION(2,90,4) // END: gtk+-2.90.3/gtk/gtknotebook.h: gtk_notebook_set_tab_label_packing() #define USE_OLD_GTK_LABEL_PACKING #endif #if ! GTK_CHECK_VERSION(2,22,0) // SINCE: gtk+-2.22.0/gdk/gdkkeysyms.h: #define GDK_KEY_VoidSymbol 0xffffff #define GDK_KEY_VoidSymbol GDK_VoidSymbol #define GDK_KEY_asciitilde GDK_asciitilde #define GDK_KEY_Shift_L GDK_Shift_L #define GDK_KEY_Hyper_R GDK_Hyper_R #define GDK_KEY_F1 GDK_F1 #define GDK_KEY_F12 GDK_F12 #define GDK_KEY_Menu GDK_Menu #define GDK_KEY_Super_R GDK_Super_R #define GDK_KEY_Super_L GDK_Super_L #define GDK_KEY_a GDK_a #define GDK_KEY_z GDK_z #define GDK_KEY_A GDK_A #define GDK_KEY_Z GDK_Z #endif #if ! GTK_CHECK_VERSION(2,23,0) // END: gtk+-2.23.0/gtk/gtkmain.h: gtk_quit_add() GTK_DISABLE_DEPRECATED #define g_atexit(x) gtk_quit_add(0, (GtkFunction)x, NULL) #endif #if GTK_CHECK_VERSION(2,3,2) && ( ! GTK_CHECK_VERSION(2,91,6)) // SINCE: gtk+-2.3.2/gdk/gdkspawn.h: gdk_spawn_on_screen_with_pipes() // END: gtk+-2.91.6/gdk/gdkspawn.h: gdk_spawn_on_screen_with_pipes() #define g_spawn_async_with_pipes(a,b,c,d,e,f,g,h,i,j,k) gdk_spawn_on_screen_with_pipes(gdk_screen_get_default(),a,b,c,d,e,f,g,h,i,j,k) #endif #if GTK_CHECK_VERSION(2,91,0) // SINCE: gtk+-2.91.0/gtk/gtkwidget.h GtkAlign gtk_widget_set_halign() #define USE_GTK_WIDGET_SET_HALIGN #endif #if ! GTK_CHECK_VERSION(2,90,6) // END: gtk+-2.90.6/gtk/gtkdialog.h: GTK_DIALOG_NO_SEPARATOR = 1 << 2 #define EXIST_GTK_DIALOG_NO_SEPARATOR #endif #if GTK_CHECK_VERSION(2,90,7) // SINCE: gtk+-2.7.0/gdk/gdkscreen.h: gdk_screen_get_rgba_colormap() // END: gtk+-2.90.7/gdk/gdkscreen.h: gdk_screen_get_rgba_colormap() // SINCE: gtk+-2.7.0/gdk/gdkscreen.h: gdk_screen_get_rgba_visual() #define USE_GDK_SCREEN_GET_RGBA_VISUAL #else // SINCE: gtk+-2.9.0/gtk/gtknotebook.h: gtk_notebook_set_group() // END: gtk+-2.90.7/gtk/gtknotebook.h: gtk_notebook_set_group() // SINCE: gtk+-2.23.0/gtk/gtknotebook.h: gtk_notebook_set_group_name() #define gtk_notebook_set_group_name(x,y) gtk_notebook_set_group(x,GINT_TO_POINTER (NOTEBOOK_GROUP)) #endif #if GTK_CHECK_VERSION(2,91,0) // SINCE: gtk+-2.91.0/gtk/gtkwidget.h: gtk_widget_get_preferred_size() #define gtk_widget_get_child_requisition(x,y) gtk_widget_get_preferred_size(x,y,NULL) #endif #if GTK_CHECK_VERSION(2,91,1) // SINCE: gtk+-2.91.1/gtk/gtkwindow.h: gtk_window_set_has_resize_grip() // END: gtk+-3.13.4/gtk/gtkwindow.h: GDK_DEPRECATED_IN_3_14 void gtk_window_set_has_resize_grip() # if ! GTK_CHECK_VERSION(3,13,4) #define NO_RESIZE_GRIP # endif // FIXME: gtk_window_parse_geometry() works well in all GTK+2/3 versions? // #define USE_XPARSEGEOMETRY // END: gtk+-2.91.1/gtk/gtkwidget.h: gtk_widget_hide_all() #define gtk_widget_hide_all(x) gtk_widget_hide(x) #endif #if GTK_CHECK_VERSION(2,91,5) #define USE_GTK3_GEOMETRY_METHOD #else #define USE_GTK2_GEOMETRY_METHOD # ifdef UNIT_TEST #define gtk_window_resize_to_geometry gtk_window_move # endif #endif #if GTK_CHECK_VERSION(2,91,7) #define GTK3_LAME_GDK_SCREEN_IS_COMPOSITED #define GTK3_LAME_GDK_SCREEN_GET_RGBA_VISUAL // SINCE: gtk+-2.91.7/gdk/gdkmain.h: void gdk_disable_multidevice () // Need gdk_disable_multidevice() be called to get gtk_test_widget_click() working. #define SCROLL_LINE 5 #endif #if GTK_CHECK_VERSION(3,1,12) // SINCE: gtk+-3.1.12/gtk/gtkfontchooser.h: gtk_font_chooser_set_filter_func() // DISABLE: it filtered too many Chinese fonts. // #define EXIST_GTK_FONT_CHOOSER_SET_FILTER_FUNC #endif #if GTK_CHECK_VERSION(3,3,4) // END: gtk+-3.3.4/gtk/deprecated/gtktable.h: gtk_table_attach_defaults() #define USE_GTK_GRID // END: gtk+-3.3.4/gtk/deprecated/gtkvscrollbar.h: gtk_vscrollbar_new() #define gtk_vscrollbar_new(x) gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL,x) // END: gtk+-3.3.4/gtk/deprecated/gtkhscale.h: gtk_hscale_new_with_range() #define gtk_hscale_new_with_range(x,y,z) gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL,x,y,z) #else // END: gtk+-3.3.4/gtk/deprecated/gtkstyle.h: gtk_widget_modify_style() #define USING_OLD_GTK_RC_STYLE_NEW // END: gtk+-3.3.4/gtk/deprecated/gtkfontsel.h: gtk_font_selection_dialog_new() #define GTK_FONT_CHOOSER GTK_FONT_SELECTION_DIALOG #define gtk_font_chooser_dialog_new(x,y) gtk_font_selection_dialog_new(x) #define gtk_font_chooser_get_font gtk_font_selection_dialog_get_font_name #define gtk_font_chooser_set_font gtk_font_selection_dialog_set_font_name # ifdef UNIT_TEST #define gtk_font_chooser_set_filter_func(a,b,c,d) NULL # endif #endif // FIXME: The replacement of GtkColorSelection in GTK3, GtkColorChooser, is a lame... orz #if GTK_CHECK_VERSION(3,3,18) // SINCE: gtk+-3.3.18/gtk/gtkcolorchooserwidget.h: gtk_color_chooser_widget_new() #define USE_GTK_COLOR_CHOOSER #else // END: gtk+-3.3.18/gtk/deprecated/gtkcolorsel.h: gtk_color_selection_new() #define USE_OLD_GTK_COLOR_SELECTION #define GTK_COLOR_CHOOSER GTK_COLOR_SELECTION #define GtkColorChooser GtkColorSelection #define gtk_color_chooser_get_rgba gtk_color_selection_get_current_color #define adjust_vte_color(x,y,z) adjust_vte_color(x,z) #endif #if GTK_CHECK_VERSION(3,8,0) // END: gtk+-3.8.0/gtk/gtkwindow.h: GDK_DEPRECATED_IN_3_8_FOR(gtk_widget_set_opacity) #define gtk_window_set_opacity(x,y) gtk_widget_set_opacity(GTK_WIDGET(x),y) #endif #if GTK_CHECK_VERSION(3,9,0) // END: gtk+-3.9.0/gdk/gdkmain.h: GDK_DEPRECATED_IN_3_8_FOR(gdk_display_get_name(gdk_display_get_default())) gdk_get_display() #define gdk_get_display() g_strdup(gdk_display_get_name(gdk_display_get_default())) #endif #if GTK_CHECK_VERSION(3,9,8) // END: gtk+-3.9.8/gtk/gtkbutton.h: GDK_DEPRECATED_IN_3_10_FOR(gtk_button_new_with_label) gtk_button_new_from_stock() #define gtk_button_new_from_stock(x) gtk_button_new_from_icon_name(x,GTK_ICON_SIZE_BUTTON) // END: gtk+-3.9.8/gtk/gtkimage.h: GDK_DEPRECATED_IN_3_10_FOR(gtk_image_new_from_icon_name) gtk_image_new_from_stock() #define gtk_image_new_from_stock gtk_image_new_from_icon_name // END: gtk+-3.9.8/gtk/gtkimagemenuitem.h: GDK_DEPRECATED_IN_3_10_FOR(gtk_menu_item_new_with_label) gtk_image_menu_item_new_with_label() #define gtk_image_menu_item_new_with_label gtk_menu_item_new_with_label // END: gtk+-3.9.8/gtk/gtkimagemenuitem.h: GDK_DEPRECATED_IN_3_10 gtk_image_menu_item_set_image() #define gtk_image_menu_item_set_image(a,b) NULL #endif #if GTK_CHECK_VERSION(3,9,10) #define GTK_FAKE_STOCK_ABOUT "gtk-about" #define GTK_FAKE_STOCK_ADD "gtk-add" #define GTK_FAKE_STOCK_APPLY "gtk-apply" #define GTK_FAKE_STOCK_CANCEL "gtk-cancel" #define GTK_FAKE_STOCK_CLEAR "gtk-clear" #define GTK_FAKE_STOCK_CLOSE "gtk-close" #define GTK_FAKE_STOCK_CONVERT "gtk-convert" #define GTK_FAKE_STOCK_COPY "gtk-copy" #define GTK_FAKE_STOCK_DIALOG_AUTHENTICATION "gtk-dialog-authentication" #define GTK_FAKE_STOCK_DIALOG_INFO "gtk-dialog-info" #define GTK_FAKE_STOCK_DIALOG_WARNING "gtk-dialog-warning" #define GTK_FAKE_STOCK_DIALOG_ERROR "gtk-dialog-error" #define GTK_FAKE_STOCK_DIALOG_QUESTION "gtk-dialog-question" #define GTK_FAKE_STOCK_DND "gtk-dnd" #define GTK_FAKE_STOCK_DND_MULTIPLE "gtk-dnd-multiple" #define GTK_FAKE_STOCK_EDIT "gtk-edit" #define GTK_FAKE_STOCK_EXECUTE "gtk-execute" #define GTK_FAKE_STOCK_FILE "gtk-file" #define GTK_FAKE_STOCK_FIND "gtk-find" #define GTK_FAKE_STOCK_GOTO_BOTTOM "gtk-goto-bottom" #define GTK_FAKE_STOCK_GOTO_TOP "gtk-goto-top" #define GTK_FAKE_STOCK_GO_BACK "gtk-go-back" #define GTK_FAKE_STOCK_GO_DOWN "gtk-go-down" #define GTK_FAKE_STOCK_GO_UP "gtk-go-up" #define GTK_FAKE_STOCK_HELP "gtk-help" #define GTK_FAKE_STOCK_INDEX "gtk-index" #define GTK_FAKE_STOCK_NEW "gtk-new" #define GTK_FAKE_STOCK_OK "gtk-ok" #define GTK_FAKE_STOCK_OPEN "gtk-open" #define GTK_FAKE_STOCK_PAGE_SETUP "gtk-page-setup" #define GTK_FAKE_STOCK_PASTE "gtk-paste" #define GTK_FAKE_STOCK_PREFERENCES "gtk-preferences" #define GTK_FAKE_STOCK_PROPERTIES "gtk-properties" #define GTK_FAKE_STOCK_QUIT "gtk-quit" #define GTK_FAKE_STOCK_REFRESH "gtk-refresh" #define GTK_FAKE_STOCK_REVERT_TO_SAVED "gtk-revert-to-saved" #define GTK_FAKE_STOCK_SAVE "gtk-save" #define GTK_FAKE_STOCK_SAVE_AS "gtk-save-as" #define GTK_FAKE_STOCK_SELECT_COLOR "gtk-select-color" #define GTK_FAKE_STOCK_SELECT_FONT "gtk-select-font" #define GTK_FAKE_STOCK_ZOOM_100 "gtk-zoom-100" #define GTK_FAKE_STOCK_ZOOM_IN "gtk-zoom-in" #define GTK_FAKE_STOCK_ZOOM_OUT "gtk-zoom-out" #else #define GTK_FAKE_STOCK_ABOUT GTK_STOCK_ABOUT #define GTK_FAKE_STOCK_ADD GTK_STOCK_ADD #define GTK_FAKE_STOCK_APPLY GTK_STOCK_APPLY #define GTK_FAKE_STOCK_CANCEL GTK_STOCK_CANCEL #define GTK_FAKE_STOCK_CLEAR GTK_STOCK_CLEAR #define GTK_FAKE_STOCK_CLOSE GTK_STOCK_CLOSE #define GTK_FAKE_STOCK_CONVERT GTK_STOCK_CONVERT #define GTK_FAKE_STOCK_COPY GTK_STOCK_COPY #define GTK_FAKE_STOCK_DIALOG_AUTHENTICATION GTK_STOCK_DIALOG_AUTHENTICATION #define GTK_FAKE_STOCK_DIALOG_ERROR GTK_STOCK_DIALOG_ERROR #define GTK_FAKE_STOCK_DIALOG_INFO GTK_STOCK_DIALOG_INFO #define GTK_FAKE_STOCK_DIALOG_QUESTION GTK_STOCK_DIALOG_QUESTION #define GTK_FAKE_STOCK_DIALOG_WARNING GTK_STOCK_DIALOG_WARNING #define GTK_FAKE_STOCK_DND GTK_STOCK_DND #define GTK_FAKE_STOCK_DND_MULTIPLE GTK_STOCK_DND_MULTIPLE #define GTK_FAKE_STOCK_EDIT GTK_STOCK_EDIT #define GTK_FAKE_STOCK_EXECUTE GTK_STOCK_EXECUTE #define GTK_FAKE_STOCK_FILE GTK_STOCK_FILE #define GTK_FAKE_STOCK_FIND GTK_STOCK_FIND #define GTK_FAKE_STOCK_GO_BACK GTK_STOCK_GO_BACK #define GTK_FAKE_STOCK_GO_DOWN GTK_STOCK_GO_DOWN #define GTK_FAKE_STOCK_GOTO_BOTTOM GTK_STOCK_GOTO_BOTTOM #define GTK_FAKE_STOCK_GOTO_TOP GTK_STOCK_GOTO_TOP #define GTK_FAKE_STOCK_GO_UP GTK_STOCK_GO_UP #define GTK_FAKE_STOCK_HELP GTK_STOCK_HELP #define GTK_FAKE_STOCK_INDEX GTK_STOCK_INDEX #define GTK_FAKE_STOCK_NEW GTK_STOCK_NEW #define GTK_FAKE_STOCK_OK GTK_STOCK_OK #define GTK_FAKE_STOCK_OPEN GTK_STOCK_OPEN #ifndef GTK_FAKE_STOCK_PAGE_SETUP #define GTK_FAKE_STOCK_PAGE_SETUP GTK_STOCK_PAGE_SETUP #endif #define GTK_FAKE_STOCK_PASTE GTK_STOCK_PASTE #define GTK_FAKE_STOCK_PREFERENCES GTK_STOCK_PREFERENCES #define GTK_FAKE_STOCK_PROPERTIES GTK_STOCK_PROPERTIES #define GTK_FAKE_STOCK_QUIT GTK_STOCK_QUIT #define GTK_FAKE_STOCK_REFRESH GTK_STOCK_REFRESH #define GTK_FAKE_STOCK_REVERT_TO_SAVED GTK_STOCK_REVERT_TO_SAVED #define GTK_FAKE_STOCK_SAVE GTK_STOCK_SAVE #define GTK_FAKE_STOCK_SAVE_AS GTK_STOCK_SAVE_AS #define GTK_FAKE_STOCK_SELECT_COLOR GTK_STOCK_SELECT_COLOR #define GTK_FAKE_STOCK_SELECT_FONT GTK_STOCK_SELECT_FONT #define GTK_FAKE_STOCK_ZOOM_100 GTK_STOCK_ZOOM_100 #define GTK_FAKE_STOCK_ZOOM_IN GTK_STOCK_ZOOM_IN #define GTK_FAKE_STOCK_ZOOM_OUT GTK_STOCK_ZOOM_OUT #endif #if GTK_CHECK_VERSION(3,11,5) // END: gtk+-3.11.5/gtk/gtkdialog.h: GDK_DEPRECATED_IN_3_10 gtk_alternative_dialog_button_order() #define USE_GTK_ALT_DIALOG_BUTTON_ORDER #define gtk_alternative_dialog_button_order(x) gtk_alt_dialog_button_order() #else // END: gtk+-3.11.5/gtk/gtkdialog.h: GDK_DEPRECATED_IN_3_10 gtk_dialog_get_action_area() #define HAVE_GTK_DIALOG_GET_ACTION_AREA #endif #if ! GLIB_CHECK_VERSION(2,13,0) // SINCE: glib-2.13.0/glib/gmain.h: g_timeout_add_seconds() #define g_timeout_add_seconds(x,y,z) g_timeout_add(x*1000,y,z); #endif #if GLIB_CHECK_VERSION(2,31,2) // END: glib-2.31.2/glib/gutils.h: g_atexit () GLIB_DEPRECATED #define g_atexit atexit #endif #if ! GLIB_CHECK_VERSION(2,31,18) // SINCE: glib-2.31.18/glib/gmacros.h #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS #define G_GNUC_END_IGNORE_DEPRECATIONS #endif #ifndef VTE_CHECK_VERSION #define VTE_CHECK_VERSION(major,minor,micro) \ (0 > (major) || (0 == (major) && 0 > (minor)) || (0 == (major) && 0 == (minor) && 0 >= (micro))) #endif #if VTE_CHECK_VERSION(0,15,3) // SINCE: vte-0.15.3/src/vte.h: vte_terminal_select_all() #define ENABLE_VTE_SELECT_ALL #endif #if VTE_CHECK_VERSION(0,17,1) // SINCE: vte-0.17.1/src/vte.h: vte_terminal_set_cursor_blink_mode() #define USE_NEW_VTE_CURSOR_BLINKS_MODE // SINCE: vte-0.17.1/src/vte.h: vte_terminal_match_add_gregex() #define USE_NEW_VTE_MATCH_ADD_GREGEX #endif #if VTE_CHECK_VERSION(0,19,1) && ! VTE_CHECK_VERSION(0,38,0) // SINCE: vte-0.19.1/src/vte.h: vte_terminal_set_cursor_shape() #define ENABLE_CURSOR_SHAPE // SINCE: vte-0.19.1/src/vteseq.c: g_signal_emit_by_name(terminal, "beep"); // END: vte-0.37.90/src/vteseq.c: g_signal_emit_by_name(terminal, "beep"); #define ENABLE_BEEP_SINGAL #endif #if VTE_CHECK_VERSION(0,20,4) // SINCE: vte-0.20.4/src/vte.h: VTE_ERASE_TTY #define ENABLE_VTE_ERASE_TTY #endif #if VTE_CHECK_VERSION(0,22,3) #define SCROLL_HISTORY -1 #else #define SCROLL_HISTORY 1024 #endif #if VTE_CHECK_VERSION(0,24,0) // END: vte-0.24.0/src/vte.h: vte_terminal_get_padding() G_GNUC_DEPRECATED #define vte_terminal_get_padding fake_vte_terminal_get_padding #endif #if VTE_CHECK_VERSION(0,25,1) // SINCE: vte-0.25.1/src/vte.h: vte_terminal_search_set_gregex() #define ENABLE_FIND_STRING // END: vte-0.25.1/src/vtedeprecated.h: void vte_terminal_set_font_from_string_full() #define vte_terminal_set_font_from_string_full(x,y,z) vte_terminal_set_font_from_string(x,y) #else // END: vte-0.25.1/src/vtedeprecated.h: vte_terminal_fork_command() #define USE_OLD_VTE_FORK_COMMAND #endif #if VTE_CHECK_VERSION(0,27,90) && GTK_CHECK_VERSION(2,91,2) // SINCE: vte-0.27.90/src/vte.h: void vte_terminal_set_colors_rgba() // SINCE: gtk+-2.91.2/gdk/gdktypes.h: typedef struct _GdkRGBA GdkRGBA; #define USE_GDK_RGBA #define MAX_COLOR 1 #else #define GdkRGBA GdkColor #define gdk_rgba_parse(x,y) gdk_color_parse(y,x) #define gtk_color_selection_set_previous_rgba gtk_color_selection_set_previous_color #define gtk_color_selection_set_current_rgba gtk_color_selection_set_current_color #define vte_terminal_set_colors_rgba vte_terminal_set_colors #define vte_terminal_set_color_foreground_rgba vte_terminal_set_color_foreground #define vte_terminal_set_color_background_rgba vte_terminal_set_color_background #define vte_terminal_set_color_bold_rgba vte_terminal_set_color_bold #define vte_terminal_set_color_cursor_rgba vte_terminal_set_color_cursor #define MAX_COLOR 0xFFFF #endif #if ! VTE_CHECK_VERSION(0,34,6) // END: vte-0.34.6/src/vtedeprecated.h: void vte_terminal_im_append_menuitems() #define ENABLE_IM_APPEND_MENUITEMS #endif #if VTE_CHECK_VERSION(0,34,8) # ifdef UNIT_TEST #define USE_FAKE_FUNCTIONS #define vte_terminal_set_opacity(x,y) NULL #define vte_terminal_set_background_transparent(x,y) vte_terminal_set_size(x,1,1) #define vte_terminal_set_background_image_file(x,y) vte_terminal_set_size(x,1,1) #define vte_terminal_set_background_saturation(x,y) vte_terminal_set_size(x,1,1) #define vte_terminal_set_scroll_background(x,y) vte_terminal_set_size(x,1,1) #define vte_terminal_set_background_tint_color(x,y) vte_terminal_set_size(x,1,1) # endif #else // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_opacity(VteTerminal *terminal, guint16 opacity) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_background_tint_color(VteTerminal *terminal, // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_scroll_background(VteTerminal *terminal, gboolean scroll) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_background_image(VteTerminal *terminal, GdkPixbuf *image) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_background_image_file(VteTerminal *terminal, const char *path) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_background_tint_color(VteTerminal *terminal, const GdkColor *color) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_background_saturation(VteTerminal *terminal, double saturation) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_background_transparent(VteTerminal *terminal, gboolean transparent) G_GNUC_DEPRECATED; // END: vte-0.34.8/src/vtedeprecated.h: void vte_terminal_set_opacity(VteTerminal *terminal, guint16 opacity) G_GNUC_DEPRECATED; #define ENABLE_VTE_BACKGROUND #endif #if VTE_CHECK_VERSION(0,34,8) // END: vte-0.34.8/src/vtedeprecated.h: GtkAdjustment *vte_terminal_get_adjustment(VteTerminal *terminal) G_GNUC_DEPRECATED; #define USE_GTK_SCROLLABLE #endif #if VTE_CHECK_VERSION(0,37,0) // SINCE: ./vte-0.37.0/src/vteterminal.h: void vte_terminal_search_set_gregex (VteTerminal *terminal, GRegex *regex, GRegexMatchFlags flags); #define vte_terminal_search_set_gregex(a,b) vte_terminal_search_set_gregex(a,b,0) // END: ./vte-0.36.3/src/vte.h: void vte_terminal_set_color_foreground_rgba() #define vte_terminal_set_colors_rgba vte_terminal_set_colors #define vte_terminal_set_color_foreground_rgba vte_terminal_set_color_foreground #define vte_terminal_set_color_background_rgba vte_terminal_set_color_background #define vte_terminal_set_color_bold_rgba vte_terminal_set_color_bold #define vte_terminal_set_color_cursor_rgba vte_terminal_set_color_cursor // SINCE: ./vte-0.37.0/src/vteterminal.h void vte_terminal_set_font() #define USE_VTE_TERMINAL_SET_FONT // END: vte-0.36.3/src/vtedeprecated.h void vte_terminal_set_opacity() G_GNUC_DEPRECATED; #undef FORCE_ENABLE_VTE_BACKGROUND #else // SINCE: vte-0.37.0/src/vteterminal.h: gboolean vte_terminal_spawn_sync() #define vte_terminal_spawn_sync(a,b,c,d,e,f,g,h,i,j,k) vte_terminal_fork_command_full(a,b,c,d,e,f,g,h,i,k) // END: vte-0.36.3/src/vte.h: void vte_terminal_set_word_chars() #define ENABLE_SET_WORD_CHARS // END: vte-0.37.0/src/vteterminal.h: void vte_terminal_set_emulation() #define ENABLE_SET_EMULATION // END: vte-0.36.3/src/vte.h void vte_terminal_match_clear_all() #define vte_terminal_match_remove_all vte_terminal_match_clear_all // END: vte-0.36.3/src/vte-private.h: GtkBorder inner_border; #define VTE_HAS_INNER_BORDER #endif #if VTE_CHECK_VERSION(0,37,90) // SINCE: ./vte-0.37.90/src/vteterminal.h: gboolean vte_terminal_set_encoding(VteTerminal *terminal, const char *codeset, GError **error) #define vte_terminal_set_encoding(a,b) vte_terminal_set_encoding(a,b,NULL) #endif #if ! VTE_CHECK_VERSION(0,38,0) // END: ./vte-0.37.90/src/vteterminal.h: void vte_terminal_set_visible_bell() #define ENABLE_VISIBLE_BELL #else # ifdef UNIT_TEST #define vte_terminal_set_visible_bell(x,y) vte_terminal_set_size(x,1,1) # endif #endif #define ENABLE_RGBA_VER "GTK 2.11" #define ENABLE_GDKCOLOR_TO_STRING_VER "GTK 2.11" #define ENABLE_MOUSE_SCROLL_VER "GTK 2.13" #define ENABLE_VTE_SELECT_ALL_VER "VTE 0.15.3" #define ENABLE_FIND_STRING_VER "VTE 0.25.1" #define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK | GDK_SUPER_MASK) #define SHIFT_ONLY_MASK (GDK_CONTROL_MASK | GDK_MOD1_MASK | GDK_MOD4_MASK | GDK_SUPER_MASK) // mods = (event->state | GDK_LOCK_MASK | GDK_MOD2_MASK) & GDK_MODIFIER_MASK; #define DUD_MASK (GDK_LOCK_MASK | GDK_MOD2_MASK | ( ~GDK_MODIFIER_MASK)) #define KEY_GROUP 9 typedef enum { KEY_GROUP_MISC, // 0 KEY_GROUP_TAB_OPERATION, // 1 KEY_GROUP_SWITCH_TAB, // 2 KEY_GROUP_MOVE_TAB, // 3 KEY_GROUP_SWITCH_TO_TAB, // 4 KEY_GROUP_TEXT, // 5 KEY_GROUP_SCROLL, // 6 KEY_GROUP_FONT, // 7 KEY_GROUP_NONE, // 8, MUST BE THE LAST ONE!! } Key_Binding_Groups; #ifdef FATAL #define KEYS 46 #define FIXED_KEYS 3 #else #define KEYS 45 #define FIXED_KEYS 2 #endif typedef enum { KEY_DISABLE_FUNCTION, // 0 KEY_NEW_TAB, // 1 KEY_CLOSE_TAB, // 2 KEY_EDIT_LABEL, // 3 KEY_FIND, // 4 KEY_FIND_PREV, // 5 KEY_FIND_NEXT, // 6 KEY_PREV_TAB, // 7 KEY_NEXT_TAB, // 8 KEY_FIRST_TAB, // 9 KEY_LAST_TAB, // 10 KEY_MOVE_TAB_FORWARD, // 11 KEY_MOVE_TAB_BACKWARD, // 12 KEY_MOVE_TAB_FIRST, // 13 KEY_MOVE_TAB_LAST, // 14 KEY_SWITCH_TO_TAB_1, // 15 KEY_SWITCH_TO_TAB_2, // 16 KEY_SWITCH_TO_TAB_3, // 17 KEY_SWITCH_TO_TAB_4, // 18 KEY_SWITCH_TO_TAB_5, // 19 KEY_SWITCH_TO_TAB_6, // 20 KEY_SWITCH_TO_TAB_7, // 21 KEY_SWITCH_TO_TAB_8, // 22 KEY_SWITCH_TO_TAB_9, // 23 KEY_SWITCH_TO_TAB_10, // 24 KEY_SWITCH_TO_TAB_11, // 25 KEY_SWITCH_TO_TAB_12, // 26 KEY_NEW_WINDOW, // NEW KEY_SELECT_ALL, // 27 KEY_COPY_CLIPBOARD, // 28 KEY_PASTE_CLIPBOARD, // 29 KEY_COPY_PRIMARY, // NEW KEY_PASTE_PRIMARY, // 39 KEY_INCREASE_FONT_SIZE, // 30 KEY_DECREASE_FONT_SIZE, // 31 KEY_RESET_FONT_SIZE, // 32 KEY_MAX_WINDOW, // 33 KEY_FULL_SCREEN, // 34 KEY_SCROLL_UP, // 35 KEY_SCROLL_DOWN, // 36 KEY_SCROLL_UP_1_LINE, // 37 KEY_SCROLL_DOWN_1_LINE, // 38 KEY_CLEAN_SCROLLBACK_LINES, // NEW KEY_DISABLE_URL_L, // NEW KEY_DISABLE_URL_R, // NEW #ifdef FATAL KEY_DUMP_DATA, // 40 #endif } Key_Bindings; typedef enum { CLOSE_TAB_NORMAL, CLOSE_WITH_TAB_CLOSE_BUTTON, CLOSE_WITH_WINDOW_CLOSE_BUTTON, CLOSE_WITH_KEY_STRIKE, } Close_Tab_Type; typedef enum { FONT_RESET, FONT_INCREASE, FONT_DECREASE, FONT_ZOOM_OUT, FONT_ZOOM_IN, FONT_RESET_DEFAULT, FONT_RESET_SYSTEM, FONT_SET_TO_SELECTED, } Font_Set_Type; typedef enum { FONT_NAME_DEFAULT, FONT_NAME_SYSTEM, FONT_NAME_RESTORE, FONT_NAME_UPDATE, FONT_NAME_ZOOM_OUT, FONT_NAME_ZOOM_IN, FONT_NAME_INCREASE, FONT_NAME_DECREASE, } Font_Name_Type; typedef enum { RESET_CURRENT_TAB_FONT, RESET_ALL_TO_CURRENT_TAB, RESET_ALL_TO_DEFAULT, RESET_ALL_TO_SYSTEM, } Font_Reset_Type; typedef enum { FIND_PREV, FIND_NEXT, } Dialog_Find_Type; typedef enum { AUTOMATIC, // 0 ON, // 1 OFF, // 2 TEMPORARY_ON, // 3 TEMPORARY_OFF, // 4 FORCE_ON, // 5 FORCE_OFF, // 6 UNSURE, // 7 } Switch_Type; typedef enum { TAG_WWW, TAG_FTP, TAG_FILE, TAG_MAIL, } Command_Tag; typedef enum { SELECTION_CLIPBOARD, SELECTION_PRIMARY, } Clipboard_Type; typedef enum { PAGE_METHOD_AUTOMATIC, PAGE_METHOD_WINDOW_TITLE, PAGE_METHOD_CMDLINE, PAGE_METHOD_PWD, PAGE_METHOD_NORMAL, PAGE_METHOD_REFRESH, } Page_Update_Method; typedef enum { ANSI_THEME_INVERT_COLOR, ANSI_THEME_SET_ANSI_THEME, } Set_ANSI_Theme_Type; #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) typedef enum { FULLSCREEN_UNFS_OK = 2, FULLSCREEN_UNFS_ING = 1, FULLSCREEN_NORMAL = 0, FULLSCREEN_FS_ING = -1, FULLSCREEN_FS_OK = -2, } FullScreen_Type; #endif typedef enum { HINTS_FONT_BASE, HINTS_NONE, #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) HINTS_SKIP_ONCE, #endif } Hints_Type; #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) typedef enum { WINDOW_NORMAL, // 0 WINDOW_RESIZING_TO_NORMAL, // 1 WINDOW_MAX_WINDOW, // 2 WINDOW_MAX_WINDOW_TO_FULL_SCREEN, // 3 WINDOW_FULL_SCREEN, // 4 WINDOW_START_WITH_FULL_SCREEN, // 5 WINDOW_APPLY_PROFILE_NORMAL, // 6 WINDOW_APPLY_PROFILE_FULL_SCREEN, // 7 } Window_Status; typedef enum { GEOMETRY_AUTOMATIC, GEOMETRY_CUSTOM, } Geometry_Resize_Type; #endif #if defined(GEOMETRY) || defined(UNIT_TEST) || defined(DEBUG) typedef enum { ANSI_COLOR_BLACK = 30, ANSI_COLOR_RED = 31, ANSI_COLOR_GREEN = 32, ANSI_COLOR_YELLOW = 33, ANSI_COLOR_BLUE = 34, ANSI_COLOR_MAGENTA = 35, ANSI_COLOR_CYAN = 36, ANSI_COLOR_WHITE = 37, } ANSI_Color; #endif // KeyValue: only need to init once when LilyTerm starts. // so that we don't need to free them. struct KeyValue { gchar *name; gchar *topic; gchar *comment; gchar *translation; gint group; }; // User_KeyValue: can be custom by profile. // Every LilyTerm window has it's own User_KeyValue struct User_KeyValue { gchar *value; guint key; guint mods; }; #define COMMAND 4 // 0 username // 1 password // 2 hostname // 3 address_body // 4 address_end typedef enum { REGEX_USERNAME, REGEX_PASSWORD, REGEX_HOSTNAME, REGEX_ADDRESS_BODY, REGEX_ADDRESS_END, } Regex_Type; #define REGEX 5 struct Command { gchar *name; gchar *match; gchar *comment; gchar *method_name; gchar *environ_name; gchar *VTE_CJK_WIDTH_name; gchar *locale_name; gchar *match_regex_name; gchar *encoding_name; }; struct User_Command { gchar *command; gint method; gchar *environ; gchar **environments; gint VTE_CJK_WIDTH; gchar *locale; gchar *match_regex_orig; gchar *match_regex; }; #define COLOR 16 struct Color { gchar *name; gchar *comment; gchar *translation; }; #define THEME 10 #define DEFAULT_THEME 0 struct GdkColor_Theme { gint index; gchar *name; GdkColor color[COLOR]; }; #ifdef USE_GDK_RGBA struct GdkRGBA_Theme { gint index; gchar *name; GdkRGBA color[COLOR]; }; #else # define GdkRGBA_Theme GdkColor_Theme #endif #ifdef ENABLE_VTE_ERASE_TTY #define ERASE_BINDING 5 #else #define ERASE_BINDING 4 #endif #define DEFAULT_ERASE_BINDING 2 struct Erase_Binding { gchar *name; gint value; }; #if defined(ENABLE_CURSOR_SHAPE) || defined(UNIT_TEST) #define CURSOR_SHAPE 3 #define DEFAULT_CURSOR_SHAPE 0 struct Cursor_Shape { gchar *name; gint value; }; #endif // 1: WinTitle // 2: CmdLine // 3: PWD // 4: Custom // 5: Root // 6: Normal #define PAGE_COLOR 6 struct Page_Color { gchar *name; gchar *comment; gchar *comment_eng; }; // see /usr/include/linux/threads.h for more details. #define PID_MAX_DEFAULT 0x8000 struct Process_Data { GtkWidget *window; gint page_no; gint ppid; gchar* cmd; }; struct Window { // ---- environ and command line option ---- // // environments: the environ for every lilyterm window, separated with <\t> gchar *environment; // Try to avoid the warning "The locale xx_XX seems NOT supported by your system!" too many times. GString *warned_locale_list; GtkWidget *encoding_locale_menuitems[3]; // the runtime_encoding is got from get_encoding_from_locale() gchar *runtime_encoding; // the default_encoding is got from 'default locale' in profile gchar *default_encoding; // the encodings_list is generated from locale_list // gchar *encodings_list; // OLD: supported_encodings = g_strsplit_set(default_encoding + encodings_list + // custom_encoding + vte_terminal_get_encoding()) // FIX: supported_encodings = g_strsplit_set(encodings_list) // gchar **supported_encodings; // GtkWidget *encoding_menuitem; GtkWidget *encoding_sub_menu; // GSList *encoding_group; // 1st item, System Default. // If the encoding of a vte is different with the default_encoding, // The encoding will be shown on the tab name. GtkWidget *default_menuitem_encoding; // the default_locale is got from profile gchar *default_locale; gchar *runtime_LC_MESSAGES; // the runtime_locale_list is got from environment gchar *runtime_locale_list; // the locales_list is got from profile gchar *locales_list; // supported_locales = g_strsplit_set(default_locale + locales_list + custom_locale + LC_CTYPE) // gchar **supported_locales; // GtkWidget *locale_menuitem_utf8; // GtkWidget *locale_menuitem_full; GtkWidget *locale_sub_menu; // GSList *locale_group; // GtkWidget *default_locale; gchar *default_shell; // emulate_term = xterm, don't change it gchar *emulate_term; // for env VTE_CJK_WIDTH. // VTE_CJK_WIDTH is got from profile gint VTE_CJK_WIDTH; // VTE_CJK_WIDTH_STR is got from environment gchar *VTE_CJK_WIDTH_STR; gchar *wmclass_name; gchar *wmclass_class; gchar *shell; gchar *home; // example: lilyterm -e vim /tmp/foo.txt // the argc after -e option // Will set to 0 after used. gint argc; // The argv[] after -e option, like '/tmp/foo.txt' in the example // Will set to NULL after used. gchar **argv; // The first command in -e option, like 'vim' in the example // Will set to NULL after used. // * Do NOT free it * gchar *command; gboolean hold; // For -t option gint init_tab_number; // For -d option gchar *init_dir; // For -l option gboolean login_shell; // For -ut option gboolean utmp; gchar *geometry; // If the profile is specify with -u option. GtkWidget *subitem_new_window_from_list; GtkWidget *menuitem_new_window_from_list; GtkWidget *subitem_load_profile_from_list; GtkWidget *menuitem_load_profile_from_list; gboolean use_custom_profile; gchar *profile; gchar *specified_profile; glong profile_dir_modtime; GtkWidget *menuitem_auto_save; gboolean auto_save; // ---- the component of a single window ---- // #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) // Startup with fullscreen gboolean startup_fullscreen; gboolean fullscreen; // true_fullscreen = gboolean true_fullscreen; // 0: No work // 1: Normal // 2: Force ON // 3: Force OFF // gboolean fullscreen_show_scroll_bar; // 0: Normal // >0: unfullscreening // <0: fullscreening #endif #ifdef USE_GTK2_GEOMETRY_METHOD FullScreen_Type window_status; #endif #ifdef USE_GTK3_GEOMETRY_METHOD Window_Status window_status; #endif Switch_Type show_tabs_bar; // the component of a single window GtkWidget *window; GtkWidget *notebook; gboolean show_close_button_on_tab; gboolean show_close_button_on_all_tabs; GtkWidget *current_vte; // When The window is lost-focus, update the window title only. // Or, The geometry of vte will be incorrect when add a new teb with [Menu] gboolean window_title_shows_current_page; gboolean window_title_append_package_name; // The title specified by -T option. // Please see http://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.3 for more details gchar *custom_window_title_str; // Only used to change the color of tab when launch the adjesting color dialog // gboolean update_window_title_only; // the pid of showing on the Window title pid_t window_title_tpgid; // The custom tab titles from -n option. GString *custom_tab_names_str; gchar **custom_tab_names_strs; gint custom_tab_names_current; gint custom_tab_names_total; // -1: rgba is inited already // 0: do NOT use rgba // 1: force to use rgba // 2: decide by gdk_screen_is_composited() gint use_rgba; gint use_rgba_orig; #if defined(ENABLE_RGBA) || defined(UNIT_TEST) gint transparent_window; gdouble window_opacity; gboolean dim_window; gint transparent_window_inactive; gdouble window_opacity_inactive; gboolean window_is_inactivated; gboolean dim_window_expect; GtkWidget *menuitem_dim_window; #endif gboolean enable_key_binding; struct User_KeyValue user_keys[KEYS]; // 0: Update the hints with base size = 1 // 1: Update the hints with base size = font char size Hints_Type hints_type; #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) // Geometry_Resize_Type = GEOMETRY_AUTOMATIC, resize form current_vte // Geometry_Resize_Type = GEOMETRY_CUSTOM, resize from geometry_width and geometry_height Geometry_Resize_Type resize_type; // geometry_width, geometry_height = column * row when hints_type=HINTS_NONE // geometry_width, geometry_height = width * height (in pixel) when hints_type=HINTS_FONT_BASE glong geometry_width; glong geometry_height; #endif gboolean lost_focus; // Trying to keep the vte size: // 1, When the page bar was hidden. // 2, When the page bar was shown. // 3, When the font was changed by right click menu. // 4, Increase/decrease window size. // 5, Resotre to system/default font. // 6, Theme has been changed. // 7, Using Dir/Cmdline on pagename. // 8, When clicking and dragging a tab // 9, Hide/Show scroll_bar // 10, Fullscreen/Unfullscreen // x: Trying to resize 'twice'. setted to 0 after resized. // y: Trying to resize 'once'. setted to 0 after resized. // 1: Means that the Window is resizing. // // 0000 0000 0000 00x1 (0x0003): Updating Page Name. // 0000 0000 000y x100 (0x001C): Showing/Hiding tabs bar, It should only run window_size_request() once. // 0000 0000 0x10 0000 (0x0060): Changing Themes. // 0000 00yx 1000 0000 (0x0380): Change the vte font, It should only run window_size_request() once. // 0000 x100 0000 0000 (0x0C00): Hide/Show scroll_bar // 00x1 0000 0000 0000 (0x3000): Changing the "Window Title" of foreground program. <- useless // x100 0000 0000 0000 (0xC000): Using in Fullscreen/Unfullscreen. <- useless // 1010 1001 0100 1010 (0xA94A): Check for x, Make y only run window_size_request() once. // 0101 0100 1010 0101 (0x54A5): Clean x and y, Means that it is resized. // 1111 1101 1110 1111 (0xFDEF): The mask result after check for x, but skip [Updating Page Name]. // 0101 0110 1011 0101 (0x56B5): The mask result after check for y, but skip [Updating Page Name]. guint keep_vte_size; // ---- the component of a single menu ---- // GtkWidget *menu; gboolean menu_activated; #if defined(ENABLE_RGBA) || defined(UNIT_TEST) GtkWidget *menuitem_trans_win; #endif GtkWidget *menuitem_trans_bg; // GtkWidget *menuitem_scrollback_lines; gboolean show_color_selection_menu; gboolean show_resize_menu; gdouble font_resize_ratio; gdouble window_resize_ratio; gboolean show_background_menu; #ifdef ENABLE_IM_APPEND_MENUITEMS gboolean show_input_method_menu; #endif gboolean show_change_page_name_menu; gboolean show_exit_menu; // FIXME: May cause segfault // enable_hyperlink will enable [Copy URL] menuitem. // It can't copy to page_data gboolean enable_hyperlink; gchar *user_regex[REGEX]; struct User_Command user_command[COMMAND]; GtkWidget *menuitem_copy_url; GtkWidget *menuitem_dim_text; GtkWidget *menuitem_cursor_blinks; GtkWidget *menuitem_allow_bold_text; GtkWidget *menuitem_open_url_with_ctrl_pressed; GtkWidget *menuitem_disable_url_when_ctrl_pressed; GtkWidget *menuitem_audible_bell; #if defined(ENABLE_VISIBLE_BELL) || defined(UNIT_TEST) GtkWidget *menuitem_visible_bell; #endif #if defined(ENABLE_BEEP_SINGAL) || defined(UNIT_TEST) GtkWidget *menuitem_urgent_bell; #endif GtkWidget *menuitem_show_tabs_bar; GtkWidget *menuitem_hide_tabs_bar; GtkWidget *menuitem_always_show_tabs_bar; GtkWidget *menuitem_always_hide_tabs_bar; // the menuitem_hide_scroll_bar->active stores the boolean value of hide/show scroll_bar. GtkWidget *menuitem_hide_scroll_bar; gboolean show_copy_paste_menu; gboolean embedded_copy_paste_menu; GtkWidget *menuitem_copy; GtkWidget *menuitem_paste; GtkWidget *menuitem_clipboard; GtkWidget *menuitem_primary; // ---- the color used in vte ---- // GdkRGBA cursor_color; gboolean custom_cursor_color; // color datas gint color_theme_index; gboolean invert_color; gdouble color_brightness; gdouble color_brightness_inactive; struct GdkRGBA_Theme custom_color_theme[THEME]; // the adjusted (include invert_color and color_brightness for color themes) colors GdkRGBA color[COLOR]; // the adjusted (include invert_color and color_brightness_inactive for color themes) colors GdkRGBA color_inactive[COLOR]; #define ANSI_THEME_MENUITEM 7 GtkWidget *ansi_theme_menuitem[ANSI_THEME_MENUITEM]; // color[] and color_orig[] will always be initd when creating a window. GtkWidget *ansi_color_sub_menu; GtkWidget *ansi_color_menuitem; GtkWidget *menuitem_invert_color; GtkWidget *menuitem_theme[THEME*2]; GtkWidget *current_menuitem_theme; // default_vte_color = TRUE: use vte_terminal_set_color_foreground/background(). // default_vte_color = FALSE: use vte_terminal_set_colors() to set the color of vte. // gboolean default_vte_color_theme; // default_vte_color_theme = ! (color_theme_index || invert_color || color_brightness || color_brightness_inactive) gboolean have_custom_color;; gboolean use_custom_theme; // ---- tabs on notebook ---- // gint page_width; /* Should be take care when drag to another window */ gboolean fill_tabs_bar; gboolean tabs_bar_position; // page name gchar *page_name; /* Should be take care when drag to another window */ gboolean reuse_page_names; gchar *page_names; gchar **splited_page_names; gint page_names_no; gint max_page_names_no; gboolean page_shows_number; /* Should be take care when drag to another window */ gboolean page_shows_encoding; /* Should be take care when drag to another window */ gboolean page_shows_current_cmdline; gboolean page_shows_window_title; gboolean page_shows_current_dir; // page color and bold gboolean use_color_page; gboolean check_root_privileges; gboolean bold_current_page_name; gboolean bold_action_page_name; // We will NOT copy the following data to page_data for performance // but trying to keep them to sync with win_data gchar *user_page_color[PAGE_COLOR]; /* Should be take care when drag to another window */ // ---- font ---- // // WRANING: font_anti_alias is no use since VTE 0.20.0 gboolean font_anti_alias; /* Should be take care when drag to another window */ gchar *default_font_name; /* Should be take care when drag to another window */ // Only using in gchar *restore_font_name; // ---- other settings for init a vte ---- // glong default_column; glong default_row; #ifdef ENABLE_SET_WORD_CHARS gchar *word_chars; /* Should be take care when drag to another window */ #endif Switch_Type show_scroll_bar; /* Should be take care when drag to another window */ // 0: left // 1: right gboolean scroll_bar_position; /* Should be take care when drag to another window */ #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) gint transparent_background; gdouble background_saturation; gboolean scroll_background; gchar *background_image; #endif // gboolean use_scrollback_lines; gint scrollback_lines; gboolean dim_text; #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE gint cursor_blinks; #else gboolean cursor_blinks; #endif gboolean allow_bold_text; gboolean open_url_with_ctrl_pressed; gboolean disable_url_when_ctrl_pressed; gboolean audible_bell; #if defined(ENABLE_VISIBLE_BELL) || defined(UNIT_TEST) gboolean visible_bell; #endif #if defined(ENABLE_BEEP_SINGAL) || defined(UNIT_TEST) // urgent_bell will stores the currect setting gboolean urgent_bell; // urgent_bell will stores the currect status gboolean urgent_bell_status; gulong urgent_bell_focus_in_event_id; #endif gint erase_binding; GtkWidget *menuitem_erase_binding[ERASE_BINDING]; GtkWidget *current_menuitem_erase_binding; #if defined(ENABLE_CURSOR_SHAPE) || defined(UNIT_TEST) gint cursor_shape; GtkWidget *menuitem_cursor_shape[CURSOR_SHAPE]; GtkWidget *current_menuitem_cursor_shape; #endif // ---- other ---- // gboolean prime_user_datas_inited; gboolean prime_user_settings_inited; gboolean confirm_to_close_multi_tabs; gboolean confirm_to_kill_running_command; gboolean confirm_to_execute_command; gchar *execute_command_whitelist; gchar **execute_command_whitelists; gboolean execute_command_in_new_tab; gboolean join_as_new_tab; gchar *foreground_program_whitelist; gchar **foreground_program_whitelists; gchar *background_program_whitelist; gchar **background_program_whitelists; gboolean confirm_to_paste; gchar *paste_texts_whitelist; gchar **paste_texts_whitelists; gchar *find_string; gboolean find_case_sensitive; gboolean find_use_perl_regular_expressions; GdkRGBA find_entry_bg_color; GdkRGBA find_entry_current_bg_color; gboolean checking_menu_item; gboolean kill_color_demo_vte; gboolean adding_page; // gboolean checked_profile_version; gboolean confirmed_profile_is_invalid; gchar *temp_data; gint temp_index; }; struct Page { // ---- Some data from win_data ---- // GtkWidget *window; GtkWidget *notebook; // current page no on notebook. *for performance* guint page_no; // ---- the component of a single vte ---- // GtkWidget *label; GtkWidget *label_text; GtkWidget *label_button; GtkWidget *hbox; GtkWidget *vte; #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) GtkBorder *border; #endif GtkAdjustment *adjustment; GtkWidget *scroll_bar; // ---- environ and encoding ---- // // for drag&drop, or it will shows unnecessary "(UTF-8)" on the tab gchar *encoding_str; // locale: a string like "zh_TW.Big5". The locale of new tab. gchar *locale; // environ: The environ that user specify in profile gchar *environ; // for env VTE_CJK_WIDTH gchar *VTE_CJK_WIDTH_STR; // ---- for the text shown on the tab of notebook ---- // // the page_name of this page. gchar *page_name; // the pid of vte pid_t pid; // the pid of foreground program pid_t current_tpgid; // the pid of showing on the tab name pid_t displayed_tpgid; // the original cmdline for pid gchar *pid_cmdline; // The custom page name which inputed by user gchar *custom_page_name; // [!] The color for this tab. *DON'T FREE IT* // It is a point for win_data->colors. gchar *tab_color; // Current Directory gchar *pwd; // The running command is root privileges or not gboolean is_root; // The text of current page is bold or not gboolean is_bold; gboolean should_be_bold; // The text of current vte is 'inactivated' or not, for performance. gboolean vte_is_inactivated; // The text of current vte is dimmed or not. for auto-detect. gboolean dim_text_expect; // 'sleep': a program that is not using window-title. // 'vim': a program that is using window-title. // // 'dash': a shell that is not using window-title. // 'bash'a; a shell that is using window-title. // // record "window-title-changed" signal // situation: (*: the pid and tpgid is NOT the same) // // 1: use 'dash' as 'shell' // set shell_use_win_title = NO, USE PWD // *2: run 'sleep' on 'dash' // -> if win_data->window_title and new_window_title are both NULL // use CMDLINE // 3: exit from 'sleep' on 'dash' // -> if win_data->window_title and new_window_title are both NULL, and shell_use_win_title = NO // use PWD // *4: run 'vim' on 'dash' // -> if win_data->window_title=NULL and new_window_title!=NULL // use WINTITLE // 5: exit from 'vim' on 'dash' // -> if win_data->window_title != new_window_title // clean win_data->window_title, use PWD // 6: exit from 'vim' on 'dash', but it don't update the win-title when exiting // -> if win_data->window_title = new_window_title, and shell_use_win_title = NO // clean win_data->window_title, use PWD // 7: use 'bash' as 'shell' // set shell_use_win_title = YES, USE WINTITLE // *8: run 'sleep' on 'bash' // -> if win_data->window_title and new_window_title are the same // use CMDLINE // 9: exit from 'sleep' on 'bash' // -> if win_data->window_title and new_window_title are the same, and shell_use_win_title = YES // use WINTITLE // *10: run 'vim' on 'bash' // -> if win_data->window_title != new_window_title // use WINTITLE // 11: exit from 'vim' on 'bash' // -> if win_data->window_title != new_window_title // use WINTITLE // 12: exit from 'vim' on 'bash', but it don't update the win-title when exiting // -> if win_data->window_title != new_window_title // use WINTITLE // 13: the 'shell' is starting to use window-title. // -> if win_data->window_title != new_window_title // use WINTITLE, shell_use_win_title = YES // 14: the 'shell' stop to use window-title. // -> if PWD is changed and window-title is not changed // clean win_data->window_title, set shell_use_win_title = NO, use PWD // 15: the running commsnd cleaned the winw-title <- impossiable? // 16: the shell cleaned the winw-title <- impossiable? // 1: updated // 0: nothing happened // -1: "window-title-changed" stop working gint window_title_updated; // 0: auto (default) // 1: window title // 2: command line // 3: pwd // 4: common gint page_update_method; gulong window_title_signal; // the id of g_timeout_add_seconds() guint timeout_id; // the id of urgent_bell g_signal gulong urgent_bell_handler_id; // ---- font ---- // // for resize font gchar *font_name; // font_size = 0: use the data in font_name. gint font_size; // ---- some data came from window---- // gboolean check_root_privileges; gboolean page_shows_window_title; gboolean page_shows_current_dir; gboolean page_shows_current_cmdline; gboolean bold_action_page_name; // some data came from window. for the performance of monitor_cmdline pid_t *window_title_tpgid; gboolean *lost_focus; guint *keep_vte_size; GtkWidget **current_vte; // gboolean *update_window_title_only; // a "path" string shown on window_title gchar *window_title_pwd; gboolean custom_window_title; // ---- other---- // gint tag[COMMAND]; gboolean match_regex_setted; }; // // **************************** profile.c **************************** // #define MOD 4 struct ModKey { gchar *name; guint mod; }; // // **************************** dialog.c **************************** // typedef enum { EDIT_LABEL, FIND_STRING, ADD_NEW_LOCALES, CHANGE_THE_FOREGROUND_COLOR, CHANGE_THE_ANSI_COLORS, CHANGE_THE_BACKGROUND_COLOR, CHANGE_THE_CURSOR_COLOR, ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL, ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE, #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) CHANGE_BACKGROUND_SATURATION, #endif CHANGE_THE_OPACITY_OF_WINDOW, CHANGE_THE_OPACITY_OF_WINDOW_WHEN_INACTIVE, CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE, CHANGE_THE_TEXT_COLOR_OF_CMDLINE, CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR, CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME, CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE, CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT, CONFIRM_TO_EXECUTE_COMMAND, CONFIRM_TO_CLOSE_MULTI_PAGES, CONFIRM_TO_CLOSE_RUNNING_APPLICATION, CONFIRM_TO_CLOSE_A_TAB_WITH_CHILD_PROCESS, CONFIRM_TO_CLOSE_A_WINDOW_WITH_CHILD_PROCESS, CONFIRM_TO_EXIT_WITH_CHILD_PROCESS, CONFIRM_TO_PASTE_TEXTS_TO_VTE_TERMINAL, GENERAL_INFO, PASTE_TEXTS_TO_EVERY_VTE_TERMINAL, PASTE_GRABBED_KEY_TO_EVERY_VTE_TERMINAL, SET_KEY_BINDING, USAGE_MESSAGE, } Dialog_Type_Flags; #endif src/dialog.c000066400000000000000000004265561246562641500133050ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include "dialog.h" #define TEMPSTR 6 #define BORDER_SPACE 10 extern GtkWidget *menu_active_window; GtkWidget *real_menu_active_window; extern struct ModKey modkeys[MOD]; extern struct Page_Color page_color[PAGE_COLOR]; extern GList* window_list; extern gchar *profile_dir; extern gchar *key_groups[KEY_GROUP]; extern struct KeyValue system_keys[KEYS]; extern gchar *init_LC_CTYPE; extern struct Color color[COLOR]; extern struct GdkRGBA_Theme system_color_theme[THEME]; gint dialog_activated = 0; gboolean force_to_quit = FALSE; gboolean using_kill = FALSE; GdkRGBA entry_not_find_bg_color = {0, 0xffff, 0xbcbc, 0xbcbc}; // EDIT_LABEL, // FIND_STRING, // ADD_NEW_LOCALES, // CHANGE_THE_FOREGROUND_COLOR, // CHANGE_THE_ANSI_COLORS, // CHANGE_THE_BACKGROUND_COLOR, // CHANGE_THE_CURSOR_COLOR, // ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL, // ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE, // CHANGE_BACKGROUND_SATURATION, // CHANGE_THE_OPACITY_OF_WINDOW, // CHANGE_THE_OPACITY_OF_WINDOW_WHEN_INACTIVE, // CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE, // CHANGE_THE_TEXT_COLOR_OF_CMDLINE, // CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR, // CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME, // CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE, // CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT, // CONFIRM_TO_EXECUTE_COMMAND, // CONFIRM_TO_CLOSE_MULTI_PAGES, // CONFIRM_TO_CLOSE_RUNNING_APPLICATION, // CONFIRM_TO_CLOSE_A_TAB_WITH_CHILD_PROCESS, // CONFIRM_TO_CLOSE_A_WINDOW_WITH_CHILD_PROCESS, // CONFIRM_TO_EXIT_WITH_CHILD_PROCESS, // CONFIRM_TO_PASTE_TEXTS_TO_VTE_TERMINAL, // GENERAL_INFO, // PASTE_TEXTS_TO_EVERY_VTE_TERMINAL, // PASTE_GRABBED_KEY_TO_EVERY_VTE_TERMINAL, // SET_KEY_BINDING, // USAGE_MESSAGE GtkResponseType dialog(GtkWidget *widget, gsize style) { #ifdef DETAIL g_debug("! Launch dialog() with style = %ld", (long)style); #endif dialog_activated++; // g_debug("Set dialog_activated = %d", dialog_activated); real_menu_active_window = menu_active_window; struct Dialog *dialog_data = g_new0(struct Dialog, 1); #ifdef SAFEMODE if (real_menu_active_window) #endif g_object_set_data(G_OBJECT(real_menu_active_window), "Dialog", dialog_data); dialog_data->type = style; gboolean selectable = FALSE; // Backup the datas in clipboard. // extern GtkClipboard *selection_clipboard; // gchar *selection_clipboard_str = g_strdup(gtk_clipboard_wait_for_text(selection_clipboard)); extern GtkClipboard *selection_primary; gchar *selection_primary_str = NULL; #ifdef SAFEMODE if (selection_primary) #endif selection_primary_str = g_strdup(gtk_clipboard_wait_for_text(selection_primary)); GtkResponseType dialog_response = GTK_RESPONSE_NONE; #ifdef SAFEMODE if (dialog_data==NULL) goto FINISH; #endif gchar *temp_str[TEMPSTR] = {NULL}; struct Window *win_data = NULL; // A critical error message for current_vte = NULL. #ifdef FATAL // real_menu_active_window==NULL: it should NOT happen! if (real_menu_active_window==NULL) { gchar *err_msg = g_strdup_printf("dialog(%ld): real_menu_active_window = NULL\n\n" "Please report bug to %s, Thanks!", (glong)style, BUGREPORT); #ifdef SAFEMODE if (err_msg) #endif error_dialog(NULL, _("The following error occurred:"), "The following error occurred:", GTK_FAKE_STOCK_DIALOG_ERROR, err_msg, NULL); g_free(err_msg); goto FINISH; } else #endif win_data = (struct Window *)g_object_get_data(G_OBJECT(real_menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) goto FINISH; #endif gboolean enable_key_binding = win_data->enable_key_binding; // g_debug("dialog(): win_data->runtime_LC_MESSAGES = %s", win_data->runtime_LC_MESSAGES); setlocale(LC_MESSAGES, win_data->runtime_LC_MESSAGES); struct Page *page_data = NULL; if (win_data->current_vte!=NULL) { page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) goto FINISH; #endif // g_debug("Get win_data = %p, page_data = %p, current_vte = %p when creating dialog!", // win_data, page_data, win_data->current_vte); // For changing the text color of tab dialog_data->total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK( page_data->notebook)); dialog_data->current_page_no = gtk_notebook_get_current_page(GTK_NOTEBOOK( page_data->notebook)); } gboolean tabs_bar_is_shown = TRUE; gint create_entry_hbox = 0; gint i; // g_debug("Running dialog() with mod %d", style); /* /--------------main_hbox--------------\ |/icon_vbox\/------state_vbox-----\/-\| || ||/----title_hbox-----\||r|| || ||| |||i|| || ||\-------------------/||g|| || ||/----entry_hbox-----\||h|| || ||| |||t|| || ||| ||| || || ||\-------------------/||v|| || ||/-state_bottom_hbox-\||b|| || ||| ||o|| || ||\-------------------/||x|| |\---------/\---------------------/\-/| | /------------\ /------------\ | | | OK | | CANCEL | | | \------------/ \------------/ | \-------------------------------------/ */ switch (style) { case EDIT_LABEL: // 1 create_dialog(_("Rename this tab"), "Rename this tab", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_INFO, NULL, selectable, 0, TRUE, BOX_HORIZONTAL, 25, dialog_data); gchar *default_page_name; if (page_data->custom_page_name == NULL) default_page_name = page_data->page_name; else default_page_name = page_data->custom_page_name; dialog_data->operate[0] = create_entry_widget (dialog_data->box, _("Please input the Label Name of this tab:"), _("Label Name:"), default_page_name, TRUE); break; case FIND_STRING: { #ifdef ENABLE_FIND_STRING create_dialog(_("Find string"), "Find string", DIALOG_OK, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_FIND, NULL, selectable, 0, TRUE, BOX_VERTICALITY, 5, dialog_data); GtkWidget *hbox = dirty_gtk_hbox_new (FALSE, 0); GtkWidget *label = gtk_label_new(_("Find: ")); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); dialog_data->operate[0] = gtk_entry_new (); g_signal_connect(G_OBJECT(dialog_data->operate[0]), "changed", G_CALLBACK(refresh_regex_settings), win_data); #ifdef USE_GDK_RGBA GtkStyleContext *rc_style = gtk_widget_get_style_context (dialog_data->operate[0]); // gtk_style_context_add_class(rc_style, GTK_STYLE_CLASS_ENTRY); gtk_style_context_get_background_color (rc_style, 0, &(win_data->find_entry_bg_color)); #else GtkStyle *rc_style = gtk_widget_get_style (dialog_data->operate[0]); win_data->find_entry_bg_color = rc_style->base[GTK_STATE_NORMAL]; g_object_unref(rc_style); #endif win_data->find_entry_current_bg_color = win_data->find_entry_bg_color; // print_color("win_data->find_entry_bg_color", win_data->find_entry_bg_color); // gtk_entry_set_icon_from_stock (GTK_ENTRY (dialog_data->operate[0]), // GTK_ENTRY_ICON_SECONDARY, GTK_FAKE_STOCK_CLEAR); gtk_box_pack_start (GTK_BOX(hbox), dialog_data->operate[0], TRUE, TRUE, 0); label = create_button_with_image(_("Find previous string"), GTK_FAKE_STOCK_GO_UP, TRUE, (GSourceFunc)find_str, GINT_TO_POINTER(FIND_PREV)); gtk_box_pack_end (GTK_BOX(hbox), label, FALSE, FALSE, 0); label = create_button_with_image(_("Find next string"), GTK_FAKE_STOCK_GO_DOWN, TRUE, (GSourceFunc)find_str, GINT_TO_POINTER(FIND_NEXT)); gtk_box_pack_end (GTK_BOX(hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(dialog_data->box), hbox, FALSE, FALSE, 0); hbox = dirty_gtk_hbox_new (FALSE, 15); gtk_box_pack_start (GTK_BOX(dialog_data->box), hbox, FALSE, FALSE, 0); dialog_data->operate[1] = gtk_check_button_new_with_label(_("Case sensitive")); // GTK_TOGGLE_BUTTON(dialog_data->operate[1])->active = win_data->find_case_sensitive; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog_data->operate[1]), win_data->find_case_sensitive); gtk_box_pack_start (GTK_BOX(hbox), dialog_data->operate[1], FALSE, FALSE, 0); g_signal_connect(G_OBJECT(dialog_data->operate[1]), "toggled", G_CALLBACK(refresh_regex_settings), win_data); dialog_data->operate[2] = gtk_check_button_new_with_label(_("Use Perl compatible regular expressions")); // GTK_TOGGLE_BUTTON(dialog_data->operate[2])->active = win_data->find_use_perl_regular_expressions; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog_data->operate[2]), win_data->find_use_perl_regular_expressions); gtk_box_pack_start (GTK_BOX(hbox), dialog_data->operate[2], FALSE, FALSE, 0); g_signal_connect(G_OBJECT(dialog_data->operate[2]), "toggled", G_CALLBACK(refresh_regex_settings), win_data); set_widget_can_not_get_focus(dialog_data->operate[1]); set_widget_can_not_get_focus(dialog_data->operate[2]); hbox = dirty_gtk_hbox_new (FALSE, 5); dialog_data->operate[3] = gtk_label_new(NULL); gtk_widget_set_no_show_all (dialog_data->operate[3], TRUE); gtk_box_pack_end (GTK_BOX(hbox), dialog_data->operate[3], FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(dialog_data->box), hbox, FALSE, FALSE, 0); // refresh_regex(win_data, dialog_data); // Dirty Hack gchar *clipboard_str = NULL; if (vte_terminal_get_has_selection(VTE_TERMINAL(win_data->current_vte))) { extern GtkClipboard *selection_primary; #ifdef SAFEMODE if (selection_primary) #endif clipboard_str = gtk_clipboard_wait_for_text (selection_primary); if (clipboard_str && (clipboard_str[0]!='\0')) gtk_entry_set_text(GTK_ENTRY(dialog_data->operate[0]), strtok(clipboard_str, "\n\r")); } if (((clipboard_str==NULL) || (clipboard_str[0]=='\0')) && (win_data->find_string && (win_data->find_string[0]!='\0'))) gtk_entry_set_text(GTK_ENTRY(dialog_data->operate[0]), win_data->find_string); g_free(clipboard_str); #else upgrade_dialog(ENABLE_FIND_STRING_VER); #endif break; } case PASTE_TEXTS_TO_EVERY_VTE_TERMINAL: { create_dialog(_("Paste texts to every Vte Terminal"), "Paste texts to every Vte Terminal", DIALOG_NONE, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_INFO, NULL, selectable, 0, TRUE, BOX_VERTICALITY, 10, dialog_data); dialog_data->operate[0] = create_entry_widget (dialog_data->box, _("Please input the texts that will be paste to the Vte Terminals:"), _("Text:"), NULL, FALSE); g_signal_connect(G_OBJECT(dialog_data->operate[0]), "activate", G_CALLBACK(paste_text_to_vte_terminal), dialog_data); // Check Button: Append a to the end of the text GtkWidget *hbox = dirty_gtk_hbox_new (FALSE, 5); gtk_box_pack_start (GTK_BOX(dialog_data->box), hbox, FALSE, FALSE, 0); dialog_data->operate[1] = gtk_check_button_new_with_label(_("Append a to the end of the text.")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog_data->operate[1]), TRUE); gtk_box_pack_end (GTK_BOX(hbox), dialog_data->operate[1], FALSE, FALSE, 0); // and Button #ifdef HAVE_GTK_DIALOG_GET_ACTION_AREA GtkWidget *paste_button = gtk_button_new_from_stock (GTK_FAKE_STOCK_PASTE); if (gtk_alternative_dialog_button_order(NULL)) { gtk_box_pack_end (GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog_data->window))), paste_button, FALSE, FALSE, 0); gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), GTK_FAKE_STOCK_QUIT, GTK_RESPONSE_CANCEL); } else { gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), GTK_FAKE_STOCK_QUIT, GTK_RESPONSE_CANCEL); gtk_box_pack_end (GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog_data->window))), paste_button, FALSE, FALSE, 0); } #else GtkWidget *paste_button; if (gtk_alternative_dialog_button_order(NULL)) { gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), GTK_FAKE_STOCK_QUIT, GTK_RESPONSE_CANCEL); paste_button = gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), GTK_FAKE_STOCK_PASTE, GTK_RESPONSE_OK); } else { paste_button = gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), GTK_FAKE_STOCK_PASTE, GTK_RESPONSE_OK); gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), GTK_FAKE_STOCK_QUIT, GTK_RESPONSE_CANCEL); } gtk_dialog_set_response_sensitive(GTK_DIALOG(dialog_data->window), GTK_RESPONSE_OK, FALSE); #endif g_signal_connect(G_OBJECT(paste_button), "clicked", G_CALLBACK(paste_text_to_vte_terminal), dialog_data); // Button add_secondary_button(dialog_data->window, _("Grab keys"), GTK_RESPONSE_OK, GTK_FAKE_STOCK_REFRESH); break; } case PASTE_GRABBED_KEY_TO_EVERY_VTE_TERMINAL: { win_data->enable_key_binding = FALSE; temp_str[0] = g_markup_escape_text (_("Paste the grabbed key to the Vte Terminals.\n" "It will be useful if you want to paste combined keys, like ."), -1); create_dialog(_("Paste texts to every Vte Terminal"), "Paste texts to every Vte Terminal", DIALOG_QUIT, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_CANCEL, GTK_FAKE_STOCK_DIALOG_INFO, temp_str[0], selectable, 0, TRUE, BOX_VERTICALITY, 10, dialog_data); // The Key Value frame dialog_data->operate[0] = gtk_label_new(NULL); // set_markup_key_value(TRUE, "blue", "", dialog_data->operate[0]); gtk_label_set_selectable(GTK_LABEL(dialog_data->operate[0]), TRUE); create_frame_widget(dialog_data, _("Key Value:"), NULL, dialog_data->operate[0], 0); g_signal_connect(G_OBJECT(dialog_data->window), "key-press-event", G_CALLBACK(grab_key_press), dialog_data); // Button add_secondary_button(dialog_data->window, _("Entry"), GTK_RESPONSE_OK, GTK_FAKE_STOCK_REFRESH); break; } case ADD_NEW_LOCALES: { create_dialog(_("Add new locales and set the default locale"), "Add new locales and set the default locale", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_INFO, NULL, selectable, 0, TRUE, BOX_VERTICALITY, 25, dialog_data); // TRANSLATE NOTE: You may replace the following locales with the locale name of your country. // TRANSLATE NOTE: For example, replace "zh_TW" with "ru_RU", replace "zh_TW.Big5" with "ru_RU.KOI8-R", // TRANSLATE NOTE: or replace "zh_TW.UTF-8" with "ru_RU.UTF-8". gchar *contents = _("The default locale used when initing a Vte Terminal.\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here."); dialog_data->operate[0] = create_entry_widget (dialog_data->box, contents, _("Default locale:"), win_data->default_locale, TRUE); // TRANSLATE NOTE: You may replace the following locales with the locale name of your country. // TRANSLATE NOTE: For example, replace "zh_TW" with "ja_JP", replace "zh_TW.Big5" with "ja_JP.EUC-JP", // TRANSLATE NOTE: and replace "zh_TW.UTF-8" with "ja_JP.UTF-8". contents = _("The locales list on right click menu, separate with .\n" "You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "You may want to use \"UTF-8\" here if you have no locale data installed."); dialog_data->operate[1] = create_entry_widget (dialog_data->box, contents, _("Locales list:"), win_data->locales_list, TRUE); break; } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) case CHANGE_BACKGROUND_SATURATION: // 2 { create_dialog(_("Change the saturation of background"), "Change the saturation of background", DIALOG_OK_CANCEL, page_data->window, FALSE, TRUE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_INFO, _("Change the Saturation of background:"), selectable, 0, TRUE, BOX_VERTICALITY, 0, dialog_data); create_scale_widget(dialog_data, 0, 1, 0.001, win_data->background_saturation, (GSourceFunc)set_background_saturation, win_data->current_vte); dialog_data->original_transparent_background = win_data->transparent_background; if (! compare_strings (win_data->background_image, NULL_DEVICE, TRUE)) win_data->transparent_background = TRUE; set_background_saturation(NULL, 0, win_data->background_saturation, win_data->current_vte); break; } #endif #ifdef ENABLE_GDKCOLOR_TO_STRING case CHANGE_THE_FOREGROUND_COLOR: // 9 { create_dialog(_("Change the foreground color in terminal"), "Change the foreground color in terminal", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 15, GTK_RESPONSE_OK, NULL, NULL, selectable, 0, FALSE, BOX_HORIZONTAL, 0, dialog_data); gint color_index = get_color_index(win_data->invert_color, COLOR-1); if (win_data->use_custom_theme) dialog_data->original_color = win_data->custom_color_theme[win_data->color_theme_index].color[color_index]; else dialog_data->original_color = system_color_theme[win_data->color_theme_index].color[color_index]; // g_debug("win_data->use_custom_theme = %d", win_data->use_custom_theme); // print_color(-1, "ORIG: dialog_data->original_color", dialog_data->original_color); create_color_selection_widget(dialog_data, (GSourceFunc)adjust_vte_color, win_data->current_vte); break; } case CHANGE_THE_BACKGROUND_COLOR: // 10 create_dialog(_("Change the background color in terminal"), "Change the background color in terminal", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 15, GTK_RESPONSE_OK, NULL, NULL, selectable, 0, FALSE, BOX_HORIZONTAL, 0, dialog_data); gint color_index = get_color_index(win_data->invert_color, 0); if (win_data->use_custom_theme) dialog_data->original_color = win_data->custom_color_theme[win_data->color_theme_index].color[color_index]; else dialog_data->original_color = system_color_theme[win_data->color_theme_index].color[color_index]; create_color_selection_widget(dialog_data, (GSourceFunc)adjust_vte_color, win_data->current_vte); break; case CHANGE_THE_CURSOR_COLOR: // 9 create_dialog(_("Change the cursor color in terminal"), "Change the cursor color in terminal", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 15, GTK_RESPONSE_OK, NULL, NULL, selectable, 0, FALSE, BOX_VERTICALITY, 0, dialog_data); dialog_data->original_color = win_data->cursor_color; create_color_selection_widget(dialog_data, (GSourceFunc)adjust_vte_color, win_data->current_vte); dialog_data->original_custom_cursor_color = win_data->custom_cursor_color; #if defined(USE_OLD_GTK_COLOR_SELECTION) || defined(UNIT_TEST) // ---- Create the [Drawn the text under the cursor with foreground and background colors reversed] check button ---- dialog_data->custom_cursor_color_checkbox = gtk_check_button_new_with_label(_("Drawn the text under the cursor with foreground and background colors reversed")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog_data->custom_cursor_color_checkbox), ! win_data->custom_cursor_color); gtk_box_pack_start (GTK_BOX(dialog_data->box), dialog_data->custom_cursor_color_checkbox, FALSE, FALSE, 10); g_signal_connect(G_OBJECT(dialog_data->custom_cursor_color_checkbox), "toggled", G_CALLBACK(update_custom_cursor_color), win_data); #endif break; case CHANGE_THE_ANSI_COLORS: // 9 { // ---- Create the Dialog ---- gchar *tmp_topic[2]; tmp_topic[0] = g_strdup_printf(_("Change the ansi color [%s] in terminal"), color[COLOR-1].translation); tmp_topic[1] = g_strdup_printf("Change the ansi color [%s] in terminal", color[COLOR-1].translation); create_dialog(tmp_topic[0], tmp_topic[1], DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 15, GTK_RESPONSE_OK, NULL, NULL, selectable, 0, FALSE, BOX_VERTICALITY, 0, dialog_data); // ---- Create the Color Selection ---- gint color_index = get_color_index(win_data->invert_color, COLOR-1); if (win_data->use_custom_theme) dialog_data->original_color = win_data->custom_color_theme[win_data->color_theme_index].color[color_index]; else dialog_data->original_color = system_color_theme[win_data->color_theme_index].color[color_index]; #ifdef USE_OLD_GTK_COLOR_SELECTION create_color_selection_widget(dialog_data, (GSourceFunc)adjust_vte_color, win_data->current_vte); #endif // ---- Create the Range Scale ---- GtkWidget *label = gtk_label_new(_("The brightness of ANSI colors:")); GtkWidget *box = dirty_gtk_hbox_new (FALSE, 0); GtkWidget *vbox = dirty_gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX(dialog_data->box), vbox, FALSE, FALSE, 10); gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(vbox), box, FALSE, FALSE, 0); dialog_data->operate[1] = gtk_hscale_new_with_range(-1, 1, 0.001); gtk_range_set_value(GTK_RANGE(dialog_data->operate[1]), win_data->color_brightness); gtk_box_pack_start (GTK_BOX(vbox), dialog_data->operate[1], FALSE, FALSE, 0); g_signal_connect_after(dialog_data->operate[1], "change-value", G_CALLBACK(set_ansi_color), win_data->current_vte); dialog_data->original_color_brightness = win_data->color_brightness; dialog_data->original_color_brightness_inactive = win_data->color_brightness_inactive; label = gtk_label_new(_("ANSI Colors:")); box = dirty_gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0); // ---- Create the [Invert Color] check button ---- GtkWidget *check_button = gtk_check_button_new_with_label(_("Invert color")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(check_button), win_data->invert_color); gtk_box_pack_end (GTK_BOX(box), check_button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(dialog_data->box), box, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(check_button), "toggled", G_CALLBACK(dialog_invert_color_theme), win_data); dialog_data->original_invert_color = win_data->invert_color; dialog_data->original_have_custom_color = win_data->have_custom_color; dialog_data->original_use_custom_theme = win_data->use_custom_theme; // ---- Create the ANSI color buttons ---- #ifdef USE_GTK_GRID dialog_data->ansi_table = gtk_grid_new(); gtk_grid_set_column_homogeneous(GTK_GRID(dialog_data->ansi_table), TRUE); #else dialog_data->ansi_table = gtk_table_new (2, COLOR/2, TRUE); #endif gint i; for (i=COLOR-1; i>=0; i--) { #ifdef USE_OLD_GTK_COLOR_SELECTION dialog_data->color_button[i] = gtk_button_new(); g_signal_connect(G_OBJECT(dialog_data->color_button[i]), "clicked", G_CALLBACK(update_ansi_color_info), GINT_TO_POINTER (i)); #else GdkRGBA color = {0}; dialog_data->color_button[i] = gtk_color_button_new_with_rgba(&color); g_signal_connect(G_OBJECT(dialog_data->color_button[i]), "color-set", G_CALLBACK(adjust_vte_color_sample), GINT_TO_POINTER (i)); #endif #ifdef USE_GTK_GRID gtk_grid_attach(GTK_GRID(dialog_data->ansi_table), dialog_data->color_button[i], (COLOR-1-i)%(COLOR/2), (COLOR-1-i)/(COLOR/2), 1, 1); #else gtk_table_attach_defaults(GTK_TABLE(dialog_data->ansi_table), dialog_data->color_button[i], (COLOR-1-i)%(COLOR/2), (COLOR-1-i)%(COLOR/2)+1, (COLOR-1-i)/(COLOR/2), (COLOR-1-i)/(COLOR/2)+1); #endif } init_dialog_ansi_colors_from_win_data(win_data, dialog_data); create_theme_color_data(dialog_data->ansi_colors, dialog_data->ansi_colors_orig, win_data->color_brightness, win_data->invert_color, FALSE, FALSE); update_color_buttons(win_data, dialog_data); gtk_box_pack_start (GTK_BOX(dialog_data->box), dialog_data->ansi_table, FALSE, FALSE, 0); gtk_window_set_focus(GTK_WINDOW(dialog_data->window), dialog_data->color_button[COLOR-1]); // win_data->temp_index will point to the color index in color_orig win_data->temp_index = get_color_index(win_data->invert_color, COLOR-1); g_free(tmp_topic[0]); g_free(tmp_topic[1]); break; } case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: // 11 case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: // 12 case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: // 13 case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: // 14 case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: // 15 case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: // 16 { Switch_Type show_tabs_bar = win_data->show_tabs_bar; tabs_bar_is_shown = gtk_notebook_get_show_tabs GTK_NOTEBOOK(win_data->notebook); if (tabs_bar_is_shown) win_data->show_tabs_bar = FORCE_ON; else win_data->show_tabs_bar = FORCE_OFF; init_locale_restrict_data(win_data->runtime_LC_MESSAGES); gint page_color_type = style - CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE; temp_str[0] = g_strdup_printf(_("Change the %s color on tab"), page_color[page_color_type].comment); temp_str[1] = g_strdup_printf("Change the %s color on tab", page_color[page_color_type].comment); create_dialog(temp_str[0], temp_str[1], DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 15, GTK_RESPONSE_OK, NULL, NULL, selectable, 0, FALSE, BOX_HORIZONTAL, 0, dialog_data); // save the dialog data first dialog_data->original_page_color = win_data->user_page_color[page_color_type]; // g_debug("dialog_data->original_page_color = %s", dialog_data->original_page_color); #ifdef SAFEMODE if (dialog_data->original_page_color) #endif dirty_gdk_color_parse(win_data->user_page_color[page_color_type], &(dialog_data->original_color)); // vte = the 1st page of current notebook. struct Page *page_data = get_page_data_from_nth_page(win_data, 0); #ifdef SAFEMODE if (page_data) { #endif create_color_selection_widget(dialog_data, (GSourceFunc)adjust_vte_color, page_data->vte); // store the is_bold data of 1st page... dialog_data->tab_1_is_bold = page_data->is_bold; // win_data->lost_focus = FALSE; #ifdef SAFEMODE } #endif // only bold the 1st page gboolean is_bold = TRUE; // the color for using in 1st page, can NOT be free()! gchar *current_color = NULL; // the text for using in 1st page, can NOT be free()! gchar *display_text = NULL; // add new pages to PAGE_COLOR+1. // g_debug("dialog_data->total_page = %d, current_page = %d", // dialog_data->total_page, gtk_notebook_get_current_page(GTK_NOTEBOOK(win_data->notebook))); // The new pages will added next to 1st page! for (i=dialog_data->total_page; i<=PAGE_COLOR; i++) add_page(win_data, page_data, NULL, NULL, NULL, NULL, NULL, NULL, NULL, FALSE); // we need to set the current page to 1st page after adding page. gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), 0); for (i=0; i<=PAGE_COLOR; i++) { // ste the page name and color for demo. struct Page *tmp_page = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (tmp_page) { #endif dialog_data->original_update_method[i] = tmp_page->page_update_method; // g_debug ("??? Save: (%d) tmp_page->page_update_method = %d", // i+1, tmp_page->page_update_method); if (i) { display_text = _(page_color[i-1].comment); current_color = win_data->user_page_color[i-1]; } else { display_text = _("Bold Demo Text"); current_color = dialog_data->original_page_color; } // get the demo_vte and demo_text. // the change of color will be shown immediately in 1st page and the page here. if ((i+CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE-1)==style) { dialog_data->demo_vte = tmp_page->vte; dialog_data->demo_text = display_text; } // g_debug("!!! updating %d page name!", i+1); update_page_name(tmp_page->window, tmp_page->vte, NULL, tmp_page->label_text, i+1, display_text, current_color, FALSE, is_bold, FALSE, NULL, tmp_page->custom_window_title, FALSE); // only 1st page is bold. is_bold = FALSE; #ifdef SAFEMODE } #endif } // g_debug("Got tabs_bar_is_shown = %d", tabs_bar_is_shown); if (! tabs_bar_is_shown) hide_and_show_tabs_bar(win_data, ON); win_data->show_tabs_bar = show_tabs_bar; break; } #else case CHANGE_THE_FOREGROUND_COLOR: case CHANGE_THE_BACKGROUND_COLOR: case CHANGE_THE_ANSI_COLORS: case CHANGE_THE_CURSOR_COLOR: case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: // 11 case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: // 12 case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: // 13 case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: // 14 case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: // 15 case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: // 16 upgrade_dialog(ENABLE_GDKCOLOR_TO_STRING_VER); goto FINISH; break; #endif case CONFIRM_TO_CLOSE_MULTI_PAGES: // 3 if (g_list_length(window_list) > 1) create_entry_hbox = BOX_VERTICALITY; create_dialog(_("Confirm to close multi tabs"), "Confirm to close multi tabs", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_QUESTION, _("You are about to close multi tabs. Continue anyway?"), selectable, 0, TRUE, create_entry_hbox, 5, dialog_data); create_SIGKILL_and_EXIT_widget(dialog_data, FALSE, create_entry_hbox, _("those tabs")); break; case SET_KEY_BINDING: // 4 { init_locale_restrict_data(win_data->runtime_LC_MESSAGES); temp_str[0] = g_markup_escape_text(_("You may press + here\n" "to get the key value used for the key binding."), -1); create_dialog(_("Get the key value for function key"), "Get the key value for function key", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, NULL, temp_str[0], selectable, 0, FALSE, BOX_VERTICALITY, 5, dialog_data); dialog_data->current_key_index = -1; // Copy the key values for (i=0; iuser_key_value[i] = g_strdup(win_data->user_keys[i].value); // The Key Group frame GtkTreeStore *store = gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_STRING); GtkTreeIter key_group_tree_iter[KEY_GROUP], tmp_tree_iter; gint key_index[KEYS]= {0}; for (i=0; iuser_keys[i].value, -1); dialog_data->KeyTree[system_keys[i].group][key_index[system_keys[i].group]] = i; // g_debug("Set KeyTree[%d][%d] = %d", system_keys[i].group, // key_index[system_keys[i].group], // i); key_index[system_keys[i].group]++; } GtkTreeModel *model= GTK_TREE_MODEL(store); dialog_data->treeview = gtk_tree_view_new_with_model (model); gtk_tree_view_set_enable_search(GTK_TREE_VIEW (dialog_data->treeview), FALSE); g_object_unref (model); GtkCellRenderer *renderer = gtk_cell_renderer_text_new(); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (dialog_data->treeview), -1, _("Function Key Name"), renderer, "text", 0, NULL); gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (dialog_data->treeview), -1, _("Key Bindings"), renderer, "text", 1, NULL); GtkTreeSelection *tree_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW (dialog_data->treeview)); g_signal_connect(G_OBJECT(tree_selection), "changed", G_CALLBACK(update_key_info), dialog_data); // Add the combo box to frame GtkWidget *hbox = dirty_gtk_hbox_new (FALSE, 0); GtkWidget *label = gtk_label_new(_("Key Group: ")); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); dialog_data->operate[0] = gtk_label_new(NULL); set_markup_key_value(TRUE, NULL, "", dialog_data->operate[0]); gtk_box_pack_start (GTK_BOX(hbox), dialog_data->operate[0], FALSE, FALSE, 0); //// GtkWidget *vbox = create_frame_widget(dialog_data, NULL, hbox, combo, 0); GtkWidget *vbox = create_frame_widget(dialog_data, NULL, hbox, dialog_data->treeview, 0); hbox = dirty_gtk_hbox_new (FALSE, 0); GtkWidget *label_vbox = dirty_gtk_vbox_new (FALSE, 0); label = gtk_label_new(_("Note: ")); gtk_box_pack_start (GTK_BOX(label_vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(hbox), label_vbox, FALSE, FALSE, 0); dialog_data->operate[1] = gtk_label_new(NULL); set_markup_key_value(TRUE, "dark green", "", dialog_data->operate[1]); gtk_box_pack_start (GTK_BOX(hbox), dialog_data->operate[1], FALSE, FALSE, 0); gtk_box_pack_end (GTK_BOX(vbox), hbox, FALSE, FALSE, 0); // The Key Value frame dialog_data->operate[2] = gtk_label_new(NULL); set_markup_key_value(TRUE, "blue", "", dialog_data->operate[2]); gtk_label_set_selectable(GTK_LABEL(dialog_data->operate[2]), TRUE); create_frame_widget(dialog_data, _("Key Value:"), NULL, dialog_data->operate[2], 0); g_signal_connect(G_OBJECT(dialog_data->window), "key-press-event", G_CALLBACK(deal_dialog_key_press), dialog_data); dialog_data->operate[3] = create_button_with_image("", GTK_FAKE_STOCK_CLOSE, FALSE, (GSourceFunc)clear_key_group, dialog_data); gtk_box_pack_end (GTK_BOX(dialog_data->box), dialog_data->operate[3], TRUE, TRUE, 0); gtk_widget_set_no_show_all (dialog_data->operate[3], TRUE); label = create_button_with_image(_("Disable all the function keys."), GTK_FAKE_STOCK_CLOSE, FALSE, (GSourceFunc)clear_key_group_all, dialog_data); gtk_box_pack_end (GTK_BOX(dialog_data->box), label, TRUE, TRUE, 0); // Trying to get correct size of dialog_data->treeview, then put it into a gtk_scrolled_window gtk_widget_show_all (dialog_data->window); GtkRequisition requisition; gtk_widget_get_child_requisition (dialog_data->treeview, &requisition); requisition.height += BORDER_SPACE; GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_ETCHED_IN); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); g_object_ref(dialog_data->treeview); gtk_container_remove (GTK_CONTAINER(vbox), dialog_data->treeview); gtk_box_pack_start (GTK_BOX(vbox), scrolled_window, FALSE, FALSE, 0); gtk_container_add (GTK_CONTAINER (scrolled_window), dialog_data->treeview); gtk_widget_set_size_request(scrolled_window, requisition.width, requisition.height); g_object_unref(dialog_data->treeview); break; } case USAGE_MESSAGE: // 5 { selectable = TRUE; gchar *str[18] = {NULL}; gchar *temp_str; // Create dialog str[0] = g_strdup_printf(_("Usage for %s %s"),PACKAGE, VERSION); str[1] = g_strdup_printf("Usage for %s %s",PACKAGE, VERSION); create_dialog(str[0], str[1], DIALOG_OK, page_data->window, FALSE, FALSE, 0, GTK_RESPONSE_OK, NULL, NULL, selectable, 0, FALSE, BOX_VERTICALITY, 0, dialog_data); // Notebook GtkWidget *notebook = gtk_notebook_new(); gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog_data->window))), notebook); gtk_container_set_border_width (GTK_CONTAINER (notebook), 5); // Usage str[2] = get_help_message_usage(win_data->profile, TRUE); temp_str =_("Don't forget to save your settings after making any change!"); str[3] = convert_text_to_html (&temp_str, FALSE, "darkred", "tt", "b", NULL); str[4] = g_strdup_printf("%s\n\n%s", str[2], str[3]); dialog_data->operate[0] = add_text_to_notebook(notebook, _("Usage"), GTK_FAKE_STOCK_HELP, str[4]); // Shortcut Keys str[5] = get_help_message_key_binding(TRUE); dialog_data->operate[1] = add_text_to_notebook(notebook, _("Key binding"), GTK_FAKE_STOCK_PREFERENCES, str[5]); // License // TRANSLATE NOTE: The following license declaration is just a notice, not full license text. // TRANSLATE NOTE: The full GPLv3 license text is included in LilyTerm source code. // TRANSLATE NOTE: Of corse, Translating the GPLv3 license text won't be a good idea, // TRANSLATE NOTE: But it seems be safe to translate the following license declaration. // TRANSLATE NOTE: Please just skip and leave it alone if you don't wanna translate it. str[6] = g_strdup_printf(_("Copyright (c) %s-%s %s. All rights reserved.\n\n" "%s is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n" "the Free Software Foundation, either version 3 of the License, or\n" "(at your option) any later version.\n\n" "%s is distributed in the hope that it will be useful,\n" "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" "GNU General Public License for more details.\n\n" "You should have received a copy of the GNU General Public License\n" "along with %s. If not, see ."), "2008", YEAR, AUTHOR, PACKAGE, PACKAGE, PACKAGE); str[7] = convert_text_to_html(&str[6], FALSE, NULL, "tt", NULL); dialog_data->operate[2] = add_text_to_notebook(notebook, _("License"), GTK_FAKE_STOCK_DIALOG_AUTHENTICATION, str[7]); // Translators temp_str = "Adrian Buyssens: Flemish/Dutch translation.\n" "Bogusz Kowalski: Polish translation.\n" "GoGoNKT: Simplified Chinese translation.\n" "Marco Paolome: Italian translation.\n" "Mario Blättermann: German translation.\n" "Niels Martignène: Franch translation.\n" "P.L. Francisco: Spanish translation.\n" "Rafael Ferreira: Portuguese translation.\n" "Samed Beyribey: Turkish translation.\n" "Slavko: Slovak translation.\n" "Vladimir Smolyar: Russian and Ukrainian translations."; str[8] = convert_text_to_html(&temp_str, FALSE, NULL, "tt", NULL); dialog_data->operate[3] = add_text_to_notebook(notebook, _("Translators"), GTK_FAKE_STOCK_CONVERT, str[8]); // About // TRANSLATE NOTE: Please be care of the spacing when translating the following site informatoins. // TRANSLATE NOTE: Please check it in [Right Click Menu] -> [Usage] -> [About] page after translating. str[9] = g_strdup_printf (_("HomePage: %s"), MAINSITE); str[10] = g_strdup_printf (_("Github: %s"), GITHUBURL); str[11] = g_strdup_printf (_("Blog: %s"), BLOG); str[12] = g_strdup_printf (_("Wiki: %s"), WIKI); str[13] = g_strdup_printf (_("Issues: %s"), ISSUES); str[14] = g_strdup_printf (_("IRC: %s"), IRC); str[15] = g_strdup_printf (_("Thank you for using %s!"), PACKAGE); str[16] = g_strdup_printf ("%s <%s>\n\n%s\n%s\n" "%s\n%s\n\n%s", AUTHOR, BUGREPORT, str[9] ,str[10], str[13], str[14], str[15]); str[17] = convert_text_to_html(&str[16], FALSE, NULL, "tt", NULL); dialog_data->operate[4] = add_text_to_notebook(notebook, _("About"), GTK_FAKE_STOCK_ABOUT, str[17]); show_usage_text(notebook, NULL, 0, dialog_data); g_signal_connect(G_OBJECT(notebook), "switch-page", G_CALLBACK(show_usage_text), dialog_data); for (i=0; i<18; i++) g_free(str[i]); break; } case CONFIRM_TO_CLOSE_RUNNING_APPLICATION: // 7 { selectable = TRUE; // get the command line of running foreground program pid_t tpgid = get_tpgid(page_data->pid); temp_str[0] = get_cmdline(tpgid); temp_str[1] = g_strdup_printf("(%d) %s", tpgid, temp_str[0]); temp_str[2] = g_markup_escape_text(temp_str[1], -1); temp_str[3] = g_strdup_printf(_("There is still a running foreground program on #%d tab:"), page_data->page_no+1); temp_str[4] = g_strdup_printf(_("Terminate it by using `kill -9 %d' is recommended " "if it is non-response."), page_data->pid); temp_str[5] = g_strconcat(temp_str[3], "\n\n\t", temp_str[2], "\n\n", _("Continue anyway?"), "\n\n", _("Tip:"), " ", temp_str[4], "", NULL); if ((g_list_length(window_list) > 1) || (dialog_data->total_page>1)) create_entry_hbox = BOX_VERTICALITY; create_dialog(_("Confirm to close running foreground program"), "Confirm to close running foreground program", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_QUESTION, temp_str[5], selectable, 70, TRUE, create_entry_hbox, 5, dialog_data); create_SIGKILL_and_EXIT_widget(dialog_data, FALSE, create_entry_hbox, _("this tab")); break; } case CHANGE_THE_OPACITY_OF_WINDOW: // 8 case CHANGE_THE_OPACITY_OF_WINDOW_WHEN_INACTIVE: { #ifdef ENABLE_RGBA gchar *translated_title = _("Change the opacity of window"); gchar *title = "Change the opacity of window"; gchar *text = _("Change the opacity of window:"); gdouble window_opacity = win_data->window_opacity; if (style==CHANGE_THE_OPACITY_OF_WINDOW) { dialog_data->original_transparent_window = win_data->transparent_window; win_data->transparent_window = TRUE; } else { translated_title = _("Change the opacity of window when inactive"); title = "Change the opacity of window when inactive"; text = _("Change the opacity of window when inactive:"); window_opacity = win_data->window_opacity_inactive; dialog_data->original_transparent_window = win_data->transparent_window_inactive; win_data->transparent_window_inactive = TRUE; dialog_data->original_dim_window = win_data->dim_window; win_data->dim_window = TRUE; } create_dialog(translated_title, title, DIALOG_OK_CANCEL, page_data->window, FALSE, TRUE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_INFO, text, selectable, 0, TRUE, BOX_VERTICALITY, 0, dialog_data); create_scale_widget(dialog_data, 0, 1, 0.001, window_opacity, (GSourceFunc)set_window_opacity, win_data); dialog_data->original_window_opacity = window_opacity; // g_debug("window_opacity = %1.3f", window_opacity); set_window_opacity(NULL, 0, window_opacity, win_data); #else upgrade_dialog(ENABLE_RGBA_VER); goto FINISH; #endif break; } case ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL: // 19 case ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE: // 26 { gchar *title[2] = {NULL}; gdouble value = win_data->color_brightness; dialog_data->original_color_brightness = win_data->color_brightness; dialog_data->original_color_brightness_inactive = win_data->color_brightness_inactive; dialog_data->original_dim_text = win_data->dim_text; if (style == ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL) { title[0] = _("Adjust the brightness of ANSI colors used in terminal"); title[1] = "Adjust the brightness of ANSI colors used in terminal"; } else { title[0] = _("Adjust the brightness of ANSI colors when inactive"); title[1] = "Adjust the brightness of ANSI colors when inactive"; value = win_data->color_brightness_inactive; if (win_data->use_custom_theme) set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, win_data->custom_color_theme[win_data->color_theme_index].color, value, win_data->invert_color, FALSE, win_data->custom_cursor_color, win_data->cursor_color, TRUE); else set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, system_color_theme[win_data->color_theme_index].color, value, win_data->invert_color, FALSE, win_data->custom_cursor_color, win_data->cursor_color, TRUE); } create_dialog(title[0], title[1], DIALOG_OK_CANCEL, page_data->window, FALSE, TRUE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_INFO, title[0], selectable, 0, TRUE, BOX_VERTICALITY, 0, dialog_data); // g_debug("value = %0.3f, win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // value, win_data->color_brightness, win_data->color_brightness_inactive); create_scale_widget(dialog_data, -1, 1, 0.001, value, (GSourceFunc)set_ansi_color, win_data->current_vte); init_dialog_ansi_colors_from_win_data(win_data, dialog_data); break; } case CONFIRM_TO_EXECUTE_COMMAND: // 22 // g_debug("error_data.string = %s", error_data.string); // g_debug("error_data.encoding = %s", error_data.encoding); temp_str[0] = g_markup_escape_text(win_data->temp_data, -1); temp_str[1] = g_strconcat(PACKAGE, _(" is trying to execute the following command:"), "\n\n\t", temp_str[0], "\n\n", _("Continue anyway?"), NULL); create_dialog(_("Confirm to execute -e/-x/--execute command"), "Confirm to execute -e/-x/--execute command", DIALOG_OK_CANCEL, real_menu_active_window, TRUE, FALSE, 10, GTK_RESPONSE_CANCEL, GTK_FAKE_STOCK_DIALOG_WARNING, temp_str[1], FALSE, 70, TRUE, BOX_NONE, 0, dialog_data); break; case CONFIRM_TO_CLOSE_A_TAB_WITH_CHILD_PROCESS: // 23 selectable = TRUE; // get the command line of running foreground program temp_str[0] = g_strdup_printf(_("The following programs are still running under #%d tab:"), page_data->page_no+1); temp_str[1] = g_markup_escape_text(_("Using or 'exit' to close tabs is recommended"), -1); temp_str[2] = g_markup_escape_text(win_data->temp_data, -1); temp_str[3] = g_strconcat(temp_str[0], "\n\n", temp_str[2], "\n", _("Continue anyway?"), "\n\n", _("Tip:"), " ", temp_str[1], "", NULL); create_dialog(_("Confirm to close a tab with child process"), "Confirm to close a tab with child process", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_CANCEL, GTK_FAKE_STOCK_DIALOG_QUESTION, temp_str[3], TRUE, 70, selectable, BOX_VERTICALITY, 5, dialog_data); create_entry_hbox = ((g_list_length(window_list) > 1) || (dialog_data->total_page>1)); create_SIGKILL_and_EXIT_widget(dialog_data, TRUE, create_entry_hbox, _("this tab")); break; case CONFIRM_TO_CLOSE_A_WINDOW_WITH_CHILD_PROCESS: // 24 selectable = TRUE; temp_str[0] = g_markup_escape_text(win_data->temp_data, -1); temp_str[1] = g_strconcat(_("The following programs are still running under this window:"), "\n\n", temp_str[0], "\n", _("Continue anyway?"), NULL); create_dialog(_("Confirm to close a window with child process"), "Confirm to close a window with child process", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_CANCEL, GTK_FAKE_STOCK_DIALOG_QUESTION, temp_str[1], selectable, 70, TRUE, BOX_VERTICALITY, 5, dialog_data); create_entry_hbox = (g_list_length(window_list) > 1); create_SIGKILL_and_EXIT_widget(dialog_data, TRUE, create_entry_hbox, _("those tabs")); break; case CONFIRM_TO_EXIT_WITH_CHILD_PROCESS: // 25 selectable = TRUE; temp_str[0] = g_strdup_printf(_("Confirm to close %s"), PACKAGE); temp_str[1] = g_strdup_printf("Confirm to close %s", PACKAGE); // get the command line of running foreground program temp_str[2] = g_strdup_printf(_("The following programs are still running under %s:"), PACKAGE); temp_str[3] = g_markup_escape_text(win_data->temp_data, -1); temp_str[4] = g_strconcat(temp_str[2] , "\n\n", temp_str[3], "\n", _("Continue anyway?"), NULL); create_dialog(temp_str[0], temp_str[1], DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_CANCEL, GTK_FAKE_STOCK_DIALOG_QUESTION, temp_str[4], selectable, 70, TRUE, BOX_VERTICALITY, 5, dialog_data); create_SIGKILL_and_EXIT_widget(dialog_data, TRUE, TRUE, PACKAGE); break; case CONFIRM_TO_PASTE_TEXTS_TO_VTE_TERMINAL: temp_str[0] = g_strconcat(_("Trying to paste the following texts to the Vte Terminal:"), "\n\n", win_data->temp_data, "\n\n", _("Continue anyway?"), "\n", NULL); create_dialog(_("Confirm to paste texts to the Vte Terminal"), "Confirm to paste texts to the Vte Terminal", DIALOG_OK_CANCEL, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, GTK_FAKE_STOCK_DIALOG_QUESTION, temp_str[0], selectable, 70, FALSE, BOX_NONE, 0, dialog_data); // Button GtkWidget *join_button = gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), _("Join"), GTK_RESPONSE_ACCEPT); #ifdef ENABLE_SET_TOOLTIP_TEXT gtk_widget_set_tooltip_text(join_button, _("Remove '' in the text")); #endif gtk_button_set_image (GTK_BUTTON(join_button), gtk_image_new_from_stock(GTK_FAKE_STOCK_PASTE, GTK_ICON_SIZE_BUTTON)); #ifdef HAVE_GTK_DIALOG_GET_ACTION_AREA gtk_button_box_set_child_secondary (GTK_BUTTON_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog_data->window))), join_button, TRUE); #endif // Button GtkWidget *strip_button = gtk_dialog_add_button (GTK_DIALOG(dialog_data->window), _("Strip"), GTK_RESPONSE_YES); #ifdef ENABLE_SET_TOOLTIP_TEXT gtk_widget_set_tooltip_text(strip_button, _("Remove '', \"\\\", and \"\\<\" in the text, then join '' and '' into a single ''")); #endif gtk_button_set_image (GTK_BUTTON(strip_button), gtk_image_new_from_stock(GTK_FAKE_STOCK_PASTE, GTK_ICON_SIZE_BUTTON)); #ifdef HAVE_GTK_DIALOG_GET_ACTION_AREA gtk_button_box_set_child_secondary (GTK_BUTTON_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog_data->window))), strip_button, TRUE); #endif break; case GENERAL_INFO: { selectable = TRUE; gchar **strings = split_string(win_data->temp_data, "\x10", 3); if (strings==NULL) goto FINISH; create_dialog(strings[0], strings[1], DIALOG_OK, page_data->window, FALSE, FALSE, 10, GTK_RESPONSE_OK, NULL, strings[2], selectable, 70, FALSE, BOX_NONE, 0, dialog_data); g_strfreev(strings); break; } default: #ifdef FATAL print_switch_out_of_range_error_dialog("dialog", "style", style); #endif goto FINISH; } // We'll use gtk_dialog_run() to show the whole dialog // g_debug("Finish creating dialog!"); gtk_widget_show_all (dialog_data->window); // GtkRequisition requisition; // gtk_window_get_size(GTK_WINDOW(dialog_data->window), // &requisition.width, &requisition.height); // g_debug("! The final window size is %d x %d", // requisition.width, requisition.height); // FIXME: Due to a bug in the GTK+2(?), we should set the ellipsize after the dialog is shown. // Or, the vertical size of title label may be cut, and some text may not shown. if ((dialog_data->title_label) && (gtk_label_get_max_width_chars(GTK_LABEL(dialog_data->title_label)) > 0)) gtk_label_set_ellipsize(GTK_LABEL(dialog_data->title_label), PANGO_ELLIPSIZE_MIDDLE); #ifdef UNIT_TEST for (dialog_response=GTK_RESPONSE_HELP; dialog_response<=GTK_RESPONSE_NONE; dialog_response++) { #else dialog_response = gtk_dialog_run(GTK_DIALOG(dialog_data->window)); #endif switch (dialog_response) { case GTK_RESPONSE_OK: { switch (style) { // style 1: change the tab's name case EDIT_LABEL: // g_debug("Got label name: %s",gtk_entry_get_text(GTK_ENTRY(entry))); g_free(page_data->custom_page_name); const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog_data->operate[0])); #ifdef SAFEMODE if ((text) && (text[0]!='\0')) #else if (text[0]!='\0') #endif // store page_data->page_name page_data->custom_page_name = g_strdup(text); else page_data->custom_page_name = NULL; // g_debug("Get the page name = %s, color = %s", // page_data->custom_page_name, page_data->tab_color); if (page_data->page_update_method == PAGE_METHOD_WINDOW_TITLE) page_data->window_title_updated = 1; get_and_update_page_name(page_data, FALSE); break; case ADD_NEW_LOCALES: { const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog_data->operate[0])); g_free(win_data->default_locale); win_data->default_locale = g_strdup(text); text = gtk_entry_get_text(GTK_ENTRY(dialog_data->operate[1])); g_free(win_data->locales_list); win_data->locales_list = g_strdup(text); gtk_widget_destroy(dialog_data->window); dialog_data->window = NULL; refresh_locale_and_encoding_list(win_data); break; } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) // style 2: change the saturation of background case CHANGE_BACKGROUND_SATURATION: #endif // style 9: change the foreground color case CHANGE_THE_FOREGROUND_COLOR: // style 10: change the background color case CHANGE_THE_BACKGROUND_COLOR: // style 9: change the cursor color case CHANGE_THE_CURSOR_COLOR: // style 11: change the text color of window title case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: // style 12: change the text color of cmdline case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: // style 13: change the text color of current dir case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: // style 14: change the text color of custom page name case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: // style 15: change the text color of root privileges cmdline case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: // style 16: change the text color of normal text case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: { // g_debug("Setting the colors. Type = %d", style); GdkRGBA new_color; switch (style) { case CHANGE_THE_FOREGROUND_COLOR: case CHANGE_THE_BACKGROUND_COLOR: case CHANGE_THE_CURSOR_COLOR: gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog_data->operate[0]), &new_color); break; } switch (style) { #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) case CHANGE_BACKGROUND_SATURATION: win_data->background_saturation = gtk_range_get_value(GTK_RANGE(dialog_data->operate[0])) + 0.0005; break; #endif #ifdef ENABLE_GDKCOLOR_TO_STRING case CHANGE_THE_FOREGROUND_COLOR: if (win_data->use_custom_theme == FALSE) clear_custom_colors_data(win_data, TRUE); update_fg_bg_color(win_data, new_color, TRUE); break; case CHANGE_THE_BACKGROUND_COLOR: if (win_data->use_custom_theme == FALSE) clear_custom_colors_data(win_data, FALSE); update_fg_bg_color(win_data, new_color, FALSE); break; case CHANGE_THE_CURSOR_COLOR: #ifdef USE_OLD_GTK_COLOR_SELECTION win_data->custom_cursor_color = ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog_data->custom_cursor_color_checkbox)); #else win_data->custom_cursor_color = TRUE; #endif win_data->cursor_color = new_color; break; case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: { gint page_color_type = style - CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE; gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog_data->operate[0]), &new_color); gchar *new_color_str = dirty_gdk_rgba_to_string(&(new_color)); struct Page *tmp_page_data = NULL; for (i=0; inotebook)); i++) { tmp_page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (tmp_page_data==NULL) goto DESTROY_WINDOW; #endif if (tmp_page_data->tab_color == win_data->user_page_color[page_color_type]) tmp_page_data->tab_color = new_color_str; } g_free(win_data->user_page_color[page_color_type]); win_data->user_page_color[page_color_type] = new_color_str; break; } #endif } if (style>=CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE && style<=CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT) // recover the color of pages recover_page_colors(dialog_data->window, page_data->window, page_data->notebook); else { struct Page *tmp_page_data = NULL; // change the saturation of background and foreground/background color for (i=0; inotebook)); i++) { tmp_page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (tmp_page_data==NULL) goto DESTROY_WINDOW; #endif switch (style) { #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) case CHANGE_BACKGROUND_SATURATION: set_background_saturation (NULL, 0, win_data->background_saturation, tmp_page_data->vte); break; #endif case CHANGE_THE_FOREGROUND_COLOR: case CHANGE_THE_BACKGROUND_COLOR: adjust_vte_color(GTK_COLOR_CHOOSER(dialog_data->operate[0]), NULL, tmp_page_data->vte); break; case CHANGE_THE_CURSOR_COLOR: #ifdef USE_OLD_GTK_COLOR_SELECTION adjust_vte_color(NULL, NULL, tmp_page_data->vte); #else adjust_vte_color(GTK_COLOR_CHOOSER(dialog_data->operate[0]), NULL, tmp_page_data->vte); #endif break; } } } break; } // style 3: confirm to close multi pages case CONFIRM_TO_CLOSE_MULTI_PAGES: { // we need to destroy the dialog before confirm a working vte. if ((create_entry_hbox) && gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(dialog_data->operate[0]))) { // g_debug ("CONFIRM_TO_CLOSE_MULTI_PAGES: call gtk_main_quit()"); quit_gtk(); force_to_quit = TRUE; // g_debug("Set force_to_quit to %d", force_to_quit); } gtk_widget_destroy(dialog_data->window); dialog_data->window = NULL; close_multi_tabs(win_data, FALSE); break; } // style 4: get function key value case SET_KEY_BINDING: { for (i=0; iuser_key_value[i], win_data); break; } // style 23: confirm to close a tab with child process case CONFIRM_TO_CLOSE_A_TAB_WITH_CHILD_PROCESS: // style 24: confirm to close a window with child process case CONFIRM_TO_CLOSE_A_WINDOW_WITH_CHILD_PROCESS: // style 25: confirm to close LilyTerm with child process case CONFIRM_TO_EXIT_WITH_CHILD_PROCESS: if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog_data->operate[1]))) using_kill = TRUE; if ((style==CONFIRM_TO_CLOSE_A_WINDOW_WITH_CHILD_PROCESS) || (style==CONFIRM_TO_EXIT_WITH_CHILD_PROCESS)) force_to_quit = TRUE; // style 7: confirm to close running application case CONFIRM_TO_CLOSE_RUNNING_APPLICATION: if ((create_entry_hbox) && (gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(dialog_data->operate[0])))) { // g_debug ("CONFIRM_TO_CLOSE_RUNNING_APPLICATION(): call gtk_main_quit()"); quit_gtk(); force_to_quit = TRUE; } break; #ifdef ENABLE_RGBA // style 8: change the opacity of window case CHANGE_THE_OPACITY_OF_WINDOW: win_data->window_opacity = gtk_range_get_value(GTK_RANGE(dialog_data->operate[0]))+0.0005; break; case CHANGE_THE_OPACITY_OF_WINDOW_WHEN_INACTIVE: win_data->window_opacity_inactive = gtk_range_get_value(GTK_RANGE(dialog_data->operate[0]))+0.0005; set_window_opacity( NULL, 0, win_data->window_opacity, win_data); win_data->dim_window = TRUE; break; // style 19: Adjust the brightness of ANSI colors used in terminal case CHANGE_THE_ANSI_COLORS: case ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL: { if (style==CHANGE_THE_ANSI_COLORS) { // g_debug("win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); gint i; for (i=0; icolor_theme_index].color[i]), &(dialog_data->ansi_colors_orig[i]))) { // print_color(i, "Color had been changed", dialog_data->ansi_colors_orig[i]); for (j=0; jcustom_color_theme[j].color[i] = dialog_data->ansi_colors_orig[i]; win_data->have_custom_color = TRUE; win_data->use_custom_theme = TRUE; } else { // restore to the system color theme for (j=0; jcustom_color_theme[j].color[i] = system_color_theme[j].color[i]; } } // g_debug("dialog_data->original_have_custom_color = %d, win_data->have_custom_color = %d," // " dialog_data->original_use_custom_theme = %d, win_data->use_custom_theme = %d", // dialog_data->original_have_custom_color, win_data->have_custom_color, // dialog_data->original_use_custom_theme, win_data->use_custom_theme); if ((dialog_data->original_have_custom_color != win_data->have_custom_color) || (dialog_data->original_use_custom_theme != win_data->use_custom_theme)) recreate_theme_menu_items(win_data); } generate_all_color_datas(win_data); struct Page *page_data; gboolean default_vte_color = use_default_vte_theme(win_data); for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data==NULL) goto DESTROY_WINDOW; #endif set_vte_color(page_data->vte, default_vte_color, win_data->custom_cursor_color, win_data->cursor_color, win_data->color, FALSE, FALSE); } // g_debug("win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); break; } case ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE: win_data->color_brightness_inactive = win_data->color_brightness; win_data->color_brightness = dialog_data->original_color_brightness; // g_debug("win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); win_data->dim_text = TRUE; generate_all_color_datas(win_data); set_vte_color(win_data->current_vte, use_default_vte_theme(win_data), win_data->custom_cursor_color, win_data->cursor_color, win_data->color, FALSE, FALSE); break; #endif } break; } case GTK_RESPONSE_ACCEPT: break; case GTK_RESPONSE_YES: break; default: { switch (style) { // FIXME: vte_terminal_search_set_gregex(VTE_TERMINAL(win_data->current_vte), NULL) don't work. // case FIND_STRING: // vte_terminal_search_set_gregex(VTE_TERMINAL(win_data->current_vte), NULL); // vte_terminal_search_find_previous(VTE_TERMINAL(win_data->current_vte)); // break; #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) // style 2: change the saturation of background case CHANGE_BACKGROUND_SATURATION: #endif // style 9: change the foreground color case CHANGE_THE_FOREGROUND_COLOR: // style 10: change the background color case CHANGE_THE_BACKGROUND_COLOR: // style 9: change the cursor color case CHANGE_THE_CURSOR_COLOR: #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) if (style==CHANGE_BACKGROUND_SATURATION) { win_data->transparent_background = dialog_data->original_transparent_background; // g_debug("transparent_background = %d", transparent_background); set_background_saturation(NULL, 0, win_data->background_saturation, win_data->current_vte); } #endif // print_color(-1, "RECOVER: dialog_data->original_color", dialog_data->original_color); if (style==CHANGE_THE_CURSOR_COLOR) win_data->custom_cursor_color = dialog_data->original_custom_cursor_color; #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) if (style!=CHANGE_BACKGROUND_SATURATION) { dialog_data->recover = TRUE; adjust_vte_color(GTK_COLOR_CHOOSER(dialog_data->operate[0]), &(dialog_data->original_color), win_data->current_vte); } #endif break; // style 4: get function key value case SET_KEY_BINDING: { for (i=0; iuser_key_value[i]); break; } #ifdef ENABLE_RGBA // style 8: change the opacity of window case CHANGE_THE_OPACITY_OF_WINDOW: win_data->transparent_window = dialog_data->original_transparent_window; win_data->window_opacity = dialog_data->original_window_opacity; dim_window(win_data, 2); break; case CHANGE_THE_OPACITY_OF_WINDOW_WHEN_INACTIVE: win_data->window_is_inactivated = TRUE; dim_window(win_data, 2); win_data->transparent_window_inactive = dialog_data->original_transparent_window; win_data->window_opacity_inactive = dialog_data->original_window_opacity; win_data->dim_window = dialog_data->original_dim_window; break; #endif // style 11: change the text color of window title case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: // style 12: change the text color of cmdline case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: // style 13: change the text color of current dir case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: // style 14: change the text color of custom page name case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: // style 15: change the text color of root privileges cmdline case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: // style 16: change the text color of normal text case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: recover_page_colors(dialog_data->window, page_data->window, page_data->notebook); break; case CHANGE_THE_ANSI_COLORS: case ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL: case ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE: if (style==CHANGE_THE_ANSI_COLORS) win_data->invert_color = dialog_data->original_invert_color; // g_debug("dialog_data->original_color_brightness = %0.3f", dialog_data->original_color_brightness); win_data->color_brightness = dialog_data->original_color_brightness; win_data->color_brightness_inactive = dialog_data->original_color_brightness_inactive; win_data->dim_text = dialog_data->original_dim_text; // g_debug("win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); // recover the color of current vte if (win_data->use_custom_theme) set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, win_data->custom_color_theme[win_data->color_theme_index].color, win_data->color_brightness, win_data->invert_color, use_default_vte_theme(win_data), win_data->custom_cursor_color, win_data->cursor_color, FALSE); else set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, system_color_theme[win_data->color_theme_index].color, win_data->color_brightness, win_data->invert_color, use_default_vte_theme(win_data), win_data->custom_cursor_color, win_data->cursor_color, FALSE); break; } break; } } #ifdef UNIT_TEST } #endif #ifdef SAFEMODE DESTROY_WINDOW: #endif if (selectable) { extern GtkClipboard *selection_primary; gchar *current_clipboard_str = NULL; #ifdef SAFEMODE if (selection_primary) #endif current_clipboard_str = gtk_clipboard_wait_for_text(selection_primary); if ((current_clipboard_str!=NULL) && (current_clipboard_str[0]!='\0')) { g_free(selection_primary_str); selection_primary_str = g_strdup(current_clipboard_str); } } // destroy dialog. // g_debug("destroy dialog: dialog_data->window = %p", dialog_data->window); if ((dialog_response != GTK_RESPONSE_NONE) && (dialog_data->window)) gtk_widget_destroy(dialog_data->window); if ((style >= CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE) && (style <= CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT)) { // g_debug("tabs_bar_is_shown = %d", tabs_bar_is_shown); if (tabs_bar_is_shown != gtk_notebook_get_show_tabs GTK_NOTEBOOK(win_data->notebook)) hide_and_show_tabs_bar(win_data, OFF); } if (style==PASTE_GRABBED_KEY_TO_EVERY_VTE_TERMINAL) // for PASTE_GRABBED_KEY_TO_EVERY_VTE_TERMINAL Only... win_data->enable_key_binding = enable_key_binding; if (selectable) { if (selection_primary_str) gtk_clipboard_set_text(selection_primary, selection_primary_str, -1); } FINISH: dialog_activated--; // g_debug("Set dialog_activated = %d, gtk_widget_get_mapped(win_data->window) = %d", dialog_activated, gtk_widget_get_mapped(win_data->window)); g_free(dialog_data); g_free(selection_primary_str); for (i=0; i=0; i--) { if (win_data->use_custom_theme) dialog_data->ansi_colors_orig[i] = win_data->custom_color_theme[win_data->color_theme_index].color[i]; else dialog_data->ansi_colors_orig[i] = system_color_theme[win_data->color_theme_index].color[i]; } // print_color(i, "dialog_data->ansi_colors", dialog_data->ansi_colors_orig[i]); } #if defined(USE_OLD_GTK_COLOR_SELECTION) || defined(UNIT_TEST) void update_custom_cursor_color(GtkWidget *menuitem, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch update_custom_cursor_color() with menuitem = %p, win_data = %p", menuitem, win_data); #endif #ifdef SAFEMODE if ((menuitem==NULL) || (win_data==NULL)) return; #endif win_data->custom_cursor_color = ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(menuitem)); enable_custom_cursor_color(win_data->current_vte, win_data->custom_cursor_color, &(win_data->cursor_color)); } #endif void dialog_invert_color_theme(GtkWidget *menuitem, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch dialog_invert_color_theme() with menuitem = %p, win_data = %p", menuitem, win_data); #endif #ifdef SAFEMODE if ((menuitem==NULL) || (win_data==NULL)) return; #endif struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); #ifdef SAFEMODE if (dialog_data==NULL) return; #endif // g_debug("dialog_invert_color_theme(): (before) win_data->temp_index = %d, win_data->invert_color = %d", // win_data->temp_index, win_data->invert_color); // win_data->temp_index will point to the color index in color_orig // invert the color of current vte win_data->invert_color = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(menuitem)); win_data->temp_index = get_color_index(TRUE, win_data->temp_index); // g_debug("dialog_invert_color_theme(): (after) win_data->temp_index = %d, win_data->invert_color = %d", // win_data->temp_index, win_data->invert_color); win_data->color_brightness = - win_data->color_brightness; win_data->color_brightness_inactive = -win_data->color_brightness_inactive; // g_debug("dialog_invert_color_theme(): win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, dialog_data->ansi_colors_orig, win_data->color_brightness, win_data->invert_color, FALSE, win_data->custom_cursor_color, win_data->cursor_color, FALSE); // invert the brightness gtk_range_set_value(GTK_RANGE(dialog_data->operate[1]), win_data->color_brightness); // update the color selection info // g_debug("dialog_invert_color_theme(): call update_ansi_color_info() with win_data->temp_index to %d", win_data->temp_index); gint converted_index = get_color_index(win_data->invert_color, win_data->temp_index); update_ansi_color_info(NULL, converted_index); // update the color buttons update_color_buttons(win_data, dialog_data); // set focus color button gtk_window_set_focus(GTK_WINDOW(dialog_data->window), dialog_data->color_button[converted_index]); } void update_color_buttons(struct Window *win_data, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch update_color_buttons() with win_data = %p, dialog_data = %p", win_data, dialog_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (dialog_data==NULL)) return; #endif #ifdef USE_OLD_GTK_COLOR_SELECTION // Get the default size of GTK_ICON_SIZE_MENU gint width = 16, height = 16; GtkSettings *settings = gtk_settings_get_default(); if (settings) gtk_icon_size_lookup_for_settings (settings, GTK_ICON_SIZE_MENU, &width, &height); #endif // Get the color theme GdkRGBA* temp_color; if (win_data->use_custom_theme) temp_color = win_data->custom_color_theme[win_data->color_theme_index].color; else temp_color = system_color_theme[win_data->color_theme_index].color; gint i, color_index; for (i=COLOR-1; i>=0; i--) { color_index = get_color_index(win_data->invert_color, i); #ifdef USE_OLD_GTK_COLOR_SELECTION GdkPixbuf *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height); # ifdef USE_GDK_RGBA gdk_pixbuf_fill (pixbuf, (guint32)(temp_color[color_index].red *0xFF) << 24 | (guint32)(temp_color[color_index].green *0xFF) << 16 | (guint32)(temp_color[color_index].blue *0xFF) << 8); # else gdk_pixbuf_fill (pixbuf, (guint32) (temp_color[color_index].red >> 8) << 24 | (temp_color[color_index].green >> 8) << 16 | (temp_color[color_index].blue >> 8) << 8); # endif GtkWidget *image = gtk_image_new_from_pixbuf (pixbuf); # ifdef SAFEMODE if (dialog_data->color_button[i]) # endif gtk_button_set_image(GTK_BUTTON(dialog_data->color_button[i]), image); #else # ifdef SAFEMODE if (dialog_data->color_button[i]) # endif # ifdef USE_GTK_COLOR_CHOOSER gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog_data->color_button[i]), &(temp_color[color_index])); # else gtk_color_button_set_rgba(GTK_COLOR_BUTTON(dialog_data->color_button[i]), &(temp_color[color_index])); # endif #endif #ifdef ENABLE_GDKCOLOR_TO_STRING # ifdef DEBUG gchar *color_string = dirty_gdk_rgba_to_string(&(temp_color[color_index])); gchar *temp_str = g_strdup_printf("%s [%d] - %s", color[i].translation, color_index, color_string); # ifdef ENABLE_SET_TOOLTIP_TEXT # ifdef SAFEMODE if (dialog_data->color_button[i]) # endif gtk_widget_set_tooltip_text(dialog_data->color_button[i], temp_str); # endif g_free(temp_str); g_free(color_string); # else # ifdef ENABLE_SET_TOOLTIP_TEXT # ifdef SAFEMODE if (dialog_data->color_button[i]) # endif gtk_widget_set_tooltip_text(dialog_data->color_button[i], color[i].translation); # endif # endif #endif #ifdef USE_OLD_GTK_COLOR_SELECTION g_object_unref (pixbuf); #endif } } gint get_color_index(gboolean invert_color, gint index) { #ifdef DETAIL g_debug("! Launch get_color_index() with invert_color = %d, index = %d", invert_color, index); #endif if ((index < 0) || (invert_color == FALSE)) return index; switch (index) { case 0: return COLOR-1; case (COLOR/2)-1: return COLOR/2; case (COLOR/2): return COLOR/2-1; case COLOR-1: return 0; break; default: return (index + 8) % 16; } } void clear_custom_colors_data(struct Window *win_data, gboolean update_fg) { #ifdef DETAIL g_debug("! Launch clear_custom_colors_data() with win_data = %p, update_fg = %d", win_data, update_fg); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif gint i, j; for (i=0; icustom_color_theme[i].color[j] = system_color_theme[i].color[j]; } void update_fg_bg_color(struct Window *win_data, GdkRGBA color, gboolean update_fg) { #ifdef DETAIL g_debug("! Launch update_fg_bg_color() with win_data = %p, update_fg = %d", win_data, update_fg); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif gint color_index = 0; if (update_fg) { win_data->color[COLOR-1] = color; if (win_data->color_brightness > -1) adjust_ansi_color(&(win_data->color_inactive[COLOR-1]), &(win_data->color[COLOR-1]), win_data->color_brightness_inactive / (1 + win_data->color_brightness)); color_index = COLOR-1; } else { win_data->color[0] = color; // FIXME: GtkColorSelection have no ALPHA-CHANGED signal. // so that the following code should be // marked for temporary. // background_saturation = // gtk_color_selection_get_current_alpha( // GTK_COLOR_CHOOSER(adjustment))/65535; } gint i, index = get_color_index(win_data->invert_color, color_index); // g_debug("update_fg_bg_color(): index = %d, win_data->invert_color = %d", index, win_data->invert_color); // print_color(-1, "SAVE: color", color); for (i=0; icustom_color_theme[i].color[index] = color; // gchar *temp_str = g_strdup_printf("%d (%02d): fg_color", i, index); // print_color (temp_str, win_data->custom_color_theme[i].color[index]); // g_free(temp_str); // temp_str = g_strdup_printf("%d (%02d): bg_color", i, get_color_index(win_data->invert_color, index)); // print_color (temp_str, win_data->custom_color_theme[i].color[get_color_index(win_data->invert_color, index)]); // g_free(temp_str); } win_data->have_custom_color = TRUE; if (win_data->use_custom_theme == FALSE) { win_data->use_custom_theme = TRUE; recreate_theme_menu_items(win_data); } } // the win_data->temp_index will updated to get_color_index()!! // the color_index here is the serial no of button!! void update_ansi_color_info(GtkWidget *button, gint color_index) { #ifdef DETAIL g_debug("! Launch update_ansi_color_info() with button = %p, color_index = %d", button, color_index); #endif #ifdef SAFEMODE if (real_menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(real_menu_active_window), "Win_Data"); #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); #ifdef SAFEMODE if (dialog_data==NULL) return; #endif gint convert_index = get_color_index(win_data->invert_color, color_index); gchar *tmp_topic = g_strdup_printf(_("Change the ansi color [%s] in terminal"), color[convert_index].translation); gtk_window_set_title(GTK_WINDOW(dialog_data->window), tmp_topic); // avoid to call adjust_vte_color() // g_debug("update_ansi_color_info(): set win_data->temp_index to -1"); win_data->temp_index = -1; #ifdef USE_OLD_GTK_COLOR_SELECTION # ifdef SAFEMODE if (dialog_data->operate[0]==NULL) return; # endif set_color_selection_colors(dialog_data->operate[0], &(dialog_data->ansi_colors_orig[convert_index])); #else # ifdef USE_GTK_COLOR_CHOOSER gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(dialog_data->color_button[color_index]), &(dialog_data->ansi_colors_orig[convert_index])); # else gtk_color_button_set_rgba(GTK_COLOR_BUTTON(dialog_data->color_button[color_index]), &(dialog_data->ansi_colors_orig[convert_index])); # endif #endif g_free(tmp_topic); // win_data->temp_index will point to the color index in color_orig win_data->temp_index = convert_index; // g_debug("Launch update_ansi_color_info(): win_data->temp_index = %d", win_data->temp_index); } GtkWidget *create_label_with_text(GtkWidget *box, gboolean set_markup, gboolean selectable, gint max_width_chars, const gchar *text) { #ifdef DETAIL g_debug("! Launch create_label_with_text() with box = %p, set_markup = %d, " "selectable = %d, max_width_chars = %d, text = %s", box, set_markup, selectable, max_width_chars, text); #endif #ifdef SAFEMODE if (text==NULL) return NULL; #endif GtkWidget *label = gtk_label_new(NULL); if (set_markup) gtk_label_set_markup(GTK_LABEL (label), text); else gtk_label_set_text(GTK_LABEL (label), text); if (selectable) gtk_label_set_selectable(GTK_LABEL(label), TRUE); if (max_width_chars) gtk_label_set_max_width_chars (GTK_LABEL(label), max_width_chars); if (box) gtk_box_pack_start (GTK_BOX(box), label, FALSE, FALSE, 0); return label; } GtkWidget *add_secondary_button(GtkWidget *dialog, const gchar *text, gint response_id, const gchar *stock_id) { #ifdef DETAIL g_debug("! Launch add_secondary_button() with dialog = %p, text = %s, response_id = %d, stock_id = %s", dialog, text, response_id, stock_id); #endif #ifdef SAFEMODE if ((text==NULL) || (dialog==NULL)) return NULL; #endif GtkWidget *button = gtk_dialog_add_button (GTK_DIALOG(dialog), text, response_id); if (stock_id) gtk_button_set_image (GTK_BUTTON(button), gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_BUTTON)); #ifdef HAVE_GTK_DIALOG_GET_ACTION_AREA gtk_button_box_set_child_secondary (GTK_BUTTON_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), button, TRUE); #endif return button; } #if defined(ENABLE_FIND_STRING) || defined(UNIT_TEST) void refresh_regex_settings(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch refresh_regex_settings() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->window==NULL)) return; #endif struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); #ifdef SAFEMODE if (dialog_data==NULL) return; #endif g_free(win_data->find_string); #ifdef SAFEMODE if (dialog_data->operate[0]!=NULL) #endif win_data->find_string = g_strdup(gtk_entry_get_text(GTK_ENTRY(dialog_data->operate[0]))); // win_data->find_case_sensitive = GTK_TOGGLE_BUTTON(dialog_data->operate[1])->active; #ifdef SAFEMODE if (dialog_data->operate[1]!=NULL) #endif win_data->find_case_sensitive = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog_data->operate[1])); // win_data->find_use_perl_regular_expressions = GTK_TOGGLE_BUTTON(dialog_data->operate[2])->active; #ifdef SAFEMODE if (dialog_data->operate[2]!=NULL) #endif win_data->find_use_perl_regular_expressions = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog_data->operate[2])); // g_debug("Got win_data->find_string = %s", win_data->find_string); // g_debug("Got win_data->find_case_sensitive = %d", win_data->find_case_sensitive); // g_debug("win_data->find_use_perl_regular_expressions = %d", win_data->find_use_perl_regular_expressions); refresh_regex(win_data, dialog_data); } void refresh_regex(struct Window *win_data, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch refresh_regex with win_data = %p, dialog_data = %p", win_data, dialog_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL) || (dialog_data == NULL)) return; #endif #ifdef ENABLE_FIND_STRING gint RegexCompileFlags = G_REGEX_OPTIMIZE; if (! win_data->find_case_sensitive) RegexCompileFlags |= G_REGEX_CASELESS; if ((! win_data->find_use_perl_regular_expressions) && (win_data->find_string && (win_data->find_string[0]!='\0'))) { gchar *new_find_string = g_regex_escape_string(win_data->find_string, -1); g_free(win_data->find_string); win_data->find_string = new_find_string; } gchar *find_string = win_data->find_string; if (find_string==NULL) find_string = ""; if (find_string[0]!='\0') { vte_terminal_search_find_next(VTE_TERMINAL(win_data->current_vte)); GRegex *regex = NULL; regex = g_regex_new (find_string, RegexCompileFlags, 0, NULL); vte_terminal_search_set_gregex(VTE_TERMINAL(win_data->current_vte), regex); if (regex) g_regex_unref (regex); } else { // FIXME: It don't work! vte_terminal_search_set_gregex(VTE_TERMINAL(win_data->current_vte), NULL); } gboolean update_bg_color = FALSE; if ((find_string[0]=='\0') || vte_terminal_search_find_previous(VTE_TERMINAL(win_data->current_vte)) || vte_terminal_search_find_next(VTE_TERMINAL(win_data->current_vte))) { if (compare_color(&(win_data->find_entry_current_bg_color), &(win_data->find_entry_bg_color))) { update_bg_color = TRUE; win_data->find_entry_current_bg_color = win_data->find_entry_bg_color; } } else { if (compare_color(&(win_data->find_entry_current_bg_color), &(entry_not_find_bg_color))) { update_bg_color = TRUE; win_data->find_entry_current_bg_color = entry_not_find_bg_color; } } # ifdef SAFEMODE if (dialog_data->operate[0]!=NULL) { # endif if (update_bg_color) { # ifdef USING_OLD_GTK_RC_STYLE_NEW GtkRcStyle *rc_style = gtk_rc_style_new(); rc_style->base[GTK_STATE_NORMAL] = win_data->find_entry_current_bg_color; rc_style->color_flags[GTK_STATE_NORMAL] |= GTK_RC_BASE; gtk_widget_modify_style (dialog_data->operate[0], rc_style); g_object_unref(rc_style); # else GdkRGBA gdkrgba; gchar *color_string = dirty_gdk_rgba_to_string(&(win_data->find_entry_current_bg_color)); gdk_rgba_parse (&gdkrgba, color_string); gtk_widget_override_background_color(dialog_data->operate[0], 0, &gdkrgba); g_free(color_string); # endif } # ifdef SAFEMODE } # endif # ifdef SAFEMODE if (dialog_data->operate[3]!=NULL) # endif gtk_widget_hide(dialog_data->operate[3]); #endif } void find_str(GtkWidget *widget, Dialog_Find_Type type) { #ifdef DETAIL g_debug("! Launch find_str() with type = %d", type); #endif #ifdef FATAL // g_debug("real_menu_active_window = %p", real_menu_active_window); if (real_menu_active_window==NULL) return print_active_window_is_null_error_dialog("find_str_in_vte()"); #endif #ifdef SAFEMODE if (real_menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(real_menu_active_window), "Win_Data"); #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif #ifdef ENABLE_FIND_STRING vte_terminal_search_set_wrap_around (VTE_TERMINAL(win_data->current_vte), FALSE); gboolean response = find_str_in_vte(win_data->current_vte, type); vte_terminal_search_set_wrap_around (VTE_TERMINAL(win_data->current_vte), TRUE); struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); if (response) gtk_widget_hide(dialog_data->operate[3]); else { switch (type) { case FIND_PREV: set_markup_key_value(FALSE, "darkred", "Find hit top, continuing at bottom!", dialog_data->operate[3]); break; case FIND_NEXT: set_markup_key_value(FALSE, "darkred", "Find hit bottom, continuing at top!", dialog_data->operate[3]); break; # ifdef FATAL default: print_switch_out_of_range_error_dialog("find_str", "type", type); # endif } gtk_widget_show(dialog_data->operate[3]); find_str_in_vte(win_data->current_vte, type); } #endif } gboolean find_str_in_vte(GtkWidget *vte, Dialog_Find_Type type) { #ifdef DETAIL g_debug("! Launch find_str_in_vte() with type = %d", type); #endif #ifdef SAFEMODE if (vte==NULL) return FALSE; #endif gboolean response = FALSE; #ifdef ENABLE_FIND_STRING switch (type) { case FIND_PREV: response = vte_terminal_search_find_previous(VTE_TERMINAL(vte)); break; case FIND_NEXT: response = vte_terminal_search_find_next(VTE_TERMINAL(vte)); break; # ifdef FATAL default: print_switch_out_of_range_error_dialog("find_str_in_vte", "type", type); # endif } #endif return response; } #endif void paste_text_to_vte_terminal(GtkWidget *widget, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch paste_text_to_vte_terminal()"); #endif #ifdef SAFEMODE if ((dialog_data==NULL) || (dialog_data->operate[0]==NULL)) return; // g_debug("paste_text_to_vte_terminal() Got dialog_data->operate[0] = %p", dialog_data->operate[0]); #endif const gchar *text = gtk_entry_get_text(GTK_ENTRY(dialog_data->operate[0])); if ((text == NULL) || (text[0] == '\0')) return; #ifdef FATAL // g_debug("real_menu_active_window = %p", real_menu_active_window); if (real_menu_active_window==NULL) return print_active_window_is_null_error_dialog("paste_text_to_vte_terminal()"); #endif #ifdef SAFEMODE if (real_menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(real_menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif gboolean append_new_line = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog_data->operate[1])); gchar *past_str = NULL; if (append_new_line) past_str = g_strdup_printf("%s\n", text); else past_str = g_strdup(text); gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data==NULL) continue; #endif vte_terminal_feed_child(VTE_TERMINAL(page_data->vte), past_str, -1); } g_free(past_str); gtk_entry_set_text (GTK_ENTRY(dialog_data->operate[0]), ""); gtk_window_set_focus(GTK_WINDOW(win_data->window), dialog_data->operate[0]); } GtkWidget *create_entry_widget (GtkWidget *box, gchar *contents, gchar *name, gchar *default_value, gboolean activates_default) { #ifdef DETAIL g_debug("! Launch create_entry_widget() with box = %p, contents = %s, name = %s, default_value = %s", box, contents, name, default_value); #endif #ifdef SAFEMODE if (box==NULL) return NULL; #endif GtkWidget *mainbox = dirty_gtk_vbox_new(FALSE, 10); if (contents && contents[0]!='\0') { GtkWidget *hbox = dirty_gtk_hbox_new(FALSE, 0); GtkWidget *vbox = dirty_gtk_vbox_new(FALSE, 0); GtkWidget *label = gtk_label_new(contents); gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(mainbox), hbox, FALSE, FALSE, 0); } GtkWidget *hbox = dirty_gtk_hbox_new(FALSE, 5); GtkWidget *vbox = dirty_gtk_vbox_new(FALSE, 0); GtkWidget *label = gtk_label_new(name); gtk_box_pack_start (GTK_BOX(hbox), label, FALSE, FALSE, 0); GtkWidget *entry = gtk_entry_new (); if (default_value) gtk_entry_set_text(GTK_ENTRY(entry), default_value); gtk_entry_set_activates_default(GTK_ENTRY(entry), activates_default); gtk_box_pack_start(GTK_BOX (hbox), entry, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(mainbox), vbox, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(box), mainbox, FALSE, FALSE, 0); return entry; } GtkWidget *create_frame_widget (struct Dialog *dialog_data, gchar *label, GtkWidget *label_widget, GtkWidget *child, guint padding) { #ifdef DETAIL g_debug("! Launch create_frame_widget() with dialog_data = %p, label = %s, label_widget = %p, " "child = %p, padding = %d!", dialog_data, label, label_widget, child, padding); #endif #ifdef SAFEMODE if (dialog_data==NULL) return NULL; #endif GtkWidget *frame = gtk_frame_new (label); if (label_widget) gtk_frame_set_label_widget (GTK_FRAME(frame), label_widget); #ifdef SAFEMODE if (dialog_data->box!=NULL) #endif gtk_box_pack_start (GTK_BOX(dialog_data->box), frame, FALSE, FALSE, padding); GtkWidget *vbox = dirty_gtk_vbox_new (FALSE, 15); gtk_container_set_border_width (GTK_CONTAINER (vbox), BORDER_SPACE); gtk_container_add (GTK_CONTAINER (frame), vbox); if (child) gtk_box_pack_start (GTK_BOX(vbox), child, FALSE, FALSE, 0); return vbox; } GtkWidget *create_button_with_image(gchar *label_text, const gchar *stock_id, gboolean set_tooltip_text, GSourceFunc func, gpointer func_data) { #ifdef DETAIL g_debug("! Launch create_button_with_image() with label_text = %s, stock_id = %s!", label_text, stock_id); #endif GtkWidget *label = NULL; #ifdef ENABLE_SET_TOOLTIP_TEXT if (set_tooltip_text) { label = gtk_button_new(); gtk_widget_set_tooltip_text (label, label_text); } else #endif label = gtk_button_new_with_label(label_text); gtk_button_set_image (GTK_BUTTON(label), gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU)); gtk_button_set_relief(GTK_BUTTON(label), GTK_RELIEF_NONE); gtk_button_set_focus_on_click(GTK_BUTTON(label), FALSE); #ifdef USE_GTK_WIDGET_SET_HALIGN gtk_widget_set_halign (label, GTK_ALIGN_START); #else gtk_button_set_alignment(GTK_BUTTON(label), 0, 0.5); #endif #ifdef SAFEMODE if (func) #endif g_signal_connect(G_OBJECT(label), "clicked", G_CALLBACK(func), func_data); return label; } GtkWidget *create_hbox_with_text_and_image(gchar *text, const gchar *stock_id) { #ifdef DETAIL g_debug("! Launch create_hbox_with_text_and_image() with label_text = %s, stock_id = %s!", text, stock_id); #endif GtkWidget *hbox=dirty_gtk_hbox_new(FALSE, 0); set_widget_thickness(hbox, 0); GtkWidget *label = gtk_label_new(text); gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0); GtkWidget *image = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); gtk_widget_show_all(hbox); return hbox; } void create_color_selection_widget(struct Dialog *dialog_data, GSourceFunc func, gpointer func_data) { #ifdef DETAIL g_debug("! Launch create_color_selection_widget() with dialog_data = %p!", dialog_data); #endif #ifdef SAFEMODE if (dialog_data==NULL) return; #endif #ifdef USE_GTK_COLOR_CHOOSER dialog_data->window = dialog_data->operate[0] = gtk_color_chooser_dialog_new(NULL, GTK_WINDOW(dialog_data->window)); gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog_data->operate[0]), FALSE); // FIXME: the following codes seems no work? g_object_set(dialog_data->operate[0], "show-editor", TRUE, NULL); set_color_selection_colors(dialog_data->operate[0], &(dialog_data->original_color)); // FIXME: The "color-changed" signal don't work in GTK3+ anymore. # ifdef SAFEMODE // if (func) # endif // g_signal_connect_after(dialog_data->operate[0], "color-activated", // G_CALLBACK(func), func_data); #endif #ifdef USE_OLD_GTK_COLOR_SELECTION dialog_data->operate[0] = gtk_color_selection_new(); // save the color data first gtk_color_selection_set_has_opacity_control(GTK_COLOR_CHOOSER(dialog_data->operate[0]), FALSE); gtk_color_selection_set_has_palette(GTK_COLOR_CHOOSER(dialog_data->operate[0]), FALSE); dialog_data->recover = FALSE; set_color_selection_colors(dialog_data->operate[0], &(dialog_data->original_color)); # ifdef SAFEMODE if (dialog_data->box!=NULL) # endif gtk_box_pack_start (GTK_BOX(dialog_data->box), dialog_data->operate[0], TRUE, TRUE, 0); # ifdef SAFEMODE if (func) # endif g_signal_connect_after(dialog_data->operate[0], "color-changed", G_CALLBACK(func), func_data); #endif } void set_color_selection_colors(GtkWidget *color_selection, GdkRGBA *color) { #ifdef SAFEMODE if (color_selection==NULL) return; #endif #ifdef USE_GTK_COLOR_CHOOSER gtk_color_chooser_set_rgba(GTK_COLOR_CHOOSER(color_selection), color); #else // set the previous/current color of GTK_COLOR_CHOOSER dialog gtk_color_selection_set_previous_rgba(GTK_COLOR_CHOOSER(color_selection), color); gtk_color_selection_set_current_rgba(GTK_COLOR_CHOOSER(color_selection), color); #endif } void create_scale_widget(struct Dialog *dialog_data, gdouble min, gdouble max, gdouble step, gdouble value, GSourceFunc func, gpointer func_data) { #ifdef DETAIL g_debug("! Launch create_scale_widget() with dialog_data = %p, min = %3f, max = %3f, step = %3f, value = %3f!", dialog_data, min, max, step, value); #endif #ifdef SAFEMODE if (dialog_data==NULL) return; #endif GtkWidget *hbox1 = dirty_gtk_hbox_new (FALSE, 0); #ifdef SAFEMODE if (dialog_data->box!=NULL) #endif gtk_box_pack_start (GTK_BOX(dialog_data->box), hbox1, FALSE, FALSE, 0); #ifdef SAFEMODE if ((min==max) || (step==0)) return; if (min>max) { gdouble tmp = max; max = min; min = tmp; } #endif dialog_data->operate[0] = gtk_hscale_new_with_range(min, max, step); gtk_widget_set_size_request(dialog_data->operate[0], 210, -1); gtk_range_set_value(GTK_RANGE(dialog_data->operate[0]), value); #ifdef SAFEMODE if (func) #endif g_signal_connect_after(dialog_data->operate[0], "change-value", G_CALLBACK(func), func_data); #ifdef SAFEMODE if (dialog_data->box!=NULL) #endif gtk_box_pack_start (GTK_BOX(dialog_data->box), dialog_data->operate[0], TRUE, TRUE, 0); GtkWidget *hbox2 = dirty_gtk_hbox_new (FALSE, 0); #ifdef SAFEMODE if (dialog_data->box!=NULL) #endif gtk_box_pack_end (GTK_BOX(dialog_data->box), hbox2, FALSE, FALSE, 0); } void create_SIGKILL_and_EXIT_widget(struct Dialog *dialog_data, gboolean create_entry_hbox, gboolean create_force_kill_hbox, gchar *count_str) { #ifdef DETAIL g_debug("! Launch create_SIGKILL_and_EXIT_widget() with dialog_data = %p, create_entry_hbox = %d, " "create_force_kill_hbox = %d, count_str = %s!", dialog_data, create_entry_hbox, create_force_kill_hbox, count_str); #endif #ifdef SAFEMODE if (dialog_data==NULL) return; #endif if (create_entry_hbox) { gchar *message = g_strdup_printf(_("Try to kill %s with SIGKILL() " "to avoid terminate those programs!\n" "(MAY CAUSE DATA LOSS!!)"), count_str); dialog_data->operate[1] = gtk_check_button_new_with_label(message); g_free(message); #ifdef SAFEMODE if (dialog_data->box!=NULL) #endif gtk_box_pack_start (GTK_BOX(dialog_data->box), dialog_data->operate[1], FALSE, FALSE, 0); set_widget_can_not_get_focus(dialog_data->operate[1]); } if (create_force_kill_hbox) { gchar *exit_str = g_strdup_printf(_("Force to close all the tabs and windows, and exit %s!"), PACKAGE); dialog_data->operate[0] = gtk_check_button_new_with_label(exit_str); g_free(exit_str); #ifdef SAFEMODE if (dialog_data->box!=NULL) #endif gtk_box_pack_start (GTK_BOX(dialog_data->box), dialog_data->operate[0], FALSE, FALSE, 0); set_widget_can_not_get_focus(dialog_data->operate[0]); } } // The returned string should be freed when no longer needed. gchar *get_colorful_profile(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch get_colorful_profile() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif gchar *profile; if (win_data->use_custom_profile) profile = g_strdup_printf("%s", win_data->profile); else profile = g_strdup_printf("%s/%s", profile_dir, USER_PROFILE); // g_debug("win_data->runtime_encoding = %s", win_data->runtime_encoding); // g_debug("profile = %s", profile); gchar *utf8_profile = convert_str_to_utf8(profile, win_data->runtime_encoding); g_free(profile); // g_debug("utf8_profile = %s", utf8_profile); return convert_text_to_html(&utf8_profile, TRUE, "blue", "b", NULL); } gboolean grab_key_press (GtkWidget *window, GdkEventKey *event, struct Dialog *dialog_data) { #ifdef DETAIL if (event) g_debug("! Launch grab_key_press() with key value = %d (%s)", event->keyval, gdk_keyval_name(event->keyval)); #endif #ifdef SAFEMODE if (event==NULL) return FALSE; #endif gchar *key_value = g_strdup(""); gint i=0; // FIXME: Be careful for the setted key value (GDK_Shift_L abd GDK_Hyper_R) here... for (i=0; istate & modkeys[i].mod) key_value = deal_dialog_key_press_join_string(&key_value, "+", modkeys[i].name); key_value = deal_dialog_key_press_join_string(&key_value, " ", gdk_keyval_name(event->keyval)); set_markup_key_value(TRUE, "blue", key_value, dialog_data->operate[0]); struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(real_menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data==NULL) continue; #endif // g_debug("Send key %s to vte %p!!", key_value, page_data->vte); // gtk_test_widget_send_key (page_data->vte, event->keyval, event->state); gtk_widget_event(page_data->vte, (GdkEvent *)event); } g_free(key_value); return TRUE; } gboolean deal_dialog_key_press(GtkWidget *window, GdkEventKey *event, struct Dialog *dialog_data) { #ifdef DETAIL if (event) g_debug("! Launch deal_dialog_key_press() with key value = %s", gdk_keyval_name(event->keyval)); #endif #ifdef SAFEMODE if ((dialog_data==NULL) || (event==NULL)) return FALSE; #endif if (dialog_data->current_key_index < 0) return FALSE; gchar *key_value = g_strdup(""); gint i=0; // FIXME: Be careful for the setted key value (GDK_Shift_L abd GDK_Hyper_R) here... if (((event->state & SHIFT_ONLY_MASK) || (event->keyval > GDK_KEY_asciitilde)) && ((event->keyval < GDK_KEY_Shift_L) || (event->keyval > GDK_KEY_Hyper_R))) { for (i=0; istate & modkeys[i].mod) key_value = deal_dialog_key_press_join_string(&key_value, "+", modkeys[i].name); } g_free(dialog_data->user_key_value[dialog_data->current_key_index]); gboolean key_value_need_free = FALSE; #ifdef SAFEMODE if ((key_value && (key_value[0]!='\0')) || ((event->keyval >= GDK_KEY_F1) && (event->keyval <= GDK_KEY_F12)) || (event->keyval == GDK_KEY_Menu) || (event->keyval == GDK_KEY_Super_L) || (event->keyval == GDK_KEY_Super_R)) #else if (key_value[0]!='\0' || ((event->keyval >= GDK_KEY_F1) && (event->keyval <= GDK_KEY_F12)) || (event->keyval == GDK_KEY_Menu) || (event->keyval == GDK_KEY_Super_L) || (event->keyval == GDK_KEY_Super_R)) #endif { gint keyval = event->keyval; // Trying to show "Ctrl T" instead of "Ctrl t" if ((keyval>=GDK_KEY_a) && (keyval<=GDK_KEY_z)) keyval = keyval - GDK_KEY_a + GDK_KEY_A; key_value = deal_dialog_key_press_join_string(&key_value, " ", gdk_keyval_name(keyval)); gboolean duplicated = FALSE; // Check if the key is duplicated for (i=0; icurrent_key_index) && (compare_strings(key_value, dialog_data->user_key_value[i], FALSE) == FALSE)) { duplicated = TRUE; g_free(key_value); dialog_data->user_key_value[dialog_data->current_key_index] = g_strdup(""); key_value_need_free = TRUE; key_value = g_strdup_printf(_("(Disabled, duplicated with [%s])"), system_keys[i].topic); } } if (! duplicated) dialog_data->user_key_value[dialog_data->current_key_index] = key_value; } else { dialog_data->user_key_value[dialog_data->current_key_index] = key_value; key_value = _("(Disabled)"); } // g_debug("Got function key = %s, and event->keyval = %X (%s)", // key_value, event->keyval, gdk_keyval_name(event->keyval)); set_markup_key_value(TRUE, "blue", key_value, dialog_data->operate[2]); GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(dialog_data->treeview)); GtkTreeSelection *treeselection = gtk_tree_view_get_selection (GTK_TREE_VIEW(dialog_data->treeview)); GtkTreeIter iter; if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 1, dialog_data->user_key_value[dialog_data->current_key_index], -1); if (key_value_need_free) g_free(key_value); return TRUE; } void set_markup_key_value(gboolean bold, gchar *color, gchar *key_value, GtkWidget *label) { #ifdef DETAIL g_debug("! Launch set_markup_key_value() whith color = %s, key_value = %s, label = %p!", color, key_value, label); #endif #ifdef SAFEMODE if (label==NULL) return; #endif gchar *markup_text; if (bold) markup_text = convert_text_to_html (&key_value, FALSE, color, "b", NULL); else markup_text = convert_text_to_html (&key_value, FALSE, color, NULL); gtk_label_set_markup (GTK_LABEL (label), markup_text); g_free(markup_text); } // WARNING: The "key_value" will free() in deal_dialog_key_press_join_string() gchar *deal_dialog_key_press_join_string(StrAddr **key_value, gchar *separator, gchar *append) { #ifdef DETAIL g_debug("! Launch deal_dialog_key_press_join_string() with key_value = %s, separator = %s, append = %s", *key_value, separator, append); #endif #ifdef SAFEMODE if ((separator==NULL) || (append==NULL)) return *key_value; #endif gchar *join_string = NULL; #ifdef SAFEMODE if (*key_value && ((*key_value)[0]!='\0')) #else if ((*key_value)[0]!='\0') #endif join_string = g_strdup_printf("%s%s%s",*key_value, separator, append); else join_string = g_strdup(append); g_free(*key_value); #ifdef SAFEMODE *key_value = NULL; #endif return join_string; } #if defined(USE_GTK_COLOR_CHOOSER) || defined(UNIT_TEST) void adjust_vte_color_sample(GtkColorButton* color_button, gint color_index) { # ifdef DETAIL g_debug("! Launch adjust_vte_color_sample() with color_button = %p, color_index = %d", color_button, color_index); # endif # ifdef SAFEMODE if (color_button==NULL) return; # endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(real_menu_active_window), "Win_Data"); win_data->temp_index = get_color_index(win_data->invert_color, color_index); GdkRGBA color; // gtk_color_button_get_rgba(GTK_COLOR_BUTTON(color_button), &color); gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(color_button), &color); adjust_vte_color(NULL, &color, win_data->current_vte); } #endif // ** README ** : GTK2+: #define adjust_vte_color(x,y,z) adjust_vte_color(x,z) void adjust_vte_color(GtkColorChooser *color_selection, GdkRGBA *color, GtkWidget *vte) { #ifdef DETAIL g_debug("! Launch adjust_vte_color() with color_selection = %p, color = %p, vte = %p", color_selection, color, vte); #endif #ifdef SAFEMODE if (vte==NULL) return; #endif GdkRGBA final_color; #ifdef USE_OLD_GTK_COLOR_SELECTION if (color_selection) gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(color_selection), &final_color); #else if (color==NULL) gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(color_selection), &final_color); else final_color=*color; #endif // g_debug("Changing the color for vte %p", vte); struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); // g_debug("Get dialog_data = %p", dialog_data); #ifdef SAFEMODE if (dialog_data==NULL) return; #endif switch (dialog_data->type) { case CHANGE_THE_FOREGROUND_COLOR: case CHANGE_THE_BACKGROUND_COLOR: case CHANGE_THE_ANSI_COLORS: { #ifdef SAFEMODE if (vte==NULL) return; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif gint converted_index = get_color_index(win_data->invert_color, win_data->temp_index); // g_debug("adjust_vte_color(): win_data->temp_index = %d, converted_index = %d", win_data->temp_index, converted_index); if ((dialog_data->type==CHANGE_THE_FOREGROUND_COLOR) || ((dialog_data->type==CHANGE_THE_ANSI_COLORS) && (converted_index==(COLOR-1)))) { // print_color(-1, "RECONVER 1: final_color", final_color); if (dialog_data->recover) final_color = dialog_data->original_color; // print_color(-1, "RECONVER 2: final_color", final_color); vte_terminal_set_color_foreground_rgba(VTE_TERMINAL(vte), &(final_color)); vte_terminal_set_color_bold_rgba(VTE_TERMINAL(vte), &(final_color)); if (dialog_data->type==CHANGE_THE_ANSI_COLORS) { dialog_data->ansi_colors[converted_index] = final_color; dialog_data->ansi_colors_orig[win_data->temp_index] = final_color; } } else if ((dialog_data->type==CHANGE_THE_BACKGROUND_COLOR) || ((dialog_data->type==CHANGE_THE_ANSI_COLORS) && (converted_index==0))) { if (dialog_data->recover) { final_color = dialog_data->original_color; // FIXME: GtkColorSelection have no ALPHA CHANGED signal. // so that the following code should be marked for temporary //if (use_rgba) //{ // gint alpha = gtk_color_selection_get_current_alpha(colorselection); // g_debug("Current alpha = %d", alpha); // vte_terminal_set_opacity(VTE_TERMINAL(vte), alpha); // vte_terminal_set_background_saturation( VTE_TERMINAL(vte), 1-alpha/65535); //} } //else if (use_rgba) // set_background_saturation(NULL, 0, background_saturation, vte); vte_terminal_set_color_background_rgba(VTE_TERMINAL(vte), &(final_color)); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) dirty_vte_terminal_set_background_tint_color(VTE_TERMINAL(vte), final_color); #endif if (dialog_data->type==CHANGE_THE_ANSI_COLORS) { dialog_data->ansi_colors[converted_index] = final_color; dialog_data->ansi_colors_orig[win_data->temp_index] = final_color; } } else // dialog_data->type==CHANGE_THE_ANSI_COLORS && (! fg_color) && (! bg_color) { // win_data->temp_index == -1: update_ansi_color_info() is called. if (win_data->temp_index > -1) { GdkRGBA tmp_color; #ifdef USE_OLD_GTK_COLOR_SELECTION gtk_color_chooser_get_rgba(color_selection, &tmp_color); #else tmp_color = final_color; #endif // g_debug("adjust_vte_color(): update the %d color of colors_orig", win_data->temp_index); dialog_data->ansi_colors_orig[win_data->temp_index] = tmp_color; adjust_ansi_color(&dialog_data->ansi_colors[get_color_index(win_data->invert_color, win_data->temp_index)], &dialog_data->ansi_colors_orig[win_data->temp_index], win_data->color_brightness); set_vte_color(win_data->current_vte, FALSE, win_data->custom_cursor_color, win_data->cursor_color, dialog_data->ansi_colors, FALSE, FALSE); // set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, dialog_data->ansi_colors_orig, // win_data->color_brightness, win_data->invert_color, FALSE, win_data->cursor_color); } } break; } case CHANGE_THE_CURSOR_COLOR: { #ifdef SAFEMODE if (vte==NULL) return; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif #ifdef USE_OLD_GTK_COLOR_SELECTION // [Cancel] is pressed [OK] is pressed if ((dialog_data->recover) || (color_selection==NULL)) final_color = win_data->cursor_color; else win_data->custom_cursor_color = TRUE; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog_data->custom_cursor_color_checkbox), ! win_data->custom_cursor_color); #endif enable_custom_cursor_color(vte, win_data->custom_cursor_color, &(final_color)); break; } case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: { // the change of color will be shown(demo) in 1st page and demo page. gchar *current_color = NULL; #ifdef ENABLE_GDKCOLOR_TO_STRING current_color = dirty_gdk_rgba_to_string(&(final_color)); #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if (page_data) #endif update_page_name(page_data->window, vte, NULL, page_data->label_text, 1, _("Bold Demo Text"), current_color, FALSE, TRUE, FALSE, NULL, page_data->custom_window_title, FALSE); page_data = (struct Page *)g_object_get_data(G_OBJECT(dialog_data->demo_vte), "Page_Data"); #ifdef SAFEMODE if (page_data) #endif update_page_name(page_data->window, dialog_data->demo_vte, NULL, page_data->label_text, page_data->page_no+1, dialog_data->demo_text, current_color, FALSE, FALSE, FALSE, NULL, page_data->custom_window_title, FALSE); g_free(current_color); break; } default: #ifdef FATAL print_switch_out_of_range_error_dialog("adjust_vte_color", "dialog_data->type", dialog_data->type); #endif break; } } void recover_page_colors(GtkWidget *dialog_window, GtkWidget *window, GtkWidget *notebook) { #ifdef DETAIL g_debug("! Launch recover_page_colors() in window %p", window); #endif #ifdef SAFEMODE if ((dialog_window==NULL) || (window==NULL)) return; #endif struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(window), "Win_Data"); #ifdef SAFEMODE if ((dialog_data==NULL) || (win_data==NULL)) return; #endif gint i; struct Page *page_data = NULL; // g_debug("page_cmdline_color = %s", win_data->page_cmdline_color); // g_debug("page_dir_color = %s", win_data->page_dir_color); // g_debug("page_custom_color = %s", win_data->page_custom_color); // g_debug("page_root_color = %s", win_data->page_root_color); // g_debug("page_normal_color = %s", win_data->page_normal_color); // delete the tab that we add when demo win_data->kill_color_demo_vte = TRUE; for (i=PAGE_COLOR; i>=dialog_data->total_page; i--) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif close_page (page_data->vte, CLOSE_WITH_WINDOW_CLOSE_BUTTON); } win_data->kill_color_demo_vte = FALSE; // reset to the current page #ifdef SAFEMODE if (notebook) #endif gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), dialog_data->current_page_no); // recover the title/color of pages for (i=0; itotal_page; i++) { page_data = get_page_data_from_nth_page(win_data, i); // restore the is_bold of 1st page // g_debug("i = %d", i); if (i==0) page_data->is_bold = dialog_data->tab_1_is_bold; // g_debug("Launch get_and_update_page_name() in recover_page_colors() for %d page!", i); // g_debug("page_data->page_update_method = %d", page_data->page_update_method); if (i <= PAGE_COLOR) page_data->page_update_method = dialog_data->original_update_method[i]; if (page_data->page_update_method == PAGE_METHOD_WINDOW_TITLE) page_data->window_title_updated = 1; get_and_update_page_name(page_data, FALSE); } } gboolean check_and_add_locale_to_warned_locale_list(struct Window *win_data, gchar *new_locale) { #ifdef DETAIL g_debug("! Launch check_and_add_locale_to_warned_locale_list() with win_data = %p, new_locale = %s!", win_data, new_locale); #endif #ifdef SAFEMODE if ((win_data==NULL) || (new_locale==NULL) || (win_data->warned_locale_list == NULL) || (win_data->warned_locale_list->str == NULL)) return TRUE; #endif gchar *check_locale = g_strdup_printf(" %s ", new_locale); #ifdef SAFEMODE if (check_locale==NULL) return TRUE; #endif gboolean response = TRUE; // g_debug("check_and_add_locale_to_warned_locale_list(): win_data->warned_locale_list = %p", // win_data->warned_locale_list); // g_debug("check_and_add_locale_to_warned_locale_list(): Checking '%s' in '%s'...", // check_locale, win_data->warned_locale_list->str); if (strstr(win_data->warned_locale_list->str, check_locale)) response = FALSE; else g_string_append_printf(win_data->warned_locale_list, "%s ", new_locale); g_free(check_locale); return response; } void create_invalid_locale_error_message(gchar *locale) { #ifdef DETAIL g_debug("! Launch create_invalid_locale_error_message() with locale = %s!", locale); #endif gchar *color_locale = convert_text_to_html(&locale, FALSE, "darkblue", "b", NULL); gchar *err_msg = g_strdup_printf(_("The locale \"%s\" seems NOT supported by your system!\n" "If you just added the locale datas recently,\n" "Please close all the windows of %s and try again."), color_locale, PACKAGE); error_dialog(NULL, _("Not supported locale!"), "Not supported locale!", GTK_FAKE_STOCK_DIALOG_WARNING, err_msg, NULL); g_free(color_locale); g_free(err_msg); } // 1. real_menu_active_window = NULL // 2. Not supported feature // 3. The format of socket data is out of date // 4. The following settings can NOT be applied // 5. Not supported locale! // 6. Error when creating child process // 7. Error when writing profile // 8. The format of your profile is out of date // 9. The profile is invalid void error_dialog(GtkWidget *window, gchar *title_translation, gchar *title, gchar *icon, gchar *message, gchar *encoding) { #ifdef DETAIL g_debug("! Launch error_dialog() with window = %p, title = %s, icon = %s, message = %s, encodig = %s", window, title, icon, message, encoding); #endif dialog_activated++; // g_debug("Set dialog_activated = %d", dialog_activated); gchar *utf8_message = convert_str_to_utf8(message, encoding); #ifdef UNIT_TEST g_message("%s", utf8_message); #else struct Dialog *dialog_data = g_new0(struct Dialog, 1); // void create_dialog(gchar *dialog_title, Dialog_Button_Type type, GtkWidget *window, gboolean center, // gboolean resizable, gint border_width, gint response, gchar *icon, // gchar *title, gboolean selectable, gint max_width_chars, // gboolean state_bottom, gint create_entry_hbox, struct Dialog *dialog_data) create_dialog(title_translation, title, DIALOG_OK, window, TRUE, FALSE, 10, GTK_RESPONSE_OK, icon, utf8_message, FALSE, 0, TRUE, BOX_NONE, 0, dialog_data); gtk_widget_show_all (dialog_data->window); gtk_dialog_run(GTK_DIALOG(dialog_data->window)); gtk_widget_destroy(dialog_data->window); g_free(dialog_data); #endif g_free(utf8_message); dialog_activated--; // g_debug("Set dialog_activated = %d", dialog_activated); } #ifdef FATAL void print_switch_out_of_range_error_dialog(gchar *function, gchar *var, gint value) { gchar *err_msg = g_strdup_printf("%s(): the var \"%s\" (%d) is out of range\n\n" "Please report bug to %s, Thanks!", function, var, value, BUGREPORT); #ifdef SAFEMODE if (err_msg) #endif error_dialog(NULL, _("The following error occurred:"), "The following error occurred:", GTK_FAKE_STOCK_DIALOG_ERROR, err_msg, NULL); g_free(err_msg); } #endif gboolean upgrade_dialog(gchar *version_str) { #ifdef DETAIL g_debug("! Launch upgrade_dialog() with version_str = %s", version_str); #endif gchar *err_msg = g_strdup_printf(_("You should upgrade to %s and recompile %s to support this feature."), version_str, PACKAGE); error_dialog(NULL, _("Not supported feature!"), "Not supported feature!", GTK_FAKE_STOCK_DIALOG_WARNING, err_msg, NULL); g_free(err_msg); return FALSE; } gboolean set_ansi_color(GtkRange *range, GtkScrollType scroll, gdouble value, GtkWidget *vte) { #ifdef DETAIL g_debug("! Launch set_ansi_color() with range = %p, scroll = %u, value = %f, vte = %p", range, scroll, value, vte); #endif #ifdef SAFEMODE if (vte==NULL) return FALSE; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return FALSE; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif value = CLAMP(value, -1, 1); win_data->color_brightness = value; // g_debug("set_ansi_color(): win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); struct Dialog *dialog_data = (struct Dialog *)g_object_get_data(G_OBJECT(real_menu_active_window), "Dialog"); #ifdef SAFEMODE if (dialog_data==NULL) return FALSE; #endif // We will not adject the value of fg_color // win_data->fg_color = get_inactive_color(dialog_data->original_fg_color, // win_data->color_brightness, // dialog_data->original_color_brightness); gboolean dim_fg_color = (dialog_data->type==ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE) ? TRUE : FALSE; set_new_ansi_color(win_data->current_vte, dialog_data->ansi_colors, dialog_data->ansi_colors_orig, win_data->color_brightness, win_data->invert_color, FALSE, win_data->custom_cursor_color, win_data->cursor_color, dim_fg_color); return FALSE; } GdkRGBA get_inactive_color(GdkRGBA original_fg_color, gdouble new_brightness, gdouble old_brightness) { #ifdef DETAIL g_debug("! Launch get_inactive_color() with new_brightness = %3f, " "old_brightness = %3f!", new_brightness, old_brightness); #endif GdkRGBA inactive_color; if (new_brightness < old_brightness) adjust_ansi_color(&inactive_color, &(original_fg_color), (new_brightness - old_brightness) / (1 + old_brightness)); else adjust_ansi_color(&inactive_color, &(original_fg_color), (new_brightness - old_brightness) / (1 - old_brightness)); return inactive_color; } void set_new_ansi_color(GtkWidget *vte, GdkRGBA color[COLOR], GdkRGBA color_orig[COLOR], gdouble color_brightness, gboolean invert_color, gboolean default_vte_color, gboolean custom_cursor_color, GdkRGBA cursor_color, gboolean dim_fg_color) { #ifdef DETAIL g_debug("! Launch set_new_ansi_color() with vte = %p, color_brightness = %3f, invert_color = %d, default_vte_color = %d", vte, color_brightness, invert_color, default_vte_color); #endif #ifdef SAFEMODE if ((vte==NULL) || (color_orig==NULL) || (color==NULL)) return; #endif create_theme_color_data(color, color_orig, color_brightness, invert_color, default_vte_color, dim_fg_color); set_vte_color(vte, default_vte_color, custom_cursor_color, cursor_color, color, FALSE, FALSE); } void hide_combo_box_capital(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data) { #ifdef DETAIL g_debug("! Launch hide_combo_box_capital() with cell_layout = %p, cell = %p, tree_model = %p, iter = %p!", cell_layout, cell, tree_model, iter); #endif #ifdef SAFEMODE if ((tree_model==NULL) || (iter==NULL)) return; #endif g_object_set (cell, "sensitive", !gtk_tree_model_iter_has_child(tree_model, iter), NULL); } void update_key_info (GtkTreeSelection *treeselection, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch update_key_info() with treeselection = %p, dialog_data = %p!", treeselection, dialog_data); #endif #ifdef SAFEMODE if ((dialog_data==NULL) || (treeselection==NULL)) return; #endif GtkTreeIter iter; GtkTreeModel *model = gtk_tree_view_get_model(gtk_tree_selection_get_tree_view(GTK_TREE_SELECTION (treeselection))); GtkTreePath *path = NULL; gchar *string = NULL; gchar **indices = NULL; if (gtk_tree_selection_get_selected (treeselection, &model, &iter)) { gtk_widget_set_no_show_all (dialog_data->operate[3], FALSE); gtk_widget_show_all (dialog_data->operate[3]); path = gtk_tree_model_get_path(model, &iter); string = gtk_tree_path_to_string (path); // g_debug ("update_key_info(): got string = %s", string); indices = split_string(string, ":", -1); #ifdef SAFEMODE if (indices) { #endif if (indices[0]==NULL) goto FINISH; if (indices[1]==NULL) { dialog_data->current_key_index = -1; set_markup_key_value(TRUE, "dark green", "", dialog_data->operate[1]); set_markup_key_value(TRUE, "blue", "", dialog_data->operate[2]); } else { dialog_data->current_key_index = dialog_data->KeyTree[atoi(indices[0])][atoi(indices[1])]; // g_debug("KeyTree[%d][%d] = %d", // atoi(indices[0]), atoi(indices[1]), dialog_data->current_key_index); set_markup_key_value(TRUE, "dark green", system_keys[dialog_data->current_key_index].translation, dialog_data->operate[1]); // g_debug("dialog_data->current_key_index = %d, " // "dialog_data->user_key_value[dialog_data->current_key_index] = %s", // dialog_data->current_key_index, // dialog_data->user_key_value[dialog_data->current_key_index]); gchar *user_key_value = dialog_data->user_key_value[dialog_data->current_key_index]; if ((user_key_value==NULL) || (user_key_value[0]=='\0')) user_key_value = _("(Disabled)"); set_markup_key_value(TRUE, "blue", user_key_value, dialog_data->operate[2]); } gchar *group_name = key_groups[atoi(indices[0])]; set_markup_key_value(TRUE, NULL, group_name, dialog_data->operate[0]); gchar *disable_text = g_strdup_printf(_("Disable all the function keys of [%s] group."), group_name); gtk_button_set_label(GTK_BUTTON(dialog_data->operate[3]), disable_text); g_free(disable_text); #ifdef SAFEMODE } #endif } FINISH: if (path) gtk_tree_path_free(path); if (string) g_free(string); if (indices) g_strfreev(indices); return; } void clear_key_groups(struct Dialog *dialog_data, gboolean clear_all) { #ifdef DETAIL g_debug("! Launch clear_key_groups() with dialog_data = %p, clear_all = %d!", dialog_data, clear_all); #endif #ifdef SAFEMODE if ((dialog_data==NULL) || (dialog_data->treeview==NULL))return; #endif GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(dialog_data->treeview)); GtkTreeSelection *treeselection = gtk_tree_view_get_selection (GTK_TREE_VIEW(dialog_data->treeview)); GtkTreeIter iter_child; gint current_key_group = -1; if (dialog_data->current_key_index > -1) current_key_group = system_keys[dialog_data->current_key_index].group; gboolean iter_is_child = FALSE; GtkTreeIter iter, iter_parent; if (gtk_tree_selection_get_selected (treeselection, &model, &iter_child)) // theck if the selected item is "group" or "key" iter_is_child = gtk_tree_model_iter_parent (model, &iter_parent, &iter_child); else // if nothing is selected, return! if (clear_all == FALSE) return; if (iter_is_child) set_markup_key_value(TRUE, "blue", _("(Disabled)"), dialog_data->operate[2]); else set_markup_key_value(TRUE, "blue", "", dialog_data->operate[2]); if (clear_all) // call clean_model_foreach for each entry gtk_tree_model_foreach(model, clean_model_foreach, NULL); else { // if the selected item is "group"... if (! iter_is_child) { iter_parent = iter_child; // Trying to find out 'dialog_data->current_key_index' GtkTreePath *path = gtk_tree_model_get_path(model, &iter_child); gchar *string = gtk_tree_path_to_string (path); // g_debug ("update_key_info(): got string = %s", string); current_key_group = atoi(string); gtk_tree_path_free(path); g_free(string); } gint i, child = gtk_tree_model_iter_n_children (model, &iter_parent); // clear entries of the group for (i=0; i< child; i++) { if (gtk_tree_model_iter_nth_child (model, &iter, &iter_parent, i)) gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 1, "", -1); #ifdef SAFEMODE else break; #endif } } #ifdef SAFEMODE // it should be happen... if ((clear_all== FALSE) && (current_key_group < 0)) return; #endif gint i; for (i=0; iuser_key_value[i]); dialog_data->user_key_value[i] = g_strdup(""); } } } gboolean clean_model_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer userdata) { #ifdef DETAIL g_debug("! Launch clean_model_foreach() with model= %p, path = %p, iter = %p!", model, path, iter); #endif #ifdef SAFEMODE if (model==NULL) return FALSE; #endif if (gtk_tree_model_iter_has_child (model, iter) == FALSE) gtk_tree_store_set (GTK_TREE_STORE (model), iter, 1, "", -1); return FALSE; } void clear_key_group(GtkButton *button, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch clear_key_group() with button = %p, dialog_data = %p!", button, dialog_data); #endif clear_key_groups(dialog_data, FALSE); } void clear_key_group_all(GtkButton *button, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch clear_key_group_all() with button = %p, dialog_data = %p!", button, dialog_data); #endif clear_key_groups(dialog_data, TRUE); } GtkWidget *add_text_to_notebook(GtkWidget *notebook, const gchar *label, const gchar *stock_id, const gchar *text) { #ifdef DETAIL g_debug("! Launch add_text_to_notebook() with notebook = %p, label = %s, stock_id = %s, text = %s", notebook, label, stock_id, text); #endif #ifdef SAFEMODE if (notebook==NULL) return NULL; #endif GtkWidget *text_label = create_label_with_text(NULL, TRUE, TRUE, 0, text); #ifdef SAFEMODE if (text_label==NULL) return NULL; #endif set_widget_can_not_get_focus(text_label); GtkWidget *hbox = dirty_gtk_hbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(hbox), 10); gtk_box_pack_start(GTK_BOX(hbox), text_label, TRUE, TRUE, 0); GtkWidget *label_hbox = dirty_gtk_hbox_new(FALSE, 0); set_widget_thickness(label_hbox, 0); GtkWidget *image = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU); gtk_box_pack_start(GTK_BOX(label_hbox), image, FALSE, FALSE, 0); GtkWidget *label_text = gtk_label_new(label); gtk_box_pack_start(GTK_BOX(label_hbox), label_text, TRUE, TRUE, 0); gtk_widget_show_all(label_hbox); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), hbox, label_hbox); return text_label; } void show_usage_text(GtkWidget *notebook, gpointer page, guint page_num, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch show_usage_text() with notebook = %p, page = %p, page_num = %d, dialog_data = %p", notebook, page, page_num, dialog_data); #endif #ifdef SAFEMODE if (dialog_data==NULL) return; #endif gint i; for (i=0; i<5; i++) { #ifdef SAFEMODE if (dialog_data->operate[i]==NULL) continue; #endif if (i==page_num) gtk_widget_set_no_show_all(dialog_data->operate[i], FALSE); else { gtk_widget_set_no_show_all(dialog_data->operate[i], TRUE); gtk_widget_hide(dialog_data->operate[i]); } } #ifdef SAFEMODE if (dialog_data->window) #endif gtk_widget_show_all(dialog_data->window); } //void err_page_data_is_null(gchar *function_name) //{ // gchar *err_msg = g_strdup_printf("%s: page_data = NULL\n\n" // "Please report bug to %s, Thanks!", // function_name, // BUGREPORT); // error_dialog(NULL, err_msg, NULL, ERROR_MESSAGES); //#ifdef DETAIL // g_debug("* free err_msg %p (%s) in set_encoding()", err_msg, err_msg); //#endif // g_free(err_msg); //} void create_dialog(gchar *dialog_title_translation, gchar *dialog_title, Dialog_Button_Type type, GtkWidget *window, gboolean center, gboolean resizable, gint border_width, gint response, gchar *icon, gchar *title, gboolean selectable, gint max_width_chars, gboolean state_bottom, gint create_entry_hbox, gint entry_hbox_spacing, struct Dialog *dialog_data) { #ifdef DETAIL g_debug("! Launch create_dialog() with dialog_title_translation = %s, " "dialog_title = %s, type = %d, window = %p, center = %d, resizable = %d, " "border_width = %d, response = %d, icon = %s, title = %s, selectable = %d, " "max_width_chars = %d, state_bottom = %d, create_entry_hbox = %d, dialog_data = %p", dialog_title_translation, dialog_title, type, window, center, resizable, border_width, response, icon, title, selectable, max_width_chars, state_bottom, create_entry_hbox, dialog_data); #endif #ifdef SAFEMODE if (dialog_data==NULL) return; #endif #ifdef USE_GTK_COLOR_CHOOSER switch (dialog_data->type) { case CHANGE_THE_FOREGROUND_COLOR: case CHANGE_THE_BACKGROUND_COLOR: case CHANGE_THE_CURSOR_COLOR: case CHANGE_THE_TEXT_COLOR_OF_WINDOW_TITLE: case CHANGE_THE_TEXT_COLOR_OF_CMDLINE: case CHANGE_THE_TEXT_COLOR_OF_CURRENT_DIR: case CHANGE_THE_TEXT_COLOR_OF_CUSTOM_PAGE_NAME: case CHANGE_THE_TEXT_COLOR_OF_ROOT_PRIVILEGES_CMDLINE: case CHANGE_THE_TEXT_COLOR_OF_NORMAL_TEXT: return; } #endif gboolean BOTTON_ORDER = gtk_alternative_dialog_button_order(NULL); // g_debug("gtk_alternative_dialog_button_order = %d" ,gtk_alternative_dialog_button_order (NULL)); // Strange behavior, If the locale is empty, or setted to 'C' or 'POSIX', // And 'default_locale' is setted in the profile, // All the UI will be translated to default_locale, // But the window title will be empty. // So, set it to un-translated string here. // g_debug("init_LC_CTYPE = %s", init_LC_CTYPE); if ((init_LC_CTYPE==NULL) || (init_LC_CTYPE[0]=='\0') || (! compare_strings(init_LC_CTYPE, "C", TRUE)) || (! compare_strings(init_LC_CTYPE, "\"C\"", TRUE)) || (! compare_strings(init_LC_CTYPE, "POSIX", TRUE)) || (! compare_strings(init_LC_CTYPE, "\"POSIX\"", TRUE))) dialog_title_translation = dialog_title; // g_debug("dialog_title_translation = %s", dialog_title_translation); switch (type) { case DIALOG_OK: dialog_data->window = gtk_dialog_new_with_buttons (dialog_title_translation, GTK_WINDOW(window), #ifdef EXIST_GTK_DIALOG_NO_SEPARATOR GTK_DIALOG_NO_SEPARATOR | #endif GTK_DIALOG_DESTROY_WITH_PARENT, GTK_FAKE_STOCK_OK, GTK_RESPONSE_OK, NULL); break; case DIALOG_OK_CANCEL: if (BOTTON_ORDER) dialog_data->window = gtk_dialog_new_with_buttons (dialog_title_translation, GTK_WINDOW(window), #ifdef EXIST_GTK_DIALOG_NO_SEPARATOR GTK_DIALOG_NO_SEPARATOR | #endif GTK_DIALOG_DESTROY_WITH_PARENT, GTK_FAKE_STOCK_OK, GTK_RESPONSE_OK, GTK_FAKE_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); else dialog_data->window = gtk_dialog_new_with_buttons (dialog_title_translation, GTK_WINDOW(window), #ifdef EXIST_GTK_DIALOG_NO_SEPARATOR GTK_DIALOG_NO_SEPARATOR | #endif GTK_DIALOG_DESTROY_WITH_PARENT, GTK_FAKE_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_FAKE_STOCK_OK, GTK_RESPONSE_OK, NULL); break; case DIALOG_QUIT: dialog_data->window = gtk_dialog_new_with_buttons (dialog_title_translation, GTK_WINDOW(window), #ifdef EXIST_GTK_DIALOG_NO_SEPARATOR GTK_DIALOG_NO_SEPARATOR | #endif GTK_DIALOG_DESTROY_WITH_PARENT, GTK_FAKE_STOCK_QUIT, GTK_RESPONSE_CANCEL, NULL); break; case DIALOG_NONE: dialog_data->window = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog_data->window), dialog_title_translation); gtk_window_set_transient_for (GTK_WINDOW(dialog_data->window), GTK_WINDOW(window)); #ifdef EXIST_GTK_DIALOG_NO_SEPARATOR gtk_dialog_set_has_separator(GTK_DIALOG(dialog_data->window), FALSE); #endif gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog_data->window), TRUE); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("create_dialog", "type", type); #endif return; } // FIXME: It may be a bug in gtk+2? // if a dialog shown before main window is shown, // destroy the dialog will destroy the data of the icon, too. // and when showing main window with gtk_widget_show_all(win_data->window) later, // It will have no icon, and showing following error: // Gtk-CRITICAL **: gtk_window_realize_icon: assertion `info->icon_pixmap == NULL' failed // So, we need to set the icon for the dialog here. set_window_icon(dialog_data->window); if (center) gtk_window_set_position (GTK_WINDOW (dialog_data->window), GTK_WIN_POS_CENTER); gtk_window_set_resizable (GTK_WINDOW (dialog_data->window), resizable); gtk_container_set_border_width (GTK_CONTAINER (dialog_data->window), border_width); gtk_dialog_set_default_response(GTK_DIALOG(dialog_data->window), response); GtkWidget *main_hbox = dirty_gtk_hbox_new (FALSE, 5); gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(dialog_data->window))), main_hbox); GtkWidget *main_right_vbox = dirty_gtk_vbox_new (FALSE, 0); gtk_box_pack_end (GTK_BOX(main_hbox), main_right_vbox, FALSE, FALSE, 0); if (icon) { GtkWidget *icon_vbox = dirty_gtk_vbox_new (FALSE, 30); gtk_box_pack_start (GTK_BOX(main_hbox), icon_vbox, FALSE, FALSE, 10); GtkWidget *icon_image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_DIALOG); gtk_box_pack_start (GTK_BOX(icon_vbox), icon_image, FALSE, FALSE, 10); } GtkWidget *state_vbox =NULL; if (title) state_vbox = dirty_gtk_vbox_new (FALSE, 15); else state_vbox = dirty_gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX(main_hbox), state_vbox, TRUE, TRUE, 0); if (title) dialog_data->title_label = create_label_with_text(state_vbox, TRUE, selectable, max_width_chars, title); if (state_bottom) { GtkWidget *state_bottom_hbox = dirty_gtk_hbox_new (FALSE, 3); gtk_box_pack_end (GTK_BOX(state_vbox), state_bottom_hbox, FALSE, FALSE, 0); } if (create_entry_hbox) { switch (create_entry_hbox) { case BOX_HORIZONTAL: dialog_data->box = dirty_gtk_hbox_new (FALSE, entry_hbox_spacing); break; case BOX_VERTICALITY: dialog_data->box = dirty_gtk_vbox_new (FALSE, entry_hbox_spacing); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("create_dialog", "create_entry_hbox", create_entry_hbox); #endif break; } if (title) gtk_box_pack_start (GTK_BOX(state_vbox), dialog_data->box, TRUE, TRUE, 10); else gtk_box_pack_start (GTK_BOX(state_vbox), dialog_data->box, TRUE, TRUE, 0); } } src/dialog.h000066400000000000000000000147561246562641500133050ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include // for L10n #include // for strlen() #include // for aoti() #include #include "lilyterm.h" typedef enum { DIALOG_OK, DIALOG_OK_CANCEL, DIALOG_QUIT, DIALOG_NONE, } Dialog_Button_Type; typedef enum { BOX_NONE, BOX_HORIZONTAL, BOX_VERTICALITY, } Box_Type; struct Dialog { GtkWidget *window; GtkWidget *operate[5]; GtkWidget *box; GtkWidget *title_label; #ifdef ENABLE_RGBA gboolean original_transparent_window; gdouble original_window_opacity; gdouble original_window_opacity_inactive; gboolean original_dim_window; #endif GtkWidget *custom_cursor_color_checkbox; gboolean original_custom_cursor_color; gboolean original_transparent_background; gboolean original_invert_color; gboolean original_have_custom_color; gboolean original_use_custom_theme; gdouble original_color_brightness; gdouble original_color_brightness_inactive; gboolean original_dim_text; gint original_update_method[PAGE_COLOR+1]; GtkWidget *ansi_table; GtkWidget *color_button[COLOR]; // For restore to original count of tabs when change the color of tab names. gint total_page; gint current_page_no; gboolean tab_1_is_bold; GtkWidget *treeview; gint KeyTree[KEYS][KEYS]; gint current_key_index; gchar *user_key_value[KEYS]; // ---- color datas ---- // the function type. gint type; gboolean recover; gchar *demo_text; GtkWidget *demo_vte; gchar *original_page_color; GdkRGBA original_color; // the color theme that will apply to current vte GdkRGBA ansi_colors_orig[COLOR]; GdkRGBA ansi_colors[COLOR]; gchar *original_custom_page_name; gboolean transparent_background; }; void init_dialog_ansi_colors_from_win_data(struct Window *win_data, struct Dialog *dialog_data); void update_fg_bg_color(struct Window *win_data, GdkRGBA color, gboolean update_fg); void clear_custom_colors_data(struct Window *win_data, gboolean update_fg); #if defined(USE_OLD_GTK_COLOR_SELECTION) || defined(UNIT_TEST) void update_custom_cursor_color(GtkWidget *menuitem, struct Window *win_data); #endif void dialog_invert_color_theme(GtkWidget *menuitem, struct Window *win_data); void update_color_buttons(struct Window *win_data, struct Dialog *dialog_data); void update_ansi_color_info(GtkWidget *button, gint color_index); GtkWidget *create_label_with_text(GtkWidget *box, gboolean set_markup, gboolean selectable, gint max_width_chars, const gchar *text); GtkWidget *add_secondary_button(GtkWidget *dialog, const gchar *text, gint response_id, const gchar *stock_id); void paste_text_to_vte_terminal(GtkWidget *widget, struct Dialog *dialog_data); void create_dialog(gchar *dialog_title_translation, gchar *dialog_title, Dialog_Button_Type type, GtkWidget *window, gboolean center, gboolean resizable, gint border_width, gint response, gchar *icon, gchar *title, gboolean selectable, gint max_width_chars, gboolean state_bottom, gint create_entry_hbox, gint entry_hbox_spacing, struct Dialog *dialog_data); void refresh_regex_settings(GtkWidget *widget, struct Window *win_data); void refresh_regex(struct Window *win_data, struct Dialog *dialog_data); void find_str(GtkWidget *widget, Dialog_Find_Type type); GtkWidget *create_entry_widget (GtkWidget *box, gchar *contents, gchar *name, gchar *default_value, gboolean activates_default); GtkWidget *create_frame_widget( struct Dialog *dialog_data, gchar *label, GtkWidget *label_widget, GtkWidget *child, guint padding); GtkWidget *create_button_with_image(gchar *label_text, const gchar *stock_id, gboolean set_tooltip_text, GSourceFunc func, gpointer func_data); void create_color_selection_widget(struct Dialog *dialog_data, GSourceFunc func, gpointer func_data); void set_color_selection_colors(GtkWidget *color_selection, GdkRGBA *color); void create_scale_widget(struct Dialog *dialog_data, gdouble min, gdouble max, gdouble step, gdouble value, GSourceFunc func, gpointer func_data); void create_SIGKILL_and_EXIT_widget(struct Dialog *dialog_data, gboolean create_entry_hbox, gboolean create_force_kill_hbox, gchar *count_str); gboolean grab_key_press (GtkWidget *window, GdkEventKey *event, struct Dialog *dialog_data); gboolean deal_dialog_key_press(GtkWidget *widget, GdkEventKey *event, struct Dialog *dialog_data); gchar *deal_dialog_key_press_join_string(StrAddr **value, gchar *separator, gchar *mask); gboolean clean_model_foreach(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer userdata); void recover_page_colors(GtkWidget *dialog, GtkWidget *window, GtkWidget *notebook); gboolean set_ansi_color(GtkRange *range, GtkScrollType scroll, gdouble value, GtkWidget *vte); #if defined(USE_GTK_COLOR_CHOOSER) || defined(UNIT_TEST) void adjust_vte_color_sample(GtkColorButton* color_button, gint color_index); #endif void adjust_vte_color(GtkColorChooser *colorselection, GdkRGBA *color, GtkWidget *vte); void set_new_ansi_color(GtkWidget *vte, GdkRGBA color_orig[COLOR], GdkRGBA color[COLOR], gdouble color_brightness, gboolean invert_color, gboolean default_vte_color, gboolean custom_cursor_color, GdkRGBA cursor_color, gboolean dim_fg_color); void hide_combo_box_capital(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data); void update_key_info (GtkTreeSelection *treeselection, struct Dialog *dialog_data); void clear_key_group(GtkButton *button, struct Dialog *dialog_data); void clear_key_group_all(GtkButton *button, struct Dialog *dialog_data); void clear_key_groups(struct Dialog *dialog_data, gboolean clear_all); GtkWidget *add_text_to_notebook(GtkWidget *notebook, const gchar *label, const gchar *stock_id, const gchar *text); void show_usage_text(GtkWidget *notebook, gpointer page, guint page_num, struct Dialog *dialog_data); // void err_page_data_is_null(gchar *function_name); src/font.c000066400000000000000000000410551246562641500127770ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "font.h" // extern GtkWidget *current_vte; extern GtkWidget *menu_active_window; void set_vte_font(GtkWidget *widget, Font_Set_Type type) { #ifdef DETAIL g_debug("! Launch set_vte_font() with type = %d", type); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif // GtkWidget *vte = current_vte; struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif GtkWidget *vte = win_data->current_vte; gchar *new_font_name = NULL; // type 0, FONT_RESET: reset current page's font size // type 1, FONT_INCREASE: increase current page's font size // type 2, FONT_DECREASE: decrease current page's font size // type 3, FONT_ZOOM_OUT: increase window size & font size for every vte // type 4, FONT_ZOOM_IN: decrease window size & font size for every vte // type 5, FONT_RESET_DEFAULT: reset window size & font size to default for every vte // type 6, FONT_RESET_SYSTEM: reset window size & font size to system for every vte // type 7, FONT_SET_TO_SELECTED: change every vte to the selected font name switch (type) { case FONT_RESET: // 0 // reset current page's font size new_font_name = get_resize_font(vte, FONT_NAME_RESTORE); reset_vte_size(vte, new_font_name, RESET_CURRENT_TAB_FONT); break; case FONT_INCREASE: // 1 // increase current page's font size new_font_name = get_resize_font(vte, FONT_NAME_INCREASE); reset_vte_size(vte, new_font_name, RESET_CURRENT_TAB_FONT); break; case FONT_DECREASE: // 2 // decrease current page's font size new_font_name = get_resize_font(vte, FONT_NAME_DECREASE); reset_vte_size(vte, new_font_name, RESET_CURRENT_TAB_FONT); break; case FONT_ZOOM_OUT: // 3 // increase window size & font size for every vte new_font_name = get_resize_font(vte, FONT_NAME_ZOOM_OUT); reset_vte_size(vte, new_font_name, RESET_ALL_TO_CURRENT_TAB); break; case FONT_ZOOM_IN: // 4 // decrease window size & font size for every vte new_font_name = get_resize_font(vte, FONT_NAME_ZOOM_IN); reset_vte_size(vte, new_font_name, RESET_ALL_TO_CURRENT_TAB); break; case FONT_RESET_DEFAULT: // 5 // reset window size & font size to default for every vte new_font_name = get_resize_font(vte, FONT_NAME_DEFAULT); reset_vte_size(vte, new_font_name, RESET_ALL_TO_DEFAULT); break; case FONT_RESET_SYSTEM: // 6 // reset window size & font size to system for every vte new_font_name = get_resize_font(vte, FONT_NAME_SYSTEM); reset_vte_size(vte, new_font_name, RESET_ALL_TO_SYSTEM); break; case FONT_SET_TO_SELECTED: // 7 // change every vte to the selected font name new_font_name = get_resize_font(vte, FONT_NAME_UPDATE); reset_vte_size(vte, new_font_name, RESET_ALL_TO_CURRENT_TAB); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("set_vte_font", "type", type); #endif break; } g_free(new_font_name); } // it will update the new_font_name and page_data->font_name gchar *get_resize_font(GtkWidget *vte, Font_Name_Type type) { #ifdef DETAIL g_debug("! Launch get_resize_font() for vte %p with type %d", vte, type); #endif #ifdef SAFEMODE if (vte==NULL) return NULL; #endif // we must insure that vte!=NULL struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return NULL; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif // g_debug("Get win_data = %d when get resize font!", win_data); // type 0, FONT_NAME_DEFAULT: restore font to default_font_name // type 1, FONT_NAME_SYSTEM: restore font to system_font_name // type 2, FONT_NAME_RESTORE: restore font to restore_font_name // type 3, FONT_NAME_UPDATE: do nothing but only update new_font_name // type 4, FONT_NAME_ZOOM_OUT: increase window by *1.1 or +1 // type 5, FONT_NAME_ZOOM_IN: decrease window by /1.1 or -1 // type 6, FONT_NAME_INCREASE: increase font by *1.1 or +1 // type 7, FONT_NAME_DECREASE: decrease font by /1.1 or -1 if (win_data->restore_font_name == NULL) { // win_data->restore_font_name = g_strdup(page_data->font_name); win_data->restore_font_name = g_strdup(win_data->default_font_name); // g_debug("Restore the font to %s!", win_data->restore_font_name); if (type==FONT_NAME_RESTORE) return g_strdup(page_data->font_name); } switch (type) { case FONT_NAME_DEFAULT: case FONT_NAME_SYSTEM: case FONT_NAME_RESTORE: g_free(page_data->font_name); break; default: break; } // we use font_size to save current font size // font_size = (the size in font_name) * PANGO_SCALE // if font_size == 0 -> use the data in font_name switch (type) { case FONT_NAME_DEFAULT: // restore font to default_font_name page_data->font_name = g_strdup(win_data->default_font_name); page_data->font_size = 0; break; case FONT_NAME_SYSTEM: // restore font to default_font_name page_data->font_name = g_strdup(SYSTEM_FONT_NAME); page_data->font_size = 0; break; case FONT_NAME_RESTORE: // restore font to default_font_name page_data->font_name = g_strdup(win_data->restore_font_name); page_data->font_size = 0; break; case FONT_NAME_UPDATE: break; case FONT_NAME_ZOOM_OUT: case FONT_NAME_ZOOM_IN: case FONT_NAME_INCREASE: case FONT_NAME_DECREASE: { #ifdef SAFEMODE if (page_data->font_name==NULL) break; #endif gint oldfontsize=0, fontsize=0; // g_debug("old font name: %s", page_data->font_name); PangoFontDescription *font_desc = pango_font_description_from_string( page_data->font_name); // increase/decrease font oldfontsize = (pango_font_description_get_size(font_desc)/PANGO_SCALE); if (page_data->font_size==0) page_data->font_size = pango_font_description_get_size(font_desc); switch (type) { // g_debug("window_resize_ratio = %f", win_data->window_resize_ratio); case FONT_NAME_ZOOM_OUT: if (win_data->window_resize_ratio) page_data->font_size = page_data->font_size * win_data->window_resize_ratio + 0.5; else page_data->font_size = page_data->font_size + PANGO_SCALE; break; case FONT_NAME_ZOOM_IN: if (win_data->window_resize_ratio) page_data->font_size = page_data->font_size / win_data->window_resize_ratio + 0.5; else page_data->font_size = page_data->font_size - PANGO_SCALE; break; case FONT_NAME_INCREASE: if (win_data->font_resize_ratio) page_data->font_size = page_data->font_size * win_data->font_resize_ratio + 0.5; else page_data->font_size = page_data->font_size + PANGO_SCALE; break; case FONT_NAME_DECREASE: if (win_data->font_resize_ratio) page_data->font_size = page_data->font_size / win_data->font_resize_ratio + 0.5; else page_data->font_size = page_data->font_size - PANGO_SCALE; break; default: break; } // g_debug("font_size = %d", page_data->font_size); fontsize = (page_data->font_size)/PANGO_SCALE; // to avoid the fontsize is unchanged or = 0 switch (type) { case FONT_NAME_ZOOM_OUT: case FONT_NAME_INCREASE: if (oldfontsize==fontsize) fontsize++; break; case FONT_NAME_ZOOM_IN: case FONT_NAME_DECREASE: if (oldfontsize==fontsize) fontsize--; if (fontsize<1) fontsize=1; break; default: break; } // g_debug("Trying to change the font size to %d.", fontsize); pango_font_description_set_size(font_desc, fontsize*PANGO_SCALE); g_free(page_data->font_name); page_data->font_name = pango_font_description_to_string(font_desc); pango_font_description_free(font_desc); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("get_resize_font", "type", type); #endif return NULL; } } // g_debug("new font name: %s", page_data->font_name); switch (type) { case FONT_NAME_DEFAULT: case FONT_NAME_SYSTEM: case FONT_NAME_UPDATE: case FONT_NAME_ZOOM_OUT: case FONT_NAME_ZOOM_IN: // if not using <+ - enter> to change the font size. g_free(win_data->restore_font_name); win_data->restore_font_name = g_strdup(page_data->font_name); break; case FONT_NAME_INCREASE: case FONT_NAME_DECREASE: // Check if we can specify page_data->font_size = 0 if ( ! compare_strings(page_data->font_name, win_data->restore_font_name, TRUE)) { page_data->font_size = 0; // g_debug("The font is restored to win_data->restore_font_name"); } break; default: break; } return g_strdup(page_data->font_name); } void reset_vte_size(GtkWidget *vte, gchar *new_font_name, Font_Reset_Type type) { #ifdef DETAIL g_debug("! Launch reset_vte_size() with vte = %p, new_font_name = %s, type = %d", vte, new_font_name, type); #endif #ifdef SAFEMODE if ((vte==NULL) || (new_font_name==NULL)) return; #endif // type 0, RESET_CURRENT_TAB_FONT: change current page's font // type 1, RESET_ALL_TO_CURRENT_TAB: apply current column & row to every vte // type 2, RESET_ALL_TO_DEFAULT: apply default column & row to every vte // type 3, RESET_ALL_TO_SYSTEM: apply system column & row to every vte struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("Get win_data = %d when reset vte size!", win_data); switch (type) { case RESET_CURRENT_TAB_FONT: // We need to apply a new font to a single vte. // so that we should insure that this won't change the size of window. // g_debug("Trying to apply font %s to vte", current_font_name); fake_vte_terminal_set_font_from_string( vte, new_font_name, win_data->font_anti_alias); // g_debug("reset_vte_size(): call window_resizable() with run_once = %d", win_data->hints_type); // g_debug("reset_vte_size(): launch update_window_hint()!"); # ifdef GEOMETRY fprintf(stderr, "\033[1;37m!! reset_vte_size(): call update_window_hint()\033[0m\n"); # endif update_window_hint(win_data, page_data); break; case RESET_ALL_TO_CURRENT_TAB: // increase/decrease window size & font size for every vte // g_debug("Trying to apply font %s to every vte", current_font_name); // struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(current_vte), "Page_Data"); #ifdef USE_GTK2_GEOMETRY_METHOD apply_font_to_every_vte(page_data->window, new_font_name, vte_terminal_get_column_count(VTE_TERMINAL(win_data->current_vte)), vte_terminal_get_row_count(VTE_TERMINAL(win_data->current_vte))); #endif #ifdef USE_GTK3_GEOMETRY_METHOD apply_font_to_every_vte( page_data->window, new_font_name, win_data->geometry_width, win_data->geometry_height); #endif break; case RESET_ALL_TO_DEFAULT: // reset window size & font size for every vte // g_debug("Trying to apply font %s to every vte", current_font_name); apply_font_to_every_vte(page_data->window, new_font_name, win_data->default_column, win_data->default_row); break; case RESET_ALL_TO_SYSTEM: // reset window size & font size for every vte // g_debug("Trying to apply font %s to every vte", current_font_name); apply_font_to_every_vte(page_data->window, new_font_name, SYSTEM_COLUMN, SYSTEM_ROW); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("reset_vte_size", "type", type); #endif break; } } void apply_font_to_every_vte(GtkWidget *window, gchar *new_font_name, glong column, glong row) { #ifdef DETAIL g_debug("! Launch apply_font_to_every_vte() with window = %p, new_font_name = %s," " column = %ld, row = %ld", window, new_font_name, column, row); #endif #ifdef SAFEMODE if ((window==NULL) || (new_font_name==NULL) || (column<1) || (row<1)) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(window), "Win_Data"); // g_debug("Get win_data = %d when apply font to every vte!", win_data); #ifdef SAFEMODE if (win_data==NULL) return; #endif struct Page *page_data = NULL; gint i; // g_debug("Trying to apply every vte to %dx%d!", column, row); // g_debug("Trying to apply font %s to every vte!", new_font_name); for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data==NULL) continue; #endif // g_debug("The default font for %d page is: %s (%s)", i, page_data->font_name, new_font_name); fake_vte_terminal_set_font_from_string( page_data->vte, new_font_name, win_data->font_anti_alias); vte_terminal_set_size(VTE_TERMINAL(page_data->vte), column, row); g_free(page_data->font_name); page_data->font_name = g_strdup(new_font_name); // g_debug("The new font for %d page is: %s (%s)", i, page_data->font_name, new_font_name); } // g_debug("* Set hints to HINTS_FONT_BASE!, win_data->window_status = %d", win_data->window_status); win_data->hints_type = HINTS_FONT_BASE; // win_data->keep_vte_size |= 0x30; // g_debug("window_resizable in apply_font_to_every_vte!"); // window_resizable(window, page_data->vte, 2, 1); // g_debug("apply_font_to_every_vte(): launch keep_window_size()!"); // Don't need to call keep_gtk2_window_size() when fullscreen switch (win_data->window_status) { #ifdef USE_GTK2_GEOMETRY_METHOD case FULLSCREEN_NORMAL: case FULLSCREEN_UNFS_OK: # ifdef GEOMETRY g_debug("@ apply_font_to_every_vte(): Call keep_gtk2_window_size() with keep_vte_size = %x", win_data->keep_vte_size); # endif keep_gtk2_window_size (win_data, page_data->vte, 0x380); #endif #ifdef USE_GTK3_GEOMETRY_METHOD case WINDOW_NORMAL: case WINDOW_APPLY_PROFILE_NORMAL: # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! apply_font_to_every_vte(win_data %p): Calling keep_gtk3_window_size() with hints_type = %d\n", ANSI_COLOR_MAGENTA, win_data, win_data->hints_type); # endif window_resizable(win_data->window, win_data->current_vte, win_data->hints_type); if (win_data->window_status==WINDOW_NORMAL) win_data->resize_type = GEOMETRY_AUTOMATIC; else win_data->resize_type = GEOMETRY_CUSTOM; win_data->geometry_width = column; win_data->geometry_height = row; keep_gtk3_window_size(win_data, TRUE); #endif break; default: break; } } gboolean check_if_every_vte_is_using_restore_font_name(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch check_if_every_vte_is_using_restore_font_name() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return FALSE; #endif if (win_data->restore_font_name == NULL) // win_data->restore_font_name = g_strdup(page_data->font_name); win_data->restore_font_name = g_strdup(win_data->default_font_name); gint i; struct Page *page_data = NULL; gboolean return_value = TRUE; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data==NULL) continue; #endif if (compare_strings(page_data->font_name, win_data->restore_font_name, TRUE)) { return_value = FALSE; break; } } return return_value; } void fake_vte_terminal_set_font_from_string(GtkWidget *vte, const char *font_name, gboolean anti_alias) { #ifdef DETAIL g_debug("! Launch fake_vte_terminal_set_font_from_string() with vte = %p, font_name = %s, anti_alias = %d", vte, font_name, anti_alias); #endif #ifdef SAFEMODE if ((vte==NULL) || (font_name==NULL)) return; #endif #ifdef USE_VTE_TERMINAL_SET_FONT PangoFontDescription *font_desc = pango_font_description_from_string(font_name); vte_terminal_set_font(VTE_TERMINAL(vte), font_desc); #else vte_terminal_set_font_from_string_full( VTE_TERMINAL(vte), font_name, anti_alias); #endif } src/font.h000066400000000000000000000017051246562641500130020ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include #include "lilyterm.h" gchar *get_resize_font(GtkWidget *vte, Font_Name_Type type); void reset_vte_size(GtkWidget *vte, gchar *new_font_name, Font_Reset_Type type); src/lilyterm.h000066400000000000000000000355451246562641500137060ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #ifndef LILYTERM_H #define LILYTERM_H #include "data.h" typedef gchar StrAddr; typedef gchar StrLists; // // **************************** misc.c **************************** // #ifdef USE_GTK_ALT_DIALOG_BUTTON_ORDER gboolean gtk_alt_dialog_button_order(); #endif gboolean check_if_default_proc_dir_exist(gchar *proc_dir); gchar *convert_array_to_string(gchar **array, gchar separator); gchar *convert_str_to_utf8(gchar *string, gchar *encoding_str); gchar *convert_escape_sequence_to_string(const gchar *string); gchar *convert_escape_sequence_from_string(const gchar *string); gboolean compare_strings(const gchar *string_a, const gchar *string_b, gboolean case_sensitive); void set_VTE_CJK_WIDTH_environ(gint VTE_CJK_WIDTH); gchar *get_VTE_CJK_WIDTH_str(gint VTE_CJK_WIDTH); gint get_default_VTE_CJK_WIDTH(); void restore_SYSTEM_VTE_CJK_WIDTH_STR(); void set_env(const gchar *variable, const gchar *value, gboolean overwrite); const gchar *get_default_lc_data(gint lc_type); gchar *get_encoding_from_locale(const gchar *locale); gboolean check_string_in_array(gchar *str, gchar **lists); gchar *get_proc_data(pid_t pid, gchar *file, gsize *length); gchar **split_string(const gchar *str, const gchar *split, gint max_tokens); gint count_char_in_string(const gchar *str, const gchar split); gchar **get_pid_stat(pid_t pid, gint max_tokens); gchar *convert_text_to_html(StrAddr **text, gboolean free_text, gchar *color, StrLists *tag, ...); gchar *join_strings_to_string(const gchar separator, const gint total, const StrLists *string, ...); gchar *colorful_max_new_lines(gchar *string, gint max, gint output_line); #ifdef ENABLE_RGBA GdkRGBA convert_color_to_rgba(GdkColor color); GdkColor convert_rgba_to_color(GdkRGBA rgba); gchar *dirty_gdk_rgba_to_string(GdkRGBA *rgba); gboolean dirty_gdk_color_parse(const gchar *spec, GdkRGBA *color); #endif GtkWidget *dirty_gtk_vbox_new(gboolean homogeneous, gint spacing); GtkWidget *dirty_gtk_hbox_new(gboolean homogeneous, gint spacing); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) void dirty_vte_terminal_set_background_tint_color(VteTerminal *vte, const GdkRGBA rgba); #endif #if defined(GEOMETRY) || defined(UNIT_TEST) void widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gchar *name); #endif #if defined(OUT_OF_MEMORY) || defined(UNIT_TEST) gchar *fake_g_strdup(const gchar *gchar); gchar *fake_g_strdup_printf(const StrLists *format, ...); #endif // // **************************** main.c **************************** // gboolean init_socket_data(); gboolean query_socket(); gboolean send_socket(int argc, char *argv[], gboolean wait); void main_quit(GtkWidget *widget, struct Window *win_data); void quit_gtk(); // // **************************** console.c **************************** // void command_option(int argc, char *argv[]); gchar *get_help_message_usage(gchar *profile, gboolean convert_to_html); gchar *get_help_message_key_binding(gboolean convert_to_html); // // **************************** window.c **************************** // GtkNotebook *new_window(int argc, char *argv[], gchar *shell, gchar *environment, gchar *locale_list, gchar *PWD, gchar *HOME, const gchar *VTE_CJK_WIDTH_STR, gboolean VTE_CJK_WIDTH_STR_overwrite_profile, const gchar *wmclass_name, gchar *wmclass_class, gchar *user_environ, gchar *encoding, gboolean encoding_overwrite_profile, gchar *lc_messages, struct Window *win_data_orig, struct Page *page_data_orig); gchar *get_init_dir(pid_t pid, gchar *pwd, gchar *home); #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) void keep_gtk2_window_size (struct Window *win_data, GtkWidget *vte, guint keep_vte_size); #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) void keep_gtk3_window_size(struct Window *win_data, gboolean idle); gboolean show_or_hide_tabs_bar_and_scroll_bar(); gboolean idle_set_vte_font_to_selected(struct Window *win_data); #endif void dim_window(struct Window *win_data, gint dim_window); void set_window_icon(GtkWidget *window); gboolean window_quit(GtkWidget *window, GdkEvent *event, struct Window *win_data); GString *close_multi_tabs(struct Window *win_data, int window_no); gboolean display_child_process_dialog (GString *child_process_list, struct Window *win_data, gsize style); GString *get_child_process_list(GtkWidget *window, gint window_no, gint page_no, GString *process_list, pid_t pid, struct Window *win_data, gboolean show_foreground); void clean_process_data(); gboolean deal_key_press(GtkWidget *window, Key_Bindings type, struct Window *win_data); #ifdef DISABLE_PAGE_ADDED void notebook_page_added(GtkNotebook *notebook, GtkWidget *child, guint page_num, struct Window *win_data); #endif void show_close_button_on_tab(struct Window *win_data, struct Page *page_data); void set_fill_tabs_bar(GtkNotebook *notebook, gboolean fill_tabs_bar, struct Page *page_data); void remove_notebook_page (GtkNotebook *notebook, GtkWidget *child, guint page_num, struct Window *win_data, gboolean run_quit_gtk); void update_window_hint(struct Window *win_data, struct Page *page_data); void window_resizable(GtkWidget *window, GtkWidget *vte, Hints_Type hints_type); gboolean hide_and_show_tabs_bar(struct Window *win_data , Switch_Type show_tabs_bar); void set_widget_can_not_get_focus(GtkWidget *widget); gboolean hide_scrollback_lines(GtkWidget *widget, struct Window *win_data); #if defined(FATAL) || defined(UNIT_TEST) void print_array(gchar *name, gchar **data); #endif void clear_win_data(struct Window *win_data); gboolean confirm_to_paste_form_clipboard(Clipboard_Type type, struct Window *win_data, struct Page *page_data); gboolean show_clipboard_dialog(Clipboard_Type type, struct Window *win_data, struct Page *page_data, Dialog_Type_Flags dialog_type); void print_color(gint no, gchar *name, GdkRGBA color); // // **************************** profile.c **************************** // void convert_system_color_to_rgba(); void init_page_parameters(struct Window *win_data, struct Page *page_data); void init_user_color(struct Window *win_data, gchar *theme_name); void init_locale_restrict_data(gchar *lc_messages); GString *save_user_settings(GtkWidget *widget, struct Window *win_data); gchar *get_user_profile_path(struct Window *win_data, int argc, char *argv[]); void get_user_settings(struct Window *win_data, const gchar *encoding); void init_prime_user_datas(struct Window *win_data); void get_prime_user_settings(GKeyFile *keyfile, struct Window *win_data, gchar *encoding); gboolean check_boolean_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, const gboolean default_value); void check_profile_version (GKeyFile *keyfile, struct Window *win_data); void profile_is_invalid_dialog(GError *error, struct Window *win_data); void convert_string_to_user_key(gint i, gchar *value, struct Window *win_data); gchar *get_profile(); #if defined(ENABLE_RGBA) || defined(UNIT_TEST) void init_rgba(struct Window *win_data); #endif void get_row_and_column_from_geometry_str(glong *column, glong *row, glong *default_column, glong *default_row, gchar *geometry_str); // // **************************** property.c **************************** // void create_theme_color_data(GdkRGBA color[COLOR], GdkRGBA color_orig[COLOR], gdouble color_brightness, gboolean invert_color, gboolean default_vte_theme, gboolean dim_fg_color); void adjust_ansi_color(GdkRGBA *color, GdkRGBA *color_orig, gdouble color_brightness); void generate_all_color_datas(struct Window *win_data); GdkRGBA *get_current_color_theme(struct Window *win_data); void init_new_page(struct Window *win_data, struct Page *page_data, glong column, glong row); void set_cursor_blink(struct Window *win_data, struct Page *page_data); void set_hyperlink(struct Window *win_data, struct Page *page_data); void clean_hyperlink(struct Window *win_data, struct Page *page_data); void enable_custom_cursor_color(GtkWidget *vte, gboolean custom_cursor_color, GdkRGBA *cursor_color); void set_vte_color(GtkWidget *vte, gboolean default_vte_color, gboolean custom_cursor_color, GdkRGBA cursor_color, GdkRGBA color[COLOR], gboolean update_fg_only, gboolean over_16_colors); gboolean use_default_vte_theme(struct Window *win_data); void set_page_width(struct Window *win_data, struct Page *page_data); void pack_vte_and_scroll_bar_to_hbox(struct Window *win_data, struct Page *page_data); void add_remove_page_timeout_id(struct Window *win_data, struct Page *page_data); void add_remove_window_title_changed_signal(struct Page *page_data); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) gboolean set_background_saturation(GtkRange *range, GtkScrollType scroll, gdouble value, GtkWidget *vte); #endif gboolean set_window_opacity (GtkRange *range, GtkScrollType scroll, gdouble value, struct Window *win_data); #if defined(vte_terminal_get_padding) || defined(UNIT_TEST) void fake_vte_terminal_get_padding(VteTerminal *vte, gint *width, gint *height); #endif void apply_new_win_data_to_page (struct Window *win_data_orig, struct Window *win_data, struct Page *page_data); gboolean compare_color(GdkRGBA *a, GdkRGBA *b); gboolean check_show_or_hide_scroll_bar(struct Window *win_data); void show_and_hide_scroll_bar(struct Page *page_data, gboolean show_scroll_bar); void set_widget_thickness(GtkWidget *widget, gint thickness); // // **************************** notebook.c **************************** // struct Page *add_page(struct Window *win_data, struct Page *page_data_prev, GtkWidget *menuitem_encoding, gchar *encoding, gchar *runtime_locale_encoding, gchar *locale, gchar *environments, gchar *user_environ, const gchar *VTE_CJK_WIDTH_STR, gboolean add_to_next); void dim_vte_text (struct Window *win_data, struct Page *page_data, gint dim_text); gboolean close_page(GtkWidget *vte, gint close_type); gboolean open_url_with_external_command (gchar *url, gint tag, struct Window *win_data, struct Page *page_data); struct Page *get_page_data_from_nth_page(struct Window *win_data, guint page_no); // // **************************** font.c **************************** // void set_vte_font(GtkWidget *widget, Font_Set_Type type); void apply_font_to_every_vte(GtkWidget *window, gchar *new_font_name, glong column, glong row); gboolean check_if_every_vte_is_using_restore_font_name (struct Window *win_data); void fake_vte_terminal_set_font_from_string(GtkWidget *vte, const char *font_name, gboolean anti_alias); // // **************************** pagename.c **************************** // void update_window_title(GtkWidget *window, gchar *name, gboolean window_title_append_package_name); void init_monitor_cmdline_datas(struct Window *win_data, struct Page *page_data); gboolean monitor_cmdline(struct Page *page_data); void update_page_window_title (VteTerminal *vte, struct Page *page_data); gchar *get_cmdline(const pid_t tpgid); gboolean check_is_root(pid_t tpgid); gint get_tpgid(pid_t pid); void check_and_update_window_title(struct Window *win_data, gboolean custom_window_title, gint page_no, gchar *custom_page_name, gchar *page_name); gboolean get_and_update_page_name(struct Page *page_data, gboolean lost_focus); void reorder_page_number (GtkNotebook *notebook, GtkWidget *child, guint page_num, GtkWidget *window); gchar *get_tab_name_with_current_dir(pid_t pid); void update_page_name_wintitle(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data); void update_page_name_cmdline(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data); void update_page_name_pwd(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data, gboolean lost_focus); gboolean update_page_name(GtkWidget *window, GtkWidget *vte, gchar *page_name, GtkWidget *label, gint page_no, gchar *custom_page_name, const gchar *tab_color, gboolean is_root, gboolean is_bold, gboolean show_encoding, gchar *encoding_str, gboolean custom_window_title, gboolean lost_focus); void update_page_name_normal(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data); // // **************************** dialog.c **************************** // GtkResponseType dialog(GtkWidget *widget, gsize style); gint get_color_index(gboolean invert_color, gint index); gboolean find_str_in_vte(GtkWidget *vte, Dialog_Find_Type type); void set_markup_key_value(gboolean bold, gchar *color, gchar *key_value, GtkWidget *label); gboolean check_and_add_locale_to_warned_locale_list(struct Window *win_data, gchar *new_locale); void create_invalid_locale_error_message(gchar *locale); void error_dialog(GtkWidget *window, gchar *title_translation, gchar *title, gchar *icon, gchar *message, gchar *encoding); #if defined(FATAL) || defined(UNIT_TEST) void print_switch_out_of_range_error_dialog(gchar *function, gchar *var, gint value); #endif GdkRGBA get_inactive_color(GdkRGBA original_fg_color, gdouble new_brightness, gdouble old_brightness); gboolean upgrade_dialog(gchar *version_str); gchar *get_colorful_profile(struct Window *win_data); // // **************************** menu.c **************************** // void recreate_theme_menu_items(struct Window *win_data); gboolean refresh_locale_and_encoding_list(struct Window *win_data); void set_encoding(GtkWidget *menuitem, gpointer user_data); gboolean create_menu(struct Window *win_data); void set_urgent_bell(GtkWidget *widget, struct Window *win_data); void set_vte_urgent_bell(struct Window *win_data, struct Page *page_data); gboolean stop_urgency_hint(GtkWidget *window, GdkEvent *event, struct Window *win_data); GtkWidget *add_radio_menuitem_to_sub_menu(GSList *encoding_group, GtkWidget *sub_menu, const gchar *name, GSourceFunc func, gpointer func_data); void refresh_profile_list (struct Window *win_data); long get_profile_dir_modtime(); gboolean check_if_win_data_is_still_alive(struct Window *win_data); void clean_scrollback_lines(GtkWidget *widget, struct Window *win_data); #if defined(FATAL) || defined(UNIT_TEST) void print_active_window_is_null_error_dialog(gchar *function); #endif #endif src/main.c000066400000000000000000000650741246562641500127640ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "main.h" // for using in socket gboolean single_process = TRUE; gint socket_fd = 0; struct sockaddr_un address = {0}; int address_len = 0; GIOChannel *main_channel = NULL; GtkClipboard *selection_clipboard = NULL; GtkClipboard *selection_primary = NULL; // gchar *command_line_path; // gchar **empty_environ; gchar *system_locale_list; gchar *init_LC_CTYPE; gchar *init_LANGUAGE; gchar *init_encoding; gchar *init_LC_MESSAGES; const gchar *SYSTEM_VTE_CJK_WIDTH_STR = NULL; const gchar *wmclass_name = NULL; gchar *wmclass_class = NULL; const gchar *shell = NULL; gchar *pwd = NULL; const gchar *home = NULL; GList *window_list = NULL; gchar *profile_dir = NULL; gboolean proc_exist = FALSE; gchar *proc_file_system_path = NULL; extern gboolean force_to_quit; extern gchar *restricted_locale_message; // // single_process ----------------(N)------------------------------------> new_window() ------> shutdown_socket_serve() // | ^ ^ unlink // init_socket_data() | | + clear_channel() // socket_fd -------------------(N)---| | g_io_channel_shutdown // set_fd_non_block ------------(N)---/ | (g_io_channel_unref) // | | // query_socket() | // connect ---------------------(N)-------> init_socket_server() -------------| // | ^ unlink | // send_socket() | bind -----------------------(N)-| // * g_io_channel_unix_new -------(N)---| listen ---------------------(N)-| // g_io_channel_set_encoding ---(N)---| * g_io_channel_unix_new ------(N)-| // g_io_channel_set_buffered | g_io_channel_set_encoding --(N)-| // g_io_channel_write_chars ----(N)---| g_io_add_watch -------------(N)-/ // g_io_channel_flush ----------(N)---/ | // + clear_channel() `---- accept_socket() // g_io_channel_shutdown (condition) // (g_io_channel_unref) accept // | set_fd_non_block // exit() * g_io_channel_unix_new // g_io_channel_set_encoding // g_io_add_watch // | // `-- read_socket() // g_io_channel_read_line // new_window() // + clear_channel() // g_io_channel_shutdown // (g_io_channel_unref) // #ifdef UNIT_TEST int fake_main(int argc, char *argv[]) #else int main( int argc, char *argv[]) #endif { // command_line_path = argv[0]; // g_debug ("argc = %d", argc); // print_array ("argv", argv); // i18n support. We need to support i18n under console, too. setlocale(LC_ALL, ""); bindtextdomain (BINARY, LOCALEDIR); bind_textdomain_codeset (BINARY, "UTF-8"); textdomain (BINARY); const gchar *user_config_dir = g_get_user_config_dir(); #if ! defined(SAFEMODE) && defined(DEVELOP) g_message("Running %s without SAFE MODE!", PACKAGE); #endif #ifdef OUT_OF_MEMORY # undef g_strdup_printf #endif if (user_config_dir) profile_dir = g_strdup_printf("%s/%s", user_config_dir, BINARY); #ifdef OUT_OF_MEMORY #define g_strdup_printf(...) NULL #endif proc_exist = check_if_default_proc_dir_exist(NULL); // g_debug ("Get proc_exist = %d, proc_file_system_path = %s", proc_exist, proc_file_system_path); shell = g_getenv("SHELL"); if (shell==NULL) shell = ""; gboolean pwd_need_be_free = FALSE; pwd = (gchar *)g_getenv("PWD"); if (pwd==NULL) { pwd_need_be_free = TRUE; pwd = g_get_current_dir(); } if (pwd==NULL) { pwd_need_be_free = FALSE; pwd = ""; } // g_debug("Got $PWD = %s", pwd); home = g_getenv("HOME"); if (home==NULL) home = ""; // g_debug("Get $HOME = %s", home); // deal the command line options command_option(argc, argv); if (wmclass_name==NULL) wmclass_name = g_getenv("RESOURCE_NAME"); if (wmclass_name==NULL) wmclass_name = ""; if (wmclass_class==NULL) wmclass_class = ""; // g_debug("Got wmclass_name = %s, wmclass_class = %s", wmclass_name, wmclass_class); // init the gtk+2 engine // GTK3: get gtk_test_widget_click() working... // gdk_disable_multidevice(); #ifndef UNIT_TEST gtk_init(&argc, &argv); #endif // FIXME: we should get the single_process from profile. Current is command-line option only. if (single_process) { // init socket data if (init_socket_data()) { // trying to connect to an existing LilyTerm if (query_socket()) { // success, sent the argc/argv to socket then quit // g_debug("A LilyTerm socket server is exist already. exiting..."); if (send_socket(argc, argv, TRUE)) { g_free(profile_dir); exit (0); } } // no LilyTerm exist. create a socket server // g_debug("Creating a LilyTerm socket server..."); init_socket_server(); g_atexit((GVoidFunc)shutdown_socket_server); } } // start LilyTerm // empty_environ = g_strsplit("", " ", -1); extern gchar **environ; // print_array("main(): environ", environ); gchar *environ_str = convert_array_to_string(environ, '\t'); window_list = NULL; // g_debug("Got environ_str (in main.c) = %s", environ_str); selection_clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); selection_primary = gtk_clipboard_get(GDK_SELECTION_PRIMARY); system_locale_list = get_locale_list(); // g_debug("Got system_locale_list = %s", system_locale_list); init_LC_CTYPE = g_strdup(get_default_lc_data(LC_CTYPE)); // g_debug("Got init_LC_CTYPE = %s", init_LC_CTYPE); init_LANGUAGE = g_strdup(get_default_lc_data(LANGUAGE)); // g_debug("Got init_LANGUAGE = %s", init_LANGUAGE); init_LC_MESSAGES = g_strdup(get_default_lc_data(LC_MESSAGES)); // g_debug("init_LC_MESSAGES = %s", init_LC_MESSAGES); init_encoding = (gchar *)get_encoding_from_locale(NULL); if (! compare_strings(init_encoding, "ANSI_X3.4-1968", TRUE)) { g_free(init_encoding); init_encoding = g_strdup("UTF-8"); } // g_debug("init_encoding = %s", init_encoding); SYSTEM_VTE_CJK_WIDTH_STR = g_getenv("VTE_CJK_WIDTH"); // g_debug ("Got SYSTEM_VTE_CJK_WIDTH_STR = %s", SYSTEM_VTE_CJK_WIDTH_STR); // FIXME: signal(SIGCHLD, SIG_IGN); // The first window of LilyTerm // Convert the GdkColor to GdkRGBA convert_system_color_to_rgba(); // g_debug("Got original encoding = %s", get_encoding_from_locale(NULL)); //GtkNotebook *new_window(int argc, // char *argv[], // gchar *shell, // gchar *environment, // gchar *locale_list, // gchar *PWD, // gchar *HOME, // gchar *VTE_CJK_WIDTH_STR, // gboolean VTE_CJK_WIDTH_STR_overwrite_profile, // gchar *wmclass_name, // gchar *wmclass_class, // gchar *user_environ, // gchar *encoding, // gboolean encoding_overwrite_profile, // gchar *lc_messages, // struct Window *win_data_orig, // struct Page *page_data_orig) if ((new_window(argc, argv, (gchar *) shell, environ_str, system_locale_list, (gchar *) pwd, (gchar *) home, SYSTEM_VTE_CJK_WIDTH_STR, FALSE, wmclass_name, wmclass_class, NULL, init_encoding, FALSE, init_LC_MESSAGES, NULL, NULL)) || window_list) { // The argv of "main" LilyTerm can't be free. // Set it to NULL here to avoid double_free(). argv=NULL; #ifdef ENABLE_X_STARTUP_NOTIFICATION_ID gdk_notify_startup_complete_with_id(PACKAGE); #endif // g_debug("gtk_main_level = %d", gtk_main_level()); if (! gtk_main_level()) gtk_main(); } #ifdef DETAIL else { // g_debug("Got window_list = %p", window_list); // GList *win_list = window_list; // gint i=0; // // while (win_list) // { // g_debug("Got %d win_data = %p", ++i, win_list->data); // win_list = win_list->next; // } g_debug("??? The creation of first window is FAIL!!!"); } #endif extern struct KeyValue system_keys[KEYS]; gint i; // g_debug("Clear function key data!!"); for (i=KEY_SWITCH_TO_TAB_1; i<=KEY_SWITCH_TO_TAB_12; i++) { g_free(system_keys[i].name); g_free(system_keys[i].topic); g_free(system_keys[i].comment); g_free(system_keys[i].translation); #ifdef UNIT_TEST system_keys[i].name = NULL; system_keys[i].topic = NULL; system_keys[i].comment = NULL; system_keys[i].translation = NULL; #endif } // g_free(pwd); // g_strfreev(empty_environ); g_free(environ_str); g_free(init_encoding); g_free(system_locale_list); g_free(profile_dir); if (pwd_need_be_free) g_free(pwd); g_free(restricted_locale_message); g_list_free(window_list); g_free(init_LC_CTYPE); g_free(init_LC_MESSAGES); #ifdef UNIT_TEST // empty_environ = NULL; environ_str = NULL; init_encoding = NULL; system_locale_list = NULL; profile_dir = NULL; restricted_locale_message = NULL; window_list = NULL; init_LC_CTYPE = NULL; init_LC_MESSAGES = NULL; #endif return 0; } // it will return TRUE if init socket data successfully gboolean init_socket_data() { #ifdef DETAIL g_debug("! Launch init_socket_data() to init LilyTerm socket!"); #endif GError *error = NULL; // clean data first bzero(&address, sizeof(address)); // init the address of socket address.sun_family = AF_UNIX; const gchar *tmp_dir = g_get_tmp_dir(); #ifdef SAFEMODE if (tmp_dir) { #endif gchar *display = gdk_get_display(); #if defined(DEVELOP) g_snprintf(address.sun_path, UNIX_PATH_MAX, "%s/.%s_dev_%s%s", tmp_dir ,BINARY, g_get_user_name(), display); #elif defined(DEBUG) g_snprintf(address.sun_path, UNIX_PATH_MAX, "%s/.%s_dbg_%s%s", tmp_dir ,BINARY, g_get_user_name(), display); #else g_snprintf(address.sun_path, UNIX_PATH_MAX, "%s/.%s_%s%s", tmp_dir ,BINARY, g_get_user_name(), display); #endif g_free(display); #ifdef SAFEMODE } #endif address.sun_path[UNIX_PATH_MAX-1] = address.sun_path[UNIX_PATH_MAX-2] = '\0'; // g_debug("The socket file is %s", address.sun_path); address_len = sizeof(address); // init socket socket_fd = socket(AF_UNIX, SOCK_STREAM, 0); if (socket_fd < 0) // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(1, error, NULL, FALSE); // set this socket is non-block return set_fd_non_block(&socket_fd); } // it will return TRUE if scucceed gboolean set_fd_non_block(gint *fd) { #ifdef DETAIL if (fd) g_debug("! Launch set_fd_non_block() with fd = %d!", *fd); else g_debug("! Launch set_fd_non_block() with fd = (%p)!", fd); #endif #ifdef SAFEMODE if (fd==NULL) return FALSE; #endif GError *error = NULL; gint flags = fcntl(*fd, F_GETFL, 0); if (fcntl(*fd, F_SETFL, O_NONBLOCK|flags) < 0) // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(8, error, NULL, FALSE); return TRUE; } // it will return TRUE if scucceed gboolean query_socket() { #ifdef DETAIL g_debug("! Launch query_socket() to connect to an existing LilyTerm !"); #endif GError *error = NULL; if (connect(socket_fd, (struct sockaddr *)&address, address_len) < 0) // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(2, error, NULL, FALSE); return TRUE; } // it will return TRUE if scucceed gboolean send_socket( int argc, char *argv[], gboolean wait) { #ifdef DETAIL g_debug("! Launch send_socket() to send data to the exiting LilyTerm !"); g_debug("! send_socket() argc = %d, wait = %d", argc, wait); print_array("! send_socket() argv", argv); #endif GError *error = NULL; gsize len; extern gchar **environ; gchar *locale_list = get_locale_list(); const gchar *VTE_CJK_WIDTH_STR = g_getenv("VTE_CJK_WIDTH"); // VTE_CJK_WIDTH can't = NULL if (VTE_CJK_WIDTH_STR == NULL) VTE_CJK_WIDTH_STR = ""; // g_debug("Got LOCALE = %s in send_socket...", get_encoding_from_locale(NULL)); gchar *encoding = get_encoding_from_locale(NULL); if (! compare_strings(encoding, "ANSI_X3.4-1968", TRUE)) { g_free(encoding); encoding = g_strdup("UTF-8"); } // g_debug("Got encoding = %s in send_socket...", encoding); gchar *lc_messages = g_strdup(get_default_lc_data(LC_MESSAGES)); gchar *environ_str = convert_array_to_string(environ, '\t'); // print_array("! send_socket() environ", environ); // g_debug("environ_str = %s", environ_str); gchar *argv_str = convert_array_to_string(argv, '\x10'); #ifdef SAFEMODE gboolean need_free_argv_str = TRUE; if (argv_str==NULL) argv_str=g_strdup(""); if (argv_str==NULL) { need_free_argv_str = FALSE; argv_str = ""; } #endif // g_debug("argv_str = %s", argv_str); // g_debug("SEND DATA: SOCKET_DATA_VERSION = %s", SOCKET_DATA_VERSION); // g_debug("SEND DATA: locale_list = %s", locale_list); // g_debug("SEND DATA: encoding = %s", encoding); // g_debug("SEND DATA: PWD = %s", PWD); // g_debug("SEND DATA: VTE_CJK_WIDTH_STR = %s", VTE_CJK_WIDTH_STR); // g_debug("SEND DATA: wmclass_name = %s", wmclass_name); // g_debug("SEND DATA: wmclass_class = %s", wmclass_class); // g_debug("SEND DATA: environ_str = %s", environ_str); // g_debug("SEND DATA: argv_str = %s", argv_str); // 0 1 2 3 4 5 6 7 8 9 10 11 // send data: SOCKET_DATA_VERSION SHELL LOCALE_LIST ENCODING LC_MESSAGES PWD HOME VTE_CJK_WIDTH_STR wmclass_name wmclass_class ENVIRON ARGV // 0 1 2 3 4 5 6 7 8 9 10 11 gchar *arg_str = g_strdup_printf("%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10%s\x10", SOCKET_DATA_VERSION, shell, locale_list, encoding, lc_messages, pwd, home, VTE_CJK_WIDTH_STR, wmclass_name, wmclass_class, environ_str, argv_str); // g_debug("arg_str = %s", arg_str); g_free(locale_list); g_free(encoding); g_free(lc_messages); g_free(environ_str); #ifdef SAFEMODE if (need_free_argv_str) #endif g_free(argv_str); // write data! #ifdef SAFEMODE if (fcntl(socket_fd, F_GETFL) < 0) return FALSE; #endif GIOChannel *channel = g_io_channel_unix_new(socket_fd); // main_channel is NULL, so that we don't need to launch clear_channel() if (!channel) return socket_fault(12, NULL, NULL, FALSE); // set the channel to read binary file if (g_io_channel_set_encoding(channel, NULL, &error) == G_IO_STATUS_ERROR) return socket_fault(9, error, channel, TRUE); g_io_channel_set_buffered (channel, FALSE); #ifdef SAFEMODE if ((arg_str == NULL) || (g_io_channel_write_chars(channel, arg_str, -1, &len, &error)==G_IO_STATUS_ERROR)) #else if (g_io_channel_write_chars(channel, arg_str, -1, &len, &error)==G_IO_STATUS_ERROR) #endif // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(11, error, channel, TRUE); // flush writing datas if (g_io_channel_flush(channel, &error) == G_IO_STATUS_ERROR) // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(13, error, channel, TRUE); g_free(arg_str); // So far so good. shutdown and clear channel! clear_channel(channel, TRUE); // FIXME: sleep for 1 sec to wait the socket server. any better idea? if (wait) sleep(1); return TRUE; } // it will return TRUE if succeed gboolean init_socket_server() { #ifdef DETAIL g_debug("! Launch init_socket_server() to init a LilyTerm socket server !"); #endif GError *error = NULL; // clear the prev file if (address.sun_path) unlink(address.sun_path); // bind the socket on a file if (bind(socket_fd, (struct sockaddr *)&address, address_len) < 0) // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(3, error, NULL, FALSE); // create socket queue if (listen(socket_fd, 5) < 0) // main_channel is NULL, so that we don't need to launch clear_channel() return socket_fault(4, error, NULL, FALSE); main_channel = g_io_channel_unix_new(socket_fd); if (!main_channel) return socket_fault(12, NULL, NULL, FALSE); // set the channel to read binary file if (g_io_channel_set_encoding(main_channel, NULL, &error) == G_IO_STATUS_ERROR) return socket_fault(9, error, main_channel, TRUE); // if any request from client, call accept_socket(). // the channel will be clean when main_quit() if ( ! g_io_add_watch ( main_channel, G_IO_IN|G_IO_HUP, (GIOFunc)accept_socket, NULL)) return socket_fault(5, error, NULL, TRUE); return TRUE; } // it will return TRUE if succeed gboolean accept_socket(GIOChannel *source, GIOCondition condition, gpointer user_data) { #ifdef DETAIL g_debug("! Launch accept_socket() to accept the request from client !"); #endif #ifdef SAFEMODE if (source==NULL) return FALSE; #endif GError *error = NULL; if (condition & G_IO_HUP) return socket_fault(6, error, source, FALSE); else { gint read_fd = accept(g_io_channel_unix_get_fd(source), NULL, NULL); if (read_fd < 0) return socket_fault(1, error, source, FALSE); if ( ! set_fd_non_block(&read_fd)) return FALSE; GIOChannel* channel = g_io_channel_unix_new(read_fd); // channel is NULL, so that we don't need to launch clear_channel() if (!channel) return socket_fault(12, NULL, channel, FALSE); // set the channel to read binary file if (g_io_channel_set_encoding(channel, NULL, &error) == G_IO_STATUS_ERROR) return socket_fault(9, error, channel, TRUE); // read the data that client sent. if ( ! g_io_add_watch(channel, G_IO_HUP, read_socket, NULL)) return socket_fault(5, error, channel, TRUE); } return TRUE; } // it will return TRUE if succeed gboolean read_socket(GIOChannel *channel, GIOCondition condition, gpointer user_data) { #ifdef DETAIL g_debug("! Launch read_socket() to read data !"); #endif #ifdef SAFEMODE if (channel==NULL) return FALSE; #endif GError *error = NULL; gchar *data = NULL, **datas; gsize len = 0; gsize term; if (g_io_channel_read_line (channel, &data, &len, &term, &error) == G_IO_STATUS_ERROR) return socket_fault(7, error, channel, TRUE); // g_debug("Read %ld bytes from Lilyterm socket: '%s'", len, data); if (len > 0) { // 0 1 2 3 4 5 6 7 8 9 10 11 // get data: SOCKET_DATA_VERSION SHELL LOCALE_LIST ENCODING LC_MESSAGES PWD HOME VTE_CJK_WIDTH_STR wmclass_name wmclass_class ENVIRON ARGV // clear '\n' at the end of data[] data[len-1] = 0; datas = split_string(data, "\x10", 12); // g_debug("The SOCKET_DATA_VERSION = %s ,and the data sent via socket is %s", // SOCKET_DATA_VERSION, datas[0]); if (datas==NULL) { // A dirty hack for sometimes the received socket datas is empty. socket_fault(14, NULL, NULL, FALSE); new_window(0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, FALSE, NULL, NULL, NULL, NULL, FALSE, NULL, NULL, NULL); } else if (compare_strings(SOCKET_DATA_VERSION, datas[0], TRUE)) { // The SOCKET_DATA_VERSION != the data sent via socket gchar *received_socket_version = NULL; if (datas) received_socket_version = datas[0]; gchar *message = g_strdup_printf(_("The data got from socket seems incorrect.\n\n" "\tReceived socket version: %s\n" "\tExpected socket version: %s\n\n" "If you just updated %s recently,\n" "Please close all the windows of %s and try again."), received_socket_version, SOCKET_DATA_VERSION, PACKAGE, PACKAGE); error_dialog(NULL, _("The format of socket data is out of date"), "The format of socket data is out of date", GTK_FAKE_STOCK_DIALOG_ERROR, message, NULL); g_free(message); } else { gchar **argv = split_string(datas[11], "\x10", -1); gint argc = 0; if (argv) while (argv[argc]) argc ++; // g_debug("Final:"); // g_debug("\targc =%d", argc); // print_array("\targv", argv); // g_debug("\tSHELL = %s", datas[1]); // g_debug("\tenvironments = %s", datas[10]); // g_debug("\tlocale_list = %s", datas[2]); // g_debug("\tPWD = %s", datas[5]); // g_debug("\tHOME = %s", datas[6]); // g_debug("\tVTE_CJK_WIDTH_STR = %s", datas[7]); // g_debug("\twmclass_name = %s", datas[8]); // g_debug("\twmclass_class= %s", datas[9]); // g_debug("\tencoding = %s", datas[3]); // g_debug("\tlc_messages = %s", datas[4]); //GtkNotebook *new_window(int argc, // char *argv[], // gchar *shell, // 1 // gchar *environment, // 10 // gchar *locale_list, // 2 // gchar *PWD, // 5 // gchar *HOME, // 6 // gchar *VTE_CJK_WIDTH_STR, // 7 // gboolean VTE_CJK_WIDTH_STR_overwrite_profile, // gchar *wmclass_name, // 8 // gchar *wmclass_class, // 9 // gchar *user_environ, // gchar *encoding, // 3 // gboolean encoding_overwrite_profile, // gchar *lc_messages, // 4 // struct Window *win_data_orig, // struct Page *page_data_orig) new_window(argc, argv, datas[1], datas[10], datas[2], datas[5], datas[6], datas[7], FALSE, datas[8], datas[9], NULL, datas[3], FALSE, datas[4], NULL, NULL); g_strfreev(argv); } g_strfreev(datas); data[len-1] = '\n'; g_free(data); } clear_channel(channel, TRUE); // return FALSE means this connection is finish. return FALSE; } // it will always return FALSE gboolean socket_fault(int type, GError *error, GIOChannel *channel, gboolean unref) { #ifdef DETAIL g_debug("! Launch socket_fault() to show the error message !"); #endif #ifdef UNIT_TEST # define G_WARNING g_message #else # define G_WARNING g_warning #endif switch (type) { case 1: G_WARNING("Error when create %s socket(%s): %s", PACKAGE, address.sun_path, g_strerror (errno)); break; case 2: g_message("Can NOT connect to a existing %s socket!", PACKAGE); break; case 3: G_WARNING("Can NOT bind on the socket!"); break; case 4: G_WARNING("Can NOT listen on the socket!"); break; case 5: G_WARNING("Can not watch on the socket!"); break; case 6: G_WARNING("Error when accepting client request via socket!"); break; case 7: G_WARNING("Error when reading the data client sent via socket!"); break; case 8: G_WARNING("Error when running fcntl command on socket!"); break; case 9: #ifdef SAFEMODE if (error) #endif G_WARNING("Error when setting the encoding of channel: %s", error->message); break; case 10: #ifdef SAFEMODE if (error) #endif G_WARNING("Error when shutdowning a channel: %s", error->message); break; case 11: #ifdef SAFEMODE if (error) #endif G_WARNING("Error when writing data to the channel: %s", error->message); break; case 12: G_WARNING("Can NOT create a channel for this socket"); break; case 13: #ifdef SAFEMODE if (error) #endif G_WARNING("Error when flushing the write buffer for the channel: %s", error->message); break; case 14: G_WARNING("Got a NULL string from the socket!"); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("socket_fault", "type", type); #endif break; } if (error) g_clear_error (&error); clear_channel(channel, unref); #ifdef UNIT_TEST # undef G_WARNING #endif return FALSE; } // it will return TRUE if scucceed gboolean clear_channel(GIOChannel *channel, gboolean unref) { #ifdef DETAIL g_debug("! Launch clear_channel() to clear channel data !"); #endif if (channel == NULL) return TRUE; gboolean return_value = TRUE; GError *error = NULL; if (g_io_channel_shutdown(channel, TRUE, &error) == G_IO_STATUS_ERROR) return_value = socket_fault(10, error, NULL, FALSE); if (return_value && unref) { g_io_channel_unref(channel); channel = NULL; } return return_value; } // It should always return 0. gint shutdown_socket_server(gpointer data) { #ifdef DETAIL g_debug("! Launch shutdown_socket_server() to shutdown the LilyTerm socket server!"); #endif if (main_channel) clear_channel(main_channel, TRUE); if (address.sun_path) unlink(address.sun_path); return 0; } void main_quit(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch main_quit() with win_data = %p!", win_data); #endif // g_debug("Total window = %d", g_list_length(window_list)); if (g_list_length(window_list)==1) { #ifdef SAFEMODE // g_debug ("main_quit(): win_data==NULL, call gtk_main_quit()"); if (win_data==NULL) return quit_gtk(); #endif window_quit(win_data->window, NULL, win_data); } else { GString *all_process_list = g_string_new(NULL); GString *child_process_list; GList *win_list = window_list; struct Window *temp_win_data; gint i = 1; while (win_list) { temp_win_data = win_list->data; child_process_list = close_multi_tabs(temp_win_data, i); #ifdef SAFEMODE if (child_process_list) #endif g_string_append (all_process_list, child_process_list->str); g_string_free(child_process_list, TRUE); win_list = win_list->next; i++; } // g_debug("Got all_process_list =%s", all_process_list->str); #ifdef SAFEMODE if ((all_process_list==NULL) || (all_process_list->len==0) || (display_child_process_dialog (all_process_list, win_data, CONFIRM_TO_EXIT_WITH_CHILD_PROCESS))) #else if ((all_process_list->len==0) || (display_child_process_dialog (all_process_list, win_data, CONFIRM_TO_EXIT_WITH_CHILD_PROCESS))) #endif { force_to_quit = TRUE; // g_debug ("main_quit(): call gtk_main_quit()"); quit_gtk(); } g_string_free(all_process_list, TRUE); } } void quit_gtk() { #ifdef DETAIL g_debug("! Launch quit_gtk()"); #endif if (gtk_main_level()) gtk_main_quit(); } gchar *get_locale_list() { #ifdef DETAIL g_debug("! Launch get_locale_list()!"); #endif #ifdef OUT_OF_MEMORY # undef g_getenv #endif return join_strings_to_string(' ', 14, g_getenv("LANG"), g_getenv("LC_CTYPE"), g_getenv("LC_NUMERIC"), g_getenv("LC_TIME"), g_getenv("LC_COLLATE"), g_getenv("LC_MONETARY"), g_getenv("LC_MESSAGES"), g_getenv("LC_PAPER"), g_getenv("LC_NAME"), g_getenv("LC_ADDRESS"), g_getenv("LC_TELEPHONE"), g_getenv("LC_MEASUREMENT"), g_getenv("LC_IDENTIFICATION"), g_getenv("LC_ALL")); #ifdef OUT_OF_MEMORY #define g_getenv(x) NULL #endif } //// The returned GString should be freed when no longer needed. //GString *convert_string_array_to_0x9_separated_gstring (gchar **string_array) //{ // gint i = 0; // GString *string = g_string_new(""); // // if (string_array!=NULL) // { // while (string_array[i]!=NULL) // { // // g_debug("%d: %s", i, string_array[i]); // g_string_append_printf(string, "%s\x10", string_array[i]); // i++; // } // } // return string ; //} src/main.h000066400000000000000000000031611246562641500127560ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include // for g_get_tmp_dir() #include // for L10n #include #include // for exit() #include // for socket() #include #include #include #include #include #include "lilyterm.h" // the max size of saddr.sun_path in Linux is 108! #define UNIX_PATH_MAX 108 #ifdef UNIT_TEST int fake_main(int argc, char *argv[]); #endif gboolean set_fd_non_block(gint *fd); gboolean init_socket_server(); gboolean accept_socket(GIOChannel *source, GIOCondition condition, gpointer user_data); gboolean read_socket(GIOChannel *channel, GIOCondition condition, gpointer user_data); gboolean socket_fault(int i, GError *error, GIOChannel* channel, gboolean unref); gboolean clear_channel(GIOChannel* channel, gboolean unref); gint shutdown_socket_server(gpointer data); gchar *get_locale_list(); src/menu.c000066400000000000000000003104151246562641500127740ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "menu.h" // Sometimes we may popup a menu on a non-active (not focus) window... extern GList *window_list; extern GtkWidget *menu_active_window; extern struct Page_Color page_color[PAGE_COLOR]; extern struct GdkRGBA_Theme system_color_theme[THEME]; extern struct Erase_Binding erase_binding[ERASE_BINDING]; #ifdef ENABLE_CURSOR_SHAPE extern struct Cursor_Shape cursor_shape[CURSOR_SHAPE]; #endif extern gchar *system_locale_list; extern gchar *init_LC_CTYPE; extern gchar *init_encoding; extern gchar *profile_dir; extern gboolean safe_mode; gboolean create_menu(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch create_menu() for win_data %p", win_data); #endif #ifdef OUT_OF_MEMORY # undef g_strdup # undef g_strdup_printf # undef g_strsplit # undef g_strsplit_set #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif GtkWidget *sub_menu=NULL; gsize i=0; //gboolean enable_vte_cjk_width = win_data->VTE_CJK_WIDTH ? 1 : 0; //g_debug("enable_vte_cjk_width = %d, and VTE_CJK_WIDTH (environ) = %s", // enable_vte_cjk_width, g_getenv("VTE_CJK_WIDTH")); win_data->menu = gtk_menu_new(); win_data->encoding_locale_menuitems[0] = create_sub_item_subitem (_("Change text encoding"), GTK_FAKE_STOCK_DND); win_data->encoding_locale_menuitems[1] = create_sub_item_subitem (_("New tab"), GTK_FAKE_STOCK_DND_MULTIPLE); win_data->encoding_locale_menuitems[2] = create_sub_item_subitem (_("New tab with specified locale"), GTK_FAKE_STOCK_DND_MULTIPLE); for (i=0; i<3; i++) gtk_menu_shell_append (GTK_MENU_SHELL (win_data->menu), win_data->encoding_locale_menuitems[i]); // g_debug("win_data->encoding_locale_menuitems is created for win_data (%p)!", win_data); if (refresh_locale_and_encoding_list(win_data)==FALSE) return FALSE; win_data->menuitem_new_window_from_list = create_sub_item_subitem (_("New window with specified profile"), GTK_FAKE_STOCK_NEW); // g_debug("Trying to append win_data->menuitem_new_window_from_list(%p) to win_data->menu(%p) for win_data = %p", // win_data->menuitem_new_window_from_list, win_data->menu, win_data); gtk_menu_shell_append (GTK_MENU_SHELL (win_data->menu), win_data->menuitem_new_window_from_list); // win_data->subitem_new_window_from_list = create_sub_item_submenu (win_data->menu, win_data->menuitem_new_window_from_list); // ---------------------------------------- add_separator_menu (win_data->menu); // Change the font for every tab create_menu_item (IMAGE_MENU_ITEM, win_data->menu, _("Change the font"), NULL, GTK_FAKE_STOCK_SELECT_FONT, (GSourceFunc)select_font, win_data); #ifdef ENABLE_GDKCOLOR_TO_STRING if (win_data->show_color_selection_menu) { // The submenu of Change color sub_menu = create_sub_item (win_data->menu, _("Change colors"), GTK_FAKE_STOCK_SELECT_COLOR); // Change the cursor color for every tab create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Change the cursor color"), NULL, GTK_FAKE_STOCK_SELECT_COLOR, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_THE_CURSOR_COLOR)); // Change the foreground color for every tab win_data->ansi_theme_menuitem[0] = create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Change the foreground color"), NULL, GTK_FAKE_STOCK_SELECT_COLOR, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_THE_FOREGROUND_COLOR)); // Change the foreground color for every tab win_data->ansi_theme_menuitem[1] = create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Change the ANSI colors"), NULL, GTK_FAKE_STOCK_SELECT_COLOR, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_THE_ANSI_COLORS)); // Change the background color for every tab win_data->ansi_theme_menuitem[2] = create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Change the background color"), NULL, GTK_FAKE_STOCK_SELECT_COLOR, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_THE_BACKGROUND_COLOR)); // Change the background color for every tab win_data->ansi_theme_menuitem[3] = create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Adjust the brightness of ANSI colors"), NULL, GTK_FAKE_STOCK_SELECT_COLOR, (GSourceFunc)dialog, GINT_TO_POINTER (ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_USED_IN_TERMINAL)); win_data->ansi_theme_menuitem[4] = create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Adjust the brightness when inactive"), NULL, GTK_FAKE_STOCK_SELECT_COLOR, (GSourceFunc)dialog, GINT_TO_POINTER (ADJUST_THE_BRIGHTNESS_OF_ANSI_COLORS_WHEN_INACTIVE)); if (win_data->use_color_page) { // ---------------------------------------- GtkWidget *separator_menu = add_separator_menu (sub_menu); gboolean hide_separator_menu = TRUE; for (i=0; iansi_color_sub_menu = create_sub_item_subitem (_("Change ANSI color theme"), GTK_FAKE_STOCK_SELECT_COLOR); gtk_menu_shell_append (GTK_MENU_SHELL (win_data->menu), win_data->ansi_color_sub_menu); recreate_theme_menu_items(win_data); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) if (win_data->show_background_menu) #else if (win_data->show_background_menu && (win_data->use_rgba == -1)) #endif { GtkWidget *background_sub_menu = create_sub_item (win_data->menu, _("Background"), GTK_FAKE_STOCK_PAGE_SETUP); #ifdef ENABLE_RGBA if (win_data->use_rgba == -1) { // Transparent Window win_data->menuitem_trans_win = create_menu_item (CHECK_MENU_ITEM, background_sub_menu, _("Transparent window"), NULL, NULL, (GSourceFunc)set_trans_win, win_data->window); // Window opacity create_menu_item (IMAGE_MENU_ITEM, background_sub_menu, _("Window opacity"), NULL, GTK_FAKE_STOCK_EXECUTE, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_THE_OPACITY_OF_WINDOW)); create_menu_item (IMAGE_MENU_ITEM, background_sub_menu, _("Window opacity when inactive"), NULL, GTK_FAKE_STOCK_EXECUTE, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_THE_OPACITY_OF_WINDOW_WHEN_INACTIVE)); // ---------------------------------------- add_separator_menu (background_sub_menu); } #endif #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) // Transparent Background win_data->menuitem_trans_bg = create_menu_item (CHECK_MENU_ITEM, background_sub_menu, _("Transparent background"), NULL, NULL, (GSourceFunc)set_trans_bg, win_data); create_menu_item (IMAGE_MENU_ITEM, background_sub_menu, _("Background saturation"), NULL, GTK_FAKE_STOCK_EXECUTE, (GSourceFunc)dialog, GINT_TO_POINTER (CHANGE_BACKGROUND_SATURATION)); // Load background from file create_menu_item (IMAGE_MENU_ITEM, background_sub_menu, _("Set background image"), NULL, GTK_FAKE_STOCK_ABOUT, (GSourceFunc)load_background_image_from_file, win_data); #endif } // ---------------------------------------- add_separator_menu (win_data->menu); if (win_data->show_copy_paste_menu) { GtkWidget *clip_sub_menu = NULL; if (win_data->embedded_copy_paste_menu) clip_sub_menu = win_data->menu; else clip_sub_menu = create_sub_item (win_data->menu, _("Clipboard"), GTK_FAKE_STOCK_EDIT); if (win_data->enable_hyperlink) // copy_url win_data->menuitem_copy_url = create_menu_item (IMAGE_MENU_ITEM, clip_sub_menu, _("Copy URL"), NULL, GTK_FAKE_STOCK_COPY, (GSourceFunc)copy_url_clipboard, NULL); // copy win_data->menuitem_copy = create_menu_item (IMAGE_MENU_ITEM, clip_sub_menu, _("Copy"), NULL, GTK_FAKE_STOCK_COPY, (GSourceFunc)copy_clipboard, win_data); // paste win_data->menuitem_paste = create_menu_item (IMAGE_MENU_ITEM, clip_sub_menu, _("Paste"), NULL, GTK_FAKE_STOCK_PASTE, (GSourceFunc)paste_clipboard, win_data); // ---------------------------------------- add_separator_menu (clip_sub_menu); win_data->menuitem_clipboard = create_menu_item (IMAGE_MENU_ITEM, clip_sub_menu, _("View clipboard"), NULL, GTK_FAKE_STOCK_FILE, (GSourceFunc)view_clipboard, win_data); win_data->menuitem_primary = create_menu_item (IMAGE_MENU_ITEM, clip_sub_menu, _("View primary clipboard"), NULL, GTK_FAKE_STOCK_FILE, (GSourceFunc)view_primary, win_data); // ---------------------------------------- add_separator_menu (win_data->menu); } // use scrollback lines // g_debug("menuitem_hide_scroll_bar)->active = %d", win_data->scrollback_lines ? 1 : 0); // GTK_CHECK_MENU_ITEM(menuitem_hide_scroll_bar)->active = win_data->scrollback_lines ? 1 : 0; win_data->menuitem_hide_scroll_bar = create_menu_item (CHECK_MENU_ITEM, win_data->menu, _("Scrollback lines"), NULL, NULL, (GSourceFunc)hide_scrollback_lines, win_data); // GTK_CHECK_MENU_ITEM(win_data->menuitem_hide_scroll_bar)->active = win_data->show_scroll_bar; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_hide_scroll_bar), check_show_or_hide_scroll_bar(win_data)); // g_debug("create_menu(): check_show_or_hide_scroll_bar() = %d", check_show_or_hide_scroll_bar(win_data)); // clean scrollback lines create_menu_item (IMAGE_MENU_ITEM, win_data->menu, _("Clean scrollback lines"), NULL, GTK_FAKE_STOCK_CLEAR, (GSourceFunc)clean_scrollback_lines, win_data); // ---------------------------------------- add_separator_menu (win_data->menu); GtkWidget *misc_sub_menu = create_sub_item (win_data->menu, _("Misc"), GTK_FAKE_STOCK_CONVERT); create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Paste to every Vte Terminal"), NULL, GTK_FAKE_STOCK_PASTE, (GSourceFunc)paste_to_every_vte, win_data); create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Launch file manager"), NULL, GTK_FAKE_STOCK_PASTE, (GSourceFunc)open_current_dir_with_file_manager, win_data); // ---------------------------------------- add_separator_menu (misc_sub_menu); create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("View page info"), NULL, GTK_FAKE_STOCK_DIALOG_QUESTION, (GSourceFunc)view_current_page_info, win_data); // ---------------------------------------- add_separator_menu (misc_sub_menu); sub_menu = create_sub_item (misc_sub_menu, _("Erase Binding"), GTK_FAKE_STOCK_GO_BACK); GSList *erase_binding_group = NULL; for (i=0; imenuitem_erase_binding[i] = add_radio_menuitem_to_sub_menu (erase_binding_group, sub_menu, erase_binding[i].name, (GSourceFunc)set_erase_binding, GINT_TO_POINTER(erase_binding[i].value)); erase_binding_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (win_data->menuitem_erase_binding[i])); if (win_data->erase_binding == erase_binding[i].value) win_data->current_menuitem_erase_binding = win_data->menuitem_erase_binding[i]; } #ifdef ENABLE_CURSOR_SHAPE sub_menu = create_sub_item (misc_sub_menu, _("Cursor Shape"), GTK_FAKE_STOCK_GO_BACK); GSList *cursor_shape_group = NULL; for (i=0; imenuitem_cursor_shape[i] = add_radio_menuitem_to_sub_menu (cursor_shape_group, sub_menu, cursor_shape[i].name, (GSourceFunc)set_cursor_shape, GINT_TO_POINTER(cursor_shape[i].value)); cursor_shape_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (win_data->menuitem_cursor_shape[i])); if (win_data->cursor_shape == cursor_shape[i].value) win_data->current_menuitem_cursor_shape = win_data->menuitem_cursor_shape[i]; } #endif // Dim when inactive win_data->ansi_theme_menuitem[5] = win_data->menuitem_dim_text = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Dim text when inactive"), NULL, NULL, (GSourceFunc)set_dim_text, win_data); #ifdef ENABLE_RGBA if (win_data->use_rgba == -1) win_data->menuitem_dim_window = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Dim window when inactive"), NULL, NULL, (GSourceFunc)set_dim_window, win_data); #endif // Cursor Blinks win_data->menuitem_cursor_blinks = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Cursor blinks"), NULL, NULL, (GSourceFunc)set_cursor_blinks, win_data); // Bold text win_data->menuitem_allow_bold_text = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Allow bold text"), NULL, NULL, (GSourceFunc)set_allow_bold_text, win_data); // ---------------------------------------- add_separator_menu (misc_sub_menu); // Need pressed to open URL win_data->menuitem_open_url_with_ctrl_pressed = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Need pressed to open URL"), NULL, NULL, (GSourceFunc)set_open_url_with_ctrl_pressed, win_data); win_data->menuitem_disable_url_when_ctrl_pressed = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Disable URL when pressed"), NULL, NULL, (GSourceFunc)set_disable_url_when_ctrl_pressed, win_data); // ---------------------------------------- add_separator_menu (misc_sub_menu); // Audible bell win_data->menuitem_audible_bell = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Audible bell"), NULL, NULL, (GSourceFunc)set_audible_bell, win_data); #if defined(ENABLE_VISIBLE_BELL) || defined(UNIT_TEST) // Visible bell win_data->menuitem_visible_bell = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Visible bell"), NULL, NULL, (GSourceFunc)set_visible_bell, win_data); #endif #ifdef ENABLE_BEEP_SINGAL // Urgent bell win_data->menuitem_urgent_bell = create_menu_item (CHECK_MENU_ITEM, misc_sub_menu, _("Urgent bell"), NULL, NULL, (GSourceFunc)set_urgent_bell, win_data); #endif // ---------------------------------------- add_separator_menu (misc_sub_menu); #ifdef ENABLE_IM_APPEND_MENUITEMS // Input Method if (win_data->show_input_method_menu) { sub_menu = create_sub_item (misc_sub_menu, _("Switch input methods"), GTK_FAKE_STOCK_INDEX); vte_terminal_im_append_menuitems (VTE_TERMINAL(win_data->current_vte), GTK_MENU_SHELL (sub_menu)); } #endif // Edit tab name if (win_data->show_change_page_name_menu) create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Rename this tab"), NULL, GTK_FAKE_STOCK_EDIT, (GSourceFunc)dialog, GINT_TO_POINTER(EDIT_LABEL)); // ---------------------------------------- #ifdef ENABLE_IM_APPEND_MENUITEMS if ((win_data->show_input_method_menu || win_data->show_change_page_name_menu) && #else if (win_data->show_change_page_name_menu && #endif win_data->show_resize_menu) add_separator_menu (misc_sub_menu); // Show the tabs bar win_data->menuitem_show_tabs_bar = create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Show the tabs bar"), NULL, GTK_FAKE_STOCK_GOTO_BOTTOM, (GSourceFunc)launch_hide_and_show_tabs_bar, GINT_TO_POINTER(TEMPORARY_ON)); // Hide the tabs bar win_data->menuitem_hide_tabs_bar = create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Hide the tabs bar"), NULL, GTK_FAKE_STOCK_GOTO_TOP, (GSourceFunc)launch_hide_and_show_tabs_bar, GINT_TO_POINTER(TEMPORARY_OFF)); // Always shows the tabs bar win_data->menuitem_always_show_tabs_bar = create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Always show the tabs bar"), NULL, GTK_FAKE_STOCK_GOTO_BOTTOM, (GSourceFunc)launch_hide_and_show_tabs_bar, GINT_TO_POINTER(FORCE_ON)); // Always hide the tabs bar win_data->menuitem_always_hide_tabs_bar = create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Always hide the tabs bar"), NULL, GTK_FAKE_STOCK_GOTO_TOP, (GSourceFunc)launch_hide_and_show_tabs_bar, GINT_TO_POINTER(FORCE_OFF)); if (win_data->show_resize_menu) { add_separator_menu (misc_sub_menu); // Window Size create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Increase window size"), NULL, GTK_FAKE_STOCK_ZOOM_IN, (GSourceFunc)set_vte_font, GINT_TO_POINTER(FONT_ZOOM_OUT)); create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Decrease window size"), NULL, GTK_FAKE_STOCK_ZOOM_OUT, (GSourceFunc)set_vte_font, GINT_TO_POINTER(FONT_ZOOM_IN)); // ---------------------------------------- add_separator_menu (misc_sub_menu); // Reset font and window size create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Reset to user custom font/size"), NULL, GTK_FAKE_STOCK_ZOOM_100, (GSourceFunc)set_vte_font, GINT_TO_POINTER(FONT_RESET_DEFAULT)); create_menu_item (IMAGE_MENU_ITEM, misc_sub_menu, _("Reset to system font/size"), NULL, GTK_FAKE_STOCK_ZOOM_100, (GSourceFunc)set_vte_font, GINT_TO_POINTER(FONT_RESET_SYSTEM)); } // Reset create_menu_item (IMAGE_MENU_ITEM, win_data->menu, _("Reset the content"), NULL, GTK_FAKE_STOCK_REFRESH, (GSourceFunc)reset_vte, win_data); // ---------------------------------------- add_separator_menu (win_data->menu); // Usage create_menu_item (IMAGE_MENU_ITEM, win_data->menu, _("Usage"), NULL, GTK_FAKE_STOCK_HELP, (GSourceFunc)dialog, GINT_TO_POINTER(USAGE_MESSAGE)); // Get the key value for using in profile create_menu_item (IMAGE_MENU_ITEM, win_data->menu, _("Set key binding"), NULL, GTK_FAKE_STOCK_PREFERENCES, (GSourceFunc)dialog, GINT_TO_POINTER(SET_KEY_BINDING)); win_data->menuitem_load_profile_from_list = create_sub_item_subitem (_("User profile"), GTK_FAKE_STOCK_PROPERTIES); gtk_menu_shell_append (GTK_MENU_SHELL (win_data->menu), win_data->menuitem_load_profile_from_list); // win_data->subitem_load_profile_from_list = create_sub_item_submenu (win_data->menu, win_data->menuitem_load_profile_from_list); refresh_profile_list(win_data); if (win_data->show_exit_menu) { // Exit LilyTerm gchar *exit_str = g_strdup_printf(_("Quit %s"), PACKAGE); create_menu_item (IMAGE_MENU_ITEM, win_data->menu, exit_str, NULL, GTK_FAKE_STOCK_QUIT, (GSourceFunc)main_quit, win_data); g_free(exit_str); } gtk_widget_show_all(win_data->menu); #ifdef OUT_OF_MEMORY #define g_strdup fake_g_strdup #define g_strdup_printf(...) NULL #define g_strsplit fake_g_strsplit #define g_strsplit_set(x,y,z) NULL #endif return TRUE; } void recreate_theme_menu_items(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch recreate_theme_menu_items() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif if (win_data->ansi_color_menuitem) { gtk_widget_destroy(win_data->ansi_color_menuitem); // g_debug("recreate_theme_menu_items(): set win_data->current_menuitem_theme = NULL"); win_data->current_menuitem_theme = NULL; } win_data->ansi_color_menuitem = gtk_menu_new (); #ifdef SAFEMODE if (win_data->ansi_color_sub_menu) #endif gtk_menu_item_set_submenu (GTK_MENU_ITEM (win_data->ansi_color_sub_menu), win_data->ansi_color_menuitem); win_data->ansi_theme_menuitem[6] = win_data->menuitem_invert_color = create_menu_item(CHECK_MENU_ITEM, win_data->ansi_color_menuitem, _("Invert color"), NULL, NULL, (GSourceFunc)invert_color_theme, win_data); add_separator_menu (win_data->ansi_color_menuitem); gint i; GSList *theme_group = NULL; // g_debug("win_data->color_theme_str = %s", win_data->color_theme_str); for (i=0; iansi_color_menuitem, theme_group, i, 0); if (win_data->have_custom_color || win_data->use_custom_theme) { add_separator_menu (win_data->ansi_color_menuitem); for (i=0; iansi_color_menuitem, theme_group, i, 1); } gtk_widget_show_all(win_data->ansi_color_menuitem); } GSList *create_theme_menu_items(struct Window *win_data, GtkWidget *sub_menu, GSList *theme_group, gint current_theme, gint custom_theme) { #ifdef DETAIL g_debug("! Launch create_theme_menu_items() with win_data = %p, sub_menu = %p, theme_group = %p, current_theme = %d, custom_theme = %d", win_data, sub_menu, theme_group, current_theme, custom_theme); #endif #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif gchar *item_label = NULL; switch (current_theme) { case THEME-2: item_label = _("grayscale"); break; case THEME-1: item_label = _("(build-in)"); break; default: item_label = system_color_theme[current_theme].name; } gint index = system_color_theme[current_theme].index; if (custom_theme) index = win_data->custom_color_theme[current_theme].index; // don't create 256/true colors + custom if (index == (2*THEME-1)) return theme_group; if (custom_theme) item_label = g_strdup_printf(_("%s + custom"), item_label); win_data->menuitem_theme[current_theme + custom_theme*THEME] = add_radio_menuitem_to_sub_menu (theme_group, sub_menu, item_label, (GSourceFunc)select_ansi_theme, GINT_TO_POINTER(index)); #ifdef SAFEMODE if (win_data->menuitem_theme[current_theme]==NULL) return NULL; #endif theme_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (win_data->menuitem_theme[current_theme])); // g_debug("Checking win_data->color_theme_str (%s) and color_theme[current_theme].name (%s)", // win_data->color_theme_str, color_theme[current_theme].name); if (win_data->current_menuitem_theme==NULL) { // g_debug("custom_theme = %d, win_data->use_custom_theme = %d, win_data->color_theme_index = %d, current_theme = %d", // custom_theme, win_data->use_custom_theme, win_data->color_theme_index, current_theme); if ((custom_theme == win_data->use_custom_theme) && (win_data->color_theme_index == current_theme)) win_data->current_menuitem_theme = win_data->menuitem_theme[current_theme + custom_theme*THEME]; } // g_debug("Got win_data->current_menuitem_theme = %p (%d), created (%p)", // win_data->current_menuitem_theme, current_theme, win_data->menuitem_theme[current_theme + custom_theme*THEME]); // g_debug("Set the color theme %s (%p) to %p...", // system_color_theme[current_theme].name, win_data->menuitem_theme[current_theme], system_color_theme[current_theme].color); if (current_theme==0) gtk_widget_set_name(win_data->menuitem_theme[current_theme], ""); if (custom_theme) g_free(item_label); return theme_group; } void clean_scrollback_lines(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch clean_scrollback_lines()!"); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif vte_terminal_set_scrollback_lines (VTE_TERMINAL(win_data->current_vte), 0); vte_terminal_set_scrollback_lines (VTE_TERMINAL(win_data->current_vte), win_data->scrollback_lines); } void copy_url_clipboard(GtkWidget *widget, gpointer user_data) { #ifdef DETAIL g_debug("! Launch copy_url_clipboard()!"); #endif #ifdef SAFEMODE if (widget==NULL) return; #endif const gchar *widget_name = gtk_widget_get_name(widget); if (widget_name) { extern GtkClipboard *selection_clipboard; gtk_clipboard_set_text(selection_clipboard, widget_name, -1); } } void copy_clipboard(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch copy_clipboard()!"); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif vte_terminal_copy_clipboard(VTE_TERMINAL(win_data->current_vte)); } void paste_clipboard(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch paste_clipboard()!"); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // vte_terminal_paste_clipboard(VTE_TERMINAL(win_data->current_vte)); deal_key_press(win_data->window, KEY_PASTE_CLIPBOARD, win_data); } void paste_to_every_vte(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch paste_clipboard()!"); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif gint type = PASTE_TEXTS_TO_EVERY_VTE_TERMINAL; while (dialog(NULL, type)==GTK_RESPONSE_OK) { if (type == PASTE_TEXTS_TO_EVERY_VTE_TERMINAL) type = PASTE_GRABBED_KEY_TO_EVERY_VTE_TERMINAL; else type = PASTE_TEXTS_TO_EVERY_VTE_TERMINAL; } } void open_current_dir_with_file_manager(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch open_current_dir_with_file_manager() with win_data = %p!", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif open_url_with_external_command (page_data->pwd, TAG_FILE, win_data, page_data); } void view_current_page_info(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch view_current_page_info() with win_data = %p!", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif gchar *old_temp_data = win_data->temp_data; win_data->temp_data = g_strdup_printf("%s\x10%s\x10" "Encoding=%s\n" "VTE_CJK_WIDTH=%s\n" "WINDOWID=%ld", _("View current page information"), "View current page information", page_data->encoding_str, page_data->VTE_CJK_WIDTH_STR, (gtk_widget_get_window (page_data->vte))?GDK_WINDOW_XID (gtk_widget_get_window (page_data->vte)):0); dialog(NULL, GENERAL_INFO); g_free(win_data->temp_data); win_data->temp_data=old_temp_data; } void view_clipboard(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch paste_clipboard()!"); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif show_clipboard_dialog(SELECTION_CLIPBOARD, win_data, NULL, GENERAL_INFO); } void view_primary(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch paste_clipboard()!"); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif show_clipboard_dialog(SELECTION_PRIMARY, win_data, NULL, GENERAL_INFO); } void set_dim_text(GtkWidget *menuitem_dim_text, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_dim_text() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_dim_text==NULL) || (win_data==NULL)) return; #endif // win_data->dim_text = GTK_CHECK_MENU_ITEM(menuitem_dim_text)->active; win_data->dim_text = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem_dim_text)); dim_vte_text(win_data, NULL, 2); } #ifdef ENABLE_RGBA void set_dim_window(GtkWidget *menuitem_dim_text, struct Window *win_data) { # ifdef DETAIL g_debug("! Launch set_dim_window() with win_data = %p", win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return; if (win_data->menuitem_dim_window==NULL) return; # endif // win_data->dim_window = GTK_CHECK_MENU_ITEM(win_data->menuitem_dim_window)->active; win_data->dim_window = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(win_data->menuitem_dim_window)); dim_window(win_data, 2); } #endif void set_cursor_blinks(GtkWidget *menuitem_cursor_blinks, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_cursor_blinks() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_cursor_blinks==NULL) || (win_data==NULL)) return; #endif #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE // win_data->cursor_blinks = GTK_CHECK_MENU_ITEM(menuitem_cursor_blinks)->active ? // VTE_CURSOR_BLINK_ON : VTE_CURSOR_BLINK_OFF; win_data->cursor_blinks = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_cursor_blinks)) ? VTE_CURSOR_BLINK_ON : VTE_CURSOR_BLINK_OFF; #else // vte_terminal_set_cursor_blinks is deprecated since vte 0.17.1 // win_data->cursor_blinks = GTK_CHECK_MENU_ITEM(menuitem_cursor_blinks)->active; win_data->cursor_blinks = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_cursor_blinks)); #endif gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif set_cursor_blink(win_data, page_data); } } void set_allow_bold_text(GtkWidget *menuitem_allow_bold_text, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_allow_bold_text() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_allow_bold_text==NULL) || (win_data==NULL)) return; #endif win_data->allow_bold_text = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_allow_bold_text)); gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif vte_terminal_set_allow_bold(VTE_TERMINAL(page_data->vte), win_data->allow_bold_text); } } void set_open_url_with_ctrl_pressed(GtkWidget *menuitem_open_url_with_ctrl_pressed, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_open_url_with_ctrl_pressed() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_open_url_with_ctrl_pressed==NULL) || (win_data==NULL)) return; #endif win_data->open_url_with_ctrl_pressed = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_open_url_with_ctrl_pressed)); if (win_data->open_url_with_ctrl_pressed) win_data->disable_url_when_ctrl_pressed = FALSE; } void set_disable_url_when_ctrl_pressed(GtkWidget *menuitem_disable_url_when_ctrl_pressed, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_disable_url_when_ctrl_pressed() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_disable_url_when_ctrl_pressed==NULL) || (win_data==NULL)) return; #endif win_data->disable_url_when_ctrl_pressed = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_disable_url_when_ctrl_pressed)); if (win_data->disable_url_when_ctrl_pressed) win_data->open_url_with_ctrl_pressed = FALSE; // g_debug("set_disable_url_when_ctrl_pressed(): set win_data->disable_url_when_ctrl_pressed = %d", win_data->disable_url_when_ctrl_pressed); } void set_audible_bell(GtkWidget *menuitem_audible_bell, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_audible_bell() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_audible_bell==NULL) || (win_data==NULL)) return; #endif // win_data->audible_bell = GTK_CHECK_MENU_ITEM(menuitem_audible_bell)->active; win_data->audible_bell = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_audible_bell)); gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif vte_terminal_set_audible_bell (VTE_TERMINAL(page_data->vte), win_data->audible_bell); } } #if defined(ENABLE_VISIBLE_BELL) || defined(UNIT_TEST) void set_visible_bell(GtkWidget *menuitem_visible_bell, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_visible_bell() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((menuitem_visible_bell==NULL) || (win_data==NULL)) return; #endif // win_data->visible_bell = GTK_CHECK_MENU_ITEM(menuitem_visible_bell)->active; win_data->visible_bell = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_visible_bell)); gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif vte_terminal_set_visible_bell (VTE_TERMINAL(page_data->vte), win_data->visible_bell); } } #endif #if defined(ENABLE_BEEP_SINGAL) || defined(UNIT_TEST) void set_urgent_bell(GtkWidget *menuitem_urgent_bell, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_urgent_bell() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return; #endif // win_data->urgent_bell = GTK_CHECK_MENU_ITEM(menuitem_urgent_bell)->active; if (menuitem_urgent_bell) { win_data->urgent_bell = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_urgent_bell)); // Don't do urgent bell if settings is not changed, if (win_data->urgent_bell_status == win_data->urgent_bell) return; } gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif set_vte_urgent_bell(win_data, page_data); } win_data->urgent_bell_status = win_data->urgent_bell; } void set_vte_urgent_bell(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch set_urgent_bell() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL)) return; #endif extern gboolean menu_activated; extern gint dialog_activated; // g_debug("win_data->urgent_bell = %d, win_data->lost_focus = %d, menu_activated = %d, dialog_activated = %d", // win_data->urgent_bell, win_data->lost_focus, menu_activated, dialog_activated); if (win_data->urgent_bell && win_data->lost_focus && (menu_activated == FALSE) && (dialog_activated == FALSE)) { // g_debug("set_vte_urgent_bell: get page_data->urgent_bell_handler_id = %ld", page_data->urgent_bell_handler_id); if (page_data->urgent_bell_handler_id==0) page_data->urgent_bell_handler_id = g_signal_connect(G_OBJECT(page_data->vte), "beep", G_CALLBACK(urgent_beep), page_data); } else { if (page_data->urgent_bell_handler_id) g_signal_handler_disconnect(G_OBJECT(page_data->vte), page_data->urgent_bell_handler_id); page_data->urgent_bell_handler_id = 0; } } void urgent_beep(GtkWidget *window, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch urgent_beep() with page_data = %p", page_data); #endif #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif if (win_data->urgent_bell_focus_in_event_id==0) { // g_debug("Create win_data->vte focus-in-event event!"); win_data->urgent_bell_focus_in_event_id = g_signal_connect(G_OBJECT(win_data->window), "focus-in-event", G_CALLBACK(stop_urgency_hint), win_data); if (gtk_window_get_urgency_hint(GTK_WINDOW(win_data->window))==FALSE) gtk_window_set_urgency_hint(GTK_WINDOW(win_data->window), TRUE); } } gboolean stop_urgency_hint(GtkWidget *window, GdkEvent *event, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch stop_urgency_hint() with win_data= %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif if (win_data->urgent_bell_focus_in_event_id) { if (gtk_window_get_urgency_hint(GTK_WINDOW(win_data->window))) gtk_window_set_urgency_hint(GTK_WINDOW(win_data->window), FALSE); g_signal_handler_disconnect(G_OBJECT(win_data->window), win_data->urgent_bell_focus_in_event_id); win_data->urgent_bell_focus_in_event_id = 0; } return FALSE; } #endif void launch_hide_and_show_tabs_bar(GtkWidget *widget, Switch_Type show_tabs_bar) { #ifdef DETAIL g_debug("! Launch launch_hide_and_show_tabs_bar() with show_tabs_bar = %d", show_tabs_bar); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("launch_hide_and_show_tabs_bar()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif gint total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)); switch(show_tabs_bar) { case TEMPORARY_ON: if (total_page > 1) win_data->show_tabs_bar = AUTOMATIC; else win_data->show_tabs_bar = TEMPORARY_ON; break; case TEMPORARY_OFF: if (total_page > 1) win_data->show_tabs_bar = TEMPORARY_OFF; else win_data->show_tabs_bar = AUTOMATIC; break; case FORCE_ON: win_data->show_tabs_bar = FORCE_ON; break; case FORCE_OFF: win_data->show_tabs_bar = FORCE_OFF; break; default: # ifdef FATAL print_switch_out_of_range_error_dialog("launch_hide_and_show_tabs_bar", "show_tabs_bar", show_tabs_bar); # endif break; } // g_debug("launch_hide_and_show_tabs_bar(): call hide_and_show_tabs_bar() with show_tabs_bar = %d", show_tabs_bar); hide_and_show_tabs_bar(win_data , show_tabs_bar); } GtkWidget *check_name_in_menuitem(GtkWidget *sub_menu, const gchar *name, gboolean case_sensitive) { #ifdef DETAIL g_debug("! Launch check_name_in_menuitem() with name = %s", name); #endif #ifdef OUT_OF_MEMORY # undef gtk_widget_get_name #endif #ifdef SAFEMODE // FIXME: if sub_menu == NULL... if ((sub_menu==NULL) || (name==NULL)) return NULL; #endif // GList *widget_list = GTK_MENU_SHELL(sub_menu)->children; GList *widget_list = gtk_container_get_children(GTK_CONTAINER(sub_menu)); GtkWidget *return_menuitem = NULL; GtkWidget *menu_item = NULL; while (widget_list!=NULL) { menu_item = widget_list->data; // g_debug("Got the menu_item = %p", menu_item); if (menu_item==NULL) break; // g_debug("Checking %s for %s...", gtk_widget_get_name(menu_item), name); if (! compare_strings(gtk_widget_get_name(menu_item), name, case_sensitive)) return_menuitem = menu_item; // g_debug("Checking %s and %s... (Got %p)", // gtk_widget_get_name(menu_item), name, return_menuitem); if (return_menuitem) return return_menuitem; widget_list = widget_list->next; } return NULL; #ifdef OUT_OF_MEMORY #define gtk_widget_get_name(x) NULL #endif } GtkWidget *add_radio_menuitem_to_sub_menu(GSList *encoding_group, GtkWidget *sub_menu, const gchar *name, GSourceFunc func, gpointer func_data) { #ifdef DETAIL g_debug("! Launch add_radio_menuitem_to_sub_menu() with encoding_group = %p, sub_menu = %p, name = %s", encoding_group, sub_menu, name); #endif #ifdef SAFEMODE if ((sub_menu==NULL) ||(name==NULL)) return NULL; #endif GtkWidget *menu_item = gtk_radio_menu_item_new_with_label(encoding_group, name); gtk_widget_set_name(menu_item, name); gtk_menu_shell_append(GTK_MENU_SHELL(sub_menu), menu_item); g_signal_connect(menu_item, "activate", G_CALLBACK(func), func_data); return menu_item; } // it will return how many items have been created. gint add_menuitem_to_locale_sub_menu(struct Window *win_data, gint no, gchar *name) { #ifdef DETAIL g_debug("! Launch add_menuitem_to_locale_sub_menu() with win_data = %p, no = %d, name = %s", win_data, no, name); #endif #ifdef OUT_OF_MEMORY # undef g_strdup_printf #endif #ifdef SAFEMODE if ((win_data==NULL) || (name==NULL)) return 0; #endif gchar *encoding = get_encoding_from_locale(name); gint item_created = 1; // if name = "zh_TW.UTF-8" or just "UTF-8" // g_debug("add_menuitem_to_locale_sub_menu(): Got encoding = %s", encoding); if (encoding==NULL && (compare_strings(name, "UTF-8", FALSE))) { if (check_and_add_locale_to_warned_locale_list(win_data, name)) create_invalid_locale_error_message(name); if (check_if_win_data_is_still_alive(win_data) == FALSE) { item_created = -1; goto FINISH; } // g_debug("add_menuitem_to_locale_sub_menu(): win_data (%p) is still alive!!!", win_data); // Check if win_data is still alive return 0; } if ((! compare_strings(encoding, "UTF-8", FALSE)) || (! compare_strings(name, "UTF-8", FALSE))) item_created = 2; gsize i; for (i=0; ilocale_sub_menu) #endif gtk_menu_shell_append(GTK_MENU_SHELL(win_data->locale_sub_menu), menu_item); // g_debug("win_data->locale_group = %p", win_data->locale_group); // win_data->locale_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); g_signal_connect(menu_item, "activate", G_CALLBACK(new_tab_with_locale), (gsize *)i); if (item_name != name) g_free(item_name); } FINISH: g_free(encoding); setlocale(LC_CTYPE, init_LC_CTYPE); // g_debug("init_LC_CTYPE = %s, Recover to %s", init_LC_CTYPE, (char*)g_getenv("LC_CTYPE")); return item_created; #ifdef OUT_OF_MEMORY #define g_strdup_printf(...) NULL #endif } //gboolean check_locale_in_menuitem(GList *locale_list, const gchar *name) //{ // //g_debug("Calling check_locale_in_menuitem with locale_list = %p, name =%s, total = %d", // // locale_list, name, g_list_length(locale_list)); // GList *widget_list = NULL; // int i; // // for (i=0; i< g_list_length(locale_list); i++) // { // widget_list = g_list_nth(locale_list, i); // // g_debug("Checking the locale %s with %s", (gchar *)widget_list->data, name); // if (g_ascii_strcasecmp (widget_list->data, name)==0) // return TRUE; // } // return FALSE; //} void reset_vte(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch reset_vte()!"); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif vte_terminal_reset(VTE_TERMINAL(win_data->current_vte), TRUE, FALSE); } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) void set_trans_bg(GtkWidget *menuitem_trans_bg, struct Window *win_data) { # ifdef DETAIL g_debug("! Launch set_trans_bg() for win_data %p", win_data); # endif # ifdef SAFEMODE if ((menuitem_trans_bg==NULL) || (win_data==NULL)) return; # endif // win_data->transparent_background = GTK_CHECK_MENU_ITEM(menuitem_trans_bg)->active; win_data->transparent_background = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem_trans_bg)); gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); # ifdef SAFEMODE if (page_data) # endif set_background_saturation (NULL, 0, win_data->background_saturation, page_data->vte); } } #endif #ifdef ENABLE_RGBA void set_trans_win(GtkWidget *widget, GtkWidget *window) { #ifdef DETAIL g_debug("! Launch set_trans_win() for window %p!", window); #endif #ifdef SAFEMODE if (window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("Get win_data = %d when set_trans_win!", win_data); // win_data->transparent_window = GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_win)->active; win_data->transparent_window = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_win)); set_window_opacity (NULL, 0, win_data->window_opacity, win_data); } #endif void invert_color_theme(GtkWidget *menuitem, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch invert_color_theme() with menuitem = %p", menuitem); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif if (win_data->checking_menu_item) return; win_data->color_brightness = - win_data->color_brightness; win_data->color_brightness_inactive = - win_data->color_brightness_inactive; // g_debug("invert_color_theme(): win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->color_brightness, win_data->color_brightness_inactive); #ifdef SAFEMODE if (menuitem) #endif set_ansi_theme(menuitem, ANSI_THEME_INVERT_COLOR, win_data->use_custom_theme, gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem)), -1, win_data); } void select_ansi_theme(GtkWidget *menuitem, gint index) { #ifdef DETAIL g_debug("! Launch select_ansi_theme() with menuitem = %p, index = %d", menuitem, index); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("set_ansi_theme()"); #endif #ifdef SAFEMODE if ((index < 0) || (index >= (COLOR*2))) return; if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("select_ansi_theme(): win_data->invert_color = %d", win_data->invert_color); if (index < THEME) set_ansi_theme(menuitem, ANSI_THEME_SET_ANSI_THEME, FALSE, win_data->invert_color, index, win_data); else set_ansi_theme(menuitem, ANSI_THEME_SET_ANSI_THEME, TRUE, win_data->invert_color, index - THEME, win_data); enable_disable_theme_menus(win_data, (index!=(THEME-1))); } void set_ansi_theme(GtkWidget *menuitem, Set_ANSI_Theme_Type type, gboolean use_custom_theme, gboolean invert_color, gint theme_index, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_ansi_theme() with type = %d, invert_color = %d, theme_index = %d, win_data = %p", type, invert_color, theme_index, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif if (type == ANSI_THEME_INVERT_COLOR) { if (invert_color == win_data->invert_color) return; win_data->invert_color = invert_color; } else { if ((win_data->checking_menu_item) || ((win_data->use_custom_theme == use_custom_theme) && (win_data->color_theme_index == theme_index))) return; win_data->color_theme_index = theme_index; win_data->use_custom_theme = use_custom_theme; } gint i; generate_all_color_datas (win_data); struct Page *page_data = NULL; gboolean default_vte_theme = use_default_vte_theme(win_data); // g_debug("Get default_vte_theme = %d", default_vte_theme); if (menuitem) { for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif set_vte_color(page_data->vte, default_vte_theme, win_data->custom_cursor_color, win_data->cursor_color, win_data->color, FALSE, (win_data->color_theme_index==(THEME-1))); } if (menuitem != win_data->menuitem_invert_color) { // g_debug("Set the color theme to %s!", gtk_menu_item_get_label(GTK_MENU_ITEM(menuitem))); win_data->current_menuitem_theme = menuitem; } } else { #ifdef SAFEMODE if (win_data->current_vte) { #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data) #endif set_vte_color(page_data->vte, default_vte_theme, win_data->custom_cursor_color, win_data->cursor_color, win_data->color, FALSE, (win_data->color_theme_index==(THEME-1))); #ifdef SAFEMODE } #endif } } void set_auto_save(GtkWidget *menuitem, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_auto_save() with menuitem = %p, win_data = %p", menuitem, win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (menuitem==NULL)) return; #endif if (win_data->checking_menu_item) return; win_data->auto_save = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(menuitem)); // g_debug("Set win_data->auto_save to %d", win_data->auto_save); } void set_erase_binding (GtkWidget *menuitem, gint value) { #ifdef DETAIL g_debug("! Launch set_erase_binding() with menuitem = %p!, value = %d", menuitem, value); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("set_erase_binding()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif if ((win_data->checking_menu_item) || (win_data->erase_binding == value)) return; win_data->erase_binding = value; gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif vte_terminal_set_backspace_binding (VTE_TERMINAL(page_data->vte), win_data->erase_binding); } win_data->current_menuitem_erase_binding = menuitem; } #if defined(ENABLE_CURSOR_SHAPE) || defined(UNIT_TEST) void set_cursor_shape (GtkWidget *menuitem, gint value) { #ifdef DETAIL g_debug("! Launch set_cursor_shape() with menuitem = %p!, value = %d", menuitem, value); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("set_cursor_shape()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif if ((win_data->checking_menu_item) || (win_data->cursor_shape == value)) return; win_data->cursor_shape = value; gint i; struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data) #endif vte_terminal_set_cursor_shape(VTE_TERMINAL(page_data->vte), win_data->cursor_shape); } win_data->current_menuitem_cursor_shape = menuitem; } #endif // it is OK to use either zh_TW.Big5 or Big5 here void set_encoding(GtkWidget *menuitem, gpointer user_data) { #ifdef SAFEMODE if (menuitem==NULL) return; #endif // g_debug("GTK_CHECK_MENU_ITEM(menuitem)->active = %d", GTK_CHECK_MENU_ITEM(menuitem)->active); // if (!GTK_CHECK_MENU_ITEM(menuitem)->active) return; if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) == FALSE) return; #ifdef DETAIL g_debug("! Launch set_encoding()"); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("set_encoding()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif // No action when just right click the mouse if (win_data->checking_menu_item) return; struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif const gchar *encoding = gtk_widget_get_name(menuitem); g_free (page_data->encoding_str); page_data->encoding_str = g_strdup(encoding); // g_debug("Trying to set %d page (%p) to encoding %s...", page_data->page_no, vte, encoding); vte_terminal_set_encoding(VTE_TERMINAL(win_data->current_vte), encoding); // page_data->page_name==NULL: add_page() will call set_encoding() before page_data->label is created. // And it will cause the following error: "Document ended unexpectedly while inside an attribute value" if (win_data->page_shows_encoding && page_data->page_name!=NULL) update_page_name (page_data->window, win_data->current_vte, page_data->page_name, page_data->label_text, page_data->page_no+1, page_data->custom_page_name, page_data->tab_color, page_data->is_root, page_data->is_bold, compare_strings(win_data->runtime_encoding, page_data->encoding_str, FALSE), page_data->encoding_str, page_data->custom_window_title, FALSE); } void new_tab_with_locale(GtkWidget *locale_menuitem, gboolean VTE_CJK_WIDTH) { #ifdef DETAIL if (locale_menuitem) g_debug("! Launch new_tab_with_locale() with locale = %s and VTE_CJK_WIDTH = %d", gtk_widget_get_name(locale_menuitem), VTE_CJK_WIDTH); else g_debug("! Launch new_tab_with_locale() with VTE_CJK_WIDTH = %d", VTE_CJK_WIDTH); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("new_tab_with_locale()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif // g_debug("locale_menuitem->name = %s", gtk_widget_get_name(locale_menuitem); struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("Got the VTE_CJK_WIDTH = %s", gtk_widget_get_name(locale_menuitem); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); // menuitem == NULL: The locales_list in profile is empty. Only VTE_CJK_WIDTH is setted. // if (menuitem) // g_debug("Add page by %p to locale %s", win_data->current_vte, gtk_widget_get_name(menuitem); // locale should not be free() const gchar *locale = gtk_widget_get_name(locale_menuitem); gchar *encoding = NULL; if (compare_strings(locale, "UTF-8", FALSE)) { encoding = get_encoding_from_locale(locale); if (encoding==NULL) { if (check_and_add_locale_to_warned_locale_list(win_data, (gchar *)locale)) create_invalid_locale_error_message((gchar *)locale); goto FINISH; } } else { locale = "POSIX"; encoding = g_strdup("UTF-8"); } // g_debug("Get locale = %s, encoding = %s", locale, encoding); // struct Page *add_page(struct Window *win_data, // struct Page *page_data_prev, // GtkWidget *menuitem_encoding, // gchar *encoding, // gchar *locale, // gchar *environments, // gchar *user_environ, // gboolean run_once, // gchar *VTE_CJK_WIDTH_STR, // gboolean add_to_next) #ifdef SAFEMODE if (page_data) #endif add_page(win_data, page_data, NULL, (gchar *) encoding, page_data->encoding_str, (gchar *) locale, NULL, NULL, get_VTE_CJK_WIDTH_str(VTE_CJK_WIDTH+1), TRUE); #ifdef SAFEMODE else add_page(win_data, NULL, NULL, (gchar *) encoding, encoding, (gchar *) locale, NULL, NULL, get_VTE_CJK_WIDTH_str(VTE_CJK_WIDTH+1), TRUE); #endif FINISH: setlocale(LC_CTYPE, init_LC_CTYPE); g_free(encoding); } void select_font(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch select_font() for win_data %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif GtkWidget *dialog = gtk_font_chooser_dialog_new(_("Font Selection"), GTK_WINDOW(win_data->window)); gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW(win_data->window)); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); // set the default font name in gtk_font_selection_dialog #ifdef SAFEMODE if (page_data->font_name) #endif gtk_font_chooser_set_font(GTK_FONT_CHOOSER(dialog), page_data->font_name); if (gtk_dialog_run(GTK_DIALOG(dialog))==GTK_RESPONSE_OK) { // g_debug("Trying to change font name!"); g_free(page_data->font_name); page_data->font_name = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(dialog)); #ifdef USE_GTK2_GEOMETRY_METHOD set_vte_font(NULL, FONT_SET_TO_SELECTED); #else g_idle_add((GSourceFunc)idle_set_vte_font_to_selected, win_data); #endif } gtk_widget_destroy(dialog); } #ifdef OUT_OF_MEMORY # undef g_strdup # undef g_strdup_printf # undef g_strsplit # undef g_strsplit_set #endif gboolean refresh_locale_and_encoding_list(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch refresh_locale_and_encoding_list() for win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif gboolean response = TRUE; gint i = 0; GtkWidget *menu_item = NULL; for (i=0; i<3; i++) { #ifdef SAFEMODE if (win_data->encoding_locale_menuitems[i]) { #endif gtk_widget_hide(win_data->encoding_locale_menuitems[i]); // g_debug("Set not show win_data->encoding_locale_menuitems[%d] (%p)!", // i, win_data->encoding_locale_menuitems[i]); gtk_widget_set_no_show_all(win_data->encoding_locale_menuitems[i], TRUE); #ifdef SAFEMODE } #endif } // g_debug("Got locales_list = '%s' ( %d bytes)",win_data->locales_list, strlen(win_data->locales_list)); gint utf8_in_supported_locales = FALSE; // g_debug("system_locale_list = %s", system_locale_list); // g_debug("win_data->runtime_locale_list = %s", win_data->runtime_locale_list); // g_debug("win_data->default_locale = %s", win_data->default_locale); // g_debug("win_data->locales_list = %s", win_data->locales_list); gchar *full_locales_list = join_strings_to_string(' ', 4, system_locale_list, win_data->runtime_locale_list, win_data->default_locale, win_data->locales_list); // g_debug("create_menu(): full_locales_list = %s", full_locales_list); GString *encoding_list_from_locale = g_string_new (""); gchar **supported_locales = split_string(full_locales_list, " ", -1); // print_array("refresh_locale_and_encoding_list(): supported_locales", supported_locales); // g_debug("Get current_encoding = %s", (gchar *)vte_terminal_get_encoding( // VTE_TERMINAL(win_data->current_vte))); // g_debug("lc_all = %s", lc_all); #ifdef SAFEMODE if (supported_locales) { #endif gchar *encoding = NULL; i=0; while (supported_locales[i]) { encoding = get_encoding_from_locale(supported_locales[i]); // g_debug("Got get_encoding_from_locale for %s = %s", // supported_locales[i], encoding); if (encoding) { #ifdef SAFEMODE if (encoding_list_from_locale) { #endif if (encoding_list_from_locale->len) g_string_append_printf(encoding_list_from_locale, "%c%s", ' ', encoding); else g_string_append_printf(encoding_list_from_locale, "%s", encoding); } #ifdef SAFEMODE } #endif if (! compare_strings(encoding, "UTF-8", FALSE)) utf8_in_supported_locales = TRUE; g_free(encoding); i++; } setlocale(LC_CTYPE, init_LC_CTYPE); #ifdef SAFEMODE } #endif // g_debug("init_LC_CTYPE = %s, Recover to %s", init_LC_CTYPE, (char*)g_getenv("LC_CTYPE")); // g_debug("create_menu(): encoding_list_from_locale = %s", encoding_list_from_locale->str); // g_debug("vte_terminal_get_encoding() = %s", (gchar *)vte_terminal_get_encoding( // VTE_TERMINAL(win_data->current_vte))); // g_debug("init_encoding = %s", init_encoding); // g_debug("win_data->runtime_encoding = %s", win_data->runtime_encoding); // g_debug("win_data->default_encoding = %s", win_data->default_encoding); // g_debug("encoding_list_from_locale->str = %s", encoding_list_from_locale->str); gchar *full_encodings_list; #ifdef SAFEMODE if (encoding_list_from_locale==NULL) { if (win_data->current_vte) full_encodings_list = join_strings_to_string(' ', 4, (gchar *)vte_terminal_get_encoding( VTE_TERMINAL(win_data->current_vte)), "UTF-8", init_encoding, win_data->runtime_encoding); else full_encodings_list = join_strings_to_string(' ', 3, "UTF-8", init_encoding, win_data->runtime_encoding); } else { if (win_data->current_vte) #endif full_encodings_list = join_strings_to_string(' ', 5, (gchar *)vte_terminal_get_encoding( VTE_TERMINAL(win_data->current_vte)), "UTF-8", init_encoding, win_data->runtime_encoding, encoding_list_from_locale->str); #ifdef SAFEMODE else full_encodings_list = join_strings_to_string(' ', 4, "UTF-8", init_encoding, win_data->runtime_encoding, encoding_list_from_locale->str); } #endif g_string_free(encoding_list_from_locale, TRUE); // g_debug("create_menu(): full_encodings_list = %s", full_encodings_list); gint count_encoding_menu=0; gchar **supported_encodings = split_string(full_encodings_list, " ", -1); // print_array ("supported_encodings", supported_encodings); #ifdef SAFEMODE if (supported_encodings) { #endif if (win_data->encoding_sub_menu) gtk_widget_destroy(win_data->encoding_sub_menu); win_data->encoding_sub_menu = gtk_menu_new (); #ifdef SAFEMODE if (win_data->encoding_locale_menuitems[0]) #endif gtk_menu_item_set_submenu (GTK_MENU_ITEM (win_data->encoding_locale_menuitems[0]), win_data->encoding_sub_menu); GSList *encoding_group = NULL; i=0; while (supported_encodings[i]!=NULL) { // g_debug("Checking (%d) %s...", i, supported_encodings[i]); if (supported_encodings[i] && !(check_name_in_menuitem(win_data->encoding_sub_menu, supported_encodings[i], FALSE))) { menu_item = add_radio_menuitem_to_sub_menu (encoding_group, win_data->encoding_sub_menu, supported_encodings[i], (GSourceFunc)set_encoding, NULL); // g_debug("Add [ (%ld) %s ] to encoding_sub_menu", i, supported_encodings[i]); encoding_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menu_item)); if (i==0) { // g_debug("Set [ %s ] as win_data->default_menuitem_encoding", // supported_encodings[i]); win_data->default_menuitem_encoding = menu_item; } count_encoding_menu ++; } i++; } if (count_encoding_menu>1) { // g_debug("Show win_data->encoding_locale_menuitems[0] (%p)!", // win_data->encoding_locale_menuitems[0]); #ifdef SAFEMODE if (win_data->encoding_locale_menuitems[0]) #endif gtk_widget_set_no_show_all(win_data->encoding_locale_menuitems[0], FALSE); } else { // g_debug("Set win_data->encoding_sub_menu = NULL"); gtk_widget_destroy(win_data->encoding_sub_menu); win_data->encoding_sub_menu = NULL; } g_strfreev(supported_encodings); #ifdef SAFEMODE } #endif g_free(full_encodings_list); gint count_locale_menu=0; // print_array("refresh_locale_and_encoding_list(): supported_locales", supported_locales); if (supported_locales) { int j; for (j=0; j<2; j++) { GtkWidget *sub_menu_item=NULL; if (j) sub_menu_item = win_data->encoding_locale_menuitems[1]; else sub_menu_item = win_data->encoding_locale_menuitems[2]; // g_debug("Set sub_menu_item = %p for win_data (%p)", sub_menu_item, win_data); if (win_data->locale_sub_menu) gtk_widget_destroy(win_data->locale_sub_menu); win_data->locale_sub_menu = gtk_menu_new (); #ifdef SAFEMODE if (sub_menu_item) #endif gtk_menu_item_set_submenu (GTK_MENU_ITEM (sub_menu_item), win_data->locale_sub_menu); i=0; while (supported_locales[i]!=NULL) { // g_debug("Checking %s...", supported_locales[i]); if ((supported_locales[i][0] == '\0') || ((j==0) && utf8_in_supported_locales && (compare_strings (supported_locales[i], "UTF-8", TRUE)==0))) { i++; continue; } // if NULL: Not find in sub_menu gint menu_created = 0; if (!(check_name_in_menuitem(win_data->locale_sub_menu, supported_locales[i], TRUE))) { menu_created = add_menuitem_to_locale_sub_menu(win_data, i, supported_locales[i]); if (menu_created==-1) { response = FALSE; goto FINISH; } } count_locale_menu += menu_created; i++; } if ((count_locale_menu>1) || (compare_strings(full_locales_list, "UTF-8", FALSE))) { // if the total of menu item is >1, add it to menu. // gtk_menu_shell_append (GTK_MENU_SHELL (win_data->menu), sub_menu_item); // don't create "New tab" submenu. // g_debug("Show sub_menu_item(%p)!", sub_menu_item); #ifdef DEBUG // if ((GTK_IS_WIDGET(sub_menu_item)==FALSE) || (sub_menu_item==NULL)) // g_debug("! refresh_locale_and_encoding_list(): " // "sub_menu_item = %p for win_data (%p) is not a widget!", // sub_menu_item, win_data); #endif #ifdef SAFEMODE if (GTK_IS_WIDGET(sub_menu_item)==FALSE) { response = FALSE; goto FINISH; } #endif gtk_widget_set_no_show_all(sub_menu_item, FALSE); j=2; } else count_locale_menu = 0; } if (win_data->encoding_sub_menu) { if (count_encoding_menu) add_separator_menu (win_data->encoding_sub_menu); create_menu_item (IMAGE_MENU_ITEM, win_data->encoding_sub_menu, _("Add other locales..."), NULL, GTK_FAKE_STOCK_ADD, (GSourceFunc)dialog, GINT_TO_POINTER (ADD_NEW_LOCALES)); } if (count_locale_menu) add_separator_menu (win_data->locale_sub_menu); create_menu_item (IMAGE_MENU_ITEM, win_data->locale_sub_menu, _("Add other locales..."), NULL, GTK_FAKE_STOCK_ADD, (GSourceFunc)dialog, GINT_TO_POINTER (ADD_NEW_LOCALES)); } for (i=0; i<3; i++) #ifdef SAFEMODE if (win_data->encoding_locale_menuitems[i]) #endif gtk_widget_show_all(win_data->encoding_locale_menuitems[i]); FINISH: g_free(full_locales_list); g_strfreev(supported_locales); return response; } void refresh_profile_list (struct Window *win_data) { #ifdef DETAIL g_debug("! Launch refresh_profile_list() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif long new_profile_dir_modtime = get_profile_dir_modtime(); // g_debug("new_profile_dir_modtime = %ld", new_profile_dir_modtime); if ((new_profile_dir_modtime != win_data->profile_dir_modtime) || (new_profile_dir_modtime == -1)) { // g_debug("Update the profile list!!!"); // g_debug("refresh_profile_list: win_data->subitem_new_window_from_list = %p, " // "win_data->subitem_load_profile_from_list = %p.", // win_data->subitem_new_window_from_list, // win_data->subitem_load_profile_from_list); win_data->subitem_new_window_from_list = recreate_profile_menu_item(win_data->menuitem_new_window_from_list, win_data->subitem_new_window_from_list, win_data, NEW_WINDOW_FROM_PROFILE); win_data->subitem_load_profile_from_list = recreate_profile_menu_item(win_data->menuitem_load_profile_from_list, win_data->subitem_load_profile_from_list, win_data, LOAD_FROM_PROFILE); win_data->profile_dir_modtime = new_profile_dir_modtime; // g_debug("refresh_profile_list: win_data->subitem_new_window_from_list = %p, " // "win_data->subitem_load_profile_from_list = %p.", // win_data->subitem_new_window_from_list, // win_data->subitem_load_profile_from_list); } } GtkWidget *recreate_profile_menu_item(GtkWidget *menuitem, GtkWidget *subitem, struct Window *win_data, Apply_Profile_Type type) { #ifdef DETAIL g_debug("! Launch recreate_profile_menu_item()! with menuitem = %p, subitem = %p, win_data = %p, " "type = %d", menuitem, subitem, win_data, type); #endif #ifdef SAFEMODE if ((win_data==NULL) || (menuitem==NULL)) return NULL; #endif // g_debug("Trying to destroy subitem (%p)!!", subitem); if (subitem) gtk_widget_destroy(subitem); subitem = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), subitem); if (type == NEW_WINDOW_FROM_PROFILE) create_new_window_from_menu_items(subitem, GTK_FAKE_STOCK_NEW); else create_load_profile_from_menu_items(subitem, GTK_FAKE_STOCK_APPLY, win_data); // g_debug("SHOW ALL: %p", subitem); gtk_widget_show_all(subitem); return subitem; } void create_new_window_from_menu_items(GtkWidget *sub_menu, const gchar *stock_id) { #ifdef DETAIL g_debug("! Launch create_new_window_from_menu_items() with sub_menu = %p, stock_id = %s", sub_menu, stock_id); #endif if (create_profile_menu_list(sub_menu, stock_id, (GSourceFunc)apply_profile_from_menu_item, GINT_TO_POINTER(NEW_WINDOW_FROM_PROFILE))) add_separator_menu (sub_menu); create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Other settings..."), NULL, GTK_FAKE_STOCK_ADD, (GSourceFunc)apply_profile_from_file_dialog, GINT_TO_POINTER(NEW_WINDOW_FROM_PROFILE)); } void create_load_profile_from_menu_items(GtkWidget *sub_menu, const gchar *stock_id, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch create_load_profile_from_menu_items() with sub_menu = %p, " "stock_id = %s", sub_menu, stock_id); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // Profile //menu_item = gtk_image_menu_item_new_with_label(_("Profile sample")); win_data->menuitem_auto_save = create_menu_item(CHECK_MENU_ITEM, sub_menu, _("Save settings automatically"), NULL, NULL, (GSourceFunc)set_auto_save, win_data); add_separator_menu (sub_menu); create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Save settings"), NULL, GTK_FAKE_STOCK_SAVE, (GSourceFunc)save_user_settings, win_data); create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Save settings as..."), NULL, GTK_FAKE_STOCK_SAVE_AS, (GSourceFunc)save_user_settings_as, win_data); add_separator_menu (sub_menu); // Reload Settings create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Reload settings"), NULL, GTK_FAKE_STOCK_REVERT_TO_SAVED, (GSourceFunc)reload_settings, win_data); // gchar *menu_label = g_strdup_printf(_("Apply to every %s window"), PACKAGE); //#ifdef SAFEMODE // if (menu_label) // { //#endif // create_menu_item (IMAGE_MENU_ITEM, sub_menu, menu_label, NULL, GTK_FAKE_STOCK_REFRESH, // (GSourceFunc)apply_to_every_window, win_data); //#ifdef SAFEMODE // } //#endif // g_free(menu_label); add_separator_menu(sub_menu); if (create_profile_menu_list(sub_menu, GTK_FAKE_STOCK_APPLY, (GSourceFunc)apply_profile_from_menu_item, GINT_TO_POINTER(LOAD_FROM_PROFILE))) add_separator_menu (sub_menu); create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("Other settings..."), NULL, GTK_FAKE_STOCK_ADD, (GSourceFunc)apply_profile_from_file_dialog, GINT_TO_POINTER(LOAD_FROM_PROFILE)); } gboolean create_profile_menu_list(GtkWidget *sub_menu, const gchar *stock_id, GSourceFunc func, gpointer func_data) { #ifdef DETAIL g_debug("! Launch create_profile_menu_list() with sub_menu = %p, stock_id = %s", sub_menu, stock_id); #endif #ifdef SAFEMODE if (sub_menu==NULL) return FALSE; #endif gboolean create_separator = FALSE; // LilyTerm Buildin Configures gchar *menu_label = g_strdup_printf(_("%s default"), PACKAGE); #ifdef SAFEMODE if (menu_label) { #endif create_menu_item (IMAGE_MENU_ITEM, sub_menu, menu_label, "", stock_id, (GSourceFunc)func, func_data); create_separator = TRUE; #ifdef SAFEMODE } #endif g_free(menu_label); // System Profile gpointer system_func_data; if (func_data==GINT_TO_POINTER(NEW_WINDOW_FROM_PROFILE)) system_func_data = GINT_TO_POINTER(NEW_WINDOW_FROM_SYSTEM_PROFILE); else system_func_data = GINT_TO_POINTER(LOAD_FROM_SYSTEM_PROFILE); if (g_file_test(SYS_PROFILE, G_FILE_TEST_EXISTS)) { create_menu_item (IMAGE_MENU_ITEM, sub_menu, _("System default"), SYS_PROFILE, stock_id, (GSourceFunc)func, system_func_data); create_separator = TRUE; } if (create_separator) add_separator_menu(sub_menu); #ifdef SAFEMODE if (profile_dir == NULL) return FALSE; #endif gboolean menu_list_created = FALSE; // User's main profile // g_debug("profile_dir = %s", profile_dir); GDir *dir = g_dir_open(profile_dir, 0, NULL); // dir==NULL: the profile dir is not exist. if (dir==NULL) return FALSE; const gchar *entry = g_dir_read_name(dir); gchar *user_profile; if (entry==NULL) goto FINISH; do { if (entry[0]=='.') continue; user_profile = g_strdup_printf("%s/%s", profile_dir, entry); // g_debug("create_profile_menu_list(): user_profile = %s", user_profile); create_menu_item (IMAGE_MENU_ITEM, sub_menu, entry, user_profile, stock_id, (GSourceFunc)func, func_data); g_free(user_profile); menu_list_created = TRUE; } while ((entry = g_dir_read_name(dir)) != NULL); FINISH: g_dir_close(dir); // g_debug("create_profile_menu_list(): menu_list_created = %d", menu_list_created); return menu_list_created; } #ifdef OUT_OF_MEMORY #define g_strdup fake_g_strdup #define g_strdup_printf(...) NULL #define g_strsplit fake_g_strsplit #define g_strsplit_set(x,y,z) NULL #endif void apply_profile_from_file_dialog(GtkWidget *menu_item, Apply_Profile_Type type) { #ifdef DETAIL g_debug("! Launch apply_profile_from_file_dialog() with menu_item = %p, type = %d", menu_item, type); #endif #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("apply_profile_from_file_dialog()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif GtkWidget *dialog; if (win_data->use_custom_profile) dialog = create_load_file_dialog(GTK_FILE_CHOOSER_ACTION_OPEN, win_data->window, GTK_FAKE_STOCK_OPEN, win_data->profile); else { gchar *profile = get_profile(); dialog = create_load_file_dialog(GTK_FILE_CHOOSER_ACTION_OPEN, win_data->window, GTK_FAKE_STOCK_OPEN, profile); g_free(profile); } if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { // Create new win_data gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); apply_profile_from_file(filename, type); g_free (filename); } gtk_widget_destroy (dialog); } void apply_profile_from_menu_item(GtkWidget *menu_item, Apply_Profile_Type type) { #ifdef DETAIL g_debug("! Launch apply_profile_from_menu_item() with menu_item= %p, type = %d", menu_item, type); #endif // g_debug("The path of menu_item is %s", gtk_widget_get_name(menu_item)); #ifdef SAFEMODE if (menu_item==NULL) return; #endif apply_profile_from_file(gtk_widget_get_name(menu_item), type); } void apply_profile_from_file(const gchar *path, Apply_Profile_Type type) { #ifdef DETAIL g_debug("! Launch apply_profile_from_file() with path= %s, type = %d", path, type); #endif #ifdef SAFEMODE if (path==NULL) return; #endif gint argc = 0; #ifdef FATAL // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) return print_active_window_is_null_error_dialog("apply_profile_from_file()"); #endif #ifdef SAFEMODE if (menu_active_window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(menu_active_window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif if ((type == NEW_WINDOW_FROM_PROFILE) || (type == NEW_WINDOW_FROM_SYSTEM_PROFILE)) { gchar *argv_str = NULL; #ifdef SAFEMODE if ((path) && path[0]) #else if (path[0]) #endif { if (type == NEW_WINDOW_FROM_SYSTEM_PROFILE) { argv_str = g_strdup_printf("-u\x10%s\x10--specified_profile\x10%s", path, win_data->profile); argc = 5; } else { argv_str = g_strdup_printf("-u\x10%s", path); argc = 3; } } else { argv_str = g_strdup_printf("--safe-mode\x10--specified_profile\x10%s", win_data->profile); argc = 4; } // g_debug("! apply_profile_from_file(): argv_str = %s", argv_str); gchar **argv = NULL; #ifdef SAFEMODE if (argv_str==NULL) argc = 0; else #endif argv = split_string(argv_str, "\x10", -1); // print_array("! apply_profile_from_file(): argv", argv); init_socket_data(); query_socket(); send_socket(argc, argv, FALSE); g_free (argv_str); g_strfreev(argv); } else { // gtk_widget_hide(menu_active_window); struct Window *win_data_backup = g_new0(struct Window, 1); #ifdef SAFEMODE if (win_data_backup==NULL) return; #endif // Switch the data in win_data_backup and win_data. // The win_data will become {0}, and win_data_backup will stores the old datas from win_data memcpy(win_data_backup, win_data, sizeof(* win_data)); // g_debug("apply_profile_from_file(): Append win_data(%p) to window_list!", win_data_backup); window_list = g_list_append (window_list, win_data_backup); memset(win_data, 0, sizeof(* win_data)); GString *invild_settings = g_string_new(NULL); win_data->window = win_data_backup->window; win_data->notebook = win_data_backup->notebook; win_data->current_vte = win_data_backup->current_vte; #ifdef SAFEMODE if ((path) && path[0]) #else if (path[0]) #endif { // g_debug("Got win_data->use_custom_profile = %d, path = %s, win_data_backup->profile = %s", // win_data->use_custom_profile, path, win_data_backup->profile); switch (type) { case LOAD_FROM_SYSTEM_PROFILE: win_data->use_custom_profile = win_data_backup->use_custom_profile; win_data->specified_profile = g_strdup(win_data_backup->profile); break; default: win_data->use_custom_profile = TRUE; break; } win_data->profile = g_strdup(path); } else { safe_mode = TRUE; win_data->use_custom_profile = win_data_backup->use_custom_profile; win_data->profile = g_strdup(win_data_backup->profile); } win_data->warned_locale_list = g_string_new(win_data_backup->warned_locale_list->str); win_data->runtime_encoding = g_strdup(win_data_backup->runtime_encoding); win_data->runtime_LC_MESSAGES = g_strdup(win_data_backup->runtime_LC_MESSAGES); win_data->use_rgba = win_data_backup->use_rgba; win_data->runtime_locale_list = g_strdup(win_data_backup->runtime_locale_list); win_data->wmclass_name = g_strdup(win_data_backup->wmclass_name); win_data->wmclass_class = g_strdup(win_data_backup->wmclass_class); win_data->shell = g_strdup(win_data_backup->shell); win_data->home = g_strdup(win_data_backup->home); win_data->restore_font_name = NULL; win_data->geometry = NULL; // g_debug("before: win_data->use_rgba = %d, win_data_backup->use_rgba = %d", // win_data->use_rgba, win_data_backup->use_rgba); get_user_settings(win_data, win_data->runtime_encoding); if (((win_data->use_rgba_orig == 0) && (win_data->use_rgba == -1)) || ((win_data->use_rgba_orig == 1) && (win_data->use_rgba == -2))) g_string_append_printf(invild_settings, "\tuse_rgba = %d\n", win_data->use_rgba_orig); win_data->init_dir = g_strdup(win_data_backup->init_dir); win_data->environment = g_strdup(win_data_backup->environment); win_data->login_shell = win_data_backup->login_shell; win_data->utmp = win_data_backup->utmp; win_data->custom_window_title_str = g_strdup(win_data_backup->custom_window_title_str); win_data->custom_tab_names_str = NULL; win_data->custom_tab_names_strs = NULL; win_data->window_title_tpgid = win_data_backup->window_title_tpgid; // win_data->hints_type will setted to 1 in apply_font_to_every_vte() // win_data->hints_type = win_data_backup->hints_type; // win_data->resize_type = win_data_backup->resize_type; #ifdef USE_GTK3_GEOMETRY_METHOD win_data->resize_type = GEOMETRY_CUSTOM; #endif // win_data->geometry_width = win_data_backup->geometry_width; // win_data->geometry_height = win_data_backup->geometry_height; // win_data->keep_vte_size = win_data_backup->keep_vte_size; if (win_data->page_names && win_data_backup->page_names && (! compare_strings (win_data->page_names, win_data_backup->page_names, TRUE)) && ((win_data->page_shows_current_cmdline || win_data->page_shows_current_dir || win_data->page_shows_window_title) == FALSE)) win_data->page_names_no = win_data_backup->page_names_no; // We need to check the profile version again... // win_data->confirmed_profile_is_invalid = win_data_backup->confirmed_profile_is_invalid; if (win_data->tabs_bar_position) gtk_notebook_set_tab_pos(GTK_NOTEBOOK(win_data->notebook), GTK_POS_BOTTOM); win_data->profile_dir_modtime = -1; #ifdef USE_GTK3_GEOMETRY_METHOD // g_debug("win_data_backup->window_status = %d", win_data_backup->window_status); if (win_data->window_status == WINDOW_NORMAL) win_data->window_status = WINDOW_APPLY_PROFILE_NORMAL; if (win_data->window_status == WINDOW_START_WITH_FULL_SCREEN) win_data->window_status = WINDOW_APPLY_PROFILE_FULL_SCREEN; #endif create_menu(win_data); #ifdef USE_GTK2_GEOMETRY_METHOD win_data->fullscreen = win_data_backup->fullscreen; win_data->true_fullscreen = win_data_backup->true_fullscreen; #endif // g_debug("apply_profile_from_file(): Got win_data->show_tabs_bar = %d", win_data->show_tabs_bar); hide_and_show_tabs_bar(win_data, win_data->show_tabs_bar); // g_debug("win_data_backup->fullscreen_show_scroll_bar = %d", win_data_backup->fullscreen_show_scroll_bar); // win_data->fullscreen_show_scroll_bar = win_data_backup->fullscreen_show_scroll_bar; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_hide_scroll_bar), check_show_or_hide_scroll_bar(win_data)); hide_scrollback_lines(win_data->menuitem_hide_scroll_bar, win_data); // g_debug("apply_profile_from_file(): check_show_or_hide_scroll_bar() = %d", // check_show_or_hide_scroll_bar(win_data)); #ifdef USE_GTK2_GEOMETRY_METHOD // g_debug("win_data_backup->window_status = %d", win_data_backup->window_status); win_data->window_status = win_data_backup->window_status; // g_debug("win_data->startup_fullscreen = %d, win_data_backup->startup_fullscreen = %d", // win_data->startup_fullscreen, win_data_backup->startup_fullscreen); if (win_data->startup_fullscreen != win_data_backup->startup_fullscreen) deal_key_press(win_data->window, KEY_FULL_SCREEN, win_data); #endif #ifdef USE_GTK3_GEOMETRY_METHOD // g_debug("win_data->window_status = %d, win_data_backup->window_status = %d", // win_data->window_status, win_data_backup->window_status); switch (win_data->window_status) { case WINDOW_APPLY_PROFILE_NORMAL: switch (win_data_backup->window_status) { case WINDOW_MAX_WINDOW: deal_key_press(win_data->window, KEY_MAX_WINDOW, win_data); break; case WINDOW_MAX_WINDOW_TO_FULL_SCREEN: case WINDOW_FULL_SCREEN: deal_key_press(win_data->window, KEY_FULL_SCREEN, win_data); break; default: break; } win_data->resize_type = GEOMETRY_CUSTOM; keep_gtk3_window_size(win_data, FALSE); break; case WINDOW_APPLY_PROFILE_FULL_SCREEN: switch (win_data_backup->window_status) { case WINDOW_NORMAL: case WINDOW_MAX_WINDOW_TO_FULL_SCREEN: case WINDOW_MAX_WINDOW: deal_key_press(win_data->window, KEY_FULL_SCREEN, win_data); break; default: break; } break; default: break; } #endif #ifdef SAFEMODE if (win_data->default_locale && (win_data->default_locale[0] != '\0') && compare_strings(win_data->default_locale, win_data_backup->default_locale, TRUE)) #else if ((win_data->default_locale[0] != '\0') && compare_strings(win_data->default_locale, win_data_backup->default_locale, TRUE)) #endif g_string_append_printf(invild_settings, "\tdefault_locale = %s\n", win_data->default_locale); if (compare_strings(win_data->VTE_CJK_WIDTH_STR, win_data_backup->VTE_CJK_WIDTH_STR, FALSE)) g_string_append_printf(invild_settings, "\tVTE_CJK_WIDTH = %d\n", win_data->VTE_CJK_WIDTH); if (win_data_backup->find_string) { g_free(win_data->find_string); win_data->find_string = g_strdup(win_data_backup->find_string); } win_data->find_case_sensitive = win_data_backup->find_case_sensitive; win_data->find_use_perl_regular_expressions = win_data_backup->find_use_perl_regular_expressions; win_data->find_entry_bg_color = win_data_backup->find_entry_bg_color; win_data->find_entry_current_bg_color = win_data_backup->find_entry_current_bg_color; #ifdef SAFEMODE if (invild_settings && invild_settings->len) #else if (invild_settings->len) #endif { setlocale(LC_MESSAGES, win_data->runtime_LC_MESSAGES); gchar *color_settings = convert_text_to_html(&(invild_settings->str), FALSE, "blue", NULL); gchar *message = g_strdup_printf(_("The following settings:\n\n%s\n" "Can NOT be applied to the terminal boxes of current window.\n" "Please use [%s] instead."), color_settings, _("New window with specified profile")); error_dialog(win_data->window, _("The following settings can NOT be applied"), "The following settings can NOT be applied", GTK_FAKE_STOCK_DIALOG_WARNING, message, NULL); g_free(color_settings); g_free(message); } g_string_free(invild_settings, TRUE); gint i; gboolean refresh_match = FALSE; for (i=0; iuser_command[i].match_regex, win_data_backup->user_command[i].match_regex, TRUE)) { refresh_match = TRUE; break; } } struct Page *page_data = NULL; for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); #ifdef SAFEMODE if (page_data==NULL) continue; #endif if (page_data->page_update_method == PAGE_METHOD_WINDOW_TITLE) page_data->window_title_updated = 1; apply_new_win_data_to_page (win_data_backup, win_data, page_data); // Don't like drag a vte to another lilyterm window, // It will not call page_added() // get_and_update_page_name(page_data, FALSE); if (refresh_match) set_hyperlink(win_data, page_data); } glong column=0, row=0; get_row_and_column_from_geometry_str(&column, &row, &(win_data->default_column), &(win_data->default_row), win_data->geometry); if (win_data->geometry && (win_data->geometry[0]!='\0')) { // may not work!! gtk_window_parse_geometry(GTK_WINDOW(win_data->window), win_data->geometry); } #ifdef USE_GTK2_GEOMETRY_METHOD # ifdef GEOMETRY g_debug("@ apply_profile_from_file (for %p): Trying set the geometry to %ld x %ld", win_data->window, column, row); # endif apply_font_to_every_vte(win_data->window, win_data->default_font_name, column, row); #endif #ifdef USE_GTK3_GEOMETRY_METHOD win_data->geometry_width = column; win_data->geometry_height = row; page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); # ifdef SAFEMODE if (page_data!=NULL) { # endif g_free(page_data->font_name); page_data->font_name = g_strdup(win_data->default_font_name); # ifdef SAFEMODE } # endif g_idle_add((GSourceFunc)idle_set_vte_font_to_selected, win_data); #endif // g_debug("apply_profile_from_file(): Remove win_data(%p) from window_list!", win_data); window_list = g_list_remove (window_list, win_data_backup); clear_win_data(win_data_backup); #ifdef SAFEMODE win_data_backup = NULL; #endif // gtk_widget_show_all(win_data->window); #ifdef USE_GTK3_GEOMETRY_METHOD // g_debug("win_data->window_status = %d, win_data_backup->window_status = %d", // win_data->window_status, win_data_backup->window_status); switch (win_data->window_status) { case WINDOW_APPLY_PROFILE_NORMAL: win_data->window_status = WINDOW_NORMAL; break; case WINDOW_APPLY_PROFILE_FULL_SCREEN: win_data->window_status = WINDOW_FULL_SCREEN; break; default: break; } #endif } } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) void load_background_image_from_file(GtkWidget *widget, struct Window *win_data) { # ifdef DETAIL g_debug("! Launch load_background_from_file() with widget = %p, win_data = %p", widget, win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return; # endif gchar *background_image_path = ""; if (compare_strings(win_data->background_image, NULL_DEVICE, TRUE)) background_image_path = win_data->background_image; GtkWidget *dialog = create_load_file_dialog(GTK_FILE_CHOOSER_ACTION_OPEN, win_data->window, GTK_FAKE_STOCK_OPEN, background_image_path); struct Preview *preview = g_new0(struct Preview, 1); # ifdef SAFEMODE if (preview==NULL) return; # endif preview->vbox = dirty_gtk_vbox_new (FALSE, 0); preview->image = gtk_image_new(); g_signal_connect (dialog, "update-preview", G_CALLBACK (update_preview_image), preview); gtk_box_pack_end (GTK_BOX(preview->vbox), preview->image, FALSE, FALSE, 0); preview->no_image_text = gtk_label_new(NULL); set_markup_key_value(FALSE, "blue", _("Disable: Trying to use [Transparent Background] instead."), preview->no_image_text); gtk_box_pack_end (GTK_BOX(preview->vbox), preview->no_image_text, FALSE, FALSE, 0); preview->frame = gtk_frame_new (NULL); gtk_frame_set_shadow_type (GTK_FRAME (preview->frame), GTK_SHADOW_IN); gtk_container_add (GTK_CONTAINER (preview->frame), preview->vbox); preview->scroll_background = gtk_check_button_new_with_label(_("Scroll the background image along with the text")); // GTK_TOGGLE_BUTTON(preview->scroll_background)->active = win_data->scroll_background; gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(preview->scroll_background), win_data->scroll_background); preview->mainbox = dirty_gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX(preview->mainbox), preview->frame, FALSE, FALSE, 5); gtk_box_pack_start (GTK_BOX(preview->mainbox), preview->scroll_background, FALSE, FALSE, 0); gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER(dialog), preview->mainbox); gtk_widget_show_all(dialog); preview->default_filename = g_strdup(background_image_path); update_preview_image (GTK_FILE_CHOOSER(dialog), preview); GtkResponseType response; # ifdef UNIT_TEST for (response=GTK_RESPONSE_HELP; response<=GTK_RESPONSE_NONE; response++) # else response = gtk_dialog_run (GTK_DIALOG (dialog)); if (response == GTK_RESPONSE_ACCEPT) # endif { // g_debug("gtk_widget_get_mapped(preview->no_image_text) = %d", // gtk_widget_get_mapped (preview->no_image_text)); g_free(win_data->background_image); win_data->transparent_background = gtk_widget_get_mapped (preview->no_image_text); if (win_data->transparent_background) win_data->background_image = g_strdup(NULL_DEVICE); else win_data->background_image = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); // g_debug("Get new win_data->background_image = %s", win_data->background_image); win_data->scroll_background = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(preview->scroll_background)); gint i; struct Page *page_data = NULL; # ifdef SAFEMODE if (win_data->notebook) { # endif for (i=0; inotebook)); i++) { page_data = get_page_data_from_nth_page(win_data, i); # ifdef SAFEMODE if (page_data) # endif set_background_saturation (NULL, 0, win_data->background_saturation, page_data->vte); } # ifdef SAFEMODE } # endif } gtk_widget_destroy (dialog); g_free(preview); } #endif #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) void update_preview_image (GtkFileChooser *dialog, struct Preview *preview) { # ifdef DETAIL g_debug("! Launch update_preview_image() with dialog = %p, preview = %p!", dialog, preview); # endif # ifdef SAFEMODE if ((preview==NULL) || (dialog==NULL)) return; # endif gchar *filename = preview->default_filename; if (filename) // filename will be free() later. preview->default_filename = NULL; else filename = gtk_file_chooser_get_preview_filename (dialog); // g_debug("Get filename = %s in gtk_file_chooser_get_preview_filename()", filename); if (filename!=NULL) { gtk_widget_show_all(preview->frame); GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (filename, NULL); GdkPixbuf *show_pixbuf = NULL; if (pixbuf) { gint width = gdk_pixbuf_get_width(pixbuf); gint height = gdk_pixbuf_get_height(pixbuf); // g_debug("Get the current size of vbox is %d x %d", // preview->vbox->allocation.width, preview->vbox->allocation.height); gint allocation_width; # ifdef USE_GTK_ALLOCATION GtkAllocation allocation; gtk_widget_get_allocation(preview->vbox, &allocation); allocation_width = allocation.width; # else allocation_width = preview->vbox->allocation.width; # endif if (width > allocation_width) width = allocation_width; GtkRequisition requisition; gtk_window_get_size(GTK_WINDOW(dialog), &(requisition.width), &(requisition.height)); // g_debug("Get the window size of dialog is %d x %d, Child width should be %d", // requisition.width, requisition.height, requisition.width-28); if (height > requisition.height * 0.4) height = requisition.height * 0.4; show_pixbuf = gdk_pixbuf_new_from_file_at_size (filename, width, height, NULL); if (show_pixbuf) { // g_debug("Set the background to %s...", filename); gtk_widget_show(preview->image); gtk_image_set_from_pixbuf (GTK_IMAGE (preview->image), show_pixbuf); gtk_widget_hide (preview->no_image_text); g_object_unref (show_pixbuf); } g_object_unref (pixbuf); goto FINISH; } // g_debug("preview->image = %p", preview->image); gtk_image_set_from_pixbuf (GTK_IMAGE (preview->image), NULL); } FINISH: g_free (filename); } #endif void reload_settings(GtkWidget *menu_item, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch reload_settings() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // FIXME: NOT CHECKED!!!! // g_debug("win_data->profile = %s", win_data->profile); gchar *current_profile = NULL; if (win_data->profile) current_profile = g_strdup(win_data->profile); else current_profile = g_strdup_printf("%s/%s", profile_dir, USER_PROFILE); apply_profile_from_file(current_profile, LOAD_FROM_PROFILE); g_free(current_profile); } void apply_to_every_window(GtkWidget *menu_item, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch apply_to_every_window() with win_data = %p!", win_data); #endif GList *win_list = window_list; while (win_list) { // if (win_data != win_list->data) // apply_new_win_data(win_list->data, win_data); win_list = win_list->next; } } void save_user_settings_as(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch save_user_settings_as() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif gchar *profile = get_profile(); // g_debug("Get new profile = %s", profile); #ifdef SAFEMODE if (profile==NULL) return; #endif GtkWidget *dialog; if (win_data->use_custom_profile) dialog = create_load_file_dialog(GTK_FILE_CHOOSER_ACTION_SAVE, win_data->window, GTK_FAKE_STOCK_SAVE, win_data->profile); else dialog = create_load_file_dialog(GTK_FILE_CHOOSER_ACTION_SAVE, win_data->window, GTK_FAKE_STOCK_SAVE, profile); if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { win_data->use_custom_profile = TRUE; g_free(win_data->profile); win_data->profile = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); save_user_settings(NULL, win_data); } gtk_widget_destroy (dialog); g_free(profile); } GtkWidget *create_load_file_dialog(GtkFileChooserAction action, GtkWidget *window, gchar *button_text, gchar *filename) { #ifdef DETAIL g_debug("! Launch create_load_file_dialog() with window = %p, filename =%s", window, filename); #endif gchar *window_title = _("Open File"); if (action == GTK_FILE_CHOOSER_ACTION_SAVE) window_title = _("Save File"); GtkWidget *dialog; if (gtk_alternative_dialog_button_order(NULL)) dialog = gtk_file_chooser_dialog_new (window_title, GTK_WINDOW(window), action, button_text, GTK_RESPONSE_ACCEPT, GTK_FAKE_STOCK_CANCEL, GTK_RESPONSE_CANCEL, NULL); else dialog = gtk_file_chooser_dialog_new (window_title, GTK_WINDOW(window), action, GTK_FAKE_STOCK_CANCEL, GTK_RESPONSE_CANCEL, button_text, GTK_RESPONSE_ACCEPT, NULL); if (filename && (filename[0]!='\0')) { // g_debug("Set the filename to %s", filename); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), filename); if ((action==GTK_FILE_CHOOSER_ACTION_SAVE) && (! g_file_test(filename, G_FILE_TEST_EXISTS))) { gchar *basename = g_path_get_basename (filename); gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), basename); g_free(basename); } } if (action==GTK_FILE_CHOOSER_ACTION_SAVE) gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); return dialog; } GtkWidget *create_menu_item (Menu_Itemn_Type type, GtkWidget *sub_menu, const gchar *label, const gchar *label_name, const gchar *stock_id, GSourceFunc func, gpointer func_data) { #ifdef DETAIL g_debug("! Launch create_menu_item() with sub_menu = %p, label = %s, " "label_name = %s, stock_id = %s, func = %p, func_data = %p", sub_menu, label, label_name, stock_id, func, func_data); #endif #ifdef SAFEMODE if ((label==NULL) || (sub_menu==NULL)) return NULL; #endif GtkWidget *menu_item = NULL; switch (type) { case IMAGE_MENU_ITEM: menu_item = gtk_image_menu_item_new_with_label(label); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU)); break; case CHECK_MENU_ITEM: menu_item = gtk_check_menu_item_new_with_label (label); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("create_menu_item", "type", type); #endif return NULL; } // g_debug("set the name of menuitem to : %s", label_name); if (label_name) gtk_widget_set_name(menu_item, label_name); gtk_menu_shell_append(GTK_MENU_SHELL(sub_menu), menu_item); g_signal_connect(menu_item, "activate", G_CALLBACK(func), func_data); return menu_item; } GtkWidget *create_sub_item (GtkWidget *menu, gchar *label, const gchar *stock_id) { #ifdef DETAIL g_debug("! Launch create_sub_item() with menu = %p, label = %s, stock_id = %s", menu, label, stock_id); #endif #ifdef SAFEMODE if (label==NULL) return NULL; #endif GtkWidget *menu_item = create_sub_item_subitem (label, stock_id); return create_sub_item_submenu (menu, menu_item); } GtkWidget *create_sub_item_subitem (gchar *label, const gchar *stock_id) { #ifdef DETAIL g_debug("! Launch create_sub_item_subitem() with label = %s, stock_id = %s", label, stock_id); #endif #ifdef SAFEMODE if (label==NULL) return NULL; #endif GtkWidget *menu_item = gtk_image_menu_item_new_with_label(label); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_MENU)); return menu_item; } GtkWidget *create_sub_item_submenu (GtkWidget *menu, GtkWidget *menu_item) { #ifdef DETAIL g_debug("! Launch create_sub_item() with menu = %p, menu_item = %p", menu, menu_item); #endif #ifdef SAFEMODE if (menu==NULL) return NULL; #endif GtkWidget *sub_menu = gtk_menu_new (); gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), sub_menu); gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); return sub_menu; } GtkWidget *add_separator_menu (GtkWidget *sub_menu) { #ifdef DETAIL g_debug("! Launch add_separator_menu() with sub_menu = %p", sub_menu); #endif #ifdef SAFEMODE if (sub_menu==NULL) return NULL; #endif GtkWidget *menu_item = gtk_separator_menu_item_new(); gtk_menu_shell_append (GTK_MENU_SHELL (sub_menu), menu_item); return menu_item; } long get_profile_dir_modtime() { #ifdef DETAIL g_debug("! Launch get_profile_dir_modtime()"); #endif #ifdef SAFEMODE if (profile_dir==NULL) return -1; #endif struct stat buffer; if (stat(profile_dir, &buffer)) return 0; return buffer.st_mtime; } void set_menuitem_label(GtkWidget *menu_item, gchar *text) { #ifdef DETAIL g_debug("! Launch set_menuitem_label() with menu_item = %p, text = %s!", menu_item, text); #endif #ifdef SAFEMODE if ((menu_item==NULL) || (text==NULL)) return; #endif gtk_menu_item_set_label(GTK_MENU_ITEM(menu_item), text); } #ifdef FATAL void print_active_window_is_null_error_dialog(gchar *function) { gchar *err_msg = g_strdup_printf("%s: menu_active_window = NULL\n\n" "Please report bug to %s, Thanks!", function, BUGREPORT); #ifdef SAFEMODE if (err_msg) #endif #ifdef UNIT_TEST g_debug(_("The following error occurred: %s"), err_msg); #else error_dialog(NULL, _("The following error occurred:"), "The following error occurred:", GTK_FAKE_STOCK_DIALOG_ERROR, err_msg, NULL); #endif g_free(err_msg); } #endif gboolean check_if_win_data_is_still_alive(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch check_if_win_data_is_still_alive() with win_data = %p!", win_data); #endif GList *win_list = window_list; while (win_list) { if (win_data == win_list->data) return TRUE; win_list = win_list->next; } #ifdef DEBUG fprintf(stderr, "\033[1;%dm** check_if_win_data_is_still_alive(): win_data (%p) is NOT alive!\033[0m\n", ANSI_COLOR_RED, win_data); #endif // g_debug("check_if_win_data_is_still_alive: win_data (%p) is NOT alive!!!", win_data); return FALSE; } void enable_disable_theme_menus(struct Window *win_data, gboolean show) { #ifdef DETAIL g_debug("! Launch enable_disable_theme_menus() with win_data = %p, show = %d!", win_data, show); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif gint i; for (i=0; iansi_theme_menuitem[i]==NULL) continue; #endif gtk_widget_set_sensitive(win_data->ansi_theme_menuitem[i], show); } } src/menu.h000066400000000000000000000136511246562641500130030ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include // for L10n #include #include // for opendir() readdir() closedir() #include // for stat() #include // for memcpy() memset() #include // for aoti() #include // for GDK_WINDOW_XID #include #include "lilyterm.h" typedef enum { IMAGE_MENU_ITEM, CHECK_MENU_ITEM, } Menu_Itemn_Type; typedef enum { NEW_WINDOW_FROM_SYSTEM_PROFILE, NEW_WINDOW_FROM_PROFILE, LOAD_FROM_SYSTEM_PROFILE, LOAD_FROM_PROFILE, APPLY_FROM_NEW_WIN_DATA, } Apply_Profile_Type; struct Preview { gchar *default_filename; GtkWidget *mainbox; GtkWidget *frame; GtkWidget *vbox; GtkWidget *image; GtkWidget *no_image_text; GtkWidget *scroll_background; }; void new_tab_with_locale(GtkWidget *local_menuitem, gboolean VTE_CJK_WIDTH); GtkWidget *check_name_in_menuitem(GtkWidget *sub_menu, const gchar *name, gboolean case_sensitive); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) void set_trans_bg(GtkWidget *menuitem_trans_bg, struct Window *win_data); void load_background_image_from_file(GtkWidget *widget, struct Window *win_data); void update_preview_image (GtkFileChooser *dialog, struct Preview *preview); #endif void set_trans_win(GtkWidget *widget, GtkWidget *window); void invert_color_theme(GtkWidget *menuitem, struct Window *win_data); void select_ansi_theme(GtkWidget *menuitem, gint index); void set_ansi_theme(GtkWidget *menuitem, Set_ANSI_Theme_Type type, gboolean use_custom_theme, gboolean invert_color, gint theme_index, struct Window *win_data); void set_auto_save(GtkWidget *menuitem, struct Window *win_data); void set_erase_binding (GtkWidget *menuitem, gint value); #if defined(ENABLE_CURSOR_SHAPE) || defined(UNIT_TEST) void set_cursor_shape (GtkWidget *menuitem, gint value); #endif GSList *create_theme_menu_items(struct Window *win_data, GtkWidget *sub_menu, GSList *theme_group, gint current_theme, gint custom_theme); void reset_vte(GtkWidget *widget, struct Window *win_data); void select_font(GtkWidget *widget, struct Window *win_data); void set_dim_text(GtkWidget *menuitem_dim_text, struct Window *win_data); #ifdef ENABLE_RGBA void set_dim_window(GtkWidget *menuitem_dim_text, struct Window *win_data); #endif void set_cursor_blinks(GtkWidget *widget, struct Window *win_data); void set_allow_bold_text(GtkWidget *menuitem_allow_bold_text, struct Window *win_data); void set_open_url_with_ctrl_pressed(GtkWidget *menuitem_open_url_with_ctrl_pressed, struct Window *win_data); void set_disable_url_when_ctrl_pressed(GtkWidget *menuitem_disable_url_when_ctrl_pressed, struct Window *win_data); void set_audible_bell(GtkWidget *widget, struct Window *win_data); #if defined(ENABLE_VISIBLE_BELL) || defined(UNIT_TEST) void set_visible_bell(GtkWidget *widget, struct Window *win_data); #endif void urgent_beep(GtkWidget *window, struct Page *page_data); void launch_hide_and_show_tabs_bar(GtkWidget *widget, Switch_Type show_tabs_bar); void copy_url_clipboard(GtkWidget *widget, gpointer user_data); void copy_clipboard(GtkWidget *widget, struct Window *win_data); void paste_clipboard(GtkWidget *widget, struct Window *win_data); void paste_to_every_vte(GtkWidget *widget, struct Window *win_data); void open_current_dir_with_file_manager(GtkWidget *widget, struct Window *win_data); void view_current_page_info(GtkWidget *widget, struct Window *win_data); void view_clipboard(GtkWidget *widget, struct Window *win_data); void view_primary(GtkWidget *widget, struct Window *win_data); gint add_menuitem_to_locale_sub_menu(struct Window *win_data, gint no, gchar *name); GtkWidget *recreate_profile_menu_item(GtkWidget *menuitem, GtkWidget *subitem, struct Window *win_data, Apply_Profile_Type type); void create_new_window_from_menu_items(GtkWidget *sub_menu, const gchar *stock_id); void create_load_profile_from_menu_items(GtkWidget *sub_menu, const gchar *stock_id, struct Window *win_data); gboolean create_profile_menu_list(GtkWidget *sub_menu, const gchar *stock_id, GSourceFunc func, gpointer func_data); void apply_profile_from_file_dialog(GtkWidget *menu_item, Apply_Profile_Type type); void apply_profile_from_menu_item(GtkWidget *menu_item, Apply_Profile_Type type); void apply_profile_from_file(const gchar *path, Apply_Profile_Type type); void reload_settings(GtkWidget *menu_item, struct Window *win_data); void apply_to_every_window(GtkWidget *menu_item, struct Window *win_data); void save_user_settings_as(GtkWidget *widget, struct Window *win_data); GtkWidget *create_load_file_dialog(GtkFileChooserAction action, GtkWidget *window, gchar *button_text, gchar *filename); GtkWidget *create_menu_item (Menu_Itemn_Type type, GtkWidget *sub_menu, const gchar *label, const gchar *label_name, const gchar *stock_id, GSourceFunc func, gpointer func_data); GtkWidget *create_sub_item (GtkWidget *menu, gchar *label, const gchar *stock_id); GtkWidget *create_sub_item_subitem (gchar *label, const gchar *stock_id); GtkWidget *create_sub_item_submenu (GtkWidget *menu, GtkWidget *menu_item); GtkWidget *add_separator_menu(GtkWidget *sub_menu); void set_menuitem_label(GtkWidget *menu_item, gchar *text); void enable_disable_theme_menus(struct Window *win_data, gboolean show); src/misc.c000066400000000000000000000615431246562641500127700ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "misc.h" extern gboolean proc_exist; extern gchar *proc_file_system_path; #ifdef USE_GTK_ALT_DIALOG_BUTTON_ORDER gboolean gtk_alt_dialog_button_order() { #ifdef DETAIL g_debug("! Launch gtk_alt_dialog_button_order()"); #endif gboolean result; g_object_get (gtk_settings_get_default(), "gtk-alternative-button-order", &result, NULL); return result; } #endif gboolean check_if_proc_dir_exist(gchar *proc_dir) { #ifdef DETAIL g_debug("! Launch check_if_proc_dir_exist() with proc_dir = %s", proc_dir); #endif if (proc_dir == NULL) return FALSE; if (g_file_test(proc_dir, G_FILE_TEST_EXISTS)) { gboolean proc_is_exist = FALSE; GDir *dir = g_dir_open (proc_dir, 0, NULL); if (dir) { const gchar *entry = g_dir_read_name(dir); if (entry) { g_free(proc_file_system_path); proc_file_system_path = g_strdup(proc_dir); proc_is_exist = TRUE; } } g_dir_close(dir); return proc_is_exist; } return FALSE; } gboolean check_if_default_proc_dir_exist(gchar *proc_dir) { #ifdef DETAIL g_debug("! Launch check_if_default_proc_dir_exist() with proc_dir = %s", proc_dir); #endif if (check_if_proc_dir_exist(proc_dir)) return TRUE; #ifdef BSD if (check_if_proc_dir_exist("/compat/linux/proc")) return TRUE; #endif if (check_if_proc_dir_exist("/proc")) return TRUE; return FALSE; } // The returned string should be freed when no longer needed. gchar *convert_array_to_string(gchar **array, gchar separator) { #ifdef DETAIL g_debug("! Launch convert_array_to_string()"); #endif #ifdef SAFEMODE if (array==NULL) return NULL; #endif GString *array_str = g_string_new (NULL); gint i=0; while (array[i]!=NULL) { // g_debug("%d: %s", i, array[i]); if (array_str->len && (separator!='\0')) g_string_append_printf(array_str, "%c%s", separator, array[i]); else g_string_append_printf(array_str, "%s", array[i]); i++; } // g_debug ("Got array_str = %s", array_str->str); return g_string_free(array_str, FALSE); } // please vist http://en.wikipedia.org/wiki/Escape_sequences_in_C for more details gchar *convert_escape_sequence_to_string(const gchar *string) { if (string == NULL) return NULL; GString *new_string = g_string_new(""); long i=-1; while (string[++i]) { switch (string[i]) { case '\a': g_string_append(new_string, "\\a"); break; case '\b': g_string_append(new_string, "\\b"); break; case '\f': g_string_append(new_string, "\\f"); break; case '\n': g_string_append(new_string, "\\n"); break; case '\r': g_string_append(new_string, "\\r"); break; case '\t': g_string_append(new_string, "\\t"); break; case '\v': g_string_append(new_string, "\\v"); break; case '\\': g_string_append(new_string, "\\\\"); break; case '\'': g_string_append(new_string, "\\'"); break; case '\"': g_string_append(new_string, "\\\""); break; default: g_string_append_printf(new_string, "%c", string[i]); break; } } return g_string_free(new_string, FALSE); } gchar *convert_escape_sequence_from_string(const gchar *string) { if (string == NULL) return NULL; GString *new_string = g_string_new(""); long i=-1; while (string[++i]) { if (string[i]=='\\') { switch (string[++i]) { case 'a': g_string_append(new_string, "\a"); break; case 'b': g_string_append(new_string, "\b"); break; case 'f': g_string_append(new_string, "\f"); break; case 'n': g_string_append(new_string, "\n"); break; case 'r': g_string_append(new_string, "\r"); break; case 't': g_string_append(new_string, "\t"); break; case 'v': g_string_append(new_string, "\v"); break; case '\\': g_string_append(new_string, "\\"); break; case '\'': g_string_append(new_string, "'"); break; case '"': g_string_append(new_string, "\""); break; default: g_string_append_printf(new_string, "%c", string[i]); break; } } else g_string_append_printf(new_string, "%c", string[i]); } return g_string_free(new_string, FALSE); } // return FALSE if the strings are the same. gboolean compare_strings(const gchar *string_a, const gchar *string_b, gboolean case_sensitive) { #ifdef FULL g_debug("! Launch compare_strings()! with string_a = %s, string_b = %s", string_a, string_b); #endif if ((string_a == NULL) && (string_b == NULL)) return FALSE; if ((string_a == NULL) || (string_b == NULL)) return TRUE; if (case_sensitive) { if (strcmp(string_a, string_b)) return TRUE; } else { if (strcasecmp(string_a, string_b)) return TRUE; } return FALSE; } // The returned string should be freed when no longer needed. gchar *convert_str_to_utf8(gchar *string, gchar *encoding_str) { #ifdef DETAIL g_debug("! Launch convert_str_to_utf8() with string = %s, encoding_str = %s", string, encoding_str); #endif if (string==NULL) return NULL; gchar *local_string = NULL; if (encoding_str) { //g_debug("string = %s", string); //g_debug("encoding_str = %s", encoding_str); local_string = g_convert_with_fallback (string, -1, "UTF-8", encoding_str, "_", NULL, NULL, NULL); // g_debug("Get local_string = %s", local_string); if ((local_string == NULL ) || (local_string[0]=='\0')) { g_free(local_string); local_string = g_strdup(string); gint i = 0; while (local_string[i]) { if (local_string[i] < 32 || local_string[i]>126) local_string[i] = '?'; i++; } } // g_debug("FINAL: local_string = %s", local_string); return local_string; } else return g_strdup(string); } void set_VTE_CJK_WIDTH_environ(gint VTE_CJK_WIDTH) { #ifdef DETAIL g_debug("! Launch set_VTE_CJK_WIDTH_environ() with VTE_CJK_WIDTH = %d", VTE_CJK_WIDTH); #endif // Set the VTE_CJK_WIDTH environment switch (VTE_CJK_WIDTH) { case 0: // Don't touch VTE_CJK_WIDTH break; //case 1: // // The VTE_CJK_WIDTH will be setted depend on the LC environ in newer libvte version. // unsetenv("VTE_CJK_WIDTH"); // break; case 1: // VTE_CJK_WIDTH=narrow only work for vte >= 0.16.14 setenv("VTE_CJK_WIDTH", "narrow", TRUE); break; case 2: setenv("VTE_CJK_WIDTH", "wide", TRUE); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("set_VTE_CJK_WIDTH_environ", "VTE_CJK_WIDTH", VTE_CJK_WIDTH); #endif break; } } gchar *get_VTE_CJK_WIDTH_str(gint VTE_CJK_WIDTH) { #ifdef DETAIL g_debug("! Launch get_VTE_CJK_WIDTH_str() with VTE_CJK_WIDTH = %d", VTE_CJK_WIDTH); #endif switch (VTE_CJK_WIDTH) { case 0: return NULL; case 1: return "narrow"; case 2: return "wide"; default: #ifdef FATAL print_switch_out_of_range_error_dialog("get_VTE_CJK_WIDTH_str", "VTE_CJK_WIDTH", VTE_CJK_WIDTH); #endif break; } return NULL; } gint get_default_VTE_CJK_WIDTH() { #ifdef DETAIL g_debug("! Launch get_default_VTE_CJK_WIDTH()"); #endif const gchar *VTE_CJK_WIDTH = g_getenv("VTE_CJK_WIDTH"); if (VTE_CJK_WIDTH==NULL) return 0; else { // VTE_CJK_WIDTH only work under UTF-8 if ((compare_strings (VTE_CJK_WIDTH, "wide", FALSE)==FALSE) || (compare_strings (VTE_CJK_WIDTH, "1", FALSE)==FALSE)) return 2; else if ((compare_strings (VTE_CJK_WIDTH, "narrow", FALSE)==FALSE) || (compare_strings (VTE_CJK_WIDTH, "0", FALSE)==FALSE)) return 1; else return 0; } } void restore_SYSTEM_VTE_CJK_WIDTH_STR() { #ifdef DETAIL g_debug("! Launch restore_SYSTEM_VTE_CJK_WIDTH_STR()"); #endif extern gchar *SYSTEM_VTE_CJK_WIDTH_STR; if (SYSTEM_VTE_CJK_WIDTH_STR) g_setenv("VTE_CJK_WIDTH", SYSTEM_VTE_CJK_WIDTH_STR, TRUE); else g_unsetenv("VTE_CJK_WIDTH"); } void set_env(const gchar *variable, const gchar *value, gboolean overwrite) { #ifdef DETAIL g_debug("! Launch set_env() with variable = %s, value = %s, overwrite = %d", variable, value, overwrite); #endif #ifdef SAFEMODE if ((variable==NULL) || (variable[0]=='\0')) return; #endif if (value) g_setenv(variable, value, overwrite); else g_unsetenv(variable); } // get default locale from environ // The returned string CAN NOT be free()! const gchar *get_default_lc_data(gint lc_type) { #ifdef DETAIL g_debug("! Launch get_default_lc_data() with lc_type= %d", lc_type); #endif const char *lc_data; switch (lc_type) { case LC_CTYPE: lc_data = g_getenv("LC_CTYPE"); break; case LC_MESSAGES: lc_data = g_getenv("LC_MESSAGES"); break; case LANGUAGE: return g_getenv("LANGUAGE"); default: #ifdef FATAL print_switch_out_of_range_error_dialog("get_default_lc_data", "lc_type", lc_type); #endif return ""; } const char *lc_all = g_getenv("LC_ALL"); const char *lang = g_getenv("LANG"); if ( (!lc_data) && lang) lc_data = lang; if (lc_all) lc_data = lc_all; // g_debug("Get lc_data = %s", lc_data); if (lc_data) return lc_data; else return ""; } // The returned string should be freed when no longer needed. gchar *get_encoding_from_locale(const gchar *locale) { #ifdef DETAIL g_debug("! Launch get_encoding_from_locale() with locale = %s", locale); #endif #ifdef OUT_OF_MEMORY # undef g_strdup #endif // locale==NULL: get the init encoding. G_CONST_RETURN char *locale_encoding = NULL; if (setlocale(LC_CTYPE, locale)) g_get_charset(&locale_encoding); return g_strdup(locale_encoding); #ifdef OUT_OF_MEMORY #define g_strdup fake_g_strdup #endif } gboolean check_string_in_array(gchar *str, gchar **lists) { #ifdef DETAIL g_debug("! Launch check_string_in_array() with str = %s", str); #endif #ifdef SAFEMODE if ((str==NULL) || (lists==NULL)) return FALSE; #endif gint i=-1; while (lists[++i]) { // g_debug("Checking %s and %s...", str, lists[i]); if (strcmp(str, lists[i])==0) return TRUE; } // g_debug("No, Can not find '%s' in the array!!", str); return FALSE; } //gchar *get_proc_data(pid_t pid, gchar *file, gsize *length) //{ //#ifdef FULL // g_debug("! Launch get_proc_data() with pid = %d, file = %s", pid, file); //#endif // // if (! proc_exist) return NULL; // if (pid<1) return NULL; // // *length=0; // gchar *contents=NULL; // gchar *file_path = g_strdup_printf("%s/%d/%s", proc_file_system_path, (gint)pid, file); // // g_debug("file_path = %s", file_path); // // if (file_path && (g_file_test(file_path, G_FILE_TEST_EXISTS))) // g_file_get_contents (file_path, &contents, length, NULL); // g_free(file_path); // // g_debug("contents = %s", contents); // return contents; //} gchar *get_proc_data(pid_t pid, gchar *file, gsize *length) { #ifdef FULL g_debug("! Launch get_proc_data() with pid = %d, file = %s", pid, file); #endif // g_debug("proc_exist = %d", proc_exist); if (! proc_exist) return NULL; if (pid<1) return NULL; #ifdef UNIT_TEST if (file==NULL) return NULL; #endif gchar *contents=NULL; gint timeout=0; gchar *proc_path = g_strdup_printf("%s/%d", proc_file_system_path, (gint)pid); // g_debug("proc_path = %s", proc_path); gchar *file_path = g_strdup_printf("%s/%s", proc_path, file); // g_debug("file_path = %s", file_path); #if defined(OUT_OF_MEMORY) || defined(UNIT_TEST) if (proc_path && file_path) { #endif while (g_file_test(proc_path, G_FILE_TEST_EXISTS) && g_file_get_contents (file_path, &contents, length, NULL)) { // g_debug("Got the contents length is %d for %s", *length, file_path); if (*length==0) { // gsize len = 0; // gchar *stat = NULL; // gchar *stat_path = g_strdup_printf("%s/%d/stat", proc_file_system_path, (gint)pid); // if (g_file_get_contents (stat_path, &contents, &len, NULL)) // { // g_debug("Got len = %d, stat = %s", len, stat); // if (len && stat) // { // gchar **stats = split_string(stat, " ()", 6); // if (stats && stats[4][0]=='Z') // { // g_warning("The child process \"(%s) %s\" has died. Abort.", // stats[0], stats[2]); // g_free(stat); // g_strfreev(stats); // // g_free(contents); // contents = NULL; // break; // } // g_strfreev(stats); // } // } // g_free(stat); g_message("Waiting for %s/%d/%s...", proc_file_system_path, (gint)pid, file); // we should wait until "/proc/%d/file" is not empty usleep(100000); timeout++; // contents = "" here g_free(contents); contents = NULL; } else break; // we only try for 3 times if (timeout>2) { #ifdef FATAL g_message("Failed when waiting for %s/%d/%s. Abort.", proc_file_system_path, (gint)pid, file); #else g_warning("Failed when waiting for %s/%d/%s. Abort.", proc_file_system_path, (gint)pid, file); #endif break; } } #if defined(OUT_OF_MEMORY) || defined(UNIT_TEST) } #endif g_free(file_path); g_free(proc_path); // g_debug("contents = %s", contents); return contents; } // it will check if the count of returned string array is < max_tokens gchar **split_string(const gchar *str, const gchar *split, gint max_tokens) { #ifdef FULL g_debug("! Launch split_string with str = %s, split = %s, max_tokens = %d", str, split, max_tokens); #endif #ifdef SAFEMODE if ((str==NULL) || (split==NULL) || (split[0]=='\0')) return NULL; #endif // g_debug("contents = %s", contents); gchar **datas = g_strsplit_set(str, split, max_tokens); gint i = -1; // while (datas[++i]) // g_debug("Got data[%d] = %s", i, datas[i]); // g_debug("Got i = %d in split_string()", i); // i = -1; #ifdef SAFEMODE if ( datas && (max_tokens>0)) #else if (max_tokens>0) #endif { while (datas[++i]); if (i%s", color, markup_escape_text); g_free(markup_escape_text); markup_escape_text = color_profile; } va_list arg_ptr; va_start(arg_ptr, tag); while (tag) { gchar *new_html_string = g_strdup_printf("<%s>%s", tag, markup_escape_text, tag); g_free(markup_escape_text); markup_escape_text = new_html_string; tag = va_arg(arg_ptr, char *); } va_end(arg_ptr); if (free_text) { g_free(*text); #ifdef SAFEMODE *text = NULL; #endif } return markup_escape_text; } // The returned string should be freed when no longer needed. gchar *join_strings_to_string(const gchar separator, const gint total, const StrLists *string, ...) { #ifdef DETAIL g_debug("! Launch join_strings_to_string() with separator = '%c', total = %d", separator, total); #endif #ifdef SAFEMODE if (separator=='\0') return NULL; #endif GString *strings = g_string_new (""); gint i; va_list arg_ptr; va_start(arg_ptr, string); for (i=0; ilen) g_string_append_printf(strings, "%c%s", separator, string); else g_string_append_printf(strings, "%s", string); } // g_debug("[%2d] convert_strings_to_string(): strings = %s", i, strings->str); string = va_arg(arg_ptr, char *); } va_end(arg_ptr); // g_debug("convert_strings_to_string(): strings = %s", strings->str); return g_string_free(strings, FALSE); } // return NULL: No, it is less than MAX // return String: Yes, It is more then MAX, and have been cut short to OUTPUT_LINE lines. gchar *colorful_max_new_lines(gchar *string, gint max, gint output_line) { #ifdef DETAIL g_debug("! Launch count_max_new_lines() with string = '%s', max = %d", string, max); #endif if (string==NULL) return NULL; gint i = 0; gint total = 0; gchar *color_str = g_strdup(""); gint star_start = 0; while (string[i]) { char separate; if ((string[i]=='\n') || (string[i]=='\r') || (string[i+1]=='\0')) { if ((string[i]=='\n') || (string[i]=='\r')) total++; if (total < output_line) { separate = string[i]; if ((string[i]=='\n') || (string[i]=='\r')) string[i] = 0; gchar *str = &(string[star_start]); gchar *markup_str; if ((str==NULL) || (str[0] == '\0')) markup_str = g_strdup(""); else { gchar *tmp_str = g_markup_escape_text(str, -1); markup_str = g_strconcat("", tmp_str, "", NULL); g_free(tmp_str); } gchar *new_str = NULL; if ((separate=='\n') || (separate=='\r')) { // TRANSLATE NOTE: The "↲" is a replace character for (, or ). // TRANSLATE NOTE: You may translate it into something like "¶", "↵" or "↩". gchar *markup_enter = g_markup_escape_text(_("↲"), -1); if (string[i+1]) new_str = g_strconcat(color_str, markup_str, "", markup_enter, "\n", NULL); else new_str = g_strconcat(color_str, markup_str, "", markup_enter, "", NULL); g_free(markup_enter); } else new_str = g_strconcat(color_str, markup_str, NULL); g_free(markup_str); g_free(color_str); color_str = new_str; string[i] = separate; star_start = i+1; // g_debug("colorful_max_new_lines(): color_str = %s", color_str); } } if (total>=output_line) { separate = string[i]; string[i] = 0; gchar *output_str = g_strdup_printf("%s%s", color_str, "..."); g_free(color_str); string[i] = separate; return output_str; } i++; } // g_debug("colorful_max_new_lines(FINAL): color_str = %s", color_str); // g_debug("colorful_max_new_lines(): total = %d", total); if (total > max) { gchar *output_str = g_strdup_printf("%s", color_str); g_free(color_str); return output_str; } g_free(color_str); return NULL; } GdkRGBA convert_color_to_rgba(GdkColor color) { GdkRGBA rgba; #ifndef USE_GDK_RGBA rgba.pixel = 0; #endif rgba.red = (gdouble)(color.red>>8)/0xFF; rgba.green = (gdouble)(color.green>>8)/0xFF; rgba.blue = (gdouble)(color.blue>>8)/0xFF; // g_debug("convert_color_to_rgba: convert color (%4X %4X %4X) to rgba (%0.4f %0.4f %0.4f)", // color.red, color.green, color.blue, rgba.red, rgba.green, rgba.blue); return rgba; } GdkColor convert_rgba_to_color(GdkRGBA rgba) { GdkColor color; color.pixel = 0; color.red = rgba.red*0xFFFF; color.green = rgba.green*0xFFFF; color.blue = rgba.blue*0xFFFF; return color; } #ifdef ENABLE_GDKCOLOR_TO_STRING // The returned string should be freed when no longer needed. gchar *dirty_gdk_rgba_to_string(GdkRGBA *rgba) { #ifdef SAFEMODE if (rgba==NULL) return NULL; #endif # ifdef USE_GDK_RGBA return g_strdup_printf("#%04x%04x%04x", (unsigned int)(rgba->red*0xFFFF), (unsigned int)(rgba->green*0xFFFF), (unsigned int)(rgba->blue*0xFFFF)); # else return gdk_color_to_string(rgba); # endif } #endif #if defined(GEOMETRY) || defined(UNIT_TEST) void widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gchar *name) { # ifdef DETAIL g_debug("! Launch widget_size_allocate() with widget = %p, name = %s", widget, name); # endif // 200x200: the default size of a GtkWindow gint ansi_color = ANSI_COLOR_BLACK; #ifdef SAFEMODE if (allocation==NULL) return; #endif if ((allocation->width <= 200) || (allocation->height <= 200)) ansi_color = ANSI_COLOR_RED; fprintf(stderr, "\033[1;%dm!! %s_size_allocate(%p): the allocated size is %d x %d\033[0m\n", ansi_color, name, widget, allocation->width, allocation->height); } #endif gboolean dirty_gdk_color_parse(const gchar *spec, GdkRGBA *color) { #ifdef DETAIL g_debug("! Launch dirty_gdk_color_parse() with spec = %s", spec); #endif if (spec==NULL) return FALSE; gchar *new_spec = g_strdup(spec); #ifdef OUT_OF_MEMORY if (new_spec==NULL) return FALSE; #endif new_spec = g_strstrip(new_spec); gboolean response = gdk_rgba_parse(color, new_spec); g_free(new_spec); return response; } GtkWidget *dirty_gtk_vbox_new(gboolean homogeneous, gint spacing) { #ifdef DETAIL g_debug("! Launch dirty_gtk_vbox_new() with homogeneous = %d, spacing = %d", homogeneous, spacing); #endif #if GTK_CHECK_VERSION(2,90,0) GtkWidget *box = gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing); gtk_box_set_homogeneous(GTK_BOX(box), homogeneous); #else GtkWidget *box = gtk_vbox_new(homogeneous, spacing); #endif return box; } GtkWidget *dirty_gtk_hbox_new(gboolean homogeneous, gint spacing) { #ifdef DETAIL g_debug("! Launch dirty_gtk_hbox_new() with homogeneous = %d, spacing = %d", homogeneous, spacing); #endif #if GTK_CHECK_VERSION(2,90,0) GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, spacing); gtk_box_set_homogeneous(GTK_BOX(box), homogeneous); #else GtkWidget *box = gtk_hbox_new(homogeneous, spacing); #endif return box; } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) void dirty_vte_terminal_set_background_tint_color(VteTerminal *vte, const GdkRGBA rgba) { # ifdef DETAIL g_debug("! Launch dirty_vte_terminal_set_background_tint_color() with vte = %p", vte); # endif # ifdef SAFEMODE if (vte==NULL) return; # endif # ifdef FORCE_ENABLE_VTE_BACKGROUND G_GNUC_BEGIN_IGNORE_DEPRECATIONS; # endif # ifdef USE_GDK_RGBA # ifndef USE_FAKE_FUNCTIONS GdkColor color = convert_rgba_to_color(rgba); # endif vte_terminal_set_background_tint_color(VTE_TERMINAL(vte), &(color)); # else vte_terminal_set_background_tint_color(VTE_TERMINAL(vte), &(rgba)); # endif # ifdef FORCE_ENABLE_VTE_BACKGROUND G_GNUC_END_IGNORE_DEPRECATIONS; # endif } #endif #if defined(OUT_OF_MEMORY) || defined(UNIT_TEST) gchar *fake_g_strdup(const gchar *str) { # ifdef DETAIL g_debug("! fake_g_strdup(): Trying to strdup(%s)...", str); # endif # undef g_strdup # undef g_strsplit if (str==NULL) return NULL; gchar *return_str = NULL; gchar **strs = g_strsplit(str, " ", 2); if (strs) { if ((! compare_strings(strs[0], "Alt", FALSE)) || (! compare_strings(strs[0], "Shift", FALSE)) || (! compare_strings(strs[0], "Ctrl", FALSE))) { return_str = g_strdup(str); // g_debug("fake_g_strdup(): strdup(%s) succeed!!", str); } } g_strfreev (strs); return return_str; # define g_strdup fake_g_strdup # define g_strsplit fake_g_strsplit } gchar *fake_g_strdup_printf(const StrLists *format, ...) { # ifdef DETAIL g_debug("! Trying to strdup_printf(%s)...", format); # endif return NULL; } gchar** fake_g_strsplit(const gchar *string, const gchar *delimiter, gint max_tokens) { # ifdef DETAIL g_debug("! fake_g_strsplit(): Trying to strsplit('%s', '%s', %d)...", string, delimiter, max_tokens); # endif if ((string==NULL) || (delimiter==NULL) || (delimiter[0]=='\0')) return NULL; # undef g_strsplit gchar **return_array = NULL; gchar **strs = g_strsplit(string, " ", 2); if (strs) { if ((strs[0]=='\0') || (! compare_strings(strs[0], "Alt", FALSE)) || (! compare_strings(strs[0], "Shift", FALSE)) || (! compare_strings(strs[0], "Ctrl", FALSE))) { return_array = g_strsplit (string, delimiter, max_tokens); // g_debug("fake_g_strsplit(): strsplit('%s', '%s', %d) succeed!!", // string, delimiter, max_tokens); } } g_strfreev (strs); if (! return_array) { if (! compare_strings(delimiter, "+", TRUE)) { return_array = g_strsplit (string, delimiter, max_tokens); // g_debug("fake_g_strsplit(): strsplit('%s', '%s', %d) succeed!!", // string, delimiter, max_tokens); } } return return_array; # define g_strsplit fake_g_strsplit } // A very dirty fix for unit test error. gchar **g_listenv (void) { return NULL; } #endif src/misc.h000066400000000000000000000020101246562641500127550ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include // for setenv() and unsetenv() #include // for usleep() #include // for strcmp() #include // for L10n #include #include #include "lilyterm.h" gboolean check_if_proc_dir_exist(gchar *proc_dir); src/notebook.c000066400000000000000000002124221246562641500136470ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include "notebook.h" // GtkWidget *current_vte=NULL; // extern GtkWidget *active_window; extern GtkWidget *menu_active_window; extern gboolean proc_exist; extern gchar *init_LC_CTYPE; extern gchar *init_LANGUAGE; extern gint dialog_activated; gboolean menu_activated = FALSE; extern struct Process_Data *process_data; extern gboolean force_to_quit; extern gboolean using_kill; gboolean confirm_to_execute = TRUE; #ifdef USE_OLD_VTE_FORK_COMMAND gchar *login_shell_str[] = {"-", NULL}; #else gchar *login_shell_str[] = {NULL, "-", NULL}; gchar *full_argv[] = {"/bin/sh", "/bin/sh", NULL}; #endif // prev_vte: the new vte will be the clone of prev_vte. // menuitem_encoding: using right menu to open a new vtw with specified locale. // Lilyterm will update page_data->encoding_str with it. // locale: the environ LANG, LANGUAGE, and LC_ALL used in vte_terminal_fork_command(). // user_environ: it will be used in vte_terminal_fork_command(), // and will be saved in page_data->environ. // should be separated with . // run_once: some data that should be inited for the first vte of a LilyTerm window. // encoding: the encoding come from environ *or default_encoding in profile*. only for new window. // runtime_locale_encoding: the encoding come from environ. struct Page *add_page(struct Window *win_data, struct Page *page_data_prev, GtkWidget *menuitem_encoding, gchar *encoding, gchar *runtime_locale_encoding, gchar *locale, gchar *environments, gchar *user_environ, const gchar *VTE_CJK_WIDTH_STR, gboolean add_to_next) { #ifdef DETAIL if (menuitem_encoding) g_debug("! Launch add_page() with win_data = %p, page_data_prev = %p, " "menuitem_encoding->name = %s, encoding = %s," "locale = %s, environ = %s, VTE_CJK_WIDTH_STR = %s", win_data, page_data_prev, gtk_widget_get_name(menuitem_encoding), encoding, locale, user_environ, VTE_CJK_WIDTH_STR); else g_debug("! Launch add_page() with win_data = %p, page_data_prev = %p, " "encoding = %s, locale = %s, environ = %s, VTE_CJK_WIDTH_STR = %s", win_data, page_data_prev, encoding, locale, user_environ, VTE_CJK_WIDTH_STR); #endif #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif // ---- Clone the page_data ---- // struct Page *page_data = g_new0(struct Page, 1); #ifdef SAFEMODE if (page_data==NULL) return NULL; #endif // g_debug ("init page_date = %p!!!", page_data); if (page_data_prev) page_data_dup(page_data_prev, page_data); else init_page_parameters(win_data, page_data); // ---- deal the parameters and set the environs ----// GString *environ_str; if (environments) environ_str = g_string_new(environments); else environ_str = g_string_new(win_data->environment); // g_debug("environ_str = %s", environ_str->str); // set the encoding if ((encoding && (encoding[0]!='\0')) || menuitem_encoding) { // g_debug("encoding = %s", encoding); // g_debug("menuitem_encoding = %p", menuitem_encoding); g_free(page_data->encoding_str); if (encoding && (encoding[0]!='\0')) page_data->encoding_str = g_strdup(encoding); else page_data->encoding_str = g_strdup(gtk_widget_get_name(menuitem_encoding)); // g_debug("FINAL: page_data->encoding_str = %s", page_data->encoding_str); } // g_debug("FINAL: page_data->encoding_str = %s", page_data->encoding_str); // set the locale. // g_debug("locale = %s", locale); if (locale && (locale[0]!='\0')) { gchar *lang = get_lang_str_from_locale(locale, "."); gchar *language = get_language_str_from_locales(locale, win_data->default_locale); g_free(page_data->locale); page_data->locale = g_strdup(locale); g_string_append_printf (environ_str, "\tLANG=%s\tLANGUAGE=%s\tLC_ALL=%s", lang, language, locale); // g_debug("lang = %s, language = %s", lang, language); g_free(lang); g_free(language); } // set the environ that user specify in profile if (user_environ) { g_free(page_data->environ); page_data->environ = g_strdup(user_environ); #ifdef SAFEMODE if (environ_str && environ_str->len) #else if (environ_str->len) #endif environ_str = g_string_append(environ_str, "\t"); g_string_append_printf (environ_str, "%s", user_environ); } #ifdef SAFEMODE if (environ_str && environ_str->len) #else if (environ_str->len) #endif environ_str = g_string_append(environ_str, "\t"); #ifdef ENABLE_SET_EMULATION # ifdef SAFEMODE if (win_data->emulate_term == NULL) g_string_append_printf (environ_str, "TERM=xterm"); else # endif g_string_append_printf (environ_str, "TERM=%s", win_data->emulate_term); #endif // set colorterm g_string_append_printf (environ_str, "\tCOLORTERM=lilyterm"); // ---- Setting the VTE_CJK_WIDTH environment ---- // // g_debug("The VTE_CJK_WIDTH_STR got in add_page is %s", VTE_CJK_WIDTH_STR); if (VTE_CJK_WIDTH_STR && (VTE_CJK_WIDTH_STR[0] != '\0')) { // g_debug("VTE_CJK_WIDTH_STR = %s in add_page", VTE_CJK_WIDTH_STR); g_setenv("VTE_CJK_WIDTH", VTE_CJK_WIDTH_STR, TRUE); g_free(page_data->VTE_CJK_WIDTH_STR); page_data->VTE_CJK_WIDTH_STR = g_strdup(VTE_CJK_WIDTH_STR); } else { // g_debug("page_data->VTE_CJK_WIDTH_STR = %s", page_data->VTE_CJK_WIDTH_STR); if (page_data->VTE_CJK_WIDTH_STR && (page_data->VTE_CJK_WIDTH_STR[0] != '\0')) g_setenv("VTE_CJK_WIDTH", page_data->VTE_CJK_WIDTH_STR, TRUE); else g_unsetenv("VTE_CJK_WIDTH"); } // g_debug("Get VTE_CJK_WIDTH = %s in add_page()", g_getenv("VTE_CJK_WIDTH")); if (page_data->VTE_CJK_WIDTH_STR && (page_data->VTE_CJK_WIDTH_STR[0] != '\0')) { #ifdef SAFEMODE if (environ_str && environ_str->len) #else if (environ_str->len) #endif environ_str = g_string_append(environ_str, "\t"); g_string_append_printf (environ_str, "VTE_CJK_WIDTH=%s", page_data->VTE_CJK_WIDTH_STR); } // ---- Get the final environment data ---- // // g_debug("final (in add_page) : environ_str = %s", environ_str->str); gchar **new_environs = NULL; #ifdef SAFEMODE if (environ_str && environ_str->len) #else if (environ_str->len) #endif new_environs = split_string(environ_str->str, "\t", -1); // print_array("! add_page() environ", new_environs); g_string_free(environ_str, TRUE); // ---- create vte ---- // page_data->vte = vte_terminal_new(); //g_debug("The default encoding of vte is %s", // vte_terminal_get_encoding(VTE_TERMINAL(page_data->vte))); #if (defined (VTE_HAS_INNER_BORDER) && defined(USE_GTK3_GEOMETRY_METHOD)) || defined(UNIT_TEST) gtk_widget_style_get(GTK_WIDGET(page_data->vte), "inner-border", &(page_data->border), NULL); #endif // save the data first // g_debug("Save the data with page_data->vte = %p, page_data = %p", page_data->vte, page_data); g_object_set_data(G_OBJECT(page_data->vte), "Page_Data", page_data); // g_debug("call set_encoding() by %p to %s", page_data->vte, page_data->encoding_str); #ifdef SAFEMODE if (page_data->encoding_str && (page_data->encoding_str[0]!='\0')) #endif vte_terminal_set_encoding(VTE_TERMINAL(page_data->vte), page_data->encoding_str); //g_debug("The encoding of new vte is %s", // vte_terminal_get_encoding(VTE_TERMINAL(page_data->vte))); #ifdef USE_GTK_SCROLLABLE page_data->adjustment = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(page_data->vte)); #else page_data->adjustment = vte_terminal_get_adjustment(VTE_TERMINAL(page_data->vte)); #endif // ---- Execute programs in the vte ---- // //if (command_line==NULL) // command_line = g_getenv("SHELL"); #ifdef DETAIL if (win_data->command) g_debug("! add_page(): command line = %s", win_data->command); if (win_data->argv) print_array("! add_page(): argv", win_data->argv); #endif if (page_data_prev) { // g_debug("page_data_prev->pwd = %s, win_data->home = %s", page_data_prev->pwd, win_data->home); // page_data->pwd = get_init_dir(get_tpgid(page_data_prev->pid), page_data_prev->pwd, win_data->home); page_data->pwd = get_init_dir(get_tpgid(page_data_prev->pid), NULL, win_data->home); } else { // g_debug("win_data->init_dir = %s, win_data->home = %s", win_data->init_dir, win_data->home); page_data->pwd = get_init_dir(-1, win_data->init_dir, win_data->home); } // g_debug("page_data->pwd = %s", page_data->pwd); // extern char **environ; // gchar **old_environ = environ; // extern gchar **empty_environ; // print_array("add_page(): environ:", environ); // const gchar *PATH = NULL; // if (win_data->command) // { // // environ = new_environs; // PATH = g_getenv("PATH"); // // g_debug("add_page(): get PATH = %s", PATH); //} // FIXME: Why clear the environ here? // environ = empty_environ; // if (win_data->command) setenv("PATH", PATH, TRUE); gboolean argv_need_be_free = FALSE; gchar **argv = get_argv(win_data, &argv_need_be_free); gchar **final_argv = argv; #ifdef USE_OLD_VTE_FORK_COMMAND // pid_t vte_terminal_fork_command (VteTerminal *terminal, // const char *command, // char **argv, // char **envv, // const char *working_directory, // gboolean lastlog, // gboolean utmp, // gboolean wtmp); // if (win_data->command==NULL) win_data->command = win_data->shell; // if (win_data->command==NULL) win_data->command = "/bin/sh"; if ((win_data->argv==NULL) && (win_data->login_shell)) final_argv = login_shell_str; // g_debug("win_data->command = %s", win_data->command); // print_array("argv = ", argv); // print_array("new_environs = ", new_environs); // g_debug("page_data->pwd = %s", page_data->pwd); page_data->pid = vte_terminal_fork_command(VTE_TERMINAL(page_data->vte), win_data->command, final_argv, new_environs, page_data->pwd, win_data->utmp, win_data->utmp, win_data->utmp); #else // gboolean vte_terminal_spawn_sync (VteTerminal *terminal, // VtePtyFlags pty_flags, // const char *working_directory, // char **argv, // char **envv, // GSpawnFlags spawn_flags, // GSpawnChildSetupFunc child_setup, // gpointer child_setup_data, // GPid *child_pid, // GCancellable *cancellable, // GError **error); gboolean fork_stats; GSpawnFlags spawn_flags = G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN; GError *error = NULL; gint final_argv_need_be_free = FALSE; login_shell_str[0] = win_data->shell; // g_debug("win_data->shell = %s", win_data->shell); # ifdef SAFEMODE if (login_shell_str[0]==NULL) login_shell_str[0] = "/bin/sh"; # endif if (win_data->argv==NULL) { if (win_data->login_shell) { final_argv = login_shell_str; final_argv_need_be_free = FALSE; spawn_flags |= G_SPAWN_FILE_AND_ARGV_ZERO; } } else { // g_debug("win_data->command = %s", win_data->command); spawn_flags |= G_SPAWN_FILE_AND_ARGV_ZERO; gchar *argv_str = convert_array_to_string(argv, '\x10'); gchar *final_argv_str = g_strdup_printf("%s\x10%s", win_data->command, argv_str); final_argv = split_string(final_argv_str, "\x10", -1); final_argv_need_be_free = TRUE; # ifdef SAFEMODE if (final_argv==NULL) { final_argv = full_argv; final_argv_need_be_free = FALSE; } # endif // print_array("add_page(): final_argv", final_argv); g_free(argv_str); g_free(final_argv_str); } // g_debug("vte_terminal_spawn_sync(): pty_flags = %d", VTE_PTY_DEFAULT); // g_debug("vte_terminal_spawn_sync(): working_directory = %s", page_data->pwd); // print_array("vte_terminal_spawn_sync(): real_arg", final_argv); // print_array("vte_terminal_spawn_sync(): envv", new_environs); // g_debug("vte_terminal_spawn_sync(): win_data->login_shell = %d", win_data->login_shell); // g_debug("vte_terminal_spawn_sync(): spawn_flags = %d", spawn_flags); gint pty_flags = VTE_PTY_DEFAULT; if (win_data->utmp) pty_flags = (VTE_PTY_NO_LASTLOG | VTE_PTY_NO_UTMP | VTE_PTY_NO_WTMP | VTE_PTY_DEFAULT); fork_stats = vte_terminal_spawn_sync (VTE_TERMINAL(page_data->vte), pty_flags, page_data->pwd, final_argv, new_environs, spawn_flags, NULL, NULL, &(page_data->pid), NULL, &error); if (final_argv_need_be_free) g_strfreev(final_argv); login_shell_str[0] = NULL; #endif if (argv_need_be_free) g_strfreev(argv); // environ = old_environ; // g_debug("Got page_data->pid = %d", page_data->pid); // page_data->pid_cmdline = get_cmdline(page_data->pid); g_strfreev(new_environs); // treat '-e option' as `custom_page_name' // print_array ("win_data->argv", win_data->argv); if (win_data->argv || (win_data->custom_tab_names_total > win_data->custom_tab_names_current)) { if (win_data->custom_tab_names_total > win_data->custom_tab_names_current) { page_data->custom_page_name = g_strdup(win_data->custom_tab_names_strs[win_data->custom_tab_names_current]); win_data->custom_tab_names_current++; } else if (win_data->page_shows_current_cmdline) page_data->custom_page_name = get_cmdline(page_data->pid); else page_data->custom_page_name = convert_array_to_string(win_data->argv, ' '); } // g_debug("Got page_data->custom_page_name = %s", page_data->custom_page_name); // --- Create a page and init the page data ---- // // create label // g_debug("Creating label!!"); page_data->label=dirty_gtk_hbox_new(FALSE, 0); g_object_set_data(G_OBJECT(page_data->label), "VteBox", page_data->vte); set_widget_thickness(page_data->label, 0); page_data->label_text = gtk_label_new(win_data->page_name); gtk_box_pack_start(GTK_BOX(page_data->label), page_data->label_text, TRUE, TRUE, 0); set_page_width(win_data, page_data); gtk_label_set_ellipsize(GTK_LABEL(page_data->label_text), PANGO_ELLIPSIZE_MIDDLE); #ifdef USE_GTK2_GEOMETRY_METHOD // when dragging the tab on a vte, or dragging a vte to itself, may change the size of vte. g_signal_connect(G_OBJECT(page_data->label_text), "size_request", G_CALLBACK(label_size_request), page_data); #endif page_data->label_button = gtk_button_new(); set_widget_thickness(page_data->label_button, 0); GtkWidget *image = gtk_image_new_from_stock(GTK_FAKE_STOCK_CLOSE, GTK_ICON_SIZE_MENU); // gtk_button_set_image(GTK_BUTTON(page_data->label_button), image); gtk_container_add(GTK_CONTAINER(page_data->label_button), image); gtk_button_set_relief(GTK_BUTTON(page_data->label_button), GTK_RELIEF_NONE); gtk_button_set_focus_on_click(GTK_BUTTON(page_data->label_button), FALSE); // GtkSettings *settings = gtk_widget_get_settings(page_data->label_text); // int w, h; // gtk_icon_size_lookup_for_settings(settings, GTK_ICON_SIZE_MENU, &w, &h); // gtk_widget_set_size_request(page_data->label_button, w + 4, h + 4); gtk_box_pack_start(GTK_BOX(page_data->label), page_data->label_button, FALSE, FALSE, 0); g_signal_connect(G_OBJECT(page_data->label_button), "clicked", G_CALLBACK(close_page), GINT_TO_POINTER(CLOSE_WITH_TAB_CLOSE_BUTTON)); gtk_widget_show_all(page_data->label); // done in notebook_page_added() // if (! (win_data->show_close_button_on_tab || win_data->show_close_button_on_all_tabs)) // gtk_widget_hide (page_data->label_button); // create a hbox page_data->hbox = dirty_gtk_hbox_new(FALSE, 0); #ifdef GEOMETRY g_signal_connect(G_OBJECT(page_data->hbox), "size-allocate", G_CALLBACK(widget_size_allocate), "hbox"); #endif // gtk_widget_show_all(page_data->hbox); // if (gtk_widget_get_window (page_data->hbox)) // g_debug("HBOX(%p): WINDOWID = %ld", page_data->hbox, GDK_WINDOW_XID (gtk_widget_get_window (page_data->hbox))); // Get current vte size. for init a new tab. glong column=SYSTEM_COLUMN, row=SYSTEM_ROW; #ifdef SAFEMODE if (page_data_prev && (page_data_prev->vte)) #else if (page_data_prev) #endif { column = vte_terminal_get_column_count(VTE_TERMINAL(page_data_prev->vte)); row = vte_terminal_get_row_count(VTE_TERMINAL(page_data_prev->vte)); // g_debug("got prev_vte = %d x %d", column, row); } else { column = win_data->default_column; row = win_data->default_row; } #ifdef GEOMETRY g_debug("@ add_page(): Init New vte with %ld x %ld!", column, row); g_debug("@ add_page(): Using the font : %s", page_data->font_name); #endif // ---- Init the new page ---- // // Init new page. run_once: some settings only need run once. // run_once only = TRUE when initing LilyTerm in main(). init_new_page(win_data, page_data, column, row); #ifdef USE_GTK_SCROLLABLE page_data->scroll_bar = gtk_vscrollbar_new(gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(page_data->vte))); #else page_data->scroll_bar = gtk_vscrollbar_new(vte_terminal_get_adjustment(VTE_TERMINAL(page_data->vte))); #endif pack_vte_and_scroll_bar_to_hbox(win_data, page_data); // g_debug("add_page(): check_show_or_hide_scroll_bar(win_data) = %d", check_show_or_hide_scroll_bar(win_data)); show_and_hide_scroll_bar(page_data, check_show_or_hide_scroll_bar(win_data)); gtk_widget_set_no_show_all(page_data->scroll_bar, TRUE); #if defined(GEOMETRY) || defined(UNIT_TEST) g_signal_connect(G_OBJECT(page_data->vte), "size-allocate", G_CALLBACK(vte_size_allocate), page_data); #endif g_signal_connect(G_OBJECT(page_data->vte), "decrease-font-size", G_CALLBACK(vte_size_changed), GINT_TO_POINTER(FONT_ZOOM_IN)); g_signal_connect(G_OBJECT(page_data->vte), "increase-font-size", G_CALLBACK(vte_size_changed), GINT_TO_POINTER(FONT_ZOOM_OUT)); // the close page event if (! (win_data->hold && win_data->command)) g_signal_connect(G_OBJECT(page_data->vte), "child_exited", G_CALLBACK(close_page), GINT_TO_POINTER(CLOSE_TAB_NORMAL)); // when get focus, update `current_vte', hints, and window title g_signal_connect(G_OBJECT(page_data->vte), "grab-focus", G_CALLBACK(vte_grab_focus), NULL); // show the menu g_signal_connect(G_OBJECT(page_data->vte), "button-press-event", G_CALLBACK(vte_button_press), page_data); g_signal_connect(G_OBJECT(page_data->vte), "button-release-event", G_CALLBACK(vte_button_release), page_data); add_remove_window_title_changed_signal(page_data); // g_signal_connect(G_OBJECT(page_data->vte), "paste-clipboard", // G_CALLBACK(vte_paste_clipboard), GDK_SELECTION_PRIMARY); // GdkRGBA root_color; // dirty_gdk_color_parse("#FFFAFE", &root_color); // gtk_widget_modify_bg(notebook, GTK_STATE_NORMAL, &root_color); // ---- Init other datas of the page ---- // // set the tab name. page_data->current_tpgid = page_data->pid; page_data->displayed_tpgid = 0; // page_data->tab_color = win_data->user_page_color[5]; page_data->is_root = check_is_root(page_data->pid); page_data->is_bold = win_data->bold_current_page_name; // ---- add the new page to notebook ---- // // Note that due to historical reasons, // GtkNotebook refuses to switch to a page unless the child widget is visible. // Therefore, it is recommended to show child widgets before adding them to a notebook. gtk_widget_show_all(page_data->hbox); // if (! win_data->show_scroll_bar) // hide_scroll_bar(win_data, page_data); // FIXME: dirty hack // if (page_data->window==win_data->window), notebook_page_added() won't work. // g_debug("Set page_data->window = NULL in add_page()"); page_data->window = NULL; // g_debug("page_data->vte = %p", page_data->vte); // g_debug("win_data->current_vte = %p", win_data->current_vte); #ifdef SAFEMODE if (page_data->notebook) { #endif page_data->page_no = gtk_notebook_append_page(GTK_NOTEBOOK(page_data->notebook), page_data->hbox, page_data->label); // g_debug("Got page_data->page_no = %d", page_data->page_no); #ifdef DISABLE_PAGE_ADDED notebook_page_added (GTK_NOTEBOOK(page_data->notebook), NULL, page_data->page_no, win_data); #endif // g_debug("The new page no is %d", page_data->page_no); // move the page to next to original page if (page_data_prev && (add_to_next)) { gtk_notebook_reorder_child(GTK_NOTEBOOK(page_data->notebook), page_data->hbox, page_data_prev->page_no + 1); // g_debug("New Page No after move to next to prev page = %d", page_data->page_no); } #ifdef SAFEMODE } #endif win_data->current_vte = page_data->vte; // ---- Monitor cmdline ---- // // g_debug("!!! Launch get_and_update_page_name() in add_page()!"); if ((proc_exist) && (win_data->page_shows_current_cmdline || win_data->page_shows_current_dir || win_data->page_shows_window_title)) { add_remove_page_timeout_id(win_data, page_data); // g_debug("Timeout Added: %d (%d)", page_data->timeout_id, page_data->vte); } else { // g_debug("Launch get_and_update_page_name() in add_page()!"); win_data->page_names_no++; } // g_debug("Got label name from get_and_update_page_name(): %s", page_data->page_name); // ---- Restore the VTE_CJK_WIDTH environment ---- // restore_SYSTEM_VTE_CJK_WIDTH_STR(); // g_debug("Restore VTE_CJK_WIDTH = %s in add_page()", g_getenv("VTE_CJK_WIDTH")); // ---- Finish ---- // // gtk_window_set_focus(GTK_WINDOW(window), page_data->vte); // g_debug("The final encoding of vte is %s" ,vte_terminal_get_encoding(VTE_TERMINAL(page_data->vte))); // page_data->pid < 0: Error occurred when creating sub process. // FIXME: how about "current_vte != page_data->vte"?? #ifdef USE_OLD_VTE_FORK_COMMAND if (page_data->pid < 0) #else if (fork_stats==0) #endif { extern gchar *init_encoding; gchar *arg_str = NULL; if (win_data->argv) arg_str = convert_array_to_string(win_data->argv, ' '); // g_debug("win_data->runtime_encoding = %s", win_data->runtime_encoding); #ifdef USE_OLD_VTE_FORK_COMMAND // g_debug("Error occurred when creating sub process"); // g_debug("arg_str = %s", arg_str); // g_debug("init_encoding = %s", init_encoding); // g_debug("win_data->runtime_encoding = %s", win_data->runtime_encoding); // g_debug("page_data->encoding_str = %s", page_data->encoding_str); if ((compare_strings(init_encoding, runtime_locale_encoding, FALSE)) || (compare_strings(init_encoding, "UTF-8", FALSE))) create_utf8_child_process_failed_dialog (win_data, arg_str, runtime_locale_encoding); else create_child_process_failed_dialog(win_data, arg_str, win_data->runtime_encoding); #else if ((compare_strings(init_encoding, runtime_locale_encoding, FALSE)) || (compare_strings(init_encoding, "UTF-8", FALSE))) create_utf8_child_process_failed_dialog (win_data, arg_str, runtime_locale_encoding); else #ifdef SAFEMODE { if (error) #endif create_child_process_failed_dialog(win_data, error->message, win_data->runtime_encoding); #ifdef SAFEMODE } if (error) #endif g_clear_error(&error); #endif g_free(arg_str); clear_arg(win_data); close_page (page_data->vte, CLOSE_TAB_NORMAL); return NULL; } else { // We MUST clear command_line and parameters after ran -e option. clear_arg(win_data); // FIXME: Calling notebook_page_added() here // page_data->window=NULL; // notebook_page_added(GTK_NOTEBOOK(page_data->notebook), NULL, page_data->page_no, win_data); return page_data; } } gchar **get_argv(struct Window *win_data, gboolean *argv_need_be_free) { #ifdef DETAIL g_debug("! Launch get_argv()! with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (argv_need_be_free==NULL)) return NULL; #endif gchar **argv = win_data->argv; *argv_need_be_free = FALSE; #ifdef SAFEMODE if ((argv==NULL) && win_data->shell && (win_data->shell[0]!='\0')) #else if ((argv==NULL) && (win_data->shell[0]!='\0')) #endif { argv = split_string(win_data->shell, " ", -1); *argv_need_be_free = TRUE; #ifdef SAFEMODE } if (argv==NULL) { argv = g_strsplit("/bin/sh", " ", -1); *argv_need_be_free = TRUE; } if (argv==NULL) { argv = login_shell_str; *argv_need_be_free = FALSE; #endif } return argv; } void create_utf8_child_process_failed_dialog (struct Window *win_data, gchar *message, gchar *encoding) { #ifdef DETAIL g_debug("! Launch create_utf8_child_process_failed_dialog()! with win_data = %p, message = %s, " "encoding = %s", win_data, message, encoding); #endif gchar *utf8_arg_str = convert_str_to_utf8(message, encoding); create_child_process_failed_dialog(win_data, utf8_arg_str, NULL); g_free(utf8_arg_str); } void create_child_process_failed_dialog(struct Window *win_data, gchar *message, gchar *encoding) { #ifdef DETAIL g_debug("! Launch create_child_process_failed_dialog() with message = %s, encoding = %s", message, encoding); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif gint i; gchar *temp_str[3] = {NULL}; temp_str[0] = convert_str_to_utf8(message, encoding); if (temp_str[0]!=NULL) temp_str[1] = g_markup_escape_text(temp_str[0], -1); if (temp_str[1]) temp_str[2] = g_strconcat(_("Error while creating the child process:"), "\n\n\t", temp_str[1], "", NULL); #ifndef UNIT_TEST else temp_str[2] = _("Error while creating the child process!\n" "Please make sure the /dev/pts is mounted as a devpts file system!"); #endif // g_debug("message = %s", message); // for (i=0; i<3; i++) // g_debug("temp_str[%d] = %s", i, temp_str[i]); // error_dialog(GtkWidget *window, gchar *title, gchar *icon, gchar *message, gchar *encoding) GtkWidget *window = NULL; #ifdef SAFEMODE if (win_data) #endif window = win_data->window; error_dialog(window, _("Error when creating child process"), "Error when creating child process", GTK_FAKE_STOCK_DIALOG_ERROR, temp_str[2], NULL); if (temp_str[1]) g_free(temp_str[2]); for (i=0; i<2; i++) g_free(temp_str[i]); } void clear_arg(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch clear_arg()"); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("clear_arg(): win_data = %p, win_data->command = %s, win_data->argc = %d", win_data, win_data->command, win_data->argc); // print_array("clear_arg(): win_data->argv", win_data->argv); win_data->command = NULL; win_data->hold = FALSE; win_data->argc = 0; win_data->argv = NULL; } #if defined (USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) void label_size_request (GtkWidget *label, GtkRequisition *requisition, struct Page *page_data) { # ifdef DETAIL g_debug("! Launch label_size_request() with page_data = %p", page_data); # endif # ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return; # endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); # ifdef SAFEMODE if (win_data==NULL) return; # endif // g_debug("label_size_request(): launch keep_window_size()!"); # ifdef GEOMETRY g_debug("@ label_size_request(for %p): Call keep_gtk2_window_size() with keep_vte_size = %x", win_data->window, win_data->keep_vte_size); # endif keep_gtk2_window_size (win_data, page_data->vte, 0x3); } #endif #if defined(GEOMETRY) || defined(UNIT_TEST) void vte_size_allocate (GtkWidget *vte, GtkAllocation *allocation, struct Page *page_data) { # ifdef DETAIL g_debug("! Launch vte_size_allocate() with vte = %p, page_data = %p", vte, page_data); # endif #ifdef USE_GTK3_GEOMETRY_METHOD // fprintf(stderr, "\033[1;36m** vte_size_allocate(): the allocated size is %d x %d (%ldx%ld)\033[0m\n", // allocation->width, allocation->height, // vte_terminal_get_column_count(VTE_TERMINAL(vte)), // vte_terminal_get_row_count(VTE_TERMINAL(vte))); # ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return; # endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); glong column = vte_terminal_get_column_count(VTE_TERMINAL(vte)); glong row = vte_terminal_get_row_count(VTE_TERMINAL(vte)); gboolean check_col_row = (column < 80) || (row < 24); if (win_data->hints_type==HINTS_NONE) { column = vte_terminal_get_char_width(VTE_TERMINAL(vte))*column + page_data->border->left + page_data->border->right; row = vte_terminal_get_char_height(VTE_TERMINAL(vte))*row + page_data->border->top + page_data->border->bottom; } check_col_row |= (column != win_data->geometry_width); check_col_row |= (row != win_data->geometry_height); if (((win_data->window_status!=WINDOW_NORMAL) && (win_data->window_status!=WINDOW_RESIZING_TO_NORMAL)) && check_col_row) { fprintf(stderr, "\033[1;31m!! vte_size_allocate(win_data %p)(vte %p): the allocated size is %d x %d (%ldx%ld) (saved: %ld x %ld)\033[0m\n", win_data, vte, allocation->width, allocation->height, column, row, win_data->geometry_width, win_data->geometry_height); } else #endif widget_size_allocate (vte, allocation, "vte"); } #endif void vte_size_changed(VteTerminal *vte, Font_Set_Type type) { #ifdef DETAIL g_debug("! Launch vte_size_changed() with vte = %p, type = %d", vte, type); #endif set_vte_font(NULL, type); } // close_type = confirm to exit foreground running command or not // close_type > 0: Not using 'exit' or '' to close this page. gboolean close_page(GtkWidget *vte, gint close_type) { #ifdef DETAIL g_debug("! Launch close_page() with vte = %p, and close_type = %d, force_to_quit = %d", vte, close_type, force_to_quit); #endif #ifdef SAFEMODE if (vte==NULL) return FALSE; #endif if (close_type==CLOSE_WITH_TAB_CLOSE_BUTTON) vte=(GtkWidget *)g_object_get_data(G_OBJECT(gtk_widget_get_parent(vte)), "VteBox"); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); // g_debug("Get page_data = %p, pid = %d, vte = %p when closing page!", page_data, page_data->pid, vte); #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return FALSE; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif if (win_data->confirm_to_kill_running_command == FALSE) { force_to_quit=TRUE; close_type=CLOSE_TAB_NORMAL; } GString *child_process_list = g_string_new(NULL); // close_type = TRUE: Not using 'exit' or '' to close this page. if (close_type) { if (process_data==NULL) { process_data = g_new0(struct Process_Data, PID_MAX_DEFAULT); #ifdef SAFEMODE if (process_data) { #endif child_process_list = get_child_process_list(0, 0, 0, child_process_list, page_data->pid, win_data, FALSE); clean_process_data(); #ifdef SAFEMODE } #endif } else { gint i; for (i=2; ipage_no)+1)) && ((process_data[i].window==0) || (process_data[i].window==page_data->window))) { gchar *cmdline = get_cmdline(i); #ifdef SAFEMODE if (cmdline) #endif g_string_append_printf(child_process_list ,"\t(%d) %s\n", i, cmdline); g_free(cmdline); } } } } // g_debug("Got child_process_list = %s", child_process_list->str); // g_debug("Deleting Page ID: %d", page_data->pid); // Confirm to close current running command... if ((! force_to_quit) && (page_data->pid>1) && (! win_data->kill_color_demo_vte)) { pid_t tpgid = get_tpgid(page_data->pid); gchar **stats = get_pid_stat(tpgid, 4); if (stats) { // g_debug("Got tpgid = %s, cmd = %s", stats[9], stats[2]); // if ((page_data->pid != atoi(stats[9])) && // (! check_string_in_array(stats[2], win_data->foreground_program_whitelists))) if (! check_string_in_array(stats[2], win_data->foreground_program_whitelists)) { // g_debug("Got page_data->pid = %d, tpgid = %d", page_data->pid, tpgid); // We need to set "win_data->current_vte = vte", or wrong page may be closed. GtkWidget *current_vte_orig = win_data->current_vte; win_data->current_vte = vte; GtkResponseType return_value = dialog(NULL, CONFIRM_TO_CLOSE_RUNNING_APPLICATION); // restore win_data->current_vte win_data->current_vte = current_vte_orig; if (return_value != GTK_RESPONSE_OK) { g_string_free(child_process_list, TRUE); g_strfreev(stats); return FALSE; } } } g_strfreev(stats); } // Confirm to close tab if it have child process... #ifdef SAFEMODE if ((! force_to_quit) && (child_process_list && child_process_list->len) && (! win_data->kill_color_demo_vte)) #else if ((! force_to_quit) && child_process_list->len && (! win_data->kill_color_demo_vte)) #endif { // Switch win_data->current_vte here, // Or the "%d tab" of dialog will incorrect if we click the [X] on a tab that is not on focus. GtkWidget *oldvte = win_data->current_vte; win_data->current_vte = vte; if (!display_child_process_dialog(child_process_list, win_data, CONFIRM_TO_CLOSE_A_TAB_WITH_CHILD_PROCESS)) { g_string_free(child_process_list, TRUE); win_data->current_vte = oldvte; return FALSE; } // Switch back win_data->current_vte = oldvte; } if (win_data->auto_save && (gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook))==1)) save_user_settings(NULL, win_data); // remove timeout event for page_shows_current_cmdline // if (page_data->page_shows_current_cmdline || // page_data->page_shows_current_dir || // page_data->page_shows_window_title) if (page_data->timeout_id) g_source_remove (page_data->timeout_id); if (page_data->urgent_bell_handler_id) g_signal_handler_disconnect(G_OBJECT(page_data->vte), page_data->urgent_bell_handler_id); // kill running shell #ifdef SAFEMODE if (using_kill && child_process_list && child_process_list->len) #else if (using_kill && child_process_list->len) #endif { // if the tab is not close by , we need to launch kill() // g_debug("Trying to kill %d!", page_data->pid); kill(page_data->pid, SIGKILL); } g_string_free(child_process_list, TRUE); // restore using_kill if only one page is closed. if (! force_to_quit) using_kill = FALSE; if (vte==win_data->current_vte) { win_data->current_vte = NULL; // set the current page // g_debug ("Setting current page to %d!", page_num); if (page_data->page_no==(gtk_notebook_get_n_pages(GTK_NOTEBOOK(page_data->notebook))-1)) gtk_notebook_set_current_page(GTK_NOTEBOOK(page_data->notebook), page_data->page_no-1); else gtk_notebook_set_current_page(GTK_NOTEBOOK(page_data->notebook), page_data->page_no+1); } #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gtk_border_free(page_data->border); #endif g_free(page_data->page_name); // Note that due to historical reasons, // GtkNotebook refuses to switch to a page unless the child widget is visible. // Therefore, it is recommended to show child widgets before adding them to a notebook. gtk_widget_hide_all(page_data->hbox); // gtk_widget_destroy(page_data->vte); // remove current page // use page_data->page_no. DANGEROUS! // g_debug ("The %d page is going to be removed!", page_data->page_no); // Due to the bugs in GTK3+(?), Using gtk_widget_destroy(windows) instead of closing the last page! gint total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(page_data->notebook)); gboolean run_quit_gtk = FALSE; if (total_page==1) { run_quit_gtk = gtk_widget_get_mapped(win_data->window); gtk_widget_destroy (win_data->window); win_data->window = NULL; } else gtk_notebook_remove_page(GTK_NOTEBOOK(page_data->notebook), page_data->page_no); // free the memory used by this page g_free(page_data->pid_cmdline); g_free(page_data->custom_page_name); g_free(page_data->pwd); g_free(page_data->font_name); g_free(page_data->encoding_str); g_free(page_data->locale); g_free(page_data->VTE_CJK_WIDTH_STR); g_free(page_data->window_title_pwd); g_free(page_data->environ); // FIXME: Calling remove_notebook_page() here // GtkNotebook may drag a page to itself, // So a GtkNotebook may be page_removed() -> page_added() with the same page // but the GtkNotebook may be destroyed after page_removed() // So that we should call page_removed() here, not using "page-removed" signal... -_-||| // g_debug("page_data->notebook = %p, page_data->page_no = %d, win_data = %p", // page_data->notebook, page_data->page_no, win_data); if (total_page==1) remove_notebook_page (NULL, NULL, page_data->page_no, win_data, run_quit_gtk); else remove_notebook_page (GTK_NOTEBOOK(page_data->notebook), NULL, page_data->page_no, win_data, run_quit_gtk); // g_strfreev(page_data->environments); g_free(page_data); return TRUE; } void vte_grab_focus(GtkWidget *vte, gpointer user_data) { #ifdef DETAIL g_debug("! Launch vte_grab_focus() with vte = %p", vte); #endif #ifdef SAFEMODE if (vte==NULL) return; #endif // g_debug("vte = %p grab focus !", vte); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif // restore match_regex first... if (! page_data->match_regex_setted) set_hyperlink(win_data, page_data); // g_debug("Get win_data = %p (page_data->window = %p) when vte grab focus!", win_data, page_data->window); //if (win_data->lost_focus) // return; // Recover the dim text of vte dim_vte_text (win_data, page_data, 0); // if (gtk_widget_get_window (page_data->vte)) // g_debug("VTE(%p): WINDOWID = %ld", page_data->vte, GDK_WINDOW_XID (gtk_widget_get_window (page_data->vte))); // Don't update page name when win_data->kill_color_demo_vte. // Or LilyTerm will got warning: "Failed to set text from markup due to error parsing markup" if ((win_data->current_vte != vte || (win_data->current_vte == NULL)) && (! win_data->kill_color_demo_vte)) { // win_data->current_vte == NULL: when the creation of sub process failed. // like 'lilyterm -e xxx' in a lilyterm if (win_data->current_vte != NULL) { struct Page *prev_data = (struct Page *)g_object_get_data( G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (prev_data) { #endif if (!win_data->show_close_button_on_all_tabs) gtk_widget_hide (prev_data->label_button); // g_debug("un_bold prev page."); if ((win_data->bold_current_page_name || win_data->bold_action_page_name)) { prev_data->is_bold = FALSE; prev_data->should_be_bold = FALSE; // g_debug ("Launch update_page_name() to un_bold prev page!!!"); update_page_name (prev_data->window, win_data->current_vte, prev_data->page_name, prev_data->label_text, prev_data->page_no+1, prev_data->custom_page_name, prev_data->tab_color, prev_data->is_root, FALSE, compare_strings(win_data->runtime_encoding, prev_data->encoding_str, FALSE), prev_data->encoding_str, prev_data->custom_window_title, FALSE); } #ifdef SAFEMODE } #endif } // g_debug ("Update current_vte! (%p), and hints_type = %d", vte, win_data->hints_type); // current_vte = vte; win_data->current_vte = vte; // We will not update the page name when close color demo vte // if (win_data->dialog_activated) return; //if (keep_vte_size==0) //{ // // g_debug("window_resizable in vte_grab_focus!"); // // we should bind the hints information on current vte. // // Or the geometry of vte may be changed when deleting the vte hold hints info. // // It can help to hold the correct vte size. // g_debug("Update hints!") // window_resizable(vte, hints_type, 1); //} // update the window title if (win_data->window_title_shows_current_page && (! page_data->custom_window_title)) update_window_title(page_data->window, page_data->page_name, win_data->window_title_append_package_name); show_close_button_on_tab(win_data, page_data); // bold/un_bold current page // g_debug("then, bold/un_bold current page."); if (win_data->bold_current_page_name || win_data->bold_action_page_name) { page_data->is_bold = win_data->bold_current_page_name; // g_debug("page_data->encoding = %p win_data->default_menuitem_encoding = %p", // page_data->encoding, win_data->default_menuitem_encoding); // if (win_data->default_menuitem_encoding) // g_debug("win_data->default_menuitem_encoding->name = %s, " // "page_data->encoding_str = %s", // gtk_widget_get_name(win_data->default_menuitem_encoding), page_data->encoding_str); update_page_name (page_data->window, vte, page_data->page_name, page_data->label_text, page_data->page_no+1, page_data->custom_page_name, page_data->tab_color, page_data->is_root, page_data->is_bold, compare_strings(win_data->runtime_encoding, page_data->encoding_str, FALSE), page_data->encoding_str, page_data->custom_window_title, FALSE); } } } // dim_text = 0: dim the vte // dim_text = 1: light up the vte // dim_text = 2: auto detect // NOTE: page_data may be NULL here! void dim_vte_text (struct Window *win_data, struct Page *page_data, gint dim_text) { #ifdef DETAIL g_debug("! Launch dim_vte_text() with win_data = %p, page_data = %p, dim_text = %d", win_data, page_data, dim_text); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // The page_data==NULL && win_data->current_vte==NULL when -e options failed. if (page_data==NULL && (win_data->current_vte==NULL)) return; // dim_vte = TRUE: dim the vte // dim_vte = FALSE: light up the vte gint dim_vte = FALSE; // if page_data==NULL, using "win_data->current_vte" if (! page_data) page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); if (dim_text==2) { if (win_data->dim_text) dim_vte = page_data->dim_text_expect; else dim_vte = FALSE; } else { page_data->dim_text_expect = FALSE; if (dim_text) { // Trying to check if we should dim the vte // g_debug("menu_activated = %d, dialog_activated = %d, win_data->lost_focus = %d", // menu_activated, dialog_activated, win_data->lost_focus); if ((! menu_activated) && (dialog_activated==0) && (win_data->lost_focus)) { page_data->dim_text_expect = TRUE; if (win_data->dim_text) dim_vte = TRUE; } } } // FIXME: Sometimes we should to force light up the vte // if ((! win_data->use_set_color_fg_bg)) // dim_vte = FALSE; // g_debug("CHECK: dim_vte = %d, page_data->vte_is_inactivated = %d", dim_vte, page_data->vte_is_inactivated); #ifdef SAFEMODE if (page_data->vte==NULL) return; #endif // for performance, if the vte was dimmed already, don't dim it again. if (page_data->vte_is_inactivated != dim_vte) { if (dim_vte) set_vte_color(page_data->vte, TRUE, win_data->custom_cursor_color, win_data->cursor_color, win_data->color_inactive, TRUE, (win_data->color_theme_index==(THEME-1))); else set_vte_color(page_data->vte, TRUE, win_data->custom_cursor_color, win_data->cursor_color, win_data->color, TRUE, (win_data->color_theme_index==(THEME-1))); page_data->vte_is_inactivated = dim_vte; } // g_debug("FINAL: dim_vte = %d, page_data->vte_is_inactivated = %d", dim_vte, page_data->vte_is_inactivated); } gboolean vte_button_press(GtkWidget *vte, GdkEventButton *event, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch vte_button_press() for vte %p (page_data = %p)", vte, page_data); #endif #ifdef SAFEMODE if ((page_data==NULL) || (event==NULL)) return FALSE; #endif menu_active_window = page_data->window; // g_debug("set menu_active_window = %p", menu_active_window); struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif // g_debug ("Get win_data = %d in show_menu", win_data); if (! win_data->enable_key_binding) return FALSE; if (event->button == 2) { if (win_data->confirm_to_paste) return confirm_to_paste_form_clipboard(SELECTION_PRIMARY, win_data, page_data); else return FALSE; } else if (event->button == 3) { menu_activated = TRUE; // Find/Add the encoding of current tab on right click menu if (win_data->locale_sub_menu) { // We will not update coding here. win_data->checking_menu_item = TRUE; //if (page_data->encoding!=NULL) // g_debug ("Update the encoding of page %d in menu to %s", // page_data->page_no, gtk_widget_get_name(page_data->encoding)); // g_debug("Set the menuitem %d t active", page_data->encoding); // menu is inited after add_page(). so that the encoding_str of 1st page is NULL. // if (page_data->encoding_str==NULL) // page_data->encoding_str = g_strdup(win_data->runtime_encoding); // gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(page_data->encoding), TRUE); // Trying to find the right encoding menuitem... if (win_data->encoding_sub_menu) { GSList *menuitem_list = gtk_radio_menu_item_get_group( GTK_RADIO_MENU_ITEM( win_data->default_menuitem_encoding)); while (menuitem_list) { // g_debug("Checking %s...", gtk_widget_get_name(GTK_WIDGET(menuitem_list->data))); if ( ! compare_win_page_encoding(menuitem_list->data, page_data->encoding_str)) { gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM( menuitem_list->data), TRUE); break; } // g_debug("menuitem_list->next = %p", menuitem_list->next); // Not find in menu item list. Add it! if (menuitem_list->next == NULL) { GtkWidget *menuitem = add_radio_menuitem_to_sub_menu ( gtk_radio_menu_item_get_group ( GTK_RADIO_MENU_ITEM (menuitem_list->data)), win_data->encoding_sub_menu, page_data->encoding_str, (GSourceFunc)set_encoding, NULL); #ifdef SAFEMODE if (menuitem) { #endif gtk_widget_show (menuitem); gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(menuitem), TRUE); #ifdef SAFEMODE } #endif } menuitem_list = menuitem_list->next; } } // query done win_data->checking_menu_item = FALSE; } // Update the profile list refresh_profile_list(win_data); win_data->checking_menu_item = TRUE; #ifdef SAFEMODE if (win_data->current_menuitem_theme) #endif gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->current_menuitem_theme), TRUE); #ifdef SAFEMODE if (win_data->current_menuitem_erase_binding) #endif gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->current_menuitem_erase_binding), TRUE); #ifdef ENABLE_CURSOR_SHAPE # ifdef SAFEMODE if (win_data->current_menuitem_cursor_shape) # endif gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->current_menuitem_cursor_shape), TRUE); #endif #ifdef SAFEMODE if (win_data->menuitem_invert_color) #endif gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_invert_color), win_data->invert_color); // g_debug("vte_button_press(): set win_data->menuitem_invert_color(%p) to %d", win_data->menuitem_invert_color, win_data->invert_color); #ifdef SAFEMODE if (win_data->menuitem_auto_save) #endif gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_auto_save), win_data->auto_save); win_data->checking_menu_item = FALSE; if (win_data->show_background_menu) { #ifdef ENABLE_RGBA if (win_data->use_rgba == -1) # ifdef SAFEMODE if (win_data->menuitem_trans_win) # endif // GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_win)->active = // win_data->transparent_window; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_win), win_data->transparent_window); #endif // The following codes is only working with vte > 0.19 // gint transparent; // g_object_get (vte, // "background-transparent", &transparent, // NULL); // GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_bg)->active = transparent; #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) # ifdef SAFEMODE if (win_data->menuitem_trans_bg) # endif // GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_bg)->active = // win_data->transparent_background; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_trans_bg), win_data->transparent_background); #endif } if (win_data->show_copy_paste_menu) { // enable win_data->menuitem_copy_url or not if ( win_data->enable_hyperlink) { gint tag; // g_free(win_data->menuitem_copy_url->name); gchar *url = get_url(event, page_data, &tag); // g_debug("url = %s", url); gtk_widget_set_name (win_data->menuitem_copy_url, url); // g_debug("name of win_data->menuitem_copy_url is %s", // gtk_widget_get_name(win_data->menuitem_copy_url)); gtk_widget_set_sensitive (win_data->menuitem_copy_url, url!=NULL); g_free(url); } // enable win_data->menuitem_copy or not gtk_widget_set_sensitive (win_data->menuitem_copy, vte_terminal_get_has_selection (VTE_TERMINAL(vte))); // enable win_data->menuitem_paste or not extern GtkClipboard *selection_clipboard; gchar *temp_str = NULL; #ifdef SAFEMODE if (selection_clipboard) #endif temp_str = gtk_clipboard_wait_for_text (selection_clipboard); // g_debug("clipboard = %s", temp_str); gtk_widget_set_sensitive (win_data->menuitem_paste, (temp_str != NULL)); gtk_widget_set_sensitive (win_data->menuitem_clipboard, (temp_str != NULL)); extern GtkClipboard *selection_primary; #ifdef SAFEMODE if (selection_primary) #endif temp_str = gtk_clipboard_wait_for_text (selection_primary); gtk_widget_set_sensitive (win_data->menuitem_primary, (temp_str != NULL)); g_free(temp_str); } // if (page_data->use_scrollback_lines) // GTK_CHECK_MENU_ITEM(win_data->menuitem_scrollback_lines)->active = page_data->use_scrollback_lines; if (win_data->dim_text) #ifdef SAFEMODE if (win_data->menuitem_dim_text) #endif // GTK_CHECK_MENU_ITEM(win_data->menuitem_dim_text)->active = win_data->dim_text; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_dim_text), win_data->dim_text); #ifdef ENABLE_RGBA if ((win_data->dim_window) && (win_data->use_rgba == -1)) # ifdef SAFEMODE if (win_data->menuitem_dim_window) # endif // GTK_CHECK_MENU_ITEM(win_data->menuitem_dim_window)->active = win_data->dim_window; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_dim_window), win_data->dim_window); #endif #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE gboolean blinks, blinks_original = win_data->cursor_blinks; if (win_data->cursor_blinks ==0) g_object_get(gtk_widget_get_settings(vte), "gtk-cursor-blink", &blinks, NULL); else blinks = (win_data->cursor_blinks==1) ? TRUE : FALSE; // GTK_CHECK_MENU_ITEM(win_data->menuitem_cursor_blinks)->active = blinks; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_cursor_blinks), blinks); win_data->cursor_blinks = blinks_original; #else // GTK_CHECK_MENU_ITEM(win_data->menuitem_cursor_blinks)->active = win_data->cursor_blinks; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_cursor_blinks), win_data->cursor_blinks); #endif // GTK_CHECK_MENU_ITEM(win_data->menuitem_allow_bold_text)->active = win_data->allow_bold_text; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_allow_bold_text), win_data->allow_bold_text); // GTK_CHECK_MENU_ITEM(win_data->menuitem_open_url_with_ctrl_pressed)->active = win_data->open_url_with_ctrl_pressed; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_open_url_with_ctrl_pressed), win_data->open_url_with_ctrl_pressed); // GTK_CHECK_MENU_ITEM(win_data->menuitem_disable_url_when_ctrl_pressed)->active = win_data->disable_url_when_ctrl_pressed; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_disable_url_when_ctrl_pressed), win_data->disable_url_when_ctrl_pressed); // GTK_CHECK_MENU_ITEM(win_data->menuitem_audible_bell)->active = win_data->audible_bell; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_audible_bell), win_data->audible_bell); #ifdef ENABLE_VISIBLE_BELL // GTK_CHECK_MENU_ITEM(win_data->menuitem_visible_bell)->active = win_data->visible_bell; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_visible_bell), win_data->visible_bell); #endif #ifdef ENABLE_BEEP_SINGAL // GTK_CHECK_MENU_ITEM(win_data->menuitem_urgent_bell)->active = win_data->urgent_bell; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_urgent_bell), win_data->urgent_bell); #endif if (gtk_notebook_get_show_tabs GTK_NOTEBOOK(win_data->notebook)) { gtk_widget_hide (win_data->menuitem_show_tabs_bar); gtk_widget_show (win_data->menuitem_hide_tabs_bar); gtk_widget_hide (win_data->menuitem_always_show_tabs_bar); gtk_widget_show (win_data->menuitem_always_hide_tabs_bar); // GTK_CHECK_MENU_ITEM(win_data->menuitem_always_hide_tabs_bar)->active = // (win_data->always_show_tabs_bar==0)? 1 : 0; } else { gtk_widget_show (win_data->menuitem_show_tabs_bar); gtk_widget_hide (win_data->menuitem_hide_tabs_bar); gtk_widget_show (win_data->menuitem_always_show_tabs_bar); gtk_widget_hide (win_data->menuitem_always_hide_tabs_bar); // GTK_CHECK_MENU_ITEM(win_data->menuitem_always_show_tabs_bar)->active = // (win_data->always_show_tabs_bar==1)? 1 : 0; } gtk_menu_popup(GTK_MENU(win_data->menu), NULL, NULL, NULL, NULL, event->button, event->time); return TRUE; } else if (event->button == 1) { // return if hyperlink is disabled. if (! win_data->enable_hyperlink) return FALSE; // g_debug("vte_button_press(): event->state & GDK_CONTROL_MASK = %d", event->state & GDK_CONTROL_MASK); if (win_data->open_url_with_ctrl_pressed && ((event->state & GDK_CONTROL_MASK)==0)) { // clean the url first... clean_hyperlink(win_data, page_data); return FALSE; } gint tag; gchar *url = get_url(event, page_data, &tag); // g_debug("get url = %s", url); // url = NULL -> we don't need to free it. gboolean response = FALSE; if (url != NULL) response = open_url_with_external_command (url, tag, win_data, page_data); g_free(url); return response; } return FALSE; } gboolean vte_button_release(GtkWidget *vte, GdkEventButton *event, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch vte_button_release() for vte %p", vte); #endif #ifdef SAFEMODE if ((page_data==NULL) || (event==NULL)) return FALSE; #endif if (page_data->match_regex_setted == FALSE) { struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif if (! win_data->enable_hyperlink) return FALSE; set_hyperlink(win_data, page_data); } return FALSE; } gboolean open_url_with_external_command (gchar *url, gint tag, struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch open_url_with_external_command() with url = %s, tag = %d, win_data = %p, page_data = %p", url, tag, win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL)) return FALSE; #endif gchar *full_command = g_strdup_printf("%s\t%s", win_data->user_command[tag].command, url); // g_debug ("full_command = %s", full_command); gchar **argv = split_string(full_command, "\t", -1); #ifdef SAFEMODE if (argv==NULL) { g_free(full_command); return FALSE; } #endif gint argc = 0; while (argv[argc]) argc++; // g_debug("argc = %d", argc); // g_debug("win_data->user_command[tag].method = %d", win_data->user_command[tag].method); switch (win_data->user_command[tag].method) { case 0: { // 0: new tab win_data->command = argv[0]; win_data->argv = argv; win_data->argc = argc; // g_debug("win_data->user_command[tag].locale = %s", // win_data->user_command[tag].locale); gchar *locale = page_data->locale; #ifdef SAFEMODE if (win_data->user_command[tag].locale && (win_data->user_command[tag].locale[0] != '\0')) #else if (win_data->user_command[tag].locale[0] != '\0') #endif locale = win_data->user_command[tag].locale; // g_debug("hyperlink: locale = %s", locale); gchar *encoding = get_encoding_from_locale(locale); if (encoding == NULL) { if (check_and_add_locale_to_warned_locale_list(win_data, win_data->user_command[tag].locale)) create_invalid_locale_error_message(locale); locale = page_data->locale; encoding = g_strdup(page_data->encoding_str); } // g_debug("hyperlink: encoding = %s", encoding); // g_debug("win_data->user_command[tag].VTE_CJK_WIDTH = %d, " // "get_VTE_CJK_WIDTH_str(win_data->user_command[tag].VTE_CJK_WIDTH) = %s", // win_data->user_command[tag].VTE_CJK_WIDTH , // get_VTE_CJK_WIDTH_str(win_data->user_command[tag].VTE_CJK_WIDTH)); // add_page(struct Window *win_data, // struct Page *page_data_prev, // GtkWidget *menuitem_encoding, // gchar *encoding, // gchar *locale, // gchar *environments, // gchar *user_environ, // gchar *VTE_CJK_WIDTH_STR, // gboolean add_to_next) add_page(win_data, page_data, NULL, encoding, page_data->encoding_str, locale, NULL, win_data->user_command[tag].environ, get_VTE_CJK_WIDTH_str(win_data->user_command[tag].VTE_CJK_WIDTH), TRUE); g_free(encoding); break; } case 1: { // FIXME: use vfork()/execvp() may cause zombie process. // But we can't get if the child process is succeed or not // if using system() here. // system(full_command); set_VTE_CJK_WIDTH_environ(win_data->user_command[tag].VTE_CJK_WIDTH); GString *environ_str = g_string_new(win_data->environment); if (win_data->user_command[tag].environ && win_data->user_command[tag].environ[0] != '\0') g_string_append_printf (environ_str, "\t%s", win_data->user_command[tag].environ); #ifdef SAFEMODE if (win_data->user_command[tag].locale && win_data->user_command[tag].locale[0] != '\0') #else if (win_data->user_command[tag].locale[0]!='\0') #endif { gchar *lang = get_lang_str_from_locale(win_data->user_command[tag].locale, "."); gchar *language = get_language_str_from_locales(win_data->user_command[tag].locale, win_data->default_locale); g_string_append_printf (environ_str, "\tLANG=%s\tLANGUAGE=%s\tLC_ALL=%s", lang, language, win_data->user_command[tag].locale); g_free(language); g_free(lang); } // g_debug("gdk_spawn_on_screen_with_pipes: environ_str = %s", environ_str->str); gchar **new_environs = NULL; #ifdef SAFEMODE if (environ_str && environ_str->len) #else if (environ_str->len) #endif new_environs = split_string(environ_str->str, "\t", -1); // gboolean g_spawn_async_with_pipes (const gchar *working_directory, // gchar **argv, // gchar **envp, // GSpawnFlags flags, // GSpawnChildSetupFunc child_setup, // gpointer user_data, // GPid *child_pid, // gint *standard_input, // gint *standard_output, // gint *standard_error, // GError **error); if (g_spawn_async_with_pipes (NULL, argv, new_environs, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == FALSE) { gint i=0; while (full_command[i]) { if (full_command[i]=='\t') full_command[i]=' '; i++; } create_child_process_failed_dialog(win_data, full_command, NULL); } restore_SYSTEM_VTE_CJK_WIDTH_STR(); g_string_free(environ_str, TRUE); g_strfreev(new_environs); break; } case 2: { confirm_to_execute = FALSE; gchar *new_command = g_strdup_printf("-u\t%s\t-e\t%s", win_data->profile, full_command); gchar **new_argv = split_string(new_command, "\t", -1); // g_debug("encoding = %s", encoding); gchar *locale = win_data->default_locale; #ifdef SAFEMODE if (win_data->user_command[tag].locale && (win_data->user_command[tag].locale[0]!='\0')) #else if (win_data->user_command[tag].locale[0]!='\0') #endif locale = win_data->user_command[tag].locale; gchar *encoding = (gchar *)get_encoding_from_locale(locale); if (encoding == NULL) { if (check_and_add_locale_to_warned_locale_list(win_data, locale)) create_invalid_locale_error_message(locale); locale = page_data->locale; encoding = g_strdup(page_data->encoding_str); } gchar *lang = get_lang_str_from_locale(locale, "."); gchar *language = get_language_str_from_locales(locale, win_data->default_locale); gchar *new_environs = g_strdup_printf("%s\tLANG=%s\tLANGUAGE=%s\tLC_ALL=%s", win_data->user_command[tag].environ, lang, language, locale); g_free(lang); g_free(language); // g_debug("new_environs = %s", new_environs); // gchar *pwd = get_current_pwd_by_pid(page_data->pid); gchar *pwd = get_init_dir(get_tpgid(page_data->pid), page_data->pwd, win_data->home); //GtkNotebook *new_window(int argc, // char *argv[], // gchar *shell, // gchar *environment, // gchar *locale_list, // gchar *PWD, // gchar *HOME, // gchar *VTE_CJK_WIDTH_STR, // gboolean VTE_CJK_WIDTH_STR_overwrite_profile, // gchar *wmclass_name, // gchar *wmclass_class, // gchar *user_environ, // gchar *encoding, // gboolean encoding_overwrite_profile, // gchar *lc_messages, // struct Window *win_data_orig, // struct Page *page_data_orig) new_window(argc+3, new_argv, win_data->shell, win_data->environment, win_data->runtime_locale_list, pwd, win_data->home, get_VTE_CJK_WIDTH_str(win_data->user_command[tag].VTE_CJK_WIDTH), TRUE, win_data->wmclass_name, win_data->wmclass_class, new_environs, encoding, TRUE, locale, NULL, NULL); g_free(new_environs); g_free(encoding); g_free (new_command); g_strfreev(new_argv); g_free(pwd); confirm_to_execute = TRUE; break; } default: #ifdef FATAL print_switch_out_of_range_error_dialog("vte_button_press", "win_data->user_command[tag].method", win_data->user_command[tag].method); #endif break; } g_strfreev(argv); g_free(full_command); setlocale(LC_CTYPE, init_LC_CTYPE); return TRUE; } gboolean compare_win_page_encoding(GtkWidget *menu_item_encoding, gchar *encoding_str) { #ifdef DETAIL g_debug("! Launch compare_win_page_encoding() with menu_item_encoding = %p, encoding_str = %s", menu_item_encoding, encoding_str); #endif // FIXME: Should we return TRUE or FALSE here? if (menu_item_encoding==NULL || encoding_str==NULL) return FALSE; return compare_strings(gtk_widget_get_name (menu_item_encoding), encoding_str, FALSE); } // The returned string should be freed when no longer needed. gchar *get_url(GdkEventButton *event, struct Page *page_data, gint *tag) { #ifdef DETAIL if (tag) g_debug("! Launch get_url() with page_data = %p, tag = %d", page_data, *tag); else g_debug("! Launch get_url() with page_data = %p", page_data); #endif #ifdef SAFEMODE if ((page_data==NULL) || (event==NULL)) return NULL; #endif gint pad_x=0, pad_y=0; vte_terminal_get_padding(VTE_TERMINAL(page_data->vte), &pad_x, &pad_y); pad_x /= 2; pad_y /= 2; // g_debug("pad_x = %d, pad_y = %d", pad_x, pad_y); return vte_terminal_match_check(VTE_TERMINAL(page_data->vte), (event->x - pad_x) / vte_terminal_get_char_width( VTE_TERMINAL(page_data->vte)), (event->y - pad_y) / vte_terminal_get_char_height( VTE_TERMINAL(page_data->vte)), tag); } void page_data_dup(struct Page *page_data_prev, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch page_data_dup() with page_data_prev = %p, page_data = %p", page_data_prev, page_data); #endif #ifdef SAFEMODE if ((page_data==NULL) || (page_data_prev==NULL)) return; #endif memcpy( page_data, page_data_prev, sizeof(* page_data_prev)); // page_data->window; // page_data->notebook; page_data->page_no = 0; page_data->label = NULL; page_data->label_text = NULL; page_data->label_button = NULL; page_data->hbox = NULL; page_data->vte = NULL; page_data->scroll_bar = NULL; page_data->encoding_str = g_strdup(page_data_prev->encoding_str); page_data->locale = g_strdup(page_data_prev->locale); page_data->environ = g_strdup(page_data_prev->environ); // g_debug("g_strdupv(page_data_prev->environments)!"); // page_data->environments = g_strdupv(page_data_prev->environments); page_data->VTE_CJK_WIDTH_STR = g_strdup(page_data_prev->VTE_CJK_WIDTH_STR); page_data->page_name = NULL; page_data->pid = -1; page_data->pid_cmdline = NULL; page_data->current_tpgid = 0; page_data->displayed_tpgid = 0; page_data->page_name = NULL; page_data->custom_page_name = NULL; page_data->tab_color = NULL; // page_data->pwd = get_current_pwd_by_pid(page_data_prev->pid); page_data->pwd = NULL; page_data->is_root = 0; page_data->is_bold = 0; page_data->window_title_updated = -1; page_data->page_update_method = PAGE_METHOD_AUTOMATIC; page_data->window_title_signal = 0; page_data->timeout_id = 0; page_data->urgent_bell_handler_id = 0; page_data->font_name = g_strdup(page_data_prev->font_name); // page_data->font_size = 0; // page_data->check_root_privileges; // page_data->page_shows_window_title; // page_data->page_shows_current_dir; // page_data->page_shows_current_cmdline; // page_data->bold_action_page_name; // page_data->window_title_tpgid; // page_data->lost_focus; // page_data->keep_vte_size; // page_data->current_vte; page_data->window_title_pwd = NULL; // page_data->custom_window_title; gint i; for (i=0; itag[i] = 0; } struct Page *get_page_data_from_nth_page(struct Window *win_data, guint page_no) { #ifdef DETAIL g_debug("! Launch get_page_data_from_nth_page() with win_data = %p, page_no = %d", win_data, page_no); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return NULL; #endif GtkWidget *vte = (GtkWidget *)g_object_get_data(G_OBJECT(gtk_notebook_get_tab_label( GTK_NOTEBOOK(win_data->notebook), gtk_notebook_get_nth_page( GTK_NOTEBOOK(win_data->notebook), page_no))), "VteBox"); return (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); } // Get LANG str from old and new locale data gchar *get_language_str_from_locales(const gchar *new_locale, const gchar *old_locale) { #ifdef DETAIL g_debug("! Launch get_language_str_from_locales() with old_locale = %s, new_locale = %s, init_LANGUAGE = %s", old_locale, new_locale, init_LANGUAGE); #endif gint i, j; const gchar *locale_list[4] = {new_locale, old_locale, init_LANGUAGE, "en"}; GString *language_list = g_string_new(":"); // Join the locales into "zh_TW.UTF-8:ja_JP.UTF8:zh_CN:en" for (i=0; i<4; i++) { if (locale_list[i]) { g_string_append_printf(language_list, "%s:", locale_list[i]); } } // g_debug("get_language_str_from_locales(): Get language_list = %s", language_list->str); // Convert "zh_TW.UTF-8:ja_JP.UTF8:zh_CN:en" into "zh_TW:zh:ja_JP:ja:zh_CN:zh:en" GString *final_lang_list = g_string_new(":"); gchar **lang_lists = split_string(language_list->str, ":", -1); gchar *new_lang[2]; i=-1; while (lang_lists[++i]) { // g_debug("get_language_str_from_locales(1): Checking lang_lists[%d] = \"%s\"", i, lang_lists[i]); new_lang[0] = get_lang_str_from_locale(lang_lists[i], "."); if (new_lang[0]) { g_string_append_printf(final_lang_list, "%s:", new_lang[0]); new_lang[1] = get_lang_str_from_locale(new_lang[0], "_"); if (new_lang[1]) { g_string_append_printf(final_lang_list, "%s:", new_lang[1]); g_free(new_lang[1]); } g_free(new_lang[0]); } } // g_debug("get_language_str_from_locales(): Get final_lang_list = %s", final_lang_list->str); g_strfreev(lang_lists); g_string_free(language_list, TRUE); // Join "zh_TW:zh:ja_JP:ja:zh_CN:zh:en" into "zh_TW:zh:ja_JP:ja:zh_CN:en" GString *join_lang_list = g_string_new(NULL); lang_lists = split_string(final_lang_list->str, ":", -1); i=-1; while (lang_lists[++i]) { // g_debug("get_language_str_from_locales(2): Checking lang_lists[%d] = \"%s\"", i, lang_lists[i]); gboolean different_strings = TRUE; if (lang_lists[i][0] == '\0') different_strings = FALSE; else { for (j=0; jstr[0] != '\0') g_string_append_printf(join_lang_list, ":%s", lang_lists[i]); else g_string_append_printf(join_lang_list, "%s", lang_lists[i]); } // g_debug("get_language_str_from_locales(2): join_lang_list = %s", join_lang_list->str); } // g_debug("get_language_str_from_locales(): Get join_lang_list = %s", join_lang_list->str); g_strfreev(lang_lists); g_string_free(final_lang_list, TRUE); return g_string_free(join_lang_list, FALSE); } // convert zh_TW.UTF-8 -> zh_TW // See https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html for more details. gchar *get_lang_str_from_locale(const gchar *locale, const gchar *split) { #ifdef DETAIL g_debug("! Launch get_lang_str_from_locale() with locale = %s", locale); #endif #ifdef SAFEMODE if (locale==NULL) return NULL; #endif gchar *language = NULL; gchar **split_locales = split_string(locale, split, 2); if (split_locales) language=g_strdup(split_locales[0]); else language=g_strdup(locale); // print_array("! get_lang_str_from_locale() locale", split_locales); g_strfreev(split_locales); return language; } src/notebook.h000066400000000000000000000052061246562641500136540ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include #include #include // for kill #include // for exit() and env() #include // for sockaddr_un #include // for GDK_WINDOW_XID // #include #include "lilyterm.h" gchar **get_argv(struct Window *win_data, gboolean *argv_need_be_free); void create_utf8_child_process_failed_dialog (struct Window *win_data, gchar *message, gchar *encoding); void create_child_process_failed_dialog(struct Window *win_data, gchar *message, gchar *encoding); void clear_arg(struct Window *win_data); #if defined (USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) void label_size_request (GtkWidget *label, GtkRequisition *requisition, struct Page *page_data); #endif gboolean vte_button_press(GtkWidget *widget, GdkEventButton *event, struct Page *page_data); gboolean vte_button_release(GtkWidget *widget, GdkEventButton *event, struct Page *page_data); void vte_grab_focus(GtkWidget *vte, gpointer user_data); gboolean compare_win_page_encoding(GtkWidget *menu_item_encoding, gchar *encoding_str); // void vte_style_set (GtkWidget *vte, GtkStyle *previous_style, gpointer user_data); // void vte_size_request (GtkWidget *vte, GtkRequisition *requisition, gpointer user_data); // void vte_size_allocate (GtkWidget *vte, GtkAllocation *allocation, gpointer user_data); gchar *get_url (GdkEventButton *event, struct Page *page_data, gint *tag); #if defined(GEOMETRY) || defined(UNIT_TEST) void vte_size_allocate (GtkWidget *vte, GtkAllocation *allocation, struct Page *page_data); #endif void vte_size_changed(VteTerminal *vte, Font_Set_Type type); void page_data_dup(struct Page *page_data_prev, struct Page *page_data); // void vte_paste_clipboard (VteTerminal *vte, gpointer user_data); gchar *get_language_str_from_locales(const gchar *new_locale, const gchar *old_locale); gchar *get_lang_str_from_locale(const gchar *locale, const gchar *split); src/pagename.c000066400000000000000000001117371246562641500136130ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "pagename.h" extern gint dialog_activated; extern gboolean proc_exist; extern gchar *proc_file_system_path; // cmdline always = "" under *Ubuntu ONLY* if argv = split_string("", " ", -1); // Don't ask me why... gboolean vte_fork_cmdline_returned_empty = FALSE; void reorder_page_number(GtkNotebook *notebook, GtkWidget *child, guint page_num, GtkWidget *window) { #ifdef DETAIL g_debug("! Launch reorder_page_number() with notebook = %p, page_num = %d, window = %p", notebook, page_num, window); #endif #ifdef SAFEMODE if (window==NULL) return; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return; #endif gint total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)); // g_debug("total_page = %d", total_page); struct Page *page_data; gint i; for (i=0; ipage_no = i; // g_debug("Launch get_and_update_page_name() in reorder_page_number()"); // g_debug("page_data->label_text = %p " // "page_data->page_name = %s " // "page_data->custom_page_name = %s " // "page_data->tab_color = %s " // "win_data->default_encoding = %p " // "page_data->encoding_str = %s", // page_data->label_text, // page_data->page_name, // page_data->custom_page_name, // page_data->tab_color, // win_data->default_menuitem_encoding, // page_data->encoding_str); // Don't update page name when win_data->kill_color_demo_vte. // Or LilyTerm will got warning: "Failed to set text from markup due to error parsing markup" if (((win_data->page_shows_number) || win_data->adding_page) && (dialog_activated==0) && (! win_data->kill_color_demo_vte)) update_page_name(window, page_data->vte, page_data->page_name, page_data->label_text, i+1, page_data->custom_page_name, page_data->tab_color, page_data->is_root, page_data->is_bold, compare_strings(win_data->runtime_encoding, page_data->encoding_str, FALSE), page_data->encoding_str, page_data->custom_window_title, FALSE); } } void init_monitor_cmdline_datas(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch init_monitor_cmdline_datas() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL)) return; #endif page_data->window_title_updated = -1; page_data->check_root_privileges = win_data->check_root_privileges; page_data->page_shows_window_title = win_data->page_shows_window_title; page_data->page_shows_current_dir = win_data->page_shows_current_dir; page_data->page_shows_current_cmdline = win_data->page_shows_current_cmdline; page_data->bold_action_page_name = win_data->bold_action_page_name; page_data->window_title_tpgid = &(win_data->window_title_tpgid); page_data->lost_focus = &(win_data->lost_focus); #ifdef USE_GTK2_GEOMETRY_METHOD page_data->keep_vte_size = &(win_data->keep_vte_size); #endif page_data->current_vte = &(win_data->current_vte); // page_data->update_window_title_only = &(win_data->update_window_title_only); page_data->custom_window_title = (win_data->custom_window_title_str != NULL); } gboolean monitor_cmdline(struct Page *page_data) { #ifdef FULL g_debug("! Launch monitor_cmdline() with page_data = %p", page_data); #endif #ifdef SAFEMODE if ((page_data==NULL) || (page_data->lost_focus==NULL) || (page_data->keep_vte_size==NULL) || (page_data->current_vte==NULL) || (page_data->window_title_tpgid==NULL)) return FALSE; #endif if (page_data->pid<1) return FALSE; gboolean lost_focus = *(page_data->lost_focus); // g_debug("Get page_data->keep_vte_size = %d in monitor_cmdline()", *(page_data->keep_vte_size)); // g_debug ("\nvte_terminal_get_status_line = %s," // "vte_terminal_get_icon_title = %s,\n" // "vte_terminal_get_window_title = %s\n", // vte_terminal_get_status_line(VTE_TERMINAL(page_data->vte)), // vte_terminal_get_icon_title(VTE_TERMINAL(page_data->vte)), // vte_terminal_get_window_title(VTE_TERMINAL(page_data->vte))); // The pagename won't be updated if LilyTerm is not on focus or when resizing. // But it will still update the window title. // 0xfe = 11,111,110 if ((lost_focus && (*(page_data->current_vte) != (page_data->vte))) || #ifdef USE_GTK2_GEOMETRY_METHOD (*(page_data->keep_vte_size)&0xfffc) || #endif page_data->custom_page_name || dialog_activated) return TRUE; // if we should call get_and_update_page_name or not gboolean page_name_changed = FALSE; // backup page_data datas gint page_update_method = page_data->page_update_method; page_data->page_update_method = PAGE_METHOD_AUTOMATIC; // g_debug("INIT: lost_focus = %d", lost_focus); // g_debug("INIT: page_data->window_title_updated = %d", page_data->window_title_updated); if (lost_focus) page_name_changed = check_cmdline(page_data, *(page_data->window_title_tpgid)); else { page_name_changed = check_cmdline(page_data, page_data->displayed_tpgid); if ((page_name_changed) && page_data->check_root_privileges) page_data->is_root = check_is_root(page_data->current_tpgid); } // g_debug("lost_focus = %d", lost_focus); // g_debug("page_data->window_title_updated = %d", page_data->window_title_updated); if (check_window_title(page_data, lost_focus)) page_name_changed = TRUE; gchar *old_pwd; if (lost_focus) old_pwd = page_data->window_title_pwd; else old_pwd = page_data->pwd; gchar *new_pwd = get_tab_name_with_current_dir(page_data->current_tpgid); if (check_pwd(page_data, old_pwd, new_pwd, page_update_method)) { page_name_changed = TRUE; if (lost_focus) page_data->window_title_pwd = new_pwd; else page_data->pwd = new_pwd; new_pwd = old_pwd; } // g_debug("check_tpgid = %d, and current_tpgid = %d", *check_tpgid, page_data->current_tpgid); // only update the page name when tpgid is updated. // g_debug("Final: page_data->page_update_method = %d", page_data->page_update_method); if (page_name_changed) { // g_debug("!!! Update the page name for page_no %d", page_data->page_no); page_data->is_bold = page_data->bold_action_page_name; page_data->should_be_bold = TRUE; // g_debug("page_data->is_bold = %d for page_data %p", page_data->is_bold, page_data); // g_debug("Launch get_and_update_page_name() in monitor_cmdline()"); if (( ! get_and_update_page_name(page_data, *(page_data->lost_focus))) && (! lost_focus)) { // if update "tab title" fault. upate window title will never fault. // g_debug("!! Tab name is NOT changed to '%s'", page_data->pwd); // exchange old_pwd and new_pwd again! new_pwd = page_data->pwd; page_data->pwd = old_pwd; // g_debug("Restore page_data->pwd to %s", page_data->pwd); } } else { page_data->page_update_method = page_update_method; // g_debug("Restore page_data->page_update_method to %d!!!", page_data->page_update_method); } g_free(new_pwd); return TRUE; } gboolean check_cmdline(struct Page *page_data, pid_t check_tpgid) { #ifdef FULL g_debug("! Launch check_cmdline() with page_data = %p, check_tpgid = %d", page_data, check_tpgid); #endif #ifdef SAFEMODE if ((page_data==NULL) || (check_tpgid < 1)) return FALSE; #endif // g_debug("check_tpgid = %d", check_tpgid); gboolean page_name_changed = FALSE; if (page_data->page_shows_current_cmdline || page_data->page_shows_current_dir) { // find the current_tpgid page_data->current_tpgid = get_tpgid(page_data->pid); // g_debug("Get page_data->current_tpgid = %d, check_tpgid = %d", // page_data->current_tpgid, check_tpgid); if (check_tpgid != page_data->current_tpgid) { // g_debug("Trying to update Cmdline!!!"); page_name_changed = TRUE; page_data->page_update_method = PAGE_METHOD_CMDLINE; } // else if (page_data->current_tpgid==page_data->pid) else if (page_data->window_title_updated == 0) page_data->window_title_updated = -1; // g_debug("page_data->window_title_updated = %d", page_data->window_title_updated); // g_debug("page_data->page_update_method = %d", page_data->page_update_method); } // g_debug("the original tpgid is %d, and got tpgid from get_tpgid() is: %d", // page_data->displayed_tpgid, page_data->current_tpgid); return page_name_changed; } gboolean check_window_title (struct Page *page_data, gboolean lost_focus) { #ifdef FULL g_debug("! Launch check_window_title() with page_data = %p, lost_focus = %d", page_data, lost_focus); #endif #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif gboolean page_name_changed = FALSE; if ((page_data->page_shows_window_title) && (page_data->window_title_updated >= 1)) { // don't update window title when lost focus // g_debug("lost_focus = %d", lost_focus); // g_debug("page_data->window_title_updated = %d", page_data->window_title_updated); if (! (lost_focus && (page_data->window_title_updated == 2))) { // g_debug("Trying to update Window title!!!"); page_name_changed = TRUE; page_data->page_update_method = PAGE_METHOD_WINDOW_TITLE; page_data->window_title_updated = 1; } } return page_name_changed; } gboolean check_pwd(struct Page *page_data, gchar *pwd, gchar *new_pwd, gint page_update_method) { #ifdef FULL g_debug("! Launch check_pwd() with page_data = %p, pwd = %s, new_pwd = %s, page_update_method = %d", page_data, pwd, new_pwd, page_update_method); #endif #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window_title_tpgid==NULL)) return FALSE; #endif // g_debug("pwd = %s", pwd); // g_debug("new_pwd = %s", new_pwd); gboolean page_name_changed = FALSE; // update the page name with PWD when pid=tpgid // g_debug ("page_name_changed = %d, ", page_name_changed); if (page_data->page_shows_current_dir && (page_data->current_tpgid == page_data->pid) && (page_data->window_title_updated == -1)) { page_name_changed = compare_strings(pwd, new_pwd, TRUE); if ((*(page_data->window_title_tpgid) != page_data->displayed_tpgid) && (page_update_method == PAGE_METHOD_CMDLINE)) page_name_changed = TRUE; if (page_name_changed) { // g_debug("Trying to update PWD!!!"); page_data->page_update_method = PAGE_METHOD_PWD; page_name_changed = TRUE; } // g_debug("page_data->window_title_pwd = %s\npage_name_changed = %d", // page_data->window_title_pwd, page_name_changed); } return page_name_changed; } // it will update the text in label ,page_name, and the title of window // return FALSE if update the label (and page_name) fault. // updating the title of window will never fault. gboolean get_and_update_page_name(struct Page *page_data, gboolean lost_focus) { #ifdef DETAIL g_debug("! Launch get_and_update_page_name() with page_data = %p, lost_focus = %d", page_data, lost_focus); #endif #ifdef SAFEMODE if ((page_data==NULL) || (page_data->window==NULL)) return FALSE; #endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); // g_debug("Get win_data = %p (page_data->window = %p) when update tab name!", win_data, page_data->window); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif // page_color should not be free(). gchar *page_name = NULL, *page_color = NULL; // g_debug("Get pid=%d, tpgid=%d", page_data->pid, page_data->current_tpgid); // g_debug("win_data->page_shows_window_title = %d", win_data->page_shows_window_title); // g_debug("page_data->window_title_updated = %d", page_data->window_title_updated); // g_debug("lost_focus = %d", lost_focus); // g_debug("page_data->page_update_method = %d", page_data->page_update_method); switch (page_data->page_update_method) { case PAGE_METHOD_AUTOMATIC: case PAGE_METHOD_REFRESH: break; case PAGE_METHOD_WINDOW_TITLE: update_page_name_wintitle(&page_name, &page_color, win_data, page_data); break; case PAGE_METHOD_CMDLINE: update_page_name_cmdline(&page_name, &page_color, win_data, page_data); break; case PAGE_METHOD_PWD: update_page_name_pwd(&page_name, &page_color, win_data, page_data, lost_focus); break; case PAGE_METHOD_NORMAL: update_page_name_normal(&page_name, &page_color, win_data, page_data); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("get_and_update_page_name", "page_data->page_update_method", page_data->page_update_method); #endif return FALSE; } if (page_name==NULL) { update_page_name_wintitle(&page_name, &page_color, win_data, page_data); update_page_name_cmdline(&page_name, &page_color, win_data, page_data); update_page_name_pwd(&page_name, &page_color, win_data, page_data, lost_focus); update_page_name_normal(&page_name, &page_color, win_data, page_data); } #ifdef SAFEMODE // if we can NOT got any page_name... it should not happen! if (page_name==NULL) return FALSE; #endif if (page_data->is_root) page_color = win_data->user_page_color[4]; // even though custom_page_name is setted, we still need to set the page_name for it. // therefore if we disable custom_page_name sometime, we still have the page_name for use. if (page_data->custom_page_name!=NULL) { page_color = win_data->user_page_color[3]; // g_debug("page_shows_custom_dir : page_name = %s, color = %s", page_name, page_color); } // g_debug("Final : page_name = %s, color = %s", page_name, page_color); if (win_data->use_color_page) page_data->tab_color = page_color; else // we Must clean the value for page_color here. for drag&drop tabs. page_data->tab_color = NULL; g_free(page_data->page_name); gchar *local_page_name = convert_str_to_utf8(page_name, page_data->encoding_str); gchar *converted_page_name = convert_escape_sequence_to_string(local_page_name); #ifdef SAFEMODE if (converted_page_name == NULL) page_data->page_name = page_name; else { #endif g_free(page_name); page_data->page_name = converted_page_name; #ifdef SAFEMODE } #endif g_free(local_page_name); gboolean return_value = FALSE; // g_debug ("Launch update_page_name() in get_and_update_page_name()!!!"); if (update_page_name(page_data->window, page_data->vte, page_data->page_name, page_data->label_text, page_data->page_no+1, page_data->custom_page_name, page_color, page_data->is_root, page_data->is_bold, compare_strings(win_data->runtime_encoding, page_data->encoding_str, FALSE), page_data->encoding_str, page_data->custom_window_title, lost_focus)) { // g_debug("Update page_data->displayed_tpgid (%d) = page_data->current_tpgid (%d)", // page_data->displayed_tpgid, page_data->current_tpgid); if (! lost_focus) { page_data->displayed_tpgid = page_data->current_tpgid; g_free(page_data->window_title_pwd); page_data->window_title_pwd = g_strdup(page_data->pwd); } return_value = TRUE; } else { // update_page_name() is failed, but the pagename datas is updated already. // We set page_data->displayed_tpgid = -1 here to mark that the update_page_name() is failed. page_data->displayed_tpgid = -1; if (page_data->page_update_method == PAGE_METHOD_WINDOW_TITLE) page_data->window_title_updated = PAGE_METHOD_CMDLINE; } // update page_data->pwd or page_data->window_title_pwd, if it was not updated if (page_data->page_update_method == PAGE_METHOD_WINDOW_TITLE) { if (win_data->page_shows_current_cmdline) page_data->displayed_tpgid = page_data->current_tpgid; if (win_data->page_shows_current_dir) { g_free(page_data->pwd); page_data->pwd = get_tab_name_with_current_dir(page_data->current_tpgid); } } win_data->window_title_tpgid = page_data->current_tpgid; // g_debug("Final: page_data->displayed_tpgid = %d", page_data->displayed_tpgid); // g_debug("Final: page_data->window_title_tpgid = %d", *(page_data->window_title_tpgid)); // g_debug("(get_and_update_page_name): return_value = %d", return_value); return return_value; } void update_page_name_wintitle(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch update_page_name_wintitle() with page_name = %s, page_color = %s, win_data = %p, page_data = %p", *page_name, *page_color, win_data, page_data); #endif #ifdef SAFEMODE if ((page_name==NULL) || (page_color==NULL) || (win_data==NULL) || (page_data==NULL)) return; #endif // g_debug("Trying to update Window Title!"); if (win_data->page_shows_window_title && (*page_name==NULL) && (page_data->window_title_updated == 1)) { *page_name = g_strdup(vte_terminal_get_window_title(VTE_TERMINAL(page_data->vte))); *page_color = win_data->user_page_color[0]; page_data->window_title_updated = 0; // g_debug("Window title updated: *page_name = %s, color = %s", *page_name, *page_color); page_data->page_update_method = PAGE_METHOD_WINDOW_TITLE; } } void update_page_name_cmdline(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch update_page_name_cmdline() with page_name = %s, page_color = %s, win_data = %p, page_data = %p", *page_name, *page_color, win_data, page_data); #endif #ifdef SAFEMODE if ((page_name==NULL) || (page_color==NULL) || (win_data==NULL) || (page_data==NULL)) return; #endif // g_debug("Trying to update Cmdline!"); // if win_data->page_shows_current_dir = 0 && win_data->page_shows_window_title = 0 // We need to show /bin/bash on the tab name. // g_debug("page_name = %p (%s)", *page_name, *page_name); // g_debug("win_data->page_shows_current_cmdline = %d", win_data->page_shows_current_cmdline); // g_debug("page_data->pid = %d, page_data->current_tpgid = %d", page_data->pid, page_data->current_tpgid); if ( (*page_name==NULL) && win_data->page_shows_current_cmdline && ((! (win_data->page_shows_current_dir || ( win_data->page_shows_window_title && (vte_terminal_get_window_title(VTE_TERMINAL(page_data->vte))!=NULL) && (page_data->window_title_updated != -1)))) || (page_data->pid!=page_data->current_tpgid))) { *page_name = get_tab_name_with_cmdline(page_data); #ifdef SAFEMODE if (page_name) { #endif *page_color = win_data->user_page_color[1]; // g_debug("Cmdline updated: *page_name = %s, color = %s", *page_name, *page_color); page_data->page_update_method = PAGE_METHOD_CMDLINE; #ifdef SAFEMODE } #endif } } void update_page_name_pwd(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data, gboolean lost_focus) { #ifdef DETAIL g_debug("! Launch update_page_name_pwd() with page_name = %s, " "page_color = %s, win_data = %p, page_data = %p, lost_focus = %d", *page_name, *page_color, win_data, page_data, lost_focus); #endif #ifdef SAFEMODE if ((page_name==NULL) || (page_color==NULL) || (win_data==NULL) || (page_data==NULL)) return; #endif // g_debug("Trying to update PWD!"); if (win_data->page_shows_current_dir && (*page_name==NULL)) { // g_free(page_data->pwd); // g_debug("!!! Getting new page_data->pwd"); // page_data->pwd = get_tab_name_with_current_dir(page_data->current_tpgid); // page_name = get_tab_name_with_current_dir(pid); if (lost_focus) *page_name = g_strdup(page_data->window_title_pwd); else { // g_debug("page_data->pwd (get_and_update_page_name())= %s", page_data->pwd); *page_name = g_strdup(page_data->pwd); } if (*page_name) { *page_color = win_data->user_page_color[2]; page_data->window_title_updated = -1; } // g_debug("PWD updated: *page_name = %s, color = %s", *page_name, *page_color); page_data->page_update_method = PAGE_METHOD_PWD; } } void update_page_name_normal(StrAddr **page_name, StrAddr **page_color, struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch update_page_name_normal() with page_name = %s, page_color = %s, win_data = %p, page_data = %p", *page_name, *page_color, win_data, page_data); #endif #ifdef SAFEMODE if ((page_name==NULL) || (page_color==NULL) || (win_data==NULL) || (page_data==NULL)) return; #endif // g_debug("Trying to update to NORMAL page!"); if (*page_name==NULL) { if (page_data->page_name && (page_data->page_update_method != PAGE_METHOD_REFRESH)) *page_name = g_strdup(page_data->page_name); else *page_name = get_tab_name_with_page_names(win_data); if (win_data->use_color_page) *page_color = win_data->user_page_color[5]; else *page_color = NULL; // g_debug("page_shows_normal_dir : page_name = %s, color = %s", *page_name, *page_color); if (page_data->page_update_method==PAGE_METHOD_REFRESH) win_data->page_names_no++; // g_debug("page_data->page_update_method = %d", page_data->page_update_method); page_data->page_update_method = PAGE_METHOD_NORMAL; } } gboolean update_page_name(GtkWidget *window, GtkWidget *vte, gchar *page_name, GtkWidget *label, gint page_no, gchar *custom_page_name, const gchar *tab_color, gboolean is_root, gboolean is_bold, gboolean show_encoding, gchar *encoding_str, gboolean custom_window_title, gboolean lost_focus) { #ifdef DETAIL g_debug("! Launch update_page_name() with vte = %p, label_name = %s, page_no = %d, " "custom_page_name = %s, tab_color = %s, is_root = %d, is_bold = %d, " "show_encoding = %d, encoding_str = %s", vte, page_name, page_no, custom_page_name, tab_color, is_root, is_bold, show_encoding, encoding_str); #endif #ifdef SAFEMODE if (vte==NULL) return FALSE; #endif // page_name = NULL when initing a new page. if (page_name == NULL) { struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // g_debug("page_name = NULL!! trying to call get_and_update_page_name()"); get_and_update_page_name(page_data, FALSE); } gboolean page_name_updated = FALSE; struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(window), "Win_Data"); #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif // We don't update label name when the size of window is changing. // 0xfe = 11,111,110 // g_debug("win_data->keep_vte_size = %x", win_data->keep_vte_size); #ifdef USE_GTK2_GEOMETRY_METHOD if ((!(win_data->keep_vte_size&0xfffc)) || (!gtk_widget_get_mapped(win_data->window))) { #endif // g_debug("Updating %d page name to %s...", page_no, page_name); gchar *label_name = NULL; if (custom_page_name==NULL) label_name = page_name; else label_name = custom_page_name; #ifdef ENABLE_SET_TOOLTIP_TEXT if (! lost_focus) gtk_widget_set_tooltip_text(label, label_name); #endif // g_debug("[1] Updating %d page name to %s...", page_no, label_name); // FIXME: label_name = NULL when initing page. if (label_name==NULL) return FALSE; if (win_data->page_shows_number) label_name = g_strdup_printf("(%d) %s", page_no, label_name); else label_name = g_strdup(label_name); // g_debug("[2] Updating %d page name to %s...", page_no, label_name); // label_name will be freed later. if (win_data->page_shows_encoding && show_encoding && encoding_str) { gchar *temp_str = g_strdup_printf("%s (%s)", label_name, encoding_str); g_free(label_name); label_name = temp_str; // g_debug("[3] Updating %d page name to %s...", page_no, label_name); } // if the window is lost focus, don't update the tab name // g_debug("lost_focus = %d", lost_focus); if (! lost_focus) { // win_data->keep_vte_size |= 1; // g_debug("window_resizable in update_page_name! and keep_vte_size =%d", keep_vte_size); // window_resizable(window, vte, 2, 1); // DANGEROUS: remark the following keep_window_size() // will break the geometry of window when drag and drop. // g_debug("update_page_name(): launch keep_window_size()!"); #ifdef USE_GTK2_GEOMETRY_METHOD # ifdef GEOMETRY g_debug("@ update_page_name(): Call keep_gtk2_window_size() with keep_vte_size = %x", win_data->keep_vte_size); # endif keep_gtk2_window_size (win_data, vte, 0x3); #endif if (win_data->use_color_page && (tab_color != NULL)) { // g_debug("[Debug] Updating %d page name to %s...", page_no, label_name); gchar *color_label_name; if (is_bold) color_label_name = convert_text_to_html (&label_name, FALSE, (gchar *)tab_color, "b", NULL); else color_label_name = convert_text_to_html (&label_name, FALSE, (gchar *)tab_color, NULL); gtk_label_set_markup (GTK_LABEL(label), color_label_name); // g_debug("[FINAL] Updating %d page name to %s...", page_no, color_label_name); g_free(color_label_name); } else gtk_label_set_text(GTK_LABEL(label), label_name); // g_debug("Updated the tab name to %s!", page_name); page_name_updated = TRUE; #ifdef USE_GTK3_GEOMETRY_METHOD if (win_data->window_status != WINDOW_APPLY_PROFILE_NORMAL) { # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! update_page_name(%s)(win_data %p): " "Calling keep_gtk3_window_size() with hints_type = %d, win_data->window_status = %d\033[0m\n", ANSI_COLOR_MAGENTA, label_name, win_data, win_data->hints_type, win_data->window_status); # endif win_data->resize_type = GEOMETRY_AUTOMATIC; keep_gtk3_window_size(win_data, FALSE); } #endif } #ifdef DEBUG // else // g_debug("!!! the window is lost focus, don't update the tab name"); #endif // free the data g_free(label_name); #ifdef USE_GTK2_GEOMETRY_METHOD } # ifdef DEBUG // else // g_debug("!!! the window is renaming, don't update the tab name"); # endif #endif // we should update window title if page name changed. check_and_update_window_title(win_data, custom_window_title, page_no, custom_page_name, page_name); // g_debug("(update_page_name): page_name_updated = %d", page_name_updated); return page_name_updated; } void check_and_update_window_title(struct Window *win_data, gboolean custom_window_title, gint page_no, gchar *custom_page_name, gchar *page_name) { #ifdef DETAIL g_debug("! Launch check_and_update_window_title with win_data = %p, custom_window_title = %d, " "page_no = %d, custom_page_name = %s, page_name = %s", win_data, custom_window_title, page_no, custom_page_name, page_name); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return; #endif if ((win_data->window_title_shows_current_page == FALSE) || (custom_window_title == TRUE)) return; gint current_page_no = gtk_notebook_get_current_page(GTK_NOTEBOOK(win_data->notebook)); // we only update the window title for current page // g_debug("current_page_no = %d, page_no = %d", current_page_no, page_no); // FIXME: A dirty hack... current_page_no=-1 when creating a 2rd new window. // if (win_data->adding_page && (current_page_no<0)) current_page_no = 0; if ((current_page_no == (page_no-1)) || ((current_page_no==-1) && (page_no==1))) { gchar *window_title = NULL; if (custom_page_name) window_title = custom_page_name; else window_title = page_name; if (window_title) // g_debug("page_name = %s before calling update_window_title()", page_name); update_window_title(win_data->window, window_title, win_data->window_title_append_package_name); } } void update_window_title(GtkWidget *window, gchar *name, gboolean window_title_append_package_name) { #ifdef DETAIL g_debug("! Launch update_window_title() with window = %p, and name = %s, " "window_title_append_package_name = %d", window, name, window_title_append_package_name); #endif #ifdef SAFEMODE if ((window==NULL) || (name == NULL)) return; #endif if (window_title_append_package_name) { gchar *window_title = g_strdup_printf("%s - %s", name, PACKAGE); // g_debug("Update the window title to %s!", window_title); #ifdef SAFEMODE if (window_title) #endif gtk_window_set_title(GTK_WINDOW(window), window_title); g_free(window_title); } else gtk_window_set_title(GTK_WINDOW(window), name); } // The returned string should be freed when no longer needed. gchar *get_tab_name_with_page_names(struct Window *win_data) { #ifdef FULL g_debug("! Launch get_tab_name_with_page_names() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif // g_debug("Get win_data = %d when get tab name with page names!", win_data); // g_debug("Got win_data->page_names_no = %d, win_data->max_page_names_no = %d", // win_data->page_names_no, win_data->max_page_names_no); win_data->page_names_no = CLAMP(win_data->page_names_no, 0, win_data->max_page_names_no); #ifdef SAFEMODE if (win_data->reuse_page_names && win_data->splited_page_names && (win_data->splited_page_names[win_data->page_names_no]==NULL)) #else if (win_data->reuse_page_names && (win_data->splited_page_names[win_data->page_names_no]==NULL)) #endif win_data->page_names_no=0; // g_debug("Got win_data->page_names_no = %d", win_data->page_names_no); #ifdef SAFEMODE if (win_data->splited_page_names && (win_data->splited_page_names[win_data->page_names_no]!=NULL)) #else if (win_data->splited_page_names[win_data->page_names_no]!=NULL) #endif return g_strdup(win_data->splited_page_names[win_data->page_names_no]); else return g_strdup(win_data->page_name); } // It will return NULL if fault // The returned string should be freed when no longer needed. gchar *get_tab_name_with_cmdline(struct Page *page_data) { #ifdef DETAIL if (page_data) g_debug("! Launch get_tab_name_with_cmdline() for tpgid %d", page_data->current_tpgid); #endif #ifdef SAFEMODE if (page_data==NULL) return NULL; #endif // if cmdline always be "", don't call get_cmdline(). It always get "". if (! vte_fork_cmdline_returned_empty) { if (page_data->pid_cmdline == NULL) page_data->pid_cmdline = get_cmdline(page_data->pid); if (page_data->pid_cmdline == NULL) vte_fork_cmdline_returned_empty = TRUE; } #ifdef OUT_OF_MEMORY return NULL; #endif if (page_data->current_tpgid>0) { gchar *tpgid_cmdline = get_cmdline(page_data->current_tpgid); //if ((page_data->pid == page_data->current_tpgid) || // (compare_strings(page_data->pid_cmdline, tpgid_cmdline, TRUE))) if ((page_data->pid == page_data->current_tpgid) || (tpgid_cmdline && page_data->pid_cmdline && (! g_str_has_suffix(tpgid_cmdline, page_data->pid_cmdline)))) return tpgid_cmdline; else { // g_debug("pid = %d, tpgid = %d, pid_cmdline = %s", pid, tpgid, pid_cmdline); #ifdef DEBUG g_message("Got (%s), Trying to reread the %s/%d/cmdline...", proc_file_system_path, tpgid_cmdline, (gint)page_data->current_tpgid); #endif g_free(tpgid_cmdline); // Magic number: we wait for 0.15 sec then reread cmdline again. usleep(150000); tpgid_cmdline = get_cmdline(page_data->current_tpgid); #ifdef DEBUG g_message("Got (%s) after reread the %s/%d/cmdline.", proc_file_system_path, tpgid_cmdline, (gint)page_data->current_tpgid); #endif return tpgid_cmdline; } } else return NULL; } // It will return NULL if fault // The returned string should be freed when no longer needed. gchar *get_tab_name_with_current_dir(pid_t pid) { #ifdef FULL g_debug("! Launch get_tab_name_with_current_dir() for pid %d", pid); #endif if (! proc_exist) return NULL; if (pid>0) { gchar *cwd_path = g_strdup_printf("%s/%d/cwd", proc_file_system_path, pid); #ifdef SAFEMODE if (cwd_path) { #endif gchar *current_dir = g_file_read_link(cwd_path, NULL); g_free(cwd_path); return current_dir; #ifdef SAFEMODE } #endif } return NULL; } gint get_tpgid(pid_t pid) { #ifdef FULL g_debug("! Launch get_tpgid() for pid %d", pid); #endif if (pid<1) return 0; pid_t tmp_tpgid = 0; pid_t current_tpgid = pid; while (tmp_tpgid != current_tpgid) { tmp_tpgid = current_tpgid; gchar **stats = get_pid_stat(tmp_tpgid, 11); if (stats) current_tpgid = atoi(stats[9]); g_strfreev(stats); } // g_debug("The pid =%d, tpgid=%d", pid, current_tpgid); return current_tpgid; } // It will return NULL if fault // The returned string should be freed when no longer needed. gchar *get_cmdline(const pid_t tpgid) { #ifdef DETAIL g_debug("! Launch get_cmdline() for tpgid %d", tpgid); #endif #ifdef SAFEMODE if (tpgid<1) return NULL; #endif gsize length = 0; gchar *cmdline = get_proc_data(tpgid, "cmdline", &length); if (length) { // g_debug("Get length = %d, cmdline = %s", length, cmdline); gint i; // convert '\0' to ' ' for (i=0; i<(length-1); i++) if (*(cmdline+i)==0) *(cmdline+i)=' '; } return cmdline; } gboolean check_is_root(pid_t tpgid) { #ifdef DETAIL g_debug("! Launch check_is_root() for tpgid %d", tpgid); #endif #ifdef SAFEMODE if (tpgid<1) return FALSE; #endif gchar *tpgid_path = g_strdup_printf("%s/%d", proc_file_system_path, tpgid); #ifdef SAFEMODE if (tpgid_path==NULL) return FALSE; #endif gboolean is_root = FALSE; struct stat buf; // Don't use g_stat here. 'CAUSE A BUG IN GDK, IT MAY CAUSE SEGFAULT UNDER I386 MACHINE!! if (! stat(tpgid_path, &buf)) { // g_debug("Got uid of %s is %d", tpgid_path, buf.st_uid); // g_debug("Got gid of %s is %d", tpgid_path, buf.st_gid); if ((buf.st_uid==0) ||(buf.st_gid==0)) is_root = TRUE; } g_free(tpgid_path); return is_root; } //gboolean check_is_root(pid_t tpgid) //{ //#ifdef DETAIL // g_debug("! Launch check_is_root() for tpgid %d", tpgid); //#endif //#ifdef SAFEMODE // if (tpgid<1) return FALSE; //#endif // gboolean is_root=FALSE; // gboolean uid_checked = FALSE, gid_checked = FALSE; // // gsize length = 0; // gchar *status = get_proc_data(tpgid, "status", &length); // //#ifdef SAFEMODE // if (status) // { //#endif // gchar **status_line = split_string(status, "\n", -1); // gchar **status_data; // gint i=0; // //#ifdef SAFEMODE // if (status_line) // { //#endif // while (status_line[i]!=NULL) // { // // g_debug("%d) %s",i ,status_line[i]); // status_data = split_string(status_line[i], "\t", -1); //#ifdef SAFEMODE // if (status_data) // { //#endif // if (strcmp(status_data[0], "Uid:")==0) // { // is_root = check_status_data(status_data); // uid_checked = TRUE; // } // else if (strcmp(status_data[0], "Gid:")==0) // { // is_root = check_status_data(status_data); // gid_checked = TRUE; // } //#ifdef SAFEMODE // } //#endif // g_strfreev(status_data); // if ((is_root) || (uid_checked && gid_checked)) // break; // i++; // } //#ifdef SAFEMODE // } //#endif // g_strfreev(status_line); //#ifdef SAFEMODE // } //#endif // g_free(status); // return is_root; //} // //gboolean check_status_data(gchar **status_data) //{ //#ifdef DETAIL // g_debug("! Launch check_status_data() !"); //#endif // // gint i; // for (i=1; i<5; i++) // { // // g_debug("Checking %s...", status_data[i]); // if (atoi(status_data[i])==0) // { // // g_debug("IT IS ROOT (%d)!", atoi(status_data[i])); // return TRUE; // } // } // return FALSE; //} void update_page_window_title (VteTerminal *vte, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch update_page_window_title() !"); #endif #ifdef SAFEMODE if (page_data==NULL) return; #endif page_data->window_title_updated = 1; // get_and_update_page_name(page_data); monitor_cmdline(page_data); } // The returned string should be freed when no longer needed. // gchar *get_current_pwd_by_pid(pid_t pid) // { // #ifdef DETAIL // g_debug("! Launch get_current_pwd_by_pid() with pid = %d", pid); // #endif // if (! proc_exist) return NULL; // // gchar *priv_pwd = g_strdup_printf("%s/%d/cwd", proc_file_system_path, pid); // gchar *pwd = g_file_read_link(priv_pwd, NULL); // g_free(priv_pwd); // // g_debug("use the directory %s (%s/%d/cwd)", directory, proc_file_system_path, prev_page->pid); // return pwd; //} //void monitor_cmdline(GFileMonitor *monitor, pid_t pid) //{ // GError *error = NULL; // gchar *stat_path = g_strdup_printf("%s/%d/stat", proc_file_system_path, (gint) pid); // GFile *file = g_file_new_for_path(stat_path); // monitor = g_file_monitor_file (file, 0, NULL, &error); // if (monitor) // g_signal_connect (monitor, "changed", (GCallback)monitor_cmdline_changed, NULL); // else // { // g_free (monitor); // monitor = NULL; // } //} //void monitor_cmdline_changed(GFileMonitor *monitor, GFile *file, GFile *other_file, // GFileMonitorEvent event_type, gpointer user_data) //{ // g_debug("Got monitor_cmdline_changed message"); // struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(current_vte), "Page_Data"); // gint current_page_no = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)); // // get_and_update_page_name(page_data->label_text, page_data->pid, &(page_data->tpgid), current_page_no+1); //} //void monitor_cmdline_cancel(GFileMonitor *monitor) //{ // g_io_channel_close(channel); // g_file_monitor_cancel (monitor); //} src/pagename.h000066400000000000000000000024541246562641500136130ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include // for aoti() #include // for strlen() #include // for usleep() #include // for stat() #include #include "lilyterm.h" gboolean check_cmdline (struct Page *page_data, pid_t check_tpgid); gboolean check_window_title (struct Page *page_data, gboolean lost_focus); gboolean check_pwd(struct Page *page_data, gchar *pwd, gchar *new_pwd, gint page_update_method); gchar *get_tab_name_with_page_names(struct Window *win_data); gchar *get_tab_name_with_cmdline(struct Page *page_data); src/profile.c000066400000000000000000003756201246562641500135010ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "profile.h" extern GList *window_list; extern GtkWidget *menu_active_window; extern gchar *init_LC_CTYPE; extern gchar *init_LC_MESSAGES; extern gboolean checked_profile_version; extern gboolean safe_mode; extern gchar *system_locale_list; extern gchar *profile_dir; struct ModKey modkeys[MOD] = {{0}}; struct KeyValue system_keys[KEYS] = {{0}}; gchar *key_groups[KEY_GROUP] = {0}; gchar *regex_name[REGEX] = {0}; gchar *regex_str[REGEX] = {0}; struct Command command[COMMAND] = {{0}}; struct Color color[COLOR] = {{0}}; struct Page_Color page_color[PAGE_COLOR] = {{0}}; gchar *restricted_locale_message = NULL; #ifdef USE_GDK_RGBA struct GdkRGBA_Theme system_color_theme[THEME] = {{0}}; struct GdkColor_Theme temp_system_color_theme[THEME] = #else struct GdkColor_Theme system_color_theme[THEME] = #endif {{0, "libvte", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xc0c0, 0x0000, 0x0000 }, { 0, 0x0000, 0xc0c0, 0x0000 }, { 0, 0xc0c0, 0xc0c0, 0x0000 }, { 0, 0x0000, 0x0000, 0xc0c0 }, { 0, 0xc0c0, 0x0000, 0xc0c0 }, { 0, 0x0000, 0xc0c0, 0xc0c0 }, { 0, 0xc0c0, 0xc0c0, 0xc0c0 }, { 0, 0x3f3f, 0x3f3f, 0x3f3f }, { 0, 0xffff, 0x3f3f, 0x3f3f }, { 0, 0x3f3f, 0xffff, 0x3f3f }, { 0, 0xffff, 0xffff, 0x3f3f }, { 0, 0x3f3f, 0x3f3f, 0xffff }, { 0, 0xffff, 0x3f3f, 0xffff }, { 0, 0x3f3f, 0xffff, 0xffff }, { 0, 0xffff, 0xffff, 0xffff }}}, {1, "tango", {{ 0, 0x2e2e, 0x3434, 0x3636 }, { 0, 0xcccc, 0x0000, 0x0000 }, { 0, 0x4e4e, 0x9a9a, 0x0606 }, { 0, 0xc4c4, 0xa0a0, 0x0000 }, { 0, 0x3434, 0x6565, 0xa4a4 }, { 0, 0x7575, 0x5050, 0x7b7b }, { 0, 0x0606, 0x9820, 0x9a9a }, { 0, 0xd3d3, 0xd7d7, 0xcfcf }, { 0, 0x5555, 0x5757, 0x5353 }, { 0, 0xefef, 0x2929, 0x2929 }, { 0, 0x8a8a, 0xe2e2, 0x3434 }, { 0, 0xfcfc, 0xe9e9, 0x4f4f }, { 0, 0x7272, 0x9f9f, 0xcfcf }, { 0, 0xadad, 0x7f7f, 0xa8a8 }, { 0, 0x3434, 0xe2e2, 0xe2e2 }, { 0, 0xeeee, 0xeeee, 0xecec }}}, {2, "linux", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xaaaa, 0x0000, 0x0000 }, { 0, 0x0000, 0xaaaa, 0x0000 }, { 0, 0xaaaa, 0x5555, 0x0000 }, { 0, 0x0000, 0x0000, 0xaaaa }, { 0, 0xaaaa, 0x0000, 0xaaaa }, { 0, 0x0000, 0xaaaa, 0xaaaa }, { 0, 0xaaaa, 0xaaaa, 0xaaaa }, { 0, 0x5555, 0x5555, 0x5555 }, { 0, 0xffff, 0x5555, 0x5555 }, { 0, 0x5555, 0xffff, 0x5555 }, { 0, 0xffff, 0xffff, 0x5555 }, { 0, 0x5555, 0x5555, 0xffff }, { 0, 0xffff, 0x5555, 0xffff }, { 0, 0x5555, 0xffff, 0xffff }, { 0, 0xffff, 0xffff, 0xffff }}}, {3, "xterm", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xcdcd, 0x0000, 0x0000 }, { 0, 0x0000, 0xcdcd, 0x0000 }, { 0, 0xcdcd, 0xcdcd, 0x0000 }, { 0, 0x0000, 0x0000, 0xeeee }, { 0, 0xcdcd, 0x0000, 0xcdcd }, { 0, 0x0000, 0xcdcd, 0xcdcd }, { 0, 0xe5e5, 0xe5e5, 0xe5e5 }, { 0, 0x7f7f, 0x7f7f, 0x7f7f }, { 0, 0xffff, 0x0000, 0x0000 }, { 0, 0x0000, 0xffff, 0x0000 }, { 0, 0xffff, 0xffff, 0x0000 }, { 0, 0x5c5c, 0x5c5c, 0xffff }, { 0, 0xffff, 0x0000, 0xffff }, { 0, 0x0000, 0xffff, 0xffff }, { 0, 0xffff, 0xffff, 0xffff }}}, {4, "rxvt", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xcdcd, 0x0000, 0x0000 }, { 0, 0x0000, 0xcdcd, 0x0000 }, { 0, 0xcdcd, 0xcdcd, 0x0000 }, { 0, 0x0000, 0x0000, 0xcdcd }, { 0, 0xcdcd, 0x0000, 0xcdcd }, { 0, 0x0000, 0xcdcd, 0xcdcd }, { 0, 0xfafa, 0xebeb, 0xd7d7 }, { 0, 0x4040, 0x4040, 0x4040 }, { 0, 0xffff, 0x0000, 0x0000 }, { 0, 0x0000, 0xffff, 0x0000 }, { 0, 0xffff, 0xffff, 0x0000 }, { 0, 0x0000, 0x0000, 0xffff }, { 0, 0xffff, 0x0000, 0xffff }, { 0, 0x0000, 0xffff, 0xffff }, { 0, 0xffff, 0xffff, 0xffff }}}, {5, "solarized", // Source: http://ethanschoonover.com/solarized#the-values {{ 0, 0x0707, 0x3636, 0x4242 }, // base02; black { 0, 0xdcdc, 0x3232, 0x2f2f }, // red; red { 0, 0x8585, 0x9999, 0x0000 }, // green; green { 0, 0xb5b5, 0x8989, 0x0000 }, // yellow; yellow { 0, 0x2626, 0x8b8b, 0xd2d2 }, // blue; blue { 0, 0xd3d3, 0x3636, 0x8282 }, // magenta; magenta { 0, 0x2a2a, 0xa1a1, 0x9898 }, // cyan; cyan { 0, 0xeeee, 0xe8e8, 0xd5d5 }, // base2; white { 0, 0x0000, 0x2b2b, 0x3636 }, // base03; brblack { 0, 0xcbcb, 0x4b4b, 0x1616 }, // orange; brred { 0, 0x5858, 0x6e6e, 0x7575 }, // base01; brgreen { 0, 0x6565, 0x7b7b, 0x8383 }, // base00; bryellow { 0, 0x8383, 0x9494, 0x9696 }, // base0; brblue { 0, 0x6c6c, 0x7171, 0xc4c4 }, // violet; brmagenta { 0, 0x9393, 0xa1a1, 0xa1a1 }, // base1; brcyan { 0, 0xfdfd, 0xf6f6, 0xe3e3 }}}, // base3; brwhite {6, "bbs", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0xcf01, 0x0000, 0x0000 }, { 0, 0x0000, 0x5294, 0x0000 }, { 0, 0x5e75, 0x5e75, 0x0000 }, { 0, 0x0000, 0x0000, 0x9d59 }, { 0, 0x5ef7, 0x0000, 0x5ef7 }, { 0, 0x0000, 0xa0a6, 0xa0a6 }, { 0, 0xc51e, 0xc51e, 0xc51e }, { 0, 0x70a3, 0x70a3, 0x70a3 }, { 0, 0xffff, 0x41ee, 0x41ee }, { 0, 0x0000, 0xe949, 0x0000 }, { 0, 0xffff, 0xffff, 0x5084 }, { 0, 0x94a5, 0x94a5, 0xffff }, { 0, 0xffff, 0x741d, 0xffff }, { 0, 0x2d2d, 0xffff, 0xffff }, { 0, 0xffff, 0xffff, 0xffff }}}, {7, BINARY, {{ 0, 0x0808, 0x0808, 0x0808 }, { 0, 0xb0b0, 0x2828, 0x2525 }, { 0, 0x5c5c, 0x8080, 0x1a1a }, { 0, 0xa8a8, 0x6d6d, 0x0000 }, { 0, 0x1010, 0x3b3b, 0x5959 }, { 0, 0xa8a8, 0x2b2b, 0x6868 }, { 0, 0x2121, 0x8080, 0x7979 }, { 0, 0xbebe, 0xb9b9, 0xaaaa }, { 0, 0x5050, 0x4d4d, 0x4747 }, { 0, 0xe3e3, 0x3333, 0x3030 }, { 0, 0x6f6f, 0xadad, 0x0000 }, { 0, 0xdbdb, 0x8e8e, 0x0000 }, { 0, 0x2727, 0x9090, 0xdbdb }, { 0, 0xdbdb, 0x3838, 0x8686 }, { 0, 0x2e2e, 0xb3b3, 0xa8a8 }, { 0, 0xf1f1, 0xecec, 0xe0e0 }}}, {8, "grayscale", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x3f3f, 0x3f3f, 0x3f3f }, { 0, 0x4444, 0x4444, 0x4444 }, { 0, 0x8383, 0x8383, 0x8383 }, { 0, 0x4949, 0x4949, 0x4949 }, { 0, 0x8888, 0x8888, 0x8888 }, { 0, 0x8d8d, 0x8d8d, 0x8d8d }, { 0, 0xe9e9, 0xe9e9, 0xe9e9 }, { 0, 0x4040, 0x4040, 0x4040 }, { 0, 0x5f5f, 0x5f5f, 0x5f5f }, { 0, 0x5a5a, 0x5a5a, 0x5a5a }, { 0, 0xafaf, 0xafaf, 0xafaf }, { 0, 0x5050, 0x5050, 0x5050 }, { 0, 0xaaaa, 0xaaaa, 0xaaaa }, { 0, 0xa5a5, 0xa5a5, 0xa5a5 }, { 0, 0xffff, 0xffff, 0xffff }}}, {9, "(build-in)", {{ 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }, { 0, 0x0000, 0x0000, 0x0000 }}}}; #ifdef ENABLE_VTE_ERASE_TTY struct Erase_Binding erase_binding[ERASE_BINDING] = {{"AUTO", VTE_ERASE_AUTO}, {"ASCII_BACKSPACE", VTE_ERASE_ASCII_BACKSPACE}, {"ASCII_DELETE", VTE_ERASE_ASCII_DELETE}, {"DELETE_SEQUENCE", VTE_ERASE_DELETE_SEQUENCE}, {"TTY", VTE_ERASE_TTY}}; #else struct Erase_Binding erase_binding[ERASE_BINDING] = {{"AUTO", VTE_ERASE_AUTO}, {"ASCII_BACKSPACE", VTE_ERASE_ASCII_BACKSPACE}, {"ASCII_DELETE", VTE_ERASE_ASCII_DELETE}, {"DELETE_SEQUENCE", VTE_ERASE_DELETE_SEQUENCE}}; #endif #ifdef ENABLE_CURSOR_SHAPE struct Cursor_Shape cursor_shape[CURSOR_SHAPE] = {{"BLOCK", VTE_CURSOR_SHAPE_BLOCK}, {"IBEAM", VTE_CURSOR_SHAPE_IBEAM}, {"UNDERLINE", VTE_CURSOR_SHAPE_UNDERLINE}}; #endif void convert_system_color_to_rgba() { #ifdef USE_GDK_RGBA gint i, j; for (i=0; i \t\r\n,;|\\\"]*[^|.<> \t\r\n\\\"]" regex_str[4] = ADDRESS_END; // WWW command[TAG_WWW].name = "web_browser"; command[TAG_WWW].match = "[Hh][Tt][Tt][Pp][Ss]?://" LOGIN HOSTNAME PORT "(/" ADDRESS_BODY ADDRESS_END ")?/*"; command[TAG_WWW].comment = "# The web browser using for http(s)://"; command[TAG_WWW].method_name = "web_method"; command[TAG_WWW].environ_name = "web_environ"; command[TAG_WWW].VTE_CJK_WIDTH_name = "web_VTE_CJK_WIDTH"; command[TAG_WWW].encoding_name = "web_encoding"; command[TAG_WWW].locale_name = "web_locale"; command[TAG_WWW].match_regex_name = "web_match_regex"; // FTP command[TAG_FTP].name = "ftp_client"; command[TAG_FTP].match = "[Ff][Tt][Pp][Ss]?://" LOGIN HOSTNAME PORT "(/" ADDRESS_BODY ADDRESS_END ")?/*"; command[TAG_FTP].comment = "# The ftp client using for ftp(s)://"; command[TAG_FTP].method_name = "ftp_method"; command[TAG_FTP].environ_name = "ftp_environ"; command[TAG_FTP].VTE_CJK_WIDTH_name = "ftp_VTE_CJK_WIDTH"; command[TAG_FTP].encoding_name = "ftp_encoding"; command[TAG_FTP].locale_name = "ftp_locale"; command[TAG_FTP].match_regex_name = "ftp_match_regex"; // FILE command[TAG_FILE].name = "file_manager"; command[TAG_FILE].match = "[Ff][Ii][Ll][Ee]:///" ADDRESS_BODY ADDRESS_END; command[TAG_FILE].comment = "# The file manager using for file:// and [Open current directory with file manager]"; command[TAG_FILE].method_name = "file_method"; command[TAG_FILE].environ_name = "file_environ"; command[TAG_FILE].VTE_CJK_WIDTH_name = "file_VTE_CJK_WIDTH"; command[TAG_FILE].encoding_name = "file_encoding"; command[TAG_FILE].locale_name = "file_locale"; command[TAG_FILE].match_regex_name = "file_match_regex"; // MAIL command[TAG_MAIL].name = "email_client"; command[TAG_MAIL].match = "([Mm][Aa][Ii][Ll][Tt][Oo]:)?" USERNAME "@" HOSTNAME; command[TAG_MAIL].comment = "# The email client using for user@host"; command[TAG_MAIL].method_name = "email_method"; command[TAG_MAIL].environ_name = "email_environ"; command[TAG_MAIL].VTE_CJK_WIDTH_name = "email_VTE_CJK_WIDTH"; command[TAG_MAIL].encoding_name = "email_encoding"; command[TAG_MAIL].locale_name = "email_locale"; command[TAG_MAIL].match_regex_name = "email_match_regex"; } void init_user_command(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch init_user_command() for win_data %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif win_data->user_command[TAG_WWW].command = g_strdup("xdg-open"); win_data->user_command[TAG_FTP].command = g_strdup("xdg-open"); win_data->user_command[TAG_FILE].command = g_strdup("xdg-open"); win_data->user_command[TAG_MAIL].command = g_strdup("xdg-open"); gint i; // Keep it in NULL will be a better idea // for (i=0; iuser_regex[i] = g_strdup(""); for (i=0; iuser_command[i].method = 1; win_data->user_command[i].environ = g_strdup(""); win_data->user_command[i].VTE_CJK_WIDTH = 0; win_data->user_command[i].locale = g_strdup(""); // Keep it in NULL will be a better idea // win_data->user_command[i].match_regex_orig = g_strdup(""); } } void init_window_parameters(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch init_window_parameters() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // win_data->environment; // win_data->warned_locale_list = g_string_new(" "); // inited in init_prime_user_datas() // win_data->runtime_encoding; win_data->default_encoding = g_strdup(""); // win_data->runtime_LC_MESSAGES; // win_data->supported_encodings; // win_data->encoding_sub_menu // win_data->default_menuitem_encoding // win_data->default_locale = g_strdup(""); // inited in init_prime_user_datas() // win_data->runtime_locale; win_data->locales_list = g_strdup("UTF-8"); // win_data->supported_locales; // win_data->locale_sub_menu // win_data->default_shell; #ifdef ENABLE_SET_EMULATION win_data->emulate_term = g_strdup("xterm"); #endif win_data->VTE_CJK_WIDTH = 1; // win_data->VTE_CJK_WIDTH_STR; // win_data->argc; // win_data->argv; // win_data->command; // win_data->hold; // win_data->init_tab_number; // win_data->init_dir; // win_data->login_shell; // win_data->utmp; // win_data->geometry; // win_data->subitem_new_window_from_list; // win_data->menuitem_new_window_from_list; // win_data->subitem_load_profile_from_list; // win_data->menuitem_load_profile_from_list; // win_data->use_custom_profile; // win_data->profile; // win_data->specified_profile; win_data->profile_dir_modtime = -1; // win_data->menuitem_auto_save = NULL; // win_data->auto_save = FALSE; // win_data->startup_fullscreen; // win_data->fullscreen; // win_data->true_fullscreen; win_data->show_tabs_bar = AUTOMATIC; // win_data->fullscreen_show_scroll_bar = 1; // win_data->window_status; // win_data->window; // win_data->notebook; win_data->show_close_button_on_tab = TRUE; // win_data->shwo_close_button_on_all_tab; // win_data->current_vte; win_data->window_title_shows_current_page = TRUE; win_data->window_title_append_package_name = TRUE; // win_data->custom_window_title_str; // win_data->window_title_tpgid; // 0: do NOT use rgba // 1: force to use rgba // 2: decide by gdk_screen_is_composited() // if (! win_data->use_rgba) win_data->use_rgba = 2; // win_data->custom_tab_names_str; // win_data->custom_tab_names_strs; // win_data->custom_tab_names_current; // win_data->custom_tab_names_total; win_data->use_rgba_orig = 2; #ifdef ENABLE_RGBA win_data->transparent_window = 2; win_data->window_opacity = 0.05; win_data->dim_window = FALSE; win_data->window_opacity_inactive = 0.2; #endif win_data->enable_key_binding = TRUE; // win_data->User_KeyValue user_keys[KEYS]; // win_data->hints_type; // win_data->resize_type; #ifdef USE_GTK3_GEOMETRY_METHOD win_data->geometry_width = SYSTEM_COLUMN; win_data->geometry_height = SYSTEM_ROW; #endif win_data->lost_focus = FALSE; // win_data->keep_vte_size; // win_data->menu; // win_data->menu_activated; #ifdef ENABLE_RGBA // win_data->menuitem_trans_win; #endif // win_data->menuitem_trans_bg; win_data->show_color_selection_menu = TRUE; win_data->show_resize_menu = TRUE; win_data->font_resize_ratio = 0; win_data->window_resize_ratio = 1.12; win_data->show_background_menu = TRUE; #ifdef ENABLE_IM_APPEND_MENUITEMS // win_data->show_input_method_menu = FALSE; #endif win_data->show_change_page_name_menu = TRUE; win_data->show_exit_menu = TRUE; win_data->enable_hyperlink = TRUE; // win_data->User_Command user_command[COMMAND]; // win_data->menuitem_copy_url; // win_data->menuitem_dim_text; // win_data->menuitem_cursor_blinks; // win_data->menuitem_allow_bold_text; // win_data->menuitem_open_url_with_ctrl_pressed; // win_data->menuitem_disable_url_when_ctrl_pressed; // win_data->menuitem_audible_bell; #ifdef ENABLE_VISIBLE_BELL // win_data->menuitem_visible_bell; #endif // win_data->menuitem_urgent_bell; // win_data->urgent_bell_focus_in_event_id; // win_data->menuitem_show_tabs_bar; // win_data->menuitem_hide_tabs_bar; // win_data->menuitem_hide_scroll_bar; win_data->show_copy_paste_menu = TRUE; win_data->embedded_copy_paste_menu = TRUE; // win_data->menuitem_copy; // win_data->menuitem_paste; // win_data->menuitem_clipboard; // win_data->menuitem_primary; // win_data->fg_color; // win_data->fg_color_inactive; #ifdef ENABLE_GDKCOLOR_TO_STRING // win_data->cursor_color; dirty_gdk_color_parse (DEFAULT_CURSOR_COLOR, &(win_data->cursor_color)); // win_data->custom_cursor_color = FALSE; #endif // win_data->bg_color; // win_data->color_theme_str; // win_data->color_theme; // win_data->color_value[COLOR]; // win_data->invert_color; // win_data->menuitem_invert_color; // win_data->menuitem_theme; // win_data->current_menuitem_theme; // win_data->have_custom_color; // win_data->use_custom_theme; // win_data->ansi_color_sub_menu; // win_data->ansi_color_menuitem; // win_data->color[COLOR]; // win_data->color_inactive[COLOR]; // win_data->color_orig[COLOR]; win_data->color_brightness = 0.2; win_data->color_brightness_inactive = -2; win_data->page_width = 16; // win_data->fill_tabs_bar; // win_data->tabs_bar_position; win_data->page_name = g_strdup("Terminal"); win_data->reuse_page_names = TRUE; win_data->page_names = g_strdup("Terminal"); // win_data->splited_page_names; // win_data->page_names_no; // win_data->max_page_names_no; win_data->page_shows_number = TRUE; win_data->page_shows_encoding = TRUE; win_data->page_shows_current_cmdline = TRUE; win_data->page_shows_window_title = TRUE; win_data->page_shows_current_dir = TRUE; win_data->use_color_page = TRUE; win_data->check_root_privileges = TRUE; win_data->bold_current_page_name = TRUE; win_data->bold_action_page_name = TRUE; win_data->user_page_color[0] = g_strdup("#9A6401"); win_data->user_page_color[1] = g_strdup("#1C1CDC"); win_data->user_page_color[2] = g_strdup("#215E3E"); win_data->user_page_color[3] = g_strdup("#9C0A81"); win_data->user_page_color[4] = g_strdup("#BE0020"); win_data->user_page_color[5] = g_strdup("#333333"); #ifndef vte_terminal_set_font_from_string_full win_data->font_anti_alias = VTE_ANTI_ALIAS_USE_DEFAULT; #endif // default_font_name is got from profile win_data->default_font_name = g_strdup("Monospace 12"); // system_font_name is a fixed value // win_data->system_font_name = g_strdup("Monospace 12"); // win_data->restore_font_name; win_data->default_column = SYSTEM_COLUMN; win_data->default_row = SYSTEM_ROW; #ifdef ENABLE_SET_WORD_CHARS win_data->word_chars = g_strdup("-A-Za-z0-9_.+!@&=/~%"); #endif win_data->show_scroll_bar = AUTOMATIC; // 0: left // 1: right win_data->scroll_bar_position = 1; #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) win_data->transparent_background = 2; win_data->background_saturation = 0.15; // win_data->scroll_background = 0; win_data->background_image = g_strdup(NULL_DEVICE); #endif win_data->scrollback_lines = SCROLL_HISTORY; win_data->dim_text = TRUE; #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE // win_data->cursor_blinks = 0; #else win_data->cursor_blinks = TRUE; #endif win_data->allow_bold_text = TRUE; win_data->open_url_with_ctrl_pressed = FALSE; win_data->disable_url_when_ctrl_pressed = TRUE; win_data->audible_bell = TRUE; #ifdef ENABLE_VISIBLE_BELL // win_data->visible_bell = FALSE; #endif #ifdef ENABLE_BEEP_SINGAL win_data->urgent_bell = TRUE; #endif // win_data->urgent_bell_status = FALSE; // win_data->urgent_bell_focus_in_event_id = 0; win_data->erase_binding = erase_binding[DEFAULT_ERASE_BINDING].value; // win_data->menuitem_erase_binding[ERASE_BINDING]; // win_data->current_menuitem_erase_binding; #ifdef ENABLE_CURSOR_SHAPE win_data->cursor_shape = cursor_shape[DEFAULT_CURSOR_SHAPE].value; // win_data->menuitem_cursor_shape[CURSOR_SHAPE]; // win_data->current_menuitem_cursor_shape; #endif // win_data->confirm_to_close_multi_tabs = FALSE; win_data->confirm_to_kill_running_command = TRUE; // win_data->confirm_to_execute_command = TRUE; // inited in init_prime_user_datas() // Don't forget to edit windows.c if you change the default volue here. // win_data->execute_command_whitelist = g_strdup(""); // inited in init_prime_user_datas() // win_data->execute_command_whitelists // win_data->execute_command_in_new_tab = TRUE; // inited in init_prime_user_datas() win_data->foreground_program_whitelist = g_strdup("bash dash csh ksh tcsh zsh screen"); // win_data->foreground_program_whitelists win_data->background_program_whitelist = g_strdup("bash dash csh ksh tcsh zsh su"); // win_data->background_program_whitelists win_data->confirm_to_paste = TRUE; win_data->paste_texts_whitelist = g_strdup("editor vi vim elvis nano emacs emacs23 nano joe ne mg ssh"); // win_data->paste_texts_whitelists win_data->find_string = g_strdup(""); // win_data->find_case_sensitive; // win_data->find_use_perl_regular_expressions; // win_data->find_entry_bg_color; // win_data->find_entry_current_bg_color; // win_data->checking_menu_item; // win_data->dialog_activated; // win_data->kill_color_demo_vte; // win_data->adding_page; // win_data->confirmed_profile_is_invalid; // win_data->err_str; // g_debug ("init_window_parameters(): call init_prime_user_datas() for win_data %p!", win_data); init_prime_user_datas(win_data); } void init_page_parameters(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch init_page_parameters() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL)) return; #endif // g_debug("Set page_data->window = win_data->window in init_page_parameters()"); page_data->window = win_data->window; page_data->notebook = win_data->notebook; // page_data->page_no = 0; // page_data->label = NULL; // page_data->hbox = NULL; // page_data->vte = NULL; // page_data->scroll_bar = NULL; page_data->encoding_str = g_strdup(win_data->runtime_encoding); // page_data->locale = g_strdup(win_data->runtime_locale); page_data->environ = g_strdup(""); // g_debug("g_strdupv(page_data_prev->environments)!"); // page_data->environments = g_strdupv(win_data->environments); page_data->VTE_CJK_WIDTH_STR = g_strdup(win_data->VTE_CJK_WIDTH_STR); // page_data->page_name = NULL; // page_data->_t pid = 0; // page_data->_t current_tpgid = 0; // page_data->_t displayed_tpgid = 0; // page_data->custom_page_name = NULL; // page_data->tab_color = NULL; // page_data->pwd = g_strdup(win_data->init_dir); // page_data->is_root = 0; // page_data->is_bold = 0; // page_data->window_title_updated = 0; // page_data->page_update_method = PAGE_METHOD_AUTOMATIC; // page_data->window_title_signal = 0; // page_data->timeout_id = 0; // page_data->urgent_bell_handler_id = 0; page_data->font_name = g_strdup(win_data->default_font_name); // page_data->font_size = 0; // some data came from window. for the performance of monitor_cmdline init_monitor_cmdline_datas(win_data, page_data); // page_data->use_scrollback_lines = win_data->use_scrollback_lines; // page_data->window_title = NULL; // page_data->tag[COMMAND] = {{0}}; // page_data->match_regex_setted = FALSE; // } void init_user_keys(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch init_user_keys() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // for disable/enable the function keys win_data->user_keys[KEY_DISABLE_FUNCTION].value = g_strdup("Ctrl grave"); // New Page win_data->user_keys[KEY_NEW_TAB].value = g_strdup("Ctrl T"); // ### Close Page, disabled // win_data->user_keys[KEY_CLOSE_TAB].value = g_strdup("Ctrl Q"); // ### Edit Page Name, disabled // win_data->user_keys[KEY_EDIT_LABEL].value = g_strdup("Ctrl E"); // Find String win_data->user_keys[KEY_FIND].value = g_strdup("Ctrl F"); win_data->user_keys[KEY_FIND_NEXT].value = g_strdup("F3"); win_data->user_keys[KEY_FIND_PREV].value = g_strdup("Shift F3"); // Prev Page win_data->user_keys[KEY_PREV_TAB].value = g_strdup("Ctrl Page_Up"); // Next Page win_data->user_keys[KEY_NEXT_TAB].value = g_strdup("Ctrl Page_Down"); // First Page win_data->user_keys[KEY_FIRST_TAB].value = g_strdup("Ctrl Home"); // Last Page win_data->user_keys[KEY_LAST_TAB].value = g_strdup("Ctrl End"); // Move the label forward win_data->user_keys[KEY_MOVE_TAB_FORWARD].value = g_strdup("Ctrl bracketleft"); // Move the label backward win_data->user_keys[KEY_MOVE_TAB_BACKWARD].value = g_strdup("Ctrl bracketright"); // Move the label to first win_data->user_keys[KEY_MOVE_TAB_FIRST].value = g_strdup("Ctrl Up"); // Move the label to last win_data->user_keys[KEY_MOVE_TAB_LAST].value = g_strdup("Ctrl Down"); // switch to #%d page win_data->user_keys[KEY_SWITCH_TO_TAB_1].value = g_strdup("Ctrl F1"); win_data->user_keys[KEY_SWITCH_TO_TAB_2].value = g_strdup("Ctrl F2"); win_data->user_keys[KEY_SWITCH_TO_TAB_3].value = g_strdup("Ctrl F3"); win_data->user_keys[KEY_SWITCH_TO_TAB_4].value = g_strdup("Ctrl F4"); win_data->user_keys[KEY_SWITCH_TO_TAB_5].value = g_strdup("Ctrl F5"); win_data->user_keys[KEY_SWITCH_TO_TAB_6].value = g_strdup("Ctrl F6"); win_data->user_keys[KEY_SWITCH_TO_TAB_7].value = g_strdup("Ctrl F7"); win_data->user_keys[KEY_SWITCH_TO_TAB_8].value = g_strdup("Ctrl F8"); win_data->user_keys[KEY_SWITCH_TO_TAB_9].value = g_strdup("Ctrl F9"); win_data->user_keys[KEY_SWITCH_TO_TAB_10].value = g_strdup("Ctrl F10"); win_data->user_keys[KEY_SWITCH_TO_TAB_11].value = g_strdup("Ctrl F11"); win_data->user_keys[KEY_SWITCH_TO_TAB_12].value = g_strdup("Ctrl F12"); // #### open new window, disabled // win_data->user_keys[KEY_NEW_WINDOW].value = g_strdup("Ctrl N"); // select all win_data->user_keys[KEY_SELECT_ALL].value = g_strdup("Ctrl O"); // copy the text to clipboard win_data->user_keys[KEY_COPY_CLIPBOARD].value = g_strdup("Ctrl Delete"); // paste the text in clipboard win_data->user_keys[KEY_PASTE_CLIPBOARD].value = g_strdup("Ctrl Insert"); // copy the text in primary clipboard win_data->user_keys[KEY_COPY_PRIMARY].value = g_strdup(""); // paste the text in primary clipboard win_data->user_keys[KEY_PASTE_PRIMARY].value = g_strdup("Shift Insert"); // Increase the font size win_data->user_keys[KEY_INCREASE_FONT_SIZE].value = g_strdup("Ctrl equal"); // decrease the font size win_data->user_keys[KEY_DECREASE_FONT_SIZE].value = g_strdup("Ctrl minus"); // reset the font size win_data->user_keys[KEY_RESET_FONT_SIZE].value = g_strdup("Ctrl Return"); // max window win_data->user_keys[KEY_MAX_WINDOW].value = g_strdup("Alt F11"); // full screen win_data->user_keys[KEY_FULL_SCREEN].value = g_strdup("Alt Return"); // Scroll up/down win_data->user_keys[KEY_SCROLL_UP].value = g_strdup("Shift Left"); win_data->user_keys[KEY_SCROLL_DOWN].value = g_strdup("Shift Right"); win_data->user_keys[KEY_SCROLL_UP_1_LINE].value = g_strdup("Shift Up"); win_data->user_keys[KEY_SCROLL_DOWN_1_LINE].value = g_strdup("Shift Down"); win_data->user_keys[KEY_CLEAN_SCROLLBACK_LINES].value = g_strdup("Ctrl H"); win_data->user_keys[KEY_DISABLE_URL_L].value = g_strdup("Control_L"); win_data->user_keys[KEY_DISABLE_URL_R].value = g_strdup("Control_R"); #ifdef FATAL // dump_data win_data->user_keys[KEY_DUMP_DATA].value = g_strdup("Ctrl Print"); #endif } void init_key_bindings_name_and_group() { #ifdef DETAIL g_debug("! Launch init_key_bindings_name_and_group()!"); #endif system_keys[KEY_DISABLE_FUNCTION].name = "disable_key_binding"; system_keys[KEY_DISABLE_FUNCTION].group = KEY_GROUP_MISC; system_keys[KEY_NEW_TAB].name = "new_tab_key"; system_keys[KEY_NEW_TAB].group = KEY_GROUP_TAB_OPERATION; system_keys[KEY_CLOSE_TAB].name = "close_tab_key"; system_keys[KEY_CLOSE_TAB].group = KEY_GROUP_TAB_OPERATION; system_keys[KEY_EDIT_LABEL].name = "edit_label_key"; system_keys[KEY_EDIT_LABEL].group = KEY_GROUP_TAB_OPERATION; system_keys[KEY_FIND].name = "find_key"; system_keys[KEY_FIND].group = KEY_GROUP_TEXT; system_keys[KEY_FIND_PREV].name = "find_key_prev"; system_keys[KEY_FIND_PREV].group = KEY_GROUP_TEXT; system_keys[KEY_FIND_NEXT].name = "find_key_next"; system_keys[KEY_FIND_NEXT].group = KEY_GROUP_TEXT; system_keys[KEY_PREV_TAB].name = "prev_tab_key"; system_keys[KEY_PREV_TAB].group = KEY_GROUP_SWITCH_TAB; system_keys[KEY_NEXT_TAB].name = "next_tab_key"; system_keys[KEY_NEXT_TAB].group = KEY_GROUP_SWITCH_TAB; system_keys[KEY_FIRST_TAB].name = "first_tab_key"; system_keys[KEY_FIRST_TAB].group = KEY_GROUP_SWITCH_TAB; system_keys[KEY_LAST_TAB].name = "last_tab_key"; system_keys[KEY_LAST_TAB].group = KEY_GROUP_SWITCH_TAB; system_keys[KEY_MOVE_TAB_FORWARD].name = "move_tab_forward"; system_keys[KEY_MOVE_TAB_FORWARD].group = KEY_GROUP_MOVE_TAB; system_keys[KEY_MOVE_TAB_BACKWARD].name = "move_tab_backward"; system_keys[KEY_MOVE_TAB_BACKWARD].group = KEY_GROUP_MOVE_TAB; system_keys[KEY_MOVE_TAB_FIRST].name = "move_tab_first"; system_keys[KEY_MOVE_TAB_FIRST].group = KEY_GROUP_MOVE_TAB; system_keys[KEY_MOVE_TAB_LAST].name = "move_tab_last"; system_keys[KEY_MOVE_TAB_LAST].group = KEY_GROUP_MOVE_TAB; gint i; for (i=KEY_SWITCH_TO_TAB_1; i<=KEY_SWITCH_TO_TAB_12; i++) { system_keys[i].name = g_strdup_printf("switch_to_tab_%d", i-KEY_SWITCH_TO_TAB_1+1); system_keys[i].group = KEY_GROUP_SWITCH_TO_TAB; } system_keys[KEY_NEW_WINDOW].name = "new_window"; system_keys[KEY_NEW_WINDOW].group = KEY_GROUP_MISC; system_keys[KEY_SELECT_ALL].name = "select_all"; system_keys[KEY_SELECT_ALL].group = KEY_GROUP_TEXT; system_keys[KEY_COPY_CLIPBOARD].name = "copy_clipboard"; system_keys[KEY_COPY_CLIPBOARD].group = KEY_GROUP_TEXT; system_keys[KEY_PASTE_CLIPBOARD].name = "paste_clipboard"; system_keys[KEY_PASTE_CLIPBOARD].group = KEY_GROUP_TEXT; system_keys[KEY_COPY_PRIMARY].name = "copy_clipboard in primary"; system_keys[KEY_COPY_PRIMARY].group = KEY_GROUP_TEXT; system_keys[KEY_PASTE_PRIMARY].name = "paste_clipboard in primary"; system_keys[KEY_PASTE_PRIMARY].group = KEY_GROUP_TEXT; system_keys[KEY_INCREASE_FONT_SIZE].name = "increase_font_size"; system_keys[KEY_INCREASE_FONT_SIZE].group = KEY_GROUP_FONT; system_keys[KEY_DECREASE_FONT_SIZE].name = "decrease_font_size"; system_keys[KEY_DECREASE_FONT_SIZE].group = KEY_GROUP_FONT; system_keys[KEY_RESET_FONT_SIZE].name = "reset_font_size"; system_keys[KEY_RESET_FONT_SIZE].group = KEY_GROUP_FONT; system_keys[KEY_MAX_WINDOW].name = "max_window"; system_keys[KEY_MAX_WINDOW].group = KEY_GROUP_MISC; system_keys[KEY_FULL_SCREEN].name = "full_screen"; system_keys[KEY_FULL_SCREEN].group = KEY_GROUP_MISC; system_keys[KEY_SCROLL_UP].name = "scroll_up"; system_keys[KEY_SCROLL_UP].group = KEY_GROUP_SCROLL; system_keys[KEY_SCROLL_DOWN].name = "scroll_down"; system_keys[KEY_SCROLL_DOWN].group = KEY_GROUP_SCROLL; system_keys[KEY_SCROLL_UP_1_LINE].name = "scroll_up_1_line"; system_keys[KEY_SCROLL_UP_1_LINE].group = KEY_GROUP_SCROLL; system_keys[KEY_SCROLL_DOWN_1_LINE].name = "scroll_down_1_line"; system_keys[KEY_SCROLL_DOWN_1_LINE].group = KEY_GROUP_SCROLL; system_keys[KEY_CLEAN_SCROLLBACK_LINES].name = "clean_scrollback_lines"; system_keys[KEY_CLEAN_SCROLLBACK_LINES].group = KEY_GROUP_SCROLL; system_keys[KEY_DISABLE_URL_L].name = "disable_url_for_temporary_L"; system_keys[KEY_DISABLE_URL_L].group = KEY_GROUP_NONE; system_keys[KEY_DISABLE_URL_R].name = "disable_url_for_temporary_R"; system_keys[KEY_DISABLE_URL_R].group = KEY_GROUP_NONE; #ifdef FATAL system_keys[KEY_DUMP_DATA].name = "dump_data"; system_keys[KEY_DUMP_DATA].group = KEY_GROUP_MISC; #endif } void init_key_bindings() { #ifdef DETAIL g_debug("! Launch init_key_bindings()!"); #endif key_groups[KEY_GROUP_MISC] = _("Misc"); key_groups[KEY_GROUP_TAB_OPERATION] = _("Tab operation"); key_groups[KEY_GROUP_SWITCH_TAB] = _("Switch tab"); key_groups[KEY_GROUP_MOVE_TAB] = _("Move tab"); key_groups[KEY_GROUP_SWITCH_TO_TAB] = _("Switch to #? tab"); key_groups[KEY_GROUP_TEXT] = _("Text operation"); key_groups[KEY_GROUP_SCROLL] = _("Scroll up/down"); key_groups[KEY_GROUP_FONT] = _("Font"); key_groups[KEY_GROUP_NONE] = "None"; // for disable/enable the function keys system_keys[KEY_DISABLE_FUNCTION].topic = _("Disable/Enable functions"); system_keys[KEY_DISABLE_FUNCTION].comment = "# Disable/Enable hyperlinks, function keys and right click menu."; system_keys[KEY_DISABLE_FUNCTION].translation = _("Disable/Enable hyperlinks, function keys and right click menu."); // New Page system_keys[KEY_NEW_TAB].topic = _("Add new tab"); system_keys[KEY_NEW_TAB].comment = "# Add a new tab."; system_keys[KEY_NEW_TAB].translation = _("Add a new tab."); // Close Page system_keys[KEY_CLOSE_TAB].topic = _("Close tab"); system_keys[KEY_CLOSE_TAB].comment = "# Close current tab."; system_keys[KEY_CLOSE_TAB].translation = _("Close current tab."); // Edit Page Name system_keys[KEY_EDIT_LABEL].topic = _("Rename page name"); system_keys[KEY_EDIT_LABEL].comment = "# Rename the page name of current tab."; system_keys[KEY_EDIT_LABEL].translation = _("Rename the page name of current tab."); // Find system_keys[KEY_FIND].topic = _("Find string"); system_keys[KEY_FIND].comment = "# Find the strings matching the search regex."; system_keys[KEY_FIND].translation = _("Find the strings matching the search regex."); system_keys[KEY_FIND_PREV].topic = _("Find previous"); system_keys[KEY_FIND_PREV].comment = "# Find the previous string matching the search regex."; system_keys[KEY_FIND_PREV].translation = _("Find the previous string matching the search regex."); system_keys[KEY_FIND_NEXT].topic = _("Find next"); system_keys[KEY_FIND_NEXT].comment = "# Find the next string matching the search regex."; system_keys[KEY_FIND_NEXT].translation = _("Find the next string matching the search regex."); // Pre Page system_keys[KEY_PREV_TAB].topic = _("Switch to prev tab"); system_keys[KEY_PREV_TAB].comment = "# Switch to prev tab."; system_keys[KEY_PREV_TAB].translation = _("Switch to prev tab."); // Next Page system_keys[KEY_NEXT_TAB].topic = _("Switch to next tab"); system_keys[KEY_NEXT_TAB].comment = "# Switch to next tab."; system_keys[KEY_NEXT_TAB].translation = _("Switch to next tab."); // First Page system_keys[KEY_FIRST_TAB].topic = _("Switch to first tab"); system_keys[KEY_FIRST_TAB].comment = "# Switch to first tab."; system_keys[KEY_FIRST_TAB].translation = _("Switch to first tab."); // Last Page system_keys[KEY_LAST_TAB].topic = _("Switch to last tab"); system_keys[KEY_LAST_TAB].comment = "# Switch to last tab."; system_keys[KEY_LAST_TAB].translation = _("Switch to last tab."); // Move the label forward system_keys[KEY_MOVE_TAB_FORWARD].topic = _("Move page forward"); system_keys[KEY_MOVE_TAB_FORWARD].comment = "# Move current page forward."; system_keys[KEY_MOVE_TAB_FORWARD].translation = _("Move current page forward."); // Move the label backward system_keys[KEY_MOVE_TAB_BACKWARD].topic = _("Move page backward"); system_keys[KEY_MOVE_TAB_BACKWARD].comment = "# Move current page backward."; system_keys[KEY_MOVE_TAB_BACKWARD].translation = _("Move current page backward."); // Move the label to first system_keys[KEY_MOVE_TAB_FIRST].topic = _("Move page to first"); system_keys[KEY_MOVE_TAB_FIRST].comment = "# Move current page to first."; system_keys[KEY_MOVE_TAB_FIRST].translation = _("Move current page to first."); // Move the label to last system_keys[KEY_MOVE_TAB_LAST].topic = _("Move page to last"); system_keys[KEY_MOVE_TAB_LAST].comment = "# Move current page to last."; system_keys[KEY_MOVE_TAB_LAST].translation = _("Move current page to last."); // switch to #%d page gint i; for (i=KEY_SWITCH_TO_TAB_1; i<=KEY_SWITCH_TO_TAB_12; i++) { system_keys[i].topic = g_strdup_printf(_("Switch to #%d tab"), i-KEY_SWITCH_TO_TAB_1+1); system_keys[i].comment = g_strdup_printf("# Switch to #%d tab directly.", i-KEY_SWITCH_TO_TAB_1+1); system_keys[i].translation = g_strdup_printf(_("Switch #%d tab directly."), i-KEY_SWITCH_TO_TAB_1+1); } // new_window system_keys[KEY_NEW_WINDOW].topic = _("New window"); system_keys[KEY_NEW_WINDOW].comment = "# Open a new window with current dir."; system_keys[KEY_NEW_WINDOW].translation = _("Open a new window with current dir."); // select all system_keys[KEY_SELECT_ALL].topic = _("Select all"); system_keys[KEY_SELECT_ALL].comment = "# Select all the text in the Vte Terminal box."; system_keys[KEY_SELECT_ALL].translation = _("Select all the text in the Vte Terminal box."); // copy the text to clipboard system_keys[KEY_COPY_CLIPBOARD].topic = _("Copy to clipboard"); system_keys[KEY_COPY_CLIPBOARD].comment = "# Copy the text to clipboard."; system_keys[KEY_COPY_CLIPBOARD].translation = _("Copy the text to clipboard."); // paste the text in clipboard system_keys[KEY_PASTE_CLIPBOARD].topic = _("Paste the text"); system_keys[KEY_PASTE_CLIPBOARD].comment = "# Paste the text in clipboard."; system_keys[KEY_PASTE_CLIPBOARD].translation = _("Paste the text in clipboard to the Vte Terminal box."); // copy the text to primary clipboard system_keys[KEY_COPY_PRIMARY].topic = _("Copy the text to primary clipboard"); system_keys[KEY_COPY_PRIMARY].comment = "# Copy the text to the primary clipboard."; system_keys[KEY_COPY_PRIMARY].translation = _("Copy the text to the primary clipboard.\nNormally it is copied to the primary clipboard already\nwhen you selected some text with mouse."); // paste the text in primary clipboard system_keys[KEY_PASTE_PRIMARY].topic = _("Paste the text in primary clipboard"); system_keys[KEY_PASTE_PRIMARY].comment = "# Paste the text in the primary clipboard."; system_keys[KEY_PASTE_PRIMARY].translation = _("Paste the text in the primary clipboard to the Vte Terminal box.\nThe default key binding is in libvte if you disable it here."); // Increase the font size system_keys[KEY_INCREASE_FONT_SIZE].topic = _("Increase font size"); system_keys[KEY_INCREASE_FONT_SIZE].comment = "# Increase the font size of current tab."; system_keys[KEY_INCREASE_FONT_SIZE].translation = _("Increase the font size of current tab."); // decrease the font size system_keys[KEY_DECREASE_FONT_SIZE].topic = _("Decrease font size"); system_keys[KEY_DECREASE_FONT_SIZE].comment = "# Decrease the font size of current tab."; system_keys[KEY_DECREASE_FONT_SIZE].translation = _("Decrease the font size of current tab."); // reset the font size system_keys[KEY_RESET_FONT_SIZE].topic = _("Reset font size"); system_keys[KEY_RESET_FONT_SIZE].comment = "# Reset the font of current tab to original size."; system_keys[KEY_RESET_FONT_SIZE].translation = _("Reset the font of current tab to original size."); // max window system_keys[KEY_MAX_WINDOW].topic = _("Maximize the window"); system_keys[KEY_MAX_WINDOW].comment = "# Try to maximize the window to use all available space on your display."; system_keys[KEY_MAX_WINDOW].translation = _("Try to maximize the window to use all available space on your display."); // full screen system_keys[KEY_FULL_SCREEN].topic = _("Full screen"); system_keys[KEY_FULL_SCREEN].comment = "# Asks to place window in the fullscreen/unfullscreen state."; system_keys[KEY_FULL_SCREEN].translation = _("Asks to place window in the fullscreen/unfullscreen state."); // scroll up system_keys[KEY_SCROLL_UP].topic = _("Scroll up"); system_keys[KEY_SCROLL_UP].comment = "# Emulate a mouse scroll up event on Vte Terminal box."; system_keys[KEY_SCROLL_UP].translation = _("Emulate a mouse scroll up event on Vte Terminal box."); // scroll down system_keys[KEY_SCROLL_DOWN].topic = _("Scroll down"); system_keys[KEY_SCROLL_DOWN].comment = "# Emulate a mouse scroll down event on Vte Terminal box."; system_keys[KEY_SCROLL_DOWN].translation = _("Emulate a mouse scroll down event on Vte Terminal box."); // scroll up 1 line system_keys[KEY_SCROLL_UP_1_LINE].topic = _("Scroll up 1 line"); system_keys[KEY_SCROLL_UP_1_LINE].comment = "# Asks to scroll up 1 line on Vte Terminal box."; system_keys[KEY_SCROLL_UP_1_LINE].translation = _("Asks to scroll up 1 line on Vte Terminal box."); // scroll down 1 line system_keys[KEY_SCROLL_DOWN_1_LINE].topic = _("Scroll down 1 line"); system_keys[KEY_SCROLL_DOWN_1_LINE].comment = "# Asks to scroll down 1 line on Vte Terminal box."; system_keys[KEY_SCROLL_DOWN_1_LINE].translation = _("Asks to scroll down 1 line on Vte Terminal box."); // clean scroll history system_keys[KEY_CLEAN_SCROLLBACK_LINES].topic = _("Clean scrollback lines"); system_keys[KEY_CLEAN_SCROLLBACK_LINES].comment = "# Asks to clean scrollback lines."; system_keys[KEY_CLEAN_SCROLLBACK_LINES].translation = _("Asks to clean scrollback lines."); // disable URL for temporary system_keys[KEY_DISABLE_URL_L].topic = "Disable URL for temporary"; system_keys[KEY_DISABLE_URL_L].comment = "# Disable URL for temporary."; system_keys[KEY_DISABLE_URL_L].translation = "Disable URL for temporary."; system_keys[KEY_DISABLE_URL_R].topic = "Disable URL for temporary"; system_keys[KEY_DISABLE_URL_R].comment = "# Disable URL for temporary."; system_keys[KEY_DISABLE_URL_R].translation = "Disable URL for temporary."; #ifdef FATAL system_keys[KEY_DUMP_DATA].topic = _("Dump runtime debug data"); system_keys[KEY_DUMP_DATA].comment = "# Dump the runtime data of LilyTerm for debug."; system_keys[KEY_DUMP_DATA].translation = _("Dump the runtime data of LilyTerm for debug."); #endif } void init_page_color_data() { #ifdef DETAIL g_debug("! Launch init_page_color_data()!"); #endif page_color[0].name = "page_win_title_color"; page_color[0].comment_eng = "Window Title"; page_color[1].name = "page_cmdline_color"; page_color[1].comment_eng = "Running Command"; page_color[2].name = "page_dir_color"; page_color[2].comment_eng = "Current Dir"; page_color[3].name = "page_custom_color"; page_color[3].comment_eng = "Custom Tab Name"; page_color[4].name = "page_root_color"; page_color[4].comment_eng = "Root Privileges"; page_color[5].name = "page_normal_color"; page_color[5].comment_eng = "Normal Text"; } void init_page_color_data_comment() { #ifdef DETAIL g_debug("! Launch init_page_color_data_comment()!"); #endif page_color[0].comment = _("Window Title"); page_color[1].comment = _("Running Command"); page_color[2].comment = _("Current Dir"); page_color[3].comment = _("Custom Tab Name"); page_color[4].comment = _("Root Privileges"); page_color[5].comment = _("Normal Text"); } void init_locale_restrict_data(gchar *lc_messages) { #ifdef DETAIL g_debug("! Launch init_locale_restrict_data() with lc_messages = %s!", lc_messages); #endif // g_debug("lc_messages = %s", lc_messages); // g_debug("restricted_locale_message = %s", restricted_locale_message); if ((restricted_locale_message == NULL) || compare_strings(restricted_locale_message, lc_messages, TRUE)) { g_free(restricted_locale_message); restricted_locale_message = g_strdup(lc_messages); gint i; for (i=KEY_SWITCH_TO_TAB_1; i<=KEY_SWITCH_TO_TAB_12; i++) { g_free(system_keys[i].topic); g_free(system_keys[i].comment); g_free(system_keys[i].translation); } init_key_bindings(); init_page_color_data_comment(); } } void init_mod_keys() { #ifdef DETAIL g_debug("! Launch init_mod_keys()!"); #endif modkeys[0].name = _("Shift"); modkeys[0].mod = GDK_SHIFT_MASK; // modkeys[1].name = "NumLock"; // modkeys[1].mod = GDK_LOCK_MASK ; modkeys[1].name = _("Ctrl"); modkeys[1].mod = GDK_CONTROL_MASK; modkeys[2].name = _("Alt"); modkeys[2].mod = GDK_MOD1_MASK ; // Mod2 = Alt // modkeys[2].name = "Mod1"; // modkeys[2].mod = GDK_MOD1_MASK; // Mod2 = NumLock. We won't check it. // modkeys[3].name = "Mod2"; // modkeys[3].mod = GDK_MOD2_MASK ; //// modkeys[3].name = "Mod3"; //// modkeys[3].mod = GDK_MOD3_MASK; modkeys[3].name = _("Win"); modkeys[3].mod = GDK_MOD4_MASK | GDK_SUPER_MASK; //// modkeys[5].name = "Mod5"; //// modkeys[5].mod = GDK_MOD5_MASK ; // modkeys[6].name = "Button1"; // modkeys[6].mod = GDK_BUTTON1_MASK; // modkeys[7].name = "Button2"; // modkeys[7].mod = GDK_BUTTON2_MASK; // modkeys[8].name = "Button3"; // modkeys[8].mod = GDK_BUTTON3_MASK; // modkeys[9].name = "Button4"; // modkeys[9].mod = GDK_BUTTON4_MASK; // modkeys[10].name = "Button5"; // modkeys[10].mod = GDK_BUTTON5_MASK; // modkeys[11].name = "Super"; // modkeys[11].mod = GDK_SUPER_MASK; // modkeys[12].name = "Hyper"; // modkeys[12].mod = GDK_HYPER_MASK; // modkeys[13].name = "Meta"; // modkeys[13].mod = GDK_META_MASK ; } void init_colors() { #ifdef DETAIL g_debug("! Launch init_colors()"); #endif color[0].comment = "# The ANSI color code for Dark Black"; color[1].comment = "# The ANSI color code for Dark Red"; color[2].comment = "# The ANSI color code for Dark Green"; color[3].comment = "# The ANSI color code for Dark Yellow"; color[4].comment = "# The ANSI color code for Dark Blue"; color[5].comment = "# The ANSI color code for Dark Magenta"; color[6].comment = "# The ANSI color code for Dark Cyan"; color[7].comment = "# The ANSI color code for Dark White"; color[8].comment = "# The ANSI color code for Bright Black"; color[9].comment = "# The ANSI color code for Bright Red"; color[10].comment = "# The ANSI color code for Bright Green"; color[11].comment = "# The ANSI color code for Bright Yellow"; color[12].comment = "# The ANSI color code for Bright Blue"; color[13].comment = "# The ANSI color code for Bright Magenta"; color[14].comment = "# The ANSI color code for Bright Cyan"; color[15].comment = "# The ANSI color code for Bright White"; color[0].translation = _("Background Color"); color[1].translation = _("Dark Red"); color[2].translation = _("Dark Green"); color[3].translation = _("Dark Yellow"); color[4].translation = _("Dark Blue"); color[5].translation = _("Dark Magenta"); color[6].translation = _("Dark Cyan"); color[7].translation = _("Dark White"); color[8].translation = _("Bright Black"); color[9].translation = _("Bright Red"); color[10].translation = _("Bright Green"); color[11].translation = _("Bright Yellow"); color[12].translation = _("Bright Blue"); color[13].translation = _("Bright Magenta"); color[14].translation = _("Bright Cyan"); color[15].translation = _("Foreground Color"); gint i; for (i=0; icustom_color_theme[%d]->name = %s", win_data, i, system_color_theme[i].name); win_data->custom_color_theme[i].index = system_color_theme[i].index + THEME; win_data->custom_color_theme[i].name = system_color_theme[i].name; for (j=0; jcustom_color_theme[i].color[j] = system_color_theme[i].color[j]; } // find the palette for theme_name for (i=1; icolor_theme_str = %s", win_data->color_theme_str); win_data->color_theme_index = i; break; } } } gchar *get_user_profile_path(struct Window *win_data, int argc, char *argv[]) { #ifdef DETAIL g_debug("! Launch get_user_profile_path() with win_data = %p, argc = %d", win_data, argc); // print_array("\targv", argv); #endif gint i; gchar *profile=NULL; #ifdef SAFEMODE if (argv) { #endif for (i=0; iuse_custom_profile = TRUE; } // g_debug ("Using Profile = %s", profile); } else if ((!strcmp(argv[i], "--specified_profile"))) { if (++i==argc) g_critical("missing file name after --specified_profile!\n"); else { if (win_data) win_data->specified_profile = g_strdup(argv[i]); } // g_debug ("Using Profile = %s", profile); } else if ((!strcmp(argv[i], "-e")) || (!strcmp(argv[i], "-x")) || (!strcmp(argv[i], "--execute"))) break; } #ifdef SAFEMODE } #endif // trying to got witch profile to use if (profile==NULL) { profile = load_profile_from_dir(profile_dir, USER_PROFILE); if (profile==NULL) profile = load_profile_from_dir(ETCDIR, PROFILE); } // if (profile==NULL) // g_message("Sorry, Can not find any profile. Using program defaults."); return profile; } // The returned string should be freed when no longer needed. gchar *load_profile_from_dir(const gchar *dir, const gchar* profile) { #ifdef DETAIL g_debug("! Launch load_profile_from_dir() with dir = %s", dir); #endif #ifdef SAFEMODE if ((dir==NULL) || (profile==NULL)) return NULL; #endif gchar *profile_path = g_strdup_printf("%s/%s", dir, profile); #ifdef SAFEMODE if (profile_path && g_file_test(profile_path , G_FILE_TEST_EXISTS)) #else if ( g_file_test(profile_path , G_FILE_TEST_EXISTS)) #endif return profile_path; else { g_free(profile_path); return NULL; } } // get user settings from profile. // encoding is used for display error message if the profile is invalid. void get_user_settings(struct Window *win_data, const gchar *encoding) { #ifdef DETAIL g_debug("! Launch get_user_settings() with win_data = %p, encoding = %s", win_data, encoding); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif #ifdef OUT_OF_MEMORY # undef g_strdup # undef g_strdup_printf # undef g_strsplit # undef g_strsplit_set #endif // g_debug("Get win_data = %d when get user settings!", win_data); init_window_parameters(win_data); init_user_keys(win_data); init_user_command(win_data); static gboolean static_data_inited = FALSE; if (! static_data_inited) { // Init some static datas. init_page_color_data(); init_key_bindings_name_and_group(); init_mod_keys(); init_command(); init_colors(); static_data_inited = TRUE; } gint i; GError *error = NULL; // got the rc file GKeyFile *keyfile = g_key_file_new(); // g_debug ("Using the profile: %s ", profile); gchar *fg_color_str = NULL, *bg_color_str = NULL, *color_theme_str = NULL, *cursor_color_str = NULL; // g_debug("safe_mode = %d", safe_mode); if (win_data->profile != NULL && (! safe_mode)) { if (g_key_file_load_from_file(keyfile, win_data->profile, G_KEY_FILE_NONE, &error)) { get_prime_user_settings(keyfile, win_data, (gchar *)encoding); win_data->auto_save = check_boolean_value(keyfile, "main", "auto_save", win_data->auto_save); win_data->default_font_name = check_string_value(keyfile, "main", "font_name", win_data->default_font_name, TRUE, DISABLE_EMPTY_STR); PangoFontDescription *font_desc = pango_font_description_from_string(win_data->default_font_name); if ((pango_font_description_get_size(font_desc)/PANGO_SCALE)==0) { g_warning("Invalid font name: \"%s\"", win_data->default_font_name); g_free(win_data->default_font_name); win_data->default_font_name = g_strdup(SYSTEM_FONT_NAME); } win_data->default_column = check_integer_value( keyfile, "main", "column", win_data->default_column, DISABLE_EMPTY_STR, SYSTEM_COLUMN, DISABLE_ZERO, CHECK_MIN, 1, NO_CHECK_MAX, 0); win_data->default_row = check_integer_value(keyfile, "main", "row", win_data->default_row, DISABLE_EMPTY_STR, SYSTEM_ROW, DISABLE_ZERO, CHECK_MIN, 1, NO_CHECK_MAX, 0); #ifdef USE_GTK3_GEOMETRY_METHOD win_data->geometry_width = win_data->default_column; win_data->geometry_height = win_data->default_row; #endif #ifdef ENABLE_RGBA win_data->transparent_window = check_integer_value(keyfile, "main", "transparent_window", win_data->transparent_window, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); win_data->use_rgba_orig = check_integer_value(keyfile, "main", "use_rgba", win_data->use_rgba_orig, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); win_data->window_opacity = check_double_value ( keyfile, "main", "window_opacity", win_data->window_opacity, DISABLE_EMPTY_STR, 0, CHECK_MIN, 0, CHECK_MAX, 1); win_data->window_opacity_inactive = check_double_value ( keyfile, "main", "window_opacity_inactive", win_data->window_opacity_inactive, ENABLE_EMPTY_STR, -2, CHECK_MIN, 0, CHECK_MAX, 1); // g_debug("Got win_data->window_opacity_inactive = %1.3f", win_data->window_opacity_inactive); #endif #ifdef USE_GTK2_GEOMETRY_METHOD win_data->startup_fullscreen = check_boolean_value(keyfile, "main", "fullscreen", win_data->fullscreen); #endif #ifdef USE_GTK3_GEOMETRY_METHOD gboolean fullscreen = check_boolean_value(keyfile, "main", "fullscreen", win_data->window_status); if (fullscreen) win_data->window_status = WINDOW_START_WITH_FULL_SCREEN; #endif #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) win_data->transparent_background = check_integer_value(keyfile, "main", "transparent_background", win_data->transparent_background, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); win_data->background_saturation = check_double_value(keyfile, "main", "background_saturation", win_data->background_saturation, DISABLE_EMPTY_STR, 0, CHECK_MIN, 0, CHECK_MAX, 1); win_data->scroll_background = check_boolean_value(keyfile, "main", "scroll_background", win_data->scroll_background); win_data->background_image = check_string_value(keyfile, "main", "background_image", win_data->background_image, TRUE, DISABLE_EMPTY_STR); #endif win_data->foreground_program_whitelist = check_string_value(keyfile, "main", "foreground_program_whitelist", win_data->foreground_program_whitelist, TRUE, ENABLE_EMPTY_STR); win_data->background_program_whitelist = check_string_value(keyfile, "main", "background_program_whitelist", win_data->background_program_whitelist, TRUE, ENABLE_EMPTY_STR); win_data->confirm_to_paste = check_boolean_value(keyfile, "main", "confirm_to_paste", win_data->confirm_to_paste); win_data->paste_texts_whitelist = check_string_value(keyfile, "main", "paste_texts_whitelist", win_data->paste_texts_whitelist, TRUE, ENABLE_EMPTY_STR); win_data->confirm_to_close_multi_tabs = check_boolean_value(keyfile, "main", "confirm_to_close_multi_tabs", win_data->confirm_to_close_multi_tabs); win_data->confirm_to_kill_running_command = check_boolean_value(keyfile, "main", "confirm_to_kill_running_command", win_data->confirm_to_kill_running_command); win_data->show_background_menu = check_boolean_value(keyfile, "main", "show_background_menu", win_data->show_background_menu); win_data->show_color_selection_menu = check_boolean_value(keyfile, "main", "show_color_selection_menu", win_data->show_color_selection_menu); fg_color_str = check_string_value(keyfile, "main", "foreground_color", DEFAULT_FOREGROUND_COLOR, FALSE, DISABLE_EMPTY_STR); bg_color_str = check_string_value(keyfile, "main", "background_color", DEFAULT_BACKGROUND_COLOR, FALSE, DISABLE_EMPTY_STR); cursor_color_str = check_string_value(keyfile, "main", "cursor_color", DEFAULT_CURSOR_COLOR, FALSE, DISABLE_EMPTY_STR); win_data->custom_cursor_color = ! check_boolean_value(keyfile, "main", "disable_custom_cursor_color", ! win_data->custom_cursor_color); if (cursor_color_str == NULL) win_data->custom_cursor_color = FALSE; win_data->show_resize_menu = check_boolean_value(keyfile, "main", "show_resize_menu", win_data->show_resize_menu); #ifndef vte_terminal_set_font_from_string_full win_data->font_anti_alias = check_integer_value( keyfile, "main", "font_anti_alias", win_data->font_anti_alias, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); #endif win_data->font_resize_ratio = check_double_value(keyfile, "main", "font_resize_ratio", win_data->font_resize_ratio, DISABLE_EMPTY_STR, 0, CHECK_MIN, 0, NO_CHECK_MAX, 0); win_data->window_resize_ratio = check_double_value(keyfile, "main", "window_resize_ratio", win_data->window_resize_ratio, DISABLE_EMPTY_STR, 0, CHECK_MIN, 0, NO_CHECK_MAX, 0); #ifdef ENABLE_SET_WORD_CHARS win_data->word_chars = check_string_value(keyfile, "main", "word_chars", win_data->word_chars, TRUE, ENABLE_EMPTY_STR); #endif win_data->scrollback_lines = check_integer_value(keyfile, "main", "scrollback_lines", win_data->scrollback_lines, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, -1, NO_CHECK_MAX, 0); gint show_scroll_bar = check_integer_value(keyfile, "main", "show_scroll_bar", 2, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); switch (show_scroll_bar) { case 0: win_data->show_scroll_bar = FORCE_OFF; break; case 1: win_data->show_scroll_bar = FORCE_ON; break; default: win_data->show_scroll_bar = AUTOMATIC; break; } // g_debug("Got show_scroll_bar = %d, win_data->show_scroll_bar = %d", // show_scroll_bar, win_data->show_scroll_bar); win_data->scroll_bar_position = check_boolean_value(keyfile, "main", "scroll_bar_position", win_data->scroll_bar_position); #ifdef ENABLE_IM_APPEND_MENUITEMS win_data->show_input_method_menu = check_boolean_value(keyfile, "main", "show_input_method_menu", win_data->show_input_method_menu); #endif win_data->show_change_page_name_menu = check_boolean_value(keyfile, "main", "show_change_page_name_menu", win_data->show_change_page_name_menu); win_data->show_exit_menu = check_boolean_value(keyfile, "main", "show_exit_menu", win_data->show_exit_menu); win_data->enable_hyperlink = check_boolean_value(keyfile, "main", "enable_hyperlink", win_data->enable_hyperlink); #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE win_data->cursor_blinks = check_integer_value(keyfile, "main", "cursor_blinks", win_data->cursor_blinks, ENABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); #else win_data->cursor_blinks = check_boolean_value(keyfile, "main", "cursor_blinks", win_data->cursor_blinks); #endif win_data->allow_bold_text = check_boolean_value(keyfile, "main", "allow_bold_text", win_data->allow_bold_text); win_data->open_url_with_ctrl_pressed = check_boolean_value(keyfile, "main", "open_url_with_ctrl_pressed", win_data->open_url_with_ctrl_pressed); win_data->disable_url_when_ctrl_pressed = check_boolean_value(keyfile, "main", "disable_url_when_ctrl_pressed", win_data->disable_url_when_ctrl_pressed); if (win_data->disable_url_when_ctrl_pressed) win_data->open_url_with_ctrl_pressed = FALSE; win_data->show_copy_paste_menu = check_boolean_value(keyfile, "main", "show_copy_paste_menu", win_data->show_copy_paste_menu); win_data->embedded_copy_paste_menu = check_boolean_value(keyfile, "main", "embedded_copy_paste_menu", win_data->embedded_copy_paste_menu); win_data->audible_bell = check_boolean_value(keyfile, "main", "audible_bell", win_data->audible_bell); #ifdef ENABLE_VISIBLE_BELL win_data->visible_bell = check_boolean_value(keyfile, "main", "visible_bell", win_data->visible_bell); #endif #ifdef ENABLE_BEEP_SINGAL win_data->urgent_bell = check_boolean_value(keyfile, "main", "urgent_bell", win_data->urgent_bell); #endif // g_debug("VTE_ERASE_AUTO = %d, VTE_ERASE_ASCII_BACKSPACE = %d, " // "VTE_ERASE_ASCII_DELETE = %d, VTE_ERASE_DELETE_SEQUENCE %d", // VTE_ERASE_AUTO, VTE_ERASE_ASCII_BACKSPACE, // VTE_ERASE_ASCII_DELETE, VTE_ERASE_DELETE_SEQUENCE); win_data->erase_binding = check_integer_value(keyfile, "main", "erase_binding", win_data->erase_binding, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, ERASE_BINDING); #ifdef ENABLE_CURSOR_SHAPE win_data->cursor_shape = check_integer_value(keyfile, "main", "cursor_shape", win_data->cursor_shape, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, CURSOR_SHAPE); #endif win_data->locales_list = check_string_value( keyfile, "main", "locales_list", win_data->locales_list, TRUE, ENABLE_EMPTY_STR); // g_debug("Got locales_list = %s from user's profile!", value); win_data->default_shell = check_string_value( keyfile, "main", "default_shell", win_data->default_shell, TRUE, DISABLE_EMPTY_STR); if (win_data->default_shell) { g_free(win_data->shell); win_data->shell = g_strdup(win_data->default_shell); } #ifdef ENABLE_SET_EMULATION win_data->emulate_term = check_string_value( keyfile, "main", "emulate_term", win_data->emulate_term, TRUE, DISABLE_EMPTY_STR); #endif win_data->VTE_CJK_WIDTH = check_integer_value( keyfile, "main", "VTE_CJK_WIDTH", win_data->VTE_CJK_WIDTH, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); if (win_data->geometry == NULL) win_data->geometry = check_string_value(keyfile, "main", "geometry", win_data->geometry, TRUE, ENABLE_EMPTY_STR); win_data->page_width = check_integer_value( keyfile, "page", "page_width", win_data->page_width, DISABLE_EMPTY_STR, 0, DISABLE_ZERO, CHECK_MIN, 1, NO_CHECK_MAX, 0); gint show_tabs_bar = check_integer_value( keyfile, "page", "show_tabs_bar", 2, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); switch (show_tabs_bar) { case 0: win_data->show_tabs_bar = FORCE_OFF; break; case 1: win_data->show_tabs_bar = FORCE_ON; break; default: win_data->show_tabs_bar = AUTOMATIC; break; } // g_debug("Get show_tabs_bar = %d, win_data->show_tabs_bar = %d", // show_tabs_bar, win_data->show_tabs_bar); win_data->tabs_bar_position = check_boolean_value(keyfile, "page", "tabs_bar_position", win_data->tabs_bar_position); win_data->fill_tabs_bar = check_boolean_value(keyfile, "page", "fill_tabs_bar", win_data->fill_tabs_bar); win_data->page_name = check_string_value(keyfile, "page", "page_name", win_data->page_name, TRUE, DISABLE_EMPTY_STR); win_data->page_names = check_string_value(keyfile, "page", "page_names", win_data->page_names, TRUE, ENABLE_EMPTY_STR); win_data->reuse_page_names = check_boolean_value(keyfile, "page", "reuse_page_names", win_data->reuse_page_names); win_data->page_shows_number = check_boolean_value(keyfile, "page", "page_shows_number", win_data->page_shows_number); win_data->page_shows_current_cmdline = check_boolean_value(keyfile, "page", "page_shows_current_cmdline", win_data->page_shows_current_cmdline); win_data->page_shows_window_title = check_boolean_value(keyfile, "page", "page_shows_window_title", win_data->page_shows_window_title); win_data->page_shows_current_dir = check_boolean_value(keyfile, "page", "page_shows_current_dir", win_data->page_shows_current_dir); win_data->check_root_privileges = check_boolean_value(keyfile, "page", "check_root_privileges", win_data->check_root_privileges); win_data->page_shows_encoding = check_boolean_value(keyfile, "page", "page_shows_encoding", win_data->page_shows_encoding); win_data->bold_current_page_name = check_boolean_value(keyfile, "page", "bold_current_page_name", win_data->bold_current_page_name); win_data->bold_action_page_name = check_boolean_value(keyfile, "page", "bold_action_page_name", win_data->bold_action_page_name); win_data->window_title_shows_current_page = check_boolean_value(keyfile, "page", "window_title_shows_current_page", win_data->window_title_shows_current_page); win_data->window_title_append_package_name = check_boolean_value(keyfile, "page", "window_title_append_package_name", win_data->window_title_append_package_name); win_data->show_close_button_on_tab = check_boolean_value(keyfile, "page", "show_close_button_on_tab", win_data->show_close_button_on_tab); win_data->show_close_button_on_all_tabs = check_boolean_value(keyfile, "page", "show_close_button_on_all_tabs", win_data->show_close_button_on_all_tabs); win_data->use_color_page = check_boolean_value( keyfile, "page", "use_color_page", win_data->use_color_page); for (i=0; iuser_page_color[i] = check_string_value(keyfile, "page", page_color[i].name, win_data->user_page_color[i], TRUE, DISABLE_EMPTY_STR); // g_debug("Key Value: Shift=%x, NumLock=%x, Control=%x, Mod1=%x," // "Mod2=%x, Mod3=%x, Mod4=%x, Mod5=%x\n", // GDK_SHIFT_MASK, GDK_LOCK_MASK, GDK_CONTROL_MASK, GDK_MOD1_MASK, // GDK_MOD2_MASK, GDK_MOD3_MASK, GDK_MOD4_MASK, GDK_MOD5_MASK); gchar *value = NULL; for (i=0; iuser_keys[i].value, win_data->user_keys[i].value); value = g_key_file_get_value(keyfile, "key", system_keys[i].name, NULL); // value = check_string_value(keyfile, "key", system_keys[i].name, // g_strdup(win_data->user_keys[i].value), ENABLE_EMPTY_STR); // g_debug("Get %s (%p) from g_key_file_get_value()...", value, value); convert_string_to_user_key(i, value, win_data); } for (i=0; iuser_regex[i] = check_string_value(keyfile, "command", regex_name[i], NULL, TRUE, DISABLE_EMPTY_STR); // gchar *regex_str = convert_escape_sequence_to_string(win_data->user_regex[i]); // g_debug("get_user_settings: Got win_data->user_regex[%d] = %s", i, regex_str); // g_free(regex_str); } if (win_data->user_regex[REGEX_USERNAME] || win_data->user_regex[REGEX_PASSWORD] || win_data->user_regex[REGEX_HOSTNAME] || win_data->user_regex[REGEX_ADDRESS_BODY] || win_data->user_regex[REGEX_ADDRESS_END]) { gchar *username = (win_data->user_regex[REGEX_USERNAME] == NULL)? USERNAME: win_data->user_regex[REGEX_USERNAME]; gchar *password = (win_data->user_regex[REGEX_PASSWORD] == NULL)? PASSWORD: win_data->user_regex[REGEX_PASSWORD]; gchar *hostname = (win_data->user_regex[REGEX_HOSTNAME] == NULL)? HOSTNAME: win_data->user_regex[REGEX_HOSTNAME]; gchar *address_body = (win_data->user_regex[REGEX_ADDRESS_BODY] == NULL)? ADDRESS_BODY: win_data->user_regex[REGEX_ADDRESS_BODY]; gchar *address_end = (win_data->user_regex[REGEX_ADDRESS_END] == NULL)? ADDRESS_BODY: win_data->user_regex[REGEX_ADDRESS_END]; // WWW gchar *regex_str = g_strdup_printf("[Hh][Tt][Tt][Pp][Ss]?://(%s%s@)?%s%s(/%s%s)?/*", username, password, hostname, PORT, address_body, address_end); win_data->user_command[TAG_WWW].match_regex = convert_escape_sequence_from_string(regex_str); g_free(regex_str); // FTP regex_str = g_strdup_printf("[Ff][Tt][Pp][Ss]?://(%s%s@)?%s%s(/%s%s)?/*", username, password, hostname, PORT, address_body, address_end); win_data->user_command[TAG_FTP].match_regex = convert_escape_sequence_from_string(regex_str); g_free(regex_str); // FILE if (win_data->user_regex[REGEX_ADDRESS_BODY] || win_data->user_regex[REGEX_ADDRESS_END]) { regex_str = g_strdup_printf("[Ff][Ii][Ll][Ee]://%s%s", address_body, address_end); win_data->user_command[TAG_FILE].match_regex = convert_escape_sequence_from_string(regex_str); g_free(regex_str); } // MAIL if (win_data->user_regex[REGEX_USERNAME] || win_data->user_regex[REGEX_HOSTNAME]) { regex_str = g_strdup_printf("([Mm][Aa][Ii][Ll][Tt][Oo]:)?%s@%s", username, hostname); win_data->user_command[TAG_MAIL].match_regex = convert_escape_sequence_from_string(regex_str); g_free(regex_str); } } // for (i=0; iuser_command[i].match_regex); // g_debug("get_user_settings: Got win_data->user_command[%d].match_regex = %s", i, regex_str); // g_free(regex_str); // } for (i=0; iuser_command[i].command = check_string_value(keyfile, "command", command[i].name, win_data->user_command[i].command, TRUE, DISABLE_EMPTY_STR); win_data->user_command[i].method = check_integer_value( keyfile, "command", command[i].method_name, win_data->user_command[i].method, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); win_data->user_command[i].environ = check_string_value(keyfile, "command", command[i].environ_name, win_data->user_command[i].environ, TRUE, DISABLE_EMPTY_STR); win_data->user_command[i].VTE_CJK_WIDTH = check_integer_value( keyfile, "command", command[i].VTE_CJK_WIDTH_name, win_data->user_command[i].VTE_CJK_WIDTH, DISABLE_EMPTY_STR, 0, ENABLE_ZERO, CHECK_MIN, 0, CHECK_MAX, 2); win_data->user_command[i].locale = check_string_value(keyfile, "command", command[i].locale_name, win_data->user_command[i].locale, TRUE, DISABLE_EMPTY_STR); // g_debug("command[i].name = %s (%d)", // win_data->user_command[i].command, win_data->user_command[i].method); gchar *match_regex = check_string_value(keyfile, "command", command[i].match_regex_name, NULL, TRUE, DISABLE_EMPTY_STR); win_data->user_command[i].match_regex_orig = convert_escape_sequence_from_string(match_regex); g_free(match_regex); // g_debug("command[%d].match_regex_orig = %s", i, win_data->user_command[i].match_regex_orig); } color_theme_str = check_string_value(keyfile, "color", "theme", NULL, FALSE, ENABLE_EMPTY_STR); // g_debug("get_user_settings: Got color_theme_str = %s", color_theme_str); init_user_color(win_data, color_theme_str); win_data->invert_color = check_boolean_value(keyfile, "color", "invert_color", win_data->invert_color); win_data->use_custom_theme = check_boolean_value(keyfile, "color", "custom_theme", win_data->use_custom_theme); #ifdef ENABLE_GDKCOLOR_TO_STRING gchar *color_value; for (i=1; ihave_custom_color = TRUE; gint j; for (j=0; jcustom_color_theme[j].color[i] = tmp_color; //g_debug("win_data->color_value[%d] = %s, " // "win_data->color[%d] = %x, %x, %x, %x", // i, win_data->color_value[i], i, // win_data->color[i].pixel, win_data->color[i].red, // win_data->color[i].green, win_data->color[i].blue ); } } g_free(color_value); } #endif win_data->color_brightness = check_double_value(keyfile, "color", "brightness", win_data->color_brightness, DISABLE_EMPTY_STR, 0, CHECK_MIN, -1, CHECK_MAX, 1); win_data->color_brightness_inactive = check_double_value(keyfile, "color", "inactive_brightness", win_data->color_brightness, ENABLE_EMPTY_STR, -2, CHECK_MIN, -1, CHECK_MAX, 1); } else { profile_is_invalid_dialog(error, win_data); init_user_color(win_data, color_theme_str); } } else { #ifdef FATAL g_message("Can NOT find any profile. Use program defaults."); #else g_warning("Can NOT find any profile. Use program defaults."); #endif init_user_color(win_data, color_theme_str); safe_mode = FALSE; } // Set the LC_MESSAGES // g_debug("get_user_settings(): win_data->runtime_LC_MESSAGES = %s", win_data->runtime_LC_MESSAGES); setlocale(LC_MESSAGES, win_data->runtime_LC_MESSAGES); init_locale_restrict_data(win_data->runtime_LC_MESSAGES); for (i=0; iuser_keys[i].key) { accelerator_parse(system_keys[i].name, win_data->user_keys[i].value, &(win_data->user_keys[i].key), &(win_data->user_keys[i].mods)); // g_debug("Use default key %s, %x(%s), mods = %x.", pagekeys[i].name, // pagekeys[i].key, gdk_keyval_name(pagekeys[i].key), pagekeys[i].mods); } // g_debug("* We'll use the key for %s: %x(%s), mods = %x.", pagekeys[i].name, // pagekeys[i].key, gdk_keyval_name(pagekeys[i].key), pagekeys[i].mods); } // win_data->fullscreen_show_scroll_bar = win_data->show_scroll_bar; for (i=0; iuser_command[i].environ); win_data->user_command[i].environments = split_string(win_data->user_command[i].environ, " ", -1); } // some defaults glong column=0, row=0; get_row_and_column_from_geometry_str(&column, &row, &(win_data->default_column), &(win_data->default_row), win_data->geometry); win_data->default_column = column; win_data->default_row = row; win_data->splited_page_names = split_string(win_data->page_names, " ", -1); #ifdef SAFEMODE if (win_data->splited_page_names==NULL) win_data->splited_page_names = g_strsplit("", " ", -1); #endif win_data->max_page_names_no = 0; #ifdef SAFEMODE if (win_data->splited_page_names) #endif while (win_data->splited_page_names[win_data->max_page_names_no]!=NULL) win_data->max_page_names_no++; if (win_data->color_brightness_inactive < -1) { win_data->dim_text = FALSE; win_data->color_brightness_inactive = -win_data->color_brightness; } // g_debug("win_data->dim_text = %d, win_data->color_brightness = %0.3f, win_data->color_brightness_inactive = %0.3f", // win_data->dim_text, win_data->color_brightness, win_data->color_brightness_inactive); #ifdef ENABLE_RGBA // g_debug("Got win_data->window_opacity_inactive = %1.3f", win_data->window_opacity_inactive); if (win_data->window_opacity_inactive<-1) win_data->window_opacity_inactive = win_data->window_opacity; else win_data->dim_window = TRUE; #endif if ((win_data->scrollback_lines == 0) && (win_data->show_scroll_bar == AUTOMATIC)) win_data->show_scroll_bar = OFF; // g_debug("FINAL: win_data->show_scroll_bar = %d", win_data->show_scroll_bar); if (win_data->show_close_button_on_tab == 0) win_data->show_close_button_on_all_tabs = 0; if (win_data->window_title_shows_current_page == 0) win_data->window_title_append_package_name = 0; GdkRGBA fg_color, bg_color; #ifdef ENABLE_GDKCOLOR_TO_STRING GdkRGBA cursor_color; // g_debug("win_data->foreground_color = %s, win_data->background_color = %s, win_data->cursor_color_str = %s", // win_data->foreground_color, win_data->background_color, win_data->cursor_color_str); // Get the color data from profile... check_color_value ("foreground_color", fg_color_str, &(fg_color), &(system_color_theme[win_data->color_theme_index].color[COLOR-1])); // print_color(COLOR-1, "Get fg_color from profile:", fg_color); check_color_value ("foreground_color", bg_color_str, &(bg_color), &(system_color_theme[win_data->color_theme_index].color[0])); // print_color(0, "Get bg_color from profile:", bg_color); dirty_gdk_color_parse (DEFAULT_CURSOR_COLOR, &(cursor_color)); check_color_value ("cursor_color", cursor_color_str, &(win_data->cursor_color), &(cursor_color)); // print_color(-1, "Get cursor_color from profile:", win_data->cursor_color); #endif g_free(fg_color_str); g_free(bg_color_str); g_free(color_theme_str); g_free(cursor_color_str); #ifdef ENABLE_GDKCOLOR_TO_STRING // if the fg_color == bg_color, revert to the default color. if (! compare_color(&(fg_color), &(bg_color))) { // print_color (-1, "invild fg_color = color; fg_color", fg_color); // print_color (-1. "invild bg_color = color; bg_color", fg_color); dirty_gdk_color_parse (DEFAULT_FOREGROUND_COLOR, &(fg_color)); dirty_gdk_color_parse (DEFAULT_BACKGROUND_COLOR, &(bg_color)); } #endif // check if using custom fg_color if (compare_color(&(fg_color), &(system_color_theme[win_data->color_theme_index].color[COLOR-1]))) { // print_color(-1, "get_user_settings(): fg_color", fg_color); // print_color(-1, "get_user_settings(): win_data->color_orig[COLOR-1]", // win_data->color_orig[COLOR-1]); win_data->have_custom_color = TRUE; for (i=0; icustom_color_theme[i].color[COLOR-1] = fg_color; } // check if using custom bg_color if (compare_color(&(bg_color), &(system_color_theme[win_data->color_theme_index].color[0]))) { // print_color(-1, "get_user_settings(): bg_color", bg_color); // print_color(-1, "get_user_settings(): win_data->color_orig[0]", // win_data->color_orig[0]); win_data->have_custom_color = TRUE; for (i=0; icustom_color_theme[i].color[0] = bg_color; } // print_color(-1, "get_user_settings(): win_data->fg_color : ", win_data->fg_color); // print_color(-1, "get_user_settings(): win_data->bg_color", win_data->bg_color); #ifdef ENABLE_GDKCOLOR_TO_STRING // check if win_data->cursor_color == win_data->bg_color if ((win_data->invert_color && (compare_color(&(fg_color), &(win_data->cursor_color)) == FALSE)) || ((win_data->invert_color == FALSE) && (compare_color(&(bg_color), &(win_data->cursor_color)) == FALSE))) win_data->custom_cursor_color = FALSE; #endif generate_all_color_datas(win_data); // g_debug("get_user_settings(): win_data->VTE_CJK_WIDTH_STR = %s", win_data->VTE_CJK_WIDTH_STR); if ((win_data->VTE_CJK_WIDTH_STR == NULL) || (win_data->VTE_CJK_WIDTH_STR[0] == '\0')) { g_free(win_data->VTE_CJK_WIDTH_STR); win_data->VTE_CJK_WIDTH_STR = g_strdup(get_VTE_CJK_WIDTH_str(win_data->VTE_CJK_WIDTH)); } #ifdef ENABLE_RGBA // If the system supports rgba, enable transparent background by default // g_debug ("get win_data->use_rgba = %d", win_data->use_rgba); if (win_data->use_rgba > -1) { win_data->use_rgba = win_data->use_rgba_orig; // g_debug("use_rgba_orig = %d", win_data->use_rgba_orig); init_rgba(win_data); } if (win_data->transparent_window==2) win_data->transparent_window = (win_data->use_rgba==-1)? 1: 0; #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) if (win_data->transparent_background==2) win_data->transparent_background = (win_data->use_rgba==-1)? 1 :0; // g_debug("win_data->transparent_window = %d", win_data->transparent_window); // g_debug("win_data->transparent_background = %d", win_data->transparent_background); # endif set_window_opacity (NULL, 0, win_data->window_opacity, win_data); #endif // win_data->default_encoding_str will be init in add_menuitem_to_encoding_sub_menu() when creating window // get the default locale from environment // win_data->default_locale = get_default_locale(); // // g_debug("win_data->default_VTE_CJK_WIDTH = %d in get_user_settings()", win_data->default_VTE_CJK_WIDTH); // if (win_data->default_VTE_CJK_WIDTH) // win_data->system_VTE_CJK_WIDTH = win_data->default_VTE_CJK_WIDTH; // else // win_data->system_VTE_CJK_WIDTH = get_default_VTE_CJK_WIDTH(); if (win_data->execute_command_whitelists==NULL) { win_data->execute_command_whitelists = split_string(win_data->execute_command_whitelist, " ", -1); } win_data->foreground_program_whitelists = split_string(win_data->foreground_program_whitelist, " ", -1); win_data->background_program_whitelists = split_string(win_data->background_program_whitelist, " ", -1); win_data->paste_texts_whitelists = split_string(win_data->paste_texts_whitelist, " ", -1); if (win_data->font_resize_ratio <=1) win_data->font_resize_ratio = 0; if (win_data->window_resize_ratio <= 1) win_data->window_resize_ratio = 0; g_key_file_free(keyfile); // the win_data->profile will be free when close window // g_free(win_data->profile); if (win_data->specified_profile) { g_free(win_data->profile); win_data->profile = win_data->specified_profile; win_data->specified_profile = NULL; } #ifdef OUT_OF_MEMORY #define g_strdup fake_g_strdup #define g_strdup_printf(...) NULL #define g_strsplit fake_g_strsplit #define g_strsplit_set(x,y,z) NULL #endif } void init_prime_user_datas(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch init_prime_user_datas() with win_data = %p!", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("init_prime_user_datas(): win_data->prime_user_datas_inited = %d", win_data->prime_user_datas_inited); if (win_data->prime_user_datas_inited) return; win_data->prime_user_datas_inited = TRUE; win_data->warned_locale_list = g_string_new(" "); win_data->confirm_to_execute_command = TRUE; win_data->execute_command_in_new_tab = TRUE; // g_debug("init win_data->execute_command_whitelist (%s) for for win_data (%p)!", // win_data->execute_command_whitelist, win_data); win_data->execute_command_whitelist = g_strdup(""); win_data->default_locale = g_strdup(""); } void get_prime_user_settings(GKeyFile *keyfile, struct Window *win_data, gchar *encoding) { #ifdef DETAIL g_debug("! Launch get_prime_user_settings() with keyfile = %p, win_data = %p, encoding = %s!", keyfile, win_data, encoding); #endif #ifdef SAFEMODE if ((keyfile==NULL) || (win_data==NULL)) return; #endif if (win_data->prime_user_settings_inited) return; win_data->prime_user_settings_inited = TRUE; // Check the profile version check_profile_version (keyfile, win_data); // Check if confirm_to_execute_command win_data->confirm_to_execute_command = check_boolean_value(keyfile, "main", "confirm_to_execute_command", win_data->confirm_to_execute_command); win_data->execute_command_whitelist = check_string_value(keyfile, "main", "execute_command_whitelist", win_data->execute_command_whitelist, TRUE, ENABLE_EMPTY_STR); // g_debug("win_data->execute_command_whitelist for win_data (%p) updated!", win_data); win_data->execute_command_in_new_tab = check_boolean_value(keyfile, "main", "execute_command_in_new_tab", win_data->execute_command_in_new_tab); // g_debug("ReGet new win_data->default_locale with original value: %s...", win_data->default_locale); win_data->default_locale = check_string_value(keyfile, "main", "default_locale", win_data->default_locale, TRUE, DISABLE_EMPTY_STR); // g_debug("win_data->default_locale = %s", win_data->default_locale); #ifdef SAFEMODE if ( win_data->default_locale && (win_data->default_locale[0]!='\0')) #else if (win_data->default_locale[0]!='\0') #endif { gchar *encoding = get_encoding_from_locale(win_data->default_locale); if (encoding) { g_free(win_data->default_encoding); win_data->default_encoding = encoding; g_free(win_data->runtime_LC_MESSAGES); win_data->runtime_LC_MESSAGES = g_strdup(win_data->default_locale); // g_debug("get_prime_user_settings(): set win_data->runtime_LC_MESSAGES = %s", // win_data->runtime_LC_MESSAGES); } else if (check_and_add_locale_to_warned_locale_list(win_data, win_data->default_locale)) create_invalid_locale_error_message(win_data->default_locale); setlocale(LC_CTYPE, init_LC_CTYPE); } } gboolean check_boolean_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, const gboolean default_value) { #ifdef DETAIL g_debug("! Launch check_boolean_value() with keyfile = %p, group_name = %s, key = %s, default_value = %d", keyfile, group_name, key ,default_value); #endif #ifdef SAFEMODE if ((keyfile==NULL) || (group_name==NULL) || (key==NULL)) return FALSE; #endif gchar *value = g_key_file_get_value(keyfile, group_name, key, NULL); gboolean setting; if (value) { if (value[0]!='\0') setting = g_key_file_get_boolean(keyfile, group_name, key, NULL); else setting = default_value; g_free(value); } else setting = default_value; // g_debug("Got key value \"%s = %d\"", key, setting); return setting; } gdouble check_double_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, const gdouble default_value, Check_Empty enable_empty, gdouble empty_value, Check_Min check_min, gdouble min, Check_Max check_max, gdouble max) { #ifdef DETAIL g_debug("! Launch check_double_value() with keyfile = %p, group_name = %s, key = %s, default_value = %f", keyfile, group_name, key, default_value); #endif #ifdef SAFEMODE if ((keyfile==NULL) || (group_name==NULL) || (key==NULL)) return 0; #endif gchar *value = g_key_file_get_value(keyfile, group_name, key, NULL); gdouble setting; if (value) { if (value[0]!='\0') setting = g_key_file_get_double(keyfile, group_name, key, NULL); else { // g_debug("enable_empty = %d, empty_value = %1.3f, default_value = %1.3f", // enable_empty, empty_value, default_value); if (enable_empty) { setting = empty_value; goto FINISH; } else setting = default_value; } } else setting = default_value; if (check_min) if (setting < min) setting = default_value; if (check_max) if (setting > max) setting = default_value; FINISH: g_free(value); // g_debug("Got key value \"%s = %1.3f\"", key, setting); return setting; } // enable_empty -> True: 0, False: default glong check_integer_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, const glong default_value, Check_Empty enable_empty, glong empty_value, Check_Zero enable_zero, Check_Min check_min, glong min, Check_Max check_max, glong max) { #ifdef DETAIL g_debug("! Launch check_integer_value() with keyfile = %p, group_name = %s, key = %s, " "default_value = %ld, enable_empty = %d, enable_zero = %d, " "check_min = %d, min = %ld, check_max = %d, max = %ld", keyfile, group_name, key, default_value, enable_empty, enable_zero, check_min, min, check_max, max); #endif #ifdef SAFEMODE if ((keyfile==NULL) || (group_name==NULL) || (key==NULL)) return 0; #endif gchar *value = g_key_file_get_value(keyfile, group_name, key, NULL); gint setting; if (value) { if (value[0]!='\0') setting = g_key_file_get_integer(keyfile, group_name, key, NULL); else { if (enable_empty) { setting = empty_value; goto FINISH; } else setting = default_value; } } else setting = default_value; if (setting==0 && (! enable_zero)) setting = default_value; if (check_min) if (setting < min) setting = default_value; if (check_max) if (setting > max) setting = default_value; FINISH: g_free(value); // g_debug("Got key value \"%s = %d\"", key, setting); return setting; } // original_value will be free() in check_string_value() // The returned string should be freed when no longer needed. gchar *check_string_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, gchar *original_value, gboolean free_original_value, Check_Empty enable_empty) { #ifdef DETAIL g_debug("! Launch check_string_value() with keyfile = %p, group_name = %s, " "key = %s, original_value = %s (%p), enable_empty = %d", keyfile, group_name, key, original_value, original_value, enable_empty); #endif #ifdef SAFEMODE if ((keyfile==NULL) || (group_name==NULL) || (key==NULL)) return NULL; #endif gchar *setting = g_key_file_get_value(keyfile, group_name, key, NULL); // g_debug("check_string_value() with setting = %s (%p)", setting, setting); if (setting && (setting[0] == '\0') && (enable_empty==DISABLE_EMPTY_STR)) { g_free(setting); setting = NULL; } if ((setting == NULL) && (original_value)) setting = g_strdup(original_value); #ifndef UNIT_TEST if (free_original_value) g_free(original_value); #endif // g_debug("Got key value \"%s = %s\"", key, setting); return setting; } #ifdef ENABLE_GDKCOLOR_TO_STRING gboolean check_color_value(const gchar *key_name, const gchar *color_name, GdkRGBA *color, const GdkRGBA *default_color) { #ifdef DETAIL g_debug("! Launch check_color_value() with key_name = %s, color_name = %s, color = %p", key_name, color_name, color); #endif #ifdef SAFEMODE if (color_name==NULL) return FALSE; #endif if ((color_name) && (color_name[0]!='\0')) { if (dirty_gdk_color_parse(color_name, color)) { // print_color(-1, "1. check_color_value():", *color); return TRUE; } } if (color && default_color) { *color = *default_color; // print_color(-1, "2. check_color_value():", *color); return TRUE; } #ifdef UNIT_TEST g_message("\"%s = %s\" is not a valid color value! Please check!", key_name, color_name); #else g_warning("\"%s = %s\" is not a valid color value! Please check!", key_name, color_name); #endif return FALSE; } #endif // return TRUE if 'key_name' is a valid key or NULL; or it will return FALSE. gboolean accelerator_parse (const gchar *key_name, const gchar *key_value, guint *key, guint *mods) { #ifdef DETAIL if (key && mods) g_debug("! Launch accelerator_parse() with key_name = %s, key_value = %s, key = %d, mods = %d", key_name, key_value, *key, *mods); else g_debug("! Launch accelerator_parse() with key_name = %s, key_value = %s, key = (%p), mods = (%p)", key_name, key_value, key, mods); #endif #ifdef SAFEMODE if ((key_name==NULL) || (key_value==NULL)) return FALSE; #endif // key_value example: "Ctrl+Shift Home" gchar **values = NULL, **functions = NULL; gint i=0, j; gint tempmods=0; gint tempkey=0; gboolean response = FALSE; // g_debug ("Ken Value = %s",key_value); // g_debug ("Checking '%s' is \"\" or NULL...%d, %d, %d", // key_value, key_value!=NULL, strlen(key_value)>0, g_ascii_strcasecmp(key_value, "NULL")); // got the Function key first // if ( key_value && (key_value[0]!='\0') && ( compare_strings(key_value, "NULL", FALSE))) if (key_value && (key_value[0]!='\0')) { // g_debug ("Start to checking '%s' in accelerator_parse()...", key_value); values = split_string(key_value, " ", -1); // split in to "Ctrl+Shift" and "Home" now... if (values) { functions = split_string(values[0], "+", -1); // got the function key ("Ctrl+Shift" for example) #ifdef SAFEMODE if (functions) { #endif while (functions[i]!=NULL) { for (j=0; j=GDK_KEY_a) && (tempkey<=GDK_KEY_z)) tempkey=tempkey-GDK_KEY_a+GDK_KEY_A; *key=tempkey; // suppose that CapsLock & NumLock always on // *mods=(tempmods|GDK_LOCK_MASK|GDK_MOD2_MASK)&GDK_MODIFIER_MASK; *mods = tempmods | DUD_MASK; response = TRUE; goto FINISH; } } // else // { // // not a valid key, no space in key_name // g_warning("%s for [%s] is not a valid key. There is no SPACE in it.", // key_value, key_name); // goto FINISH; // } } goto FINISH; } else { // NULL // g_message("We Got a NULL Key (%s)!\n", key_value); #ifdef SAFEMODE if ((key==NULL) || (mods==NULL)) goto FINISH; #endif *key=GDK_KEY_VoidSymbol; *mods=-1; response = TRUE; } FINISH: g_strfreev(values); g_strfreev(functions); return response; } // It is OK if widget=NULL and win_data=NULL here. GString *save_user_settings(GtkWidget *widget, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch save_user_settings()"); #endif struct Page *page_data = NULL; gint i; #ifdef SAFEMODE if (win_data && (win_data->current_vte)) #else if (win_data) #endif { page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return NULL; #endif } else { // For -p command line option win_data = g_new0(struct Window, 1); #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif page_data = g_new0(struct Page, 1); #ifdef SAFEMODE if (page_data==NULL) { // g_debug("save_user_settings(): Trying to free win_data (%p)", win_data); g_free(win_data); return NULL; } #endif // g_debug("Got win_data = %p, page_data = %p", win_data, page_data); init_window_parameters(win_data); init_user_keys(win_data); init_page_color_data(); init_key_bindings_name_and_group(); init_locale_restrict_data(NULL); init_command(); init_user_command(win_data); init_colors(); init_user_color(win_data, ""); } gchar *lc_numeric = g_strdup((char*)g_getenv("LC_NUMERIC")); setlocale(LC_NUMERIC, "C"); long column = 0, row = 0; GString *contents = g_string_new("[main]\n\n"); g_string_append_printf(contents,"# Auto save settings when closing window.\n" "auto_save = %d\n\n", win_data->auto_save); g_string_append_printf(contents,"# The version of this profile's format. DO NOT EDIT IT!\n" "version = %s\n\n", PROFILE_FORMAT_VERSION); if (menu_active_window) { g_string_append_printf(contents,"# The default font name of vte terminal.\n" "font_name = %s\n\n", page_data->font_name); column = vte_terminal_get_column_count(VTE_TERMINAL(page_data->vte)); g_string_append_printf(contents,"# The default column of vte terminal.\n" "column = %ld\n\n", column); row = vte_terminal_get_row_count(VTE_TERMINAL(page_data->vte)); g_string_append_printf(contents,"# The default row of vte terminal.\n" "row = %ld\n\n", row); g_string_append_printf(contents,"# Use true opacity in vte box.\n" "# 0: do NOT use rgba, 1: force to use rgba.\n" "# Left it blank will enable it automatically\n" "# if the window manager were composited.\n" "# Disable it will disable transparent_window, too.\n"); if (win_data->use_rgba_orig == 2) g_string_append(contents, "use_rgba = \n\n"); else g_string_append_printf(contents, "use_rgba = %d\n\n", win_data->use_rgba_orig); } else { g_string_append_printf(contents,"# The default font name of vte terminal.\n" "font_name = %s\n\n", SYSTEM_FONT_NAME); column = SYSTEM_COLUMN; g_string_append_printf(contents,"# The default column of vte terminal.\n" "column = %ld\n\n", column); row = SYSTEM_ROW; g_string_append_printf(contents,"# The default row of vte terminal.\n" "row = %ld\n\n", row); g_string_append_printf(contents,"# Use true opacity in vte box.\n" "# 0: do NOT use rgba, 1: force to use rgba.\n" "# Left it blank will enable it automatically\n" "# if the window manager were composited.\n" "# Disable it will disable transparent_window, too.\n" "use_rgba = \n\n"); } #ifdef USE_GTK2_GEOMETRY_METHOD g_string_append_printf(contents,"# Start up with fullscreen.\n" "fullscreen = %d\n\n", win_data->true_fullscreen); #endif #ifdef USE_GTK3_GEOMETRY_METHOD g_string_append_printf(contents,"# Start up with fullscreen.\n" "fullscreen = %d\n\n", (win_data->window_status==WINDOW_FULL_SCREEN)); #endif #ifdef ENABLE_RGBA g_string_append_printf(contents,"# Transparent window. Only enabled when the window manager were composited.\n" "transparent_window = %d\n\n", (win_data->transparent_window==1)); g_string_append_printf(contents,"# The opacity of transparent window.\n" "window_opacity = %1.3f\n\n", win_data->window_opacity); g_string_append_printf(contents,"# The opacity of transparent window when inactive.\n" "# Left it blank to disable this feature.\n"); if (win_data->dim_window) g_string_append_printf( contents,"window_opacity_inactive = %1.3f\n\n", win_data->window_opacity_inactive); else g_string_append(contents,"window_opacity_inactive = \n\n"); #endif #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) g_string_append_printf(contents,"# Use transparent background.\n" "# It will use true transparent if the window manager were composited.\n" "transparent_background = %d\n\n", (win_data->transparent_background==1)); g_string_append_printf(contents,"# The saturation of transparent background.\n" "background_saturation = %1.3f\n\n", win_data->background_saturation); g_string_append_printf(contents,"# Scroll the background image along with the text.\n" "scroll_background = %d\n\n", win_data->scroll_background); if (compare_strings (win_data->background_image, NULL_DEVICE, TRUE)) g_string_append_printf(contents,"# Sets a background image.\n" "background_image = %s\n\n", win_data->background_image); else g_string_append(contents,"# Sets a background image.\n" "background_image = \n\n"); #endif g_string_append_printf(contents,"# Confirm to execute command with -e/-x/--execute option.\n" "confirm_to_execute_command = %d\n\n", win_data->confirm_to_execute_command); g_string_append_printf(contents,"# Don't need to confirm for executing a program if it's in the whitelist,\n" "# separate with .\n" "execute_command_whitelist = %s\n\n", win_data->execute_command_whitelist); g_string_append_printf(contents,"# Launching executed command in a new tab instead of opening a new window.\n" "execute_command_in_new_tab = %d\n\n", win_data->execute_command_in_new_tab); g_string_append_printf(contents,"# If a program is running on foreground,\n" "# Don't need to confirm for terminating it if it's in the whitelist,\n" "# separate with .\n" "foreground_program_whitelist = %s\n\n", win_data->foreground_program_whitelist); g_string_append_printf(contents,"# If a program is running in background,\n" "# Don't need to confirm for terminating it if it's in the whitelist,\n" "# separate with .\n" "background_program_whitelist = %s\n\n", win_data->background_program_whitelist); g_string_append_printf(contents,"# Confirm before pasting texts to vte terminal.\n" "confirm_to_paste = %d\n\n", win_data->confirm_to_paste); g_string_append_printf(contents,"# If the program is running on foreground,,\n" "# Don't need to confirm for pasting texts to it if it's in the whitelist,\n" "# separate with .\n" "paste_texts_whitelist = %s\n\n", win_data->paste_texts_whitelist); g_string_append_printf(contents,"# Confirm to close multi tabs.\n" "confirm_to_close_multi_tabs = %d\n\n", win_data->confirm_to_close_multi_tabs); g_string_append_printf(contents,"# Confirm to kill running command when exiting.\n" "confirm_to_kill_running_command = %d\n\n", win_data->confirm_to_kill_running_command); g_string_append_printf(contents,"# Shows [Transparent Background], [Background Saturation]\n" "# [Transparent Window] and [Window Opacity] on right click menu.\n" "show_background_menu = %d\n\n", win_data->show_background_menu); g_string_append_printf(contents,"# Shows [Change the foreground color]\n" "# and [Change the background color] on right click menu.\n" "show_color_selection_menu = %d\n\n", win_data->show_color_selection_menu); #ifdef ENABLE_GDKCOLOR_TO_STRING g_string_append_printf(contents,"# The normal text color used in vte terminal.\n" "# You may use black, #000000 or #000000000000 here.\n"); if (compare_color(&(win_data->custom_color_theme[win_data->color_theme_index].color[COLOR-1]), &(system_color_theme[win_data->color_theme_index].color[COLOR-1]))) { gchar *color_str = dirty_gdk_rgba_to_string(&(win_data->custom_color_theme[win_data->color_theme_index].color[COLOR-1])); g_string_append_printf(contents,"foreground_color = %s\n\n", color_str); g_free (color_str); } else g_string_append(contents,"foreground_color = \n\n"); g_string_append(contents,"# The background color used in vte terminal.\n" "# You may use black, #000000 or #000000000000 here.\n"); if (compare_color(&(win_data->custom_color_theme[win_data->color_theme_index].color[0]), &(system_color_theme[win_data->color_theme_index].color[0]))) { gchar *color_str = dirty_gdk_rgba_to_string(&(win_data->custom_color_theme[win_data->color_theme_index].color[0])); g_string_append_printf(contents,"background_color = %s\n\n", color_str); g_free (color_str); } else g_string_append(contents,"background_color = \n\n"); g_string_append_printf(contents,"# Drawn the text under the cursor with foreground and background colors reversed.\n" "disable_custom_cursor_color = %d\n\n", ! win_data->custom_cursor_color); g_string_append(contents,"# Sets the background color for text which is under the cursor.\n" "# You may use black, #000000 or #000000000000 here.\n"); gchar *color_str = dirty_gdk_rgba_to_string(&(win_data->cursor_color)); g_string_append_printf(contents,"cursor_color = %s\n\n", color_str); g_free (color_str); #endif g_string_append_printf(contents,"# Shows [Increase window size], [Decrease window size],\n" "# [Reset to default font/size] and [Reset to system font/size]\n" "# on right click menu.\n" "show_resize_menu = %d\n\n", win_data->show_resize_menu); #ifndef vte_terminal_set_font_from_string_full g_string_append_printf(contents,"# Using antialias when showing fonts.\n" "# 0: default. 1: force enable. 2: force disable.\n" "font_anti_alias = %d\n\n", win_data->font_anti_alias); #endif g_string_append_printf(contents,"# The ratio when resizing font via function key <+> and <->.\n" "# 0: the font size is +/- 1 when resizing.\n" "font_resize_ratio = %1.3f\n\n", win_data->font_resize_ratio); g_string_append_printf(contents,"# The ratio when resizing window via right click menu.\n" "# 0: the font size is +/- 1 when resizing window.\n" "window_resize_ratio = %1.3f\n\n", win_data->window_resize_ratio); #ifdef ENABLE_SET_WORD_CHARS g_string_append_printf(contents,"# When user double clicks on a text, which character will be selected.\n" "word_chars = %s\n\n", win_data->word_chars); #endif g_string_append_printf(contents,"# The lines of scrollback history. -1 means unlimited (vte >= 0.22.3).\n" "scrollback_lines = %d\n\n", win_data->scrollback_lines); g_string_append(contents,"# Shows scroll_bar or not.\n" "# 0: Never shows the scroll_bar; 1: Always shows the scroll_bar.\n" "# Left it blank: Hide when fullscreen, or scrollback_lines = 0.\n"); switch (win_data->show_scroll_bar) { case FORCE_OFF: g_string_append(contents,"show_scroll_bar = 0\n\n"); break; case FORCE_ON: g_string_append(contents,"show_scroll_bar = 1\n\n"); break; default: g_string_append(contents,"show_scroll_bar =\n\n"); break; } g_string_append_printf(contents,"# The position of scroll_bar.\n" "# 0: scroll_bar is on left; 1: scroll_bar is on right.\n" "scroll_bar_position = %d\n\n", win_data->scroll_bar_position); #ifdef ENABLE_IM_APPEND_MENUITEMS g_string_append_printf(contents,"# Shows input method menu on right click menu.\n" "show_input_method_menu = %d\n\n", win_data->show_input_method_menu); #endif g_string_append_printf(contents,"# Shows change page name menu on right click menu.\n" "show_change_page_name_menu = %d\n\n", win_data->show_change_page_name_menu); g_string_append_printf(contents,"# Shows exit menu on right click menu.\n" "show_exit_menu = %d\n\n", win_data->show_exit_menu); g_string_append_printf(contents,"# Enable hyperlink in vte terminal.\n" "enable_hyperlink = %d\n\n", win_data->enable_hyperlink); g_string_append_printf(contents,"# Sets whether or not the cursor will blink in vte terminal.\n" #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE "# 0: Follow GTK+ settings for cursor blinking.\n" "# 1: Cursor blinks.\n" "# 2: Cursor does not blink.\n" #endif "cursor_blinks = %d\n\n", win_data->cursor_blinks); g_string_append_printf(contents,"# Allow bold text in the terminal.\n" "allow_bold_text = %d\n\n", win_data->allow_bold_text); g_string_append_printf(contents,"# Need to be pressed to open the URL when it's clicked.\n" "open_url_with_ctrl_pressed = %d\n\n", win_data->open_url_with_ctrl_pressed); g_string_append_printf(contents,"# Preese to disable the URL match gregex temporarily.\n" "disable_url_when_ctrl_pressed = %d\n\n", win_data->disable_url_when_ctrl_pressed); g_string_append_printf(contents,"# Shows copy/paste menu on right click menu.\n" "show_copy_paste_menu = %d\n\n", win_data->show_copy_paste_menu); g_string_append_printf(contents,"# Embed the copy/paste menu to the main menu.\n" "embedded_copy_paste_menu = %d\n\n", win_data->embedded_copy_paste_menu); g_string_append_printf(contents,"# Sets whether or not the terminal will beep\n" "# when the child outputs the \"bl\" sequence.\n" "audible_bell = %d\n\n", win_data->audible_bell); #ifdef ENABLE_VISIBLE_BELL g_string_append_printf(contents,"# Sets whether or not the terminal will flash\n" "# when the child outputs the \"bl\" sequence.\n" "visible_bell = %d\n\n", win_data->visible_bell); #endif #ifdef ENABLE_BEEP_SINGAL g_string_append_printf(contents,"# Sets whether or not the window's urgent tag will be set\n" "# when the child outputs the \"bl\" sequence.\n" "urgent_bell = %d\n\n", win_data->urgent_bell); #endif g_string_append_printf(contents,"# Which string the terminal should send to an application\n" "# when the user presses the Delete or Backspace keys.\n" "# 0: VTE_ERASE_AUTO\n" "# 1: VTE_ERASE_ASCII_BACKSPACE\n" "# 2: VTE_ERASE_ASCII_DELETE\n" "# 3: VTE_ERASE_DELETE_SEQUENCE\n" #ifdef ENABLE_VTE_ERASE_TTY "# 4: VTE_ERASE_TTY\n" #endif "erase_binding = %d\n\n", win_data->erase_binding); #ifdef ENABLE_CURSOR_SHAPE g_string_append_printf(contents,"# Sets the shape of the cursor drawn.\n" "# 0: VTE_CURSOR_SHAPE_BLOCK\n" "# 1: VTE_CURSOR_SHAPE_IBEAM\n" "# 2: VTE_CURSOR_SHAPE_UNDERLINE\n" "cursor_shape = %d\n\n", win_data->cursor_shape); #endif g_string_append_printf(contents,"# The default locale used when initing a vte terminal.\n" "# You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n"); g_string_append_printf(contents,"default_locale = %s\n\n", win_data->default_locale); g_string_append_printf(contents,"# The locales list on right click menu, separate with .\n" "# You may use \"ja_JP\", \"ja_JP.EUC-JP\", or \"ja_JP.UTF-8\" here.\n" "# You may want to use \"UTF-8\" here if you have no locale data installed.\n" "# Left it blank will disable locale and encoding select menu items.\n" "locales_list = %s\n\n", win_data->locales_list); g_string_append_printf(contents,"# The default shell (for example: /bin/sh) used in LilyTerm.\n" "# The setting here will overwrite the SHELL environment.\n"); if (win_data->default_shell) g_string_append_printf(contents, "default_shell = %s\n\n", win_data->default_shell); else g_string_append(contents, "default_shell = \n\n"); #ifdef ENABLE_SET_EMULATION g_string_append_printf(contents,"# Sets what type of terminal attempts to emulate.\n" "# It will also set the TERM environment.\n" "# Unless you are interested in this feature, always use \"xterm\".\n" "emulate_term = %s\n\n", win_data->emulate_term); #endif g_string_append_printf(contents,"# The environment 'VTE_CJK_WIDTH' used when initing a vte terminal.\n" "# 0: get via environment; 1: use narrow ideograph; 2: use wide ideograph.\n" "VTE_CJK_WIDTH = %d\n\n", win_data->VTE_CJK_WIDTH); g_string_append(contents,"# The geometry of window when starting.\n" "# A reasonable example value is \"80x24+0+0\",\n" "# witch means \"WIDTH x HEIGHT {+-} XOFFSET {+-} YOFFSET\", and NO SPACE in it.\n" "# Notice that it will overwrite the default column and row settings above.\n"); if ((win_data->geometry) && (win_data->geometry[0]!='\0')) { gint xoffset = 0, yoffset = 0; gtk_window_get_position (GTK_WINDOW(win_data->window), &xoffset, &yoffset); // g_debug("Geto window position = %+d, %+d", xoffset, yoffset); g_string_append_printf(contents,"geometry = %ldx%ld%+d%+d\n\n", column, row, xoffset, yoffset); } else g_string_append(contents,"geometry = \n\n"); g_string_append_printf(contents,"\n"); g_string_append_printf(contents,"[page]\n\n"); g_string_append_printf(contents,"# The max character width of page name.\n" "page_width = %d\n\n", win_data->page_width); g_string_append_printf(contents,"# Show the tabs bar or not.\n" "# 0: Never shows the tabs ; 1: Always shows the tabs bar.\n" "# Left it blank: Hide when fullscreen, or tabs number = 1.\n"); switch (win_data->show_tabs_bar) { case FORCE_OFF: g_string_append(contents, "show_tabs_bar = 0\n\n"); break; case FORCE_ON: g_string_append(contents, "show_tabs_bar = 1\n\n"); break; default: g_string_append(contents, "show_tabs_bar =\n\n"); break; } g_string_append_printf(contents,"# The position of tabs bar.\n" "# 0: Top, 1: bottom.\n" "tabs_bar_position = %d\n\n", win_data->tabs_bar_position); g_string_append_printf(contents,"# The label of tabs will fill the tab bar.\n" "fill_tabs_bar = %d\n\n", win_data->fill_tabs_bar); g_string_append_printf(contents,"# The page name used for a new page.\n" "page_name = %s\n\n", win_data->page_name); g_string_append_printf(contents,"# The page names list used for new pages, separate with .\n" "page_names = %s\n\n", win_data->page_names); g_string_append_printf(contents,"# Reuse the page name in the page names list.\n" "reuse_page_names = %d\n\n", win_data->reuse_page_names); g_string_append_printf(contents,"# Shows a (number no) on the page name.\n" "page_shows_number = %d\n\n", win_data->page_shows_number); g_string_append_printf(contents,"# Shows the foreground running command on the page name.\n" "page_shows_current_cmdline = %d\n\n", win_data->page_shows_current_cmdline); g_string_append_printf(contents,"# Shows the terminal's idea of what the window's title should be.\n" "page_shows_window_title = %d\n\n", win_data->page_shows_window_title); g_string_append_printf(contents,"# Shows current directory on the page name.\n" "page_shows_current_dir = %d\n\n", win_data->page_shows_current_dir); g_string_append_printf(contents,"# Check if the running command is root privileges.\n" "check_root_privileges = %d\n\n", win_data->check_root_privileges); g_string_append_printf(contents,"# Shows current encoding on the page name.\n" "page_shows_encoding = %d\n\n", win_data->page_shows_encoding); g_string_append_printf(contents,"# Bold the text of current page name.\n" "bold_current_page_name = %d\n\n", win_data->bold_current_page_name); g_string_append_printf(contents,"# Bold the text of action page name.\n" "bold_action_page_name = %d\n\n", win_data->bold_action_page_name); g_string_append_printf(contents,"# Shows the page name of current page on window title.\n" "window_title_shows_current_page = %d\n\n", win_data->window_title_shows_current_page); g_string_append_printf(contents,"# Append a package name (- LilyTerm) to the window title.\n" "window_title_append_package_name = %d\n\n", win_data->window_title_append_package_name); g_string_append_printf(contents,"# Shows a close button [X] on current tab.\n" "show_close_button_on_tab = %d\n\n", win_data->show_close_button_on_tab); g_string_append_printf(contents,"# Shows a close button [X] on all tabs.\n" "show_close_button_on_all_tabs = %d\n\n", win_data->show_close_button_on_all_tabs); g_string_append_printf(contents,"# Use colorful text on page.\n" "use_color_page = %d\n\n", win_data->use_color_page); for (i=0; iuser_page_color[i]); } g_string_append_printf(contents,"\n[key]\n\n"); for (i=0; iuser_keys[i].value && (win_data->user_keys[i].value[0]!='\0')) g_string_append_printf( contents,"%s\n# Left it blank to disable this function key.\n%s = %s\n\n", system_keys[i].comment, system_keys[i].name, win_data->user_keys[i].value); else g_string_append_printf( contents,"%s\n# Left it blank to disable this function key.\n%s = \n\n", system_keys[i].comment, system_keys[i].name); } g_string_append_printf(contents,"\n"); g_string_append_printf(contents,"[color]\n\n"); g_string_append_printf(contents,"# The main ansi color theme used in vte.\n" "# Possible values are linux, xterm, rxvt, and tango.\n" "# or left it blank to use the default settings form libvte.\n"); if (win_data->color_theme_index) g_string_append_printf(contents, "theme = %s\n\n", system_color_theme[win_data->color_theme_index].name); else g_string_append(contents, "theme = \n\n"); g_string_append_printf(contents,"# Invert the ansi colors, like invert the darkred to red, darkblue to bule.\n" "invert_color = %d\n\n", win_data->invert_color); g_string_append_printf(contents,"# Enable the custom colors specified with Color# below.\n" "custom_theme = %d\n\n", win_data->use_custom_theme); g_string_append_printf(contents,"# The brightness for ansi colors used in terminal.\n" "brightness = %1.3f\n\n", win_data->color_brightness); g_string_append_printf(contents,"# The brightness for ansi colors used in terminal when inactive.\n" "# Left it blank to disable this feature.\n"); if (win_data->dim_text) g_string_append_printf( contents, "inactive_brightness = %1.3f\n\n", win_data->color_brightness_inactive); else g_string_append(contents, "inactive_brightness = \n\n"); #ifdef ENABLE_GDKCOLOR_TO_STRING for (i=1; icustom_color_theme[win_data->color_theme_index].color[i]), &(system_color_theme[win_data->color_theme_index].color[i]))) { color_str = dirty_gdk_rgba_to_string(&(win_data->custom_color_theme[win_data->color_theme_index].color[i])); g_string_append_printf(contents,"%s = %s\n\n", color[i].name, color_str); g_free (color_str); } else g_string_append_printf(contents,"%s = \n\n", color[i].name); } #endif g_string_append_printf(contents,"\n"); g_string_append_printf(contents,"[command]\n\n" "# The parameters of the APPLICATION should be separated with , if any.\n" "#\n" "# method = {0,1,2}\n" "# 0: Open the hyperlink in new tab.\n" "# Use it if the command were using CLI, like w3m.\n" "# 1: Open the hyperlink with gdk_spawn_on_screen_with_pipes().\n" "# Use it if the command were using GUI, like chromium.\n" "# 2: Open the hyperlink in new window,\n" "# Use it if you not sure.\n" "#\n" "# VTE_CJK_WIDTH = {0,1,2}\n" "# 0: get via environment\n" "# 1: use narrow ideograph\n" "# 2: use wide ideograph.\n" "#\n" "# The ENVIRONS will apply to the application, separated with , too.\n" "#\n" "# The LOCALE will apply to the application as locale environs.\n" "# You may use \"zh_TW\", \"zh_TW.Big5\", or \"zh_TW.UTF-8\" here.\n" "# Left it blank to use the locale environs from current page.\n\n"); for (i=0; iuser_regex[i]) g_string_append_printf( contents,"%s = %s\n\n", regex_name[i], win_data->user_regex[i]); else g_string_append_printf( contents,"%s = \n\n", regex_name[i]); } for (i=0; iuser_command[i].command); g_string_append_printf( contents,"%s = %d\n", command[i].method_name, win_data->user_command[i].method); g_string_append_printf( contents,"%s = %d\n", command[i].VTE_CJK_WIDTH_name, win_data->user_command[i].VTE_CJK_WIDTH); g_string_append_printf( contents,"%s = %s\n", command[i].environ_name, win_data->user_command[i].environ); g_string_append_printf( contents,"%s = %s\n", command[i].locale_name, win_data->user_command[i].locale); gchar *match_str=convert_escape_sequence_to_string(command[i].match); g_string_append_printf( contents,"# Default: %s = %s\n", command[i].match_regex_name, match_str); g_free(match_str); if (win_data->user_command[i].match_regex_orig) g_string_append_printf( contents,"%s = %s\n\n", command[i].match_regex_name, win_data->user_command[i].match_regex_orig); else g_string_append_printf( contents,"%s = \n\n", command[i].match_regex_name); } // g_debug("menu_active_window = %p", menu_active_window); if (menu_active_window==NULL) // For -p command line option // LilyTerm will exit immediately, so we don't need to free the datas used by LilyTerm. XD return contents; gchar *profile = NULL; GKeyFile *keyfile = g_key_file_new(); GError *error = NULL; if (win_data->use_custom_profile) profile = g_strdup(win_data->profile); else if (menu_active_window) { profile = get_profile(); g_free(win_data->profile); win_data->profile = g_strdup(profile); } if (profile==NULL) goto FINISH; // g_debug("save_user_settings(): profile = %s", profile); // g_debug("\n%s", contents->str); #ifdef BSD gchar resolved_patch[PATH_MAX+1]; gchar *real_file_name = g_strdup(realpath((const gchar *)profile, resolved_patch)); #else gchar *real_file_name = canonicalize_file_name((const gchar *)profile); #endif if (real_file_name==NULL) { //if (access(profile, F_OK)) if (g_file_test(profile, G_FILE_TEST_IS_SYMLINK)) { create_save_failed_dialog(win_data, _("The target file does NOT exist")); goto FINISH; } else real_file_name = g_strdup(profile); } // g_debug("real_file_name = %s", real_file_name); if (g_file_test(real_file_name, G_FILE_TEST_IS_DIR)) { // g_debug("The target file is a directory!!"); create_save_failed_dialog(win_data, _("The target file is a directory")); } else { // g_debug("G_FILE_TEST_IS_REGULAR = TRUE"); #ifdef SAFEMODE if ( contents && (! g_file_set_contents(real_file_name, contents->str, -1, &error))) #else if ( ! g_file_set_contents(real_file_name, contents->str, -1, &error)) #endif { // g_debug("Error while writing profile '%s': %s", real_file_name, error->message); #ifdef SAFEMODE if (error) #endif create_save_failed_dialog(win_data, error->message); } // else // g_debug("The settings has been saved to %s!", real_file_name); } g_free(real_file_name); FINISH: if (error!=NULL) g_clear_error(&error); g_free(profile); if (contents) g_string_free(contents, TRUE); g_key_file_free(keyfile); setlocale(LC_NUMERIC, lc_numeric); g_free(lc_numeric); return NULL; } void create_save_failed_dialog(struct Window *win_data, gchar *message) { #ifdef DETAIL g_debug("! Launch create_save_failed_dialog() with win_data = %p, message = %s!", win_data, message); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif GtkWidget *window = NULL; if (win_data) window = win_data->window; gchar *temp_str[3]; temp_str[0] = get_colorful_profile(win_data); temp_str[1] = g_strdup_printf(_("Error while writing profile '%s':"), temp_str[0]); temp_str[2] = g_strconcat(temp_str[1], "\n\n\t", message, "\n", NULL); // error_dialog(GtkWidget *window, gchar *title, gchar *icon, gchar *message, gchar *encoding) error_dialog(window, _("Error when writing profile"), "Error when writing profile", GTK_FAKE_STOCK_DIALOG_ERROR, temp_str[2], NULL); gint i; for (i=0; i<3; i++) g_free(temp_str[i]); } gchar *get_profile() { #ifdef DETAIL g_debug("! Launch get_profile()"); #endif gchar *profile = g_strdup_printf("%s/%s", profile_dir, USER_PROFILE); #ifdef SAFEMODE if (profile && (g_mkdir_with_parents(profile_dir, 0700) < 0)) #else if (g_mkdir_with_parents(profile_dir, 0700)) #endif { #ifdef SAFEMODE g_message("Can NOT create the directory: %s", profile_dir); #else g_critical("Can NOT create the directory: %s", profile_dir); #endif g_free(profile); profile = NULL; } // g_debug("get_profile: got the final profile = %s", profile); return profile; } #if defined(ENABLE_RGBA) || defined(UNIT_TEST) // init rgba to enable true transparent. void init_rgba(struct Window *win_data) { #ifdef DETAIL if (win_data) g_debug("! Launch init_rgba() with win_data = %p, window = %p, win_data->use_rgba = %d", win_data, win_data->window, win_data->use_rgba); else g_debug("! Launch init_rgba() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->window==NULL)) return; #endif if (win_data->use_rgba < 0) return; // g_debug("Get win_data = %d when initing rgba!", win_data); GdkScreen *screen = gtk_widget_get_screen(win_data->window); if (win_data->use_rgba==2) #ifdef GTK3_LAME_GDK_SCREEN_IS_COMPOSITED { if (screen) #endif #ifdef ENABLE_RGBA win_data->use_rgba = gdk_screen_is_composited(screen); #endif #ifdef GTK3_LAME_GDK_SCREEN_IS_COMPOSITED else goto FINISH; } #endif // if (win_data->use_rgba) // g_debug("Yes, This screen supports rgba!"); // else // g_debug("No, This screen don't supports rgba!"); if (win_data->use_rgba) { #ifdef USE_GDK_SCREEN_GET_RGBA_VISUAL # ifdef GTK3_LAME_GDK_SCREEN_GET_RGBA_VISUAL // Due to the lame GTK3+!!! if (screen) { # endif GdkVisual *visual = gdk_screen_get_rgba_visual (screen); if (visual) { gtk_widget_set_visual (GTK_WIDGET (win_data->window), visual); win_data->use_rgba = -1; return; } # ifdef GTK3_LAME_GDK_SCREEN_GET_RGBA_VISUAL } # endif #else GdkColormap *colormap = gdk_screen_get_rgba_colormap(screen); if (colormap) { gtk_widget_set_colormap(win_data->window, colormap); gdk_screen_set_default_colormap(screen, colormap); gtk_widget_set_default_colormap(colormap); win_data->use_rgba = -1; return; } #endif } #ifdef GTK3_LAME_GDK_SCREEN_IS_COMPOSITED FINISH: #endif win_data->use_rgba = -2; win_data->dim_window = FALSE; // g_debug("init_rgba() finished!"); } #endif void check_profile_version (GKeyFile *keyfile, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch check_profile_version() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((keyfile==NULL) || (win_data==NULL)) return; #endif GtkWidget *window = NULL; if (win_data) window = win_data->window; // if (win_data->checked_profile_version) if (checked_profile_version) return; // Check the profile version gchar *profile_version = check_string_value(keyfile, "main", "version", "", FALSE, DISABLE_EMPTY_STR); // g_debug("PROFILE_FORMAT_VERSION = %s, and profile_version = %s", // PROFILE_FORMAT_VERSION, // profile_version); #ifdef SAFEMODE if (profile_version && (profile_version[0] != '\0') && (compare_strings(PROFILE_FORMAT_VERSION, profile_version, TRUE))) #else if ((profile_version[0] != '\0') && (compare_strings(PROFILE_FORMAT_VERSION, profile_version, TRUE))) #endif { gchar *temp_str[3] = {NULL}; temp_str[0] = g_strdup(_("Some entry in profile is added, removed, " "or changed in this version.\n" "Please use [Save settings] on the right click menu " "to save your settings,\n" "and edit it manually if necessary.\n")); temp_str[1] = get_colorful_profile(win_data); temp_str[2] = g_strdup_printf(_("%s\nYour profile is %s."), temp_str[0], temp_str[1]); error_dialog(window, _("The format of your profile is out of date"), "The format of your profile is out of date", GTK_FAKE_STOCK_DIALOG_INFO, temp_str[2], NULL); gint i; for (i=0; i<3; i++) g_free(temp_str[i]); #if !defined(DEBUG) && !defined(DETAIL) && !defined(FULL) checked_profile_version = TRUE; #endif } g_free(profile_version); } void profile_is_invalid_dialog(GError *error, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch profile_is_invalid_dialog() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((error==NULL) || (win_data==NULL)) return; #endif if (win_data->confirmed_profile_is_invalid) return; gchar *err_msg; gchar *local_profile = get_colorful_profile(win_data); if (local_profile) err_msg = g_strdup_printf(_("The profile \"%s\" is invalid:\n\n\t%s"), local_profile, error->message); else err_msg = g_strdup_printf(_("The profile \"%s\" is invalid:\n\n\t%s"), win_data->profile, error->message); // g_warning("the profile \"%s\" is invalid: %s", win_data->profile, error->message); // gchar *markup_message = g_markup_escape_text(err_msg, -1); // error_dialog(win_data, err_msg, NULL, ERROR_MESSAGES); error_dialog(win_data->window, _("The profile is invalid!"), "The profile is invalid!", GTK_FAKE_STOCK_DIALOG_ERROR, err_msg, NULL); g_clear_error (&error); g_free(local_profile); g_free(err_msg); // g_free(markup_message); win_data->confirmed_profile_is_invalid = TRUE; } void convert_string_to_user_key(gint i, gchar *value, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch convert_string_to_user_key() with i = %d, value = %s (%p), win_data = %p!", i, value, value, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif if (value) { // g_debug("Got %s key = %s form profile.", pagekeys[i].name, value); // g_debug("Call accelerator_parse() with system_keys[i].name = %s, value = %s (%p)", // system_keys[i].name, value, value); if (accelerator_parse(system_keys[i].name, value, &(win_data->user_keys[i].key), &(win_data->user_keys[i].mods))) { g_free(win_data->user_keys[i].value); win_data->user_keys[i].value = value; } else { #ifdef UNIT_TEST g_debug("\"%s = %s\" is not a valid key! Please check!", system_keys[i].name, value); #else g_critical("\"%s = %s\" is not a valid key! Please check!", system_keys[i].name, value); #endif #ifndef UNIT_TEST g_free(value); #endif } // if (pagekeys[i].key) // g_debug("Got %s = key %x(%s), mods = %x.", pagekeys[i].name, // pagekeys[i].key, gdk_keyval_name(pagekeys[i].key), // pagekeys[i].mods); } // else // g_debug("We can not find %s key in profile...", pagekeys[i].name); } void get_row_and_column_from_geometry_str(glong *column, glong *row, glong *default_column, glong *default_row, gchar *geometry_str) { #ifdef DETAIL g_debug("! Launch get_row_and_column_from_geometry_str() with column = %ld, row = %ld, " "default_column = %ld, default_row = %ld, geometry_str = %s", *column, *row, *default_column, *default_row, geometry_str); #endif #ifdef SAFEMODE if ((column==NULL) || (row==NULL) || (default_column==NULL) || (default_row==NULL)) return; #endif if (geometry_str && (geometry_str[0]!='\0')) { gint offset_x = 0, offset_y = 0; guint new_column, new_row; if (XParseGeometry (geometry_str, &offset_x, &offset_y, &new_column, &new_row)) { *column = new_column; *row = new_row; } } if (*column < 1) *column = *default_column; if (*row < 1) *row = *default_row; } src/profile.h000066400000000000000000000056551246562641500135040ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #define _GNU_SOURCE #include #include // for L10n #include #include // for aoti() aotf() canonicalize_file_name() #include // for access() #include // for strcmp() #include // for XParseGeometry() #include #include "lilyterm.h" #define DEFAULT_FOREGROUND_COLOR "white" #define DEFAULT_BACKGROUND_COLOR "black" #define DEFAULT_CURSOR_COLOR "#44738B" #ifdef BSD // chars in a path name including nul // which is already defined in /usr/include/sys/syslimits.h // #define PATH_MAX 4096 #endif typedef enum { DISABLE_EMPTY_STR, ENABLE_EMPTY_STR, } Check_Empty; typedef enum { DISABLE_ZERO, ENABLE_ZERO, } Check_Zero; typedef enum { NO_CHECK_MIN, CHECK_MIN, } Check_Min; typedef enum { NO_CHECK_MAX, CHECK_MAX, } Check_Max; void init_command(); void init_user_command(struct Window *win_data); void init_window_parameters(struct Window *win_data); void init_user_keys(struct Window *win_data); void init_key_bindings_name_and_group(); void init_key_bindings(); void init_page_color_data(); void init_page_color_data_comment(); void init_mod_keys(); void init_colors(); gchar *load_profile_from_dir(const gchar *dir, const gchar* profile); gdouble check_double_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, const gdouble default_value, Check_Empty enable_empty, gdouble empty_value, Check_Min check_min, gdouble min, Check_Max check_max, gdouble max); glong check_integer_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, const glong default_value, Check_Empty enable_empty, glong empty_value, Check_Zero enable_zero, Check_Min check_min, glong min, Check_Max check_max, glong max); gchar *check_string_value(GKeyFile *keyfile, const gchar *group_name, const gchar *key, gchar *original_value, gboolean free_original_value, Check_Empty enable_empty); gboolean check_color_value (const gchar *key_name, const gchar *color_name, GdkRGBA *color, const GdkRGBA *default_color); gboolean accelerator_parse(const gchar *key_name, const gchar *key_value, guint *key, guint *mods); void create_save_failed_dialog(struct Window *win_data, gchar *message); src/property.c000066400000000000000000001050651246562641500137170ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "property.h" extern gboolean proc_exist; extern struct Command command[COMMAND]; extern struct GdkRGBA_Theme system_color_theme[THEME]; void create_theme_color_data(GdkRGBA color[COLOR], GdkRGBA color_orig[COLOR], gdouble color_brightness, gboolean invert_color, gboolean default_vte_theme, gboolean dim_fg_color) { #ifdef DETAIL g_debug("! Launch create_theme_color_data() with color = %p, color_orig = %p, color_brightness = %3f, invert_color = %d", color, color_orig, color_brightness, invert_color); #endif #ifdef SAFEMODE if ((color==NULL) || (color_orig==NULL)) return; #endif if (! default_vte_theme) { // g_debug("Get win_data = %d when set background saturation!", win_data); color_brightness = CLAMP(color_brightness, -1, 1); gint i; for (i=1; i=0) { color->red = (MAX_COLOR - color_orig->red) * color_brightness + color_orig->red; color->green = (MAX_COLOR - color_orig->green) * color_brightness + color_orig->green; color->blue = (MAX_COLOR - color_orig->blue) * color_brightness + color_orig->blue; } else { color->red = (1 + color_brightness) * color_orig->red; color->green = (1 + color_brightness) * color_orig->green; color->blue = (1 + color_brightness) * color_orig->blue; } } void generate_all_color_datas(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch generate_all_color_datas() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif GdkRGBA *temp_color = get_current_color_theme(win_data); gboolean default_vte_theme = use_default_vte_theme(win_data); create_theme_color_data(win_data->color, temp_color, win_data->color_brightness, win_data->invert_color, default_vte_theme, FALSE); create_theme_color_data(win_data->color_inactive, temp_color, win_data->color_brightness_inactive, win_data->invert_color, default_vte_theme, TRUE); } GdkRGBA *get_current_color_theme(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch current_color_theme() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif // g_debug("win_data->use_custom_theme = %d", win_data->use_custom_theme); if (win_data->use_custom_theme) return win_data->custom_color_theme[win_data->color_theme_index].color; else return system_color_theme[win_data->color_theme_index].color; } // to init a new page void init_new_page(struct Window *win_data, struct Page *page_data, glong column, glong row) { #ifdef DETAIL g_debug("! Launch init_new_page() with win_data = %p, page_data = %p, " " column = %ld, row = %ld", win_data, page_data, column, row); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->vte==NULL)) return; #endif // g_debug("Get win_data = %d when initing new page!", win_data); #ifdef SAFEMODE if (page_data->font_name) { #endif // set font // g_debug("Set Font AA = %d", win_data->font_anti_alias); fake_vte_terminal_set_font_from_string (page_data->vte, page_data->font_name, win_data->font_anti_alias); #ifdef SAFEMODE } #endif //g_debug("Got font size from %s: %d", font_name, pango_font_description_get_size ( // pango_font_description_from_string(font_name))/PANGO_SCALE); // set terminal size // g_debug("Set the vte size to: %dx%d", column, row); #ifdef SAFEMODE if (page_data->vte) #endif vte_terminal_set_size(VTE_TERMINAL(page_data->vte), column, row); #ifdef GEOMETRY # ifdef USE_GTK2_GEOMETRY_METHOD g_debug("@ init_new_page(for %p, vte = %p): Set win_data->keep_vte_size to %d, and column = %ld, row = %ld", win_data->window, page_data->vte, win_data->keep_vte_size, column, row); # else g_debug("@ init_new_page(for %p, vte = %p): Set column = %ld, row = %ld", win_data->window, page_data->vte, column, row); # endif #endif set_vte_color(page_data->vte, use_default_vte_theme(win_data), win_data->custom_cursor_color, win_data->cursor_color, win_data->color, FALSE, (win_data->color_theme_index==(THEME-1))); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) // set transparent set_background_saturation(NULL, 0, win_data->background_saturation, page_data->vte); #endif // other settings #ifdef ENABLE_SET_WORD_CHARS vte_terminal_set_word_chars(VTE_TERMINAL(page_data->vte), win_data->word_chars); #endif vte_terminal_set_scrollback_lines(VTE_TERMINAL(page_data->vte), win_data->scrollback_lines); // some fixed parameter vte_terminal_set_scroll_on_output(VTE_TERMINAL(page_data->vte), FALSE); vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(page_data->vte), TRUE); // vte_terminal_set_backspace_binding (VTE_TERMINAL(page_data->vte), VTE_ERASE_ASCII_DELETE); // vte_terminal_set_delete_binding (VTE_TERMINAL(page_data->vte), VTE_ERASE_ASCII_DELETE); // vte_terminal_set_emulation (VTE_TERMINAL(page_data->vte), "xterm"); #ifdef ENABLE_FIND_STRING vte_terminal_search_set_wrap_around (VTE_TERMINAL(page_data->vte), TRUE); #endif set_hyperlink(win_data, page_data); set_cursor_blink(win_data, page_data); vte_terminal_set_allow_bold(VTE_TERMINAL(page_data->vte), win_data->allow_bold_text); vte_terminal_set_audible_bell (VTE_TERMINAL(page_data->vte), win_data->audible_bell); #ifdef ENABLE_VISIBLE_BELL vte_terminal_set_visible_bell (VTE_TERMINAL(page_data->vte), win_data->visible_bell); #endif // g_debug("init_new_page(): call set_vte_urgent_bell()"); #ifdef ENABLE_BEEP_SINGAL set_vte_urgent_bell(win_data, page_data); #endif vte_terminal_set_backspace_binding (VTE_TERMINAL(page_data->vte), win_data->erase_binding); #ifdef ENABLE_CURSOR_SHAPE vte_terminal_set_cursor_shape(VTE_TERMINAL(page_data->vte), win_data->cursor_shape); #endif #ifdef ENABLE_SET_EMULATION vte_terminal_set_emulation (VTE_TERMINAL(page_data->vte), win_data->emulate_term); #endif } void set_cursor_blink(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch set_cursor_blink() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->vte==NULL)) return; #endif // g_debug("set_cursor_blink(): win_data->cursor_blinks = %d", win_data->cursor_blinks); #ifdef USE_NEW_VTE_CURSOR_BLINKS_MODE vte_terminal_set_cursor_blink_mode (VTE_TERMINAL(page_data->vte), win_data->cursor_blinks); #else vte_terminal_set_cursor_blinks (VTE_TERMINAL(page_data->vte), win_data->cursor_blinks); #endif } void set_hyperlink(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch set_hyperlink() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->vte==NULL)) return; #endif if (win_data->enable_hyperlink && win_data->enable_key_binding) { if (page_data->match_regex_setted) clean_hyperlink(win_data, page_data); gint i; for (i=0; iuser_command[i].match_regex_orig)? win_data->user_command[i].match_regex_orig: win_data->user_command[i].match_regex; if ((match == NULL) || (match[0] == '\0')) match = command[i].match; // gchar *regex_str = convert_escape_sequence_to_string(match); // g_debug("set_hyperlink(): match = %s", regex_str); // g_free(regex_str); #ifdef USE_NEW_VTE_MATCH_ADD_GREGEX GRegex *regex = g_regex_new (match, G_REGEX_CASELESS | G_REGEX_OPTIMIZE, 0, NULL); page_data->tag[i] = vte_terminal_match_add_gregex (VTE_TERMINAL(page_data->vte), regex, 0); g_regex_unref (regex); #else page_data->tag[i] = vte_terminal_match_add (VTE_TERMINAL(page_data->vte), match); #endif vte_terminal_match_set_cursor_type(VTE_TERMINAL(page_data->vte), page_data->tag[i], GDK_HAND2); } page_data->match_regex_setted = TRUE; // g_debug("clean_hyperlink(): set page_data->match_regex_setted = %d", page_data->match_regex_setted); } else clean_hyperlink(win_data, page_data); } void clean_hyperlink(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch clean_hyperlink() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->vte==NULL)) return; #endif if (! page_data->match_regex_setted) return; page_data->match_regex_setted = FALSE; // g_debug("clean_hyperlink(): set page_data->match_regex_setted = %d", page_data->match_regex_setted); vte_terminal_match_remove_all(VTE_TERMINAL(page_data->vte)); } void enable_custom_cursor_color(GtkWidget *vte, gboolean custom_cursor_color, GdkRGBA *cursor_color) { #ifdef DETAIL g_debug("! Launch enable_custom_cursor_color() with vte = %p, custom_cursor_color = %d, cursor_color = %p", vte, custom_cursor_color, cursor_color); #endif #ifdef SAFEMODE if (vte==NULL) return; #endif if (custom_cursor_color) vte_terminal_set_color_cursor_rgba(VTE_TERMINAL(vte), cursor_color); else vte_terminal_set_color_cursor_rgba(VTE_TERMINAL(vte), NULL); } void set_vte_color(GtkWidget *vte, gboolean default_vte_color, gboolean custom_cursor_color, GdkRGBA cursor_color, GdkRGBA color[COLOR], gboolean update_fg_only, gboolean over_16_colors) { #ifdef DETAIL g_debug("! Launch set_vte_color() with vte = %p, default_vte_color_theme = %d, color = %p", vte, default_vte_color, color); #endif #ifdef SAFEMODE if ((vte==NULL) || (color ==NULL)) return; #endif if (over_16_colors) { vte_terminal_set_default_colors(VTE_TERMINAL(vte)); return; } // set font/background colors // gint i; // for (i=0; i< COLOR; i++) // print_color(i, "set_vte_color():", color[i]); if (! update_fg_only) { vte_terminal_set_default_colors(VTE_TERMINAL(vte)); if (default_vte_color) vte_terminal_set_color_background_rgba(VTE_TERMINAL(vte), &(color[0])); else vte_terminal_set_colors_rgba(VTE_TERMINAL(vte), &(color[COLOR-1]), &(color[0]), color, 16); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) dirty_vte_terminal_set_background_tint_color(VTE_TERMINAL(vte), color[0]); #endif } if (default_vte_color | update_fg_only) vte_terminal_set_color_foreground_rgba(VTE_TERMINAL(vte), &(color[COLOR-1])); vte_terminal_set_colors_rgba(VTE_TERMINAL(vte), &(color[COLOR-1]), &(color[0]), color, 16); // print_color(-1, "set_vte_color(): cursor_color", cursor_color); enable_custom_cursor_color(vte, custom_cursor_color, &(cursor_color)); } gboolean use_default_vte_theme(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch use_default_vte_theme() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return TRUE; #endif return ! (win_data->color_theme_index || win_data->invert_color || win_data->color_brightness || win_data->color_brightness_inactive); } void set_page_width(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch set_page_width() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->label_text==NULL)) return; #endif gtk_label_set_width_chars(GTK_LABEL(page_data->label_text), win_data->page_width); } void pack_vte_and_scroll_bar_to_hbox(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch pack_vte_and_scroll_bar_to_hbox() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->hbox==NULL)) return; #endif if (win_data->scroll_bar_position) { gtk_box_pack_start(GTK_BOX(page_data->hbox), page_data->vte, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(page_data->hbox), page_data->scroll_bar, FALSE, FALSE, 0); } else { gtk_box_pack_end(GTK_BOX(page_data->hbox), page_data->vte, TRUE, TRUE, 0); gtk_box_pack_end(GTK_BOX(page_data->hbox), page_data->scroll_bar, FALSE, FALSE, 0); } if (! win_data->show_scroll_bar) gtk_widget_set_no_show_all (page_data->scroll_bar, TRUE); } gboolean check_show_or_hide_scroll_bar(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch check_show_or_hide_scroll_bar() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif gboolean show = FALSE; // g_debug("check_show_or_hide_scroll_bar(): win_data->show_scroll_bar = %d", win_data->show_scroll_bar); switch (win_data->show_scroll_bar) { case AUTOMATIC: #ifdef USE_GTK2_GEOMETRY_METHOD show = ! win_data->true_fullscreen; #endif #ifdef USE_GTK3_GEOMETRY_METHOD switch (win_data->window_status) { case WINDOW_NORMAL: case WINDOW_RESIZING_TO_NORMAL: case WINDOW_MAX_WINDOW: case WINDOW_APPLY_PROFILE_NORMAL: show = TRUE; break; default: break; } #endif break; case ON: case FORCE_ON: show = TRUE; break; default: break; } // g_debug("check_show_or_hide_scroll_bar(): Got win_data->show_scroll_bar = %d, show = %d", // win_data->show_scroll_bar, show); return show; } void show_and_hide_scroll_bar(struct Page *page_data, gboolean show_scroll_bar) { #ifdef DETAIL g_debug("! Launch hide_scroll_bar() with page_data = %p", page_data); #endif #ifdef SAFEMODE if ((page_data==NULL) || (page_data->scroll_bar==NULL)) return; #endif if (show_scroll_bar) gtk_widget_show (page_data->scroll_bar); else gtk_widget_hide (page_data->scroll_bar); } void add_remove_page_timeout_id(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch add_remove_page_timeout_id() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL)) return; #endif if (page_data->timeout_id) { g_source_remove (page_data->timeout_id); // get_and_update_page_name(page_data); // win_data->page_names_no++; //if ((page_data->custom_page_name == NULL) && (page_data->label_text != NULL)) // page_data->custom_page_name = g_strdup(page_data->page_name); page_data->timeout_id = 0; } else // monitor_cmdline(page_data->monitor, page_data->pid); // monitor_cmdline(page_data->channel, page_data->pid); page_data->timeout_id = g_timeout_add_seconds (1, (GSourceFunc)monitor_cmdline, page_data); } void add_remove_window_title_changed_signal(struct Page *page_data) { #ifdef DETAIL g_debug("! Launch add_remove_window_title_changed_signal() with page_data = %p", page_data); #endif #ifdef SAFEMODE if (page_data==NULL) return; #endif if (page_data->page_shows_window_title) page_data->window_title_signal = g_signal_connect(page_data->vte, "window-title-changed", G_CALLBACK(update_page_window_title), page_data); else if (page_data->window_title_signal) { g_signal_handler_disconnect(page_data->vte, page_data->window_title_signal); page_data->window_title_signal = 0; } } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) || defined(UNIT_TEST) gboolean set_background_saturation(GtkRange *range, GtkScrollType scroll, gdouble value, GtkWidget *vte) { # ifdef DETAIL g_debug("! Launch set_background_saturation() with value = %f, vte = %p", value, vte); # endif # ifdef SAFEMODE if (vte==NULL) return FALSE; # endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); # ifdef SAFEMODE if (page_data==NULL || (page_data->window==NULL)) return FALSE; # endif struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); # ifdef SAFEMODE if (win_data==NULL) return FALSE; # endif // g_debug("Get win_data = %d when set background saturation!", win_data); value = CLAMP(value, 0, 1); # ifdef ENABLE_RGBA # ifdef FORCE_ENABLE_VTE_BACKGROUND G_GNUC_BEGIN_IGNORE_DEPRECATIONS; # endif if (win_data->use_rgba == -1) { if (win_data->transparent_background) vte_terminal_set_opacity(VTE_TERMINAL(vte), (1-value) * 65535); else vte_terminal_set_opacity(VTE_TERMINAL(vte), 65535); } else # endif vte_terminal_set_background_transparent(VTE_TERMINAL(vte), win_data->transparent_background); // g_debug("set_background_saturation(): win_data->transparent_background = %d, value = %1.3f", // win_data->transparent_background, value); // g_debug("set_background_saturation(): win_data->background_image = %s", win_data->background_image); if (win_data->transparent_background) { vte_terminal_set_background_image_file (VTE_TERMINAL(vte), NULL_DEVICE); vte_terminal_set_background_saturation( VTE_TERMINAL(vte), value); } else { if (compare_strings(win_data->background_image, NULL_DEVICE, TRUE)) { vte_terminal_set_background_saturation( VTE_TERMINAL(vte), value); vte_terminal_set_background_image_file (VTE_TERMINAL(vte), win_data->background_image); vte_terminal_set_scroll_background(VTE_TERMINAL(vte), win_data->scroll_background); } else vte_terminal_set_background_saturation( VTE_TERMINAL(vte), 0); } # ifdef FORCE_ENABLE_VTE_BACKGROUND G_GNUC_END_IGNORE_DEPRECATIONS; # endif dirty_vte_terminal_set_background_tint_color(VTE_TERMINAL(page_data->vte), win_data->color[0]); return FALSE; } #endif #if defined(ENABLE_RGBA) || defined(UNIT_TEST) gboolean set_window_opacity(GtkRange *range, GtkScrollType scroll, gdouble value, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch set_window_opacity() with value = %f, win_data = %p", value, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif // g_debug("Get win_data = %d when set window opacity!", win_data); value = CLAMP(value, 0, 1); if (win_data->use_rgba == -1) { #ifdef ENABLE_RGBA if (win_data->transparent_window) gtk_window_set_opacity (GTK_WINDOW(win_data->window), 1-value); else gtk_window_set_opacity (GTK_WINDOW(win_data->window), 1); #endif } return FALSE; } #endif // set the window hints information void window_resizable(GtkWidget *window, GtkWidget *vte, Hints_Type hints_type) { #ifdef DETAIL fprintf(stderr, "\033[1;31m** Launch window_resizable() with window = %p, vte = %p, hints_type = %d\033[0m\n", window, vte, hints_type); #endif #ifdef SAFEMODE if ((window==NULL) || (vte==NULL)) return; #endif // DIRTY HACK: don't run window_resizable too much times before window is shown! if ((hints_type != HINTS_FONT_BASE) && (gtk_widget_get_mapped(window) == FALSE)) return; // vte=NULL when creating a new root window with drag & drop. // if (vte==NULL) return; GdkGeometry hints = {0}; // g_debug("Trying to get padding..."); vte_terminal_get_padding (VTE_TERMINAL(vte), &(hints.base_width), &(hints.base_height)); // g_debug("hints.base_width = %d, hints.base_height = %d", hints.base_width, hints.base_height); switch (hints_type) { case HINTS_FONT_BASE: hints.width_inc = vte_terminal_get_char_width(VTE_TERMINAL(vte)); hints.height_inc = vte_terminal_get_char_height(VTE_TERMINAL(vte)); break; case HINTS_NONE: hints.width_inc = 1; hints.height_inc = 1; break; #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) case HINTS_SKIP_ONCE: return; #endif } // g_debug("hints.width_inc = %d, hints.height_inc = %d", // hints.width_inc, hints.height_inc); // // minsize = -1: the size of vte can NOT be changed. // if (minsize == -1) // { // hints.min_width = minsize; // hints.min_height = minsize; // } // else // { #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gint min_width = 0, min_height = 0; struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT(window), "Win_Data"); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(vte), "Page_Data"); get_hint_min_size(win_data->notebook, page_data->scroll_bar, &min_width, &min_height); hints.min_width = hints.base_width + ((int)(min_width/hints.width_inc)+1)*hints.width_inc; hints.min_height = hints.base_height + ((int)(min_height/hints.height_inc)+1)*hints.height_inc; # ifdef GEOMETRY fprintf(stderr, "\033[1;37m** window_resizable(win_data %p): window = %p, vte = %p, hints_type = %d\033[0m\n", win_data, window, vte, hints_type); # endif #endif #ifdef USE_GTK2_GEOMETRY_METHOD hints.min_width = hints.base_width + hints.width_inc; hints.min_height = hints.base_height + hints.height_inc; #endif // } #ifdef GEOMETRY g_debug("@ hint data: hints.width_inc = %d, hints.height_inc = %d, hints.base_width = %d, " "@ hints.base_height = %d, hints.min_width = %d, hints.min_height = %d", hints.width_inc, hints.height_inc, hints.base_width, hints.base_height, hints.min_width, hints.min_height); #endif // g_debug("Tring to set geometry on %p, and hints_type = %d", vte, hints_type); gtk_window_set_geometry_hints (GTK_WINDOW (window), GTK_WIDGET (vte), &hints, GDK_HINT_RESIZE_INC | GDK_HINT_MIN_SIZE | GDK_HINT_BASE_SIZE); //g_debug("current the size of vte %p whith hinting = %ld x %ld", // vte, // vte_terminal_get_column_count(VTE_TERMINAL(vte)), // vte_terminal_get_row_count(VTE_TERMINAL(vte))); } #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) void get_hint_min_size(GtkWidget *notebook, GtkWidget *scrollbar, gint *min_width, gint *min_height) { #ifdef DETAIL g_debug("! Launch get_hint_min_size() with notebook = %p, scrollbar = %p", notebook, scrollbar); #endif #ifdef SAFEMODE if ((scrollbar==NULL) || (scrollbar==NULL) || (min_width==NULL) || (min_height==NULL)) return; #endif #ifdef USE_GTK3_GEOMETRY_METHOD gtk_widget_get_preferred_width(GTK_WIDGET(notebook), min_width, NULL); gtk_widget_get_preferred_height(GTK_WIDGET(notebook), min_height, NULL); # ifdef GEOMETRY g_debug("@ get_hint_min_size(): Get the preferred size of notebook = %d x %d", *min_width, *min_height); # endif #endif gint stepper_size, stepper_spacing, trough_border, min_slider_length; gtk_widget_style_get(GTK_WIDGET(scrollbar), "stepper-size", &stepper_size, NULL); gtk_widget_style_get(GTK_WIDGET(scrollbar), "stepper-spacing", &stepper_spacing, NULL); gtk_widget_style_get(GTK_WIDGET(scrollbar), "trough-border", &trough_border, NULL); gtk_widget_style_get(GTK_WIDGET(scrollbar), "min-slider-length", &min_slider_length, NULL); *min_height = *min_height + stepper_size*2 + stepper_spacing*2 + trough_border*2 + min_slider_length; # ifdef GEOMETRY g_debug("@ get_hint_min_size(): stepper_size = %d, stepper_spacing = %d, trough_border = %d, min_slider_length = %d", stepper_size, stepper_spacing, trough_border, min_slider_length); g_debug("@ get_hint_min_size(): ** FINAL: min_width = %d, min_height = %d", *min_width, *min_height); # endif } #endif #if defined(vte_terminal_get_padding) || defined(UNIT_TEST) // This function is for replce the removed vte_terminal_get_padding() void fake_vte_terminal_get_padding(VteTerminal *vte, gint *width, gint *height) { #ifdef DETAIL g_debug("! Launch fake_vte_terminal_get_padding() with vte = %p", vte); #endif #ifdef SAFEMODE if ((vte==NULL) || (width==NULL) || (height==NULL)) return; #endif # ifdef VTE_HAS_INNER_BORDER GtkBorder *inner_border = NULL; gtk_widget_style_get(GTK_WIDGET(vte), "inner-border", &inner_border, NULL); # ifdef SAFEMODE if (inner_border) { # endif # ifdef SAFEMODE if (width) # endif *width = inner_border->left + inner_border->right; # ifdef SAFEMODE if (height) # endif *height = inner_border->top + inner_border->bottom; # ifdef SAFEMODE } # endif gtk_border_free (inner_border); # else *width = 0; *height = 0; # endif } #endif void apply_new_win_data_to_page (struct Window *win_data_orig, struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch apply_new_win_data_to_page() with win_data_orig = %p, win_data = %p, page_data = %p", win_data_orig, win_data, page_data); #endif #ifdef SAFEMODE if ((win_data_orig==NULL) || (win_data==NULL) || (page_data==NULL) || (page_data->vte==NULL)) return; #endif // if (win_data_orig->use_rgba != win_data->use_rgba) // init_rgba(win_data); #ifdef ENABLE_RGBA set_window_opacity (NULL, 0, win_data->window_opacity, win_data); #endif init_monitor_cmdline_datas(win_data, page_data); if (win_data_orig->enable_hyperlink != win_data->enable_hyperlink) set_hyperlink(win_data, page_data); // ---- the color used in vte ---- // gboolean update_color = FALSE; if ((win_data_orig->custom_cursor_color != win_data->custom_cursor_color) || (compare_color(&(win_data_orig->cursor_color), &(win_data->cursor_color))) || (win_data_orig->have_custom_color != win_data->have_custom_color) || (win_data_orig->use_custom_theme != win_data->use_custom_theme) || (win_data_orig->color_brightness != win_data->color_brightness)) update_color = TRUE; gint i; if (! update_color && (win_data->use_custom_theme)) { for (i=0; icolor[i]), &(win_data->color[i]))) update_color = TRUE; } if (update_color) set_vte_color(page_data->vte, use_default_vte_theme(win_data), win_data->custom_cursor_color, win_data->cursor_color, win_data->color, FALSE, (win_data->color_theme_index==(THEME-1))); // ---- tabs on notebook ---- // if (win_data_orig->tabs_bar_position != win_data->tabs_bar_position) { if (win_data->tabs_bar_position) gtk_notebook_set_tab_pos(GTK_NOTEBOOK(win_data->notebook), GTK_POS_BOTTOM); else gtk_notebook_set_tab_pos(GTK_NOTEBOOK(win_data->notebook), GTK_POS_TOP); } // the fill_tabs_bar may not always work, so we should call set_fill_tabs_bar() every time. // if (win_data_orig->fill_tabs_bar != win_data->fill_tabs_bar) set_fill_tabs_bar(GTK_NOTEBOOK(win_data->notebook), win_data->fill_tabs_bar, page_data); if (win_data_orig->page_width != win_data->page_width) set_page_width(win_data, page_data); // g_debug("ORI: %d", win_data_orig->page_shows_current_cmdline || // win_data_orig->page_shows_current_dir || // win_data_orig->page_shows_window_title); // g_debug("NEW: %d", win_data->page_shows_current_cmdline || // win_data->page_shows_current_dir || // win_data->page_shows_window_title); if ((proc_exist) && ((page_data->page_update_method != PAGE_METHOD_NORMAL) || (win_data->page_shows_current_cmdline || win_data->page_shows_current_dir || win_data->page_shows_window_title))) { // FIXME: Is it necessary? if (page_data->page_update_method == PAGE_METHOD_WINDOW_TITLE) page_data->window_title_updated = 1; page_data->page_update_method = PAGE_METHOD_REFRESH; } // g_debug("page_data->page_update_method = %d", page_data->page_update_method); if (win_data->page_shows_window_title != win_data_orig->page_shows_window_title) add_remove_window_title_changed_signal(page_data); if (win_data->check_root_privileges != win_data_orig->check_root_privileges) { if (win_data->check_root_privileges) page_data->is_root = check_is_root(page_data->displayed_tpgid); else page_data->is_root = FALSE; // g_debug("apply_new_win_data_to_page(): page_data->is_root = %d", page_data->is_root); } if (page_data->is_bold) { if (page_data->vte == win_data->current_vte) { if (win_data->bold_current_page_name == FALSE) { page_data->is_bold = page_data->should_be_bold; if (win_data->bold_action_page_name == FALSE) page_data->is_bold = FALSE; } } else { if (win_data->bold_action_page_name == FALSE) page_data->is_bold = FALSE; } } else { if (page_data->vte == win_data->current_vte) page_data->is_bold = win_data->bold_current_page_name; else if (win_data->bold_action_page_name == TRUE) page_data->is_bold = page_data->should_be_bold; } if ((win_data_orig->window_title_shows_current_page != win_data->window_title_shows_current_page) || (win_data_orig->window_title_append_package_name != win_data->window_title_append_package_name)) { check_and_update_window_title(win_data, page_data->custom_window_title, page_data->page_no+1, page_data->custom_page_name, page_data->page_name); // g_debug("FINAL: New window title = %s", gtk_window_get_title(GTK_WINDOW(win_data->window))); } get_and_update_page_name(page_data, FALSE); if ((win_data_orig->show_close_button_on_tab != win_data->show_close_button_on_tab) || (win_data_orig->show_close_button_on_all_tabs != win_data->show_close_button_on_all_tabs)) show_close_button_on_tab(win_data, page_data); // ---- font ---- // if (win_data_orig->font_anti_alias != win_data->font_anti_alias) fake_vte_terminal_set_font_from_string (page_data->vte, page_data->font_name, win_data->font_anti_alias); // ---- other settings for init a vte ---- // #ifdef ENABLE_SET_WORD_CHARS if (compare_strings(win_data_orig->word_chars, win_data->word_chars, TRUE)) vte_terminal_set_word_chars(VTE_TERMINAL(page_data->vte), win_data->word_chars); #endif if (win_data_orig->show_scroll_bar != win_data->show_scroll_bar) // hide_scroll_bar(win_data, page_data); show_and_hide_scroll_bar(page_data, check_show_or_hide_scroll_bar(win_data)); if (win_data_orig->scroll_bar_position != win_data->scroll_bar_position) { g_object_ref(page_data->vte); gtk_container_remove (GTK_CONTAINER(page_data->hbox), page_data->vte); g_object_ref(page_data->scroll_bar); gtk_container_remove (GTK_CONTAINER(page_data->hbox), page_data->scroll_bar); pack_vte_and_scroll_bar_to_hbox(win_data, page_data); g_object_unref(page_data->vte); g_object_unref(page_data->scroll_bar); } #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) if (compare_color(&(win_data_orig->color[0]), &(win_data->color[0])) || (win_data_orig->transparent_background != win_data->transparent_background) || (win_data_orig->background_saturation != win_data->background_saturation) || (win_data_orig->scroll_background != win_data->scroll_background) || compare_strings (win_data_orig->background_image, win_data->background_image, TRUE)) set_background_saturation (NULL, 0, win_data->background_saturation, page_data->vte); #endif if (win_data_orig->scrollback_lines != win_data->scrollback_lines) vte_terminal_set_scrollback_lines (VTE_TERMINAL(page_data->vte), win_data->scrollback_lines); if (win_data_orig->cursor_blinks != win_data->cursor_blinks) set_cursor_blink(win_data, page_data); if (win_data_orig->allow_bold_text != win_data->allow_bold_text) vte_terminal_set_allow_bold(VTE_TERMINAL(page_data->vte), win_data->allow_bold_text); if (win_data_orig->audible_bell != win_data->audible_bell) vte_terminal_set_audible_bell (VTE_TERMINAL(page_data->vte), win_data->audible_bell); #ifdef ENABLE_VISIBLE_BELL if (win_data_orig->visible_bell != win_data->visible_bell) vte_terminal_set_visible_bell (VTE_TERMINAL(page_data->vte), win_data->visible_bell); #endif #ifdef ENABLE_BEEP_SINGAL if (win_data_orig->urgent_bell != win_data->urgent_bell) set_vte_urgent_bell(win_data, page_data); #endif if (win_data_orig->erase_binding != win_data->erase_binding) vte_terminal_set_backspace_binding (VTE_TERMINAL(page_data->vte), win_data->erase_binding); #ifdef ENABLE_CURSOR_SHAPE if (win_data_orig->cursor_shape != win_data->cursor_shape) vte_terminal_set_cursor_shape(VTE_TERMINAL(page_data->vte), win_data->cursor_shape); #endif #ifdef ENABLE_SET_EMULATION if (compare_strings(win_data_orig->emulate_term, win_data->emulate_term, TRUE)) vte_terminal_set_emulation (VTE_TERMINAL(page_data->vte), win_data->emulate_term); #endif } // Will return TRUE if a and b are NOT the same. gboolean compare_color(GdkRGBA *a, GdkRGBA *b) { #ifdef DETAIL g_debug("! Launch compare_color()!"); #endif #ifdef SAFEMODE if ((a==NULL) && (b==NULL)) return FALSE; if ((a==NULL) || (b==NULL)) return TRUE; #endif // g_debug("compare_color(): Comparing %04X %04X %04X %04X and %04X %04X %04X %04X", // a->pixel, a->red, a->green, a->blue, b->pixel, b->red, b->green, b->blue); // g_debug("compare_color(): Comparing %0.4f %0.4f %0.4f and %0.4f %0.4f %0.4f", // a->red, a->green, a->blue, b->red, b->green, b->blue); if ((a->red != b->red) || (a->green != b->green ) || (a->blue != b->blue)) return TRUE; else return FALSE; } void set_widget_thickness(GtkWidget *widget, gint thickness) { #ifdef DETAIL g_debug("! Launch set_widget_thickness() with widget = %p, thickness = %d!", widget, thickness); #endif #ifdef SAFEMODE if (widget==NULL) return; #endif #ifdef USING_OLD_GTK_RC_STYLE_NEW GtkRcStyle *rc_style = gtk_rc_style_new(); # ifdef SAFEMODE if (rc_style) { # endif rc_style->xthickness = rc_style->ythickness = thickness; gtk_widget_modify_style(widget, rc_style); # ifdef SAFEMODE } # endif g_object_unref(rc_style); #else GtkCssProvider *css = gtk_css_provider_new (); GtkStyleContext *context = gtk_widget_get_style_context(widget); gchar *modified_style = g_strdup_printf("* {\n" " -GtkWidget-focus-line-width: 0;\n" " -GtkWidget-focus-padding: 0;\n" " padding: %dpx;\n" "}", thickness); if (gtk_css_provider_load_from_data (css, modified_style, -1, NULL)) gtk_style_context_add_provider (context, GTK_STYLE_PROVIDER (css), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); g_object_unref (css); g_free (modified_style); #endif } src/property.h000066400000000000000000000022661246562641500137230ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #define _GNU_SOURCE #include #include // for L10n #include #include // for strlen() #include // for aoti() aotf() canonicalize_file_name() #include // for access() #include #include "lilyterm.h" #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) void get_hint_min_size(GtkWidget *notebook, GtkWidget *scrollbar, gint *min_width, gint *min_height); #endif src/unit_test.sh000066400000000000000000000534151246562641500142420ustar00rootroot00000000000000# # Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. # # This file is part of LilyTerm. # # LilyTerm 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. # # LilyTerm 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 LilyTerm. If not, see . # #!/bin/sh INCLUDES="$1" RUN_GDB=0 RUN_VALGRIND=0 TEST_SCRIPT_ONLY=0 BUILD_ONLY=0 LIB_LISTS="lilyterm.h" FUNCTION_FOUND=0 GDB_ERROR=0 ECHO=`whereis "echo" | tr -s ' ' '\n' | grep "bin/""echo""$" | head -n 1` PRINTF=`whereis "printf" | tr -s ' ' '\n' | grep "bin/""printf""$" | head -n 1` CAT=`whereis "cat" | tr -s ' ' '\n' | grep "bin/""cat""$" | head -n 1` GDB=`whereis "gdb" | tr -s ' ' '\n' | grep "bin/""gdb""$" | head -n 1` VALGRIND=`whereis "valgrind" | tr -s ' ' '\n' | grep "bin/""valgrind""$" | head -n 1` MAKE=`whereis "gmake" | tr -s ' ' '\n' | grep "bin/""gmake""$" | head -n 1` if [ -z "$MAKE" ]; then MAKE=`whereis "make" | tr -s ' ' '\n' | grep "bin/""make""$" | head -n 1` fi for opt do case "$opt" in -h|--help) $ECHO "Usage: sh $0 INCLUDES --test_all --enable-glib-debugger --enable-gtk-debugger --enable-gdb --enable-valgrind --specific_function=FUNCTION_NAME --skip_function=FUNCTION_NAME --create_program_only --build_program_only" exit 0 ;; --test_all) LIB_LISTS="*.h" export G_DEBUG=fatal_warnings ;; --enable-glib-debugger) export G_DEBUG=fatal_warnings ;; --enable-gtk-debugger) GTK_DEBUG="--g-fatal-warnings" ;; --enable-gdb) RUN_GDB=1 ;; --enable-valgrind) RUN_VALGRIND=1 ;; --specific_function=*) SPECIFIC_FUNCTION=`$ECHO $opt | cut -d '=' -f 2` LIB_LISTS="*.h" ;; --skip_function=*) SKIP_FUNCTION=`$ECHO $opt | cut -d '=' -f 2` ;; --create_program_only) TEST_SCRIPT_ONLY=1 ;; --build_program_only) BUILD_ONLY=1 ;; esac done CHECK_INCLUDES=`$ECHO "$INCLUDES" | grep -- '-DUNIT_TEST'` if [ -z "$CHECK_INCLUDES" ]; then if [ -f lilyterm -o -f lilyterm-dbg -o -f lilyterm_dev ]; then $MAKE clean fi $MAKE uto || exit 1 INCLUDES="-DSAFEMODE -DDEBUG -DFATAL -DDEVELOP -DUNIT_TEST" fi PKGCONFIG=`whereis "pkg-config" | tr -s ' ' '\n' | grep "bin/""pkg-config""$" | head -n 1` if [ -z "$PKGCONFIG" ]; then $PRINTF "\033[1;31m** ERROR: Command pkg-config is not found!\033[0m\n" exit 1 fi VTE=`$PKGCONFIG --exists 'vte' && $ECHO 'vte'` if [ "$VTE" = "vte" ]; then GTK=`$PKGCONFIG --exists 'gtk+-2.0' && $ECHO 'gtk+-2.0'` if [ "$GTK" != "gtk+-2.0" ]; then $PRINTF "\033[1;31m** ERROR: You need to install GTK+2 develop package first to run this unit test program!\033[0m\n" exit 1 fi else VTE=`$PKGCONFIG --exists 'vte-2.91' && $ECHO 'vte-2.91'` if [ "$VTE" = "vte-2.91" ]; then LDFLAGS='-lX11' GTK=`$PKGCONFIG --exists 'gtk+-3.0' && $ECHO 'gtk+-3.0'` if [ "$GTK" != "gtk+-3.0" ]; then $PRINTF "\033[1;31m** ERROR: You need to install GTK+3 develop package first to run this unit test program!\033[0m\n" exit 1 fi else VTE=`$PKGCONFIG --exists 'vte-2.90' && $ECHO 'vte-2.90'` if [ "$VTE" = "vte-2.90" ]; then GTK=`$PKGCONFIG --exists 'gtk+-3.0' && $ECHO 'gtk+-3.0'` if [ "$GTK" != "gtk+-3.0" ]; then $PRINTF "\033[1;31m** ERROR: You need to install GTK+3 develop package first to run this unit test program!\033[0m\n" exit 1 fi else exit 1 fi fi fi if [ -z "$CC" ]; then CC=gcc fi if [ -z "$CFLAGS" ]; then CFLAGS="-Wall -Werror -O -g" fi OBJ="menu.o profile.o dialog.o pagename.o notebook.o font.o property.o window.o misc.o console.o main.o unit_test.o" $CAT > gdb_batch << EOF run backtrace full info registers thread apply all backtrace quit EOF if [ -f gdb.log ]; then $PRINTF "\n\033[1;36mDeleting gdb.log...\033[0m\n\n" rm -f gdb.log fi if [ -f valgrind.log ]; then $PRINTF "\n\033[1;36mDeleting valgrind.log...\033[0m\n\n" rm -f valgrind.log fi # sed '/^\/\*/,/ \*\/$/d': Delete [ /* blah ... blah */ ] (multi lines) # sed -e 's/[ \t]*\/\*[ \t]*.*[ \t]*\*\///g': Delete [ /* blah ... blah */ ] (single line) # sed -e 's/[ \t]*\/\/.*//g': Delete [ // blah ... blah ] # sed -e '/[ \t]*#[ \t]*ifdef[ \t]*USE_GTK3_GEOMETRY_METHOD/,/#[ \t]*endif[ \t]*/d': clear #ifdef USE_GTK3_GEOMETRY_METHOD ... #endif # sed -e '/^[ \t]*#.*/d' | tr -d '\n': Delete [ #include ] # sed '/^[ \t]*typedef enum/,/}.*;[ \t]*$/d': Delete typedef enum # tr -d '\n': Delete [ ] # sed -e 's/[\t ][\t ]*/_SPACE_/g': convert and to "_SAPCE_" # sed -e 's/;/;\n/g': Add [ ] back # sed -e 's/_SPACE_/ /g': convert "_SAPCE_" to # sed -e '/[ \t]*struct.*{/,/.*}[ \t]*;/d': clear struct # sed -e 's/ *\([)(,]\) */ \1 /g': Add to the start and end of )(, # sed -e 's/[\t ][\t ]*/_SPACE_/g': convert and to "_SAPCE_" again # sed -e '/_SPACE_(_SPACE_)_SPACE_/d': clear something like [ blah ( ) ] for DATA in `$CAT $LIB_LISTS | sed '/^\/\*/,/ \*\/$/d' | sed -e 's/[ \t]*\/\*[ \t]*.*[ \t]*\*\///g' | sed -e 's/[ \t]*\/\/.*//g' | sed -e '/^[ \t]*#.*/d' | sed '/^[ \t]*typedef.*;[ \t]*$/d' | sed '/^[ \t]*typedef enum/,/}.*;[ \t]*$/d' | tr -d '\n' | sed -e 's/[\t ][\t ]*/_SPACE_/g' | sed -e 's/;/;\n/g' | sed -e 's/_SPACE_/ /g' | sed -e '/[ \t]*struct.*{/,/.*}[ \t]*;/d' | sed -e 's/ *\([)(,]\) */ \1 /g' | sed -e 's/[\t ][\t ]*/_SPACE_/g' | sed -e '/_SPACE_(_SPACE_)_SPACE_/d'`; do if [ $FUNCTION_FOUND -eq 1 ]; then break fi if [ -n "$SKIP_FUNCTION" ]; then CHECK_STR="_SPACE_\**"$SKIP_FUNCTION"_SPACE_" CHECK_PROGRAM=`$ECHO "$DATA" | grep "$CHECK_STR"` if [ -n "$CHECK_PROGRAM" ]; then continue fi fi if [ -n "$SPECIFIC_FUNCTION" ]; then CHECK_STR="_SPACE_\**"$SPECIFIC_FUNCTION"_SPACE_" CHECK_PROGRAM=`$ECHO "$DATA" | grep "$CHECK_STR"` if [ -z "$CHECK_PROGRAM" ]; then continue else FUNCTION_FOUND=1 fi fi MAX_STR=0 MAX_VAR=-1 unset FULL_FUNCTION # $ECHO "Got original data = $DATA" # sed -e 's/_SPACE_\([)(,]\)_SPACE_/ \1 /g': convert _SPACE_)(,_SPACE_ to " ) " " ( " or " , " # sed -e 's/ , / /g': convert " , " to " " # sed -e 's/const_SPACE_//g': clear const_SPACE_ DATA_STR=`$ECHO $DATA | sed -e 's/_SPACE_\([)(,]\)/ \1/g' | sed -e 's/\([)(,]\)_SPACE_/\1 /g' | sed -e 's/ , / /g' | sed -e 's/const_SPACE_//g'` # $ECHO "GOT DATA_STR = $DATA_STR" 1>&2 START=0 END=0 VAR=-1 for STR in $DATA_STR; do # $ECHO "GOT and Checking STR='$STR'" case $START in 0) if [ "$STR" = "(" ]; then START=1 FUNCTION="(" # $ECHO "GOT FUNCTION = $FUNCTION" else # Got the function name. unset FUNC_STAR unset FUNC_END unset SPACE # sed -e 's/_SPACE_/ /g' : convert "_SAPCE_" to # sed -e 's/^ *//g': clear the leading # sed -e 's/ *$//g': clear the end # sed -e 's/^.* \**\([^ ]*\)/\1/g': clear the declare, like "gchar **" FUNC_NAME=`$ECHO $STR | sed -e 's/_SPACE_/ /g' | sed -e 's/^ *//g' | sed -e 's/ *$//g' | sed -e 's/^.* \**\([^ ]*\)/\1/g'` # $ECHO "GOT FUNC_NAME = $FUNC_NAME" $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;33m** Createing unit_test.c...\033[0m\n" fi ;; 1) if [ "$STR" = ")" ]; then FUNCTION=`$ECHO $FUNCTION | sed -e 's/,*$/)/g'` START=2 continue fi # $ECHO "CHECKING: GOT FUNCTION = $FUNCTION" # $ECHO "Testing $STR..." 1>&2 # sed -e 's/_SPACE_/ /g': convert "_SAPCE_" to # sed -e 's/^\(.* \**\) *\([^][ ]*\)\([[]*\)[^][ ]*\([]]*\)/\1\3\4/g': convert "gchar *profile[A]" to gchar *[] # sed -e 's/^ *//g': clear the leading # sed -e 's/ *$//g': clear the end # sed -e 's/^.* \**\([^ ]*\)/\1/g': clear the variable STR=`$ECHO $STR | sed -e 's/_SPACE_/ /g' | sed -e 's/^\(.* \**\) *\([^][ ]*\)\([[]*\)[^][ ]*\([]]*\)/\1\3\4/g' | sed -e 's/^ *//g' | sed -e 's/ *$//g' | sed -e 's/ *\*/*/g'` # $ECHO "GOT and Testing \"$STR\"..." 1>&2 case $STR in '...') ;; 'GtkWidget*' | 'GSourceFunc' | 'gpointer' | 'GtkColorSelection*' | 'GtkTreePath*' | 'GtkTreeModel*' | 'GtkTreeIter*' | 'GdkEvent*' | 'GdkEventKey*' | 'GtkCellLayout*' | 'GtkTreeSelection*' | 'GtkClipboard*' | 'GError*' | 'GSList*' | 'GIOChannel*' | 'GtkFileChooser*' | 'GtkRequisition*' | 'GdkEventButton*' | 'GtkStyle*' | 'GtkAllocation*' | 'GdkEventFocus*' | 'GdkEventWindowState*' | 'GdkColor []' | 'GdkRGBA []' | 'PangoFontFamily*' | 'PangoFontFace*' | 'GtkColorButton*' | 'GtkColorChooser*') FUNCTION="$FUNCTION NULL," ;; 'GKeyFile*'|'GdkColor'|'GdkRGBA') OLD_SPACE="$SPACE" SPACE="$SPACE""_SPACE_" VAR=`expr $VAR + 1` case $STR in 'GKeyFile*') FUNC_STAR="$FUNC_STAR\n$SPACE""GKeyFile *V$VAR = g_key_file_new();" FUNCTION="$FUNCTION V$VAR," FUN_DATA="$SPACE""g_key_file_free(V$VAR);\n" ;; 'GdkColor') FUNC_STAR="$FUNC_STAR\n$SPACE""GdkColor V$VAR;\n$SPACE""V$VAR.red=0xFFFF;\n$SPACE""V$VAR.green=0xFFFF;\n$SPACE""V$VAR.blue=0xFFFF;" FUNCTION="$FUNCTION V$VAR," ;; 'GdkRGBA') FUNC_STAR="$FUNC_STAR\n$SPACE""GdkRGBA V$VAR;\n$SPACE""V$VAR.red=1;\n$SPACE""V$VAR.green=1;\n$SPACE""V$VAR.blue=1;" FUNCTION="$FUNCTION V$VAR," ;; esac if [ -n "$FUNC_END" ]; then FUNC_END="\n$FUNC_END" fi FUNC_END="$FUN_DATA$FUNC_END" unset FUN_DATA SPACE=$OLD_SPACE ;; 'gboolean' | 'gchar' | 'guint' | 'GtkScrollType' | 'gint' | 'pid_t' | 'int' | 'gsize' | 'glong' | 'GdkColor' | 'GdkRGBA' | 'Dialog_Button_Type' | 'Dialog_Find_Type' | 'Dialog_Type_Flags' | 'Font_Name_Type' | 'Key_Bindings' | 'Hints_Type' | 'Window_Status' | 'Geometry_Resize_Type' | 'Font_Reset_Type' | 'Switch_Type' | 'Font_Set_Type' | 'Set_ANSI_Theme_Type' | 'GtkFileChooserAction' | 'GIOCondition' | 'Check_Zero' | 'Check_Max' | 'Check_Min' | 'Check_Empty' | 'Menu_Itemn_Type' | 'Apply_Profile_Type' | 'Clipboard_Type' | 'gchar*' | 'char*' | 'StrLists*' | 'StrAddr**' | 'gdouble' | 'struct Dialog*' | 'struct Window*' | 'struct Page*' | 'struct Color_Data*' | 'struct Preview*' | 'GtkButton*' | 'GtkCellRenderer*' | 'GtkRange*' | 'gchar**' | 'char*[]' | 'char**' | 'gsize*' | 'GString*' | 'GtkNotebook*' | 'GdkColor*' | 'GdkRGBA*' | 'VteTerminal*' | 'gboolean*' | 'gint*' | 'guint*' | 'glong*') SPACE="$SPACE""_SPACE_" VAR=`expr $VAR + 1` if [ $MAX_VAR -le $VAR ]; then MAX_VAR=$VAR fi case $STR in 'gboolean' | 'guint' | 'gint' | 'pid_t' | 'int' | 'gsize' | 'glong' | 'gdouble' | 'gchar') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR V$VAR = V[$VAR];" FUNCTION="$FUNCTION V$VAR," ;; 'gboolean*' | 'gint*' | 'guint*' | 'gsize*' | 'glong*') NO_STAR_STR=`$ECHO $STR | sed -e 's/\*$//g'` FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$NO_STAR_STR V$VAR = V[$VAR];" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR G$VAR = NULL;" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""if (V[$VAR]) G$VAR = ($STR)&(V$VAR);" FUNCTION="$FUNCTION G$VAR," ;; 'Dialog_Button_Type' | 'Dialog_Find_Type' | 'Dialog_Type_Flags' | 'Font_Name_Type' | 'Key_Bindings' | 'Hints_Type' | 'Window_Status' | 'Geometry_Resize_Type' | 'Font_Reset_Type' | 'Font_Reset_Type' | 'Switch_Type' | 'Font_Set_Type' | 'Set_ANSI_Theme_Type' | 'Check_Zero' | 'Check_Max' | 'Check_Min' | 'Check_Empty' | 'Menu_Itemn_Type' | 'Apply_Profile_Type' | 'Clipboard_Type') LAST=`grep -B 3 "$STR;" *.h | sed -e '/\.h[-:][ \t]*#/d'| tail -n 2 | head -n 1 | head -n 1| sed -e 's/^.*[ \t][ \t]*\([^ \t]*\),.*/\1/g'` # $ECHO Got LAST=$LAST # $ECHO Got STR=$STR FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<=$LAST; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR V$VAR = V[$VAR];" FUNCTION="$FUNCTION V$VAR," ;; 'GtkScrollType') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<=GTK_SCROLL_END; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR V$VAR = V[$VAR];" FUNCTION="$FUNCTION V$VAR," ;; 'GtkFileChooserAction') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<=GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR V$VAR = V[$VAR];" FUNCTION="$FUNCTION V$VAR," ;; 'GIOCondition') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<=G_IO_NVAL; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR V$VAR = V[$VAR];" FUNCTION="$FUNCTION V$VAR," ;; 'gchar') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""$STR V$VAR = CHAR[V[$VAR]];" FUNCTION="$FUNCTION V$VAR," ;; 'gchar*' | 'char*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""gchar *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = g_strdup(\"\");" FUNCTION="$FUNCTION V$VAR," FUN_DATA="$FUN_DATA$SPACE""_SPACE_""g_free(V$VAR);\n" ;; 'StrLists*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""StrLists *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = g_strdup(\"\");" FUNCTION="$FUNCTION V$VAR, NULL" FUN_DATA="$FUN_DATA$SPACE""_SPACE_""g_free(V$VAR);\n" ;; 'StrAddr**') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""StrAddr *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = g_strdup(\"\");" FUNCTION="$FUNCTION &V$VAR," # FUN_DATA="$SPACE""_SPACE_""g_debug(\"$FUNC_NAME(): Trying to free V$VAR \\\"%s\\\" (%p)\", V$VAR, V$VAR);\n" FUN_DATA="$FUN_DATA$SPACE""_SPACE_""g_free(V$VAR);\n" ;; 'struct Dialog*' | 'struct Window*' | 'struct Page*' | 'struct Color_Data*' | 'struct Preview*') STRUCT=`$ECHO $STR | sed -e 's/struct \(.*\)\*/\1/g'` FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""struct $STRUCT *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = g_new0(struct $STRUCT, 1);" FUNCTION="$FUNCTION V$VAR," FUN_DATA="$SPACE""_SPACE_""g_free(V$VAR);\n" ;; 'GtkButton*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GtkWidget *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = gtk_button_new();" FUNCTION="$FUNCTION GTK_BUTTON(V$VAR)," FUN_DATA="$SPACE""_SPACE_""if (V$VAR) gtk_widget_destroy(V$VAR);\n" ;; 'GtkCellRenderer*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GtkCellRenderer *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = gtk_cell_renderer_text_new();" FUNCTION="$FUNCTION V$VAR," # FUN_DATA="$SPACE""_SPACE_""if (V$VAR) gtk_object_destroy(GTK_OBJECT(V$VAR));\n" ;; 'GtkRange*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GtkWidget *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = gtk_hscale_new_with_range(-1, 1, 0.1);" FUNCTION="$FUNCTION GTK_RANGE(V$VAR)," FUN_DATA="$SPACE""_SPACE_""if (V$VAR) gtk_widget_destroy(V$VAR);\n" ;; 'gchar**' | 'char*[]' | 'char**') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""gchar **V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = g_strsplit(\"\", \" \", -1);" FUNCTION="$FUNCTION V$VAR," FUN_DATA="$SPACE""_SPACE_""g_strfreev(V$VAR);\n" ;; 'GString*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GString *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = g_string_new(NULL);" FUNCTION="$FUNCTION V$VAR," FUN_DATA="$SPACE""_SPACE_""if (V$VAR) g_string_free(V$VAR, TRUE);\n" ;; 'GtkNotebook*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GtkWidget *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = gtk_notebook_new();" FUNCTION="$FUNCTION GTK_NOTEBOOK(V$VAR)," FUN_DATA="$SPACE""_SPACE_""if (V$VAR) gtk_widget_destroy(V$VAR);\n" ;; 'GdkColor*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GdkColor *V$VAR = NULL;\n$SPACE""_SPACE_""GdkColor color;\n""$SPACE""_SPACE_""if (V[$VAR]) {\n$SPACE""_SPACE__SPACE_""color.red=0xFFFF;\n$SPACE""_SPACE__SPACE_""color.green=0xFFFF;\n$SPACE""_SPACE__SPACE_""color.blue=0xFFFF;\n$SPACE""_SPACE__SPACE_""V$VAR = &color;\n""$SPACE""_SPACE_""}" FUNCTION="$FUNCTION V$VAR," ;; 'GdkRGBA*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GdkRGBA *V$VAR = NULL;\n$SPACE""_SPACE_""GdkRGBA color;\n""$SPACE""_SPACE_""if (V[$VAR]) {\n$SPACE""_SPACE__SPACE_""color.red=0xFFFF;\n$SPACE""_SPACE__SPACE_""color.green=1;\n$SPACE""_SPACE__SPACE_""color.blue=0xFFFF;\n$SPACE""_SPACE__SPACE_""V$VAR = &color;\n""$SPACE""_SPACE_""}" FUNCTION="$FUNCTION V$VAR," ;; 'VteTerminal*') FUNC_STAR="$FUNC_STAR\n$SPACE""for (V[$VAR]=0; V[$VAR]<2; V[$VAR]++) {" FUNC_STAR="$FUNC_STAR\n$SPACE""_SPACE_""GtkWidget *V$VAR = NULL;\n""$SPACE""_SPACE_""if (V[$VAR]) V$VAR = vte_terminal_new();" FUNCTION="$FUNCTION VTE_TERMINAL(V$VAR)," FUN_DATA="$SPACE""_SPACE_""if (V$VAR) gtk_widget_destroy(V$VAR);\n" ;; *) $ECHO "ERROR: $STR NOT Found!" 1>&2 exit ;; esac FUNC_END="$FUN_DATA$SPACE}\n$FUNC_END" unset FUN_DATA # $ECHO "Got FUNC_STAR = $FUNC_STAR" # $ECHO "Got FUNC_END = $FUNC_END" 1>&2 ;; ')') FUNCTION=`$ECHO $FUNCTION | sed -e 's/,$/)/g'` ;; *) $ECHO "ERROR: \"$STR\" NOT Found!" 1>&2 exit ;; esac ;; 2) case $STR in ';') FUNCTION="$FUNCTION;" ;; *) $ECHO "ERROR: \"$STR\" NOT Found!" 1>&2 exit ;; esac ;; *) $ECHO "ERROR: \"$START\" is out of range!" 1>&2 esac done # $ECHO "GOT FULL_FUNCTION = $FULL_FUNCTION" 1>&2 # $ECHO "GOT FUNC_STAR = $FUNC_STAR" 1>&2 # $ECHO "GOT FUNCTION = $FUNCTION" 1>&2 # $ECHO "GOT FUNC_END = $FUNC_END" 1>&2 FUNCTION=`$ECHO $FUNCTION | sed -e 's/^( /(/g'` FUNCTION="$SPACE""_SPACE_""$FUNC_NAME$FUNCTION" FULL_FUNCTION="$FULL_FUNCTION\n g_debug(\"UNIT TEST: testing $FUNC_NAME()...\");" FULL_FUNCTION="$FULL_FUNCTION$FUNC_STAR\n$FUNCTION\n$FUNC_END" MAX_VAR=`expr $MAX_VAR + 1` grep "include <.*>" *.h | cut -f 2 -d : | sed -e 's/^[ \t]//g' | sort | uniq > unit_test.c for FILE in *.h; do $ECHO "#include \"$FILE\"" >> unit_test.c done $CAT >> unit_test.c << EOF int main(int argc, char *argv[]) { EOF if [ $MAX_VAR -gt 0 ]; then $CAT >> unit_test.c << EOF gint V[$MAX_VAR]; EOF fi $CAT >> unit_test.c << EOF gtk_init(&argc, &argv); EOF # $ECHO "GOT FULL_FUNCTION = $FULL_FUNCTION" $ECHO "$FULL_FUNCTION" | sed -e 's/\\n/\n/g' | sed -e 's/_SPACE_/ /g' >> unit_test.c $CAT >> unit_test.c << EOF return 0; } EOF if [ $TEST_SCRIPT_ONLY -eq 0 ]; then $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;33m** Compiling unit_test.o...\033[0m\n" $CC $LDFLAGS $CFLAGS $INCLUDES -c unit_test.c `$PKGCONFIG --cflags $GTK $VTE` || exit 1 $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;33m** Compiling unit_test...\033[0m\n" $CC $LDFLAGS $CFLAGS $INCLUDES -o unit_test $OBJ `$PKGCONFIG --cflags --libs $GTK $VTE` || exit 1 # if [ $? != 0 ]; then exit 1; fi if [ $BUILD_ONLY -eq 0 ]; then if [ $RUN_GDB -eq 1 ]; then $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;33m** Testing with $GDB...\033[0m\n" if [ -n "$SPECIFIC_FUNCTION" ]; then $GDB -batch -x ./gdb_batch --args ./unit_test $GTK_DEBUG else $ECHO "Testing $FUNC_NAME() with $GDB..." > /tmp/lilyterm_$FUNC_NAME.log $GDB -batch -x ./gdb_batch --args ./unit_test $GTK_DEBUG >> /tmp/lilyterm_$FUNC_NAME.log 2>&1 CHECK_STR=`tail -n 4 /tmp/lilyterm_$FUNC_NAME.log | grep 'exited normally'` if [ -z "$CHECK_STR" ]; then $CAT /tmp/lilyterm_$FUNC_NAME.log >> gdb.log $ECHO "" >> gdb.log $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;31m** Exit with GDB error!!\033[0m\n" GDB_ERROR=1 GDB_ERROR_PROGRAM="$GDB_ERROR_PROGRAM$FUNC_NAME()\n " else $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;33m** Program exited normally. Clear log...\033[0m\n" fi rm /tmp/lilyterm_$FUNC_NAME.log fi fi if [ $RUN_VALGRIND -eq 1 ]; then $PRINTF "\033[1;36m$FUNC_NAME(): \033[1;33m** Testing with valgrind...\033[0m\n" $ECHO "Testing $FUNC_NAME() with $VALGRIND..." >> valgrind.log $VALGRIND --leak-check=full ./unit_test >> valgrind.log 2>&1 $ECHO "" >> valgrind.log fi fi fi $ECHO "" done if [ -f ./gdb_batch ]; then rm ./gdb_batch fi if [ $GDB_ERROR -eq 1 ]; then $PRINTF "\n\033[1;31mERROR: \033[1;36mThis unit test program had exited with GDB error.\n LIST: \033[1;33m`printf "$GDB_ERROR_PROGRAM" | sed -e '$d'`\033[1;36m\n Please check \033[1;32mgdb.log\033[1;36m for feature information!!\033[0m\n\n" fi src/window.c000066400000000000000000004312631246562641500133440ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include "window.h" extern gboolean proc_exist; // if window_list = NULL, call gtk_window_quit() extern GList *window_list; gboolean checked_profile_version = FALSE; extern gboolean single_process; GtkWidget *active_window = NULL; GtkWidget *last_active_window = NULL; GtkWidget *menu_active_window = NULL; gboolean exceed_PID_MAX_DEFAULT = FALSE; struct Process_Data *process_data = NULL; extern struct Error_Data error_data; extern gboolean force_to_quit; extern gint dialog_activated; extern gboolean menu_activated; gboolean safe_mode = FALSE; extern gboolean confirm_to_execute; // user_environ should be separated with // win_data_orig and page_data_orig are used when dragging a vte to root window. GtkNotebook *new_window(int argc, char *argv[], gchar *shell, gchar *environment, gchar *locale_list, gchar *PWD, gchar *HOME, const gchar *VTE_CJK_WIDTH_STR, gboolean VTE_CJK_WIDTH_STR_overwrite_profile, const gchar *wmclass_name, gchar *wmclass_class, gchar *user_environ, gchar *encoding, gboolean encoding_overwrite_profile, gchar *lc_messages, struct Window *win_data_orig, struct Page *page_data_orig) { #ifdef DETAIL g_debug("! Launch new_window() with argc = %d, VTE_CJK_WIDTH_STR = %s, " "user_environ = %s, encoding = %s, win_data_orig = %p, page_data_orig = %p", argc, VTE_CJK_WIDTH_STR, user_environ, encoding, win_data_orig, page_data_orig); // g_debug("! environment = %s", environment); print_array("! Launch new_window() with argv", argv); #endif struct Window *win_data = g_new0(struct Window, 1); #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif // g_debug("new_window(): Append win_data(%p) to window_list!", win_data); window_list = g_list_append (window_list, win_data); // ---- create main window ---- // win_data->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); #ifdef NO_RESIZE_GRIP gtk_window_set_has_resize_grip(GTK_WINDOW(win_data->window), FALSE); #endif gtk_window_set_title(GTK_WINDOW(win_data->window), PACKAGE); set_window_icon(win_data->window); // save the data first // g_debug("Save window = %p and win_data = %p when initing window!", win_data->window, win_data); g_object_set_data(G_OBJECT(win_data->window), "Win_Data", win_data); // win_data->argc = argc; // win_data->argv = argv; // win_data->command = argv[0]; win_data->home = g_strdup(HOME); win_data->init_dir = get_init_dir(-1, PWD, HOME); #ifdef SAFEMODE if (win_data->init_dir) { #endif if (g_chdir(win_data->init_dir)) { g_free(win_data->init_dir); win_data->init_dir = NULL; } #ifdef SAFEMODE } #endif if (shell && shell[0]!='\0') win_data->shell = g_strdup(shell); else { struct passwd *user_data = getpwuid(getuid()); if (user_data) win_data->shell = g_strdup(user_data->pw_shell); } if ((win_data->shell==NULL) || (win_data->shell[0]=='\0')) { g_free(win_data->shell); win_data->shell = g_strdup("/bin/sh"); } if ((wmclass_name == NULL) || (wmclass_name[0]=='\0')) wmclass_name = BINARY; if ((wmclass_class == NULL) || (wmclass_class[0]=='\0')) wmclass_class = PACKAGE; win_data->wmclass_name = g_strdup(wmclass_name); win_data->wmclass_class = g_strdup(wmclass_class); #ifdef SAFEMODE if ((wmclass_class) && (wmclass_class[0]>='a') && (wmclass_class[0]<='z')) #else if ((wmclass_class[0]>='a') && (wmclass_class[0]<='z')) #endif win_data->wmclass_class[0] += ('A' - 'a'); gtk_window_set_wmclass(GTK_WINDOW(win_data->window), win_data->wmclass_name, win_data->wmclass_class); win_data->runtime_locale_list = g_strdup(locale_list); win_data->runtime_encoding = g_strdup(encoding); win_data->runtime_LC_MESSAGES = g_strdup(lc_messages); // g_debug("win_data->runtime_encoding = %s", win_data->runtime_encoding); // g_debug("win_data->runtime_LC_MESSAGES = %s", win_data->runtime_LC_MESSAGES); win_data->environment = g_strdup(environment); // ---- environ, command line option and user settings---- // if (win_data_orig==NULL) { if (! window_option(win_data, encoding, argc, argv)) { // Don't execute the command! // g_debug("new_window(1): Remove win_data(%p) from window_list!", win_data); window_list = g_list_remove (window_list, win_data); destroy_window(win_data); #ifdef SAFEMODE win_data = NULL; #endif return NULL; } // if (-e option) and (win_data->execute_command_in_new_tab)... // g_debug("last_active_window = %p, win_data->argc = %d, win_data->execute_command_in_new_tab = %d", // last_active_window, win_data->argc, win_data->execute_command_in_new_tab); if ((last_active_window) && (((win_data->argc) && (win_data->execute_command_in_new_tab)) || win_data->join_as_new_tab)) { // g_debug ("Run the -e option on the new tab of current window!"); gint i, init_tab_number = win_data->init_tab_number; struct Window *active_win_data = (struct Window *)g_object_get_data(G_OBJECT( last_active_window), "Win_Data"); #ifdef SAFEMODE // Treat it as win_data->execute_command_in_new_tab = FALSE if (active_win_data!=NULL) { #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT( active_win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data!=NULL) { #endif active_win_data->command = win_data->command; active_win_data->argv = win_data->argv; active_win_data->argc = win_data->argc; active_win_data->hold = win_data->hold; if (win_data->custom_tab_names_str) { if (active_win_data->custom_tab_names_str) { g_string_append_printf(active_win_data->custom_tab_names_str, "%c%s", '\x10', win_data->custom_tab_names_str->str); g_strfreev(active_win_data->custom_tab_names_strs); } else active_win_data->custom_tab_names_str = g_string_new(win_data->custom_tab_names_str->str); active_win_data->custom_tab_names_strs = split_string(active_win_data->custom_tab_names_str->str, "\x10", -1); active_win_data->custom_tab_names_total = count_char_in_string(active_win_data->custom_tab_names_str->str, '\x10') + 1; // g_debug("(%p): Got win_data->custom_tab_names_str = %s win_data->custom_tab_names_total = %d " // "win_data->custom_tab_names_current = %d", // active_win_data, active_win_data->custom_tab_names_str->str, // active_win_data->custom_tab_names_total, win_data->custom_tab_names_current); } gchar *FINAL_encoding = encoding; if ( (! encoding_overwrite_profile) && win_data->default_encoding && win_data->default_encoding[0]!='\0') FINAL_encoding = win_data->default_encoding; const gchar *FINAL_VTE_CJK_WIDTH = VTE_CJK_WIDTH_STR; if ( (! VTE_CJK_WIDTH_STR_overwrite_profile) && win_data->VTE_CJK_WIDTH_STR && win_data->VTE_CJK_WIDTH_STR[0] != '\0') FINAL_VTE_CJK_WIDTH = win_data->VTE_CJK_WIDTH_STR; // g_debug("send win_data->VTE_CJK_WIDTH_STR = %s to add_page()", // FINAL_VTE_CJK_WIDTH_STR); for (i=0; inotebook)); // g_debug("send win_data->VTE_CJK_WIDTH_STR = %s to add_page()", // win_data->VTE_CJK_WIDTH_STR); // g_debug("win_data->init_tab_number = %d, i = %d", win_data->init_tab_number, i); // g_debug("win_data->default_encoding = %s, encoding = %s", // win_data->default_encoding, encoding); // g_debug("new_encoding = %s", new_encoding); // struct Page *add_page(struct Window *win_data, // struct Page *page_data_prev, // GtkWidget *menuitem_encoding, // gchar *encoding, // gchar *runtime_locale_encoding, // gchar *locale, // gchar *environments, // gchar *user_environ, // gchar *VTE_CJK_WIDTH_STR, // gboolean add_to_next) if ( ! add_page(active_win_data, page_data, NULL, FINAL_encoding, encoding, win_data->default_locale, environment, user_environ, FINAL_VTE_CJK_WIDTH, FALSE)) gtk_notebook_set_current_page(GTK_NOTEBOOK(active_win_data->notebook), current_page_no); } // g_debug("new_window(2): Remove win_data(%p) from window_list!", win_data); window_list = g_list_remove (window_list, win_data); destroy_window(win_data); #ifdef SAFEMODE win_data=NULL; #endif return NULL; #ifdef SAFEMODE } } #endif } get_user_settings(win_data, encoding); } else { win_data_dup(win_data_orig, win_data); #ifdef ENABLE_RGBA // the init_rgba() must run before the window is mapped! if (win_data->use_rgba == -1) init_rgba(win_data); #endif } if (VTE_CJK_WIDTH_STR && VTE_CJK_WIDTH_STR[0] != '\0') { g_free(win_data->VTE_CJK_WIDTH_STR); win_data->VTE_CJK_WIDTH_STR = g_strdup(VTE_CJK_WIDTH_STR); } // g_debug("Got win_data->VTE_CJK_WIDTH_STR = %s after get_user_settings()", win_data->VTE_CJK_WIDTH_STR); // ---- the events of window---- // // close application if [Close Button] clicked g_signal_connect(G_OBJECT(win_data->window), "delete_event", G_CALLBACK(window_quit), win_data); // if function key pressed g_signal_connect(G_OBJECT(win_data->window), "key-press-event", G_CALLBACK(window_key_press), win_data); g_signal_connect(G_OBJECT(win_data->window), "key-release-event", G_CALLBACK(window_key_release), win_data); // if get focus, the size of vte is NOT resizeable. g_signal_connect_after(G_OBJECT(win_data->window), "focus-in-event", G_CALLBACK(window_get_focus), win_data); // if lost focus, the size of vte is resizeable. g_signal_connect(G_OBJECT(win_data->window), "focus-out-event", G_CALLBACK(window_lost_focus), win_data); // if the theme/fonts changed g_signal_connect_after(G_OBJECT(win_data->window), "style-set", G_CALLBACK(window_style_set), win_data); #ifdef USE_GTK2_GEOMETRY_METHOD g_signal_connect(G_OBJECT(win_data->window), "size_request", G_CALLBACK(window_size_request), win_data); #endif g_signal_connect(G_OBJECT(win_data->window), "size-allocate", G_CALLBACK(window_size_allocate), win_data); #ifdef USE_GTK2_GEOMETRY_METHOD // fullscreen/unfullscreen g_signal_connect(G_OBJECT(win_data->window), "window-state-event", G_CALLBACK(window_state_event), win_data); #endif // ---- create notebook ---- // win_data->notebook = gtk_notebook_new(); set_widget_thickness(win_data->notebook, 0); gtk_notebook_set_scrollable(GTK_NOTEBOOK(win_data->notebook), TRUE); // if (win_data->show_tabs_bar != FORCE_ON) // gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win_data->notebook), FALSE); hide_and_show_tabs_bar(win_data , win_data->show_tabs_bar); gtk_notebook_set_show_border(GTK_NOTEBOOK(win_data->notebook), FALSE); // We used markup on tab names, so that we can't use popup on the notebook. // gtk_notebook_popup_enable(win_data->notebook); // Enable drag and drog #ifdef ENABLE_DRAG_AND_DROP gtk_notebook_set_group_name (GTK_NOTEBOOK(win_data->notebook), PACKAGE); #endif #ifdef ENABLE_PAGE_ADDED g_signal_connect(G_OBJECT(win_data->notebook), "page-added", G_CALLBACK(notebook_page_added), win_data); #endif if (win_data->tabs_bar_position) gtk_notebook_set_tab_pos(GTK_NOTEBOOK(win_data->notebook), GTK_POS_BOTTOM); gtk_container_add(GTK_CONTAINER(win_data->window), win_data->notebook); #ifdef ENABLE_TAB_REORDER g_signal_connect(G_OBJECT(win_data->notebook), "page-reordered", G_CALLBACK(reorder_page_number), win_data->window); #endif #ifdef ENABLE_DRAG_AND_DROP g_signal_connect(G_OBJECT(win_data->notebook), "create-window", G_CALLBACK(create_window), win_data); #endif #ifdef GEOMETRY g_signal_connect(G_OBJECT(win_data->notebook), "size-allocate", G_CALLBACK(widget_size_allocate), "notebook"); #endif // ---- add a new page---- // gchar *FINAL_encoding = encoding; if ( (! encoding_overwrite_profile) && win_data->default_encoding && win_data->default_encoding[0]!='\0') FINAL_encoding = win_data->default_encoding; const gchar *FINAL_VTE_CJK_WIDTH = VTE_CJK_WIDTH_STR; if ( (! VTE_CJK_WIDTH_STR_overwrite_profile) && win_data->VTE_CJK_WIDTH_STR && win_data->VTE_CJK_WIDTH_STR[0] != '\0') FINAL_VTE_CJK_WIDTH = win_data->VTE_CJK_WIDTH_STR; // g_debug("new_window(): encoding = %s", encoding); // add a new page to notebook. run_once=TRUE. if (page_data_orig==NULL) { // FIXME: Will it different if win_data_orig==NULL or not? gint i; // g_debug("win_data->init_tab_number = %d", win_data->init_tab_number); for (i=0; iinit_tab_number; i++) { // g_debug("send win_data->VTE_CJK_WIDTH_STR = %s to add_page()", // win_data->VTE_CJK_WIDTH_STR); // g_debug("win_data->init_tab_number = %d, i = %d", win_data->init_tab_number, i); // add_page(struct Window *win_data, // struct Page *page_data_prev, // GtkWidget *menuitem_encoding, // gchar *encoding, // gchar *locale, // gchar *environments, // gchar *user_environ, // gchar *VTE_CJK_WIDTH_STR, // gboolean add_to_next) if ( ! add_page(win_data, NULL, NULL, FINAL_encoding, encoding, win_data->default_locale, NULL, user_environ, FINAL_VTE_CJK_WIDTH, TRUE)) return NULL; } } else { // It is for the new window which dragged the vte tab to the root window // for create_menu() #ifdef SAFEMODE if ((win_data != NULL) && (win_data_orig != NULL)) { #endif win_data->current_vte = win_data_orig->current_vte; #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) win_data->hints_type = HINTS_SKIP_ONCE; # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! new_window(win_data %p): set win_data->hints_type = %d !!\033[0m\n", ANSI_COLOR_BLUE, win_data, win_data->hints_type); # endif resize_to_exist_widget(win_data); #endif #ifdef SAFEMODE } #endif } // gtk_window_set_gravity(GTK_WINDOW(win_data->window), GDK_GRAVITY_NORTH); // gtk_window_move (GTK_WINDOW(win_data->window), 0, 0); // ---- finish! ---- // #ifndef UNIT_TEST // Due to the bug(?) in GTK3+, window must shown before gtk_window_parse_geometry() // ERR MSG: gtk_window_parse_geometry() called on a window with no visible children; // the window should be set up before gtk_window_parse_geometry() is called. gtk_widget_show_all(win_data->window); // if (gtk_widget_get_window (win_data->window)) // g_debug("WINDOW(%p): WINDOWID = %ld", win_data->window, GDK_WINDOW_XID (gtk_widget_get_window (win_data->window))); #endif if (win_data_orig==NULL) { if (win_data->geometry && (win_data->geometry[0]!='\0')) { #ifdef GEOMETRY g_debug("@ new_window(for %p): Trying to set the geometry to %s...", win_data->window, win_data->geometry); #endif #ifdef USE_XPARSEGEOMETRY gint offset_x = 0, offset_y = 0; guint column, row; if (XParseGeometry (win_data->geometry, &offset_x, &offset_y, &column, &row)) gtk_window_move (GTK_WINDOW(win_data->window), offset_x, offset_y); #else gtk_window_parse_geometry(GTK_WINDOW(win_data->window), win_data->geometry); #endif } } // gtk_window_set_focus(GTK_WINDOW(win_data->window), win_data->current_vte); // g_debug("new_window(): call window_resizable() with run_once = 1"); // FIXME: I don't think we should call window_resizable() over and over. // window_resizable(win_data->window, win_data->current_vte, 1, 1); // g_debug("create menu!!"); // input method menu can't not be shown before window is shown. if (create_menu(win_data) == FALSE) return NULL; //if (page_data_orig!=NULL) //{ // // fix the color data after menu had been created. // // g_debug("Launch get_and_update_page_name() in new_window()!"); // get_and_update_page_name(page_data_orig); //} // fullscreen! #ifdef USE_GTK2_GEOMETRY_METHOD if (win_data->startup_fullscreen) #else if (win_data->window_status==WINDOW_START_WITH_FULL_SCREEN) #endif { #ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! new_window(win_data %p): calling deal_key_press(KEY_FULL_SCREEN)!!\033[0m\n", ANSI_COLOR_WHITE, win_data); #endif GtkWidget *menu_active_windows_orig = menu_active_window; menu_active_window = win_data->window; // g_debug("win_data->show_scroll_bar = %d", win_data->show_scroll_bar); deal_key_press(win_data->window, KEY_FULL_SCREEN, win_data); menu_active_window = menu_active_windows_orig; } #ifdef UNIT_TEST gtk_widget_destroy(win_data->window); return NULL; #else return GTK_NOTEBOOK(win_data->notebook); #endif } gchar *get_init_dir(pid_t pid, gchar *pwd, gchar *home) { #ifdef DETAIL g_debug("! Launch get_init_dir() with pwd = %s, home = %s", pwd, home); #endif if (pwd && (g_file_test(pwd, G_FILE_TEST_EXISTS))) return g_strdup(pwd); if (pid>0) { gchar *dir = get_tab_name_with_current_dir(pid); // g_debug("get_init_dir: get_tab_name_with_current_dir(%d) = %s", pid, dir); #ifdef SAFEMODE if (dir && (g_file_test(dir, G_FILE_TEST_EXISTS))) return dir; #else if (g_file_test(dir, G_FILE_TEST_EXISTS)) return dir; #endif } if (home && (g_file_test(home, G_FILE_TEST_EXISTS))) return g_strdup(home); gchar *dir = g_get_current_dir(); #ifdef SAFEMODE if (dir && (g_file_test(dir, G_FILE_TEST_EXISTS))) return dir; #else if (g_file_test(dir, G_FILE_TEST_EXISTS)) return dir; #endif return g_strdup("/"); } void set_window_icon(GtkWidget *window) { #ifdef DETAIL g_debug("! Launch set_window_icon() on window = %p", window); #endif #ifdef SAFEMODE if (window==NULL) return; #endif GdkPixbuf *icon = gdk_pixbuf_new_from_file(ICON_PATH, NULL); if (icon) { gtk_window_set_icon(GTK_WINDOW(window), icon); g_object_unref(icon); } } gboolean window_quit(GtkWidget *window, GdkEvent *event, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch window_quit() with window = %p, win_data = %p", window, win_data); #endif #ifdef SAFEMODE if ((window==NULL) || (win_data==NULL)) return TRUE; #endif menu_active_window = window; if (win_data->confirm_to_kill_running_command) { gint total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)); // g_debug("total_page = %d in window_quit()", total_page); if (total_page>1) { if (win_data->confirm_to_close_multi_tabs) // confirm to close multi pages. dialog(NULL, CONFIRM_TO_CLOSE_MULTI_PAGES); else close_multi_tabs(win_data, FALSE); } else close_page(win_data->current_vte, CLOSE_WITH_WINDOW_CLOSE_BUTTON); } else { force_to_quit=TRUE; close_page(win_data->current_vte, CLOSE_TAB_NORMAL); } // g_debug("Close window finish!"); // It will be segmentation fault if retrun FALSE return TRUE; } GString *close_multi_tabs(struct Window *win_data, int window_no) { #ifdef DETAIL g_debug("! Launch close_multi_tabs() with win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return NULL; #endif gint i; gint total_page = -1; #ifdef SAFEMODE if (win_data->notebook) #endif total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)); struct Page *page_data = NULL; // g_debug("total_page = %d in close_multi_tabs()", total_page); if (((! force_to_quit) && (total_page>1)) || window_no) { GString *child_process_list = g_string_new(NULL); process_data = g_new0(struct Process_Data, PID_MAX_DEFAULT); #ifdef SAFEMODE if (process_data==NULL) return child_process_list; #endif for (i=0; iwindow, window_no, i+1, child_process_list, page_data->pid, win_data, TRUE); else child_process_list = get_child_process_list(0, 0, i+1, child_process_list, page_data->pid, win_data, TRUE); } //for (i=0; i<10; i++) // g_debug("i=%d, window = %p, page_no = %d, ppid = %d, cmd = %s", // i, process_data[i].window, process_data[i].page_no, process_data[i].ppid, process_data[i].cmd); if (window_no) { clean_process_data(); return child_process_list; } #ifdef SAFEMODE if (child_process_list && child_process_list->len) #else if (child_process_list->len) #endif { if (! display_child_process_dialog (child_process_list, win_data, CONFIRM_TO_CLOSE_A_WINDOW_WITH_CHILD_PROCESS)) { g_string_free(child_process_list, TRUE); clean_process_data(); return NULL; } } g_string_free(child_process_list, TRUE); } for (i=total_page-1; i>-1; i--) { page_data = get_page_data_from_nth_page(win_data, i); if (close_page(page_data->vte, CLOSE_WITH_WINDOW_CLOSE_BUTTON)==FALSE) break; } force_to_quit = FALSE; clean_process_data(); return NULL; } void clean_process_data() { #ifdef DETAIL g_debug("! Launch clean_process_data()"); #endif if (process_data) { gint i; for (i=0; istr, win_data, (long)style); #endif gchar *old_temp_data = win_data->temp_data; win_data->temp_data = child_process_list->str; gboolean return_value = (dialog(NULL, style) == GTK_RESPONSE_OK); win_data->temp_data = old_temp_data; return return_value; } // window: shows "Window #%d" in process_list. don't show if 0. // page_no: shows "Page #%d" in process_list. don't show if 0. // pid: the root pid of this page // tpgid: the foreground command of this page // show_foreground: check tpgid=pid or not // entry_pid: the pid list of /proc // entry_tpgid: the the foreground command of entry_pid // ppid: the parent of entry_tpgid // cmd: the cmd of entry_tpgid GString *get_child_process_list(GtkWidget *window, gint window_no, gint page_no, GString *process_list, pid_t pid, struct Window *win_data, gboolean show_foreground) { #ifdef SAFEMODE if (win_data==NULL) return NULL; if (process_list==NULL) process_list = g_string_new(NULL); if (process_list==NULL) return NULL; #endif #ifdef DETAIL g_debug("! Launch get_child_process_list() with window = %p, page_no = %d, process_list = %s, " "pid = %d, win_data = %p, show_foreground = %d", window, page_no, process_list->str, pid, win_data, show_foreground); #endif // Don't return foreground running process // g_debug("Checking a running pid = %d, in get_child_process_list", pid); if (! proc_exist) return process_list; GDir *dir = g_dir_open ("/proc", 0, NULL); if (dir==NULL) goto FINISH; const gchar *entry = g_dir_read_name(dir); if (entry==NULL) goto FINISH; // pid_t tpgid = get_tpgid(pid); // man 5 proc for more details do { pid_t entry_pid = atoi(entry); gchar **stats = NULL; // struct Process_Data *entry_data = g_new0(struct Process_Data, 1); struct Process_Data entry_data = {0}; #ifdef SAFEMODE if (entry_pidbackground_program_whitelists))) || (show_foreground && (pid == entry_pid) && (entry_pid == entry_tpgid) && (! check_string_in_array(entry_data.cmd, win_data->foreground_program_whitelists)))) { #ifdef SAFEMODE if (entry_pidinit_tab_number = 1; win_data->profile = get_user_profile_path(win_data, argc, argv); // g_debug("Got win_data->profile = %s", win_data->profile); gchar *window_role = NULL; gint i; gint getting_tab_name_argc = -1; for (i=0; icustom_window_title_str = window_title; update_window_title(win_data->window, win_data->custom_window_title_str, win_data->window_title_append_package_name); #ifdef SAFEMODE } #endif // g_debug("The title of LilyTerm is specified to %s", // win_data->custom_window_title_str); } } else if ((!strcmp(argv[i], "-R")) || (!strcmp(argv[i], "--role"))) { if (++i==argc) g_critical("missing window role after -R/--role!\n"); else { window_role = convert_str_to_utf8(argv[i], encoding); #ifdef SAFEMODE if ((window_role) && (win_data->window)) #endif gtk_window_set_role (GTK_WINDOW (win_data->window), window_role); // g_debug("The role of LilyTerm is specified to %s", window_role); } } else if ((!strcmp(argv[i], "-t")) || (!strcmp(argv[i], "--tab"))) { if (++i==argc) g_critical("missing tab number after -t/--tab!\n"); else win_data->init_tab_number = atoi(argv[i]); if (win_data->init_tab_number<1) win_data->init_tab_number=1; // g_debug("Init LilyTerm with %d page(s)!", init_tab_number); } else if ((!strcmp(argv[i], "-l")) || (!strcmp(argv[i], "-ls")) || (!strcmp(argv[i], "--login"))) { win_data->login_shell = TRUE; } else if (!strcmp(argv[i], "-ut")) { win_data->utmp = TRUE; } else if ((!strcmp(argv[i], "-H")) || (!strcmp(argv[i], "--hold"))) { // g_debug("Set win_data->hold to TRUE!!"); win_data->hold = TRUE; } else if ((!strcmp(argv[i], "-e")) || (!strcmp(argv[i], "-x")) || (!strcmp(argv[i], "--execute"))) { if (++i==argc) g_critical("missing command after -e/-x/--execute option!\n"); else { // g_debug ("window_option(): call init_prime_user_datas() for win_data %p!", win_data); init_prime_user_datas(win_data); if (win_data->profile) { GKeyFile *keyfile = g_key_file_new(); GError *error = NULL; if (g_key_file_load_from_file(keyfile, win_data->profile, G_KEY_FILE_NONE, &error)) get_prime_user_settings(keyfile, win_data, encoding); else profile_is_invalid_dialog(error, win_data); // g_debug("Got win_data->confirm_to_execute_command = %d", // win_data->confirm_to_execute_command); // g_debug("Got win_data->execute_command_in_new_tab = %d", // win_data->execute_command_in_new_tab); g_key_file_free(keyfile); } win_data->execute_command_whitelists = split_string(win_data->execute_command_whitelist, " ", -1); gboolean execute_command = TRUE; if (win_data->confirm_to_execute_command && confirm_to_execute && (! check_string_in_array(argv[i], win_data->execute_command_whitelists))) { gint j; GString *arg_str = g_string_new(NULL); for (j=0; jstr); gchar *old_temp_data = win_data->temp_data; #ifdef SAFEMODE if (arg_str==NULL) win_data->temp_data = convert_str_to_utf8(NULL, encoding); else #endif win_data->temp_data = convert_str_to_utf8(arg_str->str, encoding); GtkWidget *menu_active_window_orig = menu_active_window; menu_active_window = win_data->window; execute_command = (dialog (NULL, CONFIRM_TO_EXECUTE_COMMAND) == GTK_RESPONSE_OK); menu_active_window = menu_active_window_orig; g_free(win_data->temp_data); win_data->temp_data = old_temp_data; g_string_free(arg_str, TRUE); if (! execute_command) return FALSE; } // IMPORTANT! // g_free(win_data->execute_command_whitelist); // win_data->execute_command_whitelist = NULL; // g_strfreev(win_data->execute_command_whitelists); // win_data->execute_command_whitelists = NULL; // g_free(win_data->default_locale); // win_data->default_locale = NULL; if (execute_command) { win_data->command = argv[i]; win_data->argv = &(argv[i]); win_data->argc = argc-i; } // g_debug("Command = %s", win_data->command); // g_debug("argc = %d", win_data->argc); // g_debug("argv ="); // gint j; // for (j=0; jargc; j++) // g_debug("\t%s", win_data->argv[j]); } break; } else if ((!strcmp(argv[i], "-d")) || (!strcmp(argv[i], "--directory"))) { if (++i==argc) g_critical("missing tab number after -d/--directory!\n"); else { g_free(win_data->init_dir); win_data->init_dir = g_strdup(argv[i]); } // g_debug("+ Init LilyTerm with directory %s !", win_data->init_dir); } else if ((!strcmp(argv[i], "-g")) || (!strcmp(argv[i], "--geometry"))) { if (++i==argc) g_critical("missing window title after -g/--geometry!\n"); else { g_free(win_data->geometry); win_data->geometry = g_strdup(argv[i]); } // g_debug("+ Init LilyTerm with geometry = %s!", win_data->geometry); } else if (!strcmp(argv[i], "--safe-mode")) safe_mode=TRUE; else if ((!strcmp(argv[i], "-j")) || (!strcmp(argv[i], "--join"))) win_data->join_as_new_tab = TRUE; else if ((!strcmp(argv[i], "-n")) || (!strcmp(argv[i], "--tab_names"))) { if (i==(argc-1)) g_critical("missing tab names after -n/--tab_names!\n"); getting_tab_name_argc = i+1; } else if (getting_tab_name_argc==i) { if (win_data->custom_tab_names_str) g_string_append_printf(win_data->custom_tab_names_str, "%c%s", '\x10', argv[i]); else win_data->custom_tab_names_str = g_string_new(argv[i]); getting_tab_name_argc = i+1; } } if (win_data->custom_tab_names_str) { win_data->custom_tab_names_strs = split_string(win_data->custom_tab_names_str->str, "\x10", -1); win_data->custom_tab_names_total = count_char_in_string(win_data->custom_tab_names_str->str, '\x10') + 1; // g_debug("(%p): Got win_data->custom_tab_names_str = %s win_data->custom_tab_names_total = %d", // win_data, win_data->custom_tab_names_str->str, win_data->custom_tab_names_total); if (win_data->init_tab_numbercustom_tab_names_total) win_data->init_tab_number = win_data->custom_tab_names_total; } if (window_role) g_free(window_role); else { #ifdef SAFEMODE if (win_data->window) #endif gtk_window_set_role (GTK_WINDOW (win_data->window), PACKAGE); } return TRUE; } gboolean window_key_press(GtkWidget *window, GdkEventKey *event, struct Window *win_data) { #ifdef FULL if (event) g_debug("! Launch window_key_press() with key = %X (%s), state = %X, win_data = %p", event->keyval, gdk_keyval_name(event->keyval), event->state, win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (event==NULL)) return FALSE; #endif // g_debug ("Get win_data = %p in key_press", win_data); // g_debug ("win_data->keep_vte_size = %X, event->state = %X", win_data->keep_vte_size, event->state); #ifdef USE_GTK2_GEOMETRY_METHOD if (win_data->keep_vte_size) return FALSE; #endif // don't check if only shift key pressed! // FIXME: GDK_asciitilde = 0x7e, it is for some keys like only. if ((event->state & SHIFT_ONLY_MASK) || (event->keyval > GDK_KEY_asciitilde)) { // g_debug("ALL_ACCELS_MASK = %X", ALL_ACCELS_MASK); // g_debug("window_key_press(): Got the function key: %s (%X) with status= %X)", // gdk_keyval_name(event->keyval), event->keyval, event->state); // mods = (event->state|GDK_LOCK_MASK|GDK_MOD2_MASK)&GDK_MODIFIER_MASK; gint i, keyval, mods = event->state | DUD_MASK; if ((event->keyval>=GDK_KEY_a) && (event->keyval<=GDK_KEY_z)) keyval = event->keyval - GDK_KEY_a + GDK_KEY_A; else keyval = event->keyval; if (win_data->enable_key_binding) { for (i=0; iuser_keys[i].mods, win_data->user_keys[i].key, // gdk_keyval_name(win_data->user_keys[i].key)); if ((mods==win_data->user_keys[i].mods) && (keyval==win_data->user_keys[i].key)) { // deal the function key // g_debug("CALL deal_key_press(%d)!", i); return deal_key_press(window, i, win_data); } } } else { if ((mods==win_data->user_keys[KEY_DISABLE_FUNCTION].mods) && (keyval==win_data->user_keys[KEY_DISABLE_FUNCTION].key)) { // deal the function key return deal_key_press(window, KEY_DISABLE_FUNCTION, win_data); } } } return FALSE; } // Default function key: // [0] <~> Disable/Enable function keys // [1] New tab // [2] Close current tab // [3] Rename current tab // [4] Switch to prev tab // [5] Switch to next tab // [6] Switch to first tab // [7] Switch to last tab // [8] Move current page forward // [9] Move current page backward // [10] Move current page to first // [11] Move current page to last // [12-23] Switch to 1st ~ 12th tab // [24] Select all the text in the Vte Terminal box // [25] Copy the text to clipboard // [26] Paste the text in clipboard // [27] <+> Increase the font size of current vte // [28] <-> Decrease the font size of current vte // [29] Reset the font of current tab to original size // [30] Asks to place window in the fullwindow/unfullwindow state // [31] Asks to place window in the fullscreen/unfullscreen state // [32] Dump the runtime data of lilyterm for debug // Pase clipboard. gboolean deal_key_press(GtkWidget *window, Key_Bindings type, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch deal_key_press() with window = %p, type = %d, win_data = %p", window, type, win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return FALSE; #endif gint total_page = -1; #ifdef SAFEMODE if (win_data->notebook) #endif total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); // restore match_regex first... if (! page_data->match_regex_setted) set_hyperlink(win_data, page_data); switch (type) { case KEY_DISABLE_FUNCTION: win_data->enable_key_binding = ! win_data->enable_key_binding; if (win_data->enable_hyperlink) { gint i; for (i=0; iencoding_str, page_data->encoding_str, page_data->locale, NULL, page_data->environ, page_data->VTE_CJK_WIDTH_STR, TRUE); break; case KEY_CLOSE_TAB: // close page // g_debug("Trying to close page!"); close_page (win_data->current_vte, CLOSE_WITH_KEY_STRIKE); break; case KEY_EDIT_LABEL: // edit page's label dialog(NULL, EDIT_LABEL); break; #ifdef ENABLE_FIND_STRING case KEY_FIND: dialog(NULL, FIND_STRING); break; case KEY_FIND_PREV: if (win_data->find_string && (win_data->find_string[0]!=0)) find_str_in_vte (win_data->current_vte, FIND_PREV); else dialog(NULL, FIND_STRING); break; case KEY_FIND_NEXT: if (win_data->find_string && (win_data->find_string[0]!=0)) find_str_in_vte (win_data->current_vte, FIND_NEXT); else dialog(NULL, FIND_STRING); break; #else case KEY_FIND: case KEY_FIND_PREV: case KEY_FIND_NEXT: upgrade_dialog(ENABLE_FIND_STRING_VER); break; #endif case KEY_PREV_TAB: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // switch to pre page if (page_data->page_no) gtk_notebook_prev_page(GTK_NOTEBOOK(win_data->notebook)); else gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), total_page -1); break; case KEY_NEXT_TAB: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // switch to next page if (page_data->page_no == (gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)) - 1)) gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), 0); else gtk_notebook_next_page(GTK_NOTEBOOK(win_data->notebook)); break; case KEY_FIRST_TAB: // switch to first page gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), 0); break; case KEY_LAST_TAB: // switch to last page gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), total_page-1); break; case KEY_MOVE_TAB_FORWARD: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // move current page forward gtk_notebook_reorder_child(GTK_NOTEBOOK(win_data->notebook), page_data->hbox, page_data->page_no -1); break; case KEY_MOVE_TAB_BACKWARD: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // move current page backward if (page_data->page_no == (gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook))-1)) gtk_notebook_reorder_child(GTK_NOTEBOOK(win_data->notebook), page_data->hbox, 0); else gtk_notebook_reorder_child(GTK_NOTEBOOK(win_data->notebook), page_data->hbox, page_data->page_no+1); break; case KEY_MOVE_TAB_FIRST: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // move current page to first gtk_notebook_reorder_child(GTK_NOTEBOOK(win_data->notebook), page_data->hbox, 0); break; case KEY_MOVE_TAB_LAST: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif // move current page to last gtk_notebook_reorder_child(GTK_NOTEBOOK(win_data->notebook), page_data->hbox, -1); break; case KEY_SWITCH_TO_TAB_1: case KEY_SWITCH_TO_TAB_2: case KEY_SWITCH_TO_TAB_3: case KEY_SWITCH_TO_TAB_4: case KEY_SWITCH_TO_TAB_5: case KEY_SWITCH_TO_TAB_6: case KEY_SWITCH_TO_TAB_7: case KEY_SWITCH_TO_TAB_8: case KEY_SWITCH_TO_TAB_9: case KEY_SWITCH_TO_TAB_10: case KEY_SWITCH_TO_TAB_11: case KEY_SWITCH_TO_TAB_12: // switch to #%d page if (total_page > type-KEY_SWITCH_TO_TAB_1) gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), type-KEY_SWITCH_TO_TAB_1); break; case KEY_NEW_WINDOW: create_window(NULL, NULL, 0, 0, win_data); break; case KEY_SELECT_ALL: #ifdef ENABLE_VTE_SELECT_ALL vte_terminal_select_all(VTE_TERMINAL(win_data->current_vte)); #else upgrade_dialog(ENABLE_VTE_SELECT_ALL_VER); #endif break; case KEY_COPY_CLIPBOARD: vte_terminal_copy_clipboard(VTE_TERMINAL(win_data->current_vte)); break; case KEY_PASTE_CLIPBOARD: { if ( (win_data->confirm_to_paste == FALSE) || ( ! confirm_to_paste_form_clipboard(SELECTION_CLIPBOARD, win_data, page_data))) vte_terminal_paste_clipboard(VTE_TERMINAL(win_data->current_vte)); break; } case KEY_COPY_PRIMARY: vte_terminal_copy_primary(VTE_TERMINAL(win_data->current_vte)); break; case KEY_PASTE_PRIMARY: { if (win_data->confirm_to_paste) return confirm_to_paste_form_clipboard(SELECTION_PRIMARY, win_data, page_data); else return FALSE; break; } case KEY_INCREASE_FONT_SIZE: set_vte_font(NULL, FONT_INCREASE); break; case KEY_DECREASE_FONT_SIZE: set_vte_font(NULL, FONT_DECREASE); break; case KEY_RESET_FONT_SIZE: set_vte_font(NULL, FONT_RESET); break; case KEY_MAX_WINDOW: { #ifdef USE_GTK2_GEOMETRY_METHOD if (win_data->fullscreen) gtk_window_unfullscreen(GTK_WINDOW(win_data->window)); else gtk_window_fullscreen(GTK_WINDOW(win_data->window)); break; #endif #ifdef USE_GTK3_GEOMETRY_METHOD // g_debug("deal_key_press (KEY_MAX_WINDOW): win_data->window_status = %d", win_data->window_status); switch (win_data->window_status) { case WINDOW_NORMAL: win_data->window_status = WINDOW_MAX_WINDOW; gtk_window_fullscreen(GTK_WINDOW(win_data->window)); break; case WINDOW_MAX_WINDOW: win_data->window_status = WINDOW_NORMAL; gtk_window_unfullscreen(GTK_WINDOW(win_data->window)); break; case WINDOW_MAX_WINDOW_TO_FULL_SCREEN: case WINDOW_FULL_SCREEN: win_data->window_status = WINDOW_MAX_WINDOW; show_or_hide_tabs_bar_and_scroll_bar(win_data); break; case WINDOW_RESIZING_TO_NORMAL: break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("deal_key_press", "win_data->window_status", win_data->window_status); #endif break; } #endif break; } case KEY_FULL_SCREEN: { #ifdef USE_GTK2_GEOMETRY_METHOD // g_debug("deal_key_press: win_data->fullscreen = %d", win_data->fullscreen); if (win_data->fullscreen) { win_data->true_fullscreen = FALSE; gtk_window_unfullscreen(GTK_WINDOW(win_data->window)); if (win_data->startup_fullscreen) win_data->window_status = FULLSCREEN_UNFS_ING; else win_data->window_status = FULLSCREEN_UNFS_OK; // g_debug("deal_key_press (unfullscreen): win_data->true_fullscreen = %d", win_data->true_fullscreen); win_data->true_fullscreen = FALSE; } else { win_data->true_fullscreen = TRUE; gboolean show_tabs_bar = hide_and_show_tabs_bar(win_data, win_data->show_tabs_bar); gboolean show_scroll_bar = fullscreen_show_hide_scroll_bar(win_data); if ((show_tabs_bar == FALSE) && (show_scroll_bar == FALSE)) gtk_window_fullscreen(GTK_WINDOW(win_data->window)); win_data->window_status = FULLSCREEN_FS_OK; // g_debug("deal_key_press (fullscreen): win_data->true_fullscreen = %d", win_data->true_fullscreen); } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) // g_debug("deal_key_press: win_data->window_status = %d", win_data->window_status); switch (win_data->window_status) { case WINDOW_NORMAL: save_vte_geometry(win_data); case WINDOW_START_WITH_FULL_SCREEN: case WINDOW_APPLY_PROFILE_FULL_SCREEN: { gboolean idle = (win_data->window_status==WINDOW_APPLY_PROFILE_FULL_SCREEN); if ((win_data->window_status==WINDOW_NORMAL) || (win_data->window_status==WINDOW_START_WITH_FULL_SCREEN)) win_data->window_status = WINDOW_FULL_SCREEN; // g_debug("deal_key_press(WINDOW_START_WITH_FULL_SCREEN): win_data->window_status = %d", // win_data->window_status); show_or_hide_tabs_bar_and_scroll_bar(win_data); if (idle) g_idle_add((GSourceFunc)idle_gtk_window_fullscreen, win_data); else gtk_window_fullscreen(GTK_WINDOW(win_data->window)); break; } case WINDOW_MAX_WINDOW: win_data->window_status = WINDOW_MAX_WINDOW_TO_FULL_SCREEN; show_or_hide_tabs_bar_and_scroll_bar(win_data); break; case WINDOW_MAX_WINDOW_TO_FULL_SCREEN: win_data->window_status = WINDOW_MAX_WINDOW; show_or_hide_tabs_bar_and_scroll_bar(win_data); break; case WINDOW_FULL_SCREEN: case WINDOW_APPLY_PROFILE_NORMAL: gtk_window_unfullscreen(GTK_WINDOW(win_data->window)); if (win_data->window_status==WINDOW_FULL_SCREEN) win_data->window_status = WINDOW_RESIZING_TO_NORMAL; g_idle_add((GSourceFunc)idle_show_or_hide_tabs_bar_and_scroll_bar, win_data); break; default: break; } #endif break; } #ifdef ENABLE_MOUSE_SCROLL # ifndef SCROLL_LINE case KEY_SCROLL_UP: # ifdef SAFEMODE if (page_data==NULL) return FALSE; # endif gtk_test_widget_click(page_data->vte, 4, 0); break; case KEY_SCROLL_DOWN: # ifdef SAFEMODE if (page_data==NULL) return FALSE; # endif gtk_test_widget_click(page_data->vte, 5, 0); break; # else case KEY_SCROLL_UP: case KEY_SCROLL_DOWN: # endif case KEY_SCROLL_UP_1_LINE: case KEY_SCROLL_DOWN_1_LINE: { # ifdef SAFEMODE if (page_data==NULL) return FALSE; # endif gdouble value = gtk_adjustment_get_value(page_data->adjustment); switch (type) { case KEY_SCROLL_UP_1_LINE: value --; break; case KEY_SCROLL_DOWN_1_LINE: value ++; break; # ifdef SCROLL_LINE case KEY_SCROLL_UP: value -= SCROLL_LINE; break; case KEY_SCROLL_DOWN: value += SCROLL_LINE; break; # endif default: break; } value = CLAMP(value, 0, gtk_adjustment_get_upper (page_data->adjustment) - gtk_adjustment_get_page_increment(page_data->adjustment)); gtk_adjustment_set_value(page_data->adjustment, value); break; } #else case KEY_SCROLL_UP: case KEY_SCROLL_DOWN: case KEY_SCROLL_UP_1_LINE: case KEY_SCROLL_DOWN_1_LINE: upgrade_dialog(ENABLE_MOUSE_SCROLL_VER); break; #endif case KEY_CLEAN_SCROLLBACK_LINES: clean_scrollback_lines(NULL, win_data); break; case KEY_DISABLE_URL_L: case KEY_DISABLE_URL_R: if (win_data->disable_url_when_ctrl_pressed) clean_hyperlink(win_data, page_data); break; #ifdef FATAL case KEY_DUMP_DATA: #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif dump_data(win_data, page_data); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("deal_key_press", "type", type); #endif break; #endif } #ifdef DISABLE_TAB_REORDER switch (type) { case KEY_NEW_TAB: case KEY_CLOSE_TAB: case KEY_MOVE_TAB_FORWARD: case KEY_MOVE_TAB_BACKWARD: case KEY_MOVE_TAB_FIRST: case KEY_MOVE_TAB_LAST: reorder_page_number(GTK_NOTEBOOK(win_data->notebook), NULL, 0, win_data->window); break; default: break; } #endif return TRUE; } gboolean window_key_release(GtkWidget *window, GdkEventKey *event, struct Window *win_data) { #ifdef FULL if (event) g_debug("! Launch window_key_release() with key = %X (%s), state = %X, win_data = %p", event->keyval, gdk_keyval_name(event->keyval), event->state, win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (event==NULL)) return FALSE; #endif if ((win_data->disable_url_when_ctrl_pressed == FALSE) || (win_data->enable_key_binding == FALSE) || (win_data->keep_vte_size)) return FALSE; // g_debug ("Get win_data = %p in key_press", win_data); // g_debug ("win_data->keep_vte_size = %X, event->state = %X", win_data->keep_vte_size, event->state); // don't check if only shift key pressed! // FIXME: GDK_asciitilde = 0x7e, it is for some keys like only. if ((event->state & SHIFT_ONLY_MASK) || (event->keyval > GDK_KEY_asciitilde)) { // g_debug("window_key_release(): ALL_ACCELS_MASK = %X", ALL_ACCELS_MASK); gint mods = event->state | DUD_MASK; // g_debug("window_key_release(): Got the function key: %s (%X) with status= %X [%X,%X] (%X,%X)(%X,%X))", // gdk_keyval_name(event->keyval), event->keyval, event->state, mods, event->keyval, // (win_data->user_keys[KEY_DISABLE_URL_L].mods|GDK_CONTROL_MASK), win_data->user_keys[KEY_DISABLE_URL_L].key, // (win_data->user_keys[KEY_DISABLE_URL_R].mods|GDK_CONTROL_MASK), win_data->user_keys[KEY_DISABLE_URL_R].key); if (((mods==(win_data->user_keys[KEY_DISABLE_URL_L].mods|GDK_CONTROL_MASK)) && (event->keyval==win_data->user_keys[KEY_DISABLE_URL_L].key)) || ((mods==(win_data->user_keys[KEY_DISABLE_URL_R].mods|GDK_CONTROL_MASK)) && (event->keyval==win_data->user_keys[KEY_DISABLE_URL_R].key))) { // g_debug("window_key_release(): call set_hyperlink()"); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); if (! page_data->match_regex_setted) set_hyperlink(win_data, page_data); } } return FALSE; } gboolean window_get_focus(GtkWidget *window, GdkEventFocus *event, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch window_get_focus() with window =%p, win_data = %p", window, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif // g_debug("Window get focus!"); // update current_vte when window_get_focus! win_data->lost_focus = FALSE; // And, update the current_vte info // current_vte = win_data->current_vte; active_window = window; menu_active_window = window; last_active_window = window; // g_debug("window_get_focus(): win_data->runtime_LC_MESSAGES = %s", win_data->runtime_LC_MESSAGES); setlocale(LC_MESSAGES, win_data->runtime_LC_MESSAGES); // g_debug("set last_active_window = %p", last_active_window); #ifdef ENABLE_RGBA dim_window(win_data, 0); #endif dim_vte_text(win_data, NULL, 0); #ifdef ENABLE_BEEP_SINGAL set_urgent_bell(NULL, win_data); #endif menu_activated = FALSE; return FALSE; } gboolean window_lost_focus(GtkWidget *window, GdkEventFocus *event, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch window_lost_focus() with window =%p, win_data = %p", window, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif // g_debug("Window lost focus!, win_data->current_vte = %p", win_data->current_vte); if (win_data->current_vte == NULL) return FALSE; if (win_data->page_shows_window_title && (vte_terminal_get_window_title(VTE_TERMINAL(win_data->current_vte))!=NULL)) { struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data) { #endif if (win_data->page_shows_current_cmdline) win_data->window_title_tpgid = page_data->displayed_tpgid; if (win_data->page_shows_current_dir) { g_free(page_data->window_title_pwd); page_data->window_title_pwd = get_tab_name_with_current_dir(page_data->current_tpgid); } #ifdef SAFEMODE } #endif } win_data->lost_focus = TRUE; #ifdef ENABLE_RGBA dim_window(win_data, 1); #endif dim_vte_text(win_data, NULL, 1); #ifdef ENABLE_BEEP_SINGAL // g_debug("window_lost_focus(): call set_urgent_bell()!!"); set_urgent_bell(NULL, win_data); #endif active_window = NULL; return FALSE; } void window_style_set(GtkWidget *window, GtkStyle *previous_style, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch window_style_set() with window =%p, win_data = %p", window, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // win_data->keep_vte_size |= 8; // g_debug("window_resizable in window_style_set! keep_vte_size = %d", keep_vte_size); // window_resizable(window, win_data->current_vte, 2, 1); // g_debug("window_style_set(): launch keep_window_size()!"); #ifdef USE_GTK2_GEOMETRY_METHOD # ifdef GEOMETRY g_debug("@ window_style_set(for %p): Call keep_gtk2_window_size() with keep_vte_size = %x", window, win_data->keep_vte_size); # endif keep_gtk2_window_size (win_data, win_data->current_vte, 0x60); #endif #ifdef USE_GTK3_GEOMETRY_METHOD if (win_data->hints_type != HINTS_SKIP_ONCE) { # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! window_style_set(win_data %p): Calling keep_gtk3_window_size() with hints_type = %d\n", ANSI_COLOR_MAGENTA, win_data, win_data->hints_type); # endif win_data->resize_type = GEOMETRY_AUTOMATIC; keep_gtk3_window_size(win_data, FALSE); } else { # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! window_style_set(win_data %p): Calling keep_gtk3_window_size() with hints_type = %d: DON'T WORK!!\n", ANSI_COLOR_RED, win_data, win_data->hints_type); # endif } #endif } #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) void window_size_request (GtkWidget *window, GtkRequisition *requisition, struct Window *win_data) { # ifdef DETAIL if (win_data) g_debug("! Launch window_size_request() with window =%p, win_data = %p, keep_vte_size = %x", window, win_data, win_data->keep_vte_size); else g_debug("! Launch window_size_request() with window =%p, win_data = %p", window, win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return; # endif # ifdef GEOMETRY g_debug("@ window_size_request(): Got keep_vte_size (before) = %x", win_data->keep_vte_size); GtkRequisition window_requisition; # ifdef SAFEMODE if (window) # endif gtk_widget_get_child_requisition (window, &window_requisition); g_debug("@ window_size_request(): request_size (before) = %d x %d", window_requisition.width, window_requisition.height); # endif // [Showing/Hiding tabs bar] and [Change the vte font] won't run the following codes. if (win_data->keep_vte_size&0xa94a) { // g_debug("Got keep_vte_size (before) = %d", win_data->keep_vte_size); GtkRequisition window_requisition; gtk_widget_get_child_requisition (window, &window_requisition); // g_debug("! The requested window (for %p) requisition is %d x %d", // window, window_requisition.width, window_requisition.height); if ( window_requisition.width>0 && window_requisition.height>0 ) { GtkRequisition current_window_requisition; gtk_window_get_size(GTK_WINDOW(window), ¤t_window_requisition.width, ¤t_window_requisition.height); # ifdef GEOMETRY g_debug("@ The current window size (for %p) is %d x %d, request size is %d x %d!!", window, current_window_requisition.width, current_window_requisition.height, window_requisition.width, window_requisition.height); # endif if ((window_requisition.width != current_window_requisition.width) || (window_requisition.height != current_window_requisition.height)) { # ifdef GEOMETRY g_debug("@ window_size_request(): Call gtk_window_resize() to resize to %d x %d!", window_requisition.width, window_requisition.height); # endif gtk_window_resize(GTK_WINDOW(window), window_requisition.width, window_requisition.height); } // else // g_debug("Skip to call gtk_window_resize for %p ()!!", window); // 0xed = 11,101,101 // 'Showing/Hiding tab bar' and 'Change vte font' should call gtk_window_resize() once win_data->keep_vte_size &= 0x54a5; } else win_data->keep_vte_size = 0; # ifdef GEOMETRY g_debug("@ window_size_request: Got keep_vte_size (after) = %x", win_data->keep_vte_size); # endif } } #endif #ifdef USE_GTK2_GEOMETRY_METHOD void window_size_allocate(GtkWidget *window, GtkAllocation *allocation, struct Window *win_data) { # ifdef DETAIL if (win_data) g_debug("! Launch window_size_allocate() with window =%p, win_data = %p, keep_vte_size = %x", window, win_data, win_data->keep_vte_size); else g_debug("! Launch window_size_allocate() with window =%p, win_data = %p", window, win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return; # endif // g_debug("window_size-allocate!, and win_data->keep_vte_size = %d", win_data->keep_vte_size); # ifdef GEOMETRY g_debug("@ window_size_allocate(for %p): Got keep_vte_size (finish) = %x", window, win_data->keep_vte_size); # endif if (win_data->keep_vte_size & 0x54a5) { win_data->keep_vte_size = 0; // g_debug("window_size_allocate(): call window_resizable() with run_once = %d", win_data->hints_type); // g_debug("window_size_allocate(): (1) launch window_resizable() with window = %p!", window); if (! win_data->window_status) window_resizable(window, win_data->current_vte, win_data->hints_type); } # ifdef GEOMETRY g_debug("@ window_size_allocate(for %p): Got keep_vte_size (final) = %x", window, win_data->keep_vte_size); # endif if ((win_data->keep_vte_size==0) && (win_data->window_status>FULLSCREEN_NORMAL)) { // g_debug("Trying keep the size of window when unfullscreen, win_data->window_status = %d", win_data->window_status); win_data->window_status--; if (win_data->window_status == FULLSCREEN_NORMAL) { // g_debug("window_size_allocate(): (2) launch window_resizable()! with window = %p!", // window); window_resizable(window, win_data->current_vte, HINTS_NONE); // g_debug("window_size_allocate(): win_data->show_tabs_bar = %d", // win_data->show_tabs_bar); hide_and_show_tabs_bar(win_data , win_data->show_tabs_bar); fullscreen_show_hide_scroll_bar (win_data); // keep_gtk2_window_size (win_data, win_data->current_vte, 128); } } // g_debug("win_data->keep_vte_size = %d, win_data->window_status = %d", // win_data->keep_vte_size, win_data->window_status); if ((win_data->keep_vte_size==0) && (win_data->window_statuswindow_status = %d", win_data->window_status); win_data->window_status++; if (win_data->window_status) window_resizable(window, win_data->current_vte, HINTS_NONE); else gtk_window_fullscreen(GTK_WINDOW(win_data->window)); } # ifdef GEOMETRY GtkRequisition window_requisition; # ifdef SAFEMODE if (window) # endif gtk_window_get_size(GTK_WINDOW(window), &window_requisition.width, &window_requisition.height); if ((window_requisition.width <= 200) || (window_requisition.height <= 200)) fprintf(stderr, "\033[1;31m!! The final window size (win_data %p) is %d x %d (keep_vte_size = %d)\033[0m\n", win_data, window_requisition.width, window_requisition.height, win_data->keep_vte_size); else g_debug("! The final window size (win_data %p) is %d x %d (keep_vte_size = %d)", win_data, window_requisition.width, window_requisition.height, win_data->keep_vte_size); widget_size_allocate (window, allocation, "window"); # endif } #endif #ifdef USE_GTK3_GEOMETRY_METHOD void window_size_allocate(GtkWidget *window, GtkAllocation *allocation, struct Window *win_data) { # ifdef DETAIL g_debug("! Launch window_size_allocate() with window =%p, win_data = %p", window, win_data); # endif # ifdef GEOMETRY GtkRequisition window_requisition; gtk_window_get_size(GTK_WINDOW(window), &window_requisition.width, &window_requisition.height); gint ansi_color = ANSI_COLOR_CYAN; if ((window_requisition.width < 408) || (window_requisition.height < 239)) ansi_color = ANSI_COLOR_RED; fprintf(stderr, "\033[1;%dm!! window_size_allocate(win_data %p): " "The final window size (for %p) is Requisition: %d x %d (Allocation: %d x %d)\033[0m\n", ansi_color, win_data, window, window_requisition.width, window_requisition.height, allocation->width, allocation->height); widget_size_allocate (window, allocation, "window"); # endif } #endif #if defined(ENABLE_RGBA) || defined(UNIT_TEST) // dim_window = 0: dim the window // dim_window = 1: light up the window // dim_window = 2: auto detect void dim_window(struct Window *win_data, gint dim_window) { #ifdef DETAIL g_debug("! Launch dim_window() with win_data = %p, dim_window = %d", win_data, dim_window); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // win_data->dim_window <- record if "[ ] Dim the window when inactive" is clicked. // dim = TRUE: dim the window // dim = FALSE: light up the window gint dim = FALSE; if (dim_window==2) { if (win_data->dim_window) dim = win_data->dim_window_expect; else dim = FALSE; } else { win_data->dim_window_expect = FALSE; if (dim_window) { // Trying to check if we should dim the window if ((! menu_activated) && (dialog_activated==0) && (win_data->lost_focus)) { win_data->dim_window_expect = TRUE; if (win_data->dim_window) dim = TRUE; } } } // g_debug("win_data->window_is_inactivated = %d, dim = %d", win_data->window_is_inactivated, dim); // for performance, if the window was dimmed already, don't dim it again. if (win_data->window_is_inactivated != dim) { #ifdef ENABLE_RGBA if (dim) set_window_opacity( NULL, 0, win_data->window_opacity_inactive, win_data); else set_window_opacity( NULL, 0, win_data->window_opacity, win_data); #endif win_data->window_is_inactivated = dim; } } #endif // reload=FALSE: free all datas void destroy_window(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch destroy_window() with win_data = %p!", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // Clean active_window! if (active_window==win_data->window) active_window = NULL; if (menu_active_window==win_data->window) menu_active_window = NULL; if (last_active_window==win_data->window) last_active_window = NULL; // g_debug("set last_active_window = %p", last_active_window); #ifdef ENABLE_BEEP_SINGAL if (win_data->urgent_bell_focus_in_event_id) stop_urgency_hint(NULL, NULL, win_data); #endif if (win_data->window) gtk_widget_destroy(win_data->window); clear_win_data(win_data); } void clear_win_data(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch clear_win_data() win_data = %p", win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif int i; g_free(win_data->environment); if (win_data->warned_locale_list) g_string_free(win_data->warned_locale_list, TRUE); g_free(win_data->runtime_encoding); g_free(win_data->default_encoding); g_free(win_data->default_locale); g_free(win_data->runtime_LC_MESSAGES); g_free(win_data->runtime_locale_list); g_free(win_data->locales_list); g_free(win_data->default_shell); #ifdef ENABLE_SET_EMULATION g_free(win_data->emulate_term); #endif g_free(win_data->VTE_CJK_WIDTH_STR); g_free(win_data->wmclass_name); g_free(win_data->wmclass_class); g_free(win_data->shell); g_free(win_data->home); // win_data->argv; // win_data->command; g_free(win_data->init_dir); g_free(win_data->geometry); g_free(win_data->profile); g_free(win_data->custom_window_title_str); for (i=0; iuser_keys[i].value); for (i=0; iuser_regex[i]); for (i=0; iuser_command[i].command); g_free(win_data->user_command[i].environ); g_strfreev(win_data->user_command[i].environments); g_free(win_data->user_command[i].locale); g_free(win_data->user_command[i].match_regex); g_free(win_data->user_command[i].match_regex_orig); } if (win_data->custom_tab_names_str) g_string_free(win_data->custom_tab_names_str, TRUE); g_strfreev(win_data->custom_tab_names_strs); for (i=0; iuser_page_color[i]); g_free(win_data->page_name); g_free(win_data->page_names); g_strfreev(win_data->splited_page_names); g_free(win_data->default_font_name); g_free(win_data->restore_font_name); #ifdef ENABLE_SET_WORD_CHARS g_free(win_data->word_chars); #endif #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) g_free(win_data->background_image); #endif g_free(win_data->execute_command_whitelist); // g_debug("win_data->execute_command_whitelist for win_data (%p) freed!", win_data); g_strfreev(win_data->execute_command_whitelists); g_free(win_data->foreground_program_whitelist); g_strfreev(win_data->foreground_program_whitelists); g_free(win_data->background_program_whitelist); g_strfreev(win_data->background_program_whitelists); g_free(win_data->paste_texts_whitelist); g_strfreev(win_data->paste_texts_whitelists); g_free(win_data->find_string); // win_data->error_data.string // win_data->error_data.encoding // g_debug("clear_win_data(): clear menu = %p for win_data = %p!", win_data->menu, win_data); if (win_data->menu!=NULL) gtk_widget_destroy(win_data->menu); // directory can NOT be freed. // They are a pointer for win_data->argv. // g_free(win_data->directory); //#ifdef DETAIL // g_debug("+ Set current_vte to NULL!"); //#endif // if (active_window != NULL) // { //#ifdef DETAIL // g_debug("Set current_vte = win_data->current_vte (%p)", // win_data->current_vte); //#endif // // active_window != NULL: We may trying to find the activating vte // // It only happened run 'lilyterm -e xxx' in a lilyterm box // struct Window *win_data = (struct Window *)g_object_get_data(G_OBJECT( // active_window), "Win_Data"); // current_vte = win_data->current_vte; // } // else // { //#ifdef DETAIL // g_debug("CAREFUL: current_vte = NULL!!"); //#endif // // No activating window: It only happened run 'lilyterm -e xxx' outside lilyterm. // current_vte = NULL; // } #ifndef UNIT_TEST // g_debug("clear_win_data: clear win_data = %p for window = %p!", win_data, win_data->window); g_free(win_data); #endif // win_data=NULL; } void notebook_page_added(GtkNotebook *notebook, GtkWidget *child, guint page_num, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch notebook_page_added() with notebook = %p, page_num = %d, and win_data = %p", notebook, page_num, win_data); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("notebook_page_added !"); struct Page *page_data = get_page_data_from_nth_page(win_data, page_num); #ifdef SAFEMODE if (page_data==NULL) return; #endif // g_debug("Get page_data = %p", page_data); // FIXME: Calling remove_notebook_page() here // GtkNotebook may drag a page to itself, // So a GtkNotebook may be page_removed() -> page_added() with the same page // but the GtkNotebook may be destroyed after page_removed() // So that we should call page_removed() here, not using "page-removed" signal... -_-||| // page_data->window==win_data->window -> this page is drag to itself. // g_debug("notebook_page_added(): page_data->window = %p", page_data->window); // g_debug("notebook_page_added(): win_data->window = %p", win_data->window); if (page_data->window==win_data->window) { reorder_page_after_added_removed_page(win_data, page_num); return; } // page_data->window = NULL: it is launched by add_page(), // page_data->window != NULL: this page is dragged from another lilyterm window. else if (page_data->window) { struct Window *win_data_orig = (struct Window *)g_object_get_data(G_OBJECT(page_data->window), "Win_Data"); #ifdef SAFEMODE if (win_data_orig==NULL) return; #endif // g_debug("Set page_data->window = win_data->window in notebook_page_added()"); page_data->window = win_data->window; page_data->notebook = win_data->notebook; // apply the new win_data to this page apply_new_win_data_to_page(win_data_orig, win_data, page_data); remove_notebook_page (GTK_NOTEBOOK(win_data_orig->notebook), NULL, page_data->page_no, win_data_orig, FALSE); } else { // g_debug("Set page_data->window (NULL) = win_data->window in notebook_page_added()"); page_data->window = win_data->window; page_data->notebook = win_data->notebook; #ifdef ENABLE_TAB_REORDER gtk_notebook_set_tab_reorderable(GTK_NOTEBOOK(notebook), page_data->hbox, TRUE); gtk_notebook_set_tab_detachable(GTK_NOTEBOOK(notebook), page_data->hbox, TRUE); #endif set_fill_tabs_bar(GTK_NOTEBOOK(notebook), win_data->fill_tabs_bar, page_data); // page_data->pid = 0 -> it is launched by add_page() if (page_data->pid) { // Trying to update page_data->tab_color // g_debug("Launch get_and_update_page_name() when pid > 0 !"); // get_and_update_page_name(page_data); monitor_cmdline(page_data); // g_debug("page_data->tab_color = %s", page_data->tab_color); } } reorder_page_after_added_removed_page(win_data, page_num); // show the page bar if necessary // g_debug("Total Page (Notebook):%u", // (gtk_notebook_get_n_pages(GTK_NOTEBOOK(page_data->notebook)))); // g_debug("win_data->true_fullscreen = %d", win_data->true_fullscreen); // if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(page_data->notebook))==2 && // (! win_data->startup_fullscreen) && // (win_data->show_tabs_bar != FORCE_OFF) && // (dialog_activated==0)) // { // // It will done in update_page_name() // // keep_vte_size |= 2; // // while (win_data->keep_vte_size) // // usleep(100000); // hide_and_show_tabs_bar(win_data, TRUE); // } hide_and_show_tabs_bar(win_data , win_data->show_tabs_bar); if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(page_data->notebook))==1) { // g_debug("notebook_page_added(): launch update_window_hint()!"); // g_debug("notebook_page_added(): page_data->font_name = %s, win_data->restore_font_name = %s", page_data->font_name, win_data->restore_font_name); # ifdef GEOMETRY fprintf(stderr, "\033[1;37m!! notebook_page_added(win_data %p): call update_window_hint() for page_data = %p\033[0m\n", win_data, page_data); # endif update_window_hint(win_data, page_data); } # ifdef USE_GTK3_GEOMETRY_METHOD else update_window_hint(win_data, page_data); # endif } void show_close_button_on_tab(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch show_close_button_on_tab() with win_data = %p, page_data = %p!", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->label_button==NULL)) return; #endif if ((win_data->show_close_button_on_tab && (page_data->vte == win_data->current_vte)) || win_data->show_close_button_on_all_tabs) gtk_widget_show(page_data->label_button); else gtk_widget_hide(page_data->label_button); } // force_fill void set_fill_tabs_bar(GtkNotebook *notebook, gboolean fill_tabs_bar, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch set_fill_tabs_bar() with notebook = %p, fill_tabs_bar = %d, page_data = %p", notebook, fill_tabs_bar, page_data); #endif #ifdef SAFEMODE if ((notebook==NULL) || (page_data==NULL) || (page_data->hbox==NULL)) return; #endif #ifdef USE_OLD_GTK_LABEL_PACKING gtk_notebook_set_tab_label_packing(GTK_NOTEBOOK(notebook), page_data->hbox, fill_tabs_bar, fill_tabs_bar, GTK_PACK_START); #else GValue value = { 0, }; g_value_init (&value, G_TYPE_BOOLEAN); g_value_set_boolean (&value, fill_tabs_bar); gtk_container_child_set_property (GTK_CONTAINER(notebook), page_data->hbox, (gchar*) "tab-expand", &value); gtk_container_child_set_property (GTK_CONTAINER(notebook), page_data->hbox, (gchar*) "tab-fill", &value); g_value_unset (&value); #endif } void reorder_page_after_added_removed_page(struct Window *win_data, guint page_num) { #ifdef DETAIL g_debug("! Launch reorder_page_after_added_removed_page() with win_data = %p, page_num = %d", win_data, page_num); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return; #endif // g_debug("Reordering the page and update page name!"); win_data->adding_page = TRUE; reorder_page_number(GTK_NOTEBOOK(win_data->notebook), NULL, 0, win_data->window); win_data->adding_page = FALSE; // g_debug("Set current page to %d!", page_num); // gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), page_data->page_no); gtk_notebook_set_current_page(GTK_NOTEBOOK(win_data->notebook), page_num); // g_debug("Set focus to win_data->current_vte %p!", win_data->current_vte); struct Page *page_data = get_page_data_from_nth_page(win_data, page_num); #ifdef SAFEMODE if (page_data==NULL) return; #endif // gtk_window_set_focus(GTK_WINDOW(win_data->window), win_data->current_vte); // g_debug("Set focus to %p", page_data->vte); gtk_window_set_focus(GTK_WINDOW(win_data->window), page_data->vte); } void remove_notebook_page(GtkNotebook *notebook, GtkWidget *child, guint page_num, struct Window *win_data, gboolean run_quit_gtk) { #ifdef DETAIL g_debug("! Launch remove_notebook_page() with notebook = %p, and win_data = %p, page_num = %d", notebook, win_data, page_num); #endif #ifdef SAFEMODE if (win_data==NULL) return; #endif // g_debug("remove_notebook_page !"); gint total_page; if (notebook) total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook)); else total_page = 0; // g_debug("Total Page after remove_notebook_page: %d", total_page); if (total_page) { // g_debug("Update the hint data!"); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return; #endif // g_debug("win_data->current_vte = %p, page_data = %p", win_data->current_vte, page_data); // g_debug("remove_notebook_page(): launch update_window_hint()!"); # ifdef GEOMETRY fprintf(stderr, "\033[1;37m!! remove_notebook_page(): call update_window_hint() for pate_data = %p\033[0m\n", page_data); # endif update_window_hint(win_data, page_data); // g_debug("hide the tab bar if necessary"); // g_debug("win_data->kill_color_demo_vte = %d", win_data->kill_color_demo_vte); if (total_page == 1 && (!win_data->kill_color_demo_vte)) { // hide the page bar // win_data->keep_vte_size |= 6; // we need to set the hints, or the window size may be incorrect. // g_debug("window_resizable in remove_page!"); // window_resizable(win_data->window, win_data->current_vte, 2, 1); // keep_gtk2_window_size (win_data, win_data->current_vte, 0x1c); // gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), FALSE); // gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), FALSE); // window_resizable(page_data->window, page_data->vte, 2, -1); #ifdef USE_GTK2_GEOMETRY_METHOD hide_and_show_tabs_bar(win_data , win_data->show_tabs_bar); #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) g_idle_add((GSourceFunc)idle_hide_and_show_tabs_bar, win_data); #endif // g_debug("remove_notebook_page(): page_data->font_name = %s, win_data->restore_font_name = %s", // page_data->font_name, win_data->restore_font_name); if (! compare_strings(page_data->font_name, win_data->restore_font_name, TRUE)) { win_data->hints_type = HINTS_FONT_BASE; // g_debug("win_data->hints_type = %d", win_data->hints_type); # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! remove_notebook_page(win_data %p): set win_data->hints_type = %d !!\033[0m\n", ANSI_COLOR_BLUE, win_data, win_data->hints_type); # endif } } // g_debug("Reordering the page and update page name!"); reorder_page_number(GTK_NOTEBOOK(notebook), NULL, 0, win_data->window); } // if it is the last page, close window! else { // g_debug("remove_notebook_page(): Remove win_data(%p) from window_list!", win_data); window_list = g_list_remove (window_list, win_data); // g_debug("window_list = %p, dialog_activated = %d", window_list, dialog_activated); if (window_list == NULL && (dialog_activated==0)) { #ifdef DETAIL g_debug("+ It is the last page, exit lilyterm!"); #endif if (run_quit_gtk) { // done in gtk_quit_add // if (single_process) // shutdown_socket_server(); // g_debug("remove_notebook_page(): call gtk_main_quit()"); quit_gtk(); #ifdef DEBUG g_message("%s had been closed normally!", PACKAGE); #endif } #ifndef UNIT_TEST else exit (1); #endif } else destroy_window(win_data); } } GtkNotebook *create_window (GtkNotebook *notebook, GtkWidget *page, gint x, gint y, struct Window *win_data) { #ifdef DETAIL if (win_data) g_debug("! Launch create_window() with notebook = %p, win_data = %p, VTE_CJK_WIDTH_STR = %s", notebook, win_data, win_data->VTE_CJK_WIDTH_STR); else g_debug("! Launch create_window() with notebook = %p, win_data = %p", notebook, win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->current_vte==NULL)) return NULL; #endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); #ifdef SAFEMODE if (page_data==NULL) return NULL; #endif // we set the encoding=NULL here, // because new_window() with page_data != NULL will not call add_page() //GtkNotebook *new_window(int argc, // char *argv[], // gchar *shell, // gchar *environment, // gchar *locale_list, // gchar *PWD, // gchar *HOME, // gchar *VTE_CJK_WIDTH_STR, // gboolean VTE_CJK_WIDTH_STR_overwrite_profile, // gchar *wmclass_name, // gchar *wmclass_class, // gchar *user_environ, // gchar *encoding, // gboolean encoding_overwrite_profile, // gchar *lc_messages, // struct Window *win_data_orig, // struct Page *page_data_orig) // g_debug("create_window(): win_data->runtime_encoding = %s", win_data->runtime_encoding); // g_debug("create_window(): win_data->runtime_locale_list = %s", win_data->runtime_locale_list); // notebook==NULL: open a new window with return new_window(0, NULL, win_data->shell, win_data->environment, win_data->runtime_locale_list, page_data->pwd, win_data->home, win_data->VTE_CJK_WIDTH_STR, TRUE, win_data->wmclass_name, win_data->wmclass_class, NULL, win_data->runtime_encoding, TRUE, win_data->runtime_LC_MESSAGES, win_data, (notebook==NULL)? NULL :page_data); } #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean window_state_event (GtkWidget *widget, GdkEventWindowState *event, struct Window *win_data) { # ifdef DETAIL g_debug("! Launch window_state_event() with win_data = %p", win_data); # endif # ifdef SAFEMODE if ((win_data==NULL) || (event==NULL)) return FALSE; # endif // g_debug("win_data->keep_vte_size = %d", win_data->keep_vte_size); if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) win_data->fullscreen = event->new_window_state & GDK_WINDOW_STATE_FULLSCREEN; // g_debug("window_state_event: win_data->fullscreen = %d", win_data->fullscreen); if (! win_data->fullscreen) win_data->true_fullscreen = FALSE; else win_data->true_fullscreen = TRUE; # ifdef GEOMETRY fprintf(stderr, "\033[1;31m** window_state_event(): win_data->true_fullscreen = %d\033[0m\n", win_data->true_fullscreen); # endif return FALSE; } #endif #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) void keep_gtk2_window_size (struct Window *win_data, GtkWidget *vte, guint keep_vte_size) { # ifdef DETAIL g_debug("! Launch keep_gtk2_window_size() with win_data = %p, vte = %p, keep_vte_size = %d", win_data, vte, keep_vte_size); # endif # ifdef SAFEMODE if (win_data==NULL) return; # endif gint new_keep_vte_size = win_data->keep_vte_size | keep_vte_size; // g_debug("compare new_keep_vte_size = %d and win_data->keep_vte_size = %d (keep_vte_size = %d)", // new_keep_vte_size, win_data->keep_vte_size, keep_vte_size); # ifdef GEOMETRY g_debug("@ keep_gtk2_window_size(): Got keep_vte_size = %x, new_keep_vte_size = %x", win_data->keep_vte_size, new_keep_vte_size); # endif if (new_keep_vte_size != win_data->keep_vte_size) { if (new_keep_vte_size !=3) new_keep_vte_size = (new_keep_vte_size & 0xA94A) ? 0xFDEF : 0x56B5; // g_debug("win_data->keep_vte_size = %d, and keep_vte_size = %d, new_keep_vte_size = %d", // win_data->keep_vte_size, keep_vte_size, new_keep_vte_size); win_data->keep_vte_size = new_keep_vte_size; // g_debug("keep_gtk2_window_size(): launch window_resizable()! with window = %p!", win_data->window); window_resizable(win_data->window, vte, HINTS_NONE); } # ifdef GEOMETRY g_debug("@ keep_gtk2_window_size(): Got keep_vte_size (final) = %x", win_data->keep_vte_size); # endif } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) void keep_gtk3_window_size(struct Window *win_data, gboolean idle) { # ifdef DETAIL g_debug("! Launch keep_gtk3_window_size() with win_data = %p", win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return; # endif # ifdef GEOMETRY // g_debug("keep_gtk3_window_size(): win_data->fullscreen = %d, win_data->window_status = %d, win_data->current_vte = %p", // win_data->fullscreen, win_data->window_status, win_data->current_vte); fprintf(stderr, "\033[1;%dm** keep_gtk3_window_size(): win_data->window_status = %d, win_data->hints_type = %d\033[0m\n", ANSI_COLOR_MAGENTA, win_data->window_status, win_data->hints_type); # endif if ((win_data->window_status != WINDOW_NORMAL) || (win_data->current_vte==NULL)) return; switch (win_data->hints_type) { case HINTS_FONT_BASE: { if (win_data->resize_type == GEOMETRY_AUTOMATIC) { win_data->geometry_width = vte_terminal_get_column_count(VTE_TERMINAL(win_data->current_vte)); win_data->geometry_height = vte_terminal_get_row_count(VTE_TERMINAL(win_data->current_vte)); } # ifdef GEOMETRY gint ansi_color = ANSI_COLOR_MAGENTA; if ((win_data->geometry_width<40) || (win_data->geometry_height<12)) ansi_color = ANSI_COLOR_RED; fprintf(stderr, "\033[1;%dm** keep_gtk3_window_size(HINTS_FONT_BASE)(win_data %p, resize_type = %d): " "final vte size = %ld x %ld (font: %ld x %ld)\033[0m\n", ansi_color, win_data, win_data->resize_type, win_data->geometry_width, win_data->geometry_height, vte_terminal_get_char_width(VTE_TERMINAL(win_data->current_vte)), vte_terminal_get_char_height(VTE_TERMINAL(win_data->current_vte))); # endif break; } case HINTS_NONE: { // find the current vte size GtkAllocation vte_size = {0}; gtk_widget_get_allocation(win_data->current_vte, &vte_size); struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); # ifdef GEOMETRY gint ansi_color = ANSI_COLOR_MAGENTA; if ((vte_size.width==0) || (vte_size.height==0) || (vte_size.width< 200) || (vte_size.height<239)) ansi_color = ANSI_COLOR_RED; fprintf(stderr, "\033[1;%dm** keep_gtk3_window_size(HINTS_NONE)(win_data %p, current_vte %p, resize_type = %d): " "final vte size = %ld x %ld (%d x %d) (%ld x %ld) " "(font: %ld x %ld) (border: L %d, R %d, T %d, B %d)\033[0m\n", ansi_color, win_data, win_data->current_vte, win_data->resize_type, win_data->geometry_width, win_data->geometry_height, vte_size.width, vte_size.height, vte_terminal_get_column_count(VTE_TERMINAL(win_data->current_vte)), vte_terminal_get_row_count(VTE_TERMINAL(win_data->current_vte)), vte_terminal_get_char_width(VTE_TERMINAL(win_data->current_vte)), vte_terminal_get_char_height(VTE_TERMINAL(win_data->current_vte)), page_data->border->left, page_data->border->right, page_data->border->top, page_data->border->bottom); # endif if (win_data->resize_type == GEOMETRY_AUTOMATIC) { win_data->geometry_width = vte_size.width - page_data->border->left - page_data->border->right; win_data->geometry_height = vte_size.height - page_data->border->top - page_data->border->bottom; } break; } case HINTS_SKIP_ONCE: return; } // g_debug("keep_gtk3_window_size(): FINAL: hints_type = %d, column = %ld, row = %ld", // win_data->hints_type, win_data->geometry_width, win_data->geometry_height); // Dirty Hack: column=1 and row=1 when vte is initing... if (!((win_data->geometry_width < 0) && (win_data->geometry_height < 0))) { if (idle) g_idle_add((GSourceFunc)idle_to_resize_window, win_data); else idle_to_resize_window(win_data); } # ifdef GEOMETRY else fprintf(stderr, "\033[1;31m** keep_gtk3_window_size(): resize failed with win_data->hints_type = %d, column = %ld, row = %ld !!\033[0m\n", win_data->hints_type, win_data->geometry_width, win_data->geometry_height); # endif } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) void resize_to_exist_widget(struct Window *win_data) { # ifdef DETAIL g_debug("! Launch resize_to_exist_widget() with win_data = %p", win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return; # endif GtkWidget *widget = win_data->notebook; gboolean show_tabs_bar = get_hide_or_show_tabs_bar(win_data, win_data->show_tabs_bar); if (show_tabs_bar == FALSE) { // find the current vte size # ifdef SAFEMODE if (win_data->current_vte==NULL) return; # endif struct Page *page_data = (struct Page *)g_object_get_data(G_OBJECT(win_data->current_vte), "Page_Data"); # ifdef SAFEMODE if (page_data) return; # endif widget = page_data->hbox; } GtkAllocation allocation = {0}; gtk_widget_get_allocation(widget, &allocation); gtk_window_resize (GTK_WINDOW(win_data->window), allocation.width, allocation.height); # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! resize_to_exist_widget(win_data %p, show_tabs_bar = %d): resize window size to %d x %d!!\033[0m\n", ANSI_COLOR_YELLOW, win_data, show_tabs_bar, allocation.width, allocation.height); # endif } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) void save_vte_geometry(struct Window *win_data) { # ifdef DETAIL g_debug("! Launch save_vte_geometry() with win_data = %p", win_data); # endif # ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return; # endif if (win_data->hints_type==HINTS_NONE) { GtkAllocation allocation = {0}; gtk_widget_get_allocation(win_data->current_vte, &allocation); win_data->geometry_width = allocation.width; win_data->geometry_height = allocation.height; } else { win_data->geometry_width = vte_terminal_get_column_count(VTE_TERMINAL(win_data->current_vte)); win_data->geometry_height = vte_terminal_get_row_count(VTE_TERMINAL(win_data->current_vte)); } # ifdef GEOMETRY fprintf(stderr, "\033[1;35m!! save_vte_geometry(): set win_data->geometry_width = %ld, win_data->geometry_height = %ld\033[0m\n", win_data->geometry_width, win_data->geometry_height); # endif } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean idle_show_or_hide_tabs_bar_and_scroll_bar(struct Window *win_data) { if (check_if_win_data_is_still_alive(win_data)) show_or_hide_tabs_bar_and_scroll_bar(win_data); return FALSE; } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean idle_gtk_window_fullscreen(struct Window *win_data) { if (check_if_win_data_is_still_alive(win_data)) gtk_window_fullscreen(GTK_WINDOW(win_data->window)); return FALSE; } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean show_or_hide_tabs_bar_and_scroll_bar(struct Window *win_data) { # ifdef DETAIL g_debug("! Launch show_or_hide_tabs_bar_and_scroll_bar() with win_data = %p", win_data); # endif # ifdef SAFEMODE if (win_data==NULL) return FALSE; # endif // g_debug("show_or_hide_tabs_bar_and_scroll_bar(): win_data->window_status = %d", win_data->window_status); hide_and_show_tabs_bar(win_data, win_data->show_tabs_bar); fullscreen_show_hide_scroll_bar(win_data); switch (win_data->window_status) { case WINDOW_NORMAL: case WINDOW_MAX_WINDOW: window_resizable(win_data->window, win_data->current_vte, win_data->hints_type); break; case WINDOW_RESIZING_TO_NORMAL: window_resizable(win_data->window, win_data->current_vte, win_data->hints_type); win_data->window_status = WINDOW_NORMAL; break; case WINDOW_MAX_WINDOW_TO_FULL_SCREEN: case WINDOW_FULL_SCREEN: case WINDOW_APPLY_PROFILE_NORMAL: case WINDOW_APPLY_PROFILE_FULL_SCREEN: break; default: # ifdef FATAL print_switch_out_of_range_error_dialog("show_or_hide_tabs_bar_and_scroll_bar", "win_data->window_status", win_data->window_status); # endif break; } return FALSE; } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean idle_to_resize_window(struct Window *win_data) { # ifdef DETAIL g_debug("! Launch idle_to_resize_window() with win_data = %p", win_data); # endif if (check_if_win_data_is_still_alive(win_data)) gtk_window_resize_to_geometry(GTK_WINDOW(win_data->window), win_data->geometry_width, win_data->geometry_height); # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm** idle_to_resize_window(): resize with hints_type = %d, column = %ld, row = %ld !!\033[0m\n", ANSI_COLOR_MAGENTA, win_data->hints_type, win_data->geometry_width, win_data->geometry_height); # endif return FALSE; } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean idle_set_vte_font_to_selected(struct Window *win_data) { if (check_if_win_data_is_still_alive(win_data)) set_vte_font(NULL, FONT_SET_TO_SELECTED); return FALSE; } #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean idle_hide_and_show_tabs_bar(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch idle_hide_and_show_tabs_bar() with win_data = %p", win_data); #endif if (check_if_win_data_is_still_alive(win_data)) hide_and_show_tabs_bar(win_data, win_data->show_tabs_bar); return FALSE; } #endif #ifdef FATAL void dump_data (struct Window *win_data, struct Page *page_data) { #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL)) return; #endif gint i, j; // ---- win_data ---- // g_debug("- win_data->environment = %s", win_data->environment); #ifdef SAFEMODE if (win_data->warned_locale_list) #endif g_debug("- win_data->warned_locale_list->str = %s", win_data->warned_locale_list->str); g_debug("- win_data->runtime_encoding = %s", win_data->runtime_encoding); g_debug("- win_data->default_encoding = %s", win_data->default_encoding); g_debug("- win_data->runtime_locale_list = %s", win_data->runtime_locale_list); g_debug("- win_data->locales_list = %s", win_data->locales_list); g_debug("- win_data->default_shell = %s", win_data->default_shell); #ifdef ENABLE_SET_EMULATION g_debug("- win_data->emulate_term = %s", win_data->emulate_term); #endif g_debug("- win_data->VTE_CJK_WIDTH = %d", win_data->VTE_CJK_WIDTH); g_debug("- win_data->VTE_CJK_WIDTH_STR = %s", win_data->VTE_CJK_WIDTH_STR); g_debug("- win_data->wmclass_name = %s", win_data->wmclass_name); g_debug("- win_data->wmclass_class = %s", win_data->wmclass_class); g_debug("- win_data->shell = %s", win_data->shell); g_debug("- win_data->home = %s", win_data->home); g_debug("- win_data->argc = %d", win_data->argc); print_array("win_data->argv", win_data->argv); g_debug("- win_data->command = %s", win_data->command); g_debug("- win_data->hold = %d", win_data->hold); g_debug("- win_data->init_tab_number = %d", win_data->init_tab_number); g_debug("- win_data->login_shell = %d", win_data->login_shell); g_debug("- win_data->utmp = %d", win_data->utmp); g_debug("- win_data->init_dir = %s", win_data->init_dir); g_debug("- win_data->geometry = %s", win_data->geometry); g_debug("- win_data->subitem_new_window_from_list = %p", win_data->subitem_new_window_from_list); g_debug("- win_data->menuitem_new_window_from_list = %p", win_data->menuitem_new_window_from_list); g_debug("- win_data->subitem_load_profile_from_list = %p", win_data->subitem_load_profile_from_list); g_debug("- win_data->menuitem_load_profile_from_list = %p", win_data->menuitem_load_profile_from_list); g_debug("- win_data->use_custom_profile = %d", win_data->use_custom_profile); g_debug("- win_data->profile = %s", win_data->profile); g_debug("- win_data->specified_profile = %s", win_data->specified_profile); g_debug("- win_data->profile_dir_modtime = %ld", win_data->profile_dir_modtime); g_debug("- win_data->menuitem_auto_save = %p", win_data->menuitem_auto_save); g_debug("- win_data->auto_save = %d", win_data->auto_save); #ifdef USE_GTK2_GEOMETRY_METHOD g_debug("- win_data->fullscreen = %d", win_data->fullscreen); g_debug("- win_data->true_fullscreen = %d", win_data->true_fullscreen); g_debug("- win_data->startup_fullscreen = %d", win_data->startup_fullscreen); #endif g_debug("- win_data->show_tabs_bar = %d", win_data->show_tabs_bar); // g_debug("- win_data->fullscreen_show_scroll_bar = %d", win_data->fullscreen_show_scroll_bar); g_debug("- win_data->window_status = %d", win_data->window_status); g_debug("- win_data->window = %p", win_data->window); g_debug("- win_data->notebook = %p", win_data->notebook); g_debug("- win_data->show_close_button_on_tab = %d", win_data->show_close_button_on_tab); g_debug("- win_data->show_close_button_on_all_tabs = %d", win_data->show_close_button_on_all_tabs); g_debug("- win_data->current_vte = %p", win_data->current_vte); g_debug("- win_data->window_title_shows_current_page = %d", win_data->window_title_shows_current_page); g_debug("- win_data->window_title_append_package_name = %d", win_data->window_title_append_package_name); g_debug("- win_data->custom_window_title_str = %s", win_data->custom_window_title_str); if (win_data->custom_tab_names_str) g_debug("- win_data->win_data->custom_tab_names_str = %s", win_data->custom_tab_names_str->str); print_array("win_data->custom_tab_names_strs", win_data->custom_tab_names_strs); // g_debug("- win_data->update_window_title_only = %d", win_data->update_window_title_only); g_debug("- win_data->window_title_tpgid = %d", win_data->window_title_tpgid); g_debug("- win_data->use_rgba = %d", win_data->use_rgba); g_debug("- win_data->use_rgba_orig = %d", win_data->use_rgba_orig); #ifdef ENABLE_RGBA g_debug("- win_data->transparent_window = %d", win_data->transparent_window); g_debug("- win_data->window_opacity = %1.3f", win_data->window_opacity); g_debug("- win_data->dim_window = %d", win_data->dim_window); g_debug("- win_data->transparent_window_inactive = %d", win_data->transparent_window_inactive); g_debug("- win_data->window_opacity_inactive = %1.3f", win_data->window_opacity_inactive); g_debug("- win_data->window_is_inactivated = %d", win_data->window_is_inactivated); g_debug("- win_data->dim_window_expect = %d", win_data->dim_window_expect); g_debug("- win_data->menuitem_dim_window = %p", win_data->menuitem_dim_window); #endif g_debug("- win_data->enable_key_binding = %d", win_data->enable_key_binding); for (i=0; iuser_keys[%d].value = %s", i, win_data->user_keys[i].value); g_debug("- win_data->user_keys[%d].key = 0x%x", i, win_data->user_keys[i].key); g_debug("- win_data->user_keys[%d].mods = 0x%x", i, win_data->user_keys[i].mods); } g_debug("- win_data->hints_type = %d", win_data->hints_type); #ifdef USE_GTK3_GEOMETRY_METHOD g_debug("- win_data->resize_type = %d", win_data->resize_type); g_debug("- win_data->geometry_width = %ld", win_data->geometry_width); g_debug("- win_data->geometry_height = %ld", win_data->geometry_height); #endif g_debug("- win_data->lost_focus = %d", win_data->lost_focus); #ifdef USE_GTK2_GEOMETRY_METHOD g_debug("- win_data->keep_vte_size = %d", win_data->keep_vte_size); #endif g_debug("- win_data->menu = %p", win_data->menu); g_debug("- win_data->menu_activated = %d", win_data->menu_activated); g_debug("- win_data->encoding_sub_menu = %p", win_data->encoding_sub_menu); // g_debug("- win_data->encoding_group = %p", win_data->encoding_group); g_debug("- win_data->default_menuitem_encoding = %p", win_data->default_menuitem_encoding); if (win_data->default_menuitem_encoding) g_debug("- win_data->default_encoding_str = %s", gtk_widget_get_name (win_data->default_menuitem_encoding)); #ifdef ENABLE_RGBA g_debug("- win_data->menuitem_trans_win = %p", win_data->menuitem_trans_win); #endif g_debug("- win_data->menuitem_trans_bg = %p", win_data->menuitem_trans_bg); // g_debug("- win_data->menuitem_scrollback_lines = %p", win_data->menuitem_scrollback_lines); g_debug("- win_data->show_color_selection_menu = %d", win_data->show_color_selection_menu); g_debug("- win_data->show_resize_menu = %d", win_data->show_resize_menu); g_debug("- win_data->font_resize_ratio = %1.3f", win_data->font_resize_ratio); g_debug("- win_data->window_resize_ratio = %1.3f", win_data->window_resize_ratio); g_debug("- win_data->show_background_menu = %d", win_data->show_background_menu); #ifdef ENABLE_IM_APPEND_MENUITEMS g_debug("- win_data->show_input_method_menu = %d", win_data->show_input_method_menu); #endif g_debug("- win_data->show_exit_menu = %d", win_data->show_exit_menu); g_debug("- win_data->show_change_page_name_menu = %d", win_data->show_change_page_name_menu); g_debug("- win_data->enable_hyperlink = %d", win_data->enable_hyperlink); for (i=0; iuser_regex[%d] = %s", i, win_data->user_regex[i]); for (i=0; iuser_command[%d].command = %s", i, win_data->user_command[i].command); g_debug("- win_data->user_command[%d].method = %d", i, win_data->user_command[i].method); g_debug("- win_data->user_command[%d].environ = %s", i, win_data->user_command[i].environ); gchar *temp_str = g_strdup_printf("- win_data->user_command[%d].environments", i); // print_array(temp_str, win_data->user_command[i].environments); g_free(temp_str); g_debug("- win_data->user_command[%d].VTE_CJK_WIDTH = %d", i, win_data->user_command[i].VTE_CJK_WIDTH); g_debug("- win_data->user_command[%d].locale = %s", i, win_data->user_command[i].locale); g_debug("- win_data->user_command[%d].match_regex = %s", i, win_data->user_command[i].match_regex); g_debug("- win_data->user_command[%d].match_regex_orig = %s", i, win_data->user_command[i].match_regex_orig); } g_debug("- win_data->menuitem_copy_url = %p", win_data->menuitem_copy_url); if (win_data->menuitem_copy_url) g_debug("- win_data->menuitem_copy_url->name = %s", gtk_widget_get_name (win_data->menuitem_copy_url)); g_debug("- win_data->menuitem_dim_text = %p", win_data->menuitem_dim_text); g_debug("- win_data->menuitem_cursor_blinks = %p", win_data->menuitem_cursor_blinks); g_debug("- win_data->menuitem_allow_bold_text = %p", win_data->menuitem_allow_bold_text); g_debug("- win_data->menuitem_open_url_with_ctrl_pressed = %p", win_data->menuitem_open_url_with_ctrl_pressed); g_debug("- win_data->menuitem_disable_url_when_ctrl_pressed = %p", win_data->menuitem_disable_url_when_ctrl_pressed); g_debug("- win_data->menuitem_audible_bell = %p", win_data->menuitem_audible_bell); #ifdef ENABLE_VISIBLE_BELL g_debug("- win_data->menuitem_visible_bell = %p", win_data->menuitem_visible_bell); #endif #ifdef ENABLE_BEEP_SINGAL g_debug("- win_data->menuitem_urgent_bell = %p", win_data->menuitem_urgent_bell); #endif g_debug("- win_data->menuitem_show_tabs_bar = %p", win_data->menuitem_show_tabs_bar); g_debug("- win_data->menuitem_hide_tabs_bar = %p", win_data->menuitem_hide_tabs_bar); g_debug("- win_data->menuitem_hide_scroll_bar = %p", win_data->menuitem_hide_scroll_bar); g_debug("- win_data->show_copy_paste_menu = %d", win_data->show_copy_paste_menu); g_debug("- win_data->embedded_copy_paste_menu = %d", win_data->embedded_copy_paste_menu); g_debug("- win_data->menuitem_copy = %p", win_data->menuitem_copy); g_debug("- win_data->menuitem_paste = %p", win_data->menuitem_paste); g_debug("- win_data->menuitem_clipboard = %p", win_data->menuitem_clipboard); g_debug("- win_data->menuitem_primary = %p", win_data->menuitem_primary); g_debug("- win_data->custom_cursor_color = %d", win_data->custom_cursor_color); print_color(-1, "win_data->cursor_color", win_data->cursor_color); for (i=0; icustom_color_theme[%d].color[%02d]", i, j); print_color(-1, temp_str, win_data->custom_color_theme[i].color[j]); g_free(temp_str); } } g_debug("- win_data->invert_color = %d", win_data->invert_color); g_debug("- win_data->menuitem_invert_color = %p", win_data->menuitem_invert_color); g_debug("- win_data->have_custom_color = %d", win_data->have_custom_color); g_debug("- win_data->use_custom_theme = %d", win_data->use_custom_theme); g_debug("- win_data->ansi_color_sub_menu = %p", win_data->ansi_color_sub_menu); g_debug("- win_data->ansi_color_menuitem = %p", win_data->ansi_color_menuitem); for (i=0; icolor", win_data->color[i]); print_color(i, "win_data->color_inactive", win_data->color_inactive[i]); } for (i=0; imenuitem_theme[%d] = %p", i, win_data->menuitem_theme[i]); if (win_data->menuitem_theme[i]) g_debug("- win_data->menuitem_theme[%d] (name)= %s", i, gtk_widget_get_name(win_data->menuitem_theme[i])); } for (i=0; imenuitem_erase_binding[%d] = %p", i, win_data->menuitem_erase_binding[i]); g_debug("- win_data->current_menuitem_erase_binding = %p", win_data->current_menuitem_erase_binding); #ifdef ENABLE_CURSOR_SHAPE for (i=0; imenuitem_cursor_shape[%d] = %p", i, win_data->menuitem_cursor_shape[i]); g_debug("- win_data->current_menuitem_cursor_shape = %p", win_data->current_menuitem_cursor_shape); #endif g_debug("- win_data->color_brightness = %1.3f", win_data->color_brightness); g_debug("- win_data->color_brightness_inactive = %1.3f", win_data->color_brightness_inactive); g_debug("- win_data->page_width = %d", win_data->page_width); g_debug("- win_data->fill_tabs_bar = %d", win_data->fill_tabs_bar); g_debug("- win_data->tabs_bar_position = %d", win_data->tabs_bar_position); g_debug("- win_data->page_name = %s", win_data->page_name); g_debug("- win_data->reuse_page_names = %d", win_data->reuse_page_names); g_debug("- win_data->page_names = %s", win_data->page_names); print_array("win_data->splited_page_names", win_data->splited_page_names); g_debug("- win_data->page_names_no = %d", win_data->page_names_no); g_debug("- win_data->max_page_names_no = %d", win_data->max_page_names_no); g_debug("- win_data->page_shows_number = %d", win_data->page_shows_number); g_debug("- win_data->page_shows_encoding = %d", win_data->page_shows_encoding); g_debug("- win_data->page_shows_current_cmdline = %d", win_data->page_shows_current_cmdline); g_debug("- win_data->page_shows_window_title = %d", win_data->page_shows_window_title); g_debug("- win_data->page_shows_current_dir = %d", win_data->page_shows_current_dir); g_debug("- win_data->use_color_page = %d", win_data->use_color_page); g_debug("- win_data->check_root_privileges = %d", win_data->check_root_privileges); g_debug("- win_data->bold_current_page_name = %d", win_data->bold_current_page_name); g_debug("- win_data->bold_action_page_name = %d", win_data->bold_action_page_name); for (i=0; iuser_page_color[%d] = %s", i, win_data->user_page_color[i]); g_debug("- win_data->font_anti_alias = %d", win_data->font_anti_alias); g_debug("- win_data->default_font_name = %s", win_data->default_font_name); g_debug("- win_data->restore_font_name = %s", win_data->restore_font_name); g_debug("- win_data->default_column = %ld", win_data->default_column); g_debug("- win_data->default_row = %ld", win_data->default_row); #ifdef ENABLE_SET_WORD_CHARS g_debug("- win_data->word_chars = %s", win_data->word_chars); #endif g_debug("- win_data->show_scroll_bar = %d", win_data->show_scroll_bar); g_debug("- win_data->scroll_bar_position = %d", win_data->scroll_bar_position); #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) g_debug("- win_data->transparent_background = %d", win_data->transparent_background); g_debug("- win_data->background_saturation = %1.3f", win_data->background_saturation); g_debug("- win_data->scroll_background = %d", win_data->scroll_background); g_debug("- win_data->background_image = %s", win_data->background_image); #endif // g_debug("- win_data->use_scrollback_lines = %d", win_data->use_scrollback_lines); g_debug("- win_data->scrollback_lines = %d", win_data->scrollback_lines); g_debug("- win_data->dim_text = %d", win_data->dim_text); g_debug("- win_data->cursor_blinks = %d", win_data->cursor_blinks); g_debug("- win_data->allow_bold_text = %d", win_data->allow_bold_text); g_debug("- win_data->open_url_with_ctrl_pressed = %d", win_data->open_url_with_ctrl_pressed); g_debug("- win_data->disable_url_when_ctrl_pressed = %d", win_data->disable_url_when_ctrl_pressed); g_debug("- win_data->audible_bell = %d", win_data->audible_bell); #ifdef ENABLE_VISIBLE_BELL g_debug("- win_data->visible_bell = %d", win_data->visible_bell); #endif #ifdef ENABLE_BEEP_SINGAL g_debug("- win_data->urgent_bell = %d", win_data->urgent_bell); g_debug("- win_data->urgent_bell_status = %d", win_data->urgent_bell_status); g_debug("- win_data->urgent_bell_focus_in_event_id = %ld", win_data->urgent_bell_focus_in_event_id); #endif g_debug("- win_data->erase_binding = %d", win_data->erase_binding); #ifdef ENABLE_CURSOR_SHAPE g_debug("- win_data->cursor_shape = %d", win_data->cursor_shape); #endif g_debug("- win_data->prime_user_datas_inited = %d", win_data->prime_user_datas_inited); g_debug("- win_data->prime_user_settings_inited = %d", win_data->prime_user_settings_inited); g_debug("- win_data->confirm_to_close_multi_tabs = %d", win_data->confirm_to_close_multi_tabs); g_debug("- win_data->confirm_to_execute_command = %d", win_data->confirm_to_execute_command); g_debug("- win_data->execute_command_whitelist = %s", win_data->execute_command_whitelist); print_array("win_data->execute_command_whitelists", win_data->execute_command_whitelists); g_debug("- win_data->execute_command_in_new_tab = %d", win_data->execute_command_in_new_tab); g_debug("- win_data->join_as_new_tab = %d", win_data->join_as_new_tab); g_debug("- win_data->foreground_program_whitelist = %s", win_data->foreground_program_whitelist); print_array("win_data->foreground_program_whitelists", win_data->foreground_program_whitelists); g_debug("- win_data->background_program_whitelist = %s", win_data->background_program_whitelist); print_array("win_data->background_program_whitelists", win_data->background_program_whitelists); g_debug("- win_data->confirm_to_paste = %d", win_data->confirm_to_paste); g_debug("- win_data->paste_texts_whitelist = %s", win_data->paste_texts_whitelist); print_array("win_data->paste_texts_whitelists", win_data->paste_texts_whitelists); g_debug("- win_data->find_string = %s", win_data->find_string); g_debug("- win_data->find_case_sensitive = %d", win_data->find_case_sensitive); g_debug("- win_data->find_use_perl_regular_expressions = %d", win_data->find_use_perl_regular_expressions); print_color(-1, "win_data->find_entry_bg_color", win_data->find_entry_bg_color); print_color(-1, "win_data->find_entry_current_bg_color", win_data->find_entry_current_bg_color); g_debug("- win_data->checking_menu_item = %d", win_data->checking_menu_item); g_debug("- win_data->kill_color_demo_vte = %d", win_data->kill_color_demo_vte); // g_debug("- win_data->checked_profile_version = %d", win_data->checked_profile_version); g_debug("- win_data->confirmed_profile_is_invalid = %d", win_data->confirmed_profile_is_invalid); g_debug("- win_data->temp_data = %s", win_data->temp_data); // ---- page_data ---- // g_debug("- page_data->window = %p", page_data->window); g_debug("- page_data->notebook = %p", page_data->notebook); g_debug("- page_data->page_no = %d", page_data->page_no); g_debug("- page_data->label = %p", page_data->label); g_debug("- page_data->label_text = %p", page_data->label_text); g_debug("- page_data->label_button = %p", page_data->label_button); g_debug("- page_data->hbox = %p", page_data->hbox); g_debug("- page_data->vte = %p", page_data->vte); g_debug("- page_data->scroll_bar = %p", page_data->scroll_bar); g_debug("- page_data->encoding_str = %s", page_data->encoding_str); g_debug("- page_data->locale = %s", page_data->locale); // g_debug("- page_data->environ = %s", page_data->environ); // g_debug("- page_data->VTE_CJK_WIDTH = %d", page_data->VTE_CJK_WIDTH); g_debug("- page_data->VTE_CJK_WIDTH_STR = %s", page_data->VTE_CJK_WIDTH_STR); g_debug("- page_data->page_name = %s", page_data->page_name); gchar *cmdline = get_cmdline(page_data->pid); g_debug("- page_data->pid = %d, cmdline = %s", page_data->pid, cmdline); g_free(cmdline); #ifdef SAFEMODE if (page_data->vte) #endif g_debug("- page_data row x col = (%ld x %ld)", vte_terminal_get_row_count(VTE_TERMINAL(page_data->vte)), vte_terminal_get_column_count(VTE_TERMINAL(page_data->vte))); cmdline = get_cmdline(page_data->current_tpgid); g_debug("- page_data->current_tpgid = %d, cmdline = %s", page_data->current_tpgid, cmdline); g_free(cmdline); cmdline = get_cmdline(page_data->displayed_tpgid); g_debug("- page_data->displayed_tpgid = %d, cmdline = %s", page_data->displayed_tpgid, cmdline); g_free(cmdline); g_debug("- page_data->pid_cmdline = %s", page_data->pid_cmdline); g_debug("- page_data->custom_page_name = %s", page_data->custom_page_name); g_debug("- page_data->tab_color = %s (%p)", page_data->tab_color, page_data->tab_color); g_debug("- page_data->pwd = %s", page_data->pwd); g_debug("- page_data->is_root = %d", page_data->is_root); g_debug("- page_data->is_bold = %d", page_data->is_bold); g_debug("- page_data->should_be_bold = %d", page_data->should_be_bold); g_debug("- page_data->window_title_updated = %d", page_data->window_title_updated); g_debug("- page_data->page_update_method = %d", page_data->page_update_method); g_debug("- page_data->window_title_signal = %ld", page_data->window_title_signal); g_debug("- page_data->timeout_id = %d", page_data->timeout_id); g_debug("- page_data->urgent_bell_handler_id = %ld", page_data->urgent_bell_handler_id); g_debug("- page_data->font_name = %s", page_data->font_name); g_debug("- page_data->font_size = %d", page_data->font_size); g_debug("- page_data->check_root_privileges = %d", page_data->check_root_privileges); g_debug("- page_data->page_shows_window_title = %d", page_data->page_shows_window_title); g_debug("- page_data->page_shows_current_dir = %d", page_data->page_shows_current_dir); g_debug("- page_data->page_shows_current_cmdline = %d", page_data->page_shows_current_cmdline); g_debug("- page_data->bold_action_page_name = %d", page_data->bold_action_page_name); // g_debug("- page_data->use_scrollback_lines = %d", page_data->use_scrollback_lines); #ifdef SAFEMODE if ((page_data) && (page_data->window_title_tpgid)) { #endif cmdline = get_cmdline(*(page_data->window_title_tpgid)); g_debug("- page_data->*window_title_tpgid = %d (%s)", *(page_data->window_title_tpgid), cmdline); g_free(cmdline); #ifdef SAFEMODE } if (page_data->lost_focus) #endif g_debug("- page_data->*lost_focus = %d", *(page_data->lost_focus)); #ifdef USE_GTK2_GEOMETRY_METHOD # ifdef SAFEMODE if (page_data->keep_vte_size) # endif g_debug("- page_data->*keep_vte_size = %d", *(page_data->keep_vte_size)); #endif #ifdef SAFEMODE if (page_data->current_vte) #endif g_debug("- page_data->*current_vte = %p", *(page_data->current_vte)); g_debug("- page_data->window_title_pwd = %s", page_data->window_title_pwd); g_debug("- page_data->custom_window_title = %d", page_data->custom_window_title); // g_debug("- page_data->*update_window_title_only = %d", *(page_data->update_window_title_only)); // g_debug("- page_data->force_using_cmdline = %d", page_data->force_using_cmdline); for (i=0; itag[%d] = %d", i, page_data->tag[i]); g_debug("- page_data->match_regex_setted = %d", page_data->match_regex_setted); } void print_array(gchar *name, gchar **data) { if (data) { gint i = 0; while (data[i]) { g_debug("- %s %d = %s", name, i, data[i]); i++; } } else g_debug("- %s = (NULL)", name); } void print_color(gint no, gchar *name, GdkRGBA color) { # ifdef USE_GDK_RGBA if (no<0) g_debug("- %s = %0.4f, %0.4f, %0.4f, %0.4f", name, color.alpha, color.red, color.green, color.blue); else g_debug("- %s (%2d) = %0.4f, %0.4f, %0.4f, %0.4f", name, no, color.alpha, color.red, color.green, color.blue); # else if (no<0) g_debug("- %s = %04X, %04X, %04X, %04X", name, color.pixel, color.red, color.green, color.blue); else g_debug("- %s (%2d) = %04X, %04X, %04X, %04X", name, no, color.pixel, color.red, color.green, color.blue); # endif } #endif void win_data_dup(struct Window *win_data_orig, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch win_data_dup() with win_data_orig = %p, win_data = %p", win_data_orig, win_data); #endif #ifdef SAFEMODE if ((win_data_orig==NULL) || (win_data==NULL)) return; #endif gint i; // The win_data->window is created already before win_data_dup() is launched. GtkWidget *window_orig = win_data->window; // The following datas may come from new_window() and already do g_strdup(); // We should save it before do memcpy() gchar *init_dir = win_data->init_dir; gchar *home = win_data->home; gchar *shell = win_data->shell; gchar *wmclass_name = win_data->wmclass_name; gchar *wmclass_class = win_data->wmclass_class; gchar *runtime_locale_list = win_data->runtime_locale_list; gchar *runtime_encoding = win_data->runtime_encoding; gchar *runtime_LC_MESSAGES = win_data->runtime_LC_MESSAGES; gchar *environment = win_data->environment; memcpy( win_data, win_data_orig, sizeof(* win_data_orig)); // g_debug("Copyed size = %d", sizeof(* win_data_orig)); // ---- environ and command line option ---- // if (init_dir) win_data->init_dir = init_dir; else win_data->init_dir = g_strdup(win_data->init_dir); if (home) win_data->home = home; else win_data->home = g_strdup(win_data_orig->home); if (shell) win_data->shell = shell; else win_data->shell = g_strdup(win_data_orig->shell); if (wmclass_name) win_data->wmclass_name = wmclass_name; else win_data->wmclass_name = g_strdup(win_data_orig->wmclass_name); if (wmclass_class) win_data->wmclass_class = wmclass_class; else win_data->wmclass_class = g_strdup(win_data_orig->wmclass_class); if (runtime_locale_list) win_data->runtime_locale_list = runtime_locale_list; else win_data->runtime_locale_list= g_strdup(win_data_orig->runtime_locale_list); if (runtime_encoding) win_data->runtime_encoding = runtime_encoding; else win_data->runtime_encoding = g_strdup(win_data_orig->runtime_encoding); if (runtime_LC_MESSAGES) win_data->runtime_LC_MESSAGES = runtime_LC_MESSAGES; else win_data->runtime_LC_MESSAGES = g_strdup(win_data_orig->runtime_LC_MESSAGES); if (environment) win_data->environment = environment; else win_data->environment = g_strdup(win_data_orig->environment); win_data->geometry = g_strdup(win_data_orig->geometry); #ifdef SAFEMODE if (win_data_orig->warned_locale_list) #endif win_data->warned_locale_list = g_string_new(win_data_orig->warned_locale_list->str); for (i=0; i<3; i++) win_data->encoding_locale_menuitems[i] = NULL; win_data->default_encoding = g_strdup(win_data_orig->default_encoding); win_data->encoding_sub_menu = NULL; // win_data->default_menuitem_encoding; win_data->default_locale = g_strdup(win_data_orig->default_locale); win_data->locales_list = g_strdup(win_data_orig->locales_list); // g_debug("win_data->default_locale = %s", win_data->default_locale); // g_debug("win_data->locales_list = %s", win_data->locales_list); // g_debug("get_default_LC_TYPE() = %s", get_default_LC_TYPE()); // g_debug("!!! Set win_data->locale_sub_menu to NULL!!!"); win_data->locale_sub_menu = NULL; win_data->default_shell = g_strdup(win_data_orig->default_shell); #ifdef ENABLE_SET_EMULATION win_data->emulate_term = g_strdup(win_data_orig->emulate_term); #endif // win_data->VTE_CJK_WIDTH; win_data->VTE_CJK_WIDTH_STR = g_strdup(win_data_orig->VTE_CJK_WIDTH_STR); // g_debug("win_data->shell = %s, win_data_orig->shell = %s", win_data->shell, win_data_orig->shell); // win_data->argc; // win_data->argv; // win_data->command; // win_data->hold = FALSE; win_data->init_tab_number = 1; // win_data->login_shell; // win_data->utmp; win_data->subitem_new_window_from_list = NULL; win_data->menuitem_new_window_from_list = NULL; win_data->subitem_load_profile_from_list = NULL; win_data->menuitem_load_profile_from_list = NULL; // win_data->use_custom_profile; win_data->profile = g_strdup(win_data_orig->profile); win_data->specified_profile = NULL; win_data->profile_dir_modtime = -1; win_data->menuitem_auto_save = NULL; // win_data->auto_save; // g_debug("dup environ and command line option finish!"); // ---- the component of a single window ---- // // win_data->startup_fullscreen; // win_data->fullscreen; // win_data->true_fullscreen; // win_data->fullscreen_show_tabs_bar; // win_data->fullscreen_show_scroll_bar; // win_data->window_status; win_data->window = window_orig; win_data->notebook = NULL; // win_data->show_close_button_on_tab; // win_data->show_close_button_on_all_tab; win_data->current_vte = NULL; // win_data->window_title_shows_current_page; if (win_data->custom_window_title_str) { win_data->custom_window_title_str = g_strdup(win_data_orig->custom_window_title_str); update_window_title(win_data->window, win_data->custom_window_title_str, win_data->window_title_append_package_name); } win_data->custom_tab_names_str = NULL; win_data->custom_tab_names_strs = NULL; win_data->window_title_tpgid=0; if (win_data_orig->use_rgba == -1) win_data->use_rgba = 1; // win_data->use_rgba_orig; #ifdef ENABLE_RGBA // win_data->transparent_window; // win_data->window_opacity; #endif // win_data->enable_key_binding; for (i=0; iuser_keys[i].value = g_strdup(win_data_orig->user_keys[i].value); // win_data->hints_type = win_data_orig->hints_type; win_data->hints_type = HINTS_FONT_BASE; # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! win_data_dup(win_data %p): set win_data->hints_type = %d !!\033[0m\n", ANSI_COLOR_BLUE, win_data, win_data->hints_type); # endif // win_data->resize_type; // win_data->geometry_width; // win_data->geometry_height; // win_data->lost_focus; // win_data->keep_vte_size; // ---- the component of a single menu ---- // win_data->menu = NULL; // win_data->menu_activated; #ifdef ENABLE_RGBA win_data->menuitem_trans_win = NULL; #endif win_data->menuitem_trans_bg = NULL; // win_data->show_color_selection_menu; // win_data->show_resize_menu; // win_data->font_resize_ratio; // win_data->window_resize_ratio; // win_data->show_background_menu; #ifdef ENABLE_IM_APPEND_MENUITEMS // win_data->show_input_method_menu; #endif // win_data->show_change_page_name_menu; // win_data->show_exit_menu; // win_data->enable_hyperlink; for (i=0; iuser_regex[i] = g_strdup(win_data_orig->user_regex[i]); for (i=0; iuser_command[i].command = g_strdup(win_data_orig->user_command[i].command); win_data->user_command[i].environ = g_strdup(win_data_orig->user_command[i].environ); win_data->user_command[i].environments = split_string(win_data->user_command[i].environ, " ", -1); win_data->user_command[i].locale = g_strdup(win_data_orig->user_command[i].locale); win_data->user_command[i].match_regex = g_strdup(win_data_orig->user_command[i].match_regex); win_data->user_command[i].match_regex_orig = g_strdup(win_data_orig->user_command[i].match_regex_orig); } win_data->menuitem_copy_url = NULL; win_data->menuitem_dim_text = NULL; #ifdef ENABLE_RGBA win_data->menuitem_dim_window = NULL; #endif win_data->menuitem_cursor_blinks = NULL; win_data->menuitem_allow_bold_text = NULL; win_data->menuitem_open_url_with_ctrl_pressed = NULL; win_data->menuitem_disable_url_when_ctrl_pressed = NULL; win_data->menuitem_audible_bell = NULL; #ifdef ENABLE_VISIBLE_BELL win_data->menuitem_visible_bell = NULL; #endif #ifdef ENABLE_BEEP_SINGAL win_data->menuitem_urgent_bell = NULL; #endif win_data->menuitem_show_tabs_bar = NULL; win_data->menuitem_hide_tabs_bar = NULL; win_data->menuitem_hide_scroll_bar = NULL; // win_data->show_copy_paste_menu; win_data->menuitem_copy = NULL; win_data->menuitem_paste = NULL; win_data->menuitem_clipboard = NULL; win_data->menuitem_primary = NULL; // ---- the color used in vte ---- // // win_data->fg_color; // win_data->fg_color_inactive; // win_data->custom_cursor_color; // win_data->cursor_color; // win_data->bg_color; // win_data->menuitem_invert_color win_data->menuitem_invert_color = NULL; // win_data->color_theme_str_orig will always be NULL // win_data->color_theme_str_orig = g_strdup(win_data_orig->color_theme_str)orig); for (i=0; icolor[i] = win_data_orig->color[i]; win_data->color_inactive[i] = win_data_orig->color_inactive[i]; } for (i=0; imenuitem_theme[i] = NULL; win_data->current_menuitem_theme = NULL; // win_data->have_custom_color; // win_data->use_custom_theme; for (i=0; iansi_theme_menuitem[i] = NULL; win_data->ansi_color_sub_menu = NULL; win_data->ansi_color_menuitem = NULL; // win_data->color_brightness; // win_data->color_brightness_inactive; // ---- tabs on notebook ---- // // win_data->page_width; // win_data->fill_tabs_bar; // win_data->tabs_bar_position; win_data->page_name = g_strdup(win_data_orig->page_name); // win_data->reuse_page_names; win_data->page_names = g_strdup(win_data_orig->page_names); win_data->splited_page_names = split_string(win_data->page_names, " ", -1); // print_array("COPY: win_data->splited_page_names", win_data->splited_page_names); // win_data->page_names_no; // win_data->max_page_names_no; // win_data->page_shows_number; // win_data->page_shows_encoding; // win_data->page_shows_current_cmdline; // win_data->page_shows_window_title; // win_data->page_shows_current_dir; // win_data->use_color_page; // win_data->check_root_privileges; // win_data->bold_current_page_name; // win_data->bold_action_page_name; for (i=0; iuser_page_color[i] = g_strdup(win_data_orig->user_page_color[i]); // ---- font ---- // // win_data->font_anti_alias; win_data->default_font_name = g_strdup(win_data_orig->default_font_name); win_data->restore_font_name = g_strdup(win_data_orig->restore_font_name); // ---- other settings for init a vte ---- // // win_data->default_column; // win_data->default_row; #ifdef ENABLE_SET_WORD_CHARS win_data->word_chars = g_strdup(win_data_orig->word_chars); #endif // win_data->show_scroll_bar; // win_data->scroll_bar_position; #if defined(ENABLE_VTE_BACKGROUND) || defined(FORCE_ENABLE_VTE_BACKGROUND) // win_data->transparent_background; // win_data->background_saturation; // win_data->scroll_background; win_data->background_image = g_strdup(win_data_orig->background_image); #endif // win_data->scrollback_lines; // win_data->dim_text; // win_data->dim_window; // win_data->cursor_blinks; // win_data->allow_bold_text; // win_data->open_url_with_ctrl_pressed; // win_data->disable_url_when_ctrl_pressed; // win_data->audible_bell; #ifdef ENABLE_VISIBLE_BELL // win_data->visible_bell; #endif // win_data->urgent_bell; // win_data->urgent_bell_status; #ifdef ENABLE_BEEP_SINGAL win_data->urgent_bell_focus_in_event_id = 0; #endif // win_data->erase_binding; for (i=0; imenuitem_erase_binding[i] = NULL; win_data->current_menuitem_erase_binding = NULL; #ifdef ENABLE_CURSOR_SHAPE // win_data->cursor_shape; for (i=0; imenuitem_cursor_shape[i] = NULL; win_data->current_menuitem_cursor_shape = NULL; #endif // ---- other ---- // // win_data->confirm_to_close_multi_tabs; // win_data->prime_user_datas_inited; // win_data->prime_user_settings_inited; // win_data->confirm_to_execute_command; win_data->execute_command_whitelist = g_strdup(win_data_orig->execute_command_whitelist); // g_debug("win_data->execute_command_whitelist for win_data (%p) duped!", win_data); win_data->execute_command_whitelists = split_string(win_data->execute_command_whitelist, " ", -1); // win_data->execute_command_in_new_tab; // win_data->join_as_new_tab; win_data->foreground_program_whitelist = g_strdup(win_data_orig->foreground_program_whitelist); win_data->foreground_program_whitelists = split_string(win_data->foreground_program_whitelist, " ", -1); win_data->background_program_whitelist = g_strdup(win_data_orig->background_program_whitelist); win_data->background_program_whitelists = split_string(win_data->background_program_whitelist, " ", -1); win_data->paste_texts_whitelist = g_strdup(win_data_orig->paste_texts_whitelist); win_data->paste_texts_whitelists = split_string(win_data->paste_texts_whitelist, " ", -1); win_data->find_string = g_strdup(win_data_orig->find_string); // win_data->find_case_sensitive; // win_data->find_use_perl_regular_expressions; // win_data->find_entry_bg_color; // win_data->find_entry_current_bg_color; // win_data->checking_menu_item; // win_data->dialog_activated; // win_data->kill_color_demo_vte; // win_data->adding_page; // win_data->confirmed_profile_is_invalid; win_data->temp_data = NULL; } void update_window_hint(struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch update_window_hint() with win_data = %p, page_data = %p", win_data, page_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (page_data==NULL) || (page_data->notebook==NULL)) return; #endif if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(page_data->notebook)) == 1 && page_data->font_size == 0) win_data->hints_type = HINTS_FONT_BASE; else if ((check_if_every_vte_is_using_restore_font_name(win_data)) || #ifdef USE_GTK2_GEOMETRY_METHOD win_data->fullscreen) #else win_data->window_status) #endif win_data->hints_type = HINTS_FONT_BASE; else win_data->hints_type = HINTS_NONE; # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! update_window_hint(win_data %p): set win_data->hints_type = %d (page_data->font_size = %d)!!\033[0m\n", ANSI_COLOR_BLUE, win_data, win_data->hints_type, page_data->font_size); # endif // g_debug("window_resizable in change current font!"); #ifdef GEOMETRY fprintf(stderr, "\033[1;37m!! update_window_hint(win_data %p): call window_resizable() for vte = %p with hints_type = %d\033[0m\n", win_data, page_data->vte, win_data->hints_type); #endif window_resizable(page_data->window, page_data->vte, win_data->hints_type); } gboolean hide_and_show_tabs_bar(struct Window *win_data , Switch_Type show_tabs_bar) { #ifdef DETAIL g_debug("! Launch hide_and_show_tabs_bar() with win_data = %p, show_tabs_bar = %d", win_data, show_tabs_bar); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return FALSE; #endif gboolean show = get_hide_or_show_tabs_bar(win_data, show_tabs_bar); // g_debug("hide_and_show_tabs_bar: show = %d", show); if (show == gtk_notebook_get_show_tabs(GTK_NOTEBOOK(win_data->notebook))) return FALSE; // win_data->keep_vte_size |= 6; // window_resizable(win_data->window, win_data->current_vte, 2, 1); #ifdef USE_GTK2_GEOMETRY_METHOD if (! (win_data->fullscreen || win_data->window_status)) #else if (win_data->window_status == WINDOW_NORMAL) #endif { #ifdef USE_GTK2_GEOMETRY_METHOD # ifdef GEOMETRY g_debug("@ hide_and_show_tabs_bar(win_data %p): Call keep_gtk2_window_size() with keep_vte_size = %x", win_data, win_data->keep_vte_size); # endif // g_debug("hide_and_show_tabs_bar(): launch keep_gtk2_window_size()!"); keep_gtk2_window_size (win_data, win_data->current_vte, 0x1c); #endif #ifdef USE_GTK3_GEOMETRY_METHOD # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! hide_and_show_tabs_bar(win_data %p)(GEOMETRY_AUTOMATIC): " "Calling keep_gtk3_window_size() with hints_type = %d\n", ANSI_COLOR_MAGENTA, win_data, win_data->hints_type); # endif win_data->resize_type = GEOMETRY_AUTOMATIC; keep_gtk3_window_size(win_data, FALSE); #endif } #ifdef USE_GTK3_GEOMETRY_METHOD if (win_data->window_status == WINDOW_RESIZING_TO_NORMAL) { # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! hide_and_show_tabs_bar(win_data %p)(GEOMETRY_CUSTOM): " "Calling keep_gtk3_window_size() with hints_type = %d\n", ANSI_COLOR_MAGENTA, win_data, win_data->hints_type); # endif win_data->resize_type = GEOMETRY_CUSTOM; keep_gtk3_window_size(win_data, FALSE); } #endif gtk_notebook_set_show_tabs(GTK_NOTEBOOK(win_data->notebook), show); if (show) set_widget_thickness(win_data->notebook, 1); else set_widget_thickness(win_data->notebook, 0); #ifdef GEOMETRY fprintf(stderr, "\033[1;34m!! hide_and_show_tabs_bar(win_data %p): call gtk_notebook_set_show_border() with show = %d\033[0m\n", win_data, show); #endif gtk_notebook_set_show_border(GTK_NOTEBOOK(win_data->notebook), show); if (show) set_widget_can_not_get_focus(win_data->notebook); return TRUE; } gboolean get_hide_or_show_tabs_bar(struct Window *win_data, Switch_Type show_tabs_bar) { #ifdef DETAIL g_debug("! Launch get_hide_or_show_tabs_bar() with win_data = %p, show_tabs_bar = %d", win_data, show_tabs_bar); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->notebook==NULL)) return FALSE; #endif gboolean show = gtk_notebook_get_show_tabs(GTK_NOTEBOOK(win_data->notebook)); // g_debug("get_hide_or_show_tabs_bar: show = %d, win_data->window_status = %d", show, win_data->window_status); switch (show_tabs_bar) { case AUTOMATIC: if ((gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)) > 1) && #ifdef USE_GTK2_GEOMETRY_METHOD (win_data->true_fullscreen==FALSE)) #else ((win_data->window_status==WINDOW_NORMAL) || (win_data->window_status==WINDOW_RESIZING_TO_NORMAL) || (win_data->window_status==WINDOW_APPLY_PROFILE_NORMAL) || (win_data->window_status==WINDOW_MAX_WINDOW))) #endif show = TRUE; else show = FALSE; break; case TEMPORARY_ON: win_data->show_tabs_bar = AUTOMATIC; case ON: case FORCE_ON: show = TRUE; break; case TEMPORARY_OFF: win_data->show_tabs_bar = AUTOMATIC; case OFF: case FORCE_OFF: show = FALSE; break; default: # ifdef FATAL print_switch_out_of_range_error_dialog("hide_and_show_tabs_bar", "show_tabs_bar", show_tabs_bar); # endif break; } return show; } void set_widget_can_not_get_focus(GtkWidget *widget) { #ifdef DETAIL g_debug("! Launch set_widget_can_not_get_focus() with widget = %p", widget); #endif #ifdef SAFEMODE if (widget==NULL) return; #endif gtk_widget_set_can_focus(GTK_WIDGET (widget), FALSE); } gboolean hide_scrollback_lines(GtkWidget *menu_item, struct Window *win_data) { #ifdef DETAIL g_debug("! Launch hide_scrollback_lines()"); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif gboolean show = TRUE; #ifdef SAFEMODE if (win_data->menuitem_hide_scroll_bar) #endif show = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_hide_scroll_bar)); win_data->show_scroll_bar = AUTOMATIC; #ifdef USE_GTK2_GEOMETRY_METHOD if (show && win_data->true_fullscreen) win_data->show_scroll_bar = FORCE_ON; else if ((show == FALSE) && (win_data->true_fullscreen == FALSE)) win_data->show_scroll_bar = FORCE_OFF; #else switch (win_data->window_status) { case WINDOW_NORMAL: case WINDOW_RESIZING_TO_NORMAL: case WINDOW_MAX_WINDOW: case WINDOW_APPLY_PROFILE_NORMAL: if (show==FALSE) win_data->show_scroll_bar = FORCE_OFF; break; case WINDOW_MAX_WINDOW_TO_FULL_SCREEN: case WINDOW_FULL_SCREEN: case WINDOW_START_WITH_FULL_SCREEN: case WINDOW_APPLY_PROFILE_FULL_SCREEN: if (show) win_data->show_scroll_bar = FORCE_ON; break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("hide_scrollback_lines", "win_data->window_status", win_data->window_status); #endif break; } #endif // g_debug("hide_scrollback_lines(): show = %d, win_data->show_scroll_bar = %d", // show, win_data->show_scroll_bar); gint i; struct Page *page_data = NULL; gint total_page = -1; #ifdef SAFEMODE if (win_data->notebook) #endif total_page = gtk_notebook_get_n_pages(GTK_NOTEBOOK(win_data->notebook)); for (i=0; ifullscreen || win_data->window_status)) { # ifdef GEOMETRY g_debug("@ hide_scrollback_lines(for %p): Call keep_gtk2_window_size() with keep_vte_size = %x", win_data->window, win_data->keep_vte_size); # endif // g_debug("hide_scrollback_lines(): launch keep_gtk2_window_size()!"); keep_gtk2_window_size (win_data, win_data->current_vte, 0xc00); } #endif #ifdef USE_GTK3_GEOMETRY_METHOD if (win_data->window_status == WINDOW_NORMAL) { # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! hide_scrollback_lines(win_data %p)(GEOMETRY_AUTOMATIC): " "Calling keep_gtk3_window_size() with hints_type = %d\033[0m\n", ANSI_COLOR_MAGENTA, win_data, win_data->hints_type); # endif win_data->resize_type = GEOMETRY_AUTOMATIC; keep_gtk3_window_size(win_data, FALSE); } #endif #ifdef USE_GTK3_GEOMETRY_METHOD if (win_data->window_status == WINDOW_RESIZING_TO_NORMAL) { # ifdef GEOMETRY fprintf(stderr, "\033[1;%dm!! hide_scrollback_lines(win_data %p)(GEOMETRY_CUSTOM): " "Calling keep_gtk3_window_size() with hints_type = %d\033[0m\n", ANSI_COLOR_MAGENTA, win_data, win_data->hints_type); # endif win_data->resize_type = GEOMETRY_CUSTOM; keep_gtk3_window_size(win_data, FALSE); } #endif return TRUE; } gboolean fullscreen_show_hide_scroll_bar(struct Window *win_data) { #ifdef DETAIL g_debug("! Launch fullscreen_show_hide_scroll_bar() with win_data = %p", win_data); #endif #ifdef SAFEMODE if ((win_data==NULL) || (win_data->menuitem_hide_scroll_bar==NULL)) return FALSE; #endif gboolean show = check_show_or_hide_scroll_bar(win_data); gboolean current_show = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_hide_scroll_bar)); // g_debug("fullscreen_show_hide_scroll_bar(): show = %d, current_show = %d", show, current_show); if (show == current_show) return FALSE; gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(win_data->menuitem_hide_scroll_bar), show); // g_debug("fullscreen_show_hide_scroll_bar(): check_show_or_hide_scroll_bar() = %d", show); hide_scrollback_lines(win_data->menuitem_hide_scroll_bar, win_data); return TRUE; } gboolean confirm_to_paste_form_clipboard(Clipboard_Type type, struct Window *win_data, struct Page *page_data) { #ifdef DETAIL g_debug("! Launch confirm_to_paste_form_clipboard() with type = %d, win_data = %p, page_data = %p", type, win_data, page_data); #endif #ifdef SAFEMODE if (page_data==NULL) return FALSE; #endif gchar **stats = get_pid_stat(get_tpgid(page_data->pid), 4); gboolean pasted = FALSE; if ((stats) && (check_string_in_array(stats[2], win_data->paste_texts_whitelists) == FALSE)) pasted = show_clipboard_dialog(type, win_data, page_data, CONFIRM_TO_PASTE_TEXTS_TO_VTE_TERMINAL); g_strfreev(stats); return pasted; } gboolean show_clipboard_dialog(Clipboard_Type type, struct Window *win_data, struct Page *page_data, Dialog_Type_Flags dialog_type) { #ifdef DETAIL g_debug("! Launch show_clipboard_dialog() with type = %d, win_data = %p, page_data = %p, dialog_type = %d", type, win_data, page_data, dialog_type); #endif #ifdef SAFEMODE if (win_data==NULL) return FALSE; #endif gboolean pasted = FALSE; GtkClipboard *clipboard = NULL; switch (type) { case SELECTION_CLIPBOARD: { extern GtkClipboard *selection_clipboard; clipboard = selection_clipboard; break; } case SELECTION_PRIMARY: { extern GtkClipboard *selection_primary; clipboard = selection_primary; break; } default: #ifdef FATAL print_switch_out_of_range_error_dialog("show_clipboard_dialog", "type", type); #endif break; } #ifdef SAFEMODE if (clipboard==NULL) return FALSE; #endif gchar *clipboard_str = g_strdup(gtk_clipboard_wait_for_text(clipboard)); gchar *old_temp_data = win_data->temp_data; switch (dialog_type) { case CONFIRM_TO_PASTE_TEXTS_TO_VTE_TERMINAL: win_data->temp_data = colorful_max_new_lines(clipboard_str, 0, 7); break; case GENERAL_INFO: { gchar *tmp_str = colorful_max_new_lines(clipboard_str, -1, 7); if (tmp_str) win_data->temp_data = g_strdup_printf("%s\x10%s\x10%s", _("Clipboard"), "Clipboard", tmp_str); else win_data->temp_data = NULL; g_free(tmp_str); break; } default: #ifdef FATAL print_switch_out_of_range_error_dialog("show_clipboard_dialog", "dialog_type", dialog_type); #endif break; } // g_debug("Trying to paste '%s' (%s) to vte...", win_data->temp_data, clipboard_str); // g_debug("show_clipboard_dialog(): win_data->temp_data = \"%s\"", win_data->temp_data); if (win_data->temp_data) { // g_debug("'%s' have new line in it!", win_data->temp_data); GtkResponseType response = dialog(NULL, dialog_type); if ((response==GTK_RESPONSE_OK) || (response==GTK_RESPONSE_YES) || (response==GTK_RESPONSE_ACCEPT)) { if (dialog_type == CONFIRM_TO_PASTE_TEXTS_TO_VTE_TERMINAL) { #ifdef SAFEMODE if (page_data!=NULL) { #endif if (response==GTK_RESPONSE_ACCEPT) { gchar **old_clipboard_strs = split_string(clipboard_str, "\n\r", -1); gchar *new_clipboard_str = convert_array_to_string(old_clipboard_strs, '\0'); // g_debug("Set clipboard to %s", new_clipboard_str); if (new_clipboard_str) gtk_clipboard_set_text(clipboard, new_clipboard_str, -1); g_free(new_clipboard_str); g_strfreev(old_clipboard_strs); } else if (response==GTK_RESPONSE_YES) { // remove "\\\r" and "\\\n", and replease it with ' ' gchar *temp_clipboard_str = g_strdup(clipboard_str); gint i=0, j=0; while (clipboard_str[i]) { if ((clipboard_str[i]=='\\') && ((clipboard_str[i+1]=='\n') || (clipboard_str[i+1]=='\r'))) { i+=2; if (clipboard_str[i]=='>') { if (clipboard_str[i+1]==' ') i+=2; } } if ((clipboard_str[i]=='\n') || (clipboard_str[i]=='\r')) { if (clipboard_str[i+1]) { if (clipboard_str[i+1]=='>' && clipboard_str[i+2]==' ') { temp_clipboard_str[j]=' '; i+=2; j++; } else { temp_clipboard_str[j]=' '; i++; j++; } } } temp_clipboard_str[j]=clipboard_str[i]; i++; j++; } temp_clipboard_str[j]='\0'; // g_debug ("show_clipboard_dialog(): temp_clipboard_str = %s", temp_clipboard_str); // remove '\n' and '\r' gchar **old_clipboard_strs = split_string(temp_clipboard_str, "\n\r", -1); gchar *new_clipboard_str = convert_array_to_string(old_clipboard_strs, '\0'); // g_debug ("show_clipboard_dialog(): new_clipboard_str = %s", new_clipboard_str); // join ' ' and '\t' gchar *join_clipboard_str = g_strdup(new_clipboard_str); i=0, j=0; gint need_printed_space; while (new_clipboard_str[i]) { need_printed_space = 0; while ((new_clipboard_str[i]==' ') || (new_clipboard_str[i]=='\t')) { need_printed_space = 1; i++; } if (need_printed_space && (j!=0)) { join_clipboard_str[j]=' '; j++; } if (new_clipboard_str[i]) { join_clipboard_str[j] = new_clipboard_str[i]; i++; j++; } } if (join_clipboard_str[j-1]==' ') join_clipboard_str[j-1]='\0'; else join_clipboard_str[j]='\0'; // g_debug ("show_clipboard_dialog(): join_clipboard_str = %s", join_clipboard_str); // g_debug("Set clipboard to %s", join_clipboard_str); if (join_clipboard_str) gtk_clipboard_set_text(clipboard, join_clipboard_str, -1); g_free(temp_clipboard_str); g_free(new_clipboard_str); g_free(join_clipboard_str); g_strfreev(old_clipboard_strs); } switch (type) { case SELECTION_CLIPBOARD: vte_terminal_paste_clipboard(VTE_TERMINAL(page_data->vte)); break; case SELECTION_PRIMARY: vte_terminal_paste_primary(VTE_TERMINAL(page_data->vte)); break; default: #ifdef FATAL print_switch_out_of_range_error_dialog("show_clipboard_dialog", "type", type); #endif break; } // recover the text in clipboard if ((response==GTK_RESPONSE_ACCEPT) || (response==GTK_RESPONSE_YES)) { // g_debug("Set clipboard to %s", clipboard_str); if (clipboard_str) gtk_clipboard_set_text(clipboard, clipboard_str, -1); } #ifdef SAFEMODE } #endif } } pasted = TRUE; } g_free(clipboard_str); g_free(win_data->temp_data); win_data->temp_data = old_temp_data; return pasted; } src/window.h000066400000000000000000000066321246562641500133470ustar00rootroot00000000000000/* * Copyright (c) 2008-2014 Lu, Chao-Ming (Tetralet). All rights reserved. * * This file is part of LilyTerm. * * LilyTerm 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. * * LilyTerm 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 LilyTerm. If not, see . */ #include #include // for L10n #include #include // for exit() #include // for strcmp() #include // for chdir() #include // for opendir() readdir() closedir() #include // for getpwuid() #include // for g_chdir() #include // for GDK_WINDOW_XID // #include #include "lilyterm.h" #ifdef USE_XPARSEGEOMETRY // for XParseGeometry() #include #endif gboolean window_option(struct Window *win_data, gchar *encoding, int argc, char *argv[]); char **set_process_data (pid_t entry_pid, gint *ppid, StrAddr **cmd); gboolean window_key_press(GtkWidget *widget, GdkEventKey *event, struct Window *win_data); gboolean window_key_release(GtkWidget *widget, GdkEventKey *event, struct Window *win_data); void window_style_set(GtkWidget *window, GtkStyle *previous_style, struct Window *win_data); #if defined(USE_GTK2_GEOMETRY_METHOD) || defined(UNIT_TEST) void window_size_request(GtkWidget *window, GtkRequisition *requisition, struct Window *win_data); gboolean window_state_event(GtkWidget *widget, GdkEventWindowState *event, struct Window *win_data); #endif #if defined(USE_GTK3_GEOMETRY_METHOD) || defined(UNIT_TEST) gboolean idle_show_or_hide_tabs_bar_and_scroll_bar(struct Window *win_data); gboolean idle_gtk_window_fullscreen(struct Window *win_data); void resize_to_exist_widget(struct Window *win_data); void save_vte_geometry(struct Window *win_data); gboolean idle_to_resize_window(struct Window *win_data); gboolean idle_hide_and_show_tabs_bar(struct Window *win_data); #endif void window_size_allocate(GtkWidget *window, GtkAllocation *allocation, struct Window *win_data); gboolean window_get_focus(GtkWidget *window, GdkEventFocus *event, struct Window *win_data); gboolean window_lost_focus(GtkWidget *window, GdkEventFocus *event, struct Window *win_data); #ifdef ENABLE_PAGE_ADDED void notebook_page_added(GtkNotebook *notebook, GtkWidget *child, guint page_num, struct Window *win_data); #endif // void notebook_page_removed (GtkNotebook *notebook, GtkWidget *child, guint page_num, struct Window *win_data); void reorder_page_after_added_removed_page(struct Window *win_data, guint page_num); void destroy_window(struct Window *win_data); GtkNotebook *create_window(GtkNotebook *notebook, GtkWidget *page, gint x, gint y, struct Window *win_data); #ifdef FATAL void dump_data(struct Window *win_data, struct Page *page_data); #endif void win_data_dup(struct Window *win_data_orig, struct Window *win_data); gboolean get_hide_or_show_tabs_bar(struct Window *win_data, Switch_Type show_tabs_bar); gboolean fullscreen_show_hide_scroll_bar (struct Window *win_data);