diff options
author | Kensuke Matsuzaki <zakki@peppermint.jp> | 2011-07-23 16:34:47 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-11-09 18:20:04 +0000 |
commit | 870fb3ecb9ac84ed3479abed675c64fa342d1a4c (patch) | |
tree | 39d191a1f30775483f05a5fffc0733cdc83f4daf |
xwinwm-0.0.1
447 files changed, 18505 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..af61761 --- /dev/null +++ b/.gitignore @@ -0,0 +1,20 @@ +autom4te.cache/ +src/blackbox.cc +blackbox.cat +nls/blackbox-nls.hh +config.h +config.h.in +config.log +config.status +configure +configure.in +install-sh +Makefile.in +Makefile +missing +mkinstalldirs +stamp-h1 +Translation.m +version.h.in +version.h +*.o @@ -0,0 +1,106 @@ +-- AUTHORS for XWinWM + +Current Author: + Kensuke Matsuzaki <zakki@peppermint.jp> + + +-- AUTHORS for HackedBox + +Current Hacker: + Larry Owen + +Authors: + Brad Hughes <bhughes@trolltech.com> + Sean 'Shaleh' Perry <shaleh@debian.org> + +Interim author for the 0.61.x series: + Jeff Raven <jraven@psu.edu> + +Current Contributors: + Ben 'xOr' Jansens <xor@orodu.net> + - metric tons of code patches + John Kennis <jkennis@chello.nl> + - bbpager, ideas, and support + Jason 'vanRijn' Kasper <vR@movingparts.net> + - bbkeys, ideas, support + Chris Mecca <flip@linuxguide.org> + - use of his irix machine for testing + Dale P. Smith <dsmith@altustech.com> + - bsetroot now sets xrootpmap_id atom + Matt Wilson <mwilson@quicksilver.net.nz> + - for noticing all of the little things + +nls contributors: + Mads Martin Joergensen <mmj@suse.de> + - Danish (da_DK) + Jan Schaumann <jschauma@netmeister.org> + - German (de_DE) + Adriano Varoli Piazza <adrianovaroli@redusers.com> + - Spanish (submitted as es_AR, ES and MX) + Duret Bertrand <bertrand.duret@libertysurf.fr> + - updated French (fr_FR) + Bodnar Istvan <piggy@dub.hu> + - Hungarian (hu_HU) + Luca Marrazzo <marra.luca@libero.it> + - Italian (it_IT) + SATO Satoru <ssato@adachi.ne.jp> + - Japanese (ja_JP) + Hyun Suk Noh <tzesti@users.sourceforge.net> + - Korean (ko_KR) + Wilbert Berendsen <wbsoft@xs4all.nl> + - Dutch (nl_NL) + Øyvind Stegard <oyvind.stegard@bluezone.no> + - Norwegian (no_NO) + Wojciech Krygier <wkrygie@kis.p.lodz.pl> + - Polish (pl_PL) + Ciprian Popovici <ciprian@zuavra.net> + - Romanian (ro_RO) + Michail A. Rusinov <one@da.ru> + Dmitriy N. Rusinov <rusinov@udm.net> + - Russian (ru_RU) + Marian Andre <andre@intrak.sk> + - Slovakian (sk_SK) + Ales Kosir <ales.kosir@telemach.net> + - Slovenian (sl_SI) + Volodymyr M. Lisivka <lvm@mystery.lviv.net> + - Ukrainian (uk_UA) + Wang Tiejun <wtj@dept3.buaa.edu.cn> + - Chinese (zh_CN) + Moto Chen <han_yi_chen@yahoo.com.tw> + - Taiwan Chinese (zh_TW) + +Past Contributors: + Jeffrey Sean Connell <ankh@canuck.gen.nz> + - debugger class code (ommited from sources) + Frank Belew <frb@umr.edu> + - dgradient code + Scott Garner <mrfab@arn.net> + - suggestions, bug reports and beta testing (*the* beta moron) + David Doan <ddoan@usa.net> + - testing of 8bpp code + Mark Seward <illuzion@paradise.net.nz> + - beta testing, bug reports and 32bpp testing + Keith Bolland <prime@strip.net.nz> + - beta testing, bug reports and suggestions + James Spooner <spoons@xtra.co.nz> + - beta testing, bug reports + Fred Knieper <derf@tamu.edu> + - beta testing, bug reports + Steve Udell <hettar@teleport.com> + - beta testing, bug reports, questions (very good ones) + Gregory Barlow <barlowg@ncssm-server.ncssm.edu> + - bug reports and patches/suggestions (original middle click advocate) + Dyon Balding <dyon.balding@eng.monash.edu.au> + - patch for Smart(er)Placement window placement + Mike Cole <mike@mydot.com> + - co-author/hacker of Image.cc (local LUG buddy) + John Kennis <jkennis@chello.nl> + - author of bbtools/beta testing/bug reports + Wilbert Berendsen <wbsoft@xs4all.nl> + - author of blackbox/bsetroot manpages + +(Brad's original message): +I would also like to thank the creators of WindowMaker. Reading the existing +code has helped me immensely, and the BImage class follows the RImage data type +very closely (the 8bpp code and dithering code was based off of WindowMaker's +wrlib). @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) 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 +this service 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 make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. 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. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE 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. + + 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 +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision 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, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This 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 Library General +Public License instead of this License. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..2270a74 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,6 @@ +Changes from blackbox to hackedbox: + - added two configure options "--enable-bg-utils and --enable-bloat" + - Made all the neccesary hacks to make it "hackedbox" :-) +Changes from hackedbox to hackedbox for win: + - deleted window decoration and menu + - add Windows rootless window management extension diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..37c257a --- /dev/null +++ b/Makefile.am @@ -0,0 +1,14 @@ +# Makefile.am for Hackedbox +EXTRA_DIST = bootstrap nls doc + +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = doc nls src + +MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in + +uninstall-local: + -rmdir $(pkgdatadir) + +distclean-local: + rm -f *\~ gmon.out .\#* @@ -0,0 +1,78 @@ +-- README for XWinWM 0.8.x -- + +This is the README for XWinWM 0.8.x release. + +-- README for HackedBox 0.8.x -- + +This is the README for HackedBox 0.8.x release. + +The source tree for HackedBox is comprised of five subdirectories: + + data/ - this holds the default data files that HackedBox + requires for proper operation + + doc/ - this holds the documentation files that explain + the various aspects of HackedBox + + nls/ - this holds the message files used to generate + message catalogs for different languages + + src/ - this holds the actual C++ source code for the window + manager. + + util/ - this holds source code for small utility programs + that help HackedBox do what it does best. + + epist/ - contains the source code for epistrophy, a keygrabber + appliction. + + bbkeys/ - contains the source code for bbkeys, another + keygrabber appliction. +Quick Start: +------------ +The quickest and easiest way to get HackedBox up and running is to run the +following commands: + +# cd HackedBox-0.7.x +# ./configure +# make +# su -c 'make install' + +This will configure, compile and install HackedBox the quickest. For those +who like to spend the extra 15 seconds reading ./configure --help, some +compile time options can be turned on and off before the build. + +For general information on GNU's ./configure, see the file INSTALL. + + +Configuring HackedBox: +--------------------- +The next thing most users want to do after installing HackedBox is to configure +the colors, fonts, menus, etc. to their liking. This is covered by the files +data/README, data/README.menu and data/README.style. These files give +detailed information on how to customize your new window manager. + + +Included utilities: +------------------- +Currently, the only included utilities are a program named bsetroot and a +script called bsetbg. bsetroot is a replacement for xsetroot, minus a few +options. The difference between xsetroot and bsetroot is that bsetroot has +been coded for multiple screens (e.g. multi-headed displays), where as the +stock xsetroot is not. The bsetbg script acts as a wrapper for most of the +popular programs used to set background pixmaps, making it possible +for styles to provide a machine-independent rootCommand. + + +Third-party utilities: +---------------------- + +Supported Platforms: +-------------------- +Linux 2.4.x PPC (glibc2.1) +Linux i686 +WinNT (XFree cygwin) +FreeBSD 4.6-STABLE i686 + +Please email larry@scrudgeware.org for other success reports. + @@ -0,0 +1,80 @@ +-- TODO +* Write documents +* Delete unused code +* Implement minimize(iconify) +* Clean up nls + +-- TODO for Blackbox - an X11 Window manager + +Before 0.65.0 full release: +----------------------------- +* double check man pages + +CVS Bugs: +----------------------------- +* acroread transients <-- seems ok + +CVS warts: +----------------------------- +* vnc in full screen mode does not get focus + +Stuff TODO or On The Way(tm): +----------------------------- +CHANGE: deiconify() is overloaded, we need a "place window on Workspace N" and + "bring this window back from icon land" + +CHANGE: as a corrolary to the above, BlackboxWindow::mapRequest should actually + be called for map requests + +CHECK: getBlackboxHints() and restoreAttributes() do a lot of the same work + should look into whether it can be combined or not + +CHANGE: sticky windows are not handled well + +CHANGE: Send to menu should not list the current workspace + idea -- we could store the workspace number in the BasemenuItem + +CHANGE: look into centering the window when maximizing and the window can not + grow to fill the area + +CHANGE: BlackboxWindow::deiconify needs a new name, also look into show() + +ADD: add _BLACKBOX_STYLE and _BLACKBOX_MENU atoms so that bbtools, bbconf, + etc. can get the current path to the style in use and menu. + +ADD: subdirs in stylesmenu/dir will create a new submenu + +ADD: UTF8 support + +CHANGE: when workspace name is greater than the width of its text area the + toolbar gets very ugly + +CHANGE: rework the .blackboxrc resources so that they give a more + uniform behavior across screens. (Still not sure how I want + to do this, so it'll have to wait.) + +ADD: support for KDE and GNOME via the new WM Spec at + http://www.freedesktop.org/standards/wm-spec/ + +ADD: get volunteers to translate blackbox into other languages + +ADD: draw resize frames using the styles borderWidth... should be fairly + simple to do... + +ADD: always on top/bottom support + +ADD: way to empty a menu with one method call something like menu.erase() or + menu.removeAll() + +ADD: way to have items in menu and store data other than their index number. + The reason the Send To menu lists every workspace is because if it did + not blackbox would have no way to know that the one labelled + "Workspace 2" actually was workspace #2 and was referenced by + workspace[1]. Something like menu.insert(item, data). + +CHANGE: use a Workspace* instead of a number in BlackboxWindow + +ADD: a regression test suite + items to test: + *) toggle decor works + *) multihead diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..53fabf3 --- /dev/null +++ b/bootstrap @@ -0,0 +1,6 @@ +#! /bin/sh + +aclocal \ +&& automake -i --gnu --add-missing \ +&& autoconf \ + diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 0000000..ab8c2f9 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,17 @@ +# doc/Makefile.am for XWinWM + +CLEANFILES = xwinwm.1 +MAINTAINERCLEANFILES = Makefile.in +man_MANS = xwinwm.1 +SUBDIRS = ja_JP + +DEFAULT_MENU=$(pkgdatadir)/menu + +distclean-local: + rm -f *\~ .\#* + +xwinwm.1: xwinwm.1.in + @regex_cmd@ -e "s,@defaultmenu@,$(DEFAULT_MENU)," \ + -e "s,@pkgdatadir@,$(pkgdatadir)," \ + -e "s,@version@,$(VERSION)," \ + @srcdir@/xwinwm.1.in > xwinwm.1 diff --git a/doc/ja_JP/Makefile.am b/doc/ja_JP/Makefile.am new file mode 100644 index 0000000..fa02d53 --- /dev/null +++ b/doc/ja_JP/Makefile.am @@ -0,0 +1,42 @@ +# doc/<locale>/Makefile.am for XWinWM - an X11 Window manager + +# what locale is this +locale = ja_JP + +# where to install +locale_mandir = $(DESTDIR)$(mandir)/$(locale)/man1 + +# what to install +manfiles = xwinwm.1 + +# which files need processing during 'make' +all-local: xwinwm.1 + +CLEANFILES = xwinwm.1 +MAINTAINERCLEANFILES = Makefile.in + +NLSTEST = @NLS@ +DEFAULT_MENU=$(pkgdatadir)/menu + +distclean-local: + rm -f *\~ .\#* + +xwinwm.1: xwinwm.1.in + @regex_cmd@ -e "s,@defaultmenu@,$(DEFAULT_MENU)," \ + -e "s,@pkgdatadir@,$(pkgdatadir)," \ + -e "s,@version@,$(VERSION)," \ + @srcdir@/xwinwm.1.in > xwinwm.1 + +install-data-local: all-local + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing manual pages for $(locale)"; \ + $(mkinstalldirs) $(locale_mandir); \ + $(INSTALL_DATA) $(manfiles) $(locale_mandir); \ + fi + +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + for i in $(manfiles); do \ + rm -f $(locale_mandir)/`basename $$i`; \ + done; \ + fi diff --git a/doc/ja_JP/xwinwm.1.in b/doc/ja_JP/xwinwm.1.in new file mode 100644 index 0000000..444e739 --- /dev/null +++ b/doc/ja_JP/xwinwm.1.in @@ -0,0 +1,7 @@ +.TH "XWinWM" "1" "@VERSION@" "Kensuke Matsuzaki" "" +.SH ̾Á° +XWinWM \- Cygwin/X¥ë¡¼¥È¥ì¥¹¥â¡¼¥ÉÍѤΥ¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã +.SH ÀâÌÀ +XWinWM¤ÏCygwin/X¤Î¥ë¡¼¥È¥ì¥¹¥â¡¼¥É¤Î¤¿¤á¤Î¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤Ç¤¹¡£ +.PP +XWinWM¤ÏHackedbox¤ò¥Ù¡¼¥¹¤Ëºî¤é¤ì¤Æ¤¤¤Þ¤¹¡£ diff --git a/doc/xwinwm.1.in b/doc/xwinwm.1.in new file mode 100644 index 0000000..62d3d61 --- /dev/null +++ b/doc/xwinwm.1.in @@ -0,0 +1,7 @@ +.TH "XWinWM" "1" "@VERSION@" "Kensuke Matsuzaki" "" +.SH "NAME" +XWiWM +.SH DESCRIPTION +XWinWM is a window manager for Cygwin/X's rootless mode. +.PP +XWinWM is based on Hackedbox. diff --git a/nls/C/BaseDisplay.m b/nls/C/BaseDisplay.m new file mode 100644 index 0000000..f7f3d9b --- /dev/null +++ b/nls/C/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: signal %d caught\n +$ #ShuttingDown +# shutting down\n +$ #Aborting +# aborting... dumping core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: connection to X server failed.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): removing bad window from event queue\n diff --git a/nls/C/Basemenu.m b/nls/C/Basemenu.m new file mode 100644 index 0000000..6c4da30 --- /dev/null +++ b/nls/C/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Menu diff --git a/nls/C/Configmenu.m b/nls/C/Configmenu.m new file mode 100644 index 0000000..f9b0230 --- /dev/null +++ b/nls/C/Configmenu.m @@ -0,0 +1,44 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Config Options +$ #FocusModel +# Focus Model +$ #WindowPlacement +# Window Placement +$ #ImageDithering +# Image Dithering +$ #OpaqueMove +# Opaque Window Moving +$ #FullMax +# Full Maximization +$ #FocusNew +# Focus New Windows +$ #FocusLast +# Focus Window on Workspace Change +$ #DisableBindings +# Disable Bindings with Scroll Lock +$ #ClickToFocus +# Click to Focus +$ #SloppyFocus +# Sloppy Focus +$ #AutoRaise +# Auto Raise +$ #ClickRaise +# Click Raise +$ #SmartRows +# Smart Placement (Rows) +$ #SmartCols +# Smart Placement (Columns) +$ #Cascade +# Cascade Placement +$ #LeftRight +# Left to Right +$ #RightLeft +# Right to Left +$ #TopBottom +# Top to Bottom +$ #BottomTop +# Bottom to Top +$ #EnableKeybindings +# Enable Keybindings
\ No newline at end of file diff --git a/nls/C/Icon.m b/nls/C/Icon.m new file mode 100644 index 0000000..54b96a6 --- /dev/null +++ b/nls/C/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Icons diff --git a/nls/C/Image.m b/nls/C/Image.m new file mode 100644 index 0000000..5dd251a --- /dev/null +++ b/nls/C/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: error creating pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: error creating XImage\n +$ #UnsupVisual +# BImage::renderXImage: unsupported visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: error creating pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: invalid colormap size %d (%d/%d/%d) - reducing\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: error allocating colormap\n +$ #ColorAllocFail +# BImageControl::BImageControl: failed to alloc color %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - releasing %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache is large, forcing cleanout\n +$ #ColorParseError +# BImageControl::getColor: color parse error: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: color alloc error: '%s'\n diff --git a/nls/C/Makefile.am b/nls/C/Makefile.am new file mode 100644 index 0000000..ff07f3b --- /dev/null +++ b/nls/C/Makefile.am @@ -0,0 +1,52 @@ +# nls/C/Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: Translation.m blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/C"; \ + $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/C; \ + $(INSTALL_DATA) blackbox.cat $(DESTDIR)$(pkgdatadir)/nls/C; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \ + ln -f -ss C $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \ + ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/POSIX; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \ + ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_US; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \ + ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_GB; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \ + ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \ + fi + +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/C/blackbox.cat; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/en_GB; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \ + rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \ + fi + +# note... when adding new catalogs... you do not need the +# header=../blackbox-nls.hh which is passed to awk... we +# only need to generate it once. + +Translation.m: $(MFILES) + awk -f @srcdir@/../convert.awk header=../blackbox-nls.hh \ + output=Translation.m $(MFILES) + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/C/Screen.m b/nls/C/Screen.m new file mode 100644 index 0000000..128c06e --- /dev/null +++ b/nls/C/Screen.m @@ -0,0 +1,54 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: an error occured while querying the X server.\n \ +another window manager is already running on display %s.\n +$ #ManagingScreen +# BScreen::BScreen: managing screen %d using visual 0x%lx, depth %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): couldn't load font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): couldn't load default font.\n +$ #EmptyMenuFile +# %s: empty menu file\n +$ #xterm +# xterm +$ #Restart +# Restart +$ #Exit +# Exit +$ #EXECError +# BScreen::parseMenuFile: [exec] error, no menu label and/or command defined\n +$ #EXITError +# BScreen::parseMenuFile: [exit] error, no menu label defined\n +$ #STYLEError +# BScreen::parseMenuFile: [style] error, no menu label and/or filename \ +defined\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] error, no menu label defined\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] error, no filename defined\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] error, '%s' is not a regular file\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] error, no menu label defined\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] error, no menu label defined\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] error, no menu label defined\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, no directory defined\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' is not a \ +directory\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' does not exist\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] error, no menu label defined\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/C/Slit.m b/nls/C/Slit.m new file mode 100644 index 0000000..0e5e3a4 --- /dev/null +++ b/nls/C/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slit Direction +$ #SlitPlacement +# Slit Placement diff --git a/nls/C/Toolbar.m b/nls/C/Toolbar.m new file mode 100644 index 0000000..93e2645 --- /dev/null +++ b/nls/C/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Toolbar +$ #EditWkspcName +# Edit current workspace name +$ #ToolbarPlacement +# Toolbar Placement diff --git a/nls/C/Window.m b/nls/C/Window.m new file mode 100644 index 0000000..9987b47 --- /dev/null +++ b/nls/C/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creating 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres failed\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: cannot find screen for root window 0x%lx\n +$ #Unnamed +# Unnamed +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n diff --git a/nls/C/Windowmenu.m b/nls/C/Windowmenu.m new file mode 100644 index 0000000..4bf90cf --- /dev/null +++ b/nls/C/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Send To ... +$ #Shade +# Shade +$ #Iconify +# Iconify +$ #Maximize +# Maximize +$ #Raise +# Raise +$ #Lower +# Lower +$ #Stick +# Stick +$ #KillClient +# Kill Client +$ #Close +# Close diff --git a/nls/C/Workspace.m b/nls/C/Workspace.m new file mode 100644 index 0000000..315460a --- /dev/null +++ b/nls/C/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Workspace %d diff --git a/nls/C/Workspacemenu.m b/nls/C/Workspacemenu.m new file mode 100644 index 0000000..5423a19 --- /dev/null +++ b/nls/C/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Workspaces +$ #NewWorkspace +# New Workspace +$ #RemoveLast +# Remove Last diff --git a/nls/C/blackbox.m b/nls/C/blackbox.m new file mode 100644 index 0000000..74d09f6 --- /dev/null +++ b/nls/C/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: no managable screens found, aborting\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/C/bsetroot.m b/nls/C/bsetroot.m new file mode 100644 index 0000000..df320f1 --- /dev/null +++ b/nls/C/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: error: must specify one of: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> use display connection\n\ + -mod <x> <y> modula pattern\n\ + -foreground, -fg <color> modula foreground color\n\ + -background, -bg <color> modula background color\n\n\ + -gradient <texture> gradient texture\n\ + -from <color> gradient start color\n\ + -to <color> gradient end color\n\n\ + -solid <color> solid color\n\n\ + -help print this help text and exit\n + diff --git a/nls/C/common.m b/nls/C/common.m new file mode 100644 index 0000000..5321702 --- /dev/null +++ b/nls/C/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Yes +$ #No +# No + +$ #DirectionTitle +# Direction +$ #DirectionHoriz +# Horizontal +$ #DirectionVert +# Vertical + +$ #AlwaysOnTop +# Always on top + +$ #PlacementTitle +# Placement +$ #PlacementTopLeft +# Top Left +$ #PlacementCenterLeft +# Center Left +$ #PlacementBottomLeft +# Bottom Left +$ #PlacementTopCenter +# Top Center +$ #PlacementBottomCenter +# BottomCenter +$ #PlacementTopRight +# Top Right +$ #PlacementCenterRight +# Center Right +$ #PlacementBottomRight +# Bottom Right + +$ #AutoHide +# Auto hide diff --git a/nls/C/main.m b/nls/C/main.m new file mode 100644 index 0000000..b8d2baf --- /dev/null +++ b/nls/C/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# error: '-rc' requires an argument\n +$ #DISPLAYRequiresArg +# error: '-display' requires an argument\n +$ #WarnDisplaySet +# warning: could not set environment variable 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tuse display connection.\n\ + -rc <string>\t\t\tuse alternate resource file.\n\ + -version\t\t\tdisplay version and exit.\n\ + -help\t\t\t\tdisplay this help text and exit.\n\n +$ #CompileOptions +# Compile time options:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/Makefile.am b/nls/Makefile.am new file mode 100644 index 0000000..f6b56c6 --- /dev/null +++ b/nls/Makefile.am @@ -0,0 +1,15 @@ +# nls/Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +SUBDIRS = C da_DK de_DE es_AR es_ES et_EE fr_FR hu_HU it_IT ja_JP ko_KR nl_NL \ + no_NO pl_PL pt_BR ro_RO ru_RU sk_SK sl_SI sv_SE tr_TR uk_UA \ + zh_CN zh_TW +MAINTAINERCLEANFILES = Makefile.in blackbox-nls.hh +DISTCLEANFILES = blackbox-nls.hh + +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rmdir $(DESTDIR)$(pkgdatadir)/nls; \ + fi +distclean-local: + rm -f *\~ .\#* diff --git a/nls/blackbox-nls.hh b/nls/blackbox-nls.hh new file mode 100644 index 0000000..62b855b --- /dev/null +++ b/nls/blackbox-nls.hh @@ -0,0 +1,154 @@ +#define BaseDisplaySet 0x1 +#define BaseDisplayXError 0x1 +#define BaseDisplaySignalCaught 0x2 +#define BaseDisplayShuttingDown 0x3 +#define BaseDisplayAborting 0x4 +#define BaseDisplayXConnectFail 0x5 +#define BaseDisplayCloseOnExecFail 0x6 +#define BaseDisplayBadWindowRemove 0x7 + +#define BasemenuSet 0x2 +#define BasemenuBlackboxMenu 0x1 + +#define ConfigmenuSet 0x3 +#define ConfigmenuConfigOptions 0x1 +#define ConfigmenuFocusModel 0x2 +#define ConfigmenuWindowPlacement 0x3 +#define ConfigmenuImageDithering 0x4 +#define ConfigmenuOpaqueMove 0x5 +#define ConfigmenuFullMax 0x6 +#define ConfigmenuFocusNew 0x7 +#define ConfigmenuFocusLast 0x8 +#define ConfigmenuDisableBindings 0x9 +#define ConfigmenuClickToFocus 0xa +#define ConfigmenuSloppyFocus 0xb +#define ConfigmenuAutoRaise 0xc +#define ConfigmenuClickRaise 0xd +#define ConfigmenuSmartRows 0xe +#define ConfigmenuSmartCols 0xf +#define ConfigmenuCascade 0x10 +#define ConfigmenuLeftRight 0x11 +#define ConfigmenuRightLeft 0x12 +#define ConfigmenuTopBottom 0x13 +#define ConfigmenuBottomTop 0x14 +#define ConfigmenuEnableKeybindings 0x15 + +#define IconSet 0x4 +#define IconIcons 0x1 + +#define ImageSet 0x5 +#define ImageErrorCreatingSolidPixmap 0x1 +#define ImageErrorCreatingXImage 0x2 +#define ImageUnsupVisual 0x3 +#define ImageErrorCreatingPixmap 0x4 +#define ImageInvalidColormapSize 0x5 +#define ImageErrorAllocatingColormap 0x6 +#define ImageColorAllocFail 0x7 +#define ImagePixmapRelease 0x8 +#define ImagePixmapCacheLarge 0x9 +#define ImageColorParseError 0xa +#define ImageColorAllocError 0xb + +#define ScreenSet 0x6 +#define ScreenAnotherWMRunning 0x1 +#define ScreenManagingScreen 0x2 +#define ScreenFontLoadFail 0x3 +#define ScreenDefaultFontLoadFail 0x4 +#define ScreenEmptyMenuFile 0x5 +#define Screenxterm 0x6 +#define ScreenRestart 0x7 +#define ScreenExit 0x8 +#define ScreenEXECError 0x9 +#define ScreenEXITError 0xa +#define ScreenSTYLEError 0xb +#define ScreenCONFIGError 0xc +#define ScreenINCLUDEError 0xd +#define ScreenINCLUDEErrorReg 0xe +#define ScreenSUBMENUError 0xf +#define ScreenRESTARTError 0x10 +#define ScreenRECONFIGError 0x11 +#define ScreenSTYLESDIRError 0x12 +#define ScreenSTYLESDIRErrorNotDir 0x13 +#define ScreenSTYLESDIRErrorNoExist 0x14 +#define ScreenWORKSPACESError 0x15 +#define ScreenPositionLength 0x16 +#define ScreenPositionFormat 0x17 +#define ScreenGeometryFormat 0x18 + +#define SlitSet 0x7 +#define SlitSlitTitle 0x1 +#define SlitSlitDirection 0x2 +#define SlitSlitPlacement 0x3 + +#define ToolbarSet 0x8 +#define ToolbarNoStrftimeLength 0x1 +#define ToolbarNoStrftimeDateFormat 0x2 +#define ToolbarNoStrftimeDateFormatEu 0x3 +#define ToolbarNoStrftimeTimeFormat24 0x4 +#define ToolbarNoStrftimeTimeFormat12 0x5 +#define ToolbarNoStrftimeTimeFormatP 0x6 +#define ToolbarNoStrftimeTimeFormatA 0x7 +#define ToolbarToolbarTitle 0x8 +#define ToolbarEditWkspcName 0x9 +#define ToolbarToolbarPlacement 0xa + +#define WindowSet 0x9 +#define WindowCreating 0x1 +#define WindowXGetWindowAttributesFail 0x2 +#define WindowCannotFindScreen 0x3 +#define WindowUnnamed 0x4 +#define WindowMapRequest 0x5 +#define WindowUnmapNotify 0x6 +#define WindowReparentNotify 0x7 + +#define WindowmenuSet 0xa +#define WindowmenuSendTo 0x1 +#define WindowmenuShade 0x2 +#define WindowmenuIconify 0x3 +#define WindowmenuMaximize 0x4 +#define WindowmenuRaise 0x5 +#define WindowmenuLower 0x6 +#define WindowmenuStick 0x7 +#define WindowmenuKillClient 0x8 +#define WindowmenuClose 0x9 + +#define WorkspaceSet 0xb +#define WorkspaceDefaultNameFormat 0x1 + +#define WorkspacemenuSet 0xc +#define WorkspacemenuWorkspacesTitle 0x1 +#define WorkspacemenuNewWorkspace 0x2 +#define WorkspacemenuRemoveLast 0x3 + +#define blackboxSet 0xd +#define blackboxNoManagableScreens 0x1 +#define blackboxMapRequest 0x2 + +#define CommonSet 0xe +#define CommonYes 0x1 +#define CommonNo 0x2 +#define CommonDirectionTitle 0x3 +#define CommonDirectionHoriz 0x4 +#define CommonDirectionVert 0x5 +#define CommonAlwaysOnTop 0x6 +#define CommonPlacementTitle 0x7 +#define CommonPlacementTopLeft 0x8 +#define CommonPlacementCenterLeft 0x9 +#define CommonPlacementBottomLeft 0xa +#define CommonPlacementTopCenter 0xb +#define CommonPlacementBottomCenter 0xc +#define CommonPlacementTopRight 0xd +#define CommonPlacementCenterRight 0xe +#define CommonPlacementBottomRight 0xf +#define CommonAutoHide 0x10 + +#define mainSet 0xf +#define mainRCRequiresArg 0x1 +#define mainDISPLAYRequiresArg 0x2 +#define mainWarnDisplaySet 0x3 +#define mainUsage 0x4 +#define mainCompileOptions 0x5 + +#define bsetrootSet 0x10 +#define bsetrootMustSpecify 0x1 +#define bsetrootUsage 0x2 diff --git a/nls/convert.awk b/nls/convert.awk new file mode 100644 index 0000000..744179c --- /dev/null +++ b/nls/convert.awk @@ -0,0 +1,32 @@ +/^\$set/ { + major++ + minor = 0 + + if (major > 1) + printf "\n" > output + printf "$set %d %s\n", major, $3 > output + + if (header) { + majorName = substr($3, 2) + if (major > 1) + printf "\n" > header + printf "#define %sSet %#x\n", majorName, major > header + } +} + +/^\$ #/ { + minor++ + + if (header) { + minorName = substr($2, 2) + printf "#define %s%s %#x\n", majorName, minorName, minor > header + } +} + +/^#/ { + text = substr($0, 3) + printf "%d %s\n", minor, text > output +} + +! /^(\$|#)/ { print > output } + diff --git a/nls/da_DK/BaseDisplay.m b/nls/da_DK/BaseDisplay.m new file mode 100644 index 0000000..584e771 --- /dev/null +++ b/nls/da_DK/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X fejl: %s(%d) kode %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: signal %d fanget\n +$ #ShuttingDown +# lukker ned\n +$ #Aborting +# Avbryder... dumper kernen\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: tilslutning til X server mislykkedes.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: kunne ikke markere skærmtilslutning som luk-ved-afslut\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): fjerner dårligt vindue fra hændelseskøen\n diff --git a/nls/da_DK/Basemenu.m b/nls/da_DK/Basemenu.m new file mode 100644 index 0000000..5af69f8 --- /dev/null +++ b/nls/da_DK/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackboxmenu diff --git a/nls/da_DK/Configmenu.m b/nls/da_DK/Configmenu.m new file mode 100644 index 0000000..c9b2730 --- /dev/null +++ b/nls/da_DK/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Indstillinger +$ #FocusModel +# Fokus Model +$ #WindowPlacement +# Vindueplacering +$ #ImageDithering +# Billede Dithering +$ #OpaqueMove +# Uklar vinduesflytning +$ #FullMax +# Fuld maximering +$ #FocusNew +# Fokus nyt vindue +$ #FocusLast +# Fokus vindue ved skrivebords ændring +$ #DisableBindings +# Deaktiver tastebindinger med Scroll Lock +$ #ClickToFocus +# Klik for fokus +$ #SloppyFocus +# Dovent fokus +$ #AutoRaise +# Hæv automatisk +$ #ClickRaise +# Klik for at hæve +$ #SmartRows +# Intelligent placering (Rækker) +$ #SmartCols +# Intelligent placering (Søjler) +$ #Cascade +# Kaskade placering +$ #LeftRight +# Fra venstre mod højre +$ #RightLeft +# Fra højre mod venstre +$ #TopBottom +# Oppefra +$ #BottomTop +# Nedefra diff --git a/nls/da_DK/Icon.m b/nls/da_DK/Icon.m new file mode 100644 index 0000000..32b247e --- /dev/null +++ b/nls/da_DK/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikoner diff --git a/nls/da_DK/Image.m b/nls/da_DK/Image.m new file mode 100644 index 0000000..57562eb --- /dev/null +++ b/nls/da_DK/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: fejl ved skabelse af pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: fejl ved skabelse af XImage\n +$ #UnsupVisual +# BImage::renderXImage: ikke support for farvedybden\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: fejl ved skabelse af pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ugyldigt farvekort størrelse %d (%d/%d/%d) - reducing\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: fejl ved allokering af farvekort\n +$ #ColorAllocFail +# BImageControl::BImageControl: fejl ved allokering af farve %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - sletter %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache er for stor, gennemtvinger rensning\n +$ #ColorParseError +# BImageControl::getColor: farvefejl: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: farveallokeringsfejl: '%s'\n diff --git a/nls/da_DK/Makefile.am b/nls/da_DK/Makefile.am new file mode 100644 index 0000000..cd4a69f --- /dev/null +++ b/nls/da_DK/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = da_DK +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/da_DK/Screen.m b/nls/da_DK/Screen.m new file mode 100644 index 0000000..00adb00 --- /dev/null +++ b/nls/da_DK/Screen.m @@ -0,0 +1,53 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: fejl ved forespørgsel til X server.\n \ +en anden window manager er allerede kørende på display %s.\n +$ #ManagingScreen +# BScreen::BScreen: håndterer skærm %d med visuel 0x%lx, farvedybde %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): kunne ikke hente font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): kunne ikke hente standardfonten.\n +$ #EmptyMenuFile +# %s: tom menu fil\n +$ #xterm +# xterm +$ #Restart +# Genstart +$ #Exit +# Afslut +$ #EXECError +# BScreen::parseMenuFile: [exec] fejl, ingen menu etikette og/eller kommando defineret\n +$ #EXITError +# BScreen::parseMenuFile: [exit] fejl, ingen menu etikette defineret\n +$ #STYLEError +# BScreen::parseMenuFile: [style] fejl, ingen menu etikette og/eller filnavn \ +defineret\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] fejl, ingen menu etikette defineret\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] fejl, intet filnavn defineret\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] fejl, '%s' er ikke en normal fil\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] fejl, ingen menu etikette defineret\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] fejl, ingen menu etikette defineret\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] fejl, ingen menu etikette defineret\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fejl, intet katalog defineret\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fejl, '%s' er ikke et katalog\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fejl, '%s' eksisterer ikke\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] fejl, ingen menu etikette defineret\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/da_DK/Slit.m b/nls/da_DK/Slit.m new file mode 100644 index 0000000..e207e29 --- /dev/null +++ b/nls/da_DK/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slit retning +$ #SlitPlacement +# Slit placering diff --git a/nls/da_DK/Toolbar.m b/nls/da_DK/Toolbar.m new file mode 100644 index 0000000..c889c94 --- /dev/null +++ b/nls/da_DK/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Værktøjsbjælke +$ #EditWkspcName +# Andring af skrivebordets navn +$ #ToolbarPlacement +# Værktøjsbjælkens placering diff --git a/nls/da_DK/Window.m b/nls/da_DK/Window.m new file mode 100644 index 0000000..1e3b5b3 --- /dev/null +++ b/nls/da_DK/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: skaber 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres fejlede\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: kunne ikke finde skærm til hovedvinduet 0x%lx\n +$ #Unnamed +# Intet navn +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: sætter 0x%lx til 0x%lx\n diff --git a/nls/da_DK/Windowmenu.m b/nls/da_DK/Windowmenu.m new file mode 100644 index 0000000..ebbf0ad --- /dev/null +++ b/nls/da_DK/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Send til ... +$ #Shade +# Skygge +$ #Iconify +# Iconificeret +$ #Maximize +# Maksimer +$ #Raise +# Hæv +$ #Lower +# Sænk +$ #Stick +# Klæbrig +$ #KillClient +# Dræb klient +$ #Close +# Luk diff --git a/nls/da_DK/Workspace.m b/nls/da_DK/Workspace.m new file mode 100644 index 0000000..1093dda --- /dev/null +++ b/nls/da_DK/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Skrivebord %d diff --git a/nls/da_DK/Workspacemenu.m b/nls/da_DK/Workspacemenu.m new file mode 100644 index 0000000..94317b8 --- /dev/null +++ b/nls/da_DK/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Skriveborde +$ #NewWorkspace +# Nyt skrivebord +$ #RemoveLast +# Fjern sidste diff --git a/nls/da_DK/blackbox.m b/nls/da_DK/blackbox.m new file mode 100644 index 0000000..e4e8959 --- /dev/null +++ b/nls/da_DK/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ingen håndterbare skærme fundet, afslutter\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/da_DK/bsetroot.m b/nls/da_DK/bsetroot.m new file mode 100644 index 0000000..73b22cc --- /dev/null +++ b/nls/da_DK/bsetroot.m @@ -0,0 +1,16 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: fejl: specificér en af følgende: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> skærmtilslutning\n\ + -mod <x> <y> modula mønster\n\ + -foreground, -fg <color> modula foregrundsfarve\n\ + -background, -bg <color> modula baggrundsfarve\n\n\ + -gradient <texture> gradient tekstur\n\ + -from <color> gradient start farve\n\ + -to <color> gradient slut farve\n\n\ + -solid <color> fast farve\n\n\ + -help vis denne hjlp og afslut\n diff --git a/nls/da_DK/common.m b/nls/da_DK/common.m new file mode 100644 index 0000000..6b54555 --- /dev/null +++ b/nls/da_DK/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Ja +$ #No +# Nej + +$ #DirectionTitle +# Retning +$ #DirectionHoriz +# Horisontal +$ #DirectionVert +# Vertikal + +$ #AlwaysOnTop +# Altid øverst + +$ #PlacementTitle +# Placering +$ #PlacementTopLeft +# Øverste venstre hjørne +$ #PlacementCenterLeft +# Venstre i midten +$ #PlacementBottomLeft +# Bunden til venstre +$ #PlacementTopCenter +# Toppen i midten +$ #PlacementBottomCenter +# Bunden i midten +$ #PlacementTopRight +# Øverst til højre +$ #PlacementCenterRight +# Til højre i midten +$ #PlacementBottomRight +# Til højre i bunden + +$ #AutoHide +# Gem automatisk diff --git a/nls/da_DK/main.m b/nls/da_DK/main.m new file mode 100644 index 0000000..02be66e --- /dev/null +++ b/nls/da_DK/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# fejl: '-rc' kræver et argument\n +$ #DISPLAYRequiresArg +# fjel: '-display' kræver et argument\n +$ #WarnDisplaySet +# advarsel: kunne ikke sætte variablen 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tbrug skærm tilslutning.\n\ + -rc <string>\t\t\tbrug alternativ resource fil.\n\ + -version\t\t\tvis versionsnummer og afslut.\n\ + -help\t\t\t\tvis denne hjælp og afslut.\n\n +$ #CompileOptions +# Kompileret med:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/de_DE/BaseDisplay.m b/nls/de_DE/BaseDisplay.m new file mode 100644 index 0000000..45d6574 --- /dev/null +++ b/nls/de_DE/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X Fehler: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: Signal %d erhalten\n +$ #ShuttingDown +# Shutdown\n +$ #Aborting +# Abbruch... dumping core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: Verbindung mit X Server versagt.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: kann die Display Verbindung nicht als 'close-on-exec' markieren\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): Entfernung des inkorrekten Fensters aus der 'Event Queue'\n diff --git a/nls/de_DE/Basemenu.m b/nls/de_DE/Basemenu.m new file mode 100644 index 0000000..6c4da30 --- /dev/null +++ b/nls/de_DE/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Menu diff --git a/nls/de_DE/Configmenu.m b/nls/de_DE/Configmenu.m new file mode 100644 index 0000000..1dbacae --- /dev/null +++ b/nls/de_DE/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Einstellungen +$ #FocusModel +# Fokus Model +$ #WindowPlacement +# Fenster Plazierung +$ #ImageDithering +# Image Dithering +$ #OpaqueMove +# Fenster beim Verschieben durchsichtig +$ #FullMax +# Vollständige Vergrößerung +$ #FocusNew +# Fokus auf Neue Fenster +$ #FocusLast +# Fokus auf letztes Fenster bei Arbeitsplatz Wechsel +$ #DisableBindings +# Scroll Lock verhindert Bindings +$ #ClickToFocus +# Fokus durch Mausklick +$ #SloppyFocus +# Fokus folgt Maus +$ #AutoRaise +# Automatische Erhebung +$ #ClickRaise +# Klick Erhebung +$ #SmartRows +# Optimale Plazierung (Reihen) +$ #SmartCols +# Optimale Plazierung (Spalten) +$ #Cascade +# Verschobene Plazierung +$ #LeftRight +# Von links nach rechts +$ #RightLeft +# Von rechts nach links +$ #TopBottom +# Von oben nach unten +$ #BottomTop +# Von unten nach oben diff --git a/nls/de_DE/Icon.m b/nls/de_DE/Icon.m new file mode 100644 index 0000000..54b96a6 --- /dev/null +++ b/nls/de_DE/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Icons diff --git a/nls/de_DE/Image.m b/nls/de_DE/Image.m new file mode 100644 index 0000000..7eacff1 --- /dev/null +++ b/nls/de_DE/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: Fehler bei der Erstellung der Pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: Fehler bei der Erstellung des XImage\n +$ #UnsupVisual +# BImage::renderXImage: nicht unterstütztes Visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: Fehler bei der Erstellung der Pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: Ungültige Colormap Größe %d (%d/%d/%d) - verkleinere\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: Fehler bei der Anlegung der Colormap\n +$ #ColorAllocFail +# BImageControl::BImageControl: Fehler bei der Auswertung der Farbe %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: Pixmap Cache - Freigabe von %d Pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: Cache zu groß, Ausleerung erfordert\n +$ #ColorParseError +# BImageControl::getColor: Color Parse Fehler: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: Color Alloc Fehler: '%s'\n diff --git a/nls/de_DE/Makefile.am b/nls/de_DE/Makefile.am new file mode 100644 index 0000000..98a9612 --- /dev/null +++ b/nls/de_DE/Makefile.am @@ -0,0 +1,38 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = de_DE +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \ + ln -f -s de_DE $(DESTDIR)$(pkgdatadir)/nls/de; \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/de_DE/Screen.m b/nls/de_DE/Screen.m new file mode 100644 index 0000000..6c45115 --- /dev/null +++ b/nls/de_DE/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: Fehler bei der Abfrage des X Servers.\n \ +ein anderer Windowmanager benutzt Display %s bereits.\n +$ #ManagingScreen +# BScreen::BScreen: Verwaltung von Bildschirm %d mit Visual 0x%lx, Tiefe %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): Kann Font '%s' nicht finden\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): Kann Standard Font nicht finden.\n +$ #EmptyMenuFile +# %s: leere Menu Datei\n +$ #xterm +# xterm +$ #Restart +# Neustart +$ #Exit +# Beenden +$ #EXECError +# BScreen::parseMenuFile: [exec] Fehler, kein Menu Eintrag und/oder Befehl definiert.\n +$ #EXITError +# BScreen::parseMenuFile: [exit] Fehler, kein Menu Eintrag definiert\n +$ #STYLEError +# BScreen::parseMenuFile: [style] Fehler, kein Menu Eintrag und/oder Datei definiert\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] Fehler, kein Menu Eintrag definiert\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] Fehler, kein Dateiname definiert\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] Fehler, '%s' ist keine normale Datei\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] Fehler, kein Menu Eintrag definiert\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] Fehler, kein Menu Eintrag definiert\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] Fehler, kein Menu Eintrag definiert\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Fehler, kein Verzeichnis definiert\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Fehler, '%s' ist kein Verzeichnis\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Fehler, '%s' existiert nicht\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] Fehler, kein Menu Eintrag definiert\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/de_DE/Slit.m b/nls/de_DE/Slit.m new file mode 100644 index 0000000..469d5a5 --- /dev/null +++ b/nls/de_DE/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slit Ausrichtung +$ #SlitPlacement +# Slit Platzierung diff --git a/nls/de_DE/Toolbar.m b/nls/de_DE/Toolbar.m new file mode 100644 index 0000000..e553724 --- /dev/null +++ b/nls/de_DE/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Toolbar +$ #EditWkspcName +# Arbeitsplatzname ändern +$ #ToolbarPlacement +# Toolbar Platzierung diff --git a/nls/de_DE/Window.m b/nls/de_DE/Window.m new file mode 100644 index 0000000..4ce8d1f --- /dev/null +++ b/nls/de_DE/Window.m @@ -0,0 +1,15 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: Erstelle 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres versagt\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: kann keinen Bildschirm für root window 0x%lx finden\n +$ #Unnamed +# Ohne Titel +$ #MapRequest +# BlackboxWindow::mapRequestEvent() von 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: 0x%lx nun Child des 0x%lx\n diff --git a/nls/de_DE/Windowmenu.m b/nls/de_DE/Windowmenu.m new file mode 100644 index 0000000..0166d45 --- /dev/null +++ b/nls/de_DE/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Senden an... +$ #Shade +# Aufrollen +$ #Iconify +# Verkleinern +$ #Maximize +# Vergrößern +$ #Raise +# In den Vordergrund +$ #Lower +# In den Hintergrund +$ #Stick +# Immer sichtbar +$ #KillClient +# Abbrechen +$ #Close +# Schliessen diff --git a/nls/de_DE/Workspace.m b/nls/de_DE/Workspace.m new file mode 100644 index 0000000..00b6ff9 --- /dev/null +++ b/nls/de_DE/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Arbeitsplatz %d diff --git a/nls/de_DE/Workspacemenu.m b/nls/de_DE/Workspacemenu.m new file mode 100644 index 0000000..941d90e --- /dev/null +++ b/nls/de_DE/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Arbeitsplätze +$ #NewWorkspace +# Neuer Arbeitsplatz +$ #RemoveLast +# Letzten Arbeitsplatz löschen diff --git a/nls/de_DE/blackbox.m b/nls/de_DE/blackbox.m new file mode 100644 index 0000000..500b376 --- /dev/null +++ b/nls/de_DE/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: keine verwaltbaren Bildschirme gefunden, Abbruch\n +$ #MapRequest +# Blackbox::process_event: MapRequest von 0x%lx\n diff --git a/nls/de_DE/bsetroot.m b/nls/de_DE/bsetroot.m new file mode 100644 index 0000000..5cccbb4 --- /dev/null +++ b/nls/de_DE/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: error: must specify one of: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> Display Verbindung\n\ + -mod <x> <y> Modula Muster\n\ + -foreground, -fg <color> Modula Vordergrund Farbe\n\ + -background, -bg <color> Modula Hintergrund Farbe\n\n\ + -gradient <texture> steigernde Beschaffenheit\n\ + -from <color> Anfangsfarbe\n\ + -to <color> Endfarbe\n\n\ + -solid <color> volle Farbe\n\n\ + -help Anzeige dieser Hilfe und Beendung\n + diff --git a/nls/de_DE/common.m b/nls/de_DE/common.m new file mode 100644 index 0000000..6eba278 --- /dev/null +++ b/nls/de_DE/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Ja +$ #No +# Nein + +$ #DirectionTitle +# Ausrichtung +$ #DirectionHoriz +# Horizontal +$ #DirectionVert +# Vertikal + +$ #AlwaysOnTop +# Immer im Vorgrund + +$ #PlacementTitle +# Platzierung +$ #PlacementTopLeft +# Oben Links +$ #PlacementCenterLeft +# Mitte Links +$ #PlacementBottomLeft +# Unten Links +$ #PlacementTopCenter +# Oben Mitte +$ #PlacementBottomCenter +# Unten Mitte +$ #PlacementTopRight +# Oben Rechts +$ #PlacementCenterRight +# Mitte Rechts +$ #PlacementBottomRight +# Unten Rechts + +$ #AutoHide +# Automatisch Verbergen diff --git a/nls/de_DE/main.m b/nls/de_DE/main.m new file mode 100644 index 0000000..ac5a6ca --- /dev/null +++ b/nls/de_DE/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# Fehler: '-rc' benötigt einen Parameter\n +$ #DISPLAYRequiresArg +# Fehler: '-display' benötigt einen Parameter\n +$ #WarnDisplaySet +# Achtung: konnte die Umgebungsvariable 'DISPLAY' nicht setzen\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tDisplay Verbindung.\n\ + -rc <string>\t\t\talternative Konfigurationsdatei.\n\ + -version\t\t\tzeige Versionsnummer und Beendung.\n\ + -help\t\t\t\tzeige diesen Hilfstext und Beendung.\n\n +$ #CompileOptions +# Optionen zum Kompilationszeitpunkt:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/es_AR/BaseDisplay.m b/nls/es_AR/BaseDisplay.m new file mode 100644 index 0000000..8979580 --- /dev/null +++ b/nls/es_AR/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X error: %s(%d) código de operación %d/%d\n recurso 0x%lx\n +$ #SignalCaught +# %s: señal %d atrapada\n +$ #ShuttingDown +# apagando\n +$ #Aborting +# abortando... grabando 'core'\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: falló la conexión al servidor de X.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: no pude marcar la conexión al display como close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): quitando ventana errónea de la lista de eventos\n diff --git a/nls/es_AR/Basemenu.m b/nls/es_AR/Basemenu.m new file mode 100644 index 0000000..4369988 --- /dev/null +++ b/nls/es_AR/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Menú Blackbox diff --git a/nls/es_AR/Configmenu.m b/nls/es_AR/Configmenu.m new file mode 100644 index 0000000..5c17f3d --- /dev/null +++ b/nls/es_AR/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Opciones de Configuración +$ #FocusModel +# Modelo del Foco +$ #WindowPlacement +# Ubicación de las Ventanas +$ #ImageDithering +# Simulación Ordenada de Colores en Imágenes +$ #OpaqueMove +# Movimiento Opaco de Ventanas +$ #FullMax +# Maximización Total +$ #FocusNew +# Enfocar Nuevas Ventanas +$ #FocusLast +# Enfocar la Ultima Ventana en el Escritorio +$ #DisableBindings +# Deshabilitar Enlaces con Bloq Despl +$ #ClickToFocus +# Click Para Enfocar +$ #SloppyFocus +# Foco Sigue Al Mouse +$ #AutoRaise +# Elevar Automáticamente +$ #ClickRaise +# Click Para Elevar +$ #SmartRows +# Ubicación Inteligente (Filas) +$ #SmartCols +# Ubicación Inteligente (Columnas) +$ #Cascade +# Ubicación en Cascada +$ #LeftRight +# Izquierda A Derecha +$ #RightLeft +# Derecha A Izquierda +$ #TopBottom +# De Arriba Abajo +$ #BottomTop +# De Abajo Arriba diff --git a/nls/es_AR/Icon.m b/nls/es_AR/Icon.m new file mode 100644 index 0000000..4d576de --- /dev/null +++ b/nls/es_AR/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Iconos diff --git a/nls/es_AR/Image.m b/nls/es_AR/Image.m new file mode 100644 index 0000000..875b7b7 --- /dev/null +++ b/nls/es_AR/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: error creando pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: error creando XImage\n +$ #UnsupVisual +# BImage::renderXImage: visual no soportada\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: error creando pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: tamaño del mapa de colores inválido %d (%d/%d/%d) - reduciendo\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: error asignando el mapa de colores\n +$ #ColorAllocFail +# BImageControl::BImageControl: error al asignar el mapa de colores %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: reserva de pixmaps - liberando %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: reserva de pixmaps demasiado grande, forzando limpieza\n +$ #ColorParseError +# BImageControl::getColor: error evaluando el color: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: error asignando el color: '%s'\n diff --git a/nls/es_AR/Makefile.am b/nls/es_AR/Makefile.am new file mode 100644 index 0000000..7725a17 --- /dev/null +++ b/nls/es_AR/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = es_AR +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/es_AR/Screen.m b/nls/es_AR/Screen.m new file mode 100644 index 0000000..be638e9 --- /dev/null +++ b/nls/es_AR/Screen.m @@ -0,0 +1,50 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: ocurrió un error al cuestionar al servidor de X.\n Ya hay otro gestor de ventanas ejecutándose en la conexión al display %s.\n +$ #ManagingScreen +# BScreen::BScreen: administrando la pantalla %d usando visual 0x%lx, profundidad %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): no pude cargar la fuente '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): no pude cargar la fuente predeterminada.\n +$ #EmptyMenuFile +# %s: archivo de menú vacío\n +$ #xterm +# xterm +$ #Restart +# Reiniciar +$ #Exit +# Salir +$ #EXECError +# BScreen::parseMenuFile: error en [exec], no se definió una etiqueta ni/o un comando para el menú\n +$ #EXITError +# BScreen::parseMenuFile: error en [exit], no se definió una etiqueta para el menú\n +$ #STYLEError +# BScreen::parseMenuFile: error en [style], no se definió una etiqueta ni/o un nombre de archivo para el menú\n +$ #CONFIGError +# BScreen::parseMenuFile: error en [config], no se definió una etiqueta para el menú\n +$ #INCLUDEError +# BScreen::parseMenuFile: error en [include], no se definió un nombre de archivo\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: error en [include], '%s' no es un archivo regular\n +$ #SUBMENUError +# BScreen::parseMenuFile: error en [submenu], no se definió una etiqueta para el menú\n +$ #RESTARTError +# BScreen::parseMenuFile: error en [restart], no se definió una etiqueta para el menú\n +$ #RECONFIGError +# BScreen::parseMenuFile: error en [reconfig], no se definió una etiqueta para el menú\n +$ #STYLESDIRError +# BScreen::parseMenuFile: error en [stylesdir/stylesmenu], no se definió un directorio\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: error en [stylesdir/stylesmenu], '%s' no es un directorio\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: error en [stylesdir/stylesmenu], '%s' no existe\n +$ #WORKSPACESError +# BScreen::parseMenuFile: error en [workspaces], no se definió una etiqueta para el menú\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d diff --git a/nls/es_AR/Slit.m b/nls/es_AR/Slit.m new file mode 100644 index 0000000..e19889d --- /dev/null +++ b/nls/es_AR/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Dirección de la Slit +$ #SlitPlacement +# Ubicación de la Slit diff --git a/nls/es_AR/Toolbar.m b/nls/es_AR/Toolbar.m new file mode 100644 index 0000000..1a5ed70 --- /dev/null +++ b/nls/es_AR/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Barra de Herramientas +$ #EditWkspcName +# Renombrar el Escritorio Actual +$ #ToolbarPlacement +# Ubicación de la Barra de Tareas diff --git a/nls/es_AR/Window.m b/nls/es_AR/Window.m new file mode 100644 index 0000000..ae19baa --- /dev/null +++ b/nls/es_AR/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creando 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres falló\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: no se puede encontrar una pantalla para la ventana raíz 0x%lx\n +$ #Unnamed +# Sin Nombre +$ #MapRequest +# BlackboxWindow::mapRequestEvent() para 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() para 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: cambiar padre de 0x%lx a 0x%lx\n diff --git a/nls/es_AR/Windowmenu.m b/nls/es_AR/Windowmenu.m new file mode 100644 index 0000000..9153857 --- /dev/null +++ b/nls/es_AR/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Enviar A ... +$ #Shade +# Enrollar +$ #Iconify +# Iconizar +$ #Maximize +# Maximizar +$ #Raise +# Elevar +$ #Lower +# Bajar +$ #Stick +# Fijar +$ #KillClient +# Matar Cliente +$ #Close +# Cerrar diff --git a/nls/es_AR/Workspace.m b/nls/es_AR/Workspace.m new file mode 100644 index 0000000..234e310 --- /dev/null +++ b/nls/es_AR/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Escritorio %d diff --git a/nls/es_AR/Workspacemenu.m b/nls/es_AR/Workspacemenu.m new file mode 100644 index 0000000..2faede4 --- /dev/null +++ b/nls/es_AR/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Escritorios +$ #NewWorkspace +# Nuevo Escritorio +$ #RemoveLast +# Quitar Ultimo diff --git a/nls/es_AR/blackbox.m b/nls/es_AR/blackbox.m new file mode 100644 index 0000000..7a8f521 --- /dev/null +++ b/nls/es_AR/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: no se encontraron pantallas manejables, abortando\n +$ #MapRequest +# Blackbox::process_event: MapRequest para 0x%lx\n diff --git a/nls/es_AR/bsetroot.m b/nls/es_AR/bsetroot.m new file mode 100644 index 0000000..38e9cf4 --- /dev/null +++ b/nls/es_AR/bsetroot.m @@ -0,0 +1,16 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: error: debe especificarse uno entre: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> conexión al display\n\ + -mod <x> <y> diseño de modula\n\ + -foreground, -fg <color> color de primer plano de modula\n\ + -background, -bg <color> color de fondo de modula\n\n\ + -gradient <texture> textura del gradiente\n\ + -from <color> color inicial del gradiente\n\ + -to <color> color final del gradiente\n\n\ + -solid <color> color sólido\n\n\ + -help Imprimir este texto de ayuda y salir\n diff --git a/nls/es_AR/common.m b/nls/es_AR/common.m new file mode 100644 index 0000000..74fd964 --- /dev/null +++ b/nls/es_AR/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Sí +$ #No +# No + +$ #DirectionTitle +# Dirección +$ #DirectionHoriz +# Horizontal +$ #DirectionVert +# Vertical + +$ #AlwaysOnTop +# Siempre Encima + +$ #PlacementTitle +# Ubicación +$ #PlacementTopLeft +# Arriba, Izquierda +$ #PlacementCenterLeft +# Centro, Izquierda +$ #PlacementBottomLeft +# Abajo, Izquierda +$ #PlacementTopCenter +# Arriba, Centro +$ #PlacementBottomCenter +# Abajo, Centro +$ #PlacementTopRight +# Arriba, Derecha +$ #PlacementCenterRight +# Centro, Derecha +$ #PlacementBottomRight +# Abajo, Derecha + +$ #AutoHide +# Ocultar Automáticamente diff --git a/nls/es_AR/main.m b/nls/es_AR/main.m new file mode 100644 index 0000000..0ac9edb --- /dev/null +++ b/nls/es_AR/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# error: '-rc' requiere un argumento\n +$ #DISPLAYRequiresArg +# error: '-display' requiere un argumento\n +$ #WarnDisplaySet +# Aviso: no pude establecer la variable de entorno 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <cadena>\t\tusar la conexión al display.\n\ + -rc <cadena>\t\t\tusar otro archivo de recursos.\n\ + -version\t\t\tmostrar versión y salir.\n\ + -help\t\t\t\tmostrar este texto de ayuda y salir.\n\n +$ #CompileOptions +# Opciones de Tiempo de Compilación:\n\ + Depuración:\t\t\t%s\n\ + Forma:\t\t\t%s\n\ + Simulación ordenada de colores de 8bpp:\t%s\n\n diff --git a/nls/es_ES/BaseDisplay.m b/nls/es_ES/BaseDisplay.m new file mode 100644 index 0000000..233beb7 --- /dev/null +++ b/nls/es_ES/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X error: %s(%d) código de operación %d/%d\n recurso 0x%lx\n +$ #SignalCaught +# %s: señal %d atrapada\n +$ #ShuttingDown +# apagando\n +$ #Aborting +# abortando... grabando 'core'\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: falló la conexión al servidor de X.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: no pude marcar la conexión de despliegue como close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): quitando ventana errónea de la lista de eventos\n diff --git a/nls/es_ES/Basemenu.m b/nls/es_ES/Basemenu.m new file mode 100644 index 0000000..4369988 --- /dev/null +++ b/nls/es_ES/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Menú Blackbox diff --git a/nls/es_ES/Configmenu.m b/nls/es_ES/Configmenu.m new file mode 100644 index 0000000..4e42145 --- /dev/null +++ b/nls/es_ES/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Opciones de Configuración +$ #FocusModel +# Modelo del Foco +$ #WindowPlacement +# Ubicación de las Ventanas +$ #ImageDithering +# Simulación Ordenada de Colores en Imágenes +$ #OpaqueMove +# Movimiento Opaco de Ventanas +$ #FullMax +# Maximización Total +$ #FocusNew +# Enfocar Nuevas Ventanas +$ #FocusLast +# Enfocar la Ultima Ventana en el Escritorio +$ #DisableBindings +# Deshabilitar Enlaces con Bloq Despl +$ #ClickToFocus +# Click Para Enfocar +$ #SloppyFocus +# Foco Sigue Al Ratón +$ #AutoRaise +# Elevar Automáticamente +$ #ClickRaise +# Click Para Elevar +$ #SmartRows +# Ubicación Inteligente (Filas) +$ #SmartCols +# Ubicación Inteligente (Columnas) +$ #Cascade +# Ubicación en Cascada +$ #LeftRight +# Izquierda A Derecha +$ #RightLeft +# Derecha A Izquierda +$ #TopBottom +# De Arriba Abajo +$ #BottomTop +# De Abajo Arriba diff --git a/nls/es_ES/Icon.m b/nls/es_ES/Icon.m new file mode 100644 index 0000000..4d576de --- /dev/null +++ b/nls/es_ES/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Iconos diff --git a/nls/es_ES/Image.m b/nls/es_ES/Image.m new file mode 100644 index 0000000..875b7b7 --- /dev/null +++ b/nls/es_ES/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: error creando pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: error creando XImage\n +$ #UnsupVisual +# BImage::renderXImage: visual no soportada\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: error creando pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: tamaño del mapa de colores inválido %d (%d/%d/%d) - reduciendo\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: error asignando el mapa de colores\n +$ #ColorAllocFail +# BImageControl::BImageControl: error al asignar el mapa de colores %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: reserva de pixmaps - liberando %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: reserva de pixmaps demasiado grande, forzando limpieza\n +$ #ColorParseError +# BImageControl::getColor: error evaluando el color: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: error asignando el color: '%s'\n diff --git a/nls/es_ES/Makefile.am b/nls/es_ES/Makefile.am new file mode 100644 index 0000000..9ffa418 --- /dev/null +++ b/nls/es_ES/Makefile.am @@ -0,0 +1,40 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = es_ES +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \ + ln -f -s es_ES $(DESTDIR)$(pkgdatadir)/nls/es; \ + ln -f -s es_ES $(DESTDIR)$(pkgdatadir)/nls/es_MX; \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/es_MX; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/es_ES/Screen.m b/nls/es_ES/Screen.m new file mode 100644 index 0000000..3dfb3ed --- /dev/null +++ b/nls/es_ES/Screen.m @@ -0,0 +1,50 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: ocurrió un error al cuestionar al servidor de X.\n Ya hay otro gestor de ventanas ejecutándose en la conexión de despliegue %s.\n +$ #ManagingScreen +# BScreen::BScreen: administrando la pantalla %d usando visual 0x%lx, profundidad %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): no pude cargar la fuente '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): no pude cargar la fuente predeterminada.\n +$ #EmptyMenuFile +# %s: archivo de menú vacío\n +$ #xterm +# xterm +$ #Restart +# Reiniciar +$ #Exit +# Salir +$ #EXECError +# BScreen::parseMenuFile: error en [exec], no se definió una etiqueta ni/o un comando para el menú\n +$ #EXITError +# BScreen::parseMenuFile: error en [exit], no se definió una etiqueta para el menú\n +$ #STYLEError +# BScreen::parseMenuFile: error en [style], no se definió una etiqueta ni/o un nombre de archivo para el menú\n +$ #CONFIGError +# BScreen::parseMenuFile: error en [config], no se definió una etiqueta para el menú\n +$ #INCLUDEError +# BScreen::parseMenuFile: error en [include], no se definió un nombre de archivo\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: error en [include], '%s' no es un archivo regular\n +$ #SUBMENUError +# BScreen::parseMenuFile: error en [submenu], no se definió una etiqueta para el menú\n +$ #RESTARTError +# BScreen::parseMenuFile: error en [restart], no se definió una etiqueta para el menú\n +$ #RECONFIGError +# BScreen::parseMenuFile: error en [reconfig], no se definió una etiqueta para el menú\n +$ #STYLESDIRError +# BScreen::parseMenuFile: error en [stylesdir/stylesmenu], no se definió un directorio\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: error en [stylesdir/stylesmenu], '%s' no es un directorio\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: error en [stylesdir/stylesmenu], '%s' no existe\n +$ #WORKSPACESError +# BScreen::parseMenuFile: error en [workspaces], no se definió una etiqueta para el menú\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d diff --git a/nls/es_ES/Slit.m b/nls/es_ES/Slit.m new file mode 100644 index 0000000..e19889d --- /dev/null +++ b/nls/es_ES/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Dirección de la Slit +$ #SlitPlacement +# Ubicación de la Slit diff --git a/nls/es_ES/Toolbar.m b/nls/es_ES/Toolbar.m new file mode 100644 index 0000000..1a5ed70 --- /dev/null +++ b/nls/es_ES/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Barra de Herramientas +$ #EditWkspcName +# Renombrar el Escritorio Actual +$ #ToolbarPlacement +# Ubicación de la Barra de Tareas diff --git a/nls/es_ES/Window.m b/nls/es_ES/Window.m new file mode 100644 index 0000000..ae19baa --- /dev/null +++ b/nls/es_ES/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creando 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres falló\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: no se puede encontrar una pantalla para la ventana raíz 0x%lx\n +$ #Unnamed +# Sin Nombre +$ #MapRequest +# BlackboxWindow::mapRequestEvent() para 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() para 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: cambiar padre de 0x%lx a 0x%lx\n diff --git a/nls/es_ES/Windowmenu.m b/nls/es_ES/Windowmenu.m new file mode 100644 index 0000000..9153857 --- /dev/null +++ b/nls/es_ES/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Enviar A ... +$ #Shade +# Enrollar +$ #Iconify +# Iconizar +$ #Maximize +# Maximizar +$ #Raise +# Elevar +$ #Lower +# Bajar +$ #Stick +# Fijar +$ #KillClient +# Matar Cliente +$ #Close +# Cerrar diff --git a/nls/es_ES/Workspace.m b/nls/es_ES/Workspace.m new file mode 100644 index 0000000..234e310 --- /dev/null +++ b/nls/es_ES/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Escritorio %d diff --git a/nls/es_ES/Workspacemenu.m b/nls/es_ES/Workspacemenu.m new file mode 100644 index 0000000..2faede4 --- /dev/null +++ b/nls/es_ES/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Escritorios +$ #NewWorkspace +# Nuevo Escritorio +$ #RemoveLast +# Quitar Ultimo diff --git a/nls/es_ES/blackbox.m b/nls/es_ES/blackbox.m new file mode 100644 index 0000000..7a8f521 --- /dev/null +++ b/nls/es_ES/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: no se encontraron pantallas manejables, abortando\n +$ #MapRequest +# Blackbox::process_event: MapRequest para 0x%lx\n diff --git a/nls/es_ES/bsetroot.m b/nls/es_ES/bsetroot.m new file mode 100644 index 0000000..67a3f2e --- /dev/null +++ b/nls/es_ES/bsetroot.m @@ -0,0 +1,16 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: error: debe especificarse uno entre: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> conexión de despliegue\n\ + -mod <x> <y> diseño de modula\n\ + -foreground, -fg <color> color de primer plano de modula\n\ + -background, -bg <color> color de fondo de modula\n\n\ + -gradient <texture> textura del gradiente\n\ + -from <color> color inicial del gradiente\n\ + -to <color> color final del gradiente\n\n\ + -solid <color> color sólido\n\n\ + -help Imprimir este texto de ayuda y salir\n diff --git a/nls/es_ES/common.m b/nls/es_ES/common.m new file mode 100644 index 0000000..74fd964 --- /dev/null +++ b/nls/es_ES/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Sí +$ #No +# No + +$ #DirectionTitle +# Dirección +$ #DirectionHoriz +# Horizontal +$ #DirectionVert +# Vertical + +$ #AlwaysOnTop +# Siempre Encima + +$ #PlacementTitle +# Ubicación +$ #PlacementTopLeft +# Arriba, Izquierda +$ #PlacementCenterLeft +# Centro, Izquierda +$ #PlacementBottomLeft +# Abajo, Izquierda +$ #PlacementTopCenter +# Arriba, Centro +$ #PlacementBottomCenter +# Abajo, Centro +$ #PlacementTopRight +# Arriba, Derecha +$ #PlacementCenterRight +# Centro, Derecha +$ #PlacementBottomRight +# Abajo, Derecha + +$ #AutoHide +# Ocultar Automáticamente diff --git a/nls/es_ES/main.m b/nls/es_ES/main.m new file mode 100644 index 0000000..3ef433f --- /dev/null +++ b/nls/es_ES/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# error: '-rc' requiere un argumento\n +$ #DISPLAYRequiresArg +# error: '-display' requiere un argumento\n +$ #WarnDisplaySet +# Advertencia: no pude establecer la variable de entorno 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <cadena>\t\tusar la conexión de despliegue.\n\ + -rc <cadena>\t\t\tusar otro archivo de recursos.\n\ + -version\t\t\tmostrar versión y salir.\n\ + -help\t\t\t\tmostrar este texto de ayuda y salir.\n\n +$ #CompileOptions +# Opciones de Tiempo de Compilación:\n\ + Depuración:\t\t\t%s\n\ + Forma:\t\t\t%s\n\ + Simulación ordenada de colores de 8bpp:\t%s\n\n diff --git a/nls/et_EE/BaseDisplay.m b/nls/et_EE/BaseDisplay.m new file mode 100644 index 0000000..b27c26b --- /dev/null +++ b/nls/et_EE/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X'i viga: %s(%d) opkood %d/%d\n resurss 0x%lx\n +$ #SignalCaught +# %s: signaal %d püütud\n +$ #ShuttingDown +# lõpetame\n +$ #Aborting +# katkestame... mälupilt tehtud\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: ühenduse saamine X serveriga ebaõnnestus.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: ühenduse märgistamine 'close-on-exec' ebaõnnestus\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): eemaldame vigase akna tominigute reast\n diff --git a/nls/et_EE/Basemenu.m b/nls/et_EE/Basemenu.m new file mode 100644 index 0000000..3ecf900 --- /dev/null +++ b/nls/et_EE/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox'i Menüü diff --git a/nls/et_EE/Configmenu.m b/nls/et_EE/Configmenu.m new file mode 100644 index 0000000..758d364 --- /dev/null +++ b/nls/et_EE/Configmenu.m @@ -0,0 +1,38 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Konfiguratsioon +$ #FocusModel +# Fookusmood +$ #WindowPlacement +# Akende paigutamine +$ #ImageDithering +# Piltide teravustamine +$ #OpaqueMove +# Nähtav akende liigutamine +$ #FullMax +# Üle-ekraani suurendus +$ #FocusNew +# Fookus uutele akendele +$ #FocusLast +# Fokusseeri viimane aken +$ #ClickToFocus +# Klikka fookuse saamiseks +$ #SloppyFocus +# Kaasaskäiv fookus +$ #AutoRaise +# Akende esiletoomine +$ #SmartRows +# Arukas paigutus (read) +$ #SmartCols +# Arukas paigutus (tulbad) +$ #Cascade +# Kaskaadis +$ #LeftRight +# Vasakult paremale +$ #RightLeft +# Paremalt vasakule +$ #TopBottom +# Ülevalt alla +$ #BottomTop +# Alt ülesse diff --git a/nls/et_EE/Icon.m b/nls/et_EE/Icon.m new file mode 100644 index 0000000..5f42f62 --- /dev/null +++ b/nls/et_EE/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikoonid diff --git a/nls/et_EE/Image.m b/nls/et_EE/Image.m new file mode 100644 index 0000000..8700c4d --- /dev/null +++ b/nls/et_EE/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: viga pixmapi loomisel\n +$ #ErrorCreatingXImage +# BImage::renderXImage: viga XImage loomisel\n +$ #UnsupVisual +# BImage::renderXImage: toeta visuaal\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: viga pixmapi loomisel\n +$ #InvalidColormapSize +# BImageControl::BImageControl: vale värvipaletti suurus %d (%d/%d/%d) - vähendame\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: viga värvipaletti määramisel \n +$ #ColorAllocFail +# BImageControl::BImageControl: ei õnnestunud värvi määrata %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - vabastame %d pixmappi\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache on liiga suur, sundpuhastus\n +$ #ColorParseError +# BImageControl::getColor: viga värvi analüüsimisel: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: viga värvi määramisel: '%s'\n diff --git a/nls/et_EE/Makefile.am b/nls/et_EE/Makefile.am new file mode 100644 index 0000000..3279d3f --- /dev/null +++ b/nls/et_EE/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = et_ET +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/et_EE/Screen.m b/nls/et_EE/Screen.m new file mode 100644 index 0000000..f8a15c8 --- /dev/null +++ b/nls/et_EE/Screen.m @@ -0,0 +1,53 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: viga X serveri küsitlemisel.\n \ +teine akahaldur juba töötab displeil %s.\n +$ #ManagingScreen +# BScreen::BScreen: haldame displeid %d reolutsioonis 0x%lx, vörvisügavusel %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): ei saanud laadida fonti '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): ei saanud laadida vaikimisi määratud fonti.\n +$ #EmptyMenuFile +# %s: tühi menüüfail\n +$ #xterm +# xterm +$ #Restart +# Restart +$ #Exit +# Välju +$ #EXECError +# BScreen::parseMenuFile: [exec] viga, menüü pealkirja ja/või käsku pole määratud\n +$ #EXITError +# BScreen::parseMenuFile: [exit] viga, menüü pealkirja pole määratud\n +$ #STYLEError +# BScreen::parseMenuFile: [style] viga, menüü pealkirja ja/või failinime \ +pole määratud\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] viga, menüü pealkirja pole määratud\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] viga, failinime pole määratud\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] viga, '%s' ei ole tavaline fail\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] viga, menüü pealkirja pole määratud\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] viga, menüü pealkirja pole määratud\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] viga, menüü pealkirja pole määratud\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] viga, kataloogi pole määratud\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] viga, '%s' pole kataloog\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] viga, '%s' pole olemas\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] viga, menüü pealkirja pole määratud\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/et_EE/Slit.m b/nls/et_EE/Slit.m new file mode 100644 index 0000000..798b449 --- /dev/null +++ b/nls/et_EE/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Pragu +$ #SlitDirection +# Prao suund +$ #SlitPlacement +# Prao asukoht diff --git a/nls/et_EE/Toolbar.m b/nls/et_EE/Toolbar.m new file mode 100644 index 0000000..e1879f9 --- /dev/null +++ b/nls/et_EE/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Tegumiriba +$ #EditWkspcName +# Muuda töölaua nime +$ #ToolbarPlacement +# Tegumiriba asukoht diff --git a/nls/et_EE/Window.m b/nls/et_EE/Window.m new file mode 100644 index 0000000..c79c44e --- /dev/null +++ b/nls/et_EE/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: loome 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres ebaõnnestus\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: ei leidnud displeid juuraknale 0x%lx\n +$ #Unnamed +# Nimeta +$ #MapRequest +# BlackboxWindow::mapRequestEvent() 0x%lx'le\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() 0x%lx'le\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: 0x%lx juurele 0x%lx\n diff --git a/nls/et_EE/Windowmenu.m b/nls/et_EE/Windowmenu.m new file mode 100644 index 0000000..863a945 --- /dev/null +++ b/nls/et_EE/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Saada... +$ #Shade +# Varjuta +$ #Iconify +# Ikoniseeri +$ #Maximize +# Suurenda +$ #Raise +# Esiplaanile +$ #Lower +# Tahaplaanile +$ #Stick +# Kleebi +$ #KillClient +# Killi klient +$ #Close +# Sulge diff --git a/nls/et_EE/Workspace.m b/nls/et_EE/Workspace.m new file mode 100644 index 0000000..c12bfb2 --- /dev/null +++ b/nls/et_EE/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Töölaud %d diff --git a/nls/et_EE/Workspacemenu.m b/nls/et_EE/Workspacemenu.m new file mode 100644 index 0000000..6274719 --- /dev/null +++ b/nls/et_EE/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Töölauad +$ #NewWorkspace +# Uus töölaud +$ #RemoveLast +# Eemalda viimane diff --git a/nls/et_EE/blackbox.m b/nls/et_EE/blackbox.m new file mode 100644 index 0000000..3fbf74c --- /dev/null +++ b/nls/et_EE/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ei leidnud hallatavaid displeisid, katkestame\n +$ #MapRequest +# Blackbox::process_event: MapRequest 0x%lx'le\n diff --git a/nls/et_EE/bsetroot.m b/nls/et_EE/bsetroot.m new file mode 100644 index 0000000..d3ac296 --- /dev/null +++ b/nls/et_EE/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: viga: pead määratlema ühe järgnevaist: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> displei ühendus\n\ + -mod <x> <y> moodula tapeet\n\ + -foreground, -fg <color> esiplaani värvi moodula\n\ + -background, -bg <color> tausta värvi moodula\n\n\ + -gradient <texture> gradientne tekstuur\n\ + -from <color> gradiendi algusvärv\n\ + -to <color> gradiendi lõpuvärv\n\n\ + -solid <color> ühtne värv\n\n\ + -help näida seda abiteksti ja välju\n + diff --git a/nls/et_EE/common.m b/nls/et_EE/common.m new file mode 100644 index 0000000..05202db --- /dev/null +++ b/nls/et_EE/common.m @@ -0,0 +1,35 @@ +$set 15 #Common + +$ #Yes +# Jah +$ #No +# Ei + +$ #DirectionTitle +# Suund +$ #DirectionHoriz +# Horisontaalne +$ #DirectionVert +# Vertikaalne + +$ #AlwaysOnTop +# Alati esiplaanil + +$ #PlacementTitle +# Asetus +$ #PlacementTopLeft +# Üleval vasakul +$ #PlacementCenterLeft +# Keskel vasakul +$ #PlacementBottomLeft +# All vasakul +$ #PlacementTopCenter +# Üleval keskel +$ #PlacementBottomCenter +# All keskel +$ #PlacementTopRight +# Üleval paremal +$ #PlacementCenterRight +# Keskel paremal +$ #PlacementBottomRight +# All paremal diff --git a/nls/et_EE/main.m b/nls/et_EE/main.m new file mode 100644 index 0000000..d1c0280 --- /dev/null +++ b/nls/et_EE/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# viga: '-rc' vajab argumenti\n +$ #DISPLAYRequiresArg +# viga: '-display' vajab argumenti\n +$ #WarnDisplaySet +# hoiatus: ei saanud määrata keskonna muutujat 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tkasuta displei ühendust.\n\ + -rc <string>\t\t\tkasuta alternatiivseid resursse.\n\ + -version\t\t\tnäita versiooninumber ja välju.\n\ + -help\t\t\t\tnäita seda abiteksti ja välju.\n\n +$ #CompileOptions +# Kompileerimisoptsioonid:\n\ + Debuggimine\t\t\t%s\n\ + Kuju:\t\t\t%s\n\ + 8bpp määratud teravustamine:\t%s\n\n diff --git a/nls/fr_FR/BaseDisplay.m b/nls/fr_FR/BaseDisplay.m new file mode 100644 index 0000000..b48f0c5 --- /dev/null +++ b/nls/fr_FR/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: Erreur de X %s(%d) opcodes %d/%d\n ressource 0x%lx\n +$ #SignalCaught +# %s: signal %d capturé\n +$ #ShuttingDown +# arrêt du programme\n +$ #Aborting +# annulation... génération du fichier core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: échec de la connexion au serveur X\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: impossible d'attribuer close-on-exec à l'affichage\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): suppression d'une mauvaise fenêtre de la queue des événements\n diff --git a/nls/fr_FR/Basemenu.m b/nls/fr_FR/Basemenu.m new file mode 100644 index 0000000..16bc86a --- /dev/null +++ b/nls/fr_FR/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Menu de Blackbox diff --git a/nls/fr_FR/Configmenu.m b/nls/fr_FR/Configmenu.m new file mode 100644 index 0000000..67f4b1d --- /dev/null +++ b/nls/fr_FR/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Options de configuration +$ #FocusModel +# Mode d'attribution du clavier +$ #WindowPlacement +# Disposition des fenêtres +$ #ImageDithering +# Lissage des images +$ #OpaqueMove +# Déplacement opaque des fenêtres +$ #FullMax +# Maximisation complète +$ #FocusNew +# Attribuer le clavier à la nouvelle fenêtre +$ #FocusLast +# Attribuer le clavier en changeant d'espace de travail +$ #DisableBindings +# Désactiver les modificateurs avec Vérouillage Défilement +$ #ClickToFocus +# Cliquer pour obtenir le clavier +$ #SloppyFocus +# Attribution du clavier souple +$ #AutoRaise +# Premier plan automatique +$ #ClickRaise +# Cliquer pour mettre au premier plan +$ #SmartRows +# Disposition futée (Lignes) +$ #SmartCols +# Disposition futée (Colonnes) +$ #Cascade +# Disposition en cascade +$ #LeftRight +# De gauche à droite +$ #RightLeft +# De droite à gauche +$ #TopBottom +# De haut en bas +$ #BottomTop +# De bas en haut diff --git a/nls/fr_FR/Icon.m b/nls/fr_FR/Icon.m new file mode 100644 index 0000000..2e35097 --- /dev/null +++ b/nls/fr_FR/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Icones diff --git a/nls/fr_FR/Image.m b/nls/fr_FR/Image.m new file mode 100644 index 0000000..a50d1ca --- /dev/null +++ b/nls/fr_FR/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: Erreur de création de pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: Erreur de création de XImage\n +$ #UnsupVisual +# BImage::renderXImage: Mode visuel non supporté\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: Erreur de création de pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: Taille de la palette de couleurs invalide%d (%d/%d/%d) - coupe\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: Erreur d'allocation de la palette de couleurs\n +$ #ColorAllocFail +# BImageControl::BImageControl: Echec d'allocation de couleur %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: Cache pixmap - abandon %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: Occupation du cache importante, nettoyage forcé\n +$ #ColorParseError +# BImageControl::getColor: Erreur de lecture de couleur: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: Erreur d'allocation,couleur: '%s'\n diff --git a/nls/fr_FR/Makefile.am b/nls/fr_FR/Makefile.am new file mode 100644 index 0000000..29b8019 --- /dev/null +++ b/nls/fr_FR/Makefile.am @@ -0,0 +1,38 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = fr_FR +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \ + ln -f -s fr_FR $(DESTDIR)$(pkgdatadir)/nls/fr; \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/fr_FR/Screen.m b/nls/fr_FR/Screen.m new file mode 100644 index 0000000..9a1d243 --- /dev/null +++ b/nls/fr_FR/Screen.m @@ -0,0 +1,54 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: Erreur survenue pendant une requête adressée au serveur X.\n \ +Un autre gestionnaire de fenêtres est déjà lancé %s.\n +$ #ManagingScreen +# BScreen::BScreen: Gestion de l'écran %d avec le mode visuel 0x%lx, profondeur %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): Impossible de charger la police de caractères '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): Impossible de charger la police de caractères initiale.\n +$ #EmptyMenuFile +# %s: Fichier de menu vide\n +$ #xterm +# xterm +$ #Restart +# Redémarrer +$ #Exit +# Sortie +$ #EXECError +# BScreen::parseMenuFile: [exec] Erreur, pas de libellé de menu et/ou de commande definie\n +$ #EXITError +# BScreen::parseMenuFile: [exit] Erreur, aucun libellé de menu défini\n +$ #STYLEError +# BScreen::parseMenuFile: [style] Erreur, pas libellé de menu et/ou de nom de fichier\ +defini\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] Erreur, aucun libellé de menu défini\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] Erreur, aucun nom de fichier défini\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] Erreur, '%s' est un fichier invalide\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] Erreur, aucun libellé de menu défini\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] Erreur, aucun libellé de menu défini\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] Erreur, aucun libellé de menu défini\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Erreur, aucun répertoire défini\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Erreur, '%s' est un répertoire \ +invalide\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Erreur, '%s' est inexistant\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] Erreur, aucun libellé de menu défini\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# L: %4d x H: %4d + diff --git a/nls/fr_FR/Slit.m b/nls/fr_FR/Slit.m new file mode 100644 index 0000000..cd1e96b --- /dev/null +++ b/nls/fr_FR/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Fente +$ #SlitDirection +# Orientation de la Fente +$ #SlitPlacement +# Disposition de la Fente diff --git a/nls/fr_FR/Toolbar.m b/nls/fr_FR/Toolbar.m new file mode 100644 index 0000000..6fc29f4 --- /dev/null +++ b/nls/fr_FR/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Barre d'outils +$ #EditWkspcName +# Edition du nom de l'espace courant +$ #ToolbarPlacement +# Disposition de la barre d'outils diff --git a/nls/fr_FR/Window.m b/nls/fr_FR/Window.m new file mode 100644 index 0000000..3567f22 --- /dev/null +++ b/nls/fr_FR/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: Génération 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: Echec de XGetWindowAttributres\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: Impossible de trouver l'écran de la fenêtre racine 0x%lx\n +$ #Unnamed +# Inconnu +$ #MapRequest +# BlackboxWindow::mapRequestEvent() pour 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() pour 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: réattribue 0x%lx à la 0x%lx\n diff --git a/nls/fr_FR/Windowmenu.m b/nls/fr_FR/Windowmenu.m new file mode 100644 index 0000000..46d3d0d --- /dev/null +++ b/nls/fr_FR/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Envoie vers ... +$ #Shade +# Fantôme +$ #Iconify +# Iconifie +$ #Maximize +# Maximise +$ #Raise +# Élève +$ #Lower +# Abaisse +$ #Stick +# Épingle +$ #KillClient +# Massacre +$ #Close +# Ferme diff --git a/nls/fr_FR/Workspace.m b/nls/fr_FR/Workspace.m new file mode 100644 index 0000000..8999ce0 --- /dev/null +++ b/nls/fr_FR/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Espace de travail %d diff --git a/nls/fr_FR/Workspacemenu.m b/nls/fr_FR/Workspacemenu.m new file mode 100644 index 0000000..5120f36 --- /dev/null +++ b/nls/fr_FR/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Espaces de travail +$ #NewWorkspace +# Nouvel espace de travail +$ #RemoveLast +# Supprimer le dernier diff --git a/nls/fr_FR/blackbox.m b/nls/fr_FR/blackbox.m new file mode 100644 index 0000000..4da9e7a --- /dev/null +++ b/nls/fr_FR/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: Aucun écran exploitable n'a été trouvé, annulation\n +$ #MapRequest +# Blackbox::process_event: MapRequest pour 0x%lx\n diff --git a/nls/fr_FR/bsetroot.m b/nls/fr_FR/bsetroot.m new file mode 100644 index 0000000..8296478 --- /dev/null +++ b/nls/fr_FR/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: Erreur: il faut préciser : -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <chaîne> connexion à l'affichage\n\ + -mod <x> <y> motif\n\ + -foreground, -fg <couleur> couleur d'avant plan\n\ + -background, -bg <couleur> couleur d'arrière plan\n\n\ + -gradient <texture> texture du dégradé\n\ + -from <couleur> couleur de départ du dégradé\n\ + -to <couleur> couleur d'arrivée du dégradé\n\n\ + -solid <couleur> couleur uniforme\n\n\ + -help affiche ce texte d'aide et quitte\n + diff --git a/nls/fr_FR/common.m b/nls/fr_FR/common.m new file mode 100644 index 0000000..f1aea4e --- /dev/null +++ b/nls/fr_FR/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Oui +$ #No +# Non + +$ #DirectionTitle +# Orientation +$ #DirectionHoriz +# Horizontal +$ #DirectionVert +# Vertical + +$ #AlwaysOnTop +# Toujours au dessus + +$ #PlacementTitle +# Disposition +$ #PlacementTopLeft +# En haut à gauche +$ #PlacementCenterLeft +# Au centre à gauche +$ #PlacementBottomLeft +# En bas à gauche +$ #PlacementTopCenter +# En haut au centre +$ #PlacementBottomCenter +# En bas au centre +$ #PlacementTopRight +# En haut à droite +$ #PlacementCenterRight +# Au centre à droite +$ #PlacementBottomRight +# En bas à droite + +$ #AutoHide +# Auto disparaît diff --git a/nls/fr_FR/main.m b/nls/fr_FR/main.m new file mode 100644 index 0000000..cafc1cb --- /dev/null +++ b/nls/fr_FR/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# Erreur: '-rc' nécessite un argument\n +$ #DISPLAYRequiresArg +# Erreur: '-display' nécessite un argument\n +$ #WarnDisplaySet +# Attention: impossible d'attribuer la variable d'environnement 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <chaîne>\t\tutilise la connexion à l'affichage.\n\ + -rc <chaîne>\t\t\tutilise un autre fichier de configuration.\n\ + -version\t\t\taffiche la version et quitte.\n\ + -help\t\t\t\taffiche ce texte d'aide et quitte.\n\n +$ #CompileOptions +# Options de compilation:\n\ + Debugage\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Lissage ordonné:\t%s\n\n diff --git a/nls/hu_HU/BaseDisplay.m b/nls/hu_HU/BaseDisplay.m new file mode 100644 index 0000000..410eea5 --- /dev/null +++ b/nls/hu_HU/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X hiba: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: %d szignált kapott\n +$ #ShuttingDown +# Leállás\n +$ #Aborting +# Programhiba... dumping core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: nem sikerült kapcsolódni az X szerverhez.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: az összeköttetés a képernyõvel nem 'close-on-exit'\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): helytelen ablak kivétele a 'Event Queue'-ból\n diff --git a/nls/hu_HU/Basemenu.m b/nls/hu_HU/Basemenu.m new file mode 100644 index 0000000..a82c805 --- /dev/null +++ b/nls/hu_HU/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Menü diff --git a/nls/hu_HU/Configmenu.m b/nls/hu_HU/Configmenu.m new file mode 100644 index 0000000..f15fd6c --- /dev/null +++ b/nls/hu_HU/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Beállítások +$ #FocusModel +# Fókusz modell +$ #WindowPlacement +# Ablakok elhelyezése +$ #ImageDithering +# Image dithering +$ #OpaqueMove +# Átlátszó ablakok mozgatás közben +$ #FullMax +# Teljesképernyõs maximalizálás +$ #FocusNew +# Új ablak kapja a fókuszt +$ #FocusLast +# Munkaasztal váltása után fókusz az utolsó ablakon +$ #DisableBindings +# Scroll Lock-nál nem figyeli a billentyûzetet +$ #ClickToFocus +# Kattintás fókuszhoz +$ #SloppyFocus +# A fókusz követi az egeret +$ #AutoRaise +# Autómatikus elõreugró ablakok +$ #ClickRaise +# Kattintással az elõtérbe +$ #SmartRows +# Optimális ablakrendezés (sorok) +$ #SmartCols +# Optimális ablakrendezés (oszlopok) +$ #Cascade +# Egymásracsúsztatott elrendezés +$ #LeftRight +# Jobbról balra +$ #RightLeft +# Balról jobbra +$ #TopBottom +# Fentrõl lefele +$ #BottomTop +# Lentrõl felfele diff --git a/nls/hu_HU/Icon.m b/nls/hu_HU/Icon.m new file mode 100644 index 0000000..f2d0503 --- /dev/null +++ b/nls/hu_HU/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikonok diff --git a/nls/hu_HU/Image.m b/nls/hu_HU/Image.m new file mode 100644 index 0000000..a59b901 --- /dev/null +++ b/nls/hu_HU/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: hiba a kép készítésekor\n +$ #ErrorCreatingXImage +# BImage::renderXImage: hiba az XImage készítésekor\n +$ #UnsupVisual +# BImage::renderXImage: nem támogatott visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: hiba a pixmap készítésekor\n +$ #InvalidColormapSize +# BImageControl::BImageControl: helytelen colormap méret %d (%d/%d/%d) - csökkentés\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: hiba a colormap lefoglalásánál\n +$ #ColorAllocFail +# BImageControl::BImageControl: hiba a %d/%d/%d szín lefoglalásánál\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - %d pixmaps felszabadítása\n +$ #PixmapCacheLarge +# BImageControl::renderImage: a cache túl nagy, ürítés\n +$ #ColorParseError +# BImageControl::getColor: hiba a szín elemzésénél: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: hiba a szín lefoglalásánál: '%s'\n diff --git a/nls/hu_HU/Makefile.am b/nls/hu_HU/Makefile.am new file mode 100644 index 0000000..46fc438 --- /dev/null +++ b/nls/hu_HU/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = hu_HU +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/hu_HU/Screen.m b/nls/hu_HU/Screen.m new file mode 100644 index 0000000..71ea01b --- /dev/null +++ b/nls/hu_HU/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: hiba az X szerver kérdezésénél.\n \ +Egy másik ablakkezelõ már használja a %s képernyõt.\n +$ #ManagingScreen +# BScreen::BScreen: átvette az irányítást a %d képernyõn. visual: 0x%lx, színmélység: %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): nem lehet a '%s' betûtípust betölteni\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): az alapértelmezett betûtípus betöltése nem lehetséges.\n +$ #EmptyMenuFile +# %s: üres menü file\n +$ #xterm +# terminál +$ #Restart +# Újraindítás +$ #Exit +# Kilépés +$ #EXECError +# BScreen::parseMenuFile: [exec] Hiba, nincs menü címke és/vagy parancs meghatározva\n +$ #EXITError +# BScreen::parseMenuFile: [exit] Hiba, nincs menü címke meghatározva\n +$ #STYLEError +# BScreen::parseMenuFile: [style] Hiba, nincs menü címke és/vagy file-név meghatározva\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] Hiba, nincs menü címke meghatározva\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] Hiba, nincs file-név meghatározva\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] Hiba, '%s' nem egy szabályos file\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] Hiba, nincs menü címke meghatározva\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] Hiba, nincs menü címke meghatározva\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] Hiba, nincs menü címke meghatározva\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Hiba, nincs meghatározva könyvtár\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Hiba, '%s' nem könyvtár\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] Hiba, '%s' nem létezik\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] Hiba, nincs menü címke meghatározva\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/hu_HU/Slit.m b/nls/hu_HU/Slit.m new file mode 100644 index 0000000..d6406b9 --- /dev/null +++ b/nls/hu_HU/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slit irány +$ #SlitPlacement +# Slit elhelyezés diff --git a/nls/hu_HU/Toolbar.m b/nls/hu_HU/Toolbar.m new file mode 100644 index 0000000..05e5a42 --- /dev/null +++ b/nls/hu_HU/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Toolbar +$ #EditWkspcName +# Munkaasztal nevének változtatása +$ #ToolbarPlacement +# Toolbar elhelyezés diff --git a/nls/hu_HU/Window.m b/nls/hu_HU/Window.m new file mode 100644 index 0000000..b490b0f --- /dev/null +++ b/nls/hu_HU/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: 0x%lx létrehozása\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: sikertelen XGetWindowAttributres\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: nem található képernyõ root window 0x%lx-nak\n +$ #Unnamed +# Névtelen +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n diff --git a/nls/hu_HU/Windowmenu.m b/nls/hu_HU/Windowmenu.m new file mode 100644 index 0000000..ec70dd8 --- /dev/null +++ b/nls/hu_HU/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Küldés.. +$ #Shade +# Shade +$ #Iconify +# Ikonizál +$ #Maximize +# Felnagyít +$ #Raise +# Elõtérbe +$ #Lower +# Háttérbe +$ #Stick +# Mindenhol látható +$ #KillClient +# Kill +$ #Close +# Bezárás diff --git a/nls/hu_HU/Workspace.m b/nls/hu_HU/Workspace.m new file mode 100644 index 0000000..d5ec823 --- /dev/null +++ b/nls/hu_HU/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# %d munkaasztal diff --git a/nls/hu_HU/Workspacemenu.m b/nls/hu_HU/Workspacemenu.m new file mode 100644 index 0000000..523504f --- /dev/null +++ b/nls/hu_HU/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Munkaasztalok +$ #NewWorkspace +# Új munkaasztal +$ #RemoveLast +# Utolsó munkaasztal törlése diff --git a/nls/hu_HU/blackbox.m b/nls/hu_HU/blackbox.m new file mode 100644 index 0000000..ae7e594 --- /dev/null +++ b/nls/hu_HU/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: nem található kezelhetõ képernyõ, befejezés\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/hu_HU/bsetroot.m b/nls/hu_HU/bsetroot.m new file mode 100644 index 0000000..fc17391 --- /dev/null +++ b/nls/hu_HU/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: hiba: kötelezõ megadni egy kapcsolót: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> használandó kijelzõ\n\ + -mod <x> <y> modula minta\n\ + -foreground, -fg <color> modula elõtér színe\n\ + -background, -bg <color> modula háttér színe\n\n\ + -gradient <texture> gradiens textúrája\n\ + -from <color> kezdõszín\n\ + -to <color> befejezõszín\n\n\ + -solid <color> egyszerû háttér\n\n\ + -help súgóképernyõ mutatása és kilépés\n + diff --git a/nls/hu_HU/common.m b/nls/hu_HU/common.m new file mode 100644 index 0000000..19bd91e --- /dev/null +++ b/nls/hu_HU/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Igen +$ #No +# Nem + +$ #DirectionTitle +# Irány +$ #DirectionHoriz +# Vízszintes +$ #DirectionVert +# Függõleges + +$ #AlwaysOnTop +# Mindig az elõtérben + +$ #PlacementTitle +# Elhelyezés +$ #PlacementTopLeft +# Bal felül +$ #PlacementCenterLeft +# Bal középen +$ #PlacementBottomLeft +# Bal lent +$ #PlacementTopCenter +# Középen felül +$ #PlacementBottomCenter +# Középen lent +$ #PlacementTopRight +# Jobb fent +$ #PlacementCenterRight +# Jobb középen +$ #PlacementBottomRight +# Jobb lent + +$ #AutoHide +# Autómatikus elrejtés diff --git a/nls/hu_HU/main.m b/nls/hu_HU/main.m new file mode 100644 index 0000000..99fe106 --- /dev/null +++ b/nls/hu_HU/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# Hiba: '-rc' kapcsoló paramétere hiányzik\n +$ #DISPLAYRequiresArg +# Hiba: '-display' kapcsoló paramétere hiányzik\n +$ #WarnDisplaySet +# Figyelem: nem lehet a 'DISPLAY' környezeti változót beállítani\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\thasználandó kijelzõ\n\ + -rc <string>\t\t\tválasztható konfigurációs file.\n\ + -version\t\t\tverziószám kijelzése és kilépés.\n\ + -help\t\t\t\tsúgóképernyõ mutatása és kilépés.\n\n +$ #CompileOptions +# Fordításnál állítható lehetõségek:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/it_IT/BaseDisplay.m b/nls/it_IT/BaseDisplay.m new file mode 100644 index 0000000..11cd0de --- /dev/null +++ b/nls/it_IT/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: errore di X: %s(%d) opcodes %d/%d\n risorsa 0x%lx\n +$ #SignalCaught +# %s: segnale %d intercettato\n +$ #ShuttingDown +# arresto del programma\n +$ #Aborting +# Annullamento...generazione file core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: connessione al server X fallita.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: non e' possibile contrassegnare la connessione al display come close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): rimozione finestra difettosa dalla coda degli eventi\n diff --git a/nls/it_IT/Basemenu.m b/nls/it_IT/Basemenu.m new file mode 100644 index 0000000..6c4da30 --- /dev/null +++ b/nls/it_IT/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Menu diff --git a/nls/it_IT/Configmenu.m b/nls/it_IT/Configmenu.m new file mode 100644 index 0000000..a8a9389 --- /dev/null +++ b/nls/it_IT/Configmenu.m @@ -0,0 +1,38 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Opzioni di Configurazione +$ #FocusModel +# Modalita' Focus +$ #WindowPlacement +# Posizionamento Finestra +$ #ImageDithering +# Dithering dell'immagine +$ #OpaqueMove +# Movimento Opaco della finestra +$ #FullMax +# Massimo Ingrandimento +$ #FocusNew +# Attiva Focus alle nuove Finestre +$ #FocusLast +# Attiva Focus al cambio dell'Area di Lavoro +$ #ClickToFocus +# Clicca per il Focus +$ #SloppyFocus +# Focus Intelligente (Sloppy) +$ #AutoRaise +# Sollevamento Finestra Automatico +$ #SmartRows +# Posizionamento Intelligente (Righe) +$ #SmartCols +# Posizionamento Intelligente (Colonne) +$ #Cascade +# Posizionamento a Cascata +$ #LeftRight +# da Sinistra a Destra +$ #RightLeft +# da Destra a Sinistra +$ #TopBottom +# dall'Alto in Basso +$ #BottomTop +# dal Basso in Alto diff --git a/nls/it_IT/Icon.m b/nls/it_IT/Icon.m new file mode 100644 index 0000000..b5af81c --- /dev/null +++ b/nls/it_IT/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Icone diff --git a/nls/it_IT/Image.m b/nls/it_IT/Image.m new file mode 100644 index 0000000..e98de00 --- /dev/null +++ b/nls/it_IT/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: errore creando la pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: errore creando XImage\n +$ #UnsupVisual +# BImage::renderXImage: visuale non supportata\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: errore creando la pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: grandezza della mappa di colori non valida %d (%d/%d/%d) - riduzione\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: errore di assegnazione mappa di colori\n +$ #ColorAllocFail +# BImageControl::BImageControl: fallita l'assegnazione del colore %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - rilascio %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: la cache e' larga, forzo la pulitura\n +$ #ColorParseError +# BImageControl::getColor: errore di analisi del colore: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: errore di assegnazione del colore: '%s'\n diff --git a/nls/it_IT/Makefile.am b/nls/it_IT/Makefile.am new file mode 100644 index 0000000..1de8e12 --- /dev/null +++ b/nls/it_IT/Makefile.am @@ -0,0 +1,38 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = it_IT +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \ + ln -f -s it_IT $(DESTDIR)$(pkgdatadir)/nls/it; \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/it_IT/Screen.m b/nls/it_IT/Screen.m new file mode 100644 index 0000000..ecd6b6f --- /dev/null +++ b/nls/it_IT/Screen.m @@ -0,0 +1,54 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: e' accaduto un errore mentre si interrogava il server X.\n \ +un'altro gestore di finestre e' attualmente in esecuzione sul display %s.\n +$ #ManagingScreen +# BScreen::BScreen: gestendo schermo %d usando visuale 0x%lx, depth %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): impossibile caricare il font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): impossibile caricare il font di default.\n +$ #EmptyMenuFile +# %s: file menu vuoto\n +$ #xterm +# xterm +$ #Restart +# Riavvia +$ #Exit +# Esci +$ #EXECError +# BScreen::parseMenuFile: [exec] errore, nessuna voce nel menu e/o comando definito\n +$ #EXITError +# BScreen::parseMenuFile: [exit] errore, nessuna voce nel menu definita\n +$ #STYLEError +# BScreen::parseMenuFile: [style] errore, nessuna voce nel menu e/o file\ +definto\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] errore, nessuna voce nel menu definta\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] errore, nessun file definito\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] errore, '%s' non è un file regolare\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] errore, nessuna voce nel menu definta\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] errore, nessuna voce nel menu definta\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] errore, nessuna voce nel menu definta\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] errore, nessuna cartella definita\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] errore, '%s' non e' una \ +cartella\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] errore, '%s' non esiste\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] errore, nessuna voce nel menu definita\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/it_IT/Slit.m b/nls/it_IT/Slit.m new file mode 100644 index 0000000..38e66ec --- /dev/null +++ b/nls/it_IT/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Direzione Slit +$ #SlitPlacement +# Posizionamento Slit diff --git a/nls/it_IT/Toolbar.m b/nls/it_IT/Toolbar.m new file mode 100644 index 0000000..ef28cb7 --- /dev/null +++ b/nls/it_IT/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Barra degli Strumenti +$ #EditWkspcName +# Modifica nome Area di Lavoro corrente +$ #ToolbarPlacement +# Posizionamento Barra diff --git a/nls/it_IT/Window.m b/nls/it_IT/Window.m new file mode 100644 index 0000000..5537f79 --- /dev/null +++ b/nls/it_IT/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creazione 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres fallito\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: impossibile trovare schermo per finestra principale 0x%lx\n +$ #Unnamed +# Senza Nome +$ #MapRequest +# BlackboxWindow::mapRequestEvent() per 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() per 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx a 0x%lx\n diff --git a/nls/it_IT/Windowmenu.m b/nls/it_IT/Windowmenu.m new file mode 100644 index 0000000..8820a5f --- /dev/null +++ b/nls/it_IT/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Manda in ... +$ #Shade +# Arrotola +$ #Iconify +# Riduci a Icona +$ #Maximize +# Ingrandisci +$ #Raise +# Alza +$ #Lower +# Abbassa +$ #Stick +# Fissa +$ #KillClient +# Uccidi Programma +$ #Close +# Chiudi diff --git a/nls/it_IT/Workspace.m b/nls/it_IT/Workspace.m new file mode 100644 index 0000000..2edf94a --- /dev/null +++ b/nls/it_IT/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Area di Lavoro %d diff --git a/nls/it_IT/Workspacemenu.m b/nls/it_IT/Workspacemenu.m new file mode 100644 index 0000000..28f768b --- /dev/null +++ b/nls/it_IT/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Aree di Lavoro +$ #NewWorkspace +# Nuova Area di Lavoro +$ #RemoveLast +# Rimuovi Ultima diff --git a/nls/it_IT/blackbox.m b/nls/it_IT/blackbox.m new file mode 100644 index 0000000..64a53c6 --- /dev/null +++ b/nls/it_IT/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: nessuno schermo gestibile trovatono, annullamento\n +$ #MapRequest +# Blackbox::process_event: MapRequest per 0x%lx\n diff --git a/nls/it_IT/bsetroot.m b/nls/it_IT/bsetroot.m new file mode 100644 index 0000000..95493ce --- /dev/null +++ b/nls/it_IT/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: errore: deve essere specificato uno dei seguenti: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> connessione display\n\ + -mod <x> <y> modello di modula\n\ + -foreground, -fg <color> colore di primo piano di modula\n\ + -background, -bg <color> colore di secondo piano di modula\n\n\ + -gradient <texture> trama sfumatura\n\ + -from <color> colore d'inizio sfumatura\n\ + -to <color> colore di fine sfumatura\n\n\ + -solid <color> colore pieno\n\n\ + -help mostra questo aiuto e esci\n + diff --git a/nls/it_IT/common.m b/nls/it_IT/common.m new file mode 100644 index 0000000..fe736f4 --- /dev/null +++ b/nls/it_IT/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Si +$ #No +# No + +$ #DirectionTitle +# Direzione +$ #DirectionHoriz +# Orizzontale +$ #DirectionVert +# Verticale + +$ #AlwaysOnTop +# Sempre in primo piano + +$ #PlacementTitle +# Posizionamento +$ #PlacementTopLeft +# in Alto a Sinistra +$ #PlacementCenterLeft +# al Centro a Sinistra +$ #PlacementBottomLeft +# in Basso a Sinistra +$ #PlacementTopCenter +# in Alto al Centro +$ #PlacementBottomCenter +# in Basso al Centro +$ #PlacementTopRight +# in Alto a Destra +$ #PlacementCenterRight +# al Centro a Destra +$ #PlacementBottomRight +# in Basso a Destra + +$ #AutoHide +# Nascondi Automaticamente diff --git a/nls/it_IT/main.m b/nls/it_IT/main.m new file mode 100644 index 0000000..4a5e1fb --- /dev/null +++ b/nls/it_IT/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# errore: '-rc' richiede un argomento\n +$ #DISPLAYRequiresArg +# errore: '-display' richiede an argomento\n +$ #WarnDisplaySet +# attenzione: impossibile impostare la variabile d'ambiente 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tusa connessione display.\n\ + -rc <string>\t\t\tusa un file risorsa alternativo.\n\ + -version\t\t\tmostra la versione e esci.\n\ + -help\t\t\t\tmostra questo aiuto e esci.\n\n +$ #CompileOptions +# Opzioni in fase di compilazione:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/ja_JP/BaseDisplay.m b/nls/ja_JP/BaseDisplay.m new file mode 100644 index 0000000..fe15b80 --- /dev/null +++ b/nls/ja_JP/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X ¥¨¥é¡¼: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: ¥·¥°¥Ê¥ë %d ȯÀ¸\n +$ #ShuttingDown +# ½ªÎ»\n +$ #Aborting +# Ãæ»ß ... ¥³¥¢¥À¥ó¥×Ãæ.\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: X ¥µ¡¼¥Ð¤Ø¤ÎÀܳ¤Ë¼ºÇÔ\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: ¥Ç¥£¥¹¥×¥ì¥¤Àܳ¤Ë¼Â¹Ô»þ¥¯¥í¡¼¥º¥Õ¥é¥°¤ò¤¿¤Æ¤ë¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¤Ç¤·¤¿\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): ¥¤¥Ù¥ó¥È¥¥å¡¼¤«¤éÉÔÀµ¤Ê¥¦¥£¥ó¥É¥¦¤ò¾Ã¤·¤Þ¤¹\n diff --git a/nls/ja_JP/Basemenu.m b/nls/ja_JP/Basemenu.m new file mode 100644 index 0000000..f20f938 --- /dev/null +++ b/nls/ja_JP/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox ¥á¥Ë¥å¡¼ diff --git a/nls/ja_JP/Configmenu.m b/nls/ja_JP/Configmenu.m new file mode 100644 index 0000000..95bac61 --- /dev/null +++ b/nls/ja_JP/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# ÀßÄꥪ¥×¥·¥ç¥ó +$ #FocusModel +# ¥Õ¥©¡¼¥«¥¹¥â¥Ç¥ë +$ #WindowPlacement +# ¥¦¥£¥ó¥É¥¦ÇÛÃÖ +$ #ImageDithering +# ²èÁü¥Ç¥£¥¶ +$ #OpaqueMove +# ÉÔÆ©ÌÀ¤Ë¤·¤Æ¥¦¥£¥ó¥É¥¦¤ò°ÜÆ° +$ #FullMax +# ´°Á´ºÇÂç²½ +$ #FocusNew +# ¿·µ¬¥¦¥£¥ó¥É¥¦¤Ë¥Õ¥©¡¼¥«¥¹ +$ #FocusLast +# ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹°ÜÆ°»þ¤Ë¥¦¥£¥ó¥É¥¦¤Ë¥Õ¥©¡¼¥«¥¹ +$ #DisableBindings +# ¥¹¥¯¥í¡¼¥ë¥í¥Ã¥¯»þ¤Ë¥·¥ç¡¼¥È¥«¥Ã¥È¤ò̵¸ú¤Ë +$ #ClickToFocus +# ¥¯¥ê¥Ã¥¯¤Ç¥Õ¥©¡¼¥«¥¹ +$ #SloppyFocus +# Sloppy Focus +$ #AutoRaise +# ¼«Æ°Åª¤ËÁ°ÌÌ¤Ë +$ #ClickRaise +# ¥¯¥ê¥Ã¥¯¤ÇÁ°ÌÌ¤Ë +$ #SmartRows +# ¸¤¯ÇÛÃÖ (¹Ô) +$ #SmartCols +# ¸¤¯ÇÛÃÖ (Îó) +$ #Cascade +# ¤º¤é¤·¤ÆÇÛÃÖ +$ #LeftRight +# º¸¤«¤é±¦¤Ø +$ #RightLeft +# ±¦¤«¤éº¸¤Ø +$ #TopBottom +# ¾å¤«¤é²¼¤Ø +$ #BottomTop +# ²¼¤«¤é¾å¤Ø diff --git a/nls/ja_JP/Icon.m b/nls/ja_JP/Icon.m new file mode 100644 index 0000000..5d7e8d3 --- /dev/null +++ b/nls/ja_JP/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# ¥¢¥¤¥³¥ó diff --git a/nls/ja_JP/Image.m b/nls/ja_JP/Image.m new file mode 100644 index 0000000..6322b2a --- /dev/null +++ b/nls/ja_JP/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×À¸À®¥¨¥é¡¼\n +$ #ErrorCreatingXImage +# BImage::renderXImage: XImage À¸À®¥¨¥é¡¼\n +$ #UnsupVisual +# BImage::renderXImage: ̤¥µ¥Ý¡¼¥È¤Î»ë³Ð¸ú²Ì\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×À¸À®¥¨¥é¡¼\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ÉÔÀµ¤Ê¥«¥é¡¼¥Þ¥Ã¥×¥µ¥¤¥º %d (%d/%d/%d) - ¸º¿§Ãæ\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: ¥«¥é¡¼¥Þ¥Ã¥×³ÎÊÝ¥¨¥é¡¼\n +$ #ColorAllocFail +# BImageControl::BImageControl: ¥«¥é¡¼ %d/%d/%d ¤Î³ÎÊݤ˼ºÇÔ\n +$ #PixmapRelease +# BImageControl::~BImageControl: ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¥¥ã¥Ã¥·¥å - %d ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¤ò²òÊü\n +$ #PixmapCacheLarge +# BImageControl::renderImage: ¥¥ã¥Ã¥·¥å¤¬Â礤¹¤®¤ë¤Î¤Ç¶¯À©Åª¤ËÁݽü\n +$ #ColorParseError +# BImageControl::getColor: ¥«¥é¡¼²òÀÏ¥¨¥é¡¼: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: ¥«¥é¡¼³ÎÊÝ¥¨¥é¡¼: '%s'\n diff --git a/nls/ja_JP/Makefile.am b/nls/ja_JP/Makefile.am new file mode 100644 index 0000000..03af8f5 --- /dev/null +++ b/nls/ja_JP/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = ja_JP +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/ja_JP/Screen.m b/nls/ja_JP/Screen.m new file mode 100644 index 0000000..1f16fa2 --- /dev/null +++ b/nls/ja_JP/Screen.m @@ -0,0 +1,53 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: X ¥µ¡¼¥ÐÌä¹ç¤»Ãæ¤Ë¥¨¥é¡¼È¯À¸\n \ +¾¤Î¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤¬¥Ç¥£¥¹¥×¥ì¥¤ %s ¤Ç´û¤Ë¼Â¹ÔÃæ¤Ç¤¹.\n +$ #ManagingScreen +# BScreen::BScreen: ¥¹¥¯¥ê¡¼¥ó %d ¤ò»ë³Ð¸ú²Ì 0x%lx, ¿¼ÅÙ %d ¤ÇÀ©¸æÃæ\n +$ #FontLoadFail +# BScreen::LoadStyle(): ¥Õ¥©¥ó¥È '%s' ¤òÆɤ߹þ¤á¤Þ¤»¤ó¤Ç¤·¤¿\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): ɸ½à¥Õ¥©¥ó¥È¤òÆɤ߹þ¤á¤Þ¤»¤ó¤Ç¤·¤¿\n +$ #EmptyMenuFile +# %s: ¶õ¤Î¥á¥Ë¥å¡¼¥Õ¥¡¥¤¥ë\n +$ #xterm +# xterm +$ #Restart +# ºÆµ¯Æ° +$ #Exit +# ½ªÎ» +$ #EXECError +# BScreen::parseMenuFile: [exec] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë(¥³¥Þ¥ó¥É)̤ÄêµÁ\n +$ #EXITError +# BScreen::parseMenuFile: [exit] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n +$ #STYLEError +# BScreen::parseMenuFile: [style] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë(¥Õ¥¡¥¤¥ë̾)̤ÄêµÁ\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] ¥¨¥é¡¼¡¢¥Õ¥¡¥¤¥ë̤̾ÄêµÁ\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] ¥¨¥é¡¼¡¢'%s' ¤ÏÀµµ¬¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] ¥¨¥é¡¼¡¢¥Ç¥£¥ì¥¯¥È¥ê̤̾ÄêµÁ\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] ¥¨¥é¡¼¡¢'%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï\ +¤¢¤ê¤Þ¤»¤ó\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] ¥¨¥é¡¼¡¢'%s' ¤Ï¸ºß¤·¤Þ¤»¤ó\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# Éý: %4d x ¹â¤µ: %4d + diff --git a/nls/ja_JP/Slit.m b/nls/ja_JP/Slit.m new file mode 100644 index 0000000..91bf0fb --- /dev/null +++ b/nls/ja_JP/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# ¥¹¥ê¥Ã¥È +$ #SlitDirection +# ¥¹¥ê¥Ã¥È¤ÎÊý¸þ +$ #SlitPlacement +# ¥¹¥ê¥Ã¥È¤ÎÇÛÃÖ diff --git a/nls/ja_JP/Toolbar.m b/nls/ja_JP/Toolbar.m new file mode 100644 index 0000000..74b27e9 --- /dev/null +++ b/nls/ja_JP/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# ¥Ä¡¼¥ë¥Ð¡¼ +$ #EditWkspcName +# ¸½¥ï¡¼¥¯¥¹¥Ú¡¼¥¹Ì¾¤òÊÔ½¸ +$ #ToolbarPlacement +# ¥Ä¡¼¥ë¥Ð¡¼¤ÎÇÛÃÖ diff --git a/nls/ja_JP/Window.m b/nls/ja_JP/Window.m new file mode 100644 index 0000000..f11e21f --- /dev/null +++ b/nls/ja_JP/Window.m @@ -0,0 +1,18 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: 0x%lx ¤òÀ¸À®Ãæ\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres ¼ºÇÔ\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: ¥ë¡¼¥È¥¦¥£¥ó¥É¥¦ 0x%lx ¤ËÂФ¹¤ë¥¹¥¯¥ê¡¼¥ó¤¬\ +¤ß¤Ä¤«¤ê¤Þ¤»¤ó\n +$ #Unnamed +# ̾Á°¤Ê¤· +$ #MapRequest +# BlackboxWindow::mapRequestEvent() (0x%lx ¤ËÂФ·¤Æ)\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() (0x%lx ¤ËÂФ·¤Æ)\n +$ #ReparentNotify +# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to 0x%lx\n diff --git a/nls/ja_JP/Windowmenu.m b/nls/ja_JP/Windowmenu.m new file mode 100644 index 0000000..1c71cd3 --- /dev/null +++ b/nls/ja_JP/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Á÷¤êÀè... +$ #Shade +# ¥·¥§¡¼¥É +$ #Iconify +# ¥¢¥¤¥³¥ó²½ +$ #Maximize +# ºÇÂç²½ +$ #Raise +# Á°ÌÌ¤Ë +$ #Lower +# ¸åÌÌ¤Ë +$ #Stick +# µïºÂ¤ê +$ #KillClient +# ¶¯À©½ªÎ» +$ #Close +# ½ªÎ» diff --git a/nls/ja_JP/Workspace.m b/nls/ja_JP/Workspace.m new file mode 100644 index 0000000..c160829 --- /dev/null +++ b/nls/ja_JP/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹ %d diff --git a/nls/ja_JP/Workspacemenu.m b/nls/ja_JP/Workspacemenu.m new file mode 100644 index 0000000..ed7cfcc --- /dev/null +++ b/nls/ja_JP/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹ +$ #NewWorkspace +# ¿·µ¬¥ï¡¼¥¯¥¹¥Ú¡¼¥¹ +$ #RemoveLast +# ËöÈø¥ï¡¼¥¯¥¹¥Ú¡¼¥¹¾Ãµî diff --git a/nls/ja_JP/blackbox.m b/nls/ja_JP/blackbox.m new file mode 100644 index 0000000..25017cc --- /dev/null +++ b/nls/ja_JP/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: Áàºî²Äǽ¤Ê¥¹¥¯¥ê¡¼¥ó¤¬¤¢¤ê¤Þ¤»¤ó¡¢¼Â¹ÔÃæ»ß\n +$ #MapRequest +# Blackbox::process_event: MapRequest (0x%lx ¤ËÂФ·¤Æ)\n diff --git a/nls/ja_JP/bsetroot.m b/nls/ja_JP/bsetroot.m new file mode 100644 index 0000000..d512000 --- /dev/null +++ b/nls/ja_JP/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: ¥¨¥é¡¼: ¼¡¤ÎÃ椫¤é°ì¤Ä¤òÁªÂò¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> ¥Ç¥£¥¹¥×¥ì¥¤¤ò»ØÄê\n\ + -mod <x> <y> ÁȤ߹ç¤ï¤»¥Ñ¥¿¡¼¥ó\n\ + -foreground, -fg <color> ÁȤ߹ç¤ï¤»Á°·Ê¿§\n\ + -background, -bg <color> ÁȤ߹ç¤ï¤»ÇØ·Ê¿§\n\n\ + -gradient <texture> ¥°¥é¥Ç¡¼¥·¥ç¥ó¥Æ¥¯¥¹¥Á¥ã\n\ + -from <color> ¥°¥é¥Ç¡¼¥·¥ç¥óºÇ½é¤Î¿§\n\ + -to <color> ¥°¥é¥Ç¡¼¥·¥ç¥ó½ª¤ê¤Î¿§\n\ + -solid <color> ñ¿§\n\n\ + -help ¤³¤Î¥Ø¥ë¥×¤òɽ¼¨¤·¡¢½ªÎ»\n + diff --git a/nls/ja_JP/common.m b/nls/ja_JP/common.m new file mode 100644 index 0000000..4344e76 --- /dev/null +++ b/nls/ja_JP/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# ¤Ï¤¤ +$ #No +# ¤¤¤¤¤¨ + +$ #DirectionTitle +# Êý¸þ +$ #DirectionHoriz +# ¿åÊ¿ +$ #DirectionVert +# ¿âľ + +$ #AlwaysOnTop +# ¾ï¤ËºÇÁ°ÌÌ¤Ë + +$ #PlacementTitle +# ÇÛÃÖ +$ #PlacementTopLeft +# º¸¾å +$ #PlacementCenterLeft +# º¸Ãæ±û +$ #PlacementBottomLeft +# º¸²¼ +$ #PlacementTopCenter +# Ãæ±û¾å +$ #PlacementBottomCenter +# Ãæ±û²¼ +$ #PlacementTopRight +# ±¦¾å +$ #PlacementCenterRight +# ±¦Ãæ±û +$ #PlacementBottomRight +# ±¦²¼ + +$ #AutoHide +# ¼«Æ°Åª¤Ë±£¤¹ diff --git a/nls/ja_JP/main.m b/nls/ja_JP/main.m new file mode 100644 index 0000000..359999a --- /dev/null +++ b/nls/ja_JP/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# ¥¨¥é¡¼: '-rc' ¥ª¥×¥·¥ç¥ó¤Ï°ú¿ô¤òɬÍפȤ·¤Þ¤¹\n +$ #DISPLAYRequiresArg +# ¥¨¥é¡¼: '-display' ¥ª¥×¥·¥ç¥ó¤Ï°ú¿ô¤òɬÍפȤ·¤Þ¤¹\n +$ #WarnDisplaySet +# ·Ù¹ð: ´Ä¶ÊÑ¿ô 'DISPLAY' ¤òÀßÄê¤Ç¤¤Þ¤»¤ó¤Ç¤·¤¿\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\t»ØÄê¥Ç¥£¥¹¥×¥ì¥¤¤ËÀܳ\n\ + -rc <string>\t\t\tÂå¤ê¤Î¥ê¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò»ÈÍÑ\n\ + -version\t\t\t¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤òɽ¼¨¤·¡¢½ªÎ»\n\ + -help\t\t\t\t¤³¤Î¥Ø¥ë¥×¤òɽ¼¨¤·¡¢½ªÎ»\n\n +$ #CompileOptions +# ¥³¥ó¥Ñ¥¤¥ë»þ¥ª¥×¥·¥ç¥ó:\n\ + ¥Ç¥Ð¥Ã¥°\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp ¥Ç¥£¥¶:\t%s\n\n diff --git a/nls/ko_KR/BaseDisplay.m b/nls/ko_KR/BaseDisplay.m new file mode 100644 index 0000000..f7f3d9b --- /dev/null +++ b/nls/ko_KR/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: signal %d caught\n +$ #ShuttingDown +# shutting down\n +$ #Aborting +# aborting... dumping core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: connection to X server failed.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): removing bad window from event queue\n diff --git a/nls/ko_KR/Basemenu.m b/nls/ko_KR/Basemenu.m new file mode 100644 index 0000000..8c52f50 --- /dev/null +++ b/nls/ko_KR/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# ºí·¢¹Ú½º ¸Þ´º diff --git a/nls/ko_KR/Configmenu.m b/nls/ko_KR/Configmenu.m new file mode 100644 index 0000000..8074d41 --- /dev/null +++ b/nls/ko_KR/Configmenu.m @@ -0,0 +1,40 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# ¼³Á¤¿É¼Ç +$ #FocusModel +# â È°¼ºÈ ¹æ½Ä +$ #WindowPlacement +# â ¹èÄ¡ +$ #ImageDithering +# À̹ÌÁö µð´õ¸µ +$ #OpaqueMove +# ºÒÅõ¸í À̵¿ +$ #FullMax +# ¿ÏÀü ÃÖ´ëÈ +$ #FocusNew +# »õ â È°¼ºÈ +$ #FocusLast +# ÀÛ¾÷â º¯°æ½Ã â È°¼ºÈ +$ #ClickToFocus +# Ŭ¸¯ È°¼ºÈ +$ #SloppyFocus +# ½½¶óÇÇ È°¼ºÈ +$ #AutoRaise +# ÀÚµ¿À¸·Î °¡Á®¿À±â +$ #ClickRaise +# Ŭ¸¯À¸·Î °¡Á®¿À±â +$ #SmartRows +# Áö´ÉÀû â¹èÄ¡ (¿) +$ #SmartCols +# Áö´ÉÁ¤ â¹èÄ¡ (Çà) +$ #Cascade +# °è´Ü½Ä â¹èÄ¡ +$ #LeftRight +# ¿ÞÂÊ¿¡¼ ¿À¸¥ÂÊÀ¸·Î +$ #RightLeft +# ¿À¸¥ÂÊ¿¡¼ ¿ÞÂÊÀ¸·Î +$ #TopBottom +# À§¿¡¼ ¾Æ·¡·Î +$ #BottomTop +# ¾Æ·¡¿¡¼ À§·Î diff --git a/nls/ko_KR/Icon.m b/nls/ko_KR/Icon.m new file mode 100644 index 0000000..f8b7a07 --- /dev/null +++ b/nls/ko_KR/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# ¾ÆÀÌÄÜ diff --git a/nls/ko_KR/Image.m b/nls/ko_KR/Image.m new file mode 100644 index 0000000..5dd251a --- /dev/null +++ b/nls/ko_KR/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: error creating pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: error creating XImage\n +$ #UnsupVisual +# BImage::renderXImage: unsupported visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: error creating pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: invalid colormap size %d (%d/%d/%d) - reducing\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: error allocating colormap\n +$ #ColorAllocFail +# BImageControl::BImageControl: failed to alloc color %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - releasing %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache is large, forcing cleanout\n +$ #ColorParseError +# BImageControl::getColor: color parse error: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: color alloc error: '%s'\n diff --git a/nls/ko_KR/Makefile.am b/nls/ko_KR/Makefile.am new file mode 100644 index 0000000..1dfa303 --- /dev/null +++ b/nls/ko_KR/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = ko_KR +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/ko_KR/Screen.m b/nls/ko_KR/Screen.m new file mode 100644 index 0000000..f5ad3d3 --- /dev/null +++ b/nls/ko_KR/Screen.m @@ -0,0 +1,54 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: an error occured while querying the X server.\n \ +another window manager is already running on display %s.\n +$ #ManagingScreen +# BScreen::BScreen: managing screen %d using visual 0x%lx, depth %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): couldn't load font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): couldn't load default font.\n +$ #EmptyMenuFile +# %s: empty menu file\n +$ #xterm +# ¿¢½ºÅÒ +$ #Restart +# Àç½ÃÀÛ +$ #Exit +# Á¾·á +$ #EXECError +# BScreen::parseMenuFile: [exec] error, no menu label and/or command defined\n +$ #EXITError +# BScreen::parseMenuFile: [exit] error, no menu label defined\n +$ #STYLEError +# BScreen::parseMenuFile: [style] error, no menu label and/or filename \ +defined\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] error, no menu label defined\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] error, no filename defined\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] error, '%s' is not a regular file\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] error, no menu label defined\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] error, no menu label defined\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] error, no menu label defined\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, no directory defined\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' is not a \ +directory\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' does not exist\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] error, no menu label defined\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/ko_KR/Slit.m b/nls/ko_KR/Slit.m new file mode 100644 index 0000000..9982958 --- /dev/null +++ b/nls/ko_KR/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# ½½¸´ +$ #SlitDirection +# ½½¸´ ¹æÇâ +$ #SlitPlacement +# ½½¸´ À§Ä¡ diff --git a/nls/ko_KR/Toolbar.m b/nls/ko_KR/Toolbar.m new file mode 100644 index 0000000..b75dd2e --- /dev/null +++ b/nls/ko_KR/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# µµ±¸¹Ù +$ #EditWkspcName +# ÀÛ¾÷â À̸§º¯°æ +$ #ToolbarPlacement +# µµ±¸¹Ù À§Ä¡ diff --git a/nls/ko_KR/Window.m b/nls/ko_KR/Window.m new file mode 100644 index 0000000..9987b47 --- /dev/null +++ b/nls/ko_KR/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creating 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres failed\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: cannot find screen for root window 0x%lx\n +$ #Unnamed +# Unnamed +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n diff --git a/nls/ko_KR/Windowmenu.m b/nls/ko_KR/Windowmenu.m new file mode 100644 index 0000000..0f9e174 --- /dev/null +++ b/nls/ko_KR/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# ´Ù¸¥ âÀ¸·Î º¸³»±â ... +$ #Shade +# ÃÖ¼ÒÈ +$ #Iconify +# ¾ÆÀÌÄÜÈ +$ #Maximize +# ÃÖ´ëÈ +$ #Raise +# ¾ÕÀ¸·Î °¡Á®¿À±â +$ #Lower +# µÚ·Î ¼û±â±â +$ #Stick +# Stick +$ #KillClient +# Á×À̱â +$ #Close +# ´Ý±â diff --git a/nls/ko_KR/Workspace.m b/nls/ko_KR/Workspace.m new file mode 100644 index 0000000..c29f86f --- /dev/null +++ b/nls/ko_KR/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# ÀÛ¾÷â %d diff --git a/nls/ko_KR/Workspacemenu.m b/nls/ko_KR/Workspacemenu.m new file mode 100644 index 0000000..db6ca9e --- /dev/null +++ b/nls/ko_KR/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# ÀÛ¾÷â +$ #NewWorkspace +# »õ ÀÛ¾÷â +$ #RemoveLast +# ¸¶Áö¸· ÀÛ¾÷â »èÁ¦ diff --git a/nls/ko_KR/blackbox.m b/nls/ko_KR/blackbox.m new file mode 100644 index 0000000..74d09f6 --- /dev/null +++ b/nls/ko_KR/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: no managable screens found, aborting\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/ko_KR/bsetroot.m b/nls/ko_KR/bsetroot.m new file mode 100644 index 0000000..e7307dd --- /dev/null +++ b/nls/ko_KR/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: error: must specify one of: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> display connection\n\ + -mod <x> <y> modula pattern\n\ + -foreground, -fg <color> modula foreground color\n\ + -background, -bg <color> modula background color\n\n\ + -gradient <texture> gradient texture\n\ + -from <color> gradient start color\n\ + -to <color> gradient end color\n\n\ + -solid <color> solid color\n\n\ + -help print this help text and exit\n + diff --git a/nls/ko_KR/common.m b/nls/ko_KR/common.m new file mode 100644 index 0000000..1df51b1 --- /dev/null +++ b/nls/ko_KR/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# ³× +$ #No +# ¾Æ´Ï¿À + +$ #DirectionTitle +# ¹æÇâ +$ #DirectionHoriz +# °¡·Î +$ #DirectionVert +# ¼¼·Î + +$ #AlwaysOnTop +# Ç×»ó À§ + +$ #PlacementTitle +# À§Ä¡ +$ #PlacementTopLeft +# ¿ÞÂÊ À§ +$ #PlacementCenterLeft +# ¿ÞÂÊ °¡¿îµ¥ +$ #PlacementBottomLeft +# ¿ÞÂÊ ¾Æ·¡ +$ #PlacementTopCenter +# °¡¿îµ¥ À§ +$ #PlacementBottomCenter +# °¡¿îµ¥ ¾Æ·¡ +$ #PlacementTopRight +# ¿À¸¥ÂÊ À§ +$ #PlacementCenterRight +# ¿À¸¥ÂÊ °¡¿îµ¥ +$ #PlacementBottomRight +# ¿À¸¥ÂÊ ¾Æ·¡ + +$ #AutoHide +# ÀÚµ¿À¸·Î ¼û±â±â diff --git a/nls/ko_KR/main.m b/nls/ko_KR/main.m new file mode 100644 index 0000000..b8d2baf --- /dev/null +++ b/nls/ko_KR/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# error: '-rc' requires an argument\n +$ #DISPLAYRequiresArg +# error: '-display' requires an argument\n +$ #WarnDisplaySet +# warning: could not set environment variable 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tuse display connection.\n\ + -rc <string>\t\t\tuse alternate resource file.\n\ + -version\t\t\tdisplay version and exit.\n\ + -help\t\t\t\tdisplay this help text and exit.\n\n +$ #CompileOptions +# Compile time options:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/nl_NL/BaseDisplay.m b/nls/nl_NL/BaseDisplay.m new file mode 100644 index 0000000..36512a3 --- /dev/null +++ b/nls/nl_NL/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X fout: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: signaal %d gekregen\n +$ #ShuttingDown +# bezig af te sluiten\n +$ #Aborting +# afgebroken... core bestand gedumpt\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: verbinding met X server mislukt\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: kan display verbinding niet markeren als 'close-on-exec'\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): verwijder 'bad window' van gebeurtenis wachtrij\n diff --git a/nls/nl_NL/Basemenu.m b/nls/nl_NL/Basemenu.m new file mode 100644 index 0000000..6e6428e --- /dev/null +++ b/nls/nl_NL/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox menu diff --git a/nls/nl_NL/Configmenu.m b/nls/nl_NL/Configmenu.m new file mode 100644 index 0000000..b22d6b7 --- /dev/null +++ b/nls/nl_NL/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Instellingen +$ #FocusModel +# Focus van vensters +$ #WindowPlacement +# Plaatsing van vensters +$ #ImageDithering +# Kleurbenadering +$ #OpaqueMove +# Vensters slepen met inhoud +$ #FullMax +# Volledig maximaliseren +$ #FocusNew +# Focus nieuwe vensters +$ #FocusLast +# Focus venster bij werkblad wissel +$ #DisableBindings +# Scroll Lock schakelt bindingen uit +$ #ClickToFocus +# Focus met muisklik +$ #SloppyFocus +# Focus volgt muispijl +$ #AutoRaise +# Automatisch naar voorgrond +$ #ClickRaise +# Naar voorgrond met muisklik +$ #SmartRows +# Optimale plaatsing (rijen) +$ #SmartCols +# Optimale plaatsing (kolommen) +$ #Cascade +# Trapsgewijs +$ #LeftRight +# Van links naar rechts +$ #RightLeft +# Van rechts naar links +$ #TopBottom +# Van boven naar beneden +$ #BottomTop +# Van beneden naar boven diff --git a/nls/nl_NL/Icon.m b/nls/nl_NL/Icon.m new file mode 100644 index 0000000..0b372be --- /dev/null +++ b/nls/nl_NL/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Iconen diff --git a/nls/nl_NL/Image.m b/nls/nl_NL/Image.m new file mode 100644 index 0000000..4ce790f --- /dev/null +++ b/nls/nl_NL/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: kan pixmap niet aanmaken\n +$ #ErrorCreatingXImage +# BImage::renderXImage: kan XImage niet aanmaken\n +$ #UnsupVisual +# BImage::renderXImage: niet ondersteunde visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: kan pixmap niet aanmaken\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ongeldige grootte kleurenmap %d (%d/%d/%d) - verkleind\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: kan geen kleurenmap aanmaken\n +$ #ColorAllocFail +# BImageControl::BImageControl: kan kleur %d/%d/%d niet aanmaken\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - %d pixmaps verwijderd\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache is te groot, leeggemaakt\n +$ #ColorParseError +# BImageControl::getColor: fout bij lezen kleur: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: fout bij aanmaken kleur: '%s'\n diff --git a/nls/nl_NL/Makefile.am b/nls/nl_NL/Makefile.am new file mode 100644 index 0000000..bd04a06 --- /dev/null +++ b/nls/nl_NL/Makefile.am @@ -0,0 +1,38 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = nl_NL +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \ + ln -f -s nl_NL $(DESTDIR)$(pkgdatadir)/nls/nl; \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/nl_NL/Screen.m b/nls/nl_NL/Screen.m new file mode 100644 index 0000000..571b51d --- /dev/null +++ b/nls/nl_NL/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: er is een fout opgetreden bij het verbinden met de X server.\n \ +er werkt al een andere window manager op display %s.\n +$ #ManagingScreen +# BScreen::BScreen: manager op scherm %d met visual 0x%lx, kleurdiepte %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): kan lettertype '%s' niet laden\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): kan standaardlettertype niet laden\n +$ #EmptyMenuFile +# %s: leeg menu bestand\n +$ #xterm +# xterm +$ #Restart +# Herstarten +$ #Exit +# Afsluiten +$ #EXECError +# BScreen::parseMenuFile: [exec] fout, geen label en/of commando aangegeven\n +$ #EXITError +# BScreen::parseMenuFile: [exit] fout, geen label aangegeven\n +$ #STYLEError +# BScreen::parseMenuFile: [style] fout, geen label en/of bestandsnaam aangegeven\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] fout, geen label aangegeven\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] fout, geen bestandsnaam aangegeven\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] fout, '%s' is geen leesbaar bestand\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] fout, geen label aangegeven\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] fout, geen label aangegeven\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] fout, geen label aangegeven\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fout, geen directory aangegeven\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fout, '%s' is geen directory\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fout, '%s' bestaat niet\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] fout, geen label aangegeven\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# B: %4d x H: %4d + diff --git a/nls/nl_NL/Slit.m b/nls/nl_NL/Slit.m new file mode 100644 index 0000000..60eeae2 --- /dev/null +++ b/nls/nl_NL/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Richting +$ #SlitPlacement +# Plaats diff --git a/nls/nl_NL/Toolbar.m b/nls/nl_NL/Toolbar.m new file mode 100644 index 0000000..64eca2a --- /dev/null +++ b/nls/nl_NL/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Werkbalk +$ #EditWkspcName +# Wijzig naam van huidig werkblad +$ #ToolbarPlacement +# Plaats van werkbalk diff --git a/nls/nl_NL/Window.m b/nls/nl_NL/Window.m new file mode 100644 index 0000000..2acbb6c --- /dev/null +++ b/nls/nl_NL/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: maak window aan 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres mislukt\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: kan scherm voor root window 0x%lx niet vinden\n +$ #Unnamed +# Zonder titel +$ #MapRequest +# BlackboxWindow::mapRequestEvent() voor 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() voor 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx naar 0x%lx\n diff --git a/nls/nl_NL/Windowmenu.m b/nls/nl_NL/Windowmenu.m new file mode 100644 index 0000000..c09e4b2 --- /dev/null +++ b/nls/nl_NL/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Verplaatsen naar ... +$ #Shade +# Alleen titel +$ #Iconify +# Minimaliseren +$ #Maximize +# Maximaliseren +$ #Raise +# Voorgrond +$ #Lower +# Achtergrond +$ #Stick +# Altijd zichtbaar +$ #KillClient +# Afbreken +$ #Close +# Sluiten diff --git a/nls/nl_NL/Workspace.m b/nls/nl_NL/Workspace.m new file mode 100644 index 0000000..5bff975 --- /dev/null +++ b/nls/nl_NL/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Werkblad %d diff --git a/nls/nl_NL/Workspacemenu.m b/nls/nl_NL/Workspacemenu.m new file mode 100644 index 0000000..311fb1f --- /dev/null +++ b/nls/nl_NL/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Werkbladen +$ #NewWorkspace +# Nieuw werkblad +$ #RemoveLast +# Verwijder laatste werkblad diff --git a/nls/nl_NL/blackbox.m b/nls/nl_NL/blackbox.m new file mode 100644 index 0000000..313ef81 --- /dev/null +++ b/nls/nl_NL/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: geen schermen gevonden om te managen, afgesloten\n +$ #MapRequest +# Blackbox::process_event: MapRequest voor 0x%lx\n diff --git a/nls/nl_NL/bsetroot.m b/nls/nl_NL/bsetroot.m new file mode 100644 index 0000000..8e8a970 --- /dev/null +++ b/nls/nl_NL/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: fout: een van -solid, -mod, -gradient moet aangegeven worden\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <displaynaam> display verbinding\n\ + -mod <x> <y> modula patroon\n\ + -foreground, -fg <kleur> modula voorgrondkleur\n\ + -background, -bg <kleur> modula achtergrondkleur\n\n\ + -gradient <textuur> gradiënt textuur\n\ + -from <kleur> gradiënt beginkleur\n\ + -to <kleur> gradiënt eindkleur\n\n\ + -solid <kleur> effen kleur\n\n\ + -help toon deze hulp tekst en stop\n + diff --git a/nls/nl_NL/common.m b/nls/nl_NL/common.m new file mode 100644 index 0000000..66c95c0 --- /dev/null +++ b/nls/nl_NL/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Ja +$ #No +# Nee + +$ #DirectionTitle +# Richting +$ #DirectionHoriz +# Horizontaal +$ #DirectionVert +# Vertikaal + +$ #AlwaysOnTop +# Altijd op voorgrond + +$ #PlacementTitle +# Plaatsing +$ #PlacementTopLeft +# Linksboven +$ #PlacementCenterLeft +# Links +$ #PlacementBottomLeft +# Linksonder +$ #PlacementTopCenter +# Middenboven +$ #PlacementBottomCenter +# Middenonder +$ #PlacementTopRight +# Rechtsboven +$ #PlacementCenterRight +# Rechts +$ #PlacementBottomRight +# Rechtsonder + +$ #AutoHide +# Automatisch verbergen diff --git a/nls/nl_NL/main.m b/nls/nl_NL/main.m new file mode 100644 index 0000000..4cb5bee --- /dev/null +++ b/nls/nl_NL/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# fout: '-rc' heeft een argument nodig (bestandsnaam)\n +$ #DISPLAYRequiresArg +# fout: '-display' heeft een argument nodig (displaynaam)\n +$ #WarnDisplaySet +# waarschuwing: kan omgevingsvariabele 'DISPLAY' niet instellen\n +$ #Usage +# Blackbox %s: (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <displaynaam> gebruik aangegeven display.\n\ + -rc <bestandsnaam> gebruik alternatief resource bestand.\n\ + -version toon versie en stop.\n\ + -help toon deze hulp tekst en stop.\n\n +$ #CompileOptions +# Gecompileerd met instellingen:\n\ + Debugging: %s\n\ + Shape: %s\n\ + 8bpp Ordered Dithering: %s\n\n diff --git a/nls/no_NO/BaseDisplay.m b/nls/no_NO/BaseDisplay.m new file mode 100644 index 0000000..4e06abc --- /dev/null +++ b/nls/no_NO/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X feil: %s(%d) kode %d/%d\n ressurs 0x%lx\n +$ #SignalCaught +# %s: signal %d fanget\n +$ #ShuttingDown +# Avslutter\n +$ #Aborting +# Avbryter... dumper kjerne\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: kunne ikke koble til X tjener.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: Kunne ikke markere skjermtilkobling som lukk-ved-eksekvering\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): fjerner korrupt vindu fra hendelseskø\n diff --git a/nls/no_NO/Basemenu.m b/nls/no_NO/Basemenu.m new file mode 100644 index 0000000..3255793 --- /dev/null +++ b/nls/no_NO/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Meny diff --git a/nls/no_NO/Configmenu.m b/nls/no_NO/Configmenu.m new file mode 100644 index 0000000..83af1f5 --- /dev/null +++ b/nls/no_NO/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Instillinger +$ #FocusModel +# Fokus-modell +$ #WindowPlacement +# Vindusplassering +$ #ImageDithering +# Bildeutjevning +$ #OpaqueMove +# Vis vindusinnhold ved flytting +$ #FullMax +# Full maksimering +$ #FocusNew +# Fokuser nye vinduer +$ #FocusLast +# Fokuser vindu ved skrivebords-bytte +$ #DisableBindings +# Slå av tastaturbindinger med Scroll Lock +$ #ClickToFocus +# Klikk for fokus +$ #SloppyFocus +# Slapp fokus +$ #AutoRaise +# Hev automatisk +$ #ClickRaise +# Klikk for å heve +$ #SmartRows +# Smart-plassering (rekker) +$ #SmartCols +# Smart-plassering (kolonner) +$ #Cascade +# Kaskade plassering +$ #LeftRight +# Fra venstre til høyre +$ #RightLeft +# Fra høyre til venstre +$ #TopBottom +# Topp til bunn +$ #BottomTop +# Bunn til topp diff --git a/nls/no_NO/Icon.m b/nls/no_NO/Icon.m new file mode 100644 index 0000000..32b247e --- /dev/null +++ b/nls/no_NO/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikoner diff --git a/nls/no_NO/Image.m b/nls/no_NO/Image.m new file mode 100644 index 0000000..1919fce --- /dev/null +++ b/nls/no_NO/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: feil ved opprettelse av pikselkart\n +$ #ErrorCreatingXImage +# BImage::renderXImage: feil ved opprettelse av XImage\n +$ #UnsupVisual +# BImage::renderXImage: fargedybden er ikke støttet\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: feil ved opprettelse av pikselkart\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ugyldig størrelse på fargekart %d (%d/%d/%d) - reduserer\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: feil ved allokering av fargekart\n +$ #ColorAllocFail +# BImageControl::BImageControl: feil ved allokering av farge %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pikselkart-hurtigminne - sletter %d pikselkart\n +$ #PixmapCacheLarge +# BImageControl::renderImage: hurtigminnet er stort, tvinger opprydding\n +$ #ColorParseError +# BImageControl::getColor: Feil ved lesning av farge: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: Fargeallokerings-feil: '%s'\n diff --git a/nls/no_NO/Makefile.am b/nls/no_NO/Makefile.am new file mode 100644 index 0000000..19c8903 --- /dev/null +++ b/nls/no_NO/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = no_NO +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/no_NO/Screen.m b/nls/no_NO/Screen.m new file mode 100644 index 0000000..96fbe0b --- /dev/null +++ b/nls/no_NO/Screen.m @@ -0,0 +1,53 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: feil ved forspørsel til X tjener.\n \ +en annen vindushåndterer kjører allerede på display %s.\n +$ #ManagingScreen +# BScreen::BScreen: håndterer skjerm %d, 0x%lx, fargedybde %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): kunne ikke laste skrifttypen '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): kunne ikke laste standard-skrifttypen.\n +$ #EmptyMenuFile +# %s: tom meny-fil\n +$ #xterm +# xterm +$ #Restart +# Omstart +$ #Exit +# Avslutt +$ #EXECError +# BScreen::parseMenuFile: [exec] feil, ingen meny-etikett og/eller kommando definert\n +$ #EXITError +# BScreen::parseMenuFile: [exit] feil, ingen meny-etikett definert\n +$ #STYLEError +# BScreen::parseMenuFile: [style] feil, ingen meny-etikett og/eller filnavn \ +definert\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] feil, ingen meny-etikett definert\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] feil, filnavn ikke definert\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] feil, '%s' er ikke en normal fil\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] feil, ingen meny-etikett definert\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] feil, ingen meny-etikett definert\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] feil, ingen meny-etikett definert\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] feil, ingen katalog definert\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] feil, '%s' er ikke en katalog\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] feil, '%s' eksisterer ikke\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] feil, ingen meny-etikett definert\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# B: %4d x H: %4d + diff --git a/nls/no_NO/Slit.m b/nls/no_NO/Slit.m new file mode 100644 index 0000000..cac6c1a --- /dev/null +++ b/nls/no_NO/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Spalte +$ #SlitDirection +# Spalte-retning +$ #SlitPlacement +# Spalte-plassering diff --git a/nls/no_NO/Toolbar.m b/nls/no_NO/Toolbar.m new file mode 100644 index 0000000..8ed9cbd --- /dev/null +++ b/nls/no_NO/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Verktøylinje +$ #EditWkspcName +# Endre navn på gjeldende skrivebord +$ #ToolbarPlacement +# Verktøylinje-plassering diff --git a/nls/no_NO/Window.m b/nls/no_NO/Window.m new file mode 100644 index 0000000..7fe2bce --- /dev/null +++ b/nls/no_NO/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: oppretter 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres feilet\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: finner ikke skjerm til rotvindu 0x%lx\n +$ #Unnamed +# Ikke navngitt +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: setter 0x%lx til 0x%lx\n diff --git a/nls/no_NO/Windowmenu.m b/nls/no_NO/Windowmenu.m new file mode 100644 index 0000000..5418f51 --- /dev/null +++ b/nls/no_NO/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Send til ... +$ #Shade +# Skygg +$ #Iconify +# Minimer til ikon +$ #Maximize +# Maksimer +$ #Raise +# Hev +$ #Lower +# Senk +$ #Stick +# Klebrig +$ #KillClient +# Terminer klient +$ #Close +# Lukk diff --git a/nls/no_NO/Workspace.m b/nls/no_NO/Workspace.m new file mode 100644 index 0000000..1093dda --- /dev/null +++ b/nls/no_NO/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Skrivebord %d diff --git a/nls/no_NO/Workspacemenu.m b/nls/no_NO/Workspacemenu.m new file mode 100644 index 0000000..34f3d77 --- /dev/null +++ b/nls/no_NO/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Skrivebord +$ #NewWorkspace +# Nytt skrivebord +$ #RemoveLast +# Fjern siste diff --git a/nls/no_NO/blackbox.m b/nls/no_NO/blackbox.m new file mode 100644 index 0000000..d2b9854 --- /dev/null +++ b/nls/no_NO/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ingen håndterbare skjermer funnet, avbryter\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/no_NO/bsetroot.m b/nls/no_NO/bsetroot.m new file mode 100644 index 0000000..465f6da --- /dev/null +++ b/nls/no_NO/bsetroot.m @@ -0,0 +1,16 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: feil: én av følgende opsjoner må spesifiseres: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> skjermtilkobling3\n\ + -mod <x> <y> modula mønster\n\ + -foreground, -fg <color> modula forgrunnsfarge\n\ + -background, -bg <color> modula bakgrunnsfarge\n\n\ + -gradient <texture> gradient tekstur\n\ + -from <color> gradient start farge\n\ + -to <color> gradient slutt farge\n\n\ + -solid <color> ensfarget\n\n\ + -help vis denne hjelpeteksten og avslutt\n diff --git a/nls/no_NO/common.m b/nls/no_NO/common.m new file mode 100644 index 0000000..17793c8 --- /dev/null +++ b/nls/no_NO/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Ja +$ #No +# Nei + +$ #DirectionTitle +# Retning +$ #DirectionHoriz +# Horisontal +$ #DirectionVert +# Vertikal + +$ #AlwaysOnTop +# Alltid øverst + +$ #PlacementTitle +# Plassering +$ #PlacementTopLeft +# Øverst til venstre +$ #PlacementCenterLeft +# Venstre i midten +$ #PlacementBottomLeft +# Nederst til venstre +$ #PlacementTopCenter +# Øverst i midten +$ #PlacementBottomCenter +# Nederst i midten +$ #PlacementTopRight +# Øverst til høyre +$ #PlacementCenterRight +# Høyre i midten +$ #PlacementBottomRight +# Nederst til høyre + +$ #AutoHide +# Skjul automatisk diff --git a/nls/no_NO/main.m b/nls/no_NO/main.m new file mode 100644 index 0000000..6043698 --- /dev/null +++ b/nls/no_NO/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# feil: '-rc' krever et argument\n +$ #DISPLAYRequiresArg +# feil: '-display' krever et argument\n +$ #WarnDisplaySet +# advarsel: kunne ikke sette 'DISPLAY' miljøvariabelen\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <streng>\t\tbruk skjermtilkobling.\n\ + -rc <streng>\t\t\tbrug alternativ ressursfil.\n\ + -version\t\t\tvis versjonsnummeret og avslutt.\n\ + -help\t\t\t\tvis denne hjelpeteksten og avslutt.\n\n +$ #CompileOptions +# Kompileret med:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/pl_PL/BaseDisplay.m b/nls/pl_PL/BaseDisplay.m new file mode 100644 index 0000000..43ada42 --- /dev/null +++ b/nls/pl_PL/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: b³±d X: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: z³apano sygna³ %d\n +$ #ShuttingDown +# zamykam\n +$ #Aborting +# przerywam... zrzucam core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: Nie mo¿na po³±czyæ siê z X serwerem.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: Nie mo¿na ustawiæ po³±czenia jako 'close-on-exec'\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): Usuwam z³e okno z kolejki zdarzeñ\n diff --git a/nls/pl_PL/Basemenu.m b/nls/pl_PL/Basemenu.m new file mode 100644 index 0000000..80e56ed --- /dev/null +++ b/nls/pl_PL/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Menu Blackbox diff --git a/nls/pl_PL/Configmenu.m b/nls/pl_PL/Configmenu.m new file mode 100644 index 0000000..a2995f3 --- /dev/null +++ b/nls/pl_PL/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Konfiguracja +$ #FocusModel +# Sposób aktywacji okien +$ #WindowPlacement +# Rozmieszczanie okien +$ #ImageDithering +# Rastrowanie obrazu +$ #OpaqueMove +# Wy¶wietlaj zawarto¶æ przesuwanego okna +$ #FullMax +# Pe³noekranowa maksymalizacja +$ #FocusNew +# Ustawiaj nowe okna jako aktywne +$ #FocusLast +# Zmieñ aktywne okno przy zmianie pulpitów +$ #DisableBindings +# Scroll Lock blokuje modyfikatory +$ #ClickToFocus +# Uaktywnia klikniêcie +$ #SloppyFocus +# Uaktywnia kursor +$ #AutoRaise +# Podnoszenie automatyczne +$ #ClickRaise +# Podnoszenie po klikniêciu +$ #SmartRows +# Optymalne (Wiersze) +$ #SmartCols +# Optymalne (Kolumny) +$ #Cascade +# Kaskada +$ #LeftRight +# od Lewej do Prawej +$ #RightLeft +# od Prawej do Lewej +$ #TopBottom +# z Góry na Dó³ +$ #BottomTop +# z Do³u do Góry diff --git a/nls/pl_PL/Icon.m b/nls/pl_PL/Icon.m new file mode 100644 index 0000000..deb39a6 --- /dev/null +++ b/nls/pl_PL/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikony diff --git a/nls/pl_PL/Image.m b/nls/pl_PL/Image.m new file mode 100644 index 0000000..30ad3df --- /dev/null +++ b/nls/pl_PL/Image.m @@ -0,0 +1,25 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: wyst±pi³ b³±d podczas tworzenia pixmapy\n +$ #ErrorCreatingXImage +# BImage::renderXImage: wyst±pi³ b³±d podczas tworzenia obiektu XImage\n +$ #UnsupVisual +# BImage::renderXImage: brak akceptowanego sposobu obs³ugi kolorów\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: wyst±pi³ b³±d podczas tworzenia pixmapy\n +$ #InvalidColormapSize +# BImageControl::BImageControl: z³y rozmiar mapy kolorów %d (%d/%d/%d) - \ +redukuje\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: b³±d alokacji mapy kolorów\n +$ #ColorAllocFail +# BImageControl::BImageControl: alokacja koloru %d/%d/%d nieudana\n +$ #PixmapRelease +# BImageControl::BImageControl: pixmap cache - zwalniam %d pixmap(y)\n +$ #PixmapCacheLarge +# BImageControl::renderImage: du¿a pamiêæ cache, wymuszam czyszczenie\n +$ #ColorParseError +# BImageControl::getColor: wyst±pi³ b³±d podczas t³umaczenia koloru: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: wyst±pi³ b³±d podczas alokacji koloru: '%s'\n diff --git a/nls/pl_PL/Makefile.am b/nls/pl_PL/Makefile.am new file mode 100644 index 0000000..56fd9ad --- /dev/null +++ b/nls/pl_PL/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = pl_PL +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/pl_PL/Screen.m b/nls/pl_PL/Screen.m new file mode 100644 index 0000000..1c4eb26 --- /dev/null +++ b/nls/pl_PL/Screen.m @@ -0,0 +1,53 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: wyst±pi³ b³±d podczas kontaktowania siê z X serwerem.\n\ +Inny mened¿er okien obs³uguje panel graficzny %s.\n +$ #ManagingScreen +# BScreen::BScreen: obs³ugujê ekran %d visual 0x%lx, g³êbia kolorów %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): nie mo¿na za³adowaæ czcionki '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): nie mo¿na za³adowaæ domy¶lnej czcionki.\n +$ #EmptyMenuFile +# %s: plik menu jest pusty\n +$ #xterm +# xterm +$ #Restart +# Restart +$ #Exit +# Wyj¶cie +$ #EXECError +# BScreen::parseMenuFile: [exec] b³±d, brak etykiety menu i/lub komendy\n +$ #EXITError +# BScreen::parseMenuFile: [exit] b³±d, brak etykiety menu\n +$ #STYLEError +# BScreen::parseMenuFile: [style] b³±d, brak etykiety menu i/lub nazwy pliku\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] b³±d, brak etykiety menu\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] b³±d, brak nazwy pliku\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] b³±d, '%s' nie jest zwyk³ym plikiem\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] b³±d, brak etykiety menu\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] b³±d, brak etykiety menu\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] b³±d, brak etykiety menu\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] b³±d, brak nazwy katalogu\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] b³±d, '%s' nie jest \ +katalogiem\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] b³±d, '%s' nie istnieje\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] b³±d, brak etykiety menu\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# S: %4d x W: %4d + diff --git a/nls/pl_PL/Slit.m b/nls/pl_PL/Slit.m new file mode 100644 index 0000000..22fb06d --- /dev/null +++ b/nls/pl_PL/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Kierunek +$ #SlitPlacement +# Po³o¿enie diff --git a/nls/pl_PL/Toolbar.m b/nls/pl_PL/Toolbar.m new file mode 100644 index 0000000..da4c63a --- /dev/null +++ b/nls/pl_PL/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# pm +$ #NoStrftimeTimeFormatA +# am +$ #ToolbarTitle +# Toolbar +$ #EditWkspcName +# Zmieñ nazwê aktywnego pulpitu +$ #ToolbarPlacement +# Po³o¿enie diff --git a/nls/pl_PL/Window.m b/nls/pl_PL/Window.m new file mode 100644 index 0000000..feeb1b2 --- /dev/null +++ b/nls/pl_PL/Window.m @@ -0,0 +1,16 @@ +$set 9 #Window + +$ #Creating +# BlackboxWindow::BlackboxWindow: tworzê 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: nieudane wywo³anie XGetWindowAttributres\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: brak ekranu dla g³ównego okna 0x%lx\n +$ #Unnamed +# Bez nazwy +$ #MapRequest +# BlackboxWindow::mapRequestEvent() dla 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() dla 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: zmieniam rodzica 0x%lx na 0x%lx\n diff --git a/nls/pl_PL/Windowmenu.m b/nls/pl_PL/Windowmenu.m new file mode 100644 index 0000000..a1abfd7 --- /dev/null +++ b/nls/pl_PL/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Wy¶lij na ... +$ #Shade +# Zwiñ +$ #Iconify +# Ikonizuj +$ #Maximize +# Maksymalizuj +$ #Raise +# Na wierzch +$ #Lower +# Pod spód +$ #Stick +# Przyklej +$ #KillClient +# Zabij +$ #Close +# Zamknij diff --git a/nls/pl_PL/Workspace.m b/nls/pl_PL/Workspace.m new file mode 100644 index 0000000..4c034ca --- /dev/null +++ b/nls/pl_PL/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Pulpit %d diff --git a/nls/pl_PL/Workspacemenu.m b/nls/pl_PL/Workspacemenu.m new file mode 100644 index 0000000..6800a2a --- /dev/null +++ b/nls/pl_PL/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Pulpit +$ #NewWorkspace +# Nowy pulpit +$ #RemoveLast +# Usuñ ostatni diff --git a/nls/pl_PL/blackbox.m b/nls/pl_PL/blackbox.m new file mode 100644 index 0000000..7411b1d --- /dev/null +++ b/nls/pl_PL/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: nie znaleziono ekranów, którymi mo¿na by by³o zarz±dzaæ.\n +$ #MapRequest +# Blackbox::process_event: MapRequest dla 0x%lx\n diff --git a/nls/pl_PL/bsetroot.m b/nls/pl_PL/bsetroot.m new file mode 100644 index 0000000..bea6e5e --- /dev/null +++ b/nls/pl_PL/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: b³±d: nale¿y u¿yæ jednej z opcji: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> po³±cz z podanym panelem graficznym\n\ + -mod <x> <y> wspó³czynniki siatki typu modula\n\ + -foreground, -fg <color> kolor siatki\n\ + -background, -bg <color> kolor t³a siatki\n\n\ + -gradient <texture> tekstura gradientowa\n\ + -from <color> pocz±tkowy kolor gradientu\n\ + -to <color> koñcowy kolor gradientu\n\n\ + -solid <color> jednolite wype³nienie podanym kolorem\n\n\ + -help wy¶wietla ten komunikat\n + diff --git a/nls/pl_PL/common.m b/nls/pl_PL/common.m new file mode 100644 index 0000000..b9252e4 --- /dev/null +++ b/nls/pl_PL/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Tak +$ #No +# Nie + +$ #DirectionTitle +# Kierunek +$ #DirectionHoriz +# Poziomy +$ #DirectionVert +# Pionowy + +$ #AlwaysOnTop +# Zawsze na wierzchu + +$ #PlacementTitle +# Po³o¿enie +$ #PlacementTopLeft +# Górne Lewe +$ #PlacementCenterLeft +# ¦rodkowe Lewe +$ #PlacementBottomLeft +# Dolne Lewe +$ #PlacementTopCenter +# Górne Centralne +$ #PlacementBottomCenter +# Dolne Centralne +$ #PlacementTopRight +# Górne Prawe +$ #PlacementCenterRight +# ¦rodkowe Prawe +$ #PlacementBottomRight +# Dolne Prawe + +$ #AutoHide +# Automatyczne ukrywanie diff --git a/nls/pl_PL/main.m b/nls/pl_PL/main.m new file mode 100644 index 0000000..512737d --- /dev/null +++ b/nls/pl_PL/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# b³±d: opcja '-rc' wymaga podania argumentu\n +$ #DISPLAYRequiresArg +# b³±d: opcja '-display' wymaga podania argumentu\n +$ #WarnDisplaySet +# ostrze¿enie: nie mo¿na ustawiæ zmiennej ¶rodowiskowej 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tpo³±cz z podanym panelem graficznym.\n\ + -rc <string>\t\t\tu¿yj innego pliku konfiguracyjnego.\n\ + -version\t\t\twy¶wietl wersjê i zakoñcz dzia³anie programu.\n\ + -help\t\t\t\twy¶wietl ten komunikat.\n\n +$ #CompileOptions +# Opcje u¿yte podczas kompilacji:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/pt_BR/BaseDisplay.m b/nls/pt_BR/BaseDisplay.m new file mode 100644 index 0000000..e5268a3 --- /dev/null +++ b/nls/pt_BR/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X erro: %s(%d) opcodes %d/%d\n recurso 0x%lx\n +$ #SignalCaught +# %s: sinal recebido %d\n +$ #ShuttingDown +# finalizando\n +$ #Aborting +# abortando... descarregando memória\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: conecção ao servidor X falhou.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: impossível exibir sinal de conexão como fechar-em-execução\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): removendo janela inválida da lista de eventos\n diff --git a/nls/pt_BR/Basemenu.m b/nls/pt_BR/Basemenu.m new file mode 100644 index 0000000..070d663 --- /dev/null +++ b/nls/pt_BR/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Menu do Blackbox diff --git a/nls/pt_BR/Configmenu.m b/nls/pt_BR/Configmenu.m new file mode 100644 index 0000000..89010cb --- /dev/null +++ b/nls/pt_BR/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Configurações +$ #FocusModel +# Modelo de Foco +$ #WindowPlacement +# Posicionamento das Janelas +$ #ImageDithering +# Simulação de Cores em Imagens +$ #OpaqueMove +# Movimento Opaco de Janelas +$ #FullMax +# Maximização Total +$ #FocusNew +# Foco em Novas Janelas +$ #FocusLast +# Foco na Ultima Janela Da Area de Trabalho +$ #DisableBindings +# Disabilitar Ações com Scroll Lock +$ #ClickToFocus +# Clicar para Focar +$ #SloppyFocus +# Apontar para Focar +$ #AutoRaise +# Auto-sobrepor +$ #ClickRaise +# Click Raise +$ #SmartRows +# Organizar Rapido (Linha) +$ #SmartCols +# Organizar Rapido (Coluna) +$ #Cascade +# Organizar em Cascata +$ #LeftRight +# Esquerda para Direita +$ #RightLeft +# Direita para Esquerda +$ #TopBottom +# Cima para Baixo +$ #BottomTop +# Baixo para Cima diff --git a/nls/pt_BR/Icon.m b/nls/pt_BR/Icon.m new file mode 100644 index 0000000..2e35097 --- /dev/null +++ b/nls/pt_BR/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Icones diff --git a/nls/pt_BR/Image.m b/nls/pt_BR/Image.m new file mode 100644 index 0000000..e44b8f5 --- /dev/null +++ b/nls/pt_BR/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: erro criando pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: erro criando XImage\n +$ #UnsupVisual +# BImage::renderXImage: visual não suportado\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: erro criando pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: tamanho invalido de mapa de cores %d (%d/%d/%d) - reduzindo\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: erro determinando mapa de cores\n +$ #ColorAllocFail +# BImageControl::BImageControl: falha em alocar cor %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: cache de pixmap - liberando pixmaps %d\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache está grande, forçando desalocação\n +$ #ColorParseError +# BImageControl::getColor: erro ao analizar cor: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: erro ao alocar cor: '%s'\n diff --git a/nls/pt_BR/Makefile.am b/nls/pt_BR/Makefile.am new file mode 100644 index 0000000..65cff1b --- /dev/null +++ b/nls/pt_BR/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = pt_BR +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/pt_BR/Screen.m b/nls/pt_BR/Screen.m new file mode 100644 index 0000000..e71a51a --- /dev/null +++ b/nls/pt_BR/Screen.m @@ -0,0 +1,54 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: um erro occorreu enquanto consultava o servidor X.\n \ +existe outro window menager rodando no display. %s.\n +$ #ManagingScreen +# BScreen::BScreen: managing screen %d using visual 0x%lx, depth %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): impossivel carregar fonte '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): impossivel carregar fonte padrão.\n +$ #EmptyMenuFile +# %s: arquivo de menu vazio\n +$ #xterm +# xterm +$ #Restart +# Reiniciar +$ #Exit +# Sair +$ #EXECError +# BScreen::parseMenuFile: [exec] erro, sem rótulo de menu e/ou comando definido\n +$ #EXITError +# BScreen::parseMenuFile: [exit] erro, sem rótulo de menu definido\n +$ #STYLEError +# BScreen::parseMenuFile: [style] erro, sem rótulo de menu e/ou nome do arquivo \ +definido\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] erro, sem rótulo de menu definido\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] erro, nome de arquivo não definido\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] error, '%s' não é um arquivo regular\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] erro, sem rótulo de menu definido\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] erro, sem rótulo de menu definido\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] erro, sem rótulo de menu definido\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] erro, sem diretorio difinido\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] erro, '%s' não é um \ +diretorio\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] erro, '%s' não existe\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] erro, sem rótulo de menu definido\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/pt_BR/Slit.m b/nls/pt_BR/Slit.m new file mode 100644 index 0000000..e5806d0 --- /dev/null +++ b/nls/pt_BR/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Direção do Slit +$ #SlitPlacement +# Posicionamento do Slit diff --git a/nls/pt_BR/Toolbar.m b/nls/pt_BR/Toolbar.m new file mode 100644 index 0000000..a7a91ed --- /dev/null +++ b/nls/pt_BR/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Barra de Ferramenta +$ #EditWkspcName +# Editar o nome da area de trabalho corrente +$ #ToolbarPlacement +# Posicionamento da Barra de Ferramentas diff --git a/nls/pt_BR/Window.m b/nls/pt_BR/Window.m new file mode 100644 index 0000000..291b695 --- /dev/null +++ b/nls/pt_BR/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: criando 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres falhou\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: impossivel encontrar tela para janela principal 0x%lx\n +$ #Unnamed +# Sem Nome +$ #MapRequest +# BlackboxWindow::mapRequestEvent() para 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() para 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx para 0x%lx\n diff --git a/nls/pt_BR/Windowmenu.m b/nls/pt_BR/Windowmenu.m new file mode 100644 index 0000000..4251809 --- /dev/null +++ b/nls/pt_BR/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Enviar Para ... +$ #Shade +# Ocultar +$ #Iconify +# Minimizar +$ #Maximize +# Maximizar +$ #Raise +# Trazer pra Frente +$ #Lower +# Levar pra Traz +$ #Stick +# Fixar +$ #KillClient +# Matar Cliente +$ #Close +# Fechar diff --git a/nls/pt_BR/Workspace.m b/nls/pt_BR/Workspace.m new file mode 100644 index 0000000..e9516f1 --- /dev/null +++ b/nls/pt_BR/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Area de Trabalho %d diff --git a/nls/pt_BR/Workspacemenu.m b/nls/pt_BR/Workspacemenu.m new file mode 100644 index 0000000..64ab9d0 --- /dev/null +++ b/nls/pt_BR/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Areas de Trabalho +$ #NewWorkspace +# Nova Area de Trabalho +$ #RemoveLast +# Remover Ultima diff --git a/nls/pt_BR/blackbox.m b/nls/pt_BR/blackbox.m new file mode 100644 index 0000000..dac6ce8 --- /dev/null +++ b/nls/pt_BR/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: não encontradas telas gerenciaveis, abortando..\n +$ #MapRequest +# Blackbox::process_event: MapRequest para 0x%lx\n diff --git a/nls/pt_BR/bsetroot.m b/nls/pt_BR/bsetroot.m new file mode 100644 index 0000000..f975135 --- /dev/null +++ b/nls/pt_BR/bsetroot.m @@ -0,0 +1,16 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: erro: necessario especificar uma das opções: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> conexão com video\n\ + -mod <x> <y> modula padrão\n\ + -foreground, -fg <color> modula cor do primeiro plano\n\ + -background, -bg <color> modula cor do segundo plano\n\ + -gradient <texture> textura gradiente\n\ + -from <color> cor de inicio do gradiente\n\ + -to <color> com do fim do gradiente\n\ + -solid <color> cor solida\n\ + -help mostra este texto de ajuda e sai\n\ diff --git a/nls/pt_BR/common.m b/nls/pt_BR/common.m new file mode 100644 index 0000000..4ebee78 --- /dev/null +++ b/nls/pt_BR/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Sim +$ #No +# Não + +$ #DirectionTitle +# Direção +$ #DirectionHoriz +# Horizontal +$ #DirectionVert +# Vertical + +$ #AlwaysOnTop +# Sempre vísivel + +$ #PlacementTitle +# Posicionamento +$ #PlacementTopLeft +# No Alto a Esquerda +$ #PlacementCenterLeft +# No Centro a Esquerda +$ #PlacementBottomLeft +# Em Baixo a Esquerda +$ #PlacementTopCenter +# No Alto ao Centro +$ #PlacementBottomCenter +# Em Baixo ao Centro +$ #PlacementTopRight +# No Alto a Direita +$ #PlacementCenterRight +# No Meio a Direita +$ #PlacementBottomRight +# Em Baixo a Direita + +$ #AutoHide +# Auto-ocultar
\ No newline at end of file diff --git a/nls/pt_BR/main.m b/nls/pt_BR/main.m new file mode 100644 index 0000000..52ebeea --- /dev/null +++ b/nls/pt_BR/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# erro: '-rc' requer um argumento\n +$ #DISPLAYRequiresArg +# erro: '-display' requer um argumento\n +$ #WarnDisplaySet +# aviso: não foi possivel setar a variavel de ambiente 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tusar conexão com o display.\n\ + -rc <string>\t\t\tusar arquivo alternativo de recursos.\n\ + -version\t\t\texibe a versao e sair.\n\ + -help\t\t\t\texibe este texto de ajuda e sair.\n\n +$ #CompileOptions +# Opções em tempo de compilação:\n\ + Depuração:\t\t\t%s\n\ + Forma:\t\t\t%s\n\ + Simulação Ordenada de Cores em 8bpp:\t%s\n\n diff --git a/nls/ro_RO/BaseDisplay.m b/nls/ro_RO/BaseDisplay.m new file mode 100644 index 0000000..094ee4a --- /dev/null +++ b/nls/ro_RO/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: eroare de X: %s(%d) opcode %d/%d\n resursa 0x%lx\n +$ #SignalCaught +# %s: am primit semnalul %d\n +$ #ShuttingDown +# terminare normala\n +$ #Aborting +# terminare fortata... am scris fisierul core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: conexiunea la serverul X a esuat.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: nu am putut pune marcajul close-on-exec pe conexiunea la ecran\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): sterg fereastra gresita din coada de evenimente\n diff --git a/nls/ro_RO/Basemenu.m b/nls/ro_RO/Basemenu.m new file mode 100644 index 0000000..4a457c1 --- /dev/null +++ b/nls/ro_RO/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Meniu principal diff --git a/nls/ro_RO/Configmenu.m b/nls/ro_RO/Configmenu.m new file mode 100644 index 0000000..58172a3 --- /dev/null +++ b/nls/ro_RO/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Configuratie +$ #FocusModel +# Tehnica de focalizare +$ #WindowPlacement +# Asezarea ferestrelor +$ #ImageDithering +# Intretesere imagini +$ #OpaqueMove +# Ferestrele se misca opac +$ #FullMax +# Marirea maxima ocupa tot ecranul +$ #FocusNew +# Focalizare ferestre noi +$ #FocusLast +# Focalizare la schimbarea zonei de lucru +$ #DisableBindings +# Scroll Lock dezactiveaza combinatiile de taste +$ #ClickToFocus +# Focalizare prin click +$ #SloppyFocus +# Focalizare prin cursor +$ #AutoRaise +# Ridicare automata +$ #ClickRaise +# Ridicare prin click +$ #SmartRows +# Aranjare automata (pe rinduri) +$ #SmartCols +# Aranjare automata (pe coloane) +$ #Cascade +# Aranjare in cascada +$ #LeftRight +# De la stanga la dreapta +$ #RightLeft +# De la dreapta la stanga +$ #TopBottom +# De sus in jos +$ #BottomTop +# De jos in sus diff --git a/nls/ro_RO/Icon.m b/nls/ro_RO/Icon.m new file mode 100644 index 0000000..c0b8208 --- /dev/null +++ b/nls/ro_RO/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Pictograme diff --git a/nls/ro_RO/Image.m b/nls/ro_RO/Image.m new file mode 100644 index 0000000..065cae9 --- /dev/null +++ b/nls/ro_RO/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: eroare de creare imagine\n +$ #ErrorCreatingXImage +# BImage::renderXImage: eroare de creare XImage\n +$ #UnsupVisual +# BImage::renderXImage: mod vizual incompatibil\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: eroare de creare imagine\n +$ #InvalidColormapSize +# BImageControl::BImageControl: harta culorilor are marimea incorecta %d (%d/%d/%d) - reducere automata\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: eroare de alocare a hartii culorilor\n +$ #ColorAllocFail +# BImageControl::BImageControl: nu am putut aloca culoarea %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: memorie intermediara imagini - eliberare spatiu pentru %d imagini\n +$ #PixmapCacheLarge +# BImageControl::renderImage: memoria intermediara e prea mare, reducere fortata\n +$ #ColorParseError +# BImageControl::getColor: eroare de procesare a culorii: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: eroare de alocare a culorii: '%s'\n diff --git a/nls/ro_RO/Makefile.am b/nls/ro_RO/Makefile.am new file mode 100644 index 0000000..6db9751 --- /dev/null +++ b/nls/ro_RO/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = ro_RO +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/ro_RO/Screen.m b/nls/ro_RO/Screen.m new file mode 100644 index 0000000..52b0748 --- /dev/null +++ b/nls/ro_RO/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: a aparut o eroare in cursul interogarii serverului X.\n \ +Exista deja un manager de ferestre pe ecranul %s.\n +$ #ManagingScreen +# BScreen::BScreen: administrez ecranul %d folosind modul vizual 0x%lx, adincime %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): nu am putut incarca fontul '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): nu am putut incarca fontul implicit.\n +$ #EmptyMenuFile +# %s: fisierul de configurare a meniului nu contine nimic\n +$ #xterm +# xterm +$ #Restart +# Repornire +$ #Exit +# Iesire +$ #EXECError +# BScreen::parseMenuFile: [exec] eroare, nu s-a completat eticheta si/sau comanda asociata\n +$ #EXITError +# BScreen::parseMenuFile: [exit] eroare, nu s-a completat eticheta\n +$ #STYLEError +# BScreen::parseMenuFile: [style] eroare, nu s-a completat eticheta si/sau comanda asociata\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] eroare, nu s-a completat eticheta\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] eroare, nu s-a precizat nici un nume de fisier\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] eroare, '%s' nu este un fisier obisnuit\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] eroare, nu s-a completat eticheta\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] eroare, nu s-a completat eticheta\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] eroare, nu s-a completat eticheta\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] eroare, nu s-a precizat nici un director\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' nu este un director\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' nu exista\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] eroare, nu s-a completat eticheta\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/ro_RO/Slit.m b/nls/ro_RO/Slit.m new file mode 100644 index 0000000..30f7d95 --- /dev/null +++ b/nls/ro_RO/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Fanta de incarcare +$ #SlitDirection +# Orientarea fantei +$ #SlitPlacement +# Pozitia fantei diff --git a/nls/ro_RO/Toolbar.m b/nls/ro_RO/Toolbar.m new file mode 100644 index 0000000..8645335 --- /dev/null +++ b/nls/ro_RO/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Bara utilitara +$ #EditWkspcName +# Schimba numele zonei de lucru curente +$ #ToolbarPlacement +# Pozitia barei utilitare diff --git a/nls/ro_RO/Window.m b/nls/ro_RO/Window.m new file mode 100644 index 0000000..b56c50b --- /dev/null +++ b/nls/ro_RO/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creare 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres a esuat\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: nu gasesc un ecran pentru fereastra de baza 0x%lx\n +$ #Unnamed +# Fara nume +$ #MapRequest +# BlackboxWindow::mapRequestEvent() pentru 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() pentru 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reasociere 0x%lx la 0x%lx\n diff --git a/nls/ro_RO/Windowmenu.m b/nls/ro_RO/Windowmenu.m new file mode 100644 index 0000000..ce70787 --- /dev/null +++ b/nls/ro_RO/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Trimite in ... +$ #Shade +# Micsorare +$ #Iconify +# Ascundere +$ #Maximize +# Marire maxima +$ #Raise +# Ridicare +$ #Lower +# Coborare +$ #Stick +# Persistenta +$ #KillClient +# Terminare fortata +$ #Close +# Inchidere diff --git a/nls/ro_RO/Workspace.m b/nls/ro_RO/Workspace.m new file mode 100644 index 0000000..be5249c --- /dev/null +++ b/nls/ro_RO/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Zona %d diff --git a/nls/ro_RO/Workspacemenu.m b/nls/ro_RO/Workspacemenu.m new file mode 100644 index 0000000..bed9b3c --- /dev/null +++ b/nls/ro_RO/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Zone de lucru +$ #NewWorkspace +# Zona noua de lucru +$ #RemoveLast +# Sterge ultima zona diff --git a/nls/ro_RO/blackbox.m b/nls/ro_RO/blackbox.m new file mode 100644 index 0000000..e433a1d --- /dev/null +++ b/nls/ro_RO/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: nu este disponibil nici un ecran, rularea se intrerupe\n +$ #MapRequest +# Blackbox::process_event: MapRequest pentru 0x%lx\n diff --git a/nls/ro_RO/bsetroot.m b/nls/ro_RO/bsetroot.m new file mode 100644 index 0000000..0fb723e --- /dev/null +++ b/nls/ro_RO/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: eroare: trebuie specificata cel putin una dintre optiunile:\n\ + -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <sir> conexiunea la ecran\n\ + -mod <x> <y> model\n\ + -foreground, -fg <color> culoare plan apropiat pentru model\n\ + -background, -bg <color> culoare plan indepartat pentru model\n\n\ + -gradient <texture> degrade\n\ + -from <color> culoare de inceput pentru degrade\n\ + -to <color> culoare de sfirsit pentru degrade\n\n\ + -solid <color> culoare uniforma\n\n\ + -help acest mesaj\n diff --git a/nls/ro_RO/common.m b/nls/ro_RO/common.m new file mode 100644 index 0000000..bccdf80 --- /dev/null +++ b/nls/ro_RO/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Da +$ #No +# Nu + +$ #DirectionTitle +# Directie +$ #DirectionHoriz +# Orizontal +$ #DirectionVert +# Vertical + +$ #AlwaysOnTop +# Intotdeauna deasupra + +$ #PlacementTitle +# Pozitie +$ #PlacementTopLeft +# Stanga sus +$ #PlacementCenterLeft +# Stanga centru +$ #PlacementBottomLeft +# Stanga jos +$ #PlacementTopCenter +# Mijloc sus +$ #PlacementBottomCenter +# Mijloc jos +$ #PlacementTopRight +# Dreapta sus +$ #PlacementCenterRight +# Dreapta centru +$ #PlacementBottomRight +# Dreapta jos + +$ #AutoHide +# Ascundere automata diff --git a/nls/ro_RO/main.m b/nls/ro_RO/main.m new file mode 100644 index 0000000..b5a40e5 --- /dev/null +++ b/nls/ro_RO/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# eroare: '-rc' necesita inca un parametru\n +$ #DISPLAYRequiresArg +# eroare: '-display' necesita inca un parametru\n +$ #WarnDisplaySet +# atentionare: nu am putut crea variabila de mediu 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <sir>\t\tconexiunea la ecran.\n\ + -rc <sir>\t\t\tfisier de configurare.\n\ + -version\t\t\tafiseaza versiunea.\n\ + -help\t\t\t\tafiseaza acest mesaj.\n\n +$ #CompileOptions +# Optiuni stabilite la compilare:\n\ + Depanare\t\t\t%s\n\ + Forma:\t\t\t%s\n\ + Intretesere ordonata pentru 8bpp:\t%s\n\n diff --git a/nls/ru_RU/BaseDisplay.m b/nls/ru_RU/BaseDisplay.m new file mode 100644 index 0000000..e673f0d --- /dev/null +++ b/nls/ru_RU/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: ÏÛÉÂËÁ X ÓÅÒ×ÅÒÁ: %s(%d) ÚÎÁÞÅÎÉÑ %d/%d\n ÒÅÓÕÒÓ 0x%lx\n +$ #SignalCaught +# %s: ÐÏÌÕÞÅÎ ÓÉÇÎÁÌ %d \n +$ #ShuttingDown +# shutting down\n +$ #Aborting +# ïÔÍÅÎÁ... ÓÏÚÄÁÅÔÓÑ ÄÁÍÐ core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: ÏÛÉÂËÁ ÓÏÅÄÉÎÅÎÉÑ Ó X ÓÅÒ×ÅÒÏÍ.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÐÏÍÅÔÉÔØ ÁËÔÉ×ÎÙÊ ÄÉÓÐÌÅÊ ËÁË "ÚÁËÒÙÔÙÊ-ÎÁ-ÉÓÐÏÌÎÅÎÉÅ"\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): ÐÌÏÈÏÅ ÏËÎÏ ÕÄÁÌÑÅÔÓÑ ÉÚ ÏÞÅÒÅÄÉ ÓÏÂÙÔÉÊ\n diff --git a/nls/ru_RU/Basemenu.m b/nls/ru_RU/Basemenu.m new file mode 100644 index 0000000..d555ac3 --- /dev/null +++ b/nls/ru_RU/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# íÅÎÀ BlackBox diff --git a/nls/ru_RU/Configmenu.m b/nls/ru_RU/Configmenu.m new file mode 100644 index 0000000..dcf754f --- /dev/null +++ b/nls/ru_RU/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# ëÏÎÆÉÇÕÒÁÃÉÑ +$ #FocusModel +# íÏÄÅÌØ ÆÏËÕÓÉÒÏ×ËÉ +$ #WindowPlacement +# òÁÓÐÏÌÏÖÅÎÉÅ ÏËÏÎ +$ #ImageDithering +# óÇÌÁÖÉ×ÁÔØ ÉÚÏÂÒÁÖÅÎÉÑ +$ #OpaqueMove +# ðÏËÁÚÙ×ÁÔØ ÓÏÄÅÒÖÉÍÏÅ ÏËÏÎ ÐÒÉ ÐÅÒÅÍÅÝÅÎÉÉ +$ #FullMax +# ðÏÌÎÁÑ ÍÁËÓÉÍÉÚÁÃÉÑ +$ #FocusNew +# ðÅÒÅÍÅÝÁÔØ ÆÏËÕÓ ÎÁ ÎÏ×ÙÅ ÏËÎÁ +$ #FocusLast +# ðÅÒÅÍÅÝÁÔØ ÆÏËÕÓ ÐÒÉ ÓÍÅÎÅ ÒÁÂÏÞÅÇÏ ÓÔÏÌÁ +$ #DisableBindings +# Scroll Lock ÏÔËÌÀÞÁÅÔ ÓÏÞÅÔÁÎÉÑ ËÌÁ×ÉÛ +$ #ClickToFocus +# æÏËÕÓ ÐÏ ÝÅÌÞËÕ +$ #SloppyFocus +# æÏËÕÓ ÐÏ ÐÅÒÅÍÅÝÅÎÉÀ +$ #AutoRaise +# á×ÔÏ×ÓÐÌÙÔÉÅ +$ #ClickRaise +# ÷ÓÐÌÙÔÉÅ ÐÏ ÝÅÌÞËÕ +$ #SmartRows +# "õÍÎÏÅ" ÒÁÓÐÏÌÏÖÅÎÉÅ (ÐÏ ÇÏÒÉÚÏÎÔÁÌÉ) +$ #SmartCols +# "õÍÎÏÅ" ÒÁÓÐÏÌÏÖÅÎÉÅ (ÐÏ ×ÅÒÔÉËÁÌÉ) +$ #Cascade +# ëÁÓËÁÄÏÍ +$ #LeftRight +# óÌÅ×Á ÎÁÐÒÁ×Ï +$ #RightLeft +# óÐÒÁ×Á ÎÁÌÅ×Ï +$ #TopBottom +# ó×ÅÒÈÕ ×ÎÉÚ +$ #BottomTop +# óÎÉÚÕ ××ÅÒÈ diff --git a/nls/ru_RU/Icon.m b/nls/ru_RU/Icon.m new file mode 100644 index 0000000..9a71992 --- /dev/null +++ b/nls/ru_RU/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# ó×ÅÒÎÕÔÙÅ ÏËÎÁ diff --git a/nls/ru_RU/Image.m b/nls/ru_RU/Image.m new file mode 100644 index 0000000..9741fa5 --- /dev/null +++ b/nls/ru_RU/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: ÏÛÉÂËÁ ÓÏÚÄÁÎÉÑ pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: ÏÛÉÂËÁ ÓÏÚÄÁÎÉÑ XImage\n +$ #UnsupVisual +# BImage::renderXImage: ÎÅÐÏÄÄÅÒÖÉ×ÁÅÍÙÊ ÔÉÐ ×ÉÚÕÁÌÉÚÁÃÉÉ\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: ÏÛÉÂËÁ ÓÏÚÄÁÎÉÑ pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ÎÅ×ÅÒÎÙÊ ÒÁÚÍÅÒ ÔÁÂÌÉÃÙ Ã×ÅÔÏ× %d (%d/%d/%d) - ÕÍÅÎØÛÁÅÔÓÑ\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: ÏÛÉÂËÁ ÒÁÚÍÅÝÅÎÉÑ ÔÁÂÌÉÃÙ Ã×ÅÔÏ×\n +$ #ColorAllocFail +# BImageControl::BImageControl: ÎÅ×ÏÚÍÏÖÎÏ ÒÁÚÍÅÓÔÉÔØ Ã×ÅÔ %d/%d/%d × ÐÁÍÑÔÉ\n +$ #PixmapRelease +# BImageControl::~BImageControl: ËÜÛ ÔÏÞÅÞÎÙÈ ÉÚÏÂÒÁÖÅÎÉÊ - ÏÓ×ÏÂÏÖÄÁÅÔÓÑ %d ÂÌÏËÏ×\n +$ #PixmapCacheLarge +# BImageControl::renderImage: ÐÅÒÅÐÏÌÎÅÎÉÅ ËÜÛÁ, ÐÒÏÉÚ×ÏÄÉÔÓÑ ÏÞÉÓÔËÁ\n +$ #ColorParseError +# BImageControl::getColor: ÏÛÉÂËÁ ÒÁÚÂÏÒÁ ÓÔÒÏËÉ, ÏÐÉÓÙ×ÁÀÝÅÊ Ã×ÅÔ: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: ÏÛÉÂËÁ ÒÁÚÍÅÝÅÎÉÑ Ã×ÅÔÁ × ÐÁÍÑÔÉ: '%s'\n diff --git a/nls/ru_RU/Makefile.am b/nls/ru_RU/Makefile.am new file mode 100644 index 0000000..349fa9f --- /dev/null +++ b/nls/ru_RU/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = ru_RU +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/ru_RU/Screen.m b/nls/ru_RU/Screen.m new file mode 100644 index 0000000..fe16476 --- /dev/null +++ b/nls/ru_RU/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ ÐÒÉ ÏÂÒÁÝÅÎÉÉ Ë X ÓÅÒ×ÅÒÕ.\n \ +ÄÒÕÇÏÊ ÍÅÎÅÄÖÅÒ ÏËÏÎ ÕÖÅ ÚÁÐÕÝÅÎ ÎÁ ÄÉÓÐÌÅÅ %s.\n +$ #ManagingScreen +# BScreen::BScreen: ÏÂÓÌÕÖÉ×ÁÅÔÓÑ ÜËÒÁÎ %d, ÉÓÐÏÌØÚÕÅÍÙÊ ÔÉÐ ×ÉÚÕÁÌÉÚÁÃÉÉ 0x%lx, ÇÌÕÂÉÎÁ Ã×ÅÔÁ %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÚÁÇÒÕÚÉÔØ ÛÒÉÆÔ '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÚÁÇÒÕÚÉÔØ ÛÒÉÆÔ ÐÏ ÕÍÏÌÞÁÎÉÀ.\n +$ #EmptyMenuFile +# %s: ÐÕÓÔÏÊ ÆÁÊÌ ÍÅÎÀ\n +$ #xterm +# XTerm +$ #Restart +# ðÅÒÅÚÁÐÕÓË +$ #Exit +# ÷ÙÈÏÄ +$ #EXECError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [exec], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ É/ÉÌÉ ËÏÍÍÁÎÄÁ\n +$ #EXITError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [exit], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n +$ #STYLEError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [style], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ É/ÉÌÉ ÉÍÑ ÆÁÊÌÁ\n +$ #CONFIGError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [config], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n +$ #INCLUDEError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [include], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÉÍÑ ÆÁÊÌÁ\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: ÏÛÉÂËÁ [include], '%s' ÎÅ ÏÂÙÞÎÙÊ ÆÁÊÌ\n +$ #SUBMENUError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [submenu], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n +$ #RESTARTError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [restart], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n +$ #RECONFIGError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [reconfig], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n +$ #STYLESDIRError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [stylesdir/stylesmenu], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÉÍÑ ÄÉÒÅËÔÏÒÉÉ\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: ÏÛÉÂËÁ [stylesdir/stylesmenu], '%s' ÎÅ ÄÉÒÅËÔÏÒÉÑ\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: ÏÛÉÂËÁ [stylesdir/stylesmenu], '%s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ\n +$ #WORKSPACESError +# BScreen::parseMenuFile: ÏÛÉÂËÁ [workspaces], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/ru_RU/Slit.m b/nls/ru_RU/Slit.m new file mode 100644 index 0000000..c11e3ec --- /dev/null +++ b/nls/ru_RU/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# äÏËÅÒ +$ #SlitDirection +# îÁÐÒÁ×ÌÅÎÉÅ ÄÏËÅÒÁ +$ #SlitPlacement +# íÅÓÔÏÐÏÌÏÖÅÎÉÅ ÄÏËÅÒÁ diff --git a/nls/ru_RU/Toolbar.m b/nls/ru_RU/Toolbar.m new file mode 100644 index 0000000..2f68b1e --- /dev/null +++ b/nls/ru_RU/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# ÐÐ +$ #NoStrftimeTimeFormatA +# ÄÐ +$ #ToolbarTitle +# ôÕÌÂÁÒ +$ #EditWkspcName +# ðÅÒÅÉÍÅÎÏ×ÁÔØ ÔÅËÕÝÉÊ ÒÁÂÏÞÉÊ ÓÔÏÌ +$ #ToolbarPlacement +# íÅÓÔÏÐÏÌÏÖÅÎÉÅ ÔÕÌÂÁÒÁ diff --git a/nls/ru_RU/Window.m b/nls/ru_RU/Window.m new file mode 100644 index 0000000..0265785 --- /dev/null +++ b/nls/ru_RU/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: ÓÏÚÄÁÅÔÓÑ 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: ÏÛÉÂËÁ ÐÒÏÃÅÓÓÁ XGetWindowAttributres\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: ÎÅ ÎÁÊÄÅÎ ÜËÒÁÎ ÄÌÑ ËÏÒÎÅ×ÏÇÏ ÏËÎÁ 0x%lx\n +$ #Unnamed +# âÅÚ ÉÍÅÎÉ +$ #MapRequest +# BlackboxWindow::mapRequestEvent() ÄÌÑ 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() ÄÌÑ 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: ÓÍÅÎÁ ÒÏÄÉÔÅÌÑ ÄÌÑ 0x%lx ÎÁ 0x%lx\n diff --git a/nls/ru_RU/Windowmenu.m b/nls/ru_RU/Windowmenu.m new file mode 100644 index 0000000..0883c25 --- /dev/null +++ b/nls/ru_RU/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# ïÔÐÒÁ×ÉÔØ ÎÁ ... +$ #Shade +# ó×ÅÒÎÕÔØ × ÚÁÇÏÌÏ×ÏË +$ #Iconify +# ó×ÅÒÎÕÔØ × ÉËÏÎËÕ +$ #Maximize +# íÁËÓÉÍÉÚÉÒÏ×ÁÔØ +$ #Raise +# ðÏÄÎÑÔØ ÎÁ×ÅÒÈ +$ #Lower +# ïÐÕÓÔÉÔØ ×ÎÉÚ +$ #Stick +# ðÒÉËÌÅÉÔØ +$ #KillClient +# õÂÉÔØ ËÌÉÅÎÔÓËÏÅ ÐÒÉÌÏÖÅÎÉÅ +$ #Close +# úÁËÒÙÔØ diff --git a/nls/ru_RU/Workspace.m b/nls/ru_RU/Workspace.m new file mode 100644 index 0000000..47cfcc5 --- /dev/null +++ b/nls/ru_RU/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# òÁÂÏÞÉÊ ÓÔÏÌ %d diff --git a/nls/ru_RU/Workspacemenu.m b/nls/ru_RU/Workspacemenu.m new file mode 100644 index 0000000..1b9b777 --- /dev/null +++ b/nls/ru_RU/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# òÁÂÏÞÉÅ ÓÔÏÌÙ +$ #NewWorkspace +# îÏ×ÙÊ ÒÁÂÏÞÉÊ ÓÔÏÌ +$ #RemoveLast +# õÄÁÌÉÔØ ÐÏÓÌÅÄÎÉÊ diff --git a/nls/ru_RU/blackbox.m b/nls/ru_RU/blackbox.m new file mode 100644 index 0000000..cfaa8fd --- /dev/null +++ b/nls/ru_RU/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ÎÅ ÎÁÊÄÅÎÏ ÜËÒÁÎÏ× ÄÌÑ ÏÂÓÌÕÖÉ×ÁÎÉÑ, ÏÔÍÅÎÁ...\n +$ #MapRequest +# Blackbox::process_event: MapRequest ÄÌÑ 0x%lx\n diff --git a/nls/ru_RU/bsetroot.m b/nls/ru_RU/bsetroot.m new file mode 100644 index 0000000..fc34a22 --- /dev/null +++ b/nls/ru_RU/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: ÏÛÉÂËÁ: ÎÅÏÂÈÏÄÉÍÏ ÚÁÄÁÔØ ÏÄÉÎ ÉÚ ÓÌÅÄÕÀÝÉÈ ËÌÀÞÅÊ: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> ÉÓÐÏÌØÚÏ×ÁÔØ ÚÁÄÁÎÎÙÊ ÄÉÓÐÌÅÊ\n\ + -mod <x> <y> ÍÁËÅÔ ÓÅÔËÉ\n\ + -foreground, -fg <color> Ã×ÅÔ ÓÅÔËÉ\n\ + -background, -bg <color> Ã×ÅÔ ÆÏÎÁ\n\n\ + -gradient <texture> ÇÒÁÄÉÅÎÔ\n\ + -from <color> ÎÁÞÁÌØÎÙÊ Ã×ÅÔ ÇÒÁÄÉÅÎÔÁ\n\ + -to <color> ËÏÎÅÞÎÙÊ Ã×ÅÔ ÇÒÁÄÉÅÎÔÁ\n\n\ + -solid <color> ÓÐÌÏÛÎÏÊ Ã×ÅÔ\n\n\ + -help ×Ù×ÅÓÔÉ ÜÔÕ ÐÏÄÓËÁÚËÕ É ×ÙÊÔÉ\n + diff --git a/nls/ru_RU/common.m b/nls/ru_RU/common.m new file mode 100644 index 0000000..8f603ba --- /dev/null +++ b/nls/ru_RU/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# äÁ +$ #No +# îÅÔ + +$ #DirectionTitle +# îÁÐÒÁ×ÌÅÎÉÅ +$ #DirectionHoriz +# ðÏ ÇÏÒÉÚÏÎÔÁÌÉ +$ #DirectionVert +# ðÏ ×ÅÒÔÉËÁÌÉ + +$ #AlwaysOnTop +# ÷ÓÅÇÄÁ ÎÁ×ÅÒÈÕ + +$ #PlacementTitle +# íÅÓÔÏÐÏÌÏÖÅÎÉÅ +$ #PlacementTopLeft +# óÌÅ×Á ××ÅÒÈÕ +$ #PlacementCenterLeft +# óÌÅ×Á ÐÏ ÃÅÎÔÒÕ +$ #PlacementBottomLeft +# óÌÅ×Á ×ÎÉÚÕ +$ #PlacementTopCenter +# ÷×ÅÒÈÕ ÐÏ ÃÅÎÔÒÕ +$ #PlacementBottomCenter +# ÷ÎÉÚÕ ÐÏ ÃÅÎÔÒÕ +$ #PlacementTopRight +# óÐÒÁ×Á ××ÅÒÈÕ +$ #PlacementCenterRight +# óÐÒÁ×Á ÐÏ ÃÅÎÔÒÕ +$ #PlacementBottomRight +# óÐÒÁ×Á ×ÎÉÚÕ + +$ #AutoHide +# óËÒÙ×ÁÔØ Á×ÔÏÍÁÔÉÞÅÓËÉ diff --git a/nls/ru_RU/main.m b/nls/ru_RU/main.m new file mode 100644 index 0000000..f3f9431 --- /dev/null +++ b/nls/ru_RU/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# ÏÛÉÂËÁ: '-rc' ÔÒÅÂÕÅÔ ÎÁÌÉÞÉÅ ÁÒÇÕÍÅÎÔÁ\n +$ #DISPLAYRequiresArg +# ÏÛÉÂËÁ: '-display' ÔÒÅÂÕÅÔ ÎÁÌÉÞÉÅ ÁÒÇÕÍÅÎÔÁ\n +$ #WarnDisplaySet +# ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÎÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÐÅÒÅÍÅÎÎÕÀ ÏËÒÕÖÅÎÉÑ 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000 Brad Hughes\n\n\ + -display <string>\t\tÉÓÐÏÌØÚÏ×ÁÔØ ÚÁÄÁÎÎÙÊ ÄÉÓÐÌÅÊ.\n\ + -rc <string>\t\t\tÉÓÐÏÌØÚÏ×ÁÔØ ÁÌØÔÅÒÎÁÔÉ×ÎÙÊ ÆÁÊÌ ÒÅÓÕÒÓÏ×.\n\ + -version\t\t\t×Ù×ÅÓÔÉ ÎÏÍÅÒ ×ÅÒÓÉÉ É ×ÙÊÔÉ.\n\ + -help\t\t\t\t×Ù×ÅÓÔÉ ÜÔÕ ÐÏÄÓËÁÚËÕ É ×ÙÊÔÉ.\n\n +$ #CompileOptions +# Compile time options:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/sk_SK/BaseDisplay.m b/nls/sk_SK/BaseDisplay.m new file mode 100644 index 0000000..43b9258 --- /dev/null +++ b/nls/sk_SK/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X chyba: %s(%d) operaèné kódy %d/%d\n zdroj 0x%lx\n +$ #SignalCaught +# %s: prijatý signál %d\n +$ #ShuttingDown +# ukonèuje sa\n +$ #Aborting +# preru¹uje sa... výpis obsahu pamäte (dumping core)\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: zlyhalo pripojenie k X serveru\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: nie je mo¾né oznaèi» pripojenie k obrazovke ako close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): odstraòuje sa chybné okno z fronty udalostí\n diff --git a/nls/sk_SK/Basemenu.m b/nls/sk_SK/Basemenu.m new file mode 100644 index 0000000..6c4da30 --- /dev/null +++ b/nls/sk_SK/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Menu diff --git a/nls/sk_SK/Configmenu.m b/nls/sk_SK/Configmenu.m new file mode 100644 index 0000000..9a9ea6b --- /dev/null +++ b/nls/sk_SK/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Konfiguraèné voµby +$ #FocusModel +# Model zamerania +$ #WindowPlacement +# Umiestnenie okna +$ #ImageDithering +# Modifikácia farieb a jasu na obraze +$ #OpaqueMove +# Presúvanie celého okna +$ #FullMax +# Plná maximalizácia +$ #FocusNew +# Zamera» nové okná +$ #FocusLast +# Zamera» okno pri zmene pracovnej plochy +$ #DisableBindings +# Zakáza» väzby s klávesou Scroll Lock +$ #ClickToFocus +# Kliknú» pre zameranie +$ #SloppyFocus +# Nedbanlivé zameranie +$ #AutoRaise +# Automaticky presunú» do popredia +$ #ClickRaise +# Po kliknutí presunú» do popredia +$ #SmartRows +# Inteligentné umiestnenie (riadky) +$ #SmartCols +# Inteligentné umiestnenie (ståpce) +$ #Cascade +# Kaskádové umiestnenie +$ #LeftRight +# Zµava doprava +$ #RightLeft +# Sprava doµava +$ #TopBottom +# Zhora nadol +$ #BottomTop +# Zdola nahor diff --git a/nls/sk_SK/Icon.m b/nls/sk_SK/Icon.m new file mode 100644 index 0000000..e49e247 --- /dev/null +++ b/nls/sk_SK/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikony diff --git a/nls/sk_SK/Image.m b/nls/sk_SK/Image.m new file mode 100644 index 0000000..517c742 --- /dev/null +++ b/nls/sk_SK/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: chyba pri vytváraní pixmapy\n +$ #ErrorCreatingXImage +# BImage::renderXImage: chyba pri vytváraní XImage\n +$ #UnsupVisual +# BImage::renderXImage: nepodporované zobrazenie\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: chyba pri vytváraní pixmapy\n +$ #InvalidColormapSize +# BImageControl::BImageControl: chybná veµkost colormapy %d (%d/%d/%d) - redukuje sa\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: chyba pri alokovaní colormapy\n +$ #ColorAllocFail +# BImageControl::BImageControl: chyba pri alokovaní farby %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: vyrovnávacia pamä» pre pixmapy - uvoµòuje sa %d pixmáp\n +$ #PixmapCacheLarge +# BImageControl::renderImage: vyrovnávacia pamä» je príli¹ veµká, vynútené vyprázdnenie\n +$ #ColorParseError +# BImageControl::getColor: chyba pri analýze farby: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: chyba pri alokovaní farby: '%s'\n diff --git a/nls/sk_SK/Makefile.am b/nls/sk_SK/Makefile.am new file mode 100644 index 0000000..390b3cf --- /dev/null +++ b/nls/sk_SK/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = sk_SK +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/sk_SK/Screen.m b/nls/sk_SK/Screen.m new file mode 100644 index 0000000..cc1b02f --- /dev/null +++ b/nls/sk_SK/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: pri dopytovaní X servera nastala chyba.\n \ +na displeji je práve spustený ïal¹í správca okien %s.\n +$ #ManagingScreen +# BScreen::BScreen: riadiaca obrazovka %d pou¾íva zobrazenie 0x%lx, håbka %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): nie je mo¾né nahra» font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): nie je mo¾né nahra» predvolený font.\n +$ #EmptyMenuFile +# %s: prázdny menu súbor\n +$ #xterm +# xterm +$ #Restart +# Re¹tart +$ #Exit +# Koniec +$ #EXECError +# BScreen::parseMenuFile: [exec] chyba, nedefinovaný titulok menu a/alebo príkaz\n +$ #EXITError +# BScreen::parseMenuFile: [exit] chyba, nedefinovaný titulok menu\n +$ #STYLEError +# BScreen::parseMenuFile: [style] chyba, nedefinovaný titulok menu a/alebo názov súboru\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] chyba, nedefinovaný titulok menu\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] chyba, nedefinovaný názov súboru\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] chyba, '%s' nie je obyèajný súbor\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] chyba, nedefinovaný titulok menu\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] chyba, nedefinovaný titulok menu\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] chyba, nedefinovaný titulok menu\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] chyba, nedefinovaný adresár\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] chyba, '%s' nie je adresár\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] chyba, '%s' neexistuje\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] chyba, nedefinovaný titulok menu\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/sk_SK/Slit.m b/nls/sk_SK/Slit.m new file mode 100644 index 0000000..b935594 --- /dev/null +++ b/nls/sk_SK/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Smer Slitu +$ #SlitPlacement +# Umiestnenie Slitu diff --git a/nls/sk_SK/Toolbar.m b/nls/sk_SK/Toolbar.m new file mode 100644 index 0000000..e0cf73f --- /dev/null +++ b/nls/sk_SK/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Panel nástrojov +$ #EditWkspcName +# Zmeni» názov aktuálnej pracovnej plochy +$ #ToolbarPlacement +# Umiestnenie panela nástrojov diff --git a/nls/sk_SK/Window.m b/nls/sk_SK/Window.m new file mode 100644 index 0000000..92da0f3 --- /dev/null +++ b/nls/sk_SK/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: vytvára sa 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: zlyhanie XGetWindowAttributres\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: nie je mo¾né nájs» obrazovku pre základné okno 0x%lx\n +$ #Unnamed +# Nepomenované +$ #MapRequest +# BlackboxWindow::mapRequestEvent() pre 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() pre 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: zmena potomka 0x%lx na rodièa 0x%lx\n diff --git a/nls/sk_SK/Windowmenu.m b/nls/sk_SK/Windowmenu.m new file mode 100644 index 0000000..d9193ce --- /dev/null +++ b/nls/sk_SK/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Umiestni» na ... +$ #Shade +# Zrolova» +$ #Iconify +# Zmeni» na ikonu +$ #Maximize +# Maximalizova» +$ #Raise +# Presunú» do popredia +$ #Lower +# Presunú» do pozadia +$ #Stick +# Prilepi» +$ #KillClient +# Ukonèi» klienta +$ #Close +# Zavrie» diff --git a/nls/sk_SK/Workspace.m b/nls/sk_SK/Workspace.m new file mode 100644 index 0000000..0bf9929 --- /dev/null +++ b/nls/sk_SK/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Pracovná plocha %d diff --git a/nls/sk_SK/Workspacemenu.m b/nls/sk_SK/Workspacemenu.m new file mode 100644 index 0000000..6abe58e --- /dev/null +++ b/nls/sk_SK/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Pracovné plochy +$ #NewWorkspace +# Nová pracovná plocha +$ #RemoveLast +# Odstráni» poslednú diff --git a/nls/sk_SK/blackbox.m b/nls/sk_SK/blackbox.m new file mode 100644 index 0000000..4abf309 --- /dev/null +++ b/nls/sk_SK/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: nena¹li sa spravovateµné obrazovky, ru¹í sa\n +$ #MapRequest +# Blackbox::process_event: MapRequest pre 0x%lx\n diff --git a/nls/sk_SK/bsetroot.m b/nls/sk_SK/bsetroot.m new file mode 100644 index 0000000..ac813d3 --- /dev/null +++ b/nls/sk_SK/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: chyba: musíte ¹pecifikova» jeden z parametrov: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> pripojenie k obrazovke\n\ + -mod <x> <y> modul vzorky\n\ + -foreground, -fg <color> modul farby popredia\n\ + -background, -bg <color> modul farby pozadia\n\n\ + -gradient <texture> textúra farebného prechodu\n\ + -from <color> poèiatoèná farba vo farebnom prechode\n\ + -to <color> koneèná farba vo farebnom prechode\n\n\ + -solid <color> jednoliata farba\n\n\ + -help vypí¹e túto nápovedu a skonèí\n + diff --git a/nls/sk_SK/common.m b/nls/sk_SK/common.m new file mode 100644 index 0000000..cf4df8a --- /dev/null +++ b/nls/sk_SK/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Áno +$ #No +# Nie + +$ #DirectionTitle +# Smer +$ #DirectionHoriz +# Horizontálny +$ #DirectionVert +# Vertikálny + +$ #AlwaysOnTop +# Stále na vrchu + +$ #PlacementTitle +# Umiestnenie +$ #PlacementTopLeft +# Vµavo hore +$ #PlacementCenterLeft +# Uprostred vµavo +$ #PlacementBottomLeft +# Vµavo dole +$ #PlacementTopCenter +# Hore uprostred +$ #PlacementBottomCenter +# Dole uprostred +$ #PlacementTopRight +# Vpravo hore +$ #PlacementCenterRight +# Uprostred vpravo +$ #PlacementBottomRight +# Vpravo dole + +$ #AutoHide +# Automaticky skry» diff --git a/nls/sk_SK/main.m b/nls/sk_SK/main.m new file mode 100644 index 0000000..269fed7 --- /dev/null +++ b/nls/sk_SK/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# chyba: '-rc' vy¾aduje argument\n +$ #DISPLAYRequiresArg +# chyba: '-display' vy¾aduje argument\n +$ #WarnDisplaySet +# varovanie: nie je mo¾né nastavi» premennú prostredia 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tpou¾ije sa pripojenie k zadanému displeju.\n\ + -rc <string>\t\t\tpou¾ije sa alternatívny konfiguraèný súbor.\n\ + -version\t\t\tzobrazí verziu a skonèí.\n\ + -help\t\t\t\tzobrazí túto nápovedu a skonèí.\n\n +$ #CompileOptions +# Nastavenia v èase kompilácie:\n\ + Ladenie\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/sl_SI/BaseDisplay.m b/nls/sl_SI/BaseDisplay.m new file mode 100644 index 0000000..01facb9 --- /dev/null +++ b/nls/sl_SI/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: Napaka v sistemu oken X: %s(%d) operacijska koda %d/%d\n vir 0x%lx\n +$ #SignalCaught +# %s: prejet signal %d\n +$ #ShuttingDown +# zaustavitev\n +$ #Aborting +# prekinitev... izmet posmrtnih ostankov core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: neuspe¹na povezava do stre¾nika X.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: povezave do prikazovalnika ni moè pripraviti do samodejne prekinitve ob zaustavitvi\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): pokvarjeno okno je odstranjeno iz dogodkovne vrste\n diff --git a/nls/sl_SI/Basemenu.m b/nls/sl_SI/Basemenu.m new file mode 100644 index 0000000..6c4da30 --- /dev/null +++ b/nls/sl_SI/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox Menu diff --git a/nls/sl_SI/Configmenu.m b/nls/sl_SI/Configmenu.m new file mode 100644 index 0000000..ea76c6b --- /dev/null +++ b/nls/sl_SI/Configmenu.m @@ -0,0 +1,38 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Nastavitvene izbire +$ #FocusModel +# Naèin fokusiranja +$ #WindowPlacement +# Postavitev oken +$ #ImageDithering +# Prelivanje slik +$ #OpaqueMove +# Premikanje prosojnih oken +$ #FullMax +# Najveèje okno +$ #FocusNew +# Novo okno dobi fokus +$ #FocusLast +# Spremenjeni fokus okna na namizju +$ #ClickToFocus +# Za fokus kliknite +$ #SloppyFocus +# Povr¹ni fokus +$ #AutoRaise +# Samodejno odkrivanje +$ #SmartRows +# Pametno postavljanje (vrstice) +$ #SmartCols +# Pametno postavljanje (stolpci) +$ #Cascade +# Kaskadno postavljanje +$ #LeftRight +# Od leve proti desni +$ #RightLeft +# Od desne proti levi +$ #TopBottom +# Od zgoraj navzdol +$ #BottomTop +# Od spodaj navzgor diff --git a/nls/sl_SI/Icon.m b/nls/sl_SI/Icon.m new file mode 100644 index 0000000..8400759 --- /dev/null +++ b/nls/sl_SI/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikone diff --git a/nls/sl_SI/Image.m b/nls/sl_SI/Image.m new file mode 100644 index 0000000..310939b --- /dev/null +++ b/nls/sl_SI/Image.m @@ -0,0 +1,25 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: napaka pri izdelavi slike (pixmap)\n +$ #ErrorCreatingXImage +# BImage::renderXImage: napaka pri izdelavi slike (XImage)\n +$ #UnsupVisual +# BImage::renderXImage: nepodprt videz\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: napaka pri izdelavi slike (pixmap)\n +$ #InvalidColormapSize +# BImageControl::BImageControl: prevelika barvna paleta %d (%d/%d/%d) - krèim\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: napaka pri dodeljevanju palete\n +$ #ColorAllocFail +# BImageControl::BImageControl: napaka pri dodeljevanju barve %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: medpomnilnik slik - zavr¾enih je %d slik\n +$ #PixmapCacheLarge +# BImageControl::renderImage: medpomnilnik je zrasel, prisilno èi¹èenje\n +$ #ColorParseError +# BImageControl::getColor: napaka pri branju barve: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: napaka pri dodeljevanju barve: '%s'\n + diff --git a/nls/sl_SI/Makefile.am b/nls/sl_SI/Makefile.am new file mode 100644 index 0000000..0bdba20 --- /dev/null +++ b/nls/sl_SI/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = sl_SI +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/sl_SI/Screen.m b/nls/sl_SI/Screen.m new file mode 100644 index 0000000..44286a9 --- /dev/null +++ b/nls/sl_SI/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: napaka pri poizvedovanju stre¾nika za X.\n \ +nek upravljalnik oken ¾e teèe v prikazovalniku %s.\n +$ #ManagingScreen +# BScreen::BScreen: upravljenje zaslona %d z videzem 0x%lx globine %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): pisave '%s' ni moè nalo¾iti\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): privzete pisave ni moè nalo¾iti.\n +$ #EmptyMenuFile +# %s: prazna menujska datoteka\n +$ #xterm +# xterm +$ #Restart +# Ponovni zagon +$ #Exit +# Izhod +$ #EXECError +# BScreen::parseMenuFile: [exec] napaka: oznaki menuja ali ukaza nista doloèeni\n +$ #EXITError +# BScreen::parseMenuFile: [exit] napaka: oznaka menuja ni doloèena\n +$ #STYLEError +# BScreen::parseMenuFile: [style] napaka: oznaki menuja ali datoteke nista doloèeni\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] napaka: oznaka menuja ni doloèena\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] napaka: ime datoteke ni doloèeno\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] napaka: '%s' ni prava datoteka\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] napaka: oznaka menuja ni doloèena\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] napaka: oznaka menuja ni doloèena\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] napaka: oznaka menuja ni doloèena\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] napaka: imenik ni doloèen\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] napaka: '%s' ni imenik\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] napaka:, '%s' ne obstaja\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] napaka: oznaka menuja ni doloèena\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/sl_SI/Slit.m b/nls/sl_SI/Slit.m new file mode 100644 index 0000000..065fa4c --- /dev/null +++ b/nls/sl_SI/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Re¾a +$ #SlitDirection +# Smer re¾e +$ #SlitPlacement +# Lega re¾e diff --git a/nls/sl_SI/Toolbar.m b/nls/sl_SI/Toolbar.m new file mode 100644 index 0000000..4f80cd7 --- /dev/null +++ b/nls/sl_SI/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Orodna letev +$ #EditWkspcName +# Uredi ime trenutnega namizja +$ #ToolbarPlacement +# Lega orodne letve diff --git a/nls/sl_SI/Window.m b/nls/sl_SI/Window.m new file mode 100644 index 0000000..d6da9f5 --- /dev/null +++ b/nls/sl_SI/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: izdelujem 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: neuspe¹en XGetWindowAttributres\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: zaslona za korensko okno 0x%lx ni moè najti\n +$ #Unnamed +# Neimenovano +$ #MapRequest +# BlackboxWindow::mapRequestEvent() za 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() za 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::unmapnotifyEvent: ponovno prikljuèeno 0x%lx korenskemu oknu 0x%lx\n diff --git a/nls/sl_SI/Windowmenu.m b/nls/sl_SI/Windowmenu.m new file mode 100644 index 0000000..5de13ba --- /dev/null +++ b/nls/sl_SI/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Na delovno povr¹ino... +$ #Shade +# Zastri +$ #Iconify +# Pomanj¹aj +$ #Maximize +# Poveèaj +$ #Raise +# Prika¾i +$ #Lower +# Zakrij +$ #Stick +# Prilepi +$ #KillClient +# Zaustavi +$ #Close +# Zapusti diff --git a/nls/sl_SI/Workspace.m b/nls/sl_SI/Workspace.m new file mode 100644 index 0000000..c29870b --- /dev/null +++ b/nls/sl_SI/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Delovna povr¹ina %d diff --git a/nls/sl_SI/Workspacemenu.m b/nls/sl_SI/Workspacemenu.m new file mode 100644 index 0000000..8aaa7be --- /dev/null +++ b/nls/sl_SI/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Delovne povr¹ine +$ #NewWorkspace +# Nova delovna povr¹ina +$ #RemoveLast +# Odstrani zadnjo diff --git a/nls/sl_SI/blackbox.m b/nls/sl_SI/blackbox.m new file mode 100644 index 0000000..fca811a --- /dev/null +++ b/nls/sl_SI/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ni moè najti upravljivih zaslonov, prekinitev\n +$ #MapRequest +# Blackbox::process_event: MapRequest za 0x%lx\n diff --git a/nls/sl_SI/bsetroot.m b/nls/sl_SI/bsetroot.m new file mode 100644 index 0000000..32b842d --- /dev/null +++ b/nls/sl_SI/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: napaka: doloèiti je treba eno: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> prika¾i povezavo\n\ + -mod <x> <y> vzorec\n\ + -foreground, -fg <color> barva ospredja\n\ + -background, -bg <color> barva ozadja\n\n\ + -gradient <texture> prelivna tekstura\n\ + -from <color> zaèetna barva preliva\n\ + -to <color> konèna barva preliva\n\n\ + -solid <color> enotna barva\n\n\ + -help prika¾i ta navodila in konèaj\n + diff --git a/nls/sl_SI/common.m b/nls/sl_SI/common.m new file mode 100644 index 0000000..8014df4 --- /dev/null +++ b/nls/sl_SI/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Da +$ #No +# Ne + +$ #DirectionTitle +# Smer +$ #DirectionHoriz +# Vodoravno +$ #DirectionVert +# Navpièno + +$ #AlwaysOnTop +# Vselej na vrhu + +$ #PlacementTitle +# Lega +$ #PlacementTopLeft +# Na vrhu in levo poravnano +$ #PlacementCenterLeft +# Navpièno osredninjeno in levo poravnano +$ #PlacementBottomLeft +# Na dnu in levo poravnano +$ #PlacementTopCenter +# Na vrhu in osredinjeno +$ #PlacementBottomCenter +# Na dnu in osredinjeno +$ #PlacementTopRight +# Na vrhu in desno poravnano +$ #PlacementCenterRight +# Navpièno osredinjeno in desno poravnano +$ #PlacementBottomRight +# Na dnu in desno poravnano + +$ #AutoHide +# Samodejno skrivanje diff --git a/nls/sl_SI/main.m b/nls/sl_SI/main.m new file mode 100644 index 0000000..8e36922 --- /dev/null +++ b/nls/sl_SI/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# napaka: '-rc' zahteva argument\n +$ #DISPLAYRequiresArg +# napaka: '-display' zahteva argument\n +$ #WarnDisplaySet +# opozorilo: spremenljivke okolja 'DISPLAY' ni moè nastaviti\n +$ #Usage +# Blackbox %s: (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tuporabi prikazovalnik.\n\ + -rc <string>\t\t\tuporabi nadomestno datoteko z viri.\n\ + -version\t\t\tprika¾i oznako razlièice in konèaj.\n\ + -help\t\t\t\prika¾i ta navodila in konèaj.\n\n +$ #CompileOptions +# Izbire pri prevajanju:\n\ + Razhro¹èevanje\t\t\t%s\n\ + Oblika:\t\t\t%s\n\ + Osembitno stresanje barv:\t%s\n\n diff --git a/nls/sv_SE/BaseDisplay.m b/nls/sv_SE/BaseDisplay.m new file mode 100644 index 0000000..9516b41 --- /dev/null +++ b/nls/sv_SE/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X-fel: %s(%d) opkod %d/%d\n resurs 0x%lx\n +$ #SignalCaught +# %s: signal %d fångad\n +$ #ShuttingDown +# stänger ner\n +$ #Aborting +# avbryter... dumpar kärna\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: anslutning till X server misslyckades.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: kunde inte markera skärmanslutning som stäng-vid-exekvering\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): tar bort dåligt fönster från händelsekön\n diff --git a/nls/sv_SE/Basemenu.m b/nls/sv_SE/Basemenu.m new file mode 100644 index 0000000..9d6d942 --- /dev/null +++ b/nls/sv_SE/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackboxmeny diff --git a/nls/sv_SE/Configmenu.m b/nls/sv_SE/Configmenu.m new file mode 100644 index 0000000..8fef55b --- /dev/null +++ b/nls/sv_SE/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Inställningar +$ #FocusModel +# Fokusmodell +$ #WindowPlacement +# Fönsterplacering +$ #ImageDithering +# Bilddithering +$ #OpaqueMove +# Ogenomskinlig fönsterförflyttning +$ #FullMax +# Full maximering +$ #FocusNew +# Fokus på nya fönster +$ #FocusLast +# Fokusera fönster vid skrivbordsbyte +$ #DisableBindings +# Gör så att bindningar inte fungerar med Scroll Lock +$ #ClickToFocus +# Klicka för fokus +$ #SloppyFocus +# Hafsig fokus +$ #AutoRaise +# Höj automatiskt +$ #ClickRaise +# Klicka för att höja +$ #SmartRows +# Smart placering (Rader) +$ #SmartCols +# Smart placering (Kolumner) +$ #Cascade +# Kaskadplacering +$ #LeftRight +# Från vänster +$ #RightLeft +# Från höger +$ #TopBottom +# Uppifrån +$ #BottomTop +# Nerifrån diff --git a/nls/sv_SE/Icon.m b/nls/sv_SE/Icon.m new file mode 100644 index 0000000..32b247e --- /dev/null +++ b/nls/sv_SE/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikoner diff --git a/nls/sv_SE/Image.m b/nls/sv_SE/Image.m new file mode 100644 index 0000000..1099d50 --- /dev/null +++ b/nls/sv_SE/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: fel under skapande av pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: fel under skapande av XImage\n +$ #UnsupVisual +# BImage::renderXImage: ej stöd för färgdjup\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: fel under skapande av pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ogiltig färgkarta storlek %d (%d/%d/%d) - reducerar\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: fel under allokering av färgkarta\n +$ #ColorAllocFail +# BImageControl::BImageControl: misslyckades att allokera färg %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - släpper %d pixmappar\n +$ #PixmapCacheLarge +# BImageControl::renderImage: stor cache, tvingar upprensning\n +$ #ColorParseError +# BImageControl::getColor: färgfel: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: färgallokeringsfel: '%s'\n diff --git a/nls/sv_SE/Makefile.am b/nls/sv_SE/Makefile.am new file mode 100644 index 0000000..4b031a9 --- /dev/null +++ b/nls/sv_SE/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = sv_SE +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/sv_SE/Screen.m b/nls/sv_SE/Screen.m new file mode 100644 index 0000000..20cba27 --- /dev/null +++ b/nls/sv_SE/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: ett fel inträffade under en förfrågan till X servern.\n \ +en annan fönsterhanterare körs redan på skärmen %s.\n +$ #ManagingScreen +# BScreen::BScreen: hanterar skärm %d med visuell 0x%lx, färgdjup %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): kunde inte ladda font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): kunde inte ladda standardfont.\n +$ #EmptyMenuFile +# %s: tom menyfil\n +$ #xterm +# xterm +$ #Restart +# Starta om +$ #Exit +# Avsluta +$ #EXECError +# BScreen::parseMenuFile: [exec] fel, ingen menyetikett och/eller kommando definierat\n +$ #EXITError +# BScreen::parseMenuFile: [exit] fel, ingen menyetikett definierad\n +$ #STYLEError +# BScreen::parseMenuFile: [style] fel, ingen menyetikett och/eller filnamn definierat\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] fel, ingen menyetikett definierad\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] fel, inget filnamn definierat\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] fel, '%s' är inte en vanlig fil\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] fel, ingen menyetikett definierad\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] fel, ingen menyetikett definiera\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] fel, ingen menyetikett definierad\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fel, ingen katalog definierad\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fel, '%s' är inte en katalog\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] fel, '%s' existerar inte\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] fel, ingen menyetikett definierad\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/sv_SE/Slit.m b/nls/sv_SE/Slit.m new file mode 100644 index 0000000..807c13f --- /dev/null +++ b/nls/sv_SE/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slitriktning +$ #SlitPlacement +# Slitplacering diff --git a/nls/sv_SE/Toolbar.m b/nls/sv_SE/Toolbar.m new file mode 100644 index 0000000..341d860 --- /dev/null +++ b/nls/sv_SE/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Verktygslist +$ #EditWkspcName +# Ändra namn på skrivbordet +$ #ToolbarPlacement +# Verktygslistens placering diff --git a/nls/sv_SE/Window.m b/nls/sv_SE/Window.m new file mode 100644 index 0000000..410d9a3 --- /dev/null +++ b/nls/sv_SE/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: skapar 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributes misslyckades\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: kan inte hitta skärm för rootfönster 0x%lx\n +$ #Unnamed +# Inget namn +$ #MapRequest +# BlackboxWindow::mapRequestEvent() för 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() för 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: återför 0x%lx till 0x%lx\n diff --git a/nls/sv_SE/Windowmenu.m b/nls/sv_SE/Windowmenu.m new file mode 100644 index 0000000..6addc2b --- /dev/null +++ b/nls/sv_SE/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Skicka till... +$ #Shade +# Skugga +$ #Iconify +# Ikonifiera +$ #Maximize +# Maximera +$ #Raise +# Höj +$ #Lower +# Sänk +$ #Stick +# Klibbig +$ #KillClient +# Döda klient +$ #Close +# Stäng diff --git a/nls/sv_SE/Workspace.m b/nls/sv_SE/Workspace.m new file mode 100644 index 0000000..bc40d71 --- /dev/null +++ b/nls/sv_SE/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Skrivbord %d diff --git a/nls/sv_SE/Workspacemenu.m b/nls/sv_SE/Workspacemenu.m new file mode 100644 index 0000000..544c91a --- /dev/null +++ b/nls/sv_SE/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Skrivbord +$ #NewWorkspace +# Nytt skrivbord +$ #RemoveLast +# Ta bort sista diff --git a/nls/sv_SE/blackbox.m b/nls/sv_SE/blackbox.m new file mode 100644 index 0000000..846d7be --- /dev/null +++ b/nls/sv_SE/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: inga hanterbara skärmar hittades, avslutar\n +$ #MapRequest +# Blackbox::process_event: MapRequest för 0x%lx\n diff --git a/nls/sv_SE/bsetroot.m b/nls/sv_SE/bsetroot.m new file mode 100644 index 0000000..851af65 --- /dev/null +++ b/nls/sv_SE/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: fel: måste specifiera en av: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> skärmanslutning\n\ + -mod <x> <y> modulamönster\n\ + -foreground, -fg <color> förgrundsfärg för modulamönster\n\ + -background, -bg <color> bakgrundsfärg för modulamönster\n\n\ + -gradient <texture> texturlutning\n\ + -from <color> startfärg\n\ + -to <color> slutfärg\n\n\ + -solid <color> solid färg\n\n\ + -help visa denna hjälptext och avsluta\n + diff --git a/nls/sv_SE/common.m b/nls/sv_SE/common.m new file mode 100644 index 0000000..0fc0db3 --- /dev/null +++ b/nls/sv_SE/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# Ja +$ #No +# Nej + +$ #DirectionTitle +# Riktning +$ #DirectionHoriz +# Horisontell +$ #DirectionVert +# Vertikal + +$ #AlwaysOnTop +# Alltid överst + +$ #PlacementTitle +# Placering +$ #PlacementTopLeft +# Uppe till vänster +$ #PlacementCenterLeft +# Mitten till vänster +$ #PlacementBottomLeft +# Nere till vänster +$ #PlacementTopCenter +# Uppe i mitten +$ #PlacementBottomCenter +# Nere i mitten +$ #PlacementTopRight +# Uppe till höger +$ #PlacementCenterRight +# Mitten till höger +$ #PlacementBottomRight +# Nere till höger + +$ #AutoHide +# Göm automatiskt diff --git a/nls/sv_SE/main.m b/nls/sv_SE/main.m new file mode 100644 index 0000000..a4d5023 --- /dev/null +++ b/nls/sv_SE/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# fel: '-rc' kräver ett argument\n +$ #DISPLAYRequiresArg +# fel: '-display' kräver ett argument\n +$ #WarnDisplaySet +# varning: kunde inte sätta variabeln 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tanvänd skärmanslutning.\n\ + -rc <string>\t\t\tanvänd alternativ resursfil.\n\ + -version\t\t\tvisa version och avsluta.\n\ + -help\t\t\t\tvisa denna hjälptext och avsluta.\n\n +$ #CompileOptions +# Kompilerad med:\n\ + Avlusning\t\t\t%s\n\ + Form:\t\t\t\t%s\n\ + 8bpp ordnad dithering:\t%s\n\n diff --git a/nls/tr_TR/BaseDisplay.m b/nls/tr_TR/BaseDisplay.m new file mode 100644 index 0000000..8a30706 --- /dev/null +++ b/nls/tr_TR/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s : X hatasý : %s ( %d ) opkodlar %d/%d\n kaynak 0x%lx\n +$ #SignalCaught +# %s : %d sinyali alýndý \n +$ #ShuttingDown +# kapatýlýyorum\n +$ #Aborting +# kapatýlýyorum ... çöküntüyü býrakýyorum\n +$ #XConnectFail +# BaseDisplay::BaseDisplay : X sunucusuna baðlanýlýnamadý .\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay : çalýþtýrýrken kapatmada ekrana baðlanýlýnamadý \n +$ #BadWindowRemove +# BaseDisplay::eventLoop() : eylem kuyruðundaki 'kötü' pencereyi siliyorum \n diff --git a/nls/tr_TR/Basemenu.m b/nls/tr_TR/Basemenu.m new file mode 100644 index 0000000..7ab8dec --- /dev/null +++ b/nls/tr_TR/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox mönüsü diff --git a/nls/tr_TR/Configmenu.m b/nls/tr_TR/Configmenu.m new file mode 100644 index 0000000..4b625dd --- /dev/null +++ b/nls/tr_TR/Configmenu.m @@ -0,0 +1,38 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# Ayarlar +$ #FocusModel +# Foküsleme +$ #WindowPlacement +# Pencere yerleþimi +$ #ImageDithering +# Resim oluþturmasý +$ #OpaqueMove +# Ekraný içerikli taþý +$ #FullMax +# Tam ekranla, vallahi +$ #FocusNew +# Yeni pencereleri foküsle +$ #FocusLast +# Masaüstündeki son pencereyi foküsle +$ #ClickToFocus +# Týklayarak foküsle +$ #SloppyFocus +# Aðýr foküsle +$ #AutoRaise +# Otomatikman yükselt +$ #SmartRows +# Akýllý yerleþim( Sýralar ) +$ #SmartCols +# Akýllý yerleþim( Sütunlar ) +$ #Cascade +# Cascade Placement +$ #LeftRight +# Soldan saða +$ #RightLeft +# Saðdan sola +$ #TopBottom +# Üstten aþaða +$ #BottomTop +# Alttan üste diff --git a/nls/tr_TR/Icon.m b/nls/tr_TR/Icon.m new file mode 100644 index 0000000..74a344d --- /dev/null +++ b/nls/tr_TR/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# Ikonalar diff --git a/nls/tr_TR/Image.m b/nls/tr_TR/Image.m new file mode 100644 index 0000000..30a46f5 --- /dev/null +++ b/nls/tr_TR/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid : resmi yaratamadým\n +$ #ErrorCreatingXImage +# BImage::renderXImage : XImage'i yaratamadým\n +$ #UnsupVisual +# BImage::renderXImage : desteklenmeyen görünüþ( renk derinliði )\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap : resmi yaratamadým\n +$ #InvalidColormapSize +# BImageControl::BImageControl : geçersiz renk haritasý büyüklüðü %d (%d/%d/%d) - azaltýyorum\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl : renk haritasý ayrýlanamadý\n +$ #ColorAllocFail +# BImageControl::BImageControl : rengi ayrýrken hata oldu : %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl : resim arabelleði - %d resim temizlendi\n +$ #PixmapCacheLarge +# BImageControl::renderImage : arabellek büyük, temizlemeye baþlýyorum\n +$ #ColorParseError +# BImageControl::getColor : renk tarama hatasý : '%s'\n +$ #ColorAllocError +# BImageControl::getColor : renk ayýrma hatasý : '%s'\n diff --git a/nls/tr_TR/Makefile.am b/nls/tr_TR/Makefile.am new file mode 100644 index 0000000..21e57fd --- /dev/null +++ b/nls/tr_TR/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = tr_TR +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/tr_TR/Screen.m b/nls/tr_TR/Screen.m new file mode 100644 index 0000000..54d3cf5 --- /dev/null +++ b/nls/tr_TR/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen : X sunucusunu sorgularken hata oldu.\n \ +%s ekranýnda baþka bir pencere yöneticisi çalýþýyor gibi.\n +$ #ManagingScreen +# BScreen::BScreen : %d ekraný, 0x%lx görünümüyle , %d derinliðiyle\n +$ #FontLoadFail +# BScreen::LoadStyle() : '%s' yazý tipi yüklenemedi.\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): önayarlý yazý tipi yüklenemedi.\n +$ #EmptyMenuFile +# %s : boþ mönü dosyasý\n +$ #xterm +# X komutasý +$ #Restart +# Yeniden baþla +$ #Exit +# Çýk +$ #EXECError +# BScreen::parseMenuFile : [exec] hatasý, mönü yaftasý ve/yada komuta belirlenmedi\n +$ #EXITError +# BScreen::parseMenuFile : [exit] hatasý, mönü yaftasý belirlenmedi\n +$ #STYLEError +# BScreen::parseMenuFile : [style] hatasý, mönü yaftasý ve/yada dosya adý belirlenmedi\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] hatasý, mönü yaftasý belirlenmedi\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] hatasý, dosya adý belirlenmedi\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] hatasý, '%s' vasat bir dosya deðil\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] hatasý, mönü yaftasý belirlenmedi\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] hatasý, mönü yaftasý belirlenmedi\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] hatasý, mönü yaftasý belirlenmedi\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] hatasý, dizin adý belirlenmedi\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] hatasý, '%s' bir dizin \ +deðildir\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] hatasý, '%s' var deðil\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] hatasý, mönü yaftasý belirlenmedi\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# Y: %4d x E: %4d diff --git a/nls/tr_TR/Slit.m b/nls/tr_TR/Slit.m new file mode 100644 index 0000000..454086a --- /dev/null +++ b/nls/tr_TR/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slit yönü +$ #SlitPlacement +# Slit yerleþimi diff --git a/nls/tr_TR/Toolbar.m b/nls/tr_TR/Toolbar.m new file mode 100644 index 0000000..41bd6e7 --- /dev/null +++ b/nls/tr_TR/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# Blackbox çubuðu +$ #EditWkspcName +# Geçerli masaüstü ismini deðiþtir +$ #ToolbarPlacement +# Blackbox çubuðunun yerleþimi diff --git a/nls/tr_TR/Window.m b/nls/tr_TR/Window.m new file mode 100644 index 0000000..e53477a --- /dev/null +++ b/nls/tr_TR/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow : 0x%lx'i yarat#_yorum\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow : XGetWindowAttributres baþarýsýz oldu\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow : 0x%lx ana penceresi için ekraný belirleyemedim\n +$ #Unnamed +# Isimsiz +$ #MapRequest +# 0x%lx için BlackboxWindow::mapRequestEvent()\n +$ #UnmapNotify +# 0x%lx için BlackboxWindow::unmapNotifyEvent()\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: 0x%lx'i ana pencereyi boya 0x%lx\n diff --git a/nls/tr_TR/Windowmenu.m b/nls/tr_TR/Windowmenu.m new file mode 100644 index 0000000..c8b384c --- /dev/null +++ b/nls/tr_TR/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# Gönder ... +$ #Shade +# Topla +$ #Iconify +# Ikonalaþtýr +$ #Maximize +# Azamileþtir +$ #Raise +# Alçalt +$ #Lower +# Yükselt +$ #Stick +# Yapýþýk +$ #KillClient +# Öldür +$ #Close +# Kapat diff --git a/nls/tr_TR/Workspace.m b/nls/tr_TR/Workspace.m new file mode 100644 index 0000000..3025f1b --- /dev/null +++ b/nls/tr_TR/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# Masaüstü %d diff --git a/nls/tr_TR/Workspacemenu.m b/nls/tr_TR/Workspacemenu.m new file mode 100644 index 0000000..93c9845 --- /dev/null +++ b/nls/tr_TR/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# Masaüstleri +$ #NewWorkspace +# Yeni bir masaüstü +$ #RemoveLast +# Son masaüstünü sil diff --git a/nls/tr_TR/blackbox.m b/nls/tr_TR/blackbox.m new file mode 100644 index 0000000..d8dc104 --- /dev/null +++ b/nls/tr_TR/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: yönetebilinen ekran bulunamadý, bitiriliyorum\n +$ #MapRequest +# Blackbox::process_event: 0x%lx için MapRequest\n diff --git a/nls/tr_TR/bsetroot.m b/nls/tr_TR/bsetroot.m new file mode 100644 index 0000000..3265d06 --- /dev/null +++ b/nls/tr_TR/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s : hata : -solid, -mod yada -gradient'den birisini belirlemek zorundasýn\n +$ #Usage +# %s 2.0 : Tel'if hakký (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <metin> ekran belirlemesi\n\ + -mod <x> <y> bölüþüm iþlemi\n\ + -foreground, -fg <renk> bölüþüm önalaný\n\ + -background, -bg <renk> bölüþüm ardalaný\n\n\ + -gradient <kaplam> geçiþim kaplamý\n\ + -from <renk> geçiþim baþlama rengi\n\ + -to <renk> geçiþim bitiþ rengi\n\n\ + -solid <renk> tek renk\n\n\ + -help bu yardým iletisini göster ve çýk\n + diff --git a/nls/tr_TR/common.m b/nls/tr_TR/common.m new file mode 100644 index 0000000..cae9318 --- /dev/null +++ b/nls/tr_TR/common.m @@ -0,0 +1,35 @@ +$set 15 #Common + +$ #Yes +# Evet +$ #No +# Hayýr + +$ #DirectionTitle +# Yön +$ #DirectionHoriz +# Ufki +$ #DirectionVert +# Dikey + +$ #AlwaysOnTop +# Her zaman üstte + +$ #PlacementTitle +# Yerleþim +$ #PlacementTopLeft +# Sol üst +$ #PlacementCenterLeft +# Sol orta +$ #PlacementBottomLeft +# Sol alt +$ #PlacementTopCenter +# Üst orta +$ #PlacementBottomCenter +# Alt orta +$ #PlacementTopRight +# Sað üst +$ #PlacementCenterRight +# Sað orta +$ #PlacementBottomRight +# Sað üst diff --git a/nls/tr_TR/main.m b/nls/tr_TR/main.m new file mode 100644 index 0000000..bdc2560 --- /dev/null +++ b/nls/tr_TR/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# hata : '-rc' bir argüman bekler\n +$ #DISPLAYRequiresArg +# hata : '-display' bir argüman bekler\n +$ #WarnDisplaySet +# ikaz : 'DISPLAY' verisini oturtamadým\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <metin>\t\tekraný kullan.\n\ + -rc <metin>\t\t\tbaþka bir ayarlama dosyasýný kullan.\n\ + -version\t\t\tnesil bilgisini gösterir ve çýkar.\n\ + -help\t\t\t\tbu yardým iletisini gösterir ve çýkar.\n\n +$ #CompileOptions +# Denetleme seçenekleri :\n\ + Bilgilendirme\t\t\t%s\n\ + Gölgeleme:\t\t\t%s\n\ + R8b'e göre týzla:\t%s\n\n diff --git a/nls/uk_UA/BaseDisplay.m b/nls/uk_UA/BaseDisplay.m new file mode 100644 index 0000000..33d5380 --- /dev/null +++ b/nls/uk_UA/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: ÐÏÍÉÌËÁ X ÓÅÒ×ÅÒÁ: %s(%d) ÚÎÁÞÅÎÎÑ %d/%d\n ÒÅÓÕÒÓ 0x%lx\n +$ #SignalCaught +# %s: ÏÔÒÉÍÁÎÉÊ ÓÉÇÎÁÌ %d \n +$ #ShuttingDown +# ×ÉÍËÎÅÎÎÑ\n +$ #Aborting +# ÐÅÒÅÒÉ×ÁÎÎÑ... ÓÔ×ÏÒÀ¤ÔØÓÑ ÄÁÍÐ core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: ÎÅ ×ÄÁÌÏÓÑ Ú'¤ÄÎÁÎÎÑ Ú X ÓÅÒ×ÅÒÏÍ.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: ÎÅÍÁ ÍÏÖÌÉ×ÏÓÔ¦ ÐÏÚÎÁÞÉÔÉ ÁËÔÉ×ÎÉÊ ÄÉÓÐÌÅÊ ÑË "ÚÁËÒÉÔÉÊ-ÎÁ-×ÉËÏÎÁÎÎÑ"\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): ÐÏÇÁΊצËÎÏ ×ÉÄÁÌѤÔØÓÑ Ú ÞÅÒÇÉ ÐÏĦÊ\n diff --git a/nls/uk_UA/Basemenu.m b/nls/uk_UA/Basemenu.m new file mode 100644 index 0000000..d555ac3 --- /dev/null +++ b/nls/uk_UA/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# íÅÎÀ BlackBox diff --git a/nls/uk_UA/Configmenu.m b/nls/uk_UA/Configmenu.m new file mode 100644 index 0000000..78594a4 --- /dev/null +++ b/nls/uk_UA/Configmenu.m @@ -0,0 +1,38 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# ëÏÎƦÇÕÒÁÃ¦Ñ +$ #FocusModel +# íÏÄÅÌØ ÆÏËÕÓÕ×ÁÎÎÑ +$ #WindowPlacement +# í¦ÓÃÅÚÎÁÈÏÄÖÅÎÎÑ ×¦ËÎÁ +$ #ImageDithering +# åÍÕÌÀ×ÁÔÉ ËÏÌØÏÒÉ Õ ÚÏÂÒÁÖÅÎÎÑÈ +$ #OpaqueMove +# ðÅÒÅÎÅÓÅÎÎÑ ÚÁÐÏ×ÎÅÎÉÈ ×¦ËÏÎ +$ #FullMax +# òÏÚÇÏÒÔÁÔÉ ÎÁ ×ÅÓØ ÅËÒÁÎ +$ #FocusNew +# äÁ×ÁÔÉ ÆÏËÕÓ ÎÏ×ÉÍ ×¦ËÎÁÍ +$ #FocusLast +# äÁ×ÁÔÉ ÆÏËÕÓ ÐÒÉ ÚͦΦ ÒÏÂÏÞÏÇÏ Í¦ÓÃÑ +$ #ClickToFocus +# ëÌÁÃÎÕÔÉ ÄÌÑ ÏÔÒÉÍÁÎÎÑ ÆÏËÕÓÕ +$ #SloppyFocus +# æÏËÕÓ ¦ÄÅ ÚÁ ÍÉÛËÏÀ +$ #AutoRaise +# á×ÔÏЦÄΦÍÁÎÎÑ +$ #SmartRows +# "òÏÚÕÍÎÅ" ÒÏÚÔÁÛÕ×ÁÎÎÑ (ÇÏÒÉÚÏÎÔÁÌØÎÏ) +$ #SmartCols +# "òÏÚÕÍÎÅ" ÒÏÚÔÁÛÕ×ÁÎÎÑ (×ÅÒÔÉËÁÌØÎÏ) +$ #Cascade +# ëÁÓËÁÄÏÍ +$ #LeftRight +# ú̦×Á ÎÁ ÐÒÁ×Ï +$ #RightLeft +# úÐÒÁ×Á ÎÁ ̦×Ï +$ #TopBottom +# ú×ÅÒÈÕ ×ÎÉÚ +$ #BottomTop +# úÎÉÚÕ ××ÅÒÈ diff --git a/nls/uk_UA/Icon.m b/nls/uk_UA/Icon.m new file mode 100644 index 0000000..ba0ba47 --- /dev/null +++ b/nls/uk_UA/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# úÇÏÒÎÕÔ¦ צËÎÁ diff --git a/nls/uk_UA/Image.m b/nls/uk_UA/Image.m new file mode 100644 index 0000000..4498f8f --- /dev/null +++ b/nls/uk_UA/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: ÐÏÍÉÌËÁ ÓÔ×ÏÒÅÎÎÑ ÍÁÐÉ Ð¦ËÓÅ̦×\n +$ #ErrorCreatingXImage +# BImage::renderXImage: ÐÏÍÉÌËÁ ÓÔ×ÏÒÅÎÎÑ XImage\n +$ #UnsupVisual +# BImage::renderXImage: ÃÅÊ ÔÉРצÚÕÁ̦ÚÁæ§ ÎŠЦÄÔÒÉÍÕ¤ÔØÓÑ\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: ÐÏÍÉÌËÁ ÓÔ×ÏÒÅÎÎÑ ÍÁÐÉ Ð¦ËÓÅ̦×\n +$ #InvalidColormapSize +# BImageControl::BImageControl: ÎÅצÒÎÉÊ ÒÏÚÍ¦Ò ÔÁÂÌÉæ ËÏÌØÏÒ¦× %d (%d/%d/%d) - ÚÍÅÎÛÕÀ\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: ÐÏÍÉÌËÁ ÒÏÚͦÝÅÎÎÑ ÔÁÂÌÉæ ËÏÌØÏÒ¦×\n +$ #ColorAllocFail +# BImageControl::BImageControl: ÎÅÍÏÖÌÉ×Ï ÒÏÚͦÓÔÉÔÉ ËÏÌ¦Ò %d/%d/%d Õ ÐÁÍ'ÑÔ¦\n +$ #PixmapRelease +# BImageControl::~BImageControl: ËÅÛ Ð¦ËÓÅÌ¦× ÚÏÂÒÁÖÅÎØ - ÚצÌØÎѤÔØÓÑ %d ÂÌÏ˦×\n +$ #PixmapCacheLarge +# BImageControl::renderImage: ËÅÛ ÚÁ×ÅÌÉËÉÊ, ÐÒÉÍÕÓÏ×Å ÚצÌØÎÅÎÎÑ\n +$ #ColorParseError +# BImageControl::getColor: ÐÏÍÉÌËÁ ÒÏÚÂÏÒÕ ÒÑÄËÁ, ÝÏ ÏÐÉÓÕ¤ ËÏ̦Ò: "%s"\n +$ #ColorAllocError +# BImageControl::getColor: ÐÏÍÉÌËÁ ÒÏÚͦÝÅÎÎÑ ËÏÌØÏÒÕ Õ ÐÁÍ'ÑÔ¦: "%s"\n diff --git a/nls/uk_UA/Makefile.am b/nls/uk_UA/Makefile.am new file mode 100644 index 0000000..7c471a8 --- /dev/null +++ b/nls/uk_UA/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = uk_UA +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/uk_UA/Screen.m b/nls/uk_UA/Screen.m new file mode 100644 index 0000000..f6478c9 --- /dev/null +++ b/nls/uk_UA/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: ÓÔÁÌÁÓÑ ÐÏÍÉÌËÁ ÐÒÉ Ú×ÅÒÔÁÎΦ ÄÏ X ÓÅÒ×ÅÒÁ.\n \ +¶ÎÛÉÊ ÍÅÎÅÄÖÅÒ ×¦ËÏÎ ×ÖÅ ÚÁÐÕÝÅÎÉÊ ÎÁ ÄÉÓÐÌŧ %s.\n +$ #ManagingScreen +# BScreen::BScreen: ÏÂÓÌÕÇÏ×Õ¤ÔØÓÑ ÅËÒÁÎ %d, ÑËÉÊ ×ÉËÏÒÉÓÔÏ×Õ¤ ÔÉРצÚÕÁ̦ÚÁæ§ 0x%lx, ÇÌÉÂÉÎÁ ËÏÌØÏÒÕ %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): ÎÅÍÁ ÍÏÖÌÉ×ÏÓÔ¦ ÚÁ×ÁÎÔÁÖÉÔÉ ÛÒÉÆÔ "%s"\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): ÎÅÍÁ ÍÏÖÌÉ×ÏÓÔ¦ ÚÁ×ÁÎÔÁÖÉÔÉ ÔÉÐÏ×ÉÊ ÛÒÉÆÔ.\n +$ #EmptyMenuFile +# %s: ÐÏÒÏÖÎ¦Ê ÆÁÊÌ ÍÅÎÀ\n +$ #xterm +# Xterm +$ #Restart +# ðÅÒÅÚÁÐÕÓË +$ #Exit +# ÷ÉÈ¦Ä +$ #EXECError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [exec], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ ¦/ÁÂÏ ÎÁÚ×Á ËÏÍÁÎÄÉ\n +$ #EXITError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [exit], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ\n +$ #STYLEError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [style], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ ¦/ÁÂÏ ¦Í'Ñ ÆÁÊÌÕ\n +$ #CONFIGError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [config], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ\n +$ #INCLUDEError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [include], ÎÅ ×ËÁÚÁÎÏ ¦Í'Ñ ÆÁÊÌÕ\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [include], "%s" ÎÅ Ú×ÉÞÁÊÎÉÊ ÆÁÊÌ\n +$ #SUBMENUError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [submenu], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ\n +$ #RESTARTError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [restart], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ\n +$ #RECONFIGError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [reconfig], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ\n +$ #STYLESDIRError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [stylesdir/stylesmenu], ÎÅ ×ËÁÚÁÎÏ ¦Í'Ñ ËÁÔÁÌÏÇÕ\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [stylesdir/stylesmenu], "%s" ÎÅ ËÁÔÁÌÏÇ\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [stylesdir/stylesmenu], "%s" ÎÅ ¦ÓÎÕ¤\n +$ #WORKSPACESError +# BScreen::parseMenuFile: ÐÏÍÉÌËÁ [workspaces], ÎÅ ×ËÁÚÁÎÁ ÎÁÚ×Á ÐÕÎËÔÕ ÍÅÎÀ\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/uk_UA/Slit.m b/nls/uk_UA/Slit.m new file mode 100644 index 0000000..4b5469a --- /dev/null +++ b/nls/uk_UA/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# äÏË +$ #SlitDirection +# ïÒ¦¤ÎÔÁÃ¦Ñ ÄÏËÕ +$ #SlitPlacement +# í¦ÓÃÅÐÏÌÏÖÅÎÎÑ ÄÏËÕ diff --git a/nls/uk_UA/Toolbar.m b/nls/uk_UA/Toolbar.m new file mode 100644 index 0000000..373e254 --- /dev/null +++ b/nls/uk_UA/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# ÐÏ +$ #NoStrftimeTimeFormatA +# ÄÏ +$ #ToolbarTitle +# ðÅÎÁÌ +$ #EditWkspcName +# òÅÄÁÇÕ×ÁÔÉ ¦Í'Ñ ÐÏÔÏÞÎÏÇÏ ÒÏÂÏÞÏÇÏ Í¦ÓÃÑ +$ #ToolbarPlacement +# í¦ÓÃÅ ÒÏÚÔÁÛÕ×ÁÎÎÑ ÐÅÎÁÌÁ diff --git a/nls/uk_UA/Window.m b/nls/uk_UA/Window.m new file mode 100644 index 0000000..d58616b --- /dev/null +++ b/nls/uk_UA/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: ÓÔ×ÏÒÀ¤ÔØÓÑ 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: ÎÅ ×ÄÁÌÏÓÑ ÏÔÒÉÍÁÔÉ ÁÔÒÉÂÕÔÉ ×¦ËÎÁ (XGetWindowAttributres)\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: ÎÅÍÁ ÍÏÖÌÉ×ÏÓÔ¦ ÚÎÁÊÔÉ ÅËÒÁÎ ÄÌÑ ËÏÒÅÎÅ×ÏÇÏ ×¦ËÎÁ 0x%lx\n +$ #Unnamed +# îÅÎÁÚ×ÁÎÅ +$ #MapRequest +# BlackboxWindow::mapRequestEvent() ÄÌÑ 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() ÄÌÑ 0x%lx\n +$ #UnmapNotifyReparent +# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n diff --git a/nls/uk_UA/Windowmenu.m b/nls/uk_UA/Windowmenu.m new file mode 100644 index 0000000..2213e28 --- /dev/null +++ b/nls/uk_UA/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# ÷¦ÄÐÒÁ×ÉÔÉ ÎÁ ... +$ #Shade +# úÇÏÒÎÕÔÉ Õ ÓÍÕÖËÕ +$ #Iconify +# úÇÏÒÎÕÔÉ +$ #Maximize +# òÏÚÇÏÒÎÕÔÉ +$ #Raise +# ð¦ÄÎÑÔÉ ÎÁ×ÅÒÈ +$ #Lower +# ïÐÕÓÔÉÔÉ ×ÎÉÚ +$ #Stick +# ðÒÉËÌŧÔÉ +$ #KillClient +# ÷ÂÉÔÉ ÐÒÏÇÒÁÍÕ +$ #Close +# úÁËÒÉÔÉ diff --git a/nls/uk_UA/Workspace.m b/nls/uk_UA/Workspace.m new file mode 100644 index 0000000..9fd9f44 --- /dev/null +++ b/nls/uk_UA/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# òÏÂÏÞŠͦÓÃÅ %d diff --git a/nls/uk_UA/Workspacemenu.m b/nls/uk_UA/Workspacemenu.m new file mode 100644 index 0000000..f472954 --- /dev/null +++ b/nls/uk_UA/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# òÏÂÏÞ¦ ͦÓÃÑ +$ #NewWorkspace +# îÏ×Å ÒÏÂÏÞŠͦÓÃÅ +$ #RemoveLast +# ÷ÉÄÁÌÉÔÉ ÏÓÔÁÎΤ diff --git a/nls/uk_UA/blackbox.m b/nls/uk_UA/blackbox.m new file mode 100644 index 0000000..235f084 --- /dev/null +++ b/nls/uk_UA/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ÎÅ ÚÎÁÊÄÅÎÏ ÅËÒÁÎ¦× ÄÌÑ ÏÂÓÌÕÇÏ×Õ×ÁÎÎÑ, ÐÅÒÅÒÉ×ÁÎÎÑ...\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/uk_UA/bsetroot.m b/nls/uk_UA/bsetroot.m new file mode 100644 index 0000000..a9e62ff --- /dev/null +++ b/nls/uk_UA/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: ÐÏÍÉÌËÁ: ÎÅÏÂȦÄÎÏ ÚÁÄÁÔÉ ÏÄÉÎ Ú ÎÁÓÔÕÐÎÉÈ ËÌÀÞ¦×: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> ÏÂÓÌÕÇÏ×Õ×ÁÔÉ ×ËÁÚÁÎÉÊ ÄÉÓÐÌÅÊ\n\ + -mod <x> <y> ÍÁËÅÔ Ë̦ÔËÉ\n\ + -foreground, -fg <color> ËÏÌ¦Ò ÐÅÒÅÄÎØÏÇÏ ÐÌÁÎÕ Ë̦ÔËÉ\n\ + -background, -bg <color> ËÏÌ¦Ò ÔÌÁ Ë̦ÔËÉ\n\n\ + -gradient <texture> ÇÒÁĦ¤ÎÔ\n\ + -from <color> ÐÏÞÁÔËÏ×ÉÊ ËÏÌ¦Ò ÇÒÁĦ¤ÎÔÁ\n\ + -to <color> ˦ÎÃÅ×ÉÊ ËÏÌ¦Ò ÇÒÁĦ¤ÎÔÁ\n\n\ + -solid <color> ÓÕæÌØÎÉÊ ËÏ̦Ò\n\n\ + -help ×É×ÅÓÔÉ ÃÀ ЦÄËÁÚËÕ ¦ ×ÉÊÔÉ\n + diff --git a/nls/uk_UA/common.m b/nls/uk_UA/common.m new file mode 100644 index 0000000..5219f7a --- /dev/null +++ b/nls/uk_UA/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# ôÁË +$ #No +# î¦ + +$ #DirectionTitle +# îÁÐÒÑÍÏË +$ #DirectionHoriz +# çÏÒÉÚÏÎÔÁÌØÎÏ +$ #DirectionVert +# ÷ÅÒÔÉËÁÌØÎÏ + +$ #AlwaysOnTop +# úÁ×ÖÄÉ ÎÁÇÏÒ¦ + +$ #PlacementTitle +# í¦ÓÃÅ ÒÏÚÔÁÛÕ×ÁÎÎÑ +$ #PlacementTopLeft +# õÇÏÒ¦ ¦ ̦×ÏÒÕÞ +$ #PlacementCenterLeft +# ðÏ ÃÅÎÔÒÕ ¦ ̦×ÏÒÕÞ +$ #PlacementBottomLeft +# õÎÉÚÕ ¦ ̦×ÏÒÕÞ +$ #PlacementTopCenter +# ú×ÅÒÈÕ ¦ ÐÏ ÃÅÎÔÒÕ +$ #PlacementBottomCenter +# úÎÉÚÕ ¦ ÐÏ ÃÅÎÔÒÕ +$ #PlacementTopRight +# ú×ÅÒÈÕ ¦ ÐÒÁ×ÏÒÕÞ +$ #PlacementCenterRight +# ðÏ ÃÅÎÔÒÕ ¦ ÐÒÁ×ÏÒÕÞ +$ #PlacementBottomRight +# õÎÉÚÕ ¦ ÐÒÁ×ÏÒÕÞ + +$ #AutoHide +# á×ÔÏÍÁÔÉÞÎÏ ÈÏ×ÁÔÉ diff --git a/nls/uk_UA/main.m b/nls/uk_UA/main.m new file mode 100644 index 0000000..a5e4bb4 --- /dev/null +++ b/nls/uk_UA/main.m @@ -0,0 +1,21 @@ +$set 14 #main + +$ #RCRequiresArg +# ÐÏÍÉÌËÁ: "-rc" ×ÉÍÁÇÁ¤ ÁÒÇÕÍÅÎÔ\n +$ #DISPLAYRequiresArg +# ÐÏÍÉÌËÁ: "-display" ×ÉÍÁÇÁ¤ ÁÒÇÕÍÅÎÔ\n +$ #WarnDisplaySet +# ÐÏÐÅÒÅÄÖÅÎÎÑ: ÎÅ ×ÄÁÌÏÓÑ ×ÓÔÁÎÏ×ÉÔÉ ÚͦÎÎÕ ÓÅÒÅÄÏ×ÉÝÁ "DISPLAY"\n +$ #Usage +# Blackbox %s: (c) 1997 - 2000 Brad Hughes\n\n\ + -display <string>\t\tÏÂÓÌÕÇÏ×Õ×ÁÔÉ ×ËÁÚÁÎÉÊ ÄÉÓÐÌÅÊ.\n\ + -rc <string>\t\t\t×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ ÁÌØÔÅÒÎÁÔÉ×ÎÉÊ ÆÁÊÌ ÒÅÓÕÒÓ¦×.\n\ + -version\t\t\t×É×ÅÓÔÉ ÎÏÍÅÒ ×ÅÒÓ¦§ ¦ ×ÉÊÔÉ.\n\ + -help\t\t\t\t×É×ÅÓÔÉ ÃÀ ЦÄËÁÚËÕ ¦ ×ÉÊÔÉ.\n\n +$ #CompileOptions +# Compile time options:\n\ + Debugging\t\t\t%s\n\ + Interlacing:\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + Slit:\t\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/zh_CN/BaseDisplay.m b/nls/zh_CN/BaseDisplay.m new file mode 100644 index 0000000..dcdd194 --- /dev/null +++ b/nls/zh_CN/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X ´íÎó: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: ²¶»ñÐźŠ%d \n +$ #ShuttingDown +# ¹Ø±Õ\n +$ #Aborting +# ÕýÔÚÍ˳ö... ´æ´¢ºËÐÄÊý¾Ý\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: Á¬½Ó X ·þÎñÆ÷ʧ°Ü.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): ÕýÔÚ´Óʼþ¶ÓÁÐÖÐɾ³ý»µ´°¿Ú\n diff --git a/nls/zh_CN/Basemenu.m b/nls/zh_CN/Basemenu.m new file mode 100644 index 0000000..64d7157 --- /dev/null +++ b/nls/zh_CN/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox ²Ëµ¥ diff --git a/nls/zh_CN/Configmenu.m b/nls/zh_CN/Configmenu.m new file mode 100644 index 0000000..c640405 --- /dev/null +++ b/nls/zh_CN/Configmenu.m @@ -0,0 +1,42 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# ÅäÖÃÑ¡Ïî +$ #FocusModel +# ¾Û½¹Ä£Ê½ +$ #WindowPlacement +# ´°¿Ú·ÅÖà +$ #ImageDithering +# ͼÏñµ÷г +$ #OpaqueMove +# ÏÔʾÒƶ¯´°¿ÚÄÚÈÝ +$ #FullMax +# ÍêÈ«×î´ó»¯ +$ #FocusNew +# ¾Û½¹Ð´°¿Ú +$ #FocusLast +# ×ÀÃæ¸Ä±äʱ¾Û½¹´°¿Ú +$ #DisableBindings +# Scroll LockÈ¡ÏûÈȼü +$ #ClickToFocus +# µã»÷¾Û½¹ +$ #SloppyFocus +# ×Ô¶¯¾Û½¹ +$ #AutoRaise +# ×Ô¶¯ÉýÆð +$ #ClickRaise +# µã»÷ÉýÆð +$ #SmartRows +# ×Ô¶¯·ÅÖÃ(ÐÐ) +$ #SmartCols +# ×Ô¶¯·ÅÖÃ(ÁÐ) +$ #Cascade +# ²ãµþ·ÅÖà +$ #LeftRight +# ´Ó×óµ½ÓÒ +$ #RightLeft +# ´ÓÓÒµ½×ó +$ #TopBottom +# ´ÓÉϵ½Ï +$ #BottomTop +# ´Óϵ½ÉÏ diff --git a/nls/zh_CN/Icon.m b/nls/zh_CN/Icon.m new file mode 100644 index 0000000..06ebc54 --- /dev/null +++ b/nls/zh_CN/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# ͼ±ê diff --git a/nls/zh_CN/Image.m b/nls/zh_CN/Image.m new file mode 100644 index 0000000..fcb973e --- /dev/null +++ b/nls/zh_CN/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: ´´½¨pixmap³ö´í\n +$ #ErrorCreatingXImage +# BImage::renderXImage: ´´½¨XImage³ö´í\n +$ #UnsupVisual +# BImage::renderXImage: unsupported visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: ´´½¨pixmap³ö´í\n +$ #InvalidColormapSize +# BImageControl::BImageControl: invalid colormap size %d (%d/%d/%d) - reducing\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: error allocating colormap\n +$ #ColorAllocFail +# BImageControl::BImageControl: failed to alloc color %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - releasing %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache is large, forcing cleanout\n +$ #ColorParseError +# BImageControl::getColor: color parse error: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: color alloc error: '%s'\n diff --git a/nls/zh_CN/Makefile.am b/nls/zh_CN/Makefile.am new file mode 100644 index 0000000..d8955c1 --- /dev/null +++ b/nls/zh_CN/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = zh_CN +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/zh_CN/Screen.m b/nls/zh_CN/Screen.m new file mode 100644 index 0000000..3baba99 --- /dev/null +++ b/nls/zh_CN/Screen.m @@ -0,0 +1,52 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: ²éѯX·þÎñÆ÷ʱ³ö´í.\n \ +ÒѾÓÐÁíÒ»¸ö´°¿Ú¹ÜÀíÆ÷ÔÚÔËÐÐ %s.\n +$ #ManagingScreen +# BScreen::BScreen: ¶ÔÆÁÄ» %d ʹÓÃÊÓ 0x%lx, Éî¶È %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): ÎÞ·¨ÔØÈë×ÖÌå '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): ÎÞ·¨ÔØÈëĬÈÏ×ÖÌå.\n +$ #EmptyMenuFile +# %s: Çå¿Õ²Ëµ¥Îļþ\n +$ #xterm +# xterm +$ #Restart +# ÖØпªÊ¼ +$ #Exit +# Í˳ö +$ #EXECError +# BScreen::parseMenuFile: [exec] ´íÎó, ûÓв˵¥µÄ±êÌâ»òÃüÁî\n +$ #EXITError +# BScreen::parseMenuFile: [exit] ´íÎó, ûÓв˵¥µÄ±êÌâ\n +$ #STYLEError +# BScreen::parseMenuFile: [style] ´íÎó, ûÓв˵¥±êÌâ»òÎļþÃû\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] ´íÎó, ûÓв˵¥±êÌâ\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] ´íÎó, ûÓÐÎļþÃû\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] ´íÎó, '%s' ²»ÊÇÒ»¸öÆÕͨÎļþ\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] ´íÎó, ûÓв˵¥±êÌâ\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] ´íÎó, ûÓв˵¥±êÌâ\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] ´íÎó, ûÓв˵¥±êÌâ\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] ´íÎó, ûÓÐÖ¸ÃûĿ¼\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] ´íÎó, '%s' ²»ÊÇĿ¼\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] ´íÎó, '%s' ²»´æÔÚ\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] ´íÎó, ûÓв˵¥±êÌâ\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# ×ó: %4d x ÉÏ: %4d +$ #GeometryFormat +# ¿í: %4d x ¸ß: %4d + diff --git a/nls/zh_CN/Slit.m b/nls/zh_CN/Slit.m new file mode 100644 index 0000000..5bc50ff --- /dev/null +++ b/nls/zh_CN/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# Slit +$ #SlitDirection +# Slit ·½Ïò +$ #SlitPlacement +# Slit ·ÅÖà diff --git a/nls/zh_CN/Toolbar.m b/nls/zh_CN/Toolbar.m new file mode 100644 index 0000000..4115eee --- /dev/null +++ b/nls/zh_CN/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# ¹¤¾ßÌõ +$ #EditWkspcName +# ±à¼×ÀÃæÃû +$ #ToolbarPlacement +# ¹¤¾ßÌõ·ÅÖà diff --git a/nls/zh_CN/Window.m b/nls/zh_CN/Window.m new file mode 100644 index 0000000..d548395 --- /dev/null +++ b/nls/zh_CN/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: ÕýÔÚ´´½¨ 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres ʧ°Ü\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: cannot find screen for root window 0x%lx\n +$ #Unnamed +# ÎÞÃüÃû +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #ReparentNotify +# BlackboxWindow::reparentNotifyEvent: reparent 0x%lx to 0x%lx\n diff --git a/nls/zh_CN/Windowmenu.m b/nls/zh_CN/Windowmenu.m new file mode 100644 index 0000000..a98d39d --- /dev/null +++ b/nls/zh_CN/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# ·¢Ë͵½... +$ #Shade +# ¾íÁ± +$ #Iconify +# ͼ±ê»¯ +$ #Maximize +# ×î´ó»¯ +$ #Raise +# ·ÅÇ° +$ #Lower +# ·Åºó +$ #Stick +# ¶¤×¡ +$ #KillClient +# ɱËÀ +$ #Close +# ¹Ø±Õ diff --git a/nls/zh_CN/Workspace.m b/nls/zh_CN/Workspace.m new file mode 100644 index 0000000..b04efed --- /dev/null +++ b/nls/zh_CN/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# ×ÀÃæ %d diff --git a/nls/zh_CN/Workspacemenu.m b/nls/zh_CN/Workspacemenu.m new file mode 100644 index 0000000..0c41e6d --- /dev/null +++ b/nls/zh_CN/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# ×ÀÃæ +$ #NewWorkspace +# н¨×ÀÃæ +$ #RemoveLast +# ɾ³ý×ÀÃæ diff --git a/nls/zh_CN/blackbox.m b/nls/zh_CN/blackbox.m new file mode 100644 index 0000000..e89c766 --- /dev/null +++ b/nls/zh_CN/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: ûÓÐÕÒµ½¿É¿ØÖƵÄÆÁÄ»£¬Í˳ö...\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/zh_CN/bsetroot.m b/nls/zh_CN/bsetroot.m new file mode 100644 index 0000000..5cb8c10 --- /dev/null +++ b/nls/zh_CN/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: ´íÎó: ±ØÐë´ÓÖÐÖ¸¶¨Ò»¸ö: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> ÏÔʾÁ¬½Ó\n\ + -mod <x> <y> ģʽ\n\ + -foreground, -fg <color> Ç°¾°É«\n\ + -background, -bg <color> ±³¾°É«\n\n\ + -gradient <texture> ½¥½øÎÆÀí\n\ + -from <color> ½¥½ø¿ªÊ¼É«\n\ + -to <color> ½¥½ø½áÊøÉ«\n\n\ + -solid <color> µ¥Ò»É«\n\n\ + -help ÏÔʾÕâ¸ö°ïÖú\n + diff --git a/nls/zh_CN/common.m b/nls/zh_CN/common.m new file mode 100644 index 0000000..5eca4c9 --- /dev/null +++ b/nls/zh_CN/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# ÊÇ +$ #No +# ·ñ + +$ #DirectionTitle +# ·½Ïò +$ #DirectionHoriz +# ˮƽ +$ #DirectionVert +# ´¹Ö± + +$ #AlwaysOnTop +# ×ÜÔÚ×îÉÏÃæ + +$ #PlacementTitle +# ·ÅÖà +$ #PlacementTopLeft +# ÉÏ×ó +$ #PlacementCenterLeft +# ÖÐ×ó +$ #PlacementBottomLeft +# ÏÂ×ó +$ #PlacementTopCenter +# ÉÏÖÐ +$ #PlacementBottomCenter +# ÏÂÖÐ +$ #PlacementTopRight +# ÉÏÓÒ +$ #PlacementCenterRight +# ÖÐÓÒ +$ #PlacementBottomRight +# ÏÂÓÒ + +$ #AutoHide +# ×Ô¶¯Òþ²Ø diff --git a/nls/zh_CN/main.m b/nls/zh_CN/main.m new file mode 100644 index 0000000..266d354 --- /dev/null +++ b/nls/zh_CN/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# ´íÎó: '-rc' ÐèÒª²ÎÊý\n +$ #DISPLAYRequiresArg +# ´íÎó: '-display' ÐèÒª²ÎÊý\n +$ #WarnDisplaySet +# ¾¯¸æ: ²»ÄÜÉèÖû·¾³±äÁ¿ 'DISPLAY'\n +$ #Usage +# Blackbox %s: (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tʹÓÃÏÔʾÁ¬½Ó.\n\ + -rc <string>\t\t\tʹÓÃÆäËûµÄ×ÊÔ´Îļþ.\n\ + -version\t\t\tÏÔʾ°æ±¾.\n\ + -help\t\t\t\tÏÔʾÕâ¸ö°ïÖú.\n\n +$ #CompileOptions +# ±àÒëÑ¡Ïî:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/nls/zh_TW/BaseDisplay.m b/nls/zh_TW/BaseDisplay.m new file mode 100644 index 0000000..f7f3d9b --- /dev/null +++ b/nls/zh_TW/BaseDisplay.m @@ -0,0 +1,16 @@ +$set 1 #BaseDisplay + +$ #XError +# %s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n +$ #SignalCaught +# %s: signal %d caught\n +$ #ShuttingDown +# shutting down\n +$ #Aborting +# aborting... dumping core\n +$ #XConnectFail +# BaseDisplay::BaseDisplay: connection to X server failed.\n +$ #CloseOnExecFail +# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n +$ #BadWindowRemove +# BaseDisplay::eventLoop(): removing bad window from event queue\n diff --git a/nls/zh_TW/Basemenu.m b/nls/zh_TW/Basemenu.m new file mode 100644 index 0000000..abafb6c --- /dev/null +++ b/nls/zh_TW/Basemenu.m @@ -0,0 +1,4 @@ +$set 2 #Basemenu + +$ #BlackboxMenu +# Blackbox ¿ï³æ diff --git a/nls/zh_TW/Configmenu.m b/nls/zh_TW/Configmenu.m new file mode 100644 index 0000000..528c6cd --- /dev/null +++ b/nls/zh_TW/Configmenu.m @@ -0,0 +1,38 @@ +$set 3 #Configmenu + +$ #ConfigOptions +# ²ÕºA¿ï¶µ +$ #FocusModel +# «ü¼Ð¼Ò¦¡³]©w +$ #WindowPlacement +# µøµ¡¦ì¸m³]©w +$ #ImageDithering +# ¹Ï¹³§Ý°ÊÃyÃè +$ #OpaqueMove +# µøµ¡²¾°Ê¤£³z©ú³]©w +$ #FullMax +# µøµ¡³Ì¤j¤Æ¦Ü¥þ¿Ã¹õ +$ #FocusNew +# «ü¼Ð¬°·sªºµøµ¡ +$ #FocusLast +# ·í¤u§@°ÏÅܤƦ۰ʫü¼Ð¦Üµøµ¡ +$ #ClickToFocus +# ÂI¿ï¦Ñ¹«©ó«ü¼Ð +$ #SloppyFocus +# ¦Û°Ê«ü¼Ð·í¦bµøµ¡¤W± +$ #AutoRaise +# ¦Û°Ê³Ì¤W¼h +$ #SmartRows +# ¦Û°Ê©ñ¸m·sªºµøµ¡¦ì¸m (¦æ) +$ #SmartCols +# ¦Û°Ê©ñ¸m·sªºµøµ¡¦ì¸m (¦C) +$ #Cascade +# ±ÀÅ|ªº©ñ¸m·sªºµøµ¡¦ì¸m +$ #LeftRight +# ¥Ñ¥ª¦Ü¥k +$ #RightLeft +# ¥Ñ¥k¦Ü¥ª +$ #TopBottom +# ¥Ñ¤W¦Ü¤U +$ #BottomTop +# ¥Ñ¤U¦Ü¤W diff --git a/nls/zh_TW/Icon.m b/nls/zh_TW/Icon.m new file mode 100644 index 0000000..f03bfbd --- /dev/null +++ b/nls/zh_TW/Icon.m @@ -0,0 +1,4 @@ +$set 4 #Icon + +$ #Icons +# ¹Ï¥Ü diff --git a/nls/zh_TW/Image.m b/nls/zh_TW/Image.m new file mode 100644 index 0000000..5dd251a --- /dev/null +++ b/nls/zh_TW/Image.m @@ -0,0 +1,24 @@ +$set 5 #Image + +$ #ErrorCreatingSolidPixmap +# BImage::render_solid: error creating pixmap\n +$ #ErrorCreatingXImage +# BImage::renderXImage: error creating XImage\n +$ #UnsupVisual +# BImage::renderXImage: unsupported visual\n +$ #ErrorCreatingPixmap +# BImage::renderPixmap: error creating pixmap\n +$ #InvalidColormapSize +# BImageControl::BImageControl: invalid colormap size %d (%d/%d/%d) - reducing\n +$ #ErrorAllocatingColormap +# BImageControl::BImageControl: error allocating colormap\n +$ #ColorAllocFail +# BImageControl::BImageControl: failed to alloc color %d/%d/%d\n +$ #PixmapRelease +# BImageControl::~BImageControl: pixmap cache - releasing %d pixmaps\n +$ #PixmapCacheLarge +# BImageControl::renderImage: cache is large, forcing cleanout\n +$ #ColorParseError +# BImageControl::getColor: color parse error: '%s'\n +$ #ColorAllocError +# BImageControl::getColor: color alloc error: '%s'\n diff --git a/nls/zh_TW/Makefile.am b/nls/zh_TW/Makefile.am new file mode 100644 index 0000000..37b5290 --- /dev/null +++ b/nls/zh_TW/Makefile.am @@ -0,0 +1,35 @@ +# Makefile.am for Blackbox - an X11 Window Manager + +NLSTEST = @NLS@ +THE_LANG = zh_TW +THE_NLS_PATH = $(DESTDIR)$(pkgdatadir)/nls/$(THE_LANG) +CLEANFILES = blackbox.cat +MAINTAINERCLEANFILES = Makefile.in Translation.m +DISTCLEANFILES = Translation.m +MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/blackbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m + +all-local: blackbox.cat +install-data-local: blackbox.cat + @if test x$(NLSTEST) = "x-DNLS"; then \ + echo "Installing catalog in $(THE_NLS_PATH)"; \ + $(mkinstalldirs) $(THE_NLS_PATH); \ + $(INSTALL_DATA) blackbox.cat $(THE_NLS_PATH); \ + fi +uninstall-local: + @if test x$(NLSTEST) = "x-DNLS"; then \ + rm -f $(THE_NLS_PATH)/blackbox.cat; \ + rmdir $(THE_NLS_PATH); \ + fi + +Translation.m: $(MFILES) + @if test x$(NLSTEST) = "x-DNLS"; then \ + awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \ + fi + +blackbox.cat: Translation.m + @if test x$(NLSTEST) = "x-DNLS"; then \ + $(gencat_cmd) blackbox.cat Translation.m; \ + fi + +distclean-local: + rm -f *\~ .\#* diff --git a/nls/zh_TW/Screen.m b/nls/zh_TW/Screen.m new file mode 100644 index 0000000..128c06e --- /dev/null +++ b/nls/zh_TW/Screen.m @@ -0,0 +1,54 @@ +$set 6 #Screen + +$ #AnotherWMRunning +# BScreen::BScreen: an error occured while querying the X server.\n \ +another window manager is already running on display %s.\n +$ #ManagingScreen +# BScreen::BScreen: managing screen %d using visual 0x%lx, depth %d\n +$ #FontLoadFail +# BScreen::LoadStyle(): couldn't load font '%s'\n +$ #DefaultFontLoadFail +# BScreen::LoadStyle(): couldn't load default font.\n +$ #EmptyMenuFile +# %s: empty menu file\n +$ #xterm +# xterm +$ #Restart +# Restart +$ #Exit +# Exit +$ #EXECError +# BScreen::parseMenuFile: [exec] error, no menu label and/or command defined\n +$ #EXITError +# BScreen::parseMenuFile: [exit] error, no menu label defined\n +$ #STYLEError +# BScreen::parseMenuFile: [style] error, no menu label and/or filename \ +defined\n +$ #CONFIGError +# BScreen::parseMenuFile: [config] error, no menu label defined\n +$ #INCLUDEError +# BScreen::parseMenuFile: [include] error, no filename defined\n +$ #INCLUDEErrorReg +# BScreen::parseMenuFile: [include] error, '%s' is not a regular file\n +$ #SUBMENUError +# BScreen::parseMenuFile: [submenu] error, no menu label defined\n +$ #RESTARTError +# BScreen::parseMenuFile: [restart] error, no menu label defined\n +$ #RECONFIGError +# BScreen::parseMenuFile: [reconfig] error, no menu label defined\n +$ #STYLESDIRError +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, no directory defined\n +$ #STYLESDIRErrorNotDir +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' is not a \ +directory\n +$ #STYLESDIRErrorNoExist +# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' does not exist\n +$ #WORKSPACESError +# BScreen::parseMenuFile: [workspaces] error, no menu label defined\n +$ #PositionLength +# 0: 0000 x 0: 0000 +$ #PositionFormat +# X: %4d x Y: %4d +$ #GeometryFormat +# W: %4d x H: %4d + diff --git a/nls/zh_TW/Slit.m b/nls/zh_TW/Slit.m new file mode 100644 index 0000000..4e02b6c --- /dev/null +++ b/nls/zh_TW/Slit.m @@ -0,0 +1,8 @@ +$set 7 #Slit + +$ #SlitTitle +# ®à±À³¥Îµ{¦¡ +$ #SlitDirection +# ®à±À³¥Îµ{¦¡¤è¦V +$ #SlitPlacement +# ®à±À³¥Îµ{¦¡¦ì¸m diff --git a/nls/zh_TW/Toolbar.m b/nls/zh_TW/Toolbar.m new file mode 100644 index 0000000..fbe36c1 --- /dev/null +++ b/nls/zh_TW/Toolbar.m @@ -0,0 +1,22 @@ +$set 8 #Toolbar + +$ #NoStrftimeLength +# 00:00000 +$ #NoStrftimeDateFormat +# %02d/%02d/%02d +$ #NoStrftimeDateFormatEu +# %02d.%02d.%02d +$ #NoStrftimeTimeFormat24 +# %02d:%02d +$ #NoStrftimeTimeFormat12 +# %02d:%02d %sm +$ #NoStrftimeTimeFormatP +# p +$ #NoStrftimeTimeFormatA +# a +$ #ToolbarTitle +# ¤u¨ã¦C +$ #EditWkspcName +# ½s¿è¥Ø«e¤u§@°Ï¦WºÙ +$ #ToolbarPlacement +# ¤u¨ã¦C¦ì¸m diff --git a/nls/zh_TW/Window.m b/nls/zh_TW/Window.m new file mode 100644 index 0000000..be677cd --- /dev/null +++ b/nls/zh_TW/Window.m @@ -0,0 +1,17 @@ +$set 9 #Window + + +$ #Creating +# BlackboxWindow::BlackboxWindow: creating 0x%lx\n +$ #XGetWindowAttributesFail +# BlackboxWindow::BlackboxWindow: XGetWindowAttributres failed\n +$ #CannotFindScreen +# BlackboxWindow::BlackboxWindow: cannot find screen for root window 0x%lx\n +$ #Unnamed +# Unnamed +$ #MapRequest +# BlackboxWindow::mapRequestEvent() for 0x%lx\n +$ #UnmapNotify +# BlackboxWindow::unmapNotifyEvent() for 0x%lx\n +$ #UnmapNotifyReparent +# BlackboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n diff --git a/nls/zh_TW/Windowmenu.m b/nls/zh_TW/Windowmenu.m new file mode 100644 index 0000000..c0acb92 --- /dev/null +++ b/nls/zh_TW/Windowmenu.m @@ -0,0 +1,20 @@ +$set 10 #Windowmenu + +$ #SendTo +# ¶Ç°e¦Ü... +$ #Shade +# ¦V¤WÁY°_ +$ #Iconify +# ³Ì¤p¤Æ +$ #Maximize +# ³Ì¤j¤Æ +$ #Raise +# ¤W¼h +$ #Lower +# ¤U¼h +$ #Stick +# °v¦í +$ #KillClient +# ±j¨îÃö³¬ +$ #Close +# Ãö³¬ diff --git a/nls/zh_TW/Workspace.m b/nls/zh_TW/Workspace.m new file mode 100644 index 0000000..585478d --- /dev/null +++ b/nls/zh_TW/Workspace.m @@ -0,0 +1,4 @@ +$set 11 #Workspace + +$ #DefaultNameFormat +# ¤u§@°Ï %d diff --git a/nls/zh_TW/Workspacemenu.m b/nls/zh_TW/Workspacemenu.m new file mode 100644 index 0000000..601d0d3 --- /dev/null +++ b/nls/zh_TW/Workspacemenu.m @@ -0,0 +1,8 @@ +$set 12 #Workspacemenu + +$ #WorkspacesTitle +# ¤u§@°Ï +$ #NewWorkspace +# ·sªº¤u§@°Ï +$ #RemoveLast +# ²¾°£³Ì«áªº¤u§@°Ï diff --git a/nls/zh_TW/blackbox.m b/nls/zh_TW/blackbox.m new file mode 100644 index 0000000..74d09f6 --- /dev/null +++ b/nls/zh_TW/blackbox.m @@ -0,0 +1,6 @@ +$set 13 #blackbox + +$ #NoManagableScreens +# Blackbox::Blackbox: no managable screens found, aborting\n +$ #MapRequest +# Blackbox::process_event: MapRequest for 0x%lx\n diff --git a/nls/zh_TW/bsetroot.m b/nls/zh_TW/bsetroot.m new file mode 100644 index 0000000..e7307dd --- /dev/null +++ b/nls/zh_TW/bsetroot.m @@ -0,0 +1,17 @@ +$set 16 #bsetroot + +$ #MustSpecify +# %s: error: must specify one of: -solid, -mod, -gradient\n +$ #Usage +# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\ + (c) 2001-2002 Sean 'Shaleh' Perry\n\n\ + -display <string> display connection\n\ + -mod <x> <y> modula pattern\n\ + -foreground, -fg <color> modula foreground color\n\ + -background, -bg <color> modula background color\n\n\ + -gradient <texture> gradient texture\n\ + -from <color> gradient start color\n\ + -to <color> gradient end color\n\n\ + -solid <color> solid color\n\n\ + -help print this help text and exit\n + diff --git a/nls/zh_TW/common.m b/nls/zh_TW/common.m new file mode 100644 index 0000000..b693e0b --- /dev/null +++ b/nls/zh_TW/common.m @@ -0,0 +1,38 @@ +$set 15 #Common + +$ #Yes +# ¥¿½T +$ #No +# ¨ú®ø + +$ #DirectionTitle +# ¤è¦V +$ #DirectionHoriz +# ¾î¦V +$ #DirectionVert +# ª½¦V + +$ #AlwaysOnTop +# ¥Ã»·¦b³Ì¤W¼h + +$ #PlacementTitle +# ©ñ¸m +$ #PlacementTopLeft +# ¥ª¤W +$ #PlacementCenterLeft +# ¥ªÃä¸m¤¤ +$ #PlacementBottomLeft +# ¥ª¤U +$ #PlacementTopCenter +# ³Ì¤W¸m¤¤ +$ #PlacementBottomCenter +# ³Ì¤U¸m¤¤ +$ #PlacementTopRight +# ¥k¤W +$ #PlacementCenterRight +# ¥kÃä¸m¤¤ +$ #PlacementBottomRight +# ¥k¤U + +$ #AutoHide +# ¦Û°ÊÁôÂà diff --git a/nls/zh_TW/main.m b/nls/zh_TW/main.m new file mode 100644 index 0000000..b8d2baf --- /dev/null +++ b/nls/zh_TW/main.m @@ -0,0 +1,20 @@ +$set 14 #main + +$ #RCRequiresArg +# error: '-rc' requires an argument\n +$ #DISPLAYRequiresArg +# error: '-display' requires an argument\n +$ #WarnDisplaySet +# warning: could not set environment variable 'DISPLAY'\n +$ #Usage +# Blackbox %s : (c) 2001 - 2002 Sean 'Shaleh' Perry\n\ + \t\t\t 1997 - 2000, 2002 Brad Hughes\n\n\ + -display <string>\t\tuse display connection.\n\ + -rc <string>\t\t\tuse alternate resource file.\n\ + -version\t\t\tdisplay version and exit.\n\ + -help\t\t\t\tdisplay this help text and exit.\n\n +$ #CompileOptions +# Compile time options:\n\ + Debugging\t\t\t%s\n\ + Shape:\t\t\t%s\n\ + 8bpp Ordered Dithering:\t%s\n\n diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc new file mode 100644 index 0000000..d3c048f --- /dev/null +++ b/src/BaseDisplay.cc @@ -0,0 +1,477 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// BaseDisplay.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xatom.h> +#include <X11/Xutil.h> +#include <X11/keysym.h> + +#include <X11/extensions/windowswm.h> +#include <X11/extensions/windowswmstr.h> + +#ifdef SHAPE +# include <X11/extensions/shape.h> +#endif // SHAPE + +#ifdef HAVE_FCNTL_H +# include <fcntl.h> +#endif // HAVE_FCNTL_H + +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif // HAVE_STDLIB_H + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H + +#ifdef HAVE_UNISTD_H +# include <sys/types.h> +# include <unistd.h> +#endif // HAVE_UNISTD_H + +#ifdef HAVE_SYS_SELECT_H +# include <sys/select.h> +#endif // HAVE_SYS_SELECT_H + +#ifdef HAVE_SIGNAL_H +# include <signal.h> +#endif // HAVE_SIGNAL_H + +#ifndef SA_NODEFER +# ifdef SA_INTERRUPT +# define SA_NODEFER SA_INTERRUPT +# else // !SA_INTERRUPT +# define SA_NODEFER (0) +# endif // SA_INTERRUPT +#endif // SA_NODEFER + +#ifdef HAVE_SYS_WAIT_H +# include <sys/types.h> +# include <sys/wait.h> +#endif // HAVE_SYS_WAIT_H +} + +#include <string> +using std::string; + +#include "i18n.hh" +#include "BaseDisplay.hh" +#include "GCCache.hh" +#include "Timer.hh" +#include "Util.hh" + + +// X error handler to handle any and all X errors while the application is +// running +static bool internal_error = False; + +BaseDisplay *base_display; + +static int handleXErrors(Display *d, XErrorEvent *e) { +#ifdef DEBUG + char errtxt[128]; + + XGetErrorText(d, e->error_code, errtxt, 128); + fprintf(stderr, + i18n(BaseDisplaySet, BaseDisplayXError, + "%s: X error: %s(%d) opcodes %d/%d\n resource 0x%lx\n"), + base_display->getApplicationName(), errtxt, e->error_code, + e->request_code, e->minor_code, e->resourceid); +#else + // shutup gcc + (void) d; + (void) e; +#endif // DEBUG + + if (internal_error) abort(); + + return(False); +} + + +// signal handler to allow for proper and gentle shutdown + +#ifndef HAVE_SIGACTION +static RETSIGTYPE signalhandler(int sig) { +#else // HAVE_SIGACTION +static void signalhandler(int sig) { +#endif // HAVE_SIGACTION + + static int re_enter = 0; + + switch (sig) { + case SIGCHLD: + int status; + waitpid(-1, &status, WNOHANG | WUNTRACED); + +#ifndef HAVE_SIGACTION + // assume broken, braindead sysv signal semantics + signal(SIGCHLD, (RETSIGTYPE (*)(int)) signalhandler); +#endif // HAVE_SIGACTION + + break; + + default: + if (base_display->handleSignal(sig)) { + +#ifndef HAVE_SIGACTION + // assume broken, braindead sysv signal semantics + signal(sig, (RETSIGTYPE (*)(int)) signalhandler); +#endif // HAVE_SIGACTION + + return; + } + + fprintf(stderr, i18n(BaseDisplaySet, BaseDisplaySignalCaught, + "%s: signal %d caught\n"), + base_display->getApplicationName(), sig); + + if (! base_display->isStartup() && ! re_enter) { + internal_error = True; + + re_enter = 1; + fprintf(stderr, i18n(BaseDisplaySet, BaseDisplayShuttingDown, + "shutting down\n")); + base_display->shutdown(); + } + + if (sig != SIGTERM && sig != SIGINT) { + fprintf(stderr, i18n(BaseDisplaySet, BaseDisplayAborting, + "aborting... dumping core\n")); + abort(); + } + + exit(0); + + break; + } +} + + +BaseDisplay::BaseDisplay(const char *app_name, const char *dpy_name) { + application_name = app_name; + + run_state = STARTUP; + + ::base_display = this; + +#ifdef HAVE_SIGACTION + struct sigaction action; + + action.sa_handler = signalhandler; + action.sa_mask = sigset_t(); + action.sa_flags = SA_NOCLDSTOP | SA_NODEFER; + + sigaction(SIGPIPE, &action, NULL); + sigaction(SIGSEGV, &action, NULL); + sigaction(SIGFPE, &action, NULL); + sigaction(SIGTERM, &action, NULL); + sigaction(SIGINT, &action, NULL); + sigaction(SIGCHLD, &action, NULL); + sigaction(SIGHUP, &action, NULL); + sigaction(SIGUSR1, &action, NULL); + sigaction(SIGUSR2, &action, NULL); +#else // !HAVE_SIGACTION + signal(SIGPIPE, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGSEGV, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGFPE, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGTERM, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGINT, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGUSR1, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGUSR2, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGHUP, (RETSIGTYPE (*)(int)) signalhandler); + signal(SIGCHLD, (RETSIGTYPE (*)(int)) signalhandler); +#endif // HAVE_SIGACTION + + if (! (display = XOpenDisplay(dpy_name))) { + fprintf(stderr, + i18n(BaseDisplaySet, BaseDisplayXConnectFail, + "BaseDisplay::BaseDisplay: connection to X server failed.\n")); + ::exit(2); + } else if (fcntl(ConnectionNumber(display), F_SETFD, 1) == -1) { + fprintf(stderr, + i18n(BaseDisplaySet, BaseDisplayCloseOnExecFail, + "BaseDisplay::BaseDisplay: couldn't mark display connection " + "as close-on-exec\n")); + ::exit(2); + } + + display_name = XDisplayName(dpy_name); + +#ifdef SHAPE + shape.extensions = XShapeQueryExtension(display, &shape.event_basep, + &shape.error_basep); +#else // !SHAPE + shape.extensions = False; +#endif // SHAPE + + int windows_wm_major_opcode; + windows_wm.extensions = XQueryExtension(display, WINDOWSWMNAME, &windows_wm_major_opcode, + &windows_wm.event_basep, &windows_wm.error_basep); + XWindowsWMSelectInput(display, WindowsWMControllerNotifyMask | WindowsWMActivationNotifyMask); + + XSetErrorHandler((XErrorHandler) handleXErrors); + + screenInfoList.reserve(ScreenCount(display)); + for (int i = 0; i < ScreenCount(display); ++i) + screenInfoList.push_back(ScreenInfo(this, i)); + + NumLockMask = ScrollLockMask = 0; + + const XModifierKeymap* const modmap = XGetModifierMapping(display); + if (modmap && modmap->max_keypermod > 0) { + const int mask_table[] = { + ShiftMask, LockMask, ControlMask, Mod1Mask, + Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask + }; + const size_t size = (sizeof(mask_table) / sizeof(mask_table[0])) * + modmap->max_keypermod; + // get the values of the keyboard lock modifiers + // Note: Caps lock is not retrieved the same way as Scroll and Num lock + // since it doesn't need to be. + const KeyCode num_lock = XKeysymToKeycode(display, XK_Num_Lock); + const KeyCode scroll_lock = XKeysymToKeycode(display, XK_Scroll_Lock); + + for (size_t cnt = 0; cnt < size; ++cnt) { + if (! modmap->modifiermap[cnt]) continue; + + if (num_lock == modmap->modifiermap[cnt]) + NumLockMask = mask_table[cnt / modmap->max_keypermod]; + if (scroll_lock == modmap->modifiermap[cnt]) + ScrollLockMask = mask_table[cnt / modmap->max_keypermod]; + } + } + + MaskList[0] = 0; + MaskList[1] = LockMask; + MaskList[2] = NumLockMask; + MaskList[3] = LockMask | NumLockMask; + MaskList[4] = ScrollLockMask; + MaskList[5] = ScrollLockMask | LockMask; + MaskList[6] = ScrollLockMask | NumLockMask; + MaskList[7] = ScrollLockMask | LockMask | NumLockMask; + MaskListLength = sizeof(MaskList) / sizeof(MaskList[0]); + + if (modmap) XFreeModifiermap(const_cast<XModifierKeymap*>(modmap)); + + gccache = (BGCCache*) 0; +} + + +BaseDisplay::~BaseDisplay(void) { + delete gccache; + + XCloseDisplay(display); +} + + +void BaseDisplay::eventLoop(void) { + run(); + + const int xfd = ConnectionNumber(display); + + while (run_state == RUNNING && ! internal_error) { + if (XPending(display)) { + XEvent e; + XNextEvent(display, &e); + process_event(&e); + } else { + fd_set rfds; + timeval now, tm, *timeout = (timeval *) 0; + + FD_ZERO(&rfds); + FD_SET(xfd, &rfds); + + if (! timerList.empty()) { + const BTimer* const timer = timerList.top(); + + gettimeofday(&now, 0); + tm = timer->timeRemaining(now); + + timeout = &tm; + } + + select(xfd + 1, &rfds, 0, 0, timeout); + + // check for timer timeout + gettimeofday(&now, 0); + + // there is a small chance for deadlock here: + // *IF* the timer list keeps getting refreshed *AND* the time between + // timer->start() and timer->shouldFire() is within the timer's period + // then the timer will keep firing. This should be VERY near impossible. + while (! timerList.empty()) { + BTimer *timer = timerList.top(); + if (! timer->shouldFire(now)) + break; + + timerList.pop(); + + timer->fireTimeout(); + timer->halt(); + if (timer->isRecurring()) + timer->start(); + } + } + } +} + + +void BaseDisplay::addTimer(BTimer *timer) { + if (! timer) return; + + timerList.push(timer); +} + + +void BaseDisplay::removeTimer(BTimer *timer) { + timerList.release(timer); +} + + +/* + * Grabs a button, but also grabs the button in every possible combination + * with the keyboard lock keys, so that they do not cancel out the event. + + * if allow_scroll_lock is true then only the top half of the lock mask + * table is used and scroll lock is ignored. This value defaults to false. + */ +void BaseDisplay::grabButton(unsigned int button, unsigned int modifiers, + Window grab_window, bool owner_events, + unsigned int event_mask, int pointer_mode, + int keyboard_mode, Window confine_to, + Cursor cursor, bool allow_scroll_lock) const { + unsigned int length = (allow_scroll_lock) ? MaskListLength / 2: + MaskListLength; + for (size_t cnt = 0; cnt < length; ++cnt) { + XGrabButton(display, button, modifiers | MaskList[cnt], grab_window, + owner_events, event_mask, pointer_mode, keyboard_mode, + confine_to, cursor); + } +} + + +/* + * Releases the grab on a button, and ungrabs all possible combinations of the + * keyboard lock keys. + */ +void BaseDisplay::ungrabButton(unsigned int button, unsigned int modifiers, + Window grab_window) const { + for (size_t cnt = 0; cnt < MaskListLength; ++cnt) { + XUngrabButton(display, button, modifiers | MaskList[cnt], grab_window); + } +} + + +const ScreenInfo* BaseDisplay::getScreenInfo(unsigned int s) const { + if (s < screenInfoList.size()) + return &screenInfoList[s]; + return (const ScreenInfo*) 0; +} + + +BGCCache* BaseDisplay::gcCache(void) const { + if (! gccache) + gccache = new BGCCache(this, screenInfoList.size()); + + return gccache; +} + + +ScreenInfo::ScreenInfo(BaseDisplay *d, unsigned int num) { + basedisplay = d; + screen_number = num; + + root_window = RootWindow(basedisplay->getXDisplay(), screen_number); + + rect.setSize(WidthOfScreen(ScreenOfDisplay(basedisplay->getXDisplay(), + screen_number)), + HeightOfScreen(ScreenOfDisplay(basedisplay->getXDisplay(), + screen_number))); + + /* + If the default depth is at least 8 we will use that, + otherwise we try to find the largest TrueColor visual. + Preference is given to 24 bit over larger depths if 24 bit is an option. + */ + + depth = DefaultDepth(basedisplay->getXDisplay(), screen_number); + visual = DefaultVisual(basedisplay->getXDisplay(), screen_number); + colormap = DefaultColormap(basedisplay->getXDisplay(), screen_number); + + if (depth < 8) { + // search for a TrueColor Visual... if we can't find one... + // we will use the default visual for the screen + XVisualInfo vinfo_template, *vinfo_return; + int vinfo_nitems; + int best = -1; + + vinfo_template.screen = screen_number; + vinfo_template.c_class = TrueColor; + + vinfo_return = XGetVisualInfo(basedisplay->getXDisplay(), + VisualScreenMask | VisualClassMask, + &vinfo_template, &vinfo_nitems); + if (vinfo_return) { + int max_depth = 1; + for (int i = 0; i < vinfo_nitems; ++i) { + if (vinfo_return[i].depth > max_depth) { + if (max_depth == 24 && vinfo_return[i].depth > 24) + break; // prefer 24 bit over 32 + max_depth = vinfo_return[i].depth; + best = i; + } + } + if (max_depth < depth) best = -1; + } + + if (best != -1) { + depth = vinfo_return[best].depth; + visual = vinfo_return[best].visual; + colormap = XCreateColormap(basedisplay->getXDisplay(), root_window, + visual, AllocNone); + } + + XFree(vinfo_return); + } + + // get the default display string and strip the screen number + string default_string = DisplayString(basedisplay->getXDisplay()); + const string::size_type pos = default_string.rfind("."); + if (pos != string::npos) + default_string.resize(pos); + + display_string = string("DISPLAY=") + default_string + '.' + + itostring(static_cast<unsigned long>(screen_number)); +} diff --git a/src/BaseDisplay.hh b/src/BaseDisplay.hh new file mode 100644 index 0000000..749aeed --- /dev/null +++ b/src/BaseDisplay.hh @@ -0,0 +1,168 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// BaseDisplay.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __BaseDisplay_hh +#define __BaseDisplay_hh + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xatom.h> +} + +#include <vector> +#include <string> + +// forward declaration +class BaseDisplay; +class BGCCache; + +#include "Timer.hh" +#include "Util.hh" + +class ScreenInfo { +private: + BaseDisplay *basedisplay; + Visual *visual; + Window root_window; + Colormap colormap; + + int depth; + unsigned int screen_number; + std::string display_string; + Rect rect; + +public: + ScreenInfo(BaseDisplay *d, unsigned int num); + + inline BaseDisplay *getBaseDisplay(void) const { return basedisplay; } + inline Visual *getVisual(void) const { return visual; } + inline Window getRootWindow(void) const { return root_window; } + inline Colormap getColormap(void) const { return colormap; } + inline int getDepth(void) const { return depth; } + inline unsigned int getScreenNumber(void) const + { return screen_number; } + inline const Rect& getRect(void) const { return rect; } + inline unsigned int getWidth(void) const { return rect.width(); } + inline unsigned int getHeight(void) const { return rect.height(); } + inline const std::string& displayString(void) const + { return display_string; } +}; + + +class BaseDisplay: public TimerQueueManager { +private: + struct BShape { + bool extensions; + int event_basep, error_basep; + }; + BShape shape; + + struct BWindowsWM { + bool extensions; + int event_basep, error_basep; + }; + BShape windows_wm; + + unsigned int MaskList[8]; + size_t MaskListLength; + + enum RunState { STARTUP, RUNNING, SHUTDOWN }; + RunState run_state; + + Display *display; + mutable BGCCache *gccache; + + typedef std::vector<ScreenInfo> ScreenInfoList; + ScreenInfoList screenInfoList; + TimerQueue timerList; + + const char *display_name, *application_name; + + // no copying! + BaseDisplay(const BaseDisplay &); + BaseDisplay& operator=(const BaseDisplay&); + +protected: + // pure virtual function... you must override this + virtual void process_event(XEvent *e) = 0; + + // the masks of the modifiers which are ignored in button events. + int NumLockMask, ScrollLockMask; + + +public: + BaseDisplay(const char *app_name, const char *dpy_name = 0); + virtual ~BaseDisplay(void); + + const ScreenInfo* getScreenInfo(const unsigned int s) const; + + BGCCache *gcCache(void) const; + + inline bool hasShapeExtensions(void) const + { return shape.extensions; } + inline bool hasWindowsWMExtensions(void) const + { return windows_wm.extensions; } + inline bool doShutdown(void) const + { return run_state == SHUTDOWN; } + inline bool isStartup(void) const + { return run_state == STARTUP; } + + inline Display *getXDisplay(void) const { return display; } + + inline const char *getXDisplayName(void) const + { return display_name; } + inline const char *getApplicationName(void) const + { return application_name; } + + inline unsigned int getNumberOfScreens(void) const + { return screenInfoList.size(); } + inline int getShapeEventBase(void) const + { return shape.event_basep; } + inline int getWindowsWMEventBase(void) const + { return windows_wm.event_basep; } + + inline void shutdown(void) { run_state = SHUTDOWN; } + inline void run(void) { run_state = RUNNING; } + + void grabButton(unsigned int button, unsigned int modifiers, + Window grab_window, bool owner_events, + unsigned int event_mask, int pointer_mode, + int keyboard_mode, Window confine_to, Cursor cursor, + bool allow_scroll_lock) const; + void ungrabButton(unsigned int button, unsigned int modifiers, + Window grab_window) const; + + void eventLoop(void); + + // from TimerQueueManager interface + virtual void addTimer(BTimer *timer); + virtual void removeTimer(BTimer *timer); + + // another pure virtual... this is used to handle signals that BaseDisplay + // doesn't understand itself + virtual bool handleSignal(int sig) = 0; +}; + + +#endif // __BaseDisplay_hh diff --git a/src/Color.cc b/src/Color.cc new file mode 100644 index 0000000..bc47529 --- /dev/null +++ b/src/Color.cc @@ -0,0 +1,244 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Color.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org> +// Copyright (c) 1997 - 2000, 2002 Bradley T Hughes <bhughes at trolltech.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +#include "Color.hh" +#include "BaseDisplay.hh" + +extern "C" { +#include <stdio.h> +} + +#include <assert.h> + +BColor::ColorCache BColor::colorcache; +bool BColor::cleancache = false; + +BColor::BColor(const BaseDisplay * const _display, unsigned int _screen) + : allocated(false), r(-1), g(-1), b(-1), p(0), dpy(_display), scrn(_screen) +{} + +BColor::BColor(int _r, int _g, int _b, + const BaseDisplay * const _display, unsigned int _screen) + : allocated(false), r(_r), g(_g), b(_b), p(0), dpy(_display), scrn(_screen) +{} + + +BColor::BColor(const std::string &_name, + const BaseDisplay * const _display, unsigned int _screen) + : allocated(false), r(-1), g(-1), b(-1), p(0), dpy(_display), scrn(_screen), + colorname(_name) { + parseColorName(); +} + + +BColor::~BColor(void) { + deallocate(); +} + + +void BColor::setDisplay(const BaseDisplay * const _display, + unsigned int _screen) { + if (_display == display() && _screen == screen()) { + // nothing to do + return; + } + + deallocate(); + + dpy = _display; + scrn = _screen; + + if (! colorname.empty()) { + parseColorName(); + } +} + + +unsigned long BColor::pixel(void) const { + if (! allocated) { + // mutable + BColor *that = (BColor *) this; + that->allocate(); + } + + return p; +} + + +void BColor::parseColorName(void) { + assert(dpy != 0); + + if (colorname.empty()) { + fprintf(stderr, "BColor: empty colorname, cannot parse (using black)\n"); + setRGB(0, 0, 0); + } + + if (scrn == ~(0u)) + scrn = DefaultScreen(display()->getXDisplay()); + Colormap colormap = display()->getScreenInfo(scrn)->getColormap(); + + // get rgb values from colorname + XColor xcol; + xcol.red = 0; + xcol.green = 0; + xcol.blue = 0; + xcol.pixel = 0; + + if (! XParseColor(display()->getXDisplay(), colormap, + colorname.c_str(), &xcol)) { + fprintf(stderr, "BColor::allocate: color parse error: \"%s\"\n", + colorname.c_str()); + setRGB(0, 0, 0); + return; + } + + setRGB(xcol.red >> 8, xcol.green >> 8, xcol.blue >> 8); +} + + +void BColor::allocate(void) { + assert(dpy != 0); + + if (scrn == ~(0u)) scrn = DefaultScreen(display()->getXDisplay()); + Colormap colormap = display()->getScreenInfo(scrn)->getColormap(); + + if (! isValid()) { + if (colorname.empty()) { + fprintf(stderr, "BColor: cannot allocate invalid color (using black)\n"); + setRGB(0, 0, 0); + } else { + parseColorName(); + } + } + + // see if we have allocated this color before + RGB rgb(display(), scrn, r, g, b); + ColorCache::iterator it = colorcache.find(rgb); + if (it != colorcache.end()) { + // found + allocated = true; + p = (*it).second.p; + (*it).second.count++; + return; + } + + // allocate color from rgb values + XColor xcol; + xcol.red = r | r << 8; + xcol.green = g | g << 8; + xcol.blue = b | b << 8; + xcol.pixel = 0; + + if (! XAllocColor(display()->getXDisplay(), colormap, &xcol)) { + fprintf(stderr, "BColor::allocate: color alloc error: rgb:%x/%x/%x\n", + r, g, b); + xcol.pixel = 0; + } + + p = xcol.pixel; + allocated = true; + + colorcache.insert(ColorCacheItem(rgb, PixelRef(p))); + + if (cleancache) + doCacheCleanup(); +} + + +void BColor::deallocate(void) { + if (! allocated) + return; + + assert(dpy != 0); + + ColorCache::iterator it = colorcache.find(RGB(display(), scrn, r, g, b)); + if (it != colorcache.end()) { + if ((*it).second.count >= 1) + (*it).second.count--; + } + + if (cleancache) + doCacheCleanup(); + + allocated = false; +} + + +BColor &BColor::operator=(const BColor &c) { + deallocate(); + + setRGB(c.r, c.g, c.b); + colorname = c.colorname; + dpy = c.dpy; + scrn = c.scrn; + return *this; +} + + +void BColor::cleanupColorCache(void) { + cleancache = true; +} + + +void BColor::doCacheCleanup(void) { + // ### TODO - support multiple displays! + ColorCache::iterator it = colorcache.begin(); + if (it == colorcache.end()) { + // nothing to do + return; + } + + const BaseDisplay* const display = (*it).first.display; + unsigned long *pixels = new unsigned long[ colorcache.size() ]; + unsigned int i, count; + + for (i = 0; i < display->getNumberOfScreens(); i++) { + count = 0; + it = colorcache.begin(); + + while (it != colorcache.end()) { + if ((*it).second.count != 0 || (*it).first.screen != i) { + ++it; + continue; + } + + pixels[ count++ ] = (*it).second.p; + ColorCache::iterator it2 = it; + ++it; + colorcache.erase(it2); + } + + if (count > 0) + XFreeColors(display->getXDisplay(), + display->getScreenInfo(i)->getColormap(), + pixels, count, 0); + } + + delete [] pixels; + cleancache = false; +} diff --git a/src/Color.hh b/src/Color.hh new file mode 100644 index 0000000..b029251 --- /dev/null +++ b/src/Color.hh @@ -0,0 +1,129 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Color.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org> +// Copyright (c) 1997 - 2000, 2002 Bradley T Hughes <bhughes at trolltech.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef COLOR_HH +#define COLOR_HH + +extern "C" { +#include <X11/Xlib.h> +} + +#include <map> +#include <string> + +class BaseDisplay; + +class BColor { +public: + BColor(const BaseDisplay * const _display = 0, unsigned int _screen = ~(0u)); + BColor(int _r, int _g, int _b, + const BaseDisplay * const _display, unsigned int _screen = ~(0u)); + BColor(const std::string &_name, + const BaseDisplay * const _display, unsigned int _screen = ~(0u)); + ~BColor(void); + + inline const std::string &name(void) const { return colorname; } + + inline int red(void) const { return r; } + inline int green(void) const { return g; } + inline int blue(void) const { return b; } + void setRGB(int _r, int _g, int _b) { + deallocate(); + r = _r; + g = _g; + b = _b; + } + + inline const BaseDisplay *display(void) const { return dpy; } + inline unsigned int screen(void) const { return scrn; } + void setDisplay(const BaseDisplay * const _display, + unsigned int _screen = ~(0u)); + + inline bool isAllocated(void) const { return allocated; } + + inline bool isValid(void) const { return r != -1 && g != -1 && b != -1; } + + unsigned long pixel(void) const; + + // operators + BColor &operator=(const BColor &c); + inline bool operator==(const BColor &c) const + { return (r == c.r && b == c.b && b == c.b); } + inline bool operator!=(const BColor &c) const + { return (! operator==(c)); } + + static void cleanupColorCache(void); + +private: + void parseColorName(void); + void allocate(void); + void deallocate(void); + + bool allocated; + int r, g, b; + unsigned long p; + const BaseDisplay *dpy; + unsigned int scrn; + std::string colorname; + + // global color allocator/deallocator + struct RGB { + const BaseDisplay* const display; + const unsigned int screen; + const int r, g, b; + + RGB(void) : display(0), screen(~(0u)), r(-1), g(-1), b(-1) { } + RGB(const BaseDisplay * const a, const unsigned int b, + const int x, const int y, const int z) + : display(a), screen(b), r(x), g(y), b(z) {} + RGB(const RGB &x) + : display(x.display), screen(x.screen), r(x.r), g(x.g), b(x.b) {} + + inline bool operator==(const RGB &x) const { + return display == x.display && + screen == x.screen && + r == x.r && g == x.g && b == x.b; + } + + inline bool operator<(const RGB &x) const { + unsigned long p1, p2; + p1 = (screen << 24 | r << 16 | g << 8 | b) & 0x00ffffff; + p2 = (x.screen << 24 | x.r << 16 | x.g << 8 | x.b) & 0x00ffffff; + return p1 < p2; + } + }; + struct PixelRef { + const unsigned long p; + unsigned int count; + inline PixelRef(void) : p(0), count(0) { } + inline PixelRef(const unsigned long x) : p(x), count(1) { } + }; + typedef std::map<RGB,PixelRef> ColorCache; + typedef ColorCache::value_type ColorCacheItem; + static ColorCache colorcache; + static bool cleancache; + static void doCacheCleanup(void); +}; + +#endif // COLOR_HH diff --git a/src/GCCache.cc b/src/GCCache.cc new file mode 100644 index 0000000..21e8040 --- /dev/null +++ b/src/GCCache.cc @@ -0,0 +1,204 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// GCCache.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org> +// Copyright (c) 1997 - 2000, 2002 Bradley T Hughes <bhughes at trolltech.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <stdio.h> +} + +#include "GCCache.hh" +#include "BaseDisplay.hh" +#include "Color.hh" +#include "Util.hh" + + +BGCCacheContext::~BGCCacheContext(void) { + if (gc) + XFreeGC(display->getXDisplay(), gc); +} + + +void BGCCacheContext::set(const BColor &_color, + const XFontStruct * const _font, + const int _function, const int _subwindow) { + XGCValues gcv; + pixel = gcv.foreground = _color.pixel(); + function = gcv.function = _function; + subwindow = gcv.subwindow_mode = _subwindow; + unsigned long mask = GCForeground | GCFunction | GCSubwindowMode; + + if (_font) { + fontid = gcv.font = _font->fid; + mask |= GCFont; + } else { + fontid = 0; + } + + XChangeGC(display->getXDisplay(), gc, mask, &gcv); +} + + +void BGCCacheContext::set(const XFontStruct * const _font) { + if (! _font) { + fontid = 0; + return; + } + + XGCValues gcv; + fontid = gcv.font = _font->fid; + XChangeGC(display->getXDisplay(), gc, GCFont, &gcv); +} + + +BGCCache::BGCCache(const BaseDisplay * const _display, + unsigned int screen_count) + : display(_display), context_count(128u), + cache_size(16u), cache_buckets(8u * screen_count), + cache_total_size(cache_size * cache_buckets) { + + contexts = new BGCCacheContext*[context_count]; + unsigned int i; + for (i = 0; i < context_count; i++) { + contexts[i] = new BGCCacheContext(display); + } + + cache = new BGCCacheItem*[cache_total_size]; + for (i = 0; i < cache_total_size; ++i) { + cache[i] = new BGCCacheItem; + } +} + + +BGCCache::~BGCCache(void) { + std::for_each(contexts, contexts + context_count, PointerAssassin()); + std::for_each(cache, cache + cache_total_size, PointerAssassin()); + delete [] cache; + delete [] contexts; +} + + +BGCCacheContext *BGCCache::nextContext(unsigned int scr) { + Window hd = display->getScreenInfo(scr)->getRootWindow(); + + BGCCacheContext *c; + + for (unsigned int i = 0; i < context_count; ++i) { + c = contexts[i]; + + if (! c->gc) { + c->gc = XCreateGC(display->getXDisplay(), hd, 0, 0); + c->used = false; + c->screen = scr; + } + if (! c->used && c->screen == scr) + return c; + } + + fprintf(stderr, "BGCCache: context fault!\n"); + abort(); + return (BGCCacheContext*) 0; // not reached +} + + +void BGCCache::release(BGCCacheContext *ctx) { + ctx->used = false; +} + + +BGCCacheItem *BGCCache::find(const BColor &_color, + const XFontStruct * const _font, + int _function, int _subwindow) { + const unsigned long pixel = _color.pixel(); + const unsigned int screen = _color.screen(); + const int key = _color.red() ^ _color.green() ^ _color.blue(); + int k = (key % cache_size) * cache_buckets; + unsigned int i = 0; // loop variable + BGCCacheItem *c = cache[ k ], *prev = 0; + + /* + this will either loop cache_buckets times then return/abort or + it will stop matching + */ + while (c->ctx && + (c->ctx->pixel != pixel || c->ctx->function != _function || + c->ctx->subwindow != _subwindow || c->ctx->screen != screen)) { + if (i < (cache_buckets - 1)) { + prev = c; + c = cache[ ++k ]; + ++i; + continue; + } + if (c->count == 0 && c->ctx->screen == screen) { + // use this cache item + c->ctx->set(_color, _font, _function, _subwindow); + c->ctx->used = true; + c->count = 1; + c->hits = 1; + return c; + } + // cache fault! + fprintf(stderr, "BGCCache: cache fault, count: %d, screen: %d, item screen: %d\n", c->count, screen, c->ctx->screen); + abort(); + } + + if (c->ctx) { + // reuse existing context + if (_font && _font->fid && _font->fid != c->ctx->fontid) + c->ctx->set(_font); + c->count++; + c->hits++; + if (prev && c->hits > prev->hits) { + cache[ k ] = prev; + cache[ k - 1 ] = c; + } + } else { + c->ctx = nextContext(screen); + c->ctx->set(_color, _font, _function, _subwindow); + c->ctx->used = true; + c->count = 1; + c->hits = 1; + } + + return c; +} + + +void BGCCache::release(BGCCacheItem *_item) { + _item->count--; +} + + +void BGCCache::purge(void) { + for (unsigned int i = 0; i < cache_total_size; ++i) { + BGCCacheItem *d = cache[ i ]; + + if (d->ctx && d->count == 0) { + release(d->ctx); + d->ctx = 0; + } + } +} diff --git a/src/GCCache.hh b/src/GCCache.hh new file mode 100644 index 0000000..b271130 --- /dev/null +++ b/src/GCCache.hh @@ -0,0 +1,136 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// GCCache.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org> +// Copyright (c) 1997 - 2000, 2002 Bradley T Hughes <bhughes at trolltech.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef GCCACHE_HH +#define GCCACHE_HH + +extern "C" { +#include <X11/Xlib.h> +} + +#include "BaseDisplay.hh" +#include "Color.hh" + +class BGCCacheItem; + +class BGCCacheContext { +public: + void set(const BColor &_color, const XFontStruct * const _font, + const int _function, const int _subwindow); + void set(const XFontStruct * const _font); + + ~BGCCacheContext(void); + +private: + BGCCacheContext(const BaseDisplay * const _display) + : display(_display), gc(0), pixel(0ul), fontid(0ul), + function(0), subwindow(0), used(false), screen(~(0u)) {} + + const BaseDisplay *display; + GC gc; + unsigned long pixel; + unsigned long fontid; + int function; + int subwindow; + bool used; + unsigned int screen; + + BGCCacheContext(const BGCCacheContext &_nocopy); + BGCCacheContext &operator=(const BGCCacheContext &_nocopy); + + friend class BGCCache; + friend class BGCCacheItem; +}; + +class BGCCacheItem { +public: + inline const GC &gc(void) const { return ctx->gc; } + +private: + BGCCacheItem(void) : ctx(0), count(0), hits(0), fault(false) { } + + BGCCacheContext *ctx; + unsigned int count; + unsigned int hits; + bool fault; + + BGCCacheItem(const BGCCacheItem &_nocopy); + BGCCacheItem &operator=(const BGCCacheItem &_nocopy); + + friend class BGCCache; +}; + +class BGCCache { +public: + BGCCache(const BaseDisplay * const _display, unsigned int screen_count); + ~BGCCache(void); + + // cleans up the cache + void purge(void); + + BGCCacheItem *find(const BColor &_color, const XFontStruct * const _font = 0, + int _function = GXcopy, int _subwindow = ClipByChildren); + void release(BGCCacheItem *_item); + +private: + BGCCacheContext *nextContext(unsigned int _screen); + void release(BGCCacheContext *ctx); + + // this is closely modelled after the Qt GC cache, but with some of the + // complexity stripped out + const BaseDisplay *display; + + const unsigned int context_count; + const unsigned int cache_size; + const unsigned int cache_buckets; + const unsigned int cache_total_size; + BGCCacheContext **contexts; + BGCCacheItem **cache; +}; + +class BPen { +public: + inline BPen(const BColor &_color, const XFontStruct * const _font = 0, + int _function = GXcopy, int _subwindow = ClipByChildren) + : color(_color), font(_font), function(_function), subwindow(_subwindow), + cache(_color.display()->gcCache()), item(0) { } + inline ~BPen(void) { if (item) cache->release(item); } + + inline const GC &gc(void) const { + if (! item) item = cache->find(color, font, function, subwindow); + return item->gc(); + } + +private: + const BColor &color; + const XFontStruct *font; + int function; + int subwindow; + + mutable BGCCache *cache; + mutable BGCCacheItem *item; +}; + + +#endif // GCCACHE_HH diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..86f4b7b --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,66 @@ +# src/Makefile.am for Blackbox - an X11 Window manager +# Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +EXTRA_DIST=*.hh *.in + +AM_CPPFLAGS= @CPPFLAGS@ @SHAPE@ @ORDEREDPSEUDO@ \ +@DEBUG@ @NLS@ @TIMEDCACHE@ \ +-DLOCALEPATH=\"$(pkgdatadir)/nls\" \ +-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \ +-DX_LOCALE + +bin_PROGRAMS= xwinwm + +xwinwm_SOURCES= BaseDisplay.cc Color.cc GCCache.cc Netizen.cc Screen.cc \ +Timer.cc Util.cc Window.cc Workspace.cc blackbox.cc i18n.cc main.cc + +MAINTAINERCLEANFILES= Makefile.in + +distclean-local: + rm -f *\~ *.orig *.rej .\#* + +# local dependencies + +BaseDisplay.o: BaseDisplay.cc ../config.h i18n.hh \ + ../nls/blackbox-nls.hh BaseDisplay.hh Timer.hh GCCache.hh Color.hh \ + Util.hh +Color.o: Color.cc ../config.h Color.hh BaseDisplay.hh Timer.hh +GCCache.o: GCCache.cc ../config.h GCCache.hh BaseDisplay.hh Timer.hh \ + Color.hh Util.hh +Netizen.o: Netizen.cc ../config.h Netizen.hh Screen.hh Color.hh \ + Util.hh Timer.hh Workspace.hh blackbox.hh i18n.hh \ + ../nls/blackbox-nls.hh BaseDisplay.hh +Screen.o: Screen.cc ../config.h i18n.hh ../nls/blackbox-nls.hh \ + blackbox.hh BaseDisplay.hh Timer.hh GCCache.hh Color.hh Screen.hh Util.hh \ + Netizen.hh Workspace.hh Window.hh +Timer.o: Timer.cc ../config.h BaseDisplay.hh Timer.hh Util.hh +Util.o: Util.cc ../config.h Util.hh +Window.o: Window.cc ../config.h i18n.hh ../nls/blackbox-nls.hh \ + blackbox.hh BaseDisplay.hh Timer.hh GCCache.hh Color.hh Screen.hh Util.hh \ + Netizen.hh Workspace.hh Window.hh +Workspace.o: Workspace.cc ../config.h i18n.hh ../nls/blackbox-nls.hh \ + blackbox.hh BaseDisplay.hh Timer.hh Netizen.hh Screen.hh Color.hh Util.hh \ + Workspace.hh Window.hh +blackbox.o: blackbox.cc ../config.h i18n.hh ../nls/blackbox-nls.hh \ + blackbox.hh BaseDisplay.hh Timer.hh GCCache.hh Color.hh Screen.hh Util.hh \ + Netizen.hh Workspace.hh Window.hh +i18n.o: i18n.cc ../config.h i18n.hh ../nls/blackbox-nls.hh +main.o: main.cc ../version.h ../config.h i18n.hh \ + ../nls/blackbox-nls.hh blackbox.hh BaseDisplay.hh Timer.hh diff --git a/src/Netizen.cc b/src/Netizen.cc new file mode 100644 index 0000000..9a14d9b --- /dev/null +++ b/src/Netizen.cc @@ -0,0 +1,115 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// Netizen.cc for Blackbox - An X11 Window Manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif // HAVE_CONFIG_H + +#include "Netizen.hh" +#include "Screen.hh" + +Netizen::Netizen(BScreen *scr, Window win) { + screen = scr; + blackbox = scr->getBlackbox(); + window = win; + + event.type = ClientMessage; + event.xclient.message_type = + blackbox->getBlackboxStructureMessagesAtom(); + event.xclient.display = blackbox->getXDisplay(); + event.xclient.window = window; + event.xclient.format = 32; + event.xclient.data.l[0] = blackbox->getBlackboxNotifyStartupAtom(); + event.xclient.data.l[1] = event.xclient.data.l[2] = + event.xclient.data.l[3] = event.xclient.data.l[4] = 0l; + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendWorkspaceCount(void) { + event.xclient.data.l[0] = + blackbox->getBlackboxNotifyWorkspaceCountAtom(); + event.xclient.data.l[1] = screen->getWorkspaceCount(); + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendCurrentWorkspace(void) { + event.xclient.data.l[0] = + blackbox->getBlackboxNotifyCurrentWorkspaceAtom(); + event.xclient.data.l[1] = screen->getCurrentWorkspaceID(); + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendWindowFocus(Window w) { + event.xclient.data.l[0] = blackbox->getBlackboxNotifyWindowFocusAtom(); + event.xclient.data.l[1] = w; + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendWindowAdd(Window w, unsigned long p) { + event.xclient.data.l[0] = blackbox->getBlackboxNotifyWindowAddAtom(); + event.xclient.data.l[1] = w; + event.xclient.data.l[2] = p; + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); + + event.xclient.data.l[2] = 0l; +} + + +void Netizen::sendWindowDel(Window w) { + event.xclient.data.l[0] = blackbox->getBlackboxNotifyWindowDelAtom(); + event.xclient.data.l[1] = w; + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendWindowRaise(Window w) { + event.xclient.data.l[0] = blackbox->getBlackboxNotifyWindowRaiseAtom(); + event.xclient.data.l[1] = w; + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendWindowLower(Window w) { + event.xclient.data.l[0] = blackbox->getBlackboxNotifyWindowLowerAtom(); + event.xclient.data.l[1] = w; + + XSendEvent(blackbox->getXDisplay(), window, False, NoEventMask, &event); +} + + +void Netizen::sendConfigNotify(XEvent *e) { + XSendEvent(blackbox->getXDisplay(), window, False, + StructureNotifyMask, e); +} diff --git a/src/Netizen.hh b/src/Netizen.hh new file mode 100644 index 0000000..3bc9e1c --- /dev/null +++ b/src/Netizen.hh @@ -0,0 +1,62 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// Netizen.hh for Blackbox - An X11 Window Manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __Netizen_hh +#define __Netizen_hh + +extern "C" { +#include <X11/Xlib.h> +} + +// forward declaration +class Blackbox; +class BScreen; +class Netizen; + +class Netizen { +private: + Blackbox *blackbox; + BScreen *screen; + Window window; + XEvent event; + +public: + Netizen(BScreen *, Window); + + inline Window getWindowID(void) const { return window; } + + void sendWorkspaceCount(void); + void sendCurrentWorkspace(void); + + void sendWindowFocus(Window); + void sendWindowAdd(Window, unsigned long); + void sendWindowDel(Window); + void sendWindowRaise(Window); + void sendWindowLower(Window); + + void sendConfigNotify(XEvent *); +}; + + +#endif // __Netizen_hh diff --git a/src/Screen.cc b/src/Screen.cc new file mode 100644 index 0000000..144da2b --- /dev/null +++ b/src/Screen.cc @@ -0,0 +1,873 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Screen.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <X11/Xatom.h> +#include <X11/keysym.h> + +// for strcasestr() +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif // _GNU_SOURCE + +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif // HAVE_STDLIB_H + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H + +#ifdef HAVE_CTYPE_H +# include <ctype.h> +#endif // HAVE_CTYPE_H + +#ifdef HAVE_UNISTD_H +# include <sys/types.h> +# include <unistd.h> +#endif // HAVE_UNISTD_H + +#ifdef HAVE_DIRENT_H +# include <dirent.h> +#endif // HAVE_DIRENT_H + +#ifdef HAVE_LOCALE_H +# include <locale.h> +#endif // HAVE_LOCALE_H + +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif // HAVE_SYS_STAT_H + +#ifdef HAVE_STDARG_H +# include <stdarg.h> +#endif // HAVE_STDARG_H +} + +#include <assert.h> + +#include <algorithm> +#include <functional> +#include <string> + +using std::string; + +#include "i18n.hh" +#include "blackbox.hh" +#include "GCCache.hh" +#include "Screen.hh" +#ifdef ADD_BLOAT +#include "Slit.hh" +#include "Toolbar.hh" +#endif // ADD_BLOAT +#include "Util.hh" +#include "Window.hh" +#include "Workspace.hh" +#include <X11/Xlocale.h> + +#ifndef FONT_ELEMENT_SIZE +#define FONT_ELEMENT_SIZE 50 +#endif // FONT_ELEMENT_SIZE + + +static bool running = True; + +static int anotherWMRunning(Display *display, XErrorEvent *) { + fprintf(stderr, i18n(ScreenSet, ScreenAnotherWMRunning, + "BScreen::BScreen: an error occured while querying the X server.\n" + " another window manager already running on display %s.\n"), + DisplayString(display)); + + running = False; + + return(-1); +} + + +BScreen::BScreen(Blackbox *bb, unsigned int scrn) : ScreenInfo(bb, scrn) { + blackbox = bb; + + event_mask = ColormapChangeMask | EnterWindowMask | PropertyChangeMask | + SubstructureRedirectMask | ButtonPressMask | ButtonReleaseMask; + + XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning); + XSelectInput(getBaseDisplay()->getXDisplay(), getRootWindow(), event_mask); + XSync(getBaseDisplay()->getXDisplay(), False); + XSetErrorHandler((XErrorHandler) old); + + managed = running; + if (! managed) return; + + fprintf(stderr, i18n(ScreenSet, ScreenManagingScreen, + "BScreen::BScreen: managing screen %d " + "using visual 0x%lx, depth %d\n"), + getScreenNumber(), XVisualIDFromVisual(getVisual()), + getDepth()); + +#ifdef HAVE_GETPID + pid_t bpid = getpid(); + + XChangeProperty(blackbox->getXDisplay(), getRootWindow(), + blackbox->getBlackboxPidAtom(), XA_CARDINAL, + sizeof(pid_t) * 8, PropModeReplace, + (unsigned char *) &bpid, 1); +#endif // HAVE_GETPID + + XDefineCursor(blackbox->getXDisplay(), getRootWindow(), + blackbox->getSessionCursor()); + + // start off full screen, top left. + usableArea.setSize(getWidth(), getHeight()); + + root_colormap_installed = True; + + blackbox->load_rc(this); + + LoadStyle(); + + XGCValues gcv; + unsigned long gc_value_mask = GCForeground; + if (! i18n.multibyte()) gc_value_mask |= GCFont; + + gcv.foreground = WhitePixel(blackbox->getXDisplay(), getScreenNumber()) + ^ BlackPixel(blackbox->getXDisplay(), getScreenNumber()); + gcv.function = GXxor; + gcv.subwindow_mode = IncludeInferiors; + opGC = XCreateGC(blackbox->getXDisplay(), getRootWindow(), + GCForeground | GCFunction | GCSubwindowMode, &gcv); + + XSetWindowAttributes attrib; + //unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder; + attrib.border_pixel = getBorderColor()->pixel(); + attrib.colormap = getColormap(); + attrib.save_under = True; + + Workspace *wkspc = (Workspace *) 0; + if (resource.workspaces != 0) { + for (unsigned int i = 0; i < resource.workspaces; ++i) { + wkspc = new Workspace(this, workspacesList.size()); + workspacesList.push_back(wkspc); + } + } else { + wkspc = new Workspace(this, workspacesList.size()); + workspacesList.push_back(wkspc); + } + + current_workspace = workspacesList.front(); + + removeWorkspaceNames(); // do not need them any longer + +#ifdef ADD_BLOAT + toolbar = new Toolbar(this); + + slit = new Slit(this); +#endif // ADD_BLOAT + + raiseWindows(0, 0); + + updateAvailableArea(); + + changeWorkspaceID(0); + + unsigned int i, j, nchild; + Window r, p, *children; + XQueryTree(blackbox->getXDisplay(), getRootWindow(), &r, &p, + &children, &nchild); + + // preen the window list of all icon windows... for better dockapp support + for (i = 0; i < nchild; i++) { + if (children[i] == None) continue; + + XWMHints *wmhints = XGetWMHints(blackbox->getXDisplay(), + children[i]); + + if (wmhints) { + if ((wmhints->flags & IconWindowHint) && + (wmhints->icon_window != children[i])) { + for (j = 0; j < nchild; j++) { + if (children[j] == wmhints->icon_window) { + children[j] = None; + break; + } + } + } + + XFree(wmhints); + } + } + + // manage shown windows + for (i = 0; i < nchild; ++i) { + if (children[i] == None || ! blackbox->validateWindow(children[i])) + continue; + + XWindowAttributes attrib; + if (XGetWindowAttributes(blackbox->getXDisplay(), children[i], &attrib)) { + if (attrib.override_redirect) continue; + + if (attrib.map_state != IsUnmapped) { + manageWindow(children[i]); + } + } + } + + XFree(children); + + // call this again just in case a window we found updates the Strut list + updateAvailableArea(); +} + + +BScreen::~BScreen(void) { + if (! managed) return; + + std::for_each(workspacesList.begin(), workspacesList.end(), + PointerAssassin()); + + std::for_each(iconList.begin(), iconList.end(), PointerAssassin()); + + std::for_each(netizenList.begin(), netizenList.end(), PointerAssassin()); + +#ifdef ADD_BLOAT + delete slit; + delete toolbar; +#endif // ADD_BLOAT + + XFreeGC(blackbox->getXDisplay(), opGC); +} + + +void BScreen::removeWorkspaceNames(void) { + workspaceNames.clear(); +} + + +void BScreen::reconfigure(void) { + LoadStyle(); + + XGCValues gcv; + unsigned long gc_value_mask = GCForeground; + if (! i18n.multibyte()) gc_value_mask |= GCFont; + + gcv.foreground = WhitePixel(blackbox->getXDisplay(), + getScreenNumber()); + gcv.function = GXinvert; + gcv.subwindow_mode = IncludeInferiors; + XChangeGC(blackbox->getXDisplay(), opGC, + GCForeground | GCFunction | GCSubwindowMode, &gcv); + + raiseWindows(0, 0); + +#ifdef ADD_BLOAT + toolbar->reconfigure(); + + slit->reconfigure(); +#endif // ADD_BLOAT + + std::for_each(workspacesList.begin(), workspacesList.end(), + std::mem_fun(&Workspace::reconfigure)); + + BlackboxWindowList::iterator iit = iconList.begin(); + for (; iit != iconList.end(); ++iit) { + BlackboxWindow *bw = *iit; + if (bw->validateClient()) + bw->reconfigure(); + } +} + + +void BScreen::LoadStyle(void) { + // we create the window.frame texture by hand because it exists only to + // make the code cleaner and is not actually used for display + BColor color = readDatabaseColor("window.frame.focusColor", + "Window.Frame.FocusColor", "white"); + + color = readDatabaseColor("window.frame.unfocusColor", + "Window.Frame.UnfocusColor", "white"); + + // load toolbar config +#ifdef ADD_BLOAT + readDatabaseColor("toolbar.label.textColor", + "Toolbar.Label.TextColor", "white"); + resource.tstyle.w_text = + readDatabaseColor("toolbar.windowLabel.textColor", + "Toolbar.WindowLabel.TextColor", "white"); + resource.tstyle.c_text = + readDatabaseColor("toolbar.clock.textColor", + "Toolbar.Clock.TextColor", "white"); + resource.tstyle.b_pic = + readDatabaseColor("toolbar.button.picColor", + "Toolbar.Button.PicColor", "black"); + + resource.tstyle.justify = LeftJustify; +#endif // ADD_BLOAT + + resource.border_color = + readDatabaseColor("borderColor", "BorderColor", "black"); + + //unsigned int uint_value; + + // load bevel, border and handle widths + resource.handle_width = 6; + resource.border_width = 1; + resource.bevel_width = 3; + resource.frame_width = resource.bevel_width; +} + + +void BScreen::addIcon(BlackboxWindow *w) { + if (! w) return; + + w->setWorkspace(BSENTINEL); + w->setWindowNumber(iconList.size()); + + iconList.push_back(w); + + //const char* title = w->getIconTitle(); +} + + +void BScreen::removeIcon(BlackboxWindow *w) { + if (! w) return; + + iconList.remove(w); + + BlackboxWindowList::iterator it = iconList.begin(), + end = iconList.end(); + for (int i = 0; it != end; ++it) + (*it)->setWindowNumber(i++); +} + + +BlackboxWindow *BScreen::getIcon(unsigned int index) { + if (index < iconList.size()) { + BlackboxWindowList::iterator it = iconList.begin(); + while (index-- > 0) + it = next_it(it); + return *it; + } + + return (BlackboxWindow *) 0; +} + + +unsigned int BScreen::addWorkspace(void) { + Workspace *wkspc = new Workspace(this, workspacesList.size()); + workspacesList.push_back(wkspc); + +#ifdef ADD_BLOAT + toolbar->reconfigure(); +#endif // ADD_BLOAT + + updateNetizenWorkspaceCount(); + + return workspacesList.size(); +} + + +unsigned int BScreen::removeLastWorkspace(void) { + if (workspacesList.size() == 1) + return 1; + + Workspace *wkspc = workspacesList.back(); + + if (current_workspace->getID() == wkspc->getID()) + changeWorkspaceID(current_workspace->getID() - 1); + + wkspc->removeAll(); + + workspacesList.pop_back(); + delete wkspc; + +#ifdef ADD_BLOAT + toolbar->reconfigure(); +#endif // ADD_BLOAT + + updateNetizenWorkspaceCount(); + + return workspacesList.size(); +} + + +void BScreen::changeWorkspaceID(unsigned int id) { + if (! current_workspace || id == current_workspace->getID()) return; + + current_workspace->hide(); + + current_workspace = getWorkspace(id); + + current_workspace->show(); + +#ifdef ADD_BLOAT + toolbar->redrawWorkspaceLabel(True); +#endif // ADD_BLOAT + + updateNetizenCurrentWorkspace(); +} + + +void BScreen::manageWindow(Window w) { + XWMHints *wmhint = XGetWMHints(blackbox->getXDisplay(), w); + if (wmhint && (wmhint->flags & StateHint) && + wmhint->initial_state == WithdrawnState) { +#ifdef ADD_BLOAT + slit->addClient(w); +#endif // ADD_BLOAT + return; + } + + new BlackboxWindow(blackbox, w, this); + + BlackboxWindow *win = blackbox->searchWindow(w); + if (! win) + return; + + windowList.push_back(win); + + XMapRequestEvent mre; + mre.window = w; + if (blackbox->isStartup()) win->restoreAttributes(); + win->mapRequestEvent(&mre); +} + + +void BScreen::unmanageWindow(BlackboxWindow *w, bool remap) { + w->restore(remap); + + if (w->isModal()) w->setModal(False); + + if (w->getWorkspaceNumber() != BSENTINEL && + w->getWindowNumber() != BSENTINEL) + getWorkspace(w->getWorkspaceNumber())->removeWindow(w); + else if (w->isIconic()) + removeIcon(w); + + windowList.remove(w); + + if (blackbox->getFocusedWindow() == w) + blackbox->setFocusedWindow((BlackboxWindow *) 0); + + removeNetizen(w->getClientWindow()); + + /* + some managed windows can also be window group controllers. when + unmanaging such windows, we should also delete the window group. + */ + BWindowGroup *group = blackbox->searchGroup(w->getClientWindow()); + delete group; + + delete w; +} + + +void BScreen::addNetizen(Netizen *n) { + netizenList.push_back(n); + + n->sendWorkspaceCount(); + n->sendCurrentWorkspace(); + + WorkspaceList::iterator it = workspacesList.begin(); + const WorkspaceList::iterator end = workspacesList.end(); + for (; it != end; ++it) + (*it)->sendWindowList(*n); + + Window f = ((blackbox->getFocusedWindow()) ? + blackbox->getFocusedWindow()->getClientWindow() : None); + n->sendWindowFocus(f); +} + + +void BScreen::removeNetizen(Window w) { + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) { + if ((*it)->getWindowID() == w) { + delete *it; + netizenList.erase(it); + break; + } + } +} + + +void BScreen::updateNetizenCurrentWorkspace(void) { + std::for_each(netizenList.begin(), netizenList.end(), + std::mem_fun(&Netizen::sendCurrentWorkspace)); +} + + +void BScreen::updateNetizenWorkspaceCount(void) { + std::for_each(netizenList.begin(), netizenList.end(), + std::mem_fun(&Netizen::sendWorkspaceCount)); +} + + +void BScreen::updateNetizenWindowFocus(void) { + Window f = ((blackbox->getFocusedWindow()) ? + blackbox->getFocusedWindow()->getClientWindow() : None); + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) + (*it)->sendWindowFocus(f); +} + + +void BScreen::updateNetizenWindowAdd(Window w, unsigned long p) { + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) { + (*it)->sendWindowAdd(w, p); + } +} + + +void BScreen::updateNetizenWindowDel(Window w) { + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) + (*it)->sendWindowDel(w); +} + + +void BScreen::updateNetizenWindowRaise(Window w) { + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) + (*it)->sendWindowRaise(w); +} + + +void BScreen::updateNetizenWindowLower(Window w) { + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) + (*it)->sendWindowLower(w); +} + + +void BScreen::updateNetizenConfigNotify(XEvent *e) { + NetizenList::iterator it = netizenList.begin(); + for (; it != netizenList.end(); ++it) + (*it)->sendConfigNotify(e); +} + + +void BScreen::raiseWindows(Window *workspace_stack, unsigned int num) { + // the 13 represents the number of blackbox windows such as menus + Window *session_stack = new + Window[(num + workspacesList.size() + 13)]; + unsigned int i = 0, k = num; + + WorkspaceList::iterator wit = workspacesList.begin(); + +#ifdef ADD_BLOAT + if (toolbar->isOnTop()) + *(session_stack + i++) = toolbar->getWindowID(); + + if (slit->isOnTop()) + *(session_stack + i++) = slit->getWindowID(); +#endif // ADD_BLOAT + + while (k--) + *(session_stack + i++) = *(workspace_stack + k); + + XRestackWindows(blackbox->getXDisplay(), session_stack, i); + + delete [] session_stack; +} + + +void BScreen::addWorkspaceName(const string& name) { + workspaceNames.push_back(name); +} + + +/* + * I would love to kill this function and the accompanying workspaceNames + * list. However, we have a chicken and egg situation. The names are read + * in during load_rc() which happens before the workspaces are created. + * The current solution is to read the names into a list, then use the list + * later for constructing the workspaces. It is only used during initial + * BScreen creation. + */ +const string BScreen::getNameOfWorkspace(unsigned int id) { + if (id < workspaceNames.size()) + return workspaceNames[id]; + return string(""); +} + + +void BScreen::reassociateWindow(BlackboxWindow *w, unsigned int wkspc_id, + bool ignore_sticky) { + if (! w) return; + + if (wkspc_id == BSENTINEL) + wkspc_id = current_workspace->getID(); + + if (w->getWorkspaceNumber() == wkspc_id) + return; + + if (w->isIconic()) { + removeIcon(w); + getWorkspace(wkspc_id)->addWindow(w); + } else if (ignore_sticky || ! w->isStuck()) { + getWorkspace(w->getWorkspaceNumber())->removeWindow(w); + getWorkspace(wkspc_id)->addWindow(w); + } +} + + +void BScreen::propagateWindowName(const BlackboxWindow *bw) { + if (bw->isIconic()) { + } + else { +#ifdef ADD_BLOAT + if (blackbox->getFocusedWindow() == bw) + toolbar->redrawWindowLabel(True); +#endif // ADD_BLOAT + } +} + + +void BScreen::nextFocus(void) { + BlackboxWindow *focused = blackbox->getFocusedWindow(), + *next = focused; + + if (focused) { + // if window is not on this screen, ignore it + if (focused->getScreen()->getScreenNumber() != getScreenNumber()) + focused = (BlackboxWindow*) 0; + } + + if (focused && current_workspace->getCount() > 1) { + // next is the next window to recieve focus, current is a place holder + BlackboxWindow *current; + do { + current = next; + next = current_workspace->getNextWindowInList(current); + } while(!next->setInputFocus() && next != focused); + + if (next != focused) + current_workspace->raiseWindow(next); + } else if (current_workspace->getCount() >= 1) { + next = current_workspace->getTopWindowOnStack(); + + current_workspace->raiseWindow(next); + next->setInputFocus(); + } +} + + +void BScreen::prevFocus(void) { + BlackboxWindow *focused = blackbox->getFocusedWindow(), + *next = focused; + + if (focused) { + // if window is not on this screen, ignore it + if (focused->getScreen()->getScreenNumber() != getScreenNumber()) + focused = (BlackboxWindow*) 0; + } + + if (focused && current_workspace->getCount() > 1) { + // next is the next window to recieve focus, current is a place holder + BlackboxWindow *current; + do { + current = next; + next = current_workspace->getPrevWindowInList(current); + } while(!next->setInputFocus() && next != focused); + + if (next != focused) + current_workspace->raiseWindow(next); + } else if (current_workspace->getCount() >= 1) { + next = current_workspace->getTopWindowOnStack(); + + current_workspace->raiseWindow(next); + next->setInputFocus(); + } +} + + +void BScreen::raiseFocus(void) { + BlackboxWindow *focused = blackbox->getFocusedWindow(); + if (! focused) + return; + + // if on this Screen, raise it + if (focused->getScreen()->getScreenNumber() == getScreenNumber()) { + Workspace *workspace = getWorkspace(focused->getWorkspaceNumber()); + workspace->raiseWindow(focused); + } +} + + +static +size_t string_within(char begin, char end, + const char *input, size_t start_at, size_t length, + char *output) { + bool parse = False; + size_t index = 0; + size_t i = start_at; + for (; i < length; ++i) { + if (input[i] == begin) { + parse = True; + } else if (input[i] == end) { + break; + } else if (parse) { + if (input[i] == '\\' && i < length - 1) i++; + output[index++] = input[i]; + } + } + + if (parse) + output[index] = '\0'; + else + output[0] = '\0'; + + return i; +} + + +void BScreen::shutdown(void) { + XSelectInput(blackbox->getXDisplay(), getRootWindow(), NoEventMask); + XSync(blackbox->getXDisplay(), False); + + while(! windowList.empty()) + unmanageWindow(windowList.front(), True); + +#ifdef ADD_BLOAT + slit->shutdown(); +#endif // ADD_BLOAT +} + + +void BScreen::showPosition(int /*x*/, int /*y*/) { +} + + +void BScreen::addStrut(Strut *strut) { + strutList.push_back(strut); +} + + +void BScreen::removeStrut(Strut *strut) { + strutList.remove(strut); +} + + +const Rect& BScreen::availableArea(void) const { + if (doFullMax()) + return getRect(); // return the full screen + return usableArea; +} + + +void BScreen::updateAvailableArea(void) { + Rect old_area = usableArea; + usableArea = getRect(); // reset to full screen + + /* these values represent offsets from the screen edge + * we look for the biggest offset on each edge and then apply them + * all at once + * do not be confused by the similarity to the names of Rect's members + */ + unsigned int current_left = 0, current_right = 0, current_top = 0, + current_bottom = 0; + + StrutList::const_iterator it = strutList.begin(), end = strutList.end(); + + for(; it != end; ++it) { + Strut *strut = *it; + if (strut->left > current_left) + current_left = strut->left; + if (strut->top > current_top) + current_top = strut->top; + if (strut->right > current_right) + current_right = strut->right; + if (strut->bottom > current_bottom) + current_bottom = strut->bottom; + } + + usableArea.setPos(current_left, current_top); + usableArea.setSize(usableArea.width() - (current_left + current_right), + usableArea.height() - (current_top + current_bottom)); + + if (old_area != usableArea) { + BlackboxWindowList::iterator it = windowList.begin(), + end = windowList.end(); + for (; it != end; ++it) + if ((*it)->isMaximized()) (*it)->remaximize(); + } +} + + +Workspace* BScreen::getWorkspace(unsigned int index) { + assert(index < workspacesList.size()); + return workspacesList[index]; +} + + +void BScreen::buttonPressEvent(const XButtonEvent *xbutton) { + if (xbutton->button == 1) { + } else if (xbutton->button == 2) { + } else if (xbutton->button == 3) { + } +} + + +void BScreen::toggleFocusModel(FocusModel model) { + std::for_each(windowList.begin(), windowList.end(), + std::mem_fun(&BlackboxWindow::ungrabButtons)); + + if (model == SloppyFocus) { + saveSloppyFocus(True); + } else { + saveSloppyFocus(False); + saveAutoRaise(False); + saveClickRaise(False); + } + + std::for_each(windowList.begin(), windowList.end(), + std::mem_fun(&BlackboxWindow::grabButtons)); +} + + +BColor BScreen::readDatabaseColor(const string &/*rname*/, const string &/*rclass*/, + const string &default_color) { + BColor color; + + color = BColor(default_color, getBaseDisplay(), getScreenNumber()); + return color; +} + + +#ifndef HAVE_STRCASESTR +static const char * strcasestr(const char *str, const char *ptn) { + const char *s2, *p2; + for(; *str; str++) { + for(s2=str,p2=ptn; ; s2++,p2++) { + if (!*p2) return str; + if (toupper(*s2) != toupper(*p2)) break; + } + } + return NULL; +} +#endif // HAVE_STRCASESTR diff --git a/src/Screen.hh b/src/Screen.hh new file mode 100644 index 0000000..29b8ea8 --- /dev/null +++ b/src/Screen.hh @@ -0,0 +1,304 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Screen.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __Screen_hh +#define __Screen_hh + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xresource.h> + +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else // !TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else // !HAVE_SYS_TIME_H +# include <time.h> +# endif // HAVE_SYS_TIME_H +#endif // TIME_WITH_SYS_TIME +} + +#include <list> +#include <vector> + +#include "Color.hh" +#include "Util.hh" +#include "Netizen.hh" +#include "Timer.hh" +#include "Workspace.hh" +#include "blackbox.hh" +class Slit; // forward reference + +#ifdef ADD_BLOAT +struct ToolbarStyle { + BColor l_text, w_text, c_text, b_pic; + + TextJustify justify; + + int doJustify(const char *text, int &start_pos, unsigned int max_length, + unsigned int modifier, bool multibyte) const; +}; +#endif // ADD_BLOAT + +struct Strut { + unsigned int top, bottom, left, right; + + Strut(void): top(0), bottom(0), left(0), right(0) {} +}; + +class BScreen : public ScreenInfo { +private: + bool root_colormap_installed, managed; + GC opGC; + + Blackbox *blackbox; + + typedef std::list<Netizen*> NetizenList; + NetizenList netizenList; + BlackboxWindowList iconList, windowList; + +#ifdef ADD_BLOAT + Slit *slit; + Toolbar *toolbar; +#endif // ADD_BLOAT + Workspace *current_workspace; + + unsigned long event_mask; + + Rect usableArea; + + typedef std::list<Strut*> StrutList; + StrutList strutList; + typedef std::vector<std::string> WorkspaceNamesList; + WorkspaceNamesList workspaceNames; + typedef std::vector<Workspace*> WorkspaceList; + WorkspaceList workspacesList; + + struct screen_resource { +#ifdef ADD_BLOAT + bool toolbar_on_top, toolbar_auto_hide; +#endif // ADD_BLOAT + + bool sloppy_focus, auto_raise, auto_edge_balance, image_dither, + ordered_dither, opaque_move, full_max, focus_new, focus_last, + click_raise, allow_scroll_lock; + BColor border_color; + + unsigned int workspaces; +#ifdef ADD_BLOAT + int toolbar_placement, toolbar_width_percent; +#endif // ADD_BLOAT + int placement_policy, edge_snap_threshold, row_direction, col_direction; + +#ifdef ADD_BLOAT + bool slit_on_top, slit_auto_hide; + int slit_placement, slit_direction; +#endif // ADD_BLOAT + + unsigned int handle_width, bevel_width, frame_width, border_width; + +#ifdef HAVE_STRFTIME + std::string strftime_format; +#else // !HAVE_STRFTIME + bool clock24hour; + int date_format; +#endif // HAVE_STRFTIME + + } resource; + + BScreen(const BScreen&); + BScreen& operator=(const BScreen&); + + BColor readDatabaseColor(const std::string &rname, + const std::string &rclass, + const std::string &default_color); + + void LoadStyle(void); + + +public: + enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, LeftRight, + RightLeft, TopBottom, BottomTop }; + enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet }; + enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure, + WindowShade, WindowIconify, WindowMaximize, WindowClose, WindowRaise, + WindowLower, WindowStick, WindowKill, SetStyle }; + enum FocusModel { SloppyFocus, ClickToFocus }; + + BScreen(Blackbox *bb, unsigned int scrn); + ~BScreen(void); + +#ifdef ADD_BLOAT + inline bool isToolbarOnTop(void) const + { return resource.toolbar_on_top; } + inline bool doToolbarAutoHide(void) const + { return resource.toolbar_auto_hide; } +#endif //ADD_BLOAT + inline bool isSloppyFocus(void) const + { return resource.sloppy_focus; } + inline bool isRootColormapInstalled(void) const + { return root_colormap_installed; } + inline bool doAutoRaise(void) const { return resource.auto_raise; } + inline bool doClickRaise(void) const { return resource.click_raise; } + inline bool isScreenManaged(void) const { return managed; } + inline bool doImageDither(void) const + { return resource.image_dither; } + inline bool doOrderedDither(void) const + { return resource.ordered_dither; } + inline bool doOpaqueMove(void) const { return resource.opaque_move; } + inline bool doFullMax(void) const { return resource.full_max; } + inline bool doFocusNew(void) const { return resource.focus_new; } + inline bool doFocusLast(void) const { return resource.focus_last; } + inline bool allowScrollLock(void) const { return resource.allow_scroll_lock;} + + inline const GC &getOpGC(void) const { return opGC; } + + inline Blackbox *getBlackbox(void) { return blackbox; } + inline BColor *getBorderColor(void) { return &resource.border_color; } + +#ifdef ADD_BLOAT + inline bool isSlitOnTop(void) const { return resource.slit_on_top; } + inline bool doSlitAutoHide(void) const + { return resource.slit_auto_hide; } + inline Slit *getSlit(void) { return slit; } + inline int getSlitPlacement(void) const + { return resource.slit_placement; } + inline int getSlitDirection(void) const + { return resource.slit_direction; } + inline void saveSlitPlacement(int p) { resource.slit_placement = p; } + inline void saveSlitDirection(int d) { resource.slit_direction = d; } + inline void saveSlitOnTop(bool t) { resource.slit_on_top = t; } + inline void saveSlitAutoHide(bool t) { resource.slit_auto_hide = t; } + + inline Toolbar *getToolbar(void) { return toolbar; } +#endif // ADD_BLOAT + + Workspace *getWorkspace(unsigned int index); + + inline Workspace *getCurrentWorkspace(void) { return current_workspace; } + + inline unsigned int getHandleWidth(void) const + { return resource.handle_width; } + inline unsigned int getBevelWidth(void) const + { return resource.bevel_width; } + inline unsigned int getFrameWidth(void) const + { return resource.frame_width; } + inline unsigned int getBorderWidth(void) const + { return resource.border_width; } + + inline unsigned int getCurrentWorkspaceID(void) const + { return current_workspace->getID(); } + inline unsigned int getWorkspaceCount(void) const + { return workspacesList.size(); } + inline unsigned int getIconCount(void) const { return iconList.size(); } + inline unsigned int getNumberOfWorkspaces(void) const + { return resource.workspaces; } +#ifdef ADD_BLOAT + inline int getToolbarPlacement(void) const + { return resource.toolbar_placement; } + inline int getToolbarWidthPercent(void) const + { return resource.toolbar_width_percent; } +#endif // ADD_BLOAT + inline int getPlacementPolicy(void) const + { return resource.placement_policy; } + inline int getEdgeSnapThreshold(void) const + { return resource.edge_snap_threshold; } + inline int getRowPlacementDirection(void) const + { return resource.row_direction; } + inline int getColPlacementDirection(void) const + { return resource.col_direction; } + + inline void setRootColormapInstalled(bool r) { root_colormap_installed = r; } + inline void saveSloppyFocus(bool s) { resource.sloppy_focus = s; } + inline void saveAutoRaise(bool a) { resource.auto_raise = a; } + inline void saveClickRaise(bool c) { resource.click_raise = c; } + inline void saveWorkspaces(unsigned int w) { resource.workspaces = w; } +#ifdef ADD_BLOAT + inline void saveToolbarOnTop(bool r) { resource.toolbar_on_top = r; } + inline void saveToolbarAutoHide(bool r) { resource.toolbar_auto_hide = r; } + inline void saveToolbarWidthPercent(int w) { resource.toolbar_width_percent = w; } + inline void saveToolbarPlacement(int p) { resource.toolbar_placement = p; } +#endif // ADD_BLOAT + inline void savePlacementPolicy(int p) { resource.placement_policy = p; } + inline void saveRowPlacementDirection(int d) { resource.row_direction = d; } + inline void saveColPlacementDirection(int d) { resource.col_direction = d; } + inline void saveEdgeSnapThreshold(int t) + { resource.edge_snap_threshold = t; } + inline void saveImageDither(bool d) { resource.image_dither = d; } + inline void saveOpaqueMove(bool o) { resource.opaque_move = o; } + inline void saveFullMax(bool f) { resource.full_max = f; } + inline void saveFocusNew(bool f) { resource.focus_new = f; } + inline void saveFocusLast(bool f) { resource.focus_last = f; } + inline void saveAllowScrollLock(bool a) { resource.allow_scroll_lock = a; } + + BlackboxWindow *getIcon(unsigned int index); + + const Rect& availableArea(void) const; + void updateAvailableArea(void); + void addStrut(Strut *strut); + void removeStrut(Strut *strut); + + unsigned int addWorkspace(void); + unsigned int removeLastWorkspace(void); + void removeWorkspaceNames(void); + void addWorkspaceName(const std::string& name); + const std::string getNameOfWorkspace(unsigned int id); + void changeWorkspaceID(unsigned int id); + + void addNetizen(Netizen *n); + void removeNetizen(Window w); + + void addIcon(BlackboxWindow *w); + void removeIcon(BlackboxWindow *w); + + void manageWindow(Window w); + void unmanageWindow(BlackboxWindow *w, bool remap); + void raiseWindows(Window *workspace_stack, unsigned int num); + void reassociateWindow(BlackboxWindow *w, unsigned int wkspc_id, + bool ignore_sticky); + void propagateWindowName(const BlackboxWindow *bw); + void prevFocus(void); + void nextFocus(void); + void raiseFocus(void); + void reconfigure(void); + void toggleFocusModel(FocusModel model); + void shutdown(void); + void showPosition(int x, int y); + + void buttonPressEvent(const XButtonEvent *xbutton); + + void updateNetizenCurrentWorkspace(void); + void updateNetizenWorkspaceCount(void); + void updateNetizenWindowFocus(void); + void updateNetizenWindowAdd(Window w, unsigned long p); + void updateNetizenWindowDel(Window w); + void updateNetizenConfigNotify(XEvent *e); + void updateNetizenWindowRaise(Window w); + void updateNetizenWindowLower(Window w); +}; + + +#endif // __Screen_hh diff --git a/src/Timer.cc b/src/Timer.cc new file mode 100644 index 0000000..c7fe667 --- /dev/null +++ b/src/Timer.cc @@ -0,0 +1,112 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// Timer.cc for Blackbox - An X11 Window Manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +#include "BaseDisplay.hh" +#include "Timer.hh" +#include "Util.hh" + +BTimer::BTimer(TimerQueueManager *m, TimeoutHandler *h) { + manager = m; + handler = h; + + recur = timing = False; +} + + +BTimer::~BTimer(void) { + if (timing) stop(); +} + + +void BTimer::setTimeout(long t) { + _timeout.tv_sec = t / 1000; + _timeout.tv_usec = t % 1000; + _timeout.tv_usec *= 1000; +} + + +void BTimer::setTimeout(const timeval &t) { + _timeout.tv_sec = t.tv_sec; + _timeout.tv_usec = t.tv_usec; +} + + +void BTimer::start(void) { + gettimeofday(&_start, 0); + + if (! timing) { + timing = True; + manager->addTimer(this); + } +} + + +void BTimer::stop(void) { + timing = False; + + manager->removeTimer(this); +} + + +void BTimer::halt(void) { + timing = False; +} + + +void BTimer::fireTimeout(void) { + if (handler) + handler->timeout(); +} + + +timeval BTimer::timeRemaining(const timeval &tm) const { + timeval ret = endpoint(); + + ret.tv_sec -= tm.tv_sec; + ret.tv_usec -= tm.tv_usec; + + return normalizeTimeval(ret); +} + + +timeval BTimer::endpoint(void) const { + timeval ret; + + ret.tv_sec = _start.tv_sec + _timeout.tv_sec; + ret.tv_usec = _start.tv_usec + _timeout.tv_usec; + + return normalizeTimeval(ret); +} + + +bool BTimer::shouldFire(const timeval &tm) const { + timeval end = endpoint(); + + return !((tm.tv_sec < end.tv_sec) || + (tm.tv_sec == end.tv_sec && tm.tv_usec < end.tv_usec)); +} diff --git a/src/Timer.hh b/src/Timer.hh new file mode 100644 index 0000000..4958154 --- /dev/null +++ b/src/Timer.hh @@ -0,0 +1,132 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// Timer.hh for Blackbox - An X11 Window Manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef _BLACKBOX_Timer_hh +#define _BLACKBOX_Timer_hh + +extern "C" { +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else // !TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else // !HAVE_SYS_TIME_H +# include <time.h> +# endif // HAVE_SYS_TIME_H +#endif // TIME_WITH_SYS_TIME +} + +// forward declaration +class TimerQueueManager; + +class TimeoutHandler { +public: + virtual void timeout(void) = 0; +}; + +class BTimer { +private: + TimerQueueManager *manager; + TimeoutHandler *handler; + bool timing, recur; + + timeval _start, _timeout; + + BTimer(const BTimer&); + BTimer& operator=(const BTimer&); + +public: + BTimer(TimerQueueManager *m, TimeoutHandler *h); + virtual ~BTimer(void); + + void fireTimeout(void); + + inline bool isTiming(void) const { return timing; } + inline bool isRecurring(void) const { return recur; } + + inline const timeval &getTimeout(void) const { return _timeout; } + inline const timeval &getStartTime(void) const { return _start; } + + timeval timeRemaining(const timeval &tm) const; + bool shouldFire(const timeval &tm) const; + timeval endpoint(void) const; + + inline void recurring(bool b) { recur = b; } + + void setTimeout(long t); + void setTimeout(const timeval &t); + + void start(void); // manager acquires timer + void stop(void); // manager releases timer + void halt(void); // halts the timer + + bool operator<(const BTimer& other) const + { return shouldFire(other.endpoint()); } +}; + + +#include <queue> +#include <algorithm> + +template <class _Tp, class _Sequence, class _Compare> +class _timer_queue: protected std::priority_queue<_Tp, _Sequence, _Compare> { +public: + typedef std::priority_queue<_Tp, _Sequence, _Compare> _Base; + + _timer_queue(void): _Base() {} + ~_timer_queue(void) {} + + void release(const _Tp& value) { + c.erase(std::remove(c.begin(), c.end(), value), c.end()); + // after removing the item we need to make the heap again + std::make_heap(c.begin(), c.end(), comp); + } + bool empty(void) const { return _Base::empty(); } + size_t size(void) const { return _Base::size(); } + void push(const _Tp& value) { _Base::push(value); } + void pop(void) { _Base::pop(); } + const _Tp& top(void) const { return _Base::top(); } +private: + // no copying! + _timer_queue(const _timer_queue&) {} + _timer_queue& operator=(const _timer_queue&) {} +}; + +struct TimerLessThan { + bool operator()(const BTimer* const l, const BTimer* const r) const { + return *r < *l; + } +}; + +#include <vector> +typedef _timer_queue<BTimer*, std::vector<BTimer*>, TimerLessThan> TimerQueue; + +class TimerQueueManager { +public: + virtual void addTimer(BTimer* timer) = 0; + virtual void removeTimer(BTimer* timer) = 0; +}; + +#endif // _BLACKBOX_Timer_hh diff --git a/src/Util.cc b/src/Util.cc new file mode 100644 index 0000000..ce70b10 --- /dev/null +++ b/src/Util.cc @@ -0,0 +1,252 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Util.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000, 2002 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <X11/Xatom.h> + +#ifdef HAVE_STRING_H +#include <string.h> +#endif +#ifdef HAVE_STDLIB_H +#include <stdlib.h> +#endif +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else // !TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else // !HAVE_SYS_TIME_H +# include <time.h> +# endif // HAVE_SYS_TIME_H +#endif // TIME_WITH_SYS_TIME +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif // HAVE_UNISTD_H +#if defined(HAVE_PROCESS_H) && defined(__EMX__) +# include <process.h> +#endif // HAVE_PROCESS_H __EMX__ + +#include <assert.h> +} + +#include <algorithm> + +#include "Util.hh" +#include <X11/Xlocale.h> + +using std::string; + + +void Rect::setX(int __x) { + _x2 += __x - _x1; + _x1 = __x; +} + + +void Rect::setY(int __y) +{ + _y2 += __y - _y1; + _y1 = __y; +} + + +void Rect::setPos(int __x, int __y) { + _x2 += __x - _x1; + _x1 = __x; + _y2 += __y - _y1; + _y1 = __y; +} + + +void Rect::setWidth(unsigned int __w) { + _x2 = __w + _x1 - 1; +} + + +void Rect::setHeight(unsigned int __h) { + _y2 = __h + _y1 - 1; +} + + +void Rect::setSize(unsigned int __w, unsigned int __h) { + _x2 = __w + _x1 - 1; + _y2 = __h + _y1 - 1; +} + + +void Rect::setRect(int __x, int __y, unsigned int __w, unsigned int __h) { + *this = Rect(__x, __y, __w, __h); +} + + +void Rect::setCoords(int __l, int __t, int __r, int __b) { + _x1 = __l; + _y1 = __t; + _x2 = __r; + _y2 = __b; +} + + +Rect Rect::operator|(const Rect &a) const { + Rect b; + + b._x1 = std::min(_x1, a._x1); + b._y1 = std::min(_y1, a._y1); + b._x2 = std::max(_x2, a._x2); + b._y2 = std::max(_y2, a._y2); + + return b; +} + + +Rect Rect::operator&(const Rect &a) const { + Rect b; + + b._x1 = std::max(_x1, a._x1); + b._y1 = std::max(_y1, a._y1); + b._x2 = std::min(_x2, a._x2); + b._y2 = std::min(_y2, a._y2); + + return b; +} + + +bool Rect::intersects(const Rect &a) const { + return std::max(_x1, a._x1) <= std::min(_x2, a._x2) && + std::max(_y1, a._y1) <= std::min(_y2, a._y2); +} + + +string expandTilde(const string& s) { + if (s[0] != '~') return s; + + const char* const home = getenv("HOME"); + if (home == NULL) return s; + + return string(home + s.substr(s.find('/'))); +} + + +void bexec(const string& command, const string& displaystring) { +#ifndef __EMX__ + if (! fork()) { + setsid(); + int ret = putenv(const_cast<char *>(displaystring.c_str())); + assert(ret != -1); + string cmd = "exec "; + cmd += command; + ret = execl("/bin/sh", "/bin/sh", "-c", cmd.c_str(), NULL); + exit(ret); + } +#else // __EMX__ + spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", command, NULL); +#endif // !__EMX__ +} + + +#ifndef HAVE_BASENAME +string basename (const string& path) { + string::size_type slash = path.rfind('/'); + if (slash == string::npos) + return path; + return path.substr(slash+1); +} +#endif // HAVE_BASENAME + + +string textPropertyToString(Display *display, XTextProperty& text_prop) { + string ret; + + if (text_prop.value && text_prop.nitems > 0) { + if (text_prop.encoding == XA_STRING) { + ret = (char *) text_prop.value; + } else { + text_prop.nitems = strlen((char *) text_prop.value); + + char **list; + int num; + int r = XmbTextPropertyToTextList(display, &text_prop, + &list, &num); + if ((r == Success||r > 0)&& + num > 0 && *list) { + for (int i = 0; i < num; i++) + { + ret += list[i]; + } + XFreeStringList(list); + } + } + } + + return ret; +} + + +timeval normalizeTimeval(const timeval &tm) { + timeval ret = tm; + + while (ret.tv_usec < 0) { + if (ret.tv_sec > 0) { + --ret.tv_sec; + ret.tv_usec += 1000000; + } else { + ret.tv_usec = 0; + } + } + + if (ret.tv_usec >= 1000000) { + ret.tv_sec += ret.tv_usec / 1000000; + ret.tv_usec %= 1000000; + } + + if (ret.tv_sec < 0) ret.tv_sec = 0; + + return ret; +} + + +string itostring(unsigned long i) { + if (i == 0) + return string("0"); + + const char nums[] = "0123456789"; + + string tmp; + for (; i > 0; i /= 10) + tmp.insert(tmp.begin(), nums[i%10]); + return tmp; +} + + +string itostring(long i) { + std::string tmp = itostring(static_cast<unsigned long>(abs(i))); + if (i < 0) + tmp.insert(tmp.begin(), '-'); + return tmp; +} diff --git a/src/Util.hh b/src/Util.hh new file mode 100644 index 0000000..d5bce37 --- /dev/null +++ b/src/Util.hh @@ -0,0 +1,112 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Util.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef _BLACKBOX_UTIL_HH +#define _BLACKBOX_UTIL_HH + +#include <X11/Xlib.h> +#include <X11/Xutil.h> + +#include <string> + +class Rect { +public: + inline Rect(void) : _x1(0), _y1(0), _x2(0), _y2(0) { } + inline Rect(int __x, int __y, unsigned int __w, unsigned int __h) + : _x1(__x), _y1(__y), _x2(__w + __x - 1), _y2(__h + __y - 1) { } + inline explicit Rect(const XRectangle& xrect) + : _x1(xrect.x), _y1(xrect.y), _x2(xrect.width + xrect.x - 1), + _y2(xrect.height + xrect.y - 1) { } + + inline int left(void) const { return _x1; } + inline int top(void) const { return _y1; } + inline int right(void) const { return _x2; } + inline int bottom(void) const { return _y2; } + + inline int x(void) const { return _x1; } + inline int y(void) const { return _y1; } + void setX(int __x); + void setY(int __y); + void setPos(int __x, int __y); + + inline unsigned int width(void) const { return _x2 - _x1 + 1; } + inline unsigned int height(void) const { return _y2 - _y1 + 1; } + void setWidth(unsigned int __w); + void setHeight(unsigned int __h); + void setSize(unsigned int __w, unsigned int __h); + + void setRect(int __x, int __y, unsigned int __w, unsigned int __h); + + void setCoords(int __l, int __t, int __r, int __b); + + inline bool operator==(const Rect &a) + { return _x1 == a._x1 && _y1 == a._y1 && _x2 == a._x2 && _y2 == a._y2; } + inline bool operator!=(const Rect &a) { return ! operator==(a); } + + Rect operator|(const Rect &a) const; + Rect operator&(const Rect &a) const; + inline Rect &operator|=(const Rect &a) { *this = *this | a; return *this; } + inline Rect &operator&=(const Rect &a) { *this = *this & a; return *this; } + + inline bool valid(void) const { return _x2 > _x1 && _y2 > _y1; } + + bool intersects(const Rect &a) const; + +private: + int _x1, _y1, _x2, _y2; +}; + +/* XXX: this needs autoconf help */ +const unsigned int BSENTINEL = 65535; + +std::string expandTilde(const std::string& s); + +void bexec(const std::string& command, const std::string& displaystring); + +#ifndef HAVE_BASENAME +std::string basename(const std::string& path); +#endif + +std::string textPropertyToString(Display *display, XTextProperty& text_prop); + +struct timeval; // forward declare to avoid the header +timeval normalizeTimeval(const timeval &tm); + +struct PointerAssassin { + template<typename T> + inline void operator()(const T ptr) const { + delete ptr; + } +}; + +std::string itostring(unsigned long i); +std::string itostring(long i); + +template <class T> +T next_it(T x) { return ++x; } + +template <class T> +T prior_it(T x) { return --x; } + +#endif diff --git a/src/Window.cc b/src/Window.cc new file mode 100644 index 0000000..d1db058 --- /dev/null +++ b/src/Window.cc @@ -0,0 +1,3015 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Window.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh at debian.org> +// Copyright (c) 1997 - 2000, 2002 Brad Hughes <bhughes at trolltech.com> +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xatom.h> +#include <X11/keysym.h> + +#include <X11/extensions/windowswm.h> +#include <X11/extensions/windowswmstr.h> + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H + +#ifdef DEBUG +# ifdef HAVE_STDIO_H +# include <stdio.h> +# endif // HAVE_STDIO_H +#endif // DEBUG + +#ifdef HAVE_STDLIB_H + #include <stdlib.h> +#endif // HAVE_STDLIB_H +} + +#include <assert.h> + +#include "i18n.hh" +#include "blackbox.hh" +#include "GCCache.hh" +#include "Screen.hh" +#include "Util.hh" +#include "Window.hh" +#include "Workspace.hh" + + +/* + * Initializes the class with default values/the window's set initial values. + */ +BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) { + // fprintf(stderr, "BlackboxWindow size: %d bytes\n", + // sizeof(BlackboxWindow)); + +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::BlackboxWindow(): creating 0x%lx\n", w); +#endif // DEBUG + + /* + set timer to zero... it is initialized properly later, so we check + if timer is zero in the destructor, and assume that the window is not + fully constructed if timer is zero... + */ + timer = 0; + blackbox = b; + client.window = w; + screen = s; + + if (! validateClient()) { + delete this; + return; + } + + // fetch client size and placement + XWindowAttributes wattrib; + if (! XGetWindowAttributes(blackbox->getXDisplay(), + client.window, &wattrib) || + ! wattrib.screen || wattrib.override_redirect) { +#ifdef DEBUG + fprintf(stderr, + "BlackboxWindow::BlackboxWindow(): XGetWindowAttributes failed\n"); +#endif // DEBUG + + delete this; + return; + } + + // set the eventmask early in the game so that we make sure we get + // all the events we are interested in + XSetWindowAttributes attrib_set; + attrib_set.event_mask = PropertyChangeMask | FocusChangeMask | + StructureNotifyMask; + attrib_set.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask | + ButtonMotionMask; + XChangeWindowAttributes(blackbox->getXDisplay(), client.window, + CWEventMask|CWDontPropagate, &attrib_set); + + flags.moving = flags.resizing = flags.shaded = flags.visible = + flags.iconic = flags.focused = flags.stuck = flags.modal = + flags.send_focus_message = flags.shaped = False; + flags.maximized = 0; + + blackbox_attrib.workspace = window_number = BSENTINEL; + + blackbox_attrib.flags = blackbox_attrib.attrib = blackbox_attrib.stack + = blackbox_attrib.decoration = 0l; + blackbox_attrib.premax_x = blackbox_attrib.premax_y = 0; + blackbox_attrib.premax_w = blackbox_attrib.premax_h = 0; + + frame.window = None; + + decorations = Decor_Titlebar | Decor_Border | Decor_Handle | + Decor_Iconify | Decor_Maximize; + functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize; + frame_style = WindowsWMFrameStylePopup; + frame_style_ex = WindowsWMFrameStyleExAppWindow; + + client.normal_hint_flags = 0; + client.window_group = None; + client.transient_for = 0; + + current_state = NormalState; + + /* + set the initial size and location of client window (relative to the + _root window_). This position is the reference point used with the + window's gravity to find the window's initial position. + */ + client.rect.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height); + client.old_bw = wattrib.border_width; + + lastButtonPressTime = 0; + + timer = new BTimer(blackbox, this); + timer->setTimeout(blackbox->getAutoRaiseDelay()); + + // get size, aspect, minimum/maximum size and other hints set by the + // client + + if (! getBlackboxHints()) + getMWMHints(); + + getWMProtocols(); + getWMHints(); + getWMNormalHints(); + getWMClass(); + + frame.window = createToplevelWindow(); + blackbox->saveWindowSearch(frame.window, this); + + //FIXME: + if (! getBlackboxHints()) + getMWMHints(); + + getWMProtocols(); + getWMHints(); + getWMNormalHints(); + getWMClass(); + + XChangeProperty(blackbox->getXDisplay(), frame.window, + blackbox->WindowsWMClientWindow(), + XA_INTEGER, 32, + PropModeReplace, (unsigned char *) &client.window, 1); + + // determine if this is a transient window + getTransientInfo(); + + // adjust the window decorations based on transience and window sizes + + if (isTransient()) { + decorations &= ~(Decor_Maximize | Decor_Handle); + functions &= ~Func_Maximize; + } + + if ((client.normal_hint_flags & PMinSize) && + (client.normal_hint_flags & PMaxSize) && + client.max_width <= client.min_width && + client.max_height <= client.min_height) { + decorations &= ~(Decor_Maximize | Decor_Handle); + functions &= ~(Func_Resize | Func_Maximize); + } + + // now that we know what decorations are required, create them + + if (decorations & Decor_Titlebar) + createTitlebar(); + + if (decorations & Decor_Handle) + createHandle(); + + // apply the size and gravity hint to the frame + + upsize(); + + bool place_window = True; + if (blackbox->isStartup() || isTransient() || + client.normal_hint_flags & (PPosition|USPosition)) { + applyGravity(frame.rect); + + if (blackbox->isStartup() || client.rect.intersects(screen->getRect())) + place_window = False; + } + + /* + the server needs to be grabbed here to prevent client's from sending + events while we are in the process of configuring their window. + We hold the grab until after we are done moving the window around. + */ + + XGrabServer(blackbox->getXDisplay()); + + associateClientWindow(); + + blackbox->saveWindowSearch(client.window, this); + + if (blackbox_attrib.workspace >= screen->getWorkspaceCount()) + screen->getCurrentWorkspace()->addWindow(this, place_window); + else + screen->getWorkspace(blackbox_attrib.workspace)-> + addWindow(this, place_window); + + if (! place_window) { + // don't need to call configure if we are letting the workspace + // place the window + configure(frame.rect.x(), frame.rect.y(), + frame.rect.width(), frame.rect.height()); + } + + positionWindows(); + + XUngrabServer(blackbox->getXDisplay()); + +#ifdef SHAPE + if (blackbox->hasShapeExtensions() && flags.shaped) + configureShape(); +#endif // SHAPE + + // now that we know where to put the window and what it should look like + // we apply the decorations + decorate(); + + grabButtons(); + + XMapSubwindows(blackbox->getXDisplay(), frame.window); + + // this ensures the title, buttons, and other decor are properly displayed + redrawWindowFrame(); + + // preserve the window's initial state on first map, and its current state + // across a restart + unsigned long initial_state = current_state; + if (! getState()) + current_state = initial_state; + + // the following flags are set by blackbox native apps only + if (flags.shaded) { + flags.shaded = False; + initial_state = current_state; + shade(); + + /* + At this point in the life of a window, current_state should only be set + to IconicState if the window was an *icon*, not if it was shaded. + */ + if (initial_state != IconicState) + current_state = NormalState; + } + + if (flags.stuck) { + flags.stuck = False; + stick(); + } + + if (flags.maximized && (functions & Func_Maximize)) + remaximize(); +} + + +BlackboxWindow::~BlackboxWindow(void) { +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::~BlackboxWindow: destroying 0x%lx\n", + client.window); +#endif // DEBUG + + if (! timer) // window not managed... + return; + + if (flags.moving || flags.resizing) { + XUngrabPointer(blackbox->getXDisplay(), CurrentTime); + } + + delete timer; + + if (client.window_group) { + BWindowGroup *group = blackbox->searchGroup(client.window_group); + if (group) group->removeWindow(this); + } + + // remove ourselves from our transient_for + if (isTransient()) { + if (client.transient_for != (BlackboxWindow *) ~0ul) + client.transient_for->client.transientList.remove(this); + + client.transient_for = (BlackboxWindow*) 0; + } + + if (client.transientList.size() > 0) { + // reset transient_for for all transients + BlackboxWindowList::iterator it, end = client.transientList.end(); + for (it = client.transientList.begin(); it != end; ++it) + (*it)->client.transient_for = (BlackboxWindow*) 0; + } + + if (frame.window) { + blackbox->removeWindowSearch(frame.window); + XDestroyWindow(blackbox->getXDisplay(), frame.window); + } + + blackbox->removeWindowSearch(client.window); +} + + +/* + * Creates a new top level window, with a given location, size, and border + * width. + * Returns: the newly created window + */ +Window BlackboxWindow::createToplevelWindow(void) { + XSetWindowAttributes attrib_create; + unsigned long create_mask = CWBackPixmap | CWBorderPixel | CWColormap | + CWOverrideRedirect | CWEventMask; + + attrib_create.background_pixmap = None; + attrib_create.colormap = screen->getColormap(); + attrib_create.override_redirect = True; + attrib_create.event_mask = EnterWindowMask | LeaveWindowMask; + + return XCreateWindow(blackbox->getXDisplay(), screen->getRootWindow(), + 0, 0, 1, 1, 0, screen->getDepth(), + InputOutput, screen->getVisual(), create_mask, + &attrib_create); +} + + +/* + * Creates a child window, and optionally associates a given cursor with + * the new window. + */ +Window BlackboxWindow::createChildWindow(Window parent, + unsigned long event_mask, + Cursor cursor) { + XSetWindowAttributes attrib_create; + unsigned long create_mask = CWBackPixmap | CWBorderPixel | + CWEventMask; + + attrib_create.background_pixmap = None; + attrib_create.event_mask = event_mask; + + if (cursor) { + create_mask |= CWCursor; + attrib_create.cursor = cursor; + } + + return XCreateWindow(blackbox->getXDisplay(), parent, 0, 0, 1, 1, 0, + screen->getDepth(), InputOutput, screen->getVisual(), + create_mask, &attrib_create); +} + + +void BlackboxWindow::associateClientWindow(void) { + XSetWindowBorderWidth(blackbox->getXDisplay(), client.window, 0); + getWMName(); + getWMIconName(); + getWMClass(); + +#ifdef DEBUG + fprintf(stderr, "XWindowsWMFrameSetTitle %s\n", client.title.c_str()); +#endif + + XWindowsWMFrameSetTitle(blackbox->getXDisplay(), 0, frame.window, + client.title.length(), client.title.c_str()); + + XChangeSaveSet(blackbox->getXDisplay(), client.window, SetModeInsert); + + XSelectInput(blackbox->getXDisplay(), frame.window, + StructureNotifyMask|SubstructureRedirectMask); + + /* + note we used to grab around this call to XReparentWindow however the + server is now grabbed before this method is called + */ + unsigned long event_mask = PropertyChangeMask | FocusChangeMask | + StructureNotifyMask; + XSelectInput(blackbox->getXDisplay(), client.window, + event_mask & ~StructureNotifyMask); + XReparentWindow(blackbox->getXDisplay(), client.window, frame.window, 0, 0); + XSelectInput(blackbox->getXDisplay(), client.window, event_mask); + + XMapSubwindows(blackbox->getXDisplay(), frame.window); + +#ifdef SHAPE + if (blackbox->hasShapeExtensions()) { + XShapeSelectInput(blackbox->getXDisplay(), client.window, + ShapeNotifyMask); + + Bool shaped = False; + int foo; + unsigned int ufoo; + + XShapeQueryExtents(blackbox->getXDisplay(), client.window, &shaped, + &foo, &foo, &ufoo, &ufoo, &foo, &foo, &foo, + &ufoo, &ufoo); + flags.shaped = shaped; + } +#endif // SHAPE +} + + +void BlackboxWindow::decorate(void) { + if (decorations & Decor_Titlebar) { + frame_style |= WindowsWMFrameStyleCaption | WindowsWMFrameStyleSysMenu; + + decorateLabel(); + } else { + frame_style &= ~(WindowsWMFrameStyleCaption | WindowsWMFrameStyleSysMenu); + } + + if (decorations & Decor_Border) { + frame_style |= WindowsWMFrameStyleBorder; + blackbox_attrib.flags |= AttribDecoration; + blackbox_attrib.decoration = DecorNormal; + } else { + frame_style &= ~WindowsWMFrameStyleBorder; + blackbox_attrib.flags |= AttribDecoration; + blackbox_attrib.decoration = DecorNone; + } + + if (decorations & Decor_Handle) { + frame_style |= WindowsWMFrameStyleSizeBox; + } else { + frame_style &= ~WindowsWMFrameStyleSizeBox; + } + + XWindowsWMFrameDraw(blackbox->getXDisplay(), 0, frame.window, + frame_style, + frame_style_ex, + client.rect.x(), client.rect.y(), + client.rect.width(), client.rect.height()); + + XSetWindowBorder(blackbox->getXDisplay(), frame.window, + screen->getBorderColor()->pixel()); + + int prop = 1; + XChangeProperty(blackbox->getXDisplay(), frame.window, + blackbox->WindowsWMRaiseOnClick(), + XA_INTEGER, 32, + PropModeReplace, (unsigned char *) &prop, 1); + XChangeProperty(blackbox->getXDisplay(), frame.window, + blackbox->WindowsWMMouseActivate(), + XA_INTEGER, 32, + PropModeReplace, (unsigned char *) &prop, 1); +} + + +void BlackboxWindow::decorateLabel(void) { +} + + +void BlackboxWindow::createHandle(void) { +} + + +void BlackboxWindow::destroyHandle(void) { +} + + +void BlackboxWindow::createTitlebar(void) { +/* if (decorations & Decor_Iconify) createIconifyButton(); + if (decorations & Decor_Maximize) createMaximizeButton(); + if (decorations & Decor_Close) createCloseButton();*/ + if (decorations & Decor_Iconify) { + frame_style |= WindowsWMFrameStyleMinimizeBox; + } else { + frame_style &= ~WindowsWMFrameStyleMinimizeBox; + } + if (decorations & Decor_Maximize) { + frame_style |= WindowsWMFrameStyleMaximizeBox; + } else { + frame_style &= ~WindowsWMFrameStyleMaximizeBox; + } + //FIXME: how? + if (decorations & Decor_Close) { + } else { + } + XWindowsWMFrameDraw(blackbox->getXDisplay(), 0, frame.window, + frame_style, + frame_style_ex, + client.rect.x(), client.rect.y(), + client.rect.width(), client.rect.height()); +} + + +void BlackboxWindow::destroyTitlebar(void) { +} + + +void BlackboxWindow::createCloseButton(void) { +} + + +void BlackboxWindow::destroyCloseButton(void) { +} + + +void BlackboxWindow::createIconifyButton(void) { +} + + +void BlackboxWindow::destroyIconifyButton(void) { +} + + +void BlackboxWindow::createMaximizeButton(void) { +} + + +void BlackboxWindow::destroyMaximizeButton(void) { +} + + +void BlackboxWindow::positionButtons(bool /*redecorate_label*/) { +} + + +void BlackboxWindow::reconfigure(void) { + restoreGravity(client.rect); + upsize(); + applyGravity(frame.rect); + positionWindows(); + decorate(); + redrawWindowFrame(); + + ungrabButtons(); + grabButtons(); +} + + +void BlackboxWindow::grabButtons(void) { + if (! screen->isSloppyFocus() || screen->doClickRaise()) + // grab button 1 for changing focus/raising + blackbox->grabButton(Button1, 0, frame.window, True, ButtonPressMask, + GrabModeSync, GrabModeSync, frame.window, None, + screen->allowScrollLock()); + + if (functions & Func_Move) + blackbox->grabButton(Button1, Mod1Mask, frame.window, True, + ButtonReleaseMask | ButtonMotionMask, GrabModeAsync, + GrabModeAsync, frame.window, + blackbox->getMoveCursor(), + screen->allowScrollLock()); + if (functions & Func_Resize) + blackbox->grabButton(Button3, Mod1Mask, frame.window, True, + ButtonReleaseMask | ButtonMotionMask, GrabModeAsync, + GrabModeAsync, frame.window, + blackbox->getLowerRightAngleCursor(), + screen->allowScrollLock()); + // alt+middle lowers the window + blackbox->grabButton(Button2, Mod1Mask, frame.window, True, + ButtonReleaseMask, GrabModeAsync, GrabModeAsync, + frame.window, None, screen->allowScrollLock()); +} + + +void BlackboxWindow::ungrabButtons(void) { + blackbox->ungrabButton(Button1, 0, frame.window); + blackbox->ungrabButton(Button1, Mod1Mask, frame.window); + blackbox->ungrabButton(Button2, Mod1Mask, frame.window); + blackbox->ungrabButton(Button3, Mod1Mask, frame.window); +} + + +void BlackboxWindow::positionWindows(void) { +#if 1 + //FIXME: Get Windows window's rect and use it. + XMoveResizeWindow(blackbox->getXDisplay(), frame.window, + client.rect.x(), client.rect.y(), client.rect.width(), + (flags.shaded) ? 0 : client.rect.height()); + XSetWindowBorderWidth(blackbox->getXDisplay(), frame.window, 0); + XMoveResizeWindow(blackbox->getXDisplay(), client.window, + 0, 0, client.rect.width(), client.rect.height()); + // ensure client.rect contains the real location + client.rect.setPos(frame.rect.left(), frame.rect.top()); + + if (decorations & Decor_Titlebar) { + //WindowsWM ext + } else { + } + if (decorations & Decor_Handle) { + //WindowsWM ext + } else { + } + XSync(blackbox->getXDisplay(), False); +#else + XMoveResizeWindow(blackbox->getXDisplay(), frame.window, + frame.rect.x(), frame.rect.y(), frame.inside_w, + (flags.shaded) ? frame.title_h : frame.inside_h); + XSetWindowBorderWidth(blackbox->getXDisplay(), frame.window, + frame.border_w); + XSetWindowBorderWidth(blackbox->getXDisplay(), frame.plate, + frame.mwm_border_w); + XMoveResizeWindow(blackbox->getXDisplay(), frame.plate, + frame.margin.left - frame.mwm_border_w - frame.border_w, + frame.margin.top - frame.mwm_border_w - frame.border_w, + client.rect.width(), client.rect.height()); + XMoveResizeWindow(blackbox->getXDisplay(), client.window, + 0, 0, client.rect.width(), client.rect.height()); + // ensure client.rect contains the real location + client.rect.setPos(frame.rect.left() + frame.margin.left, + frame.rect.top() + frame.margin.top); + + if (decorations & Decor_Titlebar) { + //WindowsWM ext + } else { + } + if (decorations & Decor_Handle) { + //WindowsWM ext + } else { + } + XSync(blackbox->getXDisplay(), False); +#endif +} + + +void BlackboxWindow::getWMName(void) { + XTextProperty text_prop; + + std::string name; + + if (XGetWMName(blackbox->getXDisplay(), client.window, &text_prop)) { + name = textPropertyToString(blackbox->getXDisplay(), text_prop); + XFree((char *) text_prop.value); + } + if (! name.empty()) + client.title = name; + else + client.title = i18n(WindowSet, WindowUnnamed, "Unnamed"); + +#ifdef DEBUG_WITH_ID + // the 16 is the 8 chars of the debug text plus the number + char *tmp = new char[client.title.length() + 16]; + sprintf(tmp, "%s; id: 0x%lx", client.title.c_str(), client.window); + client.title = tmp; + delete tmp; +#endif +} + + +void BlackboxWindow::getWMIconName(void) { + XTextProperty text_prop; + + std::string name; + + if (XGetWMIconName(blackbox->getXDisplay(), client.window, &text_prop)) { + name = textPropertyToString(blackbox->getXDisplay(), text_prop); + XFree((char *) text_prop.value); + } + if (! name.empty()) + client.icon_title = name; + else + client.icon_title = client.title; +} + + +/* + * Retrieve which WM Protocols are supported by the client window. + * If the WM_DELETE_WINDOW protocol is supported, add the close button to the + * window's decorations and allow the close behavior. + * If the WM_TAKE_FOCUS protocol is supported, save a value that indicates + * this. + */ +void BlackboxWindow::getWMProtocols(void) { + Atom *proto; + int num_return = 0; + + if (XGetWMProtocols(blackbox->getXDisplay(), client.window, + &proto, &num_return)) { + for (int i = 0; i < num_return; ++i) { + if (proto[i] == blackbox->getWMDeleteAtom()) { + decorations |= Decor_Close; + functions |= Func_Close; + } else if (proto[i] == blackbox->getWMTakeFocusAtom()) { + flags.send_focus_message = True; + } else if (proto[i] == blackbox->getBlackboxStructureMessagesAtom()) { + screen->addNetizen(new Netizen(screen, client.window)); + } + } + + XFree(proto); + } +} + + +/* + * Gets the value of the WM_HINTS property. + * If the property is not set, then use a set of default values. + */ +void BlackboxWindow::getWMHints(void) { + focus_mode = F_Passive; + + // remove from current window group + if (client.window_group) { + BWindowGroup *group = blackbox->searchGroup(client.window_group); + if (group) group->removeWindow(this); + } + client.window_group = None; + + XWMHints *wmhint = XGetWMHints(blackbox->getXDisplay(), client.window); + if (! wmhint) + return; + + if (wmhint->flags & InputHint) { + if (wmhint->input == True) { + if (flags.send_focus_message) + focus_mode = F_LocallyActive; + } else { + if (flags.send_focus_message) + focus_mode = F_GloballyActive; + else + focus_mode = F_NoInput; + } + } + + if (wmhint->flags & StateHint) + current_state = wmhint->initial_state; + + if (wmhint->flags & WindowGroupHint) { + client.window_group = wmhint->window_group; + + // add window to the appropriate group + BWindowGroup *group = blackbox->searchGroup(client.window_group); + if (! group) { // no group found, create it! + new BWindowGroup(blackbox, client.window_group); + group = blackbox->searchGroup(client.window_group); + } + if (group) + group->addWindow(this); + } + + //FIXME: move to extension? + XSetWMHints(blackbox->getXDisplay(), frame.window, wmhint); + + XFree(wmhint); +} + + +/* + * Gets the value of the WM_NORMAL_HINTS property. + * If the property is not set, then use a set of default values. + */ +void BlackboxWindow::getWMNormalHints(void) { + long icccm_mask; + XSizeHints sizehint; + + client.min_width = client.min_height = + client.width_inc = client.height_inc = 1; + client.base_width = client.base_height = 0; + client.win_gravity = NorthWestGravity; +#if 0 + client.min_aspect_x = client.min_aspect_y = + client.max_aspect_x = client.max_aspect_y = 1; +#endif + + /* + use the full screen, not the strut modified size. otherwise when the + availableArea changes max_width/height will be incorrect and lead to odd + rendering bugs. + */ + const Rect& screen_area = screen->getRect(); + client.max_width = screen_area.width(); + client.max_height = screen_area.height(); + + if (! XGetWMNormalHints(blackbox->getXDisplay(), client.window, + &sizehint, &icccm_mask)) + return; + + client.normal_hint_flags = sizehint.flags; + + if (sizehint.flags & PMinSize) { + if (sizehint.min_width >= 0) + client.min_width = sizehint.min_width; + if (sizehint.min_height >= 0) + client.min_height = sizehint.min_height; + } + + if (sizehint.flags & PMaxSize) { + if (sizehint.max_width > static_cast<signed>(client.min_width)) + client.max_width = sizehint.max_width; + else + client.max_width = client.min_width; + + if (sizehint.max_height > static_cast<signed>(client.min_height)) + client.max_height = sizehint.max_height; + else + client.max_height = client.min_height; + } + + if (sizehint.flags & PResizeInc) { + client.width_inc = sizehint.width_inc; + client.height_inc = sizehint.height_inc; + } + +#if 0 // we do not support this at the moment + if (sizehint.flags & PAspect) { + client.min_aspect_x = sizehint.min_aspect.x; + client.min_aspect_y = sizehint.min_aspect.y; + client.max_aspect_x = sizehint.max_aspect.x; + client.max_aspect_y = sizehint.max_aspect.y; + } +#endif + + if (sizehint.flags & PBaseSize) { + client.base_width = sizehint.base_width; + client.base_height = sizehint.base_height; + } + + if (sizehint.flags & PWinGravity) + client.win_gravity = sizehint.win_gravity; + + //FIXME: move to extension? + XSetWMNormalHints(blackbox->getXDisplay(), frame.window, &sizehint); + +#ifdef DEBUG + fprintf(stderr, "XSetWMNormalHints\n"); +#endif +} + + +/* + * Gets the MWM hints for the class' contained window. + * This is used while initializing the window to its first state, and not + * thereafter. + * Returns: true if the MWM hints are successfully retreived and applied; + * false if they are not. + */ +void BlackboxWindow::getMWMHints(void) { + int format; + Atom atom_return; + unsigned long num, len; + MwmHints *mwm_hint = 0; + + int ret = XGetWindowProperty(blackbox->getXDisplay(), client.window, + blackbox->getMotifWMHintsAtom(), 0, + PropMwmHintsElements, False, + blackbox->getMotifWMHintsAtom(), &atom_return, + &format, &num, &len, + (unsigned char **) &mwm_hint); + + if (ret != Success || ! mwm_hint || num != PropMwmHintsElements) + return; + + if (mwm_hint->flags & MwmHintsDecorations) { + if (mwm_hint->decorations & MwmDecorAll) { + decorations = Decor_Titlebar | Decor_Handle | Decor_Border | + Decor_Iconify | Decor_Maximize | Decor_Close; + } else { + decorations = 0; + + if (mwm_hint->decorations & MwmDecorBorder) + decorations |= Decor_Border; + if (mwm_hint->decorations & MwmDecorHandle) + decorations |= Decor_Handle; + if (mwm_hint->decorations & MwmDecorTitle) + decorations |= Decor_Titlebar; + if (mwm_hint->decorations & MwmDecorIconify) + decorations |= Decor_Iconify; + if (mwm_hint->decorations & MwmDecorMaximize) + decorations |= Decor_Maximize; + } + } + + if (mwm_hint->flags & MwmHintsFunctions) { + if (mwm_hint->functions & MwmFuncAll) { + functions = Func_Resize | Func_Move | Func_Iconify | Func_Maximize | + Func_Close; + } else { + functions = 0; + + if (mwm_hint->functions & MwmFuncResize) + functions |= Func_Resize; + if (mwm_hint->functions & MwmFuncMove) + functions |= Func_Move; + if (mwm_hint->functions & MwmFuncIconify) + functions |= Func_Iconify; + if (mwm_hint->functions & MwmFuncMaximize) + functions |= Func_Maximize; + if (mwm_hint->functions & MwmFuncClose) + functions |= Func_Close; + } + } + XFree(mwm_hint); +} + + +/* + * Gets the value of the WM_CLASS property. + * If the property is not set, then use a set of default values. + */ +void BlackboxWindow::getWMClass(void) { + XClassHint classhints; + + //FIXME: move to extension? + if (XGetClassHint(blackbox->getXDisplay(), client.window, &classhints) == 0) + return; + + XSetClassHint(blackbox->getXDisplay(), frame.window, &classhints); + XFree(classhints.res_name); + XFree(classhints.res_class); +} + + +/* + * Gets the blackbox hints from the class' contained window. + * This is used while initializing the window to its first state, and not + * thereafter. + * Returns: true if the hints are successfully retreived and applied; false if + * they are not. + */ +bool BlackboxWindow::getBlackboxHints(void) { + int format; + Atom atom_return; + unsigned long num, len; + BlackboxHints *blackbox_hint = 0; + + int ret = XGetWindowProperty(blackbox->getXDisplay(), client.window, + blackbox->getBlackboxHintsAtom(), 0, + PropBlackboxHintsElements, False, + blackbox->getBlackboxHintsAtom(), &atom_return, + &format, &num, &len, + (unsigned char **) &blackbox_hint); + if (ret != Success || ! blackbox_hint || num != PropBlackboxHintsElements) + return False; + + if (blackbox_hint->flags & AttribShaded) + flags.shaded = (blackbox_hint->attrib & AttribShaded); + + if ((blackbox_hint->flags & AttribMaxHoriz) && + (blackbox_hint->flags & AttribMaxVert)) + flags.maximized = (blackbox_hint->attrib & + (AttribMaxHoriz | AttribMaxVert)) ? 1 : 0; + else if (blackbox_hint->flags & AttribMaxVert) + flags.maximized = (blackbox_hint->attrib & AttribMaxVert) ? 2 : 0; + else if (blackbox_hint->flags & AttribMaxHoriz) + flags.maximized = (blackbox_hint->attrib & AttribMaxHoriz) ? 3 : 0; + + if (blackbox_hint->flags & AttribOmnipresent) + flags.stuck = (blackbox_hint->attrib & AttribOmnipresent); + + if (blackbox_hint->flags & AttribWorkspace) + blackbox_attrib.workspace = blackbox_hint->workspace; + + // if (blackbox_hint->flags & AttribStack) + // don't yet have always on top/bottom for blackbox yet... working + // on that + + if (blackbox_hint->flags & AttribDecoration) { + switch (blackbox_hint->decoration) { + case DecorNone: + decorations = 0; + + break; + + case DecorTiny: + decorations |= Decor_Titlebar | Decor_Iconify; + decorations &= ~(Decor_Border | Decor_Handle | Decor_Maximize); + functions &= ~(Func_Resize | Func_Maximize); + + break; + + case DecorTool: + decorations |= Decor_Titlebar; + decorations &= ~(Decor_Iconify | Decor_Border | Decor_Handle); + functions &= ~(Func_Resize | Func_Maximize | Func_Iconify); + + break; + + case DecorNormal: + default: + decorations |= Decor_Titlebar | Decor_Border | Decor_Handle | + Decor_Iconify | Decor_Maximize; + break; + } + + reconfigure(); + } + XFree(blackbox_hint); + return True; +} + + +void BlackboxWindow::getTransientInfo(void) { + if (client.transient_for && + client.transient_for != (BlackboxWindow *) ~0ul) { + // reset transient_for in preparation of looking for a new owner + client.transient_for->client.transientList.remove(this); + } + + // we have no transient_for until we find a new one + client.transient_for = (BlackboxWindow *) 0; + + Window trans_for; + if (!XGetTransientForHint(blackbox->getXDisplay(), client.window, + &trans_for)) { + // transient_for hint not set + return; + } + + if (trans_for == client.window) { + // wierd client... treat this window as a normal window + return; + } + + if (trans_for == None || trans_for == screen->getRootWindow()) { + // this is an undocumented interpretation of the ICCCM. a transient + // associated with None/Root/itself is assumed to be a modal root + // transient. we don't support the concept of a global transient, + // so we just associate this transient with nothing, and perhaps + // we will add support later for global modality. + client.transient_for = (BlackboxWindow *) ~0ul; + flags.modal = True; + return; + } + + client.transient_for = blackbox->searchWindow(trans_for); + if (! client.transient_for && + client.window_group && trans_for == client.window_group) { + // no direct transient_for, perhaps this is a group transient? + BWindowGroup *group = blackbox->searchGroup(client.window_group); + if (group) client.transient_for = group->find(screen); + } + + if (! client.transient_for || client.transient_for == this) { + // no transient_for found, or we have a wierd client that wants to be + // a transient for itself, so we treat this window as a normal window + client.transient_for = (BlackboxWindow*) 0; + return; + } + + // Check for a circular transient state: this can lock up Blackbox + // when it tries to find the non-transient window for a transient. + BlackboxWindow *w = this; + while(w->client.transient_for && + w->client.transient_for != (BlackboxWindow *) ~0ul) { + if(w->client.transient_for == this) { + client.transient_for = (BlackboxWindow*) 0; + break; + } + w = w->client.transient_for; + } + + if (client.transient_for) { + // register ourselves with our new transient_for + client.transient_for->client.transientList.push_back(this); + flags.stuck = client.transient_for->flags.stuck; + } +} + + +BlackboxWindow *BlackboxWindow::getTransientFor(void) const { + if (client.transient_for && + client.transient_for != (BlackboxWindow*) ~0ul) + return client.transient_for; + return 0; +} + + +/* + * This function is responsible for updating both the client and the frame + * rectangles. + * According to the ICCCM a client message is not sent for a resize, only a + * move. + */ +void BlackboxWindow::configure(int dx, int dy, + unsigned int dw, unsigned int dh) { +#if 1 + bool send_event = ((frame.rect.x() != dx || frame.rect.y() != dy) && + ! flags.moving); + + if (dw != frame.rect.width() || dh != frame.rect.height()) { + frame.rect.setRect(dx, dy, dw, dh); +#if 1 + short fx, fy, fw, fh; + XWindowsWMFrameGetRect(blackbox->getXDisplay(), + frame_style, frame_style_ex, 0, + frame.rect.x(), frame.rect.y(), + frame.rect.width(), frame.rect.height(), + &fx, &fy, &fw, &fh); + +#ifdef DEBUG + fprintf(stderr, "XWindowsWMFrameGetRect %d %d %d %d - %d %d %d %d\n", + frame.rect.x(), frame.rect.y(), + frame.rect.width(), frame.rect.height(), + fx, fy, fw, fh); +#endif + if (fx < 0 || fy <= 0) + frame.rect.setPos(frame.rect.x() - fx, frame.rect.y() - fy); +#endif + client.rect.setCoords(frame.rect.left(), + frame.rect.top(), + frame.rect.right(), + frame.rect.bottom()); + +#ifdef SHAPE + if (blackbox->hasShapeExtensions() && flags.shaped) { + configureShape(); + } +#endif // SHAPE + + positionWindows(); + decorate(); + redrawWindowFrame(); + } else { + frame.rect.setPos(dx, dy); + + XMoveWindow(blackbox->getXDisplay(), frame.window, + frame.rect.x(), frame.rect.y()); + /* + we may have been called just after an opaque window move, so even though + the old coords match the new ones no ConfigureNotify has been sent yet. + There are likely other times when this will be relevant as well. + */ + if (! flags.moving) send_event = True; + } + + if (send_event) { + // if moving, the update and event will occur when the move finishes + client.rect.setPos(frame.rect.left(), frame.rect.top()); + + XEvent event; + event.type = ConfigureNotify; + + event.xconfigure.display = blackbox->getXDisplay(); + event.xconfigure.event = client.window; + event.xconfigure.window = client.window; + event.xconfigure.x = client.rect.x(); + event.xconfigure.y = client.rect.y(); + event.xconfigure.width = client.rect.width(); + event.xconfigure.height = client.rect.height(); + event.xconfigure.border_width = client.old_bw; + event.xconfigure.above = frame.window; + event.xconfigure.override_redirect = False; + + XSendEvent(blackbox->getXDisplay(), client.window, False, + StructureNotifyMask, &event); + screen->updateNetizenConfigNotify(&event); + XFlush(blackbox->getXDisplay()); + } +#else + bool send_event = ((frame.rect.x() != dx || frame.rect.y() != dy) && + ! flags.moving); + + if (dw != frame.rect.width() || dh != frame.rect.height()) { + frame.rect.setRect(dx, dy, dw, dh); + frame.inside_w = frame.rect.width() - (frame.border_w * 2); + frame.inside_h = frame.rect.height() - (frame.border_w * 2); + + short fx, fy, fw, fh; + XWindowsWMFrameGetRect(blackbox->getXDisplay(), + frame_style, frame_style_ex, + frame.rect.x(), frame.rect.y(), + frame.rect.width(), frame.rect.height(), + &fx, &fy, &fw, &fh); + if (fx < 0 || fy <= 0) + frame.rect.setPos(frame.rect.x() - fx, frame.rect.y() - fy); + //if (frame.rect.right() <= 0 || frame.rect.bottom() <= 0) + // frame.rect.setPos(0, 0); + + client.rect.setCoords(frame.rect.left() + frame.margin.left, + frame.rect.top() + frame.margin.top, + frame.rect.right() - frame.margin.right, + frame.rect.bottom() - frame.margin.bottom); + +#ifdef SHAPE + if (blackbox->hasShapeExtensions() && flags.shaped) { + configureShape(); + } +#endif // SHAPE + + positionWindows(); + decorate(); + redrawWindowFrame(); + } else { + frame.rect.setPos(dx, dy); + + XMoveWindow(blackbox->getXDisplay(), frame.window, + frame.rect.x(), frame.rect.y()); + /* + we may have been called just after an opaque window move, so even though + the old coords match the new ones no ConfigureNotify has been sent yet. + There are likely other times when this will be relevant as well. + */ + if (! flags.moving) send_event = True; + } + + if (send_event) { + // if moving, the update and event will occur when the move finishes + client.rect.setPos(frame.rect.left() + frame.margin.left, + frame.rect.top() + frame.margin.top); + + XEvent event; + event.type = ConfigureNotify; + + event.xconfigure.display = blackbox->getXDisplay(); + event.xconfigure.event = client.window; + event.xconfigure.window = client.window; + event.xconfigure.x = client.rect.x(); + event.xconfigure.y = client.rect.y(); + event.xconfigure.width = client.rect.width(); + event.xconfigure.height = client.rect.height(); + event.xconfigure.border_width = client.old_bw; + event.xconfigure.above = frame.window; + event.xconfigure.override_redirect = False; + + XSendEvent(blackbox->getXDisplay(), client.window, False, + StructureNotifyMask, &event); + screen->updateNetizenConfigNotify(&event); + XFlush(blackbox->getXDisplay()); + } +#endif +} + + +#ifdef SHAPE +void BlackboxWindow::configureShape(void) { + XShapeCombineShape(blackbox->getXDisplay(), frame.window, ShapeBounding, + 0, 0, client.window, ShapeBounding, ShapeSet); + +#if 0 //FIXME + int num = 0; + XRectangle xrect[2]; + + if (decorations & Decor_Titlebar) { + xrect[0].x = xrect[0].y = -frame.border_w; + xrect[0].width = frame.rect.width(); + xrect[0].height = frame.title_h + (frame.border_w * 2); + ++num; + } + + if (decorations & Decor_Handle) { + xrect[1].x = -frame.border_w; + xrect[1].y = frame.rect.height() - frame.margin.bottom + + frame.mwm_border_w - frame.border_w; + xrect[1].width = frame.rect.width(); + xrect[1].height = frame.handle_h + (frame.border_w * 2); + ++num; + } + + XShapeCombineRectangles(blackbox->getXDisplay(), frame.window, + ShapeBounding, 0, 0, xrect, num, + ShapeUnion, Unsorted); +#endif +} +#endif // SHAPE + + +bool BlackboxWindow::setInputFocus(void) { + if (flags.focused) return True; + + // do not give focus to a window that is about to close + if (! validateClient()) return False; + + assert(! flags.iconic && + (flags.stuck || // window must be on the current workspace or sticky + blackbox_attrib.workspace == screen->getCurrentWorkspaceID())); + + if (! frame.rect.intersects(screen->getRect())) { + // client is outside the screen, move it to the center + configure((screen->getWidth() - frame.rect.width()) / 2, + (screen->getHeight() - frame.rect.height()) / 2, + frame.rect.width(), frame.rect.height()); + } + + if (client.transientList.size() > 0) { + // transfer focus to any modal transients + BlackboxWindowList::iterator it, end = client.transientList.end(); + for (it = client.transientList.begin(); it != end; ++it) + if ((*it)->flags.modal) return (*it)->setInputFocus(); + } + + bool ret = True; + switch (focus_mode) { + case F_Passive: + case F_LocallyActive: + XSetInputFocus(blackbox->getXDisplay(), client.window, + RevertToPointerRoot, CurrentTime); + blackbox->setFocusedWindow(this); + break; + + case F_GloballyActive: + case F_NoInput: + /* + * we could set the focus to none, since the window doesn't accept focus, + * but we shouldn't set focus to nothing since this would surely make + * someone angry + */ + ret = False; + break; + } + + if (flags.send_focus_message) { + XEvent ce; + ce.xclient.type = ClientMessage; + ce.xclient.message_type = blackbox->getWMProtocolsAtom(); + ce.xclient.display = blackbox->getXDisplay(); + ce.xclient.window = client.window; + ce.xclient.format = 32; + ce.xclient.data.l[0] = blackbox->getWMTakeFocusAtom(); + ce.xclient.data.l[1] = blackbox->getLastTime(); + ce.xclient.data.l[2] = 0l; + ce.xclient.data.l[3] = 0l; + ce.xclient.data.l[4] = 0l; + XSendEvent(blackbox->getXDisplay(), client.window, False, + NoEventMask, &ce); + XFlush(blackbox->getXDisplay()); + } + + return ret; +} + +//FIXME +void BlackboxWindow::iconify(void) { + // walk up to the topmost transient_for that is not iconified + if (isTransient() && + client.transient_for != (BlackboxWindow *) ~0ul && + ! client.transient_for->isIconic()) { + + client.transient_for->iconify(); + return; + } + + if (flags.iconic) return; + + /* + * unmap the frame window first, so when all the transients are + * unmapped, we don't get an enter event in sloppy focus mode + */ + XUnmapWindow(blackbox->getXDisplay(), frame.window); + flags.visible = False; + flags.iconic = True; + + setState(IconicState); + + // iconify all transients first + if (client.transientList.size() > 0) { + std::for_each(client.transientList.begin(), client.transientList.end(), + std::mem_fun(&BlackboxWindow::iconify)); + } + + /* + * remove the window from the workspace and add it to the screen's + * icons *AFTER* we have process all transients. since we always + * iconify transients, it's pointless to have focus reverted to one + * of them (since they are above their transient_for) for a split + * second + */ + screen->getWorkspace(blackbox_attrib.workspace)->removeWindow(this); + screen->addIcon(this); + + /* + * we don't want this XUnmapWindow call to generate an UnmapNotify event, so + * we need to clear the event mask on client.window for a split second. + * HOWEVER, since X11 is asynchronous, the window could be destroyed in that + * split second, leaving us with a ghost window... so, we need to do this + * while the X server is grabbed + */ + unsigned long event_mask = PropertyChangeMask | FocusChangeMask | + StructureNotifyMask; + XGrabServer(blackbox->getXDisplay()); + XSelectInput(blackbox->getXDisplay(), client.window, + event_mask & ~StructureNotifyMask); + XUnmapWindow(blackbox->getXDisplay(), client.window); + XSelectInput(blackbox->getXDisplay(), client.window, event_mask); + XUngrabServer(blackbox->getXDisplay()); +} + + +void BlackboxWindow::show(void) { + current_state = (flags.shaded) ? IconicState : NormalState; + setState(current_state); + + XMapWindow(blackbox->getXDisplay(), client.window); + XMapSubwindows(blackbox->getXDisplay(), frame.window); + XMapWindow(blackbox->getXDisplay(), frame.window); + +#ifdef DEBUG + int real_x, real_y; + Window child; + XTranslateCoordinates(blackbox->getXDisplay(), client.window, + screen->getRootWindow(), + 0, 0, &real_x, &real_y, &child); + fprintf(stderr, "%s -- assumed: (%d, %d), real: (%d, %d)\n", getTitle(), + client.rect.left(), client.rect.top(), real_x, real_y); + assert(client.rect.left() == real_x && client.rect.top() == real_y); +#endif + + flags.visible = True; + flags.iconic = False; +} + + +void BlackboxWindow::deiconify(bool reassoc, bool raise) { + if (flags.iconic || reassoc) + screen->reassociateWindow(this, BSENTINEL, False); + else if (blackbox_attrib.workspace != screen->getCurrentWorkspaceID()) + return; + + show(); + + // reassociate and deiconify all transients + if (reassoc && client.transientList.size() > 0) { + BlackboxWindowList::iterator it, end = client.transientList.end(); + for (it = client.transientList.begin(); it != end; ++it) + (*it)->deiconify(True, False); + } + + if (raise) + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); +} + + +void BlackboxWindow::close(void) { + XEvent ce; + ce.xclient.type = ClientMessage; + ce.xclient.message_type = blackbox->getWMProtocolsAtom(); + ce.xclient.display = blackbox->getXDisplay(); + ce.xclient.window = client.window; + ce.xclient.format = 32; + ce.xclient.data.l[0] = blackbox->getWMDeleteAtom(); + ce.xclient.data.l[1] = CurrentTime; + ce.xclient.data.l[2] = 0l; + ce.xclient.data.l[3] = 0l; + ce.xclient.data.l[4] = 0l; + XSendEvent(blackbox->getXDisplay(), client.window, False, NoEventMask, &ce); + XFlush(blackbox->getXDisplay()); +} + + +void BlackboxWindow::withdraw(void) { + setState(current_state); + + flags.visible = False; + flags.iconic = False; + + XUnmapWindow(blackbox->getXDisplay(), frame.window); + + XGrabServer(blackbox->getXDisplay()); + + unsigned long event_mask = PropertyChangeMask | FocusChangeMask | + StructureNotifyMask; + XSelectInput(blackbox->getXDisplay(), client.window, + event_mask & ~StructureNotifyMask); + XUnmapWindow(blackbox->getXDisplay(), client.window); + XSelectInput(blackbox->getXDisplay(), client.window, event_mask); + + XUngrabServer(blackbox->getXDisplay()); +} + + +void BlackboxWindow::maximize(unsigned int /*button*/) { +#if 0 + if (flags.maximized) { + flags.maximized = 0; + + blackbox_attrib.flags &= ! (AttribMaxHoriz | AttribMaxVert); + blackbox_attrib.attrib &= ! (AttribMaxHoriz | AttribMaxVert); + + /* + when a resize is begun, maximize(0) is called to clear any maximization + flags currently set. Otherwise it still thinks it is maximized. + so we do not need to call configure() because resizing will handle it + */ + if (!flags.resizing) + configure(blackbox_attrib.premax_x, blackbox_attrib.premax_y, + blackbox_attrib.premax_w, blackbox_attrib.premax_h); + + blackbox_attrib.premax_x = blackbox_attrib.premax_y = 0; + blackbox_attrib.premax_w = blackbox_attrib.premax_h = 0; + + redrawAllButtons(); // in case it is not called in configure() + setState(current_state); + return; + } + + blackbox_attrib.premax_x = frame.rect.x(); + blackbox_attrib.premax_y = frame.rect.y(); + blackbox_attrib.premax_w = frame.rect.width(); + // use client.rect so that clients can be restored even if shaded + blackbox_attrib.premax_h = + client.rect.height() + frame.margin.top + frame.margin.bottom; + + const Rect &screen_area = screen->availableArea(); + frame.changing = screen_area; + + switch(button) { + case 1: + blackbox_attrib.flags |= AttribMaxHoriz | AttribMaxVert; + blackbox_attrib.attrib |= AttribMaxHoriz | AttribMaxVert; + break; + + case 2: + blackbox_attrib.flags |= AttribMaxVert; + blackbox_attrib.attrib |= AttribMaxVert; + + frame.changing.setX(blackbox_attrib.premax_x); + frame.changing.setWidth(blackbox_attrib.premax_w); + break; + + case 3: + blackbox_attrib.flags |= AttribMaxHoriz; + blackbox_attrib.attrib |= AttribMaxHoriz; + + frame.changing.setY(blackbox_attrib.premax_y); + frame.changing.setHeight(blackbox_attrib.premax_h); + break; + } + + constrain(TopLeft); + + if (flags.shaded) { + blackbox_attrib.flags ^= AttribShaded; + blackbox_attrib.attrib ^= AttribShaded; + flags.shaded = False; + } + + flags.maximized = button; + + configure(frame.changing.x(), frame.changing.y(), + frame.changing.width(), frame.changing.height()); + redrawAllButtons(); // in case it is not called in configure() + setState(current_state); +#endif +} + + +// re-maximizes the window to take into account availableArea changes +void BlackboxWindow::remaximize(void) { +#if 0 + if (flags.shaded) { + // we only update the window's attributes otherwise we lose the shade bit + switch(flags.maximized) { + case 1: + blackbox_attrib.flags |= AttribMaxHoriz | AttribMaxVert; + blackbox_attrib.attrib |= AttribMaxHoriz | AttribMaxVert; + break; + + case 2: + blackbox_attrib.flags |= AttribMaxVert; + blackbox_attrib.attrib |= AttribMaxVert; + break; + + case 3: + blackbox_attrib.flags |= AttribMaxHoriz; + blackbox_attrib.attrib |= AttribMaxHoriz; + break; + } + return; + } + + // save the original dimensions because maximize will wipe them out + int premax_x = blackbox_attrib.premax_x, + premax_y = blackbox_attrib.premax_y, + premax_w = blackbox_attrib.premax_w, + premax_h = blackbox_attrib.premax_h; + + unsigned int button = flags.maximized; + flags.maximized = 0; // trick maximize() into working + maximize(button); + + // restore saved values + blackbox_attrib.premax_x = premax_x; + blackbox_attrib.premax_y = premax_y; + blackbox_attrib.premax_w = premax_w; + blackbox_attrib.premax_h = premax_h; +#endif +} + + +void BlackboxWindow::setWorkspace(unsigned int n) { + blackbox_attrib.flags |= AttribWorkspace; + blackbox_attrib.workspace = n; +} + + +void BlackboxWindow::shade(void) { +#if 0 //needed? + if (flags.shaded) { + flags.shaded = False; + blackbox_attrib.flags ^= AttribShaded; + blackbox_attrib.attrib ^= AttribShaded; + + if (flags.maximized) { + remaximize(); + } else { + XResizeWindow(blackbox->getXDisplay(), frame.window, + frame.inside_w, frame.inside_h); + // set the frame rect to the normal size + frame.rect.setHeight(client.rect.height() + frame.margin.top + + frame.margin.bottom); + } + + setState(NormalState); + } else { + if (! (decorations & Decor_Titlebar)) + return; // can't shade it without a titlebar! + + XResizeWindow(blackbox->getXDisplay(), frame.window, + frame.inside_w, frame.title_h); + flags.shaded = True; + blackbox_attrib.flags |= AttribShaded; + blackbox_attrib.attrib |= AttribShaded; + + setState(IconicState); + + // set the frame rect to the shaded size + frame.rect.setHeight(frame.title_h + (frame.border_w * 2)); + } +#endif +} + + +void BlackboxWindow::stick(void) { + if (flags.stuck) { + blackbox_attrib.flags ^= AttribOmnipresent; + blackbox_attrib.attrib ^= AttribOmnipresent; + + flags.stuck = False; + + if (! flags.iconic) + screen->reassociateWindow(this, BSENTINEL, True); + + setState(current_state); + } else { + flags.stuck = True; + + blackbox_attrib.flags |= AttribOmnipresent; + blackbox_attrib.attrib |= AttribOmnipresent; + + setState(current_state); + } +} + + +void BlackboxWindow::redrawWindowFrame(void) const { + if (decorations & Decor_Titlebar) { + } + + if (decorations & Decor_Handle) { + } + + if (decorations & Decor_Border) { + } +} + + +void BlackboxWindow::setFocusFlag(bool focus) { + // only focus a window if it is visible + if (focus && ! flags.visible) + return; + + flags.focused = focus; + + redrawWindowFrame(); + + if (flags.focused) + blackbox->setFocusedWindow(this); +} + + +void BlackboxWindow::installColormap(bool install) { + int i = 0, ncmap = 0; + Colormap *cmaps = XListInstalledColormaps(blackbox->getXDisplay(), + client.window, &ncmap); + if (cmaps) { + XWindowAttributes wattrib; + if (XGetWindowAttributes(blackbox->getXDisplay(), + client.window, &wattrib)) { + if (install) { + // install the window's colormap + for (i = 0; i < ncmap; i++) { + if (*(cmaps + i) == wattrib.colormap) + // this window is using an installed color map... do not install + install = False; + } + // otherwise, install the window's colormap + if (install) + XInstallColormap(blackbox->getXDisplay(), wattrib.colormap); + } else { + // uninstall the window's colormap + for (i = 0; i < ncmap; i++) { + if (*(cmaps + i) == wattrib.colormap) + // we found the colormap to uninstall + XUninstallColormap(blackbox->getXDisplay(), wattrib.colormap); + } + } + } + + XFree(cmaps); + } +} + + +void BlackboxWindow::setState(unsigned long new_state) { + current_state = new_state; + + unsigned long state[2]; + state[0] = current_state; + state[1] = None; + XChangeProperty(blackbox->getXDisplay(), client.window, + blackbox->getWMStateAtom(), blackbox->getWMStateAtom(), 32, + PropModeReplace, (unsigned char *) state, 2); + + XChangeProperty(blackbox->getXDisplay(), client.window, + blackbox->getBlackboxAttributesAtom(), + blackbox->getBlackboxAttributesAtom(), 32, PropModeReplace, + (unsigned char *) &blackbox_attrib, + PropBlackboxAttributesElements); +} + + +bool BlackboxWindow::getState(void) { + current_state = 0; + + Atom atom_return; + bool ret = False; + int foo; + unsigned long *state, ulfoo, nitems; + + if ((XGetWindowProperty(blackbox->getXDisplay(), client.window, + blackbox->getWMStateAtom(), + 0l, 2l, False, blackbox->getWMStateAtom(), + &atom_return, &foo, &nitems, &ulfoo, + (unsigned char **) &state) != Success) || + (! state)) { + return False; + } + + if (nitems >= 1) { + current_state = static_cast<unsigned long>(state[0]); + + ret = True; + } + + XFree((void *) state); + + return ret; +} + + +void BlackboxWindow::restoreAttributes(void) { + Atom atom_return; + int foo; + unsigned long ulfoo, nitems; + + BlackboxAttributes *net; + int ret = XGetWindowProperty(blackbox->getXDisplay(), client.window, + blackbox->getBlackboxAttributesAtom(), 0l, + PropBlackboxAttributesElements, False, + blackbox->getBlackboxAttributesAtom(), + &atom_return, &foo, &nitems, &ulfoo, + (unsigned char **) &net); + if (ret != Success || !net || nitems != PropBlackboxAttributesElements) + return; + + if (net->flags & AttribShaded && net->attrib & AttribShaded) { + flags.shaded = False; + unsigned long orig_state = current_state; + shade(); + + /* + At this point in the life of a window, current_state should only be set + to IconicState if the window was an *icon*, not if it was shaded. + */ + if (orig_state != IconicState) + current_state = WithdrawnState; + } + + if (net->workspace != screen->getCurrentWorkspaceID() && + net->workspace < screen->getWorkspaceCount()) { + screen->reassociateWindow(this, net->workspace, True); + + // set to WithdrawnState so it will be mapped on the new workspace + if (current_state == NormalState) current_state = WithdrawnState; + } else if (current_state == WithdrawnState) { + // the window is on this workspace and is Withdrawn, so it is waiting to + // be mapped + current_state = NormalState; + } + + if (net->flags & AttribOmnipresent && net->attrib & AttribOmnipresent) { + flags.stuck = False; + stick(); + + // if the window was on another workspace, it was going to be hidden. this + // specifies that the window should be mapped since it is sticky. + if (current_state == WithdrawnState) current_state = NormalState; + } + + if (net->flags & AttribMaxHoriz || net->flags & AttribMaxVert) { + blackbox_attrib.premax_x = net->premax_x; + blackbox_attrib.premax_y = net->premax_y; + blackbox_attrib.premax_w = net->premax_w; + blackbox_attrib.premax_h = net->premax_h; + + flags.maximized = 0; + + if (net->flags & AttribMaxHoriz && net->flags & AttribMaxVert && + net->attrib & (AttribMaxHoriz | AttribMaxVert)) + flags.maximized = 1; + else if (net->flags & AttribMaxVert && net->attrib & AttribMaxVert) + flags.maximized = 2; + else if (net->flags & AttribMaxHoriz && net->attrib & AttribMaxHoriz) + flags.maximized = 3; + + if (flags.maximized) remaximize(); + } + + if (net->flags & AttribDecoration) { + switch (net->decoration) { + case DecorNone: + decorations = 0; + + break; + + default: + case DecorNormal: + decorations |= Decor_Titlebar | Decor_Handle | Decor_Border | + Decor_Iconify | Decor_Maximize; + + break; + + case DecorTiny: + decorations |= Decor_Titlebar | Decor_Iconify; + decorations &= ~(Decor_Border | Decor_Handle | Decor_Maximize); + + break; + + case DecorTool: + decorations |= Decor_Titlebar; + decorations &= ~(Decor_Iconify | Decor_Border | Decor_Handle); + + break; + } + + // sanity check the new decor + if (! (functions & Func_Resize) || isTransient()) + decorations &= ~(Decor_Maximize | Decor_Handle); + if (! (functions & Func_Maximize)) + decorations &= ~Decor_Maximize; + + if (decorations & Decor_Titlebar) { + if (functions & Func_Close) // close button is controlled by function + decorations |= Decor_Close; // not decor type + } else { + if (flags.shaded) // we can not be shaded if we lack a titlebar + shade(); + } + + if (flags.visible && frame.window) { + XMapSubwindows(blackbox->getXDisplay(), frame.window); + XMapWindow(blackbox->getXDisplay(), frame.window); + } + + reconfigure(); + setState(current_state); + } + + // with the state set it will then be the map event's job to read the + // window's state and behave accordingly + + XFree((void *) net); +} + + +/* + * Positions the Rect r according the the client window position and + * window gravity. + */ +void BlackboxWindow::applyGravity(Rect &r) { + // apply horizontal window gravity + switch (client.win_gravity) { + default: + case NorthWestGravity: + case SouthWestGravity: + case WestGravity: + r.setX(client.rect.x()); + break; + + case NorthGravity: + case SouthGravity: + case CenterGravity: + r.setX(client.rect.x()); + break; + + case NorthEastGravity: + case SouthEastGravity: + case EastGravity: + r.setX(client.rect.x()); + break; + + case ForgetGravity: + case StaticGravity: + r.setX(client.rect.x()); + break; + } + + // apply vertical window gravity + switch (client.win_gravity) { + default: + case NorthWestGravity: + case NorthEastGravity: + case NorthGravity: + r.setY(client.rect.y()); + break; + + case CenterGravity: + case EastGravity: + case WestGravity: + r.setY(client.rect.y()); + break; + + case SouthWestGravity: + case SouthEastGravity: + case SouthGravity: + r.setY(client.rect.y()); + break; + + case ForgetGravity: + case StaticGravity: + r.setY(client.rect.y()); + break; + } +} + + +/* + * The reverse of the applyGravity function. + * + * Positions the Rect r according to the frame window position and + * window gravity. + */ +void BlackboxWindow::restoreGravity(Rect &r) { + // restore horizontal window gravity + switch (client.win_gravity) { + default: + case NorthWestGravity: + case SouthWestGravity: + case WestGravity: + r.setX(frame.rect.x()); + break; + + case NorthGravity: + case SouthGravity: + case CenterGravity: + r.setX(frame.rect.x()); + break; + + case NorthEastGravity: + case SouthEastGravity: + case EastGravity: + r.setX(frame.rect.x()); + break; + + case ForgetGravity: + case StaticGravity: + r.setX(frame.rect.x()); + break; + } + + // restore vertical window gravity + switch (client.win_gravity) { + default: + case NorthWestGravity: + case NorthEastGravity: + case NorthGravity: + r.setY(frame.rect.y()); + break; + + case CenterGravity: + case EastGravity: + case WestGravity: + r.setY(frame.rect.y()); + break; + + case SouthWestGravity: + case SouthEastGravity: + case SouthGravity: + r.setY(frame.rect.y()); + break; + + case ForgetGravity: + case StaticGravity: + r.setY(frame.rect.y()); + break; + } +} + + +void BlackboxWindow::redrawLabel(void) const { + //WindowsWM ext +#ifdef DEBUG + fprintf(stderr, "XWindowsWMFrameSetTitle %s\n", client.title.c_str()); +#endif + XWindowsWMFrameSetTitle(blackbox->getXDisplay(), 0, frame.window, + client.title.length(), client.title.c_str()); +} + + +void BlackboxWindow::redrawAllButtons(void) const { +} + + +void BlackboxWindow::redrawIconifyButton(bool /*pressed*/) const { +} + + +void BlackboxWindow::redrawMaximizeButton(bool /*pressed*/) const { +} + + +void BlackboxWindow::redrawCloseButton(bool /*pressed*/) const { +} + +//FIXME: +void BlackboxWindow::mapRequestEvent(const XMapRequestEvent *re) { + if (re->window != client.window) + return; + +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::mapRequestEvent() for 0x%lx\n", + client.window); +#endif // DEBUG + + switch (current_state) { + case IconicState: + iconify(); + break; + + case WithdrawnState: + withdraw(); + break; + + case NormalState: + case InactiveState: + case ZoomState: + default: + show(); + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); + if (! blackbox->isStartup() && (isTransient() || screen->doFocusNew())) { + XSync(blackbox->getXDisplay(), False); // make sure the frame is mapped.. + setInputFocus(); + } + break; + } +} + + +void BlackboxWindow::unmapNotifyEvent(const XUnmapEvent *ue) { + if (ue->window != client.window) + return; + +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::unmapNotifyEvent() for 0x%lx\n", + client.window); +#endif // DEBUG + + screen->unmanageWindow(this, False); +} + + +void BlackboxWindow::destroyNotifyEvent(const XDestroyWindowEvent *de) { + if (de->window != client.window) + return; + +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::destroyNotifyEvent() for 0x%lx\n", + client.window); +#endif // DEBUG + + screen->unmanageWindow(this, False); +} + + +void BlackboxWindow::reparentNotifyEvent(const XReparentEvent *re) { + if (re->window != client.window || re->parent == frame.window) + return; + +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::reparentNotifyEvent(): reparent 0x%lx to " + "0x%lx.\n", client.window, re->parent); +#endif // DEBUG + + XEvent ev; + ev.xreparent = *re; + XPutBackEvent(blackbox->getXDisplay(), &ev); + screen->unmanageWindow(this, True); +} + + +void BlackboxWindow::propertyNotifyEvent(const XPropertyEvent *pe) { + if (pe->state == PropertyDelete || ! validateClient()) + return; + +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::propertyNotifyEvent(): for 0x%lx\n", + client.window); +#endif + + switch(pe->atom) { + case XA_WM_CLASS: + getWMClass(); + break; + + case XA_WM_CLIENT_MACHINE: + case XA_WM_COMMAND: + break; + + case XA_WM_TRANSIENT_FOR: { + // determine if this is a transient window + getTransientInfo(); + + // adjust the window decorations based on transience + if (isTransient()) { + decorations &= ~(Decor_Maximize | Decor_Handle); + functions &= ~Func_Maximize; + } + + reconfigure(); + } + break; + + case XA_WM_HINTS: + getWMHints(); + break; + + case XA_WM_ICON_NAME: + getWMIconName(); + if (flags.iconic) screen->propagateWindowName(this); + break; + + case XA_WM_NAME: + getWMName(); + + if (decorations & Decor_Titlebar) + redrawLabel(); + + screen->propagateWindowName(this); + break; + + case XA_WM_NORMAL_HINTS: { + getWMNormalHints(); + + if ((client.normal_hint_flags & PMinSize) && + (client.normal_hint_flags & PMaxSize)) { + // the window now can/can't resize itself, so the buttons need to be + // regrabbed. + ungrabButtons(); + if (client.max_width <= client.min_width && + client.max_height <= client.min_height) { + decorations &= ~(Decor_Maximize | Decor_Handle); + functions &= ~(Func_Resize | Func_Maximize); + } else { + if (! isTransient()) { + decorations |= Decor_Maximize | Decor_Handle; + functions |= Func_Maximize; + } + functions |= Func_Resize; + } + grabButtons(); + } + + Rect old_rect = frame.rect; + + upsize(); + + if (old_rect != frame.rect) + reconfigure(); + + break; + } + + default: + if (pe->atom == blackbox->getWMProtocolsAtom()) { + getWMProtocols(); +/* + if ((decorations & Decor_Close) && (! frame.close_button)) { + createCloseButton(); + if (decorations & Decor_Titlebar) { + positionButtons(True); + XMapSubwindows(blackbox->getXDisplay(), frame.title); + } + if (windowmenu) windowmenu->reconfigure(); + }*/ + } + + break; + } +} + + +void BlackboxWindow::exposeEvent(const XExposeEvent */*ee*/) { +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::exposeEvent() for 0x%lx\n", client.window); +#endif +} + + +void BlackboxWindow::configureRequestEvent(const XConfigureRequestEvent *cr) { + if (cr->window != client.window || flags.iconic) + return; + + if (cr->value_mask & CWBorderWidth) + client.old_bw = cr->border_width; + + if (cr->value_mask & (CWX | CWY | CWWidth | CWHeight)) { + Rect req = frame.rect; + + if (cr->value_mask & (CWX | CWY)) { + if (cr->value_mask & CWX) + client.rect.setX(cr->x); + if (cr->value_mask & CWY) + client.rect.setY(cr->y); + + applyGravity(req); + } + + if (cr->value_mask & CWWidth) + req.setWidth(cr->width); + + if (cr->value_mask & CWHeight) + req.setHeight(cr->height); + + configure(req.x(), req.y(), req.width(), req.height()); + } + + if (cr->value_mask & CWStackMode) { + switch (cr->detail) { + case Below: + case BottomIf: + screen->getWorkspace(blackbox_attrib.workspace)->lowerWindow(this); + break; + + case Above: + case TopIf: + default: + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); + break; + } + } +} + + +void BlackboxWindow::configureNotifyEvent(const XConfigureEvent */*ce*/) { +#if 0 + if (ce->window != frame.window) + return; + + if (ce->width != client.rect.width() || ce->height != client.rect.height()) + { + XResizeWindow(blackbox->getXDisplay(), client.window, + ce->width, ce->height); + } + + if (ce->x != client.rect.x() || + ce->y != client.rect.y() || + ce->width != client.rect.width() || + ce->height != client.rect.height()) + { + bool send_event = ((frame.rect.x() != ce->x || frame.rect.y() != ce->y) && + ! flags.moving); + + frame.rect.setRect(ce->x, ce->y, ce->width, ce->height); + + if (send_event) { + // if moving, the update and event will occur when the move finishes + //client.rect.setPos(frame.rect.left(), frame.rect.top()); + client.rect.setCoords(frame.rect.left(), + frame.rect.top(), + frame.rect.right(), + frame.rect.bottom()); + + XEvent event; + event.type = ConfigureNotify; + + event.xconfigure.display = blackbox->getXDisplay(); + event.xconfigure.event = client.window; + event.xconfigure.window = client.window; + event.xconfigure.x = client.rect.x(); + event.xconfigure.y = client.rect.y(); + event.xconfigure.width = client.rect.width(); + event.xconfigure.height = client.rect.height(); + event.xconfigure.border_width = client.old_bw; + event.xconfigure.above = frame.window; + event.xconfigure.override_redirect = False; + + XSendEvent(blackbox->getXDisplay(), client.window, False, + StructureNotifyMask, &event); + screen->updateNetizenConfigNotify(&event); + XFlush(blackbox->getXDisplay()); + } + } +#endif +} + + +void BlackboxWindow::buttonPressEvent(const XButtonEvent */*be*/) { +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::buttonPressEvent() for 0x%lx\n", + client.window); +#endif +#if 0 + if (frame.maximize_button == be->window) { + redrawMaximizeButton(True); + } else if (be->button == 1 || (be->button == 3 && be->state == Mod1Mask)) { + if (! flags.focused) + setInputFocus(); + + if (frame.iconify_button == be->window) { + redrawIconifyButton(True); + } else if (frame.close_button == be->window) { + redrawCloseButton(True); + } else if (frame.window == be->window) { + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); + + XAllowEvents(blackbox->getXDisplay(), ReplayPointer, be->time); + } else { + if (frame.title == be->window || frame.label == be->window) { + if (((be->time - lastButtonPressTime) <= + blackbox->getDoubleClickInterval()) || + (be->state == ControlMask)) { + lastButtonPressTime = 0; + shade(); + } else { + lastButtonPressTime = be->time; + } + } + + frame.grab_x = be->x_root - frame.rect.x() - frame.border_w; + frame.grab_y = be->y_root - frame.rect.y() - frame.border_w; + + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); + } + } else if (be->button == 2 && (be->window != frame.iconify_button) && + (be->window != frame.close_button)) { + screen->getWorkspace(blackbox_attrib.workspace)->lowerWindow(this); + } +#endif +} + + +void BlackboxWindow::buttonReleaseEvent(const XButtonEvent */*re*/) { +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::buttonReleaseEvent() for 0x%lx\n", + client.window); +#endif +#if 0 + if (re->window == frame.maximize_button) { + if ((re->x >= 0 && re->x <= static_cast<signed>(frame.button_w)) && + (re->y >= 0 && re->y <= static_cast<signed>(frame.button_w))) { + maximize(re->button); + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); + } else { + redrawMaximizeButton(flags.maximized); + } + } else if (re->window == frame.iconify_button) { + if ((re->x >= 0 && re->x <= static_cast<signed>(frame.button_w)) && + (re->y >= 0 && re->y <= static_cast<signed>(frame.button_w))) { + iconify(); + } else { + redrawIconifyButton(False); + } + } else if (re->window == frame.close_button) { + if ((re->x >= 0 && re->x <= static_cast<signed>(frame.button_w)) && + (re->y >= 0 && re->y <= static_cast<signed>(frame.button_w))) + close(); + redrawCloseButton(False); + } else if (flags.moving) { + flags.moving = False; + + if (! screen->doOpaqueMove()) { + /* when drawing the rubber band, we need to make sure we only draw inside + * the frame... frame.changing_* contain the new coords for the window, + * so we need to subtract 1 from changing_w/changing_h every where we + * draw the rubber band (for both moving and resizing) + */ + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), frame.changing.x(), frame.changing.y(), + frame.changing.width() - 1, frame.changing.height() - 1); + XUngrabServer(blackbox->getXDisplay()); + + configure(frame.changing.x(), frame.changing.y(), + frame.changing.width(), frame.changing.height()); + } else { + configure(frame.rect.x(), frame.rect.y(), + frame.rect.width(), frame.rect.height()); + } + XUngrabPointer(blackbox->getXDisplay(), CurrentTime); + } else if (flags.resizing) { + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), frame.changing.x(), frame.changing.y(), + frame.changing.width() - 1, frame.changing.height() - 1); + XUngrabServer(blackbox->getXDisplay()); + + constrain((re->window == frame.left_grip) ? TopRight : TopLeft); + + // unset maximized state when resized after fully maximized + if (flags.maximized == 1) + maximize(0); + flags.resizing = False; + configure(frame.changing.x(), frame.changing.y(), + frame.changing.width(), frame.changing.height()); + + XUngrabPointer(blackbox->getXDisplay(), CurrentTime); + } else if (re->window == frame.window) { + if (re->button == 2 && re->state == Mod1Mask) + XUngrabPointer(blackbox->getXDisplay(), CurrentTime); + } +#endif +} + + +void BlackboxWindow::motionNotifyEvent(const XMotionEvent */*me*/) { +#ifdef DEBUG + fprintf(stderr, "BlackboxWindow::motionNotifyEvent() for 0x%lx\n", + client.window); +#endif +#if 0 + if (!flags.resizing && me->state & Button1Mask && (functions & Func_Move) && + (frame.title == me->window || frame.label == me->window || + frame.handle == me->window || frame.window == me->window)) { + if (! flags.moving) { + XGrabPointer(blackbox->getXDisplay(), me->window, False, + Button1MotionMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, + None, blackbox->getMoveCursor(), CurrentTime); + + flags.moving = True; + + if (! screen->doOpaqueMove()) { + XGrabServer(blackbox->getXDisplay()); + + frame.changing = frame.rect; + screen->showPosition(frame.changing.x(), frame.changing.y()); + + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), + frame.changing.x(), + frame.changing.y(), + frame.changing.width() - 1, + frame.changing.height() - 1); + } + } else { + int dx = me->x_root - frame.grab_x, dy = me->y_root - frame.grab_y; + dx -= frame.border_w; + dy -= frame.border_w; + + const int snap_distance = screen->getEdgeSnapThreshold(); + + if (snap_distance) { + Rect srect = screen->availableArea(); + // window corners + const int wleft = dx, + wright = dx + frame.rect.width() - 1, + wtop = dy, + wbottom = dy + frame.rect.height() - 1; + + int dleft = abs(wleft - srect.left()), + dright = abs(wright - srect.right()), + dtop = abs(wtop - srect.top()), + dbottom = abs(wbottom - srect.bottom()); + + // snap left? + if (dleft < snap_distance && dleft <= dright) + dx = srect.left(); + // snap right? + else if (dright < snap_distance) + dx = srect.right() - frame.rect.width() + 1; + + // snap top? + if (dtop < snap_distance && dtop <= dbottom) + dy = srect.top(); + // snap bottom? + else if (dbottom < snap_distance) + dy = srect.bottom() - frame.rect.height() + 1; + + if (! screen->doFullMax()) { + srect = screen->getRect(); // now get the full screen + + dleft = abs(wleft - srect.left()), + dright = abs(wright - srect.right()), + dtop = abs(wtop - srect.top()), + dbottom = abs(wbottom - srect.bottom()); + + // snap left? + if (dleft < snap_distance && dleft <= dright) + dx = srect.left(); + // snap right? + else if (dright < snap_distance) + dx = srect.right() - frame.rect.width() + 1; + + // snap top? + if (dtop < snap_distance && dtop <= dbottom) + dy = srect.top(); + // snap bottom? + else if (dbottom < snap_distance) + dy = srect.bottom() - frame.rect.height() + 1; + } + } + + if (screen->doOpaqueMove()) { + configure(dx, dy, frame.rect.width(), frame.rect.height()); + } else { + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), + frame.changing.x(), + frame.changing.y(), + frame.changing.width() - 1, + frame.changing.height() - 1); + + frame.changing.setPos(dx, dy); + + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), + frame.changing.x(), + frame.changing.y(), + frame.changing.width() - 1, + frame.changing.height() - 1); + } + + screen->showPosition(dx, dy); + } + } else if ((functions & Func_Resize) && + (me->state & Button1Mask && (me->window == frame.right_grip || + me->window == frame.left_grip)) || + (me->state & Button3Mask && me->state & Mod1Mask && + me->window == frame.window)) { + bool left = (me->window == frame.left_grip); + + if (! flags.resizing) { + XGrabServer(blackbox->getXDisplay()); + XGrabPointer(blackbox->getXDisplay(), me->window, False, + ButtonMotionMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, + ((left) ? blackbox->getLowerLeftAngleCursor() : + blackbox->getLowerRightAngleCursor()), + CurrentTime); + + flags.resizing = True; + + unsigned int gw, gh; + frame.grab_x = me->x; + frame.grab_y = me->y; + frame.changing = frame.rect; + + constrain((left) ? TopRight : TopLeft, &gw, &gh); + + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), frame.changing.x(), frame.changing.y(), + frame.changing.width() - 1, frame.changing.height() - 1); + } else { + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), frame.changing.x(), frame.changing.y(), + frame.changing.width() - 1, frame.changing.height() - 1); + + unsigned int gw, gh; + + Corner anchor; + + if (left) { + anchor = TopRight; + frame.changing.setCoords(me->x_root - frame.grab_x, frame.rect.top(), + frame.rect.right(), frame.rect.bottom()); + frame.changing.setHeight(frame.rect.height() + (me->y - frame.grab_y)); + } else { + anchor = TopLeft; + frame.changing.setSize(frame.rect.width() + (me->x - frame.grab_x), + frame.rect.height() + (me->y - frame.grab_y)); + } + + constrain(anchor, &gw, &gh); + + XDrawRectangle(blackbox->getXDisplay(), screen->getRootWindow(), + screen->getOpGC(), frame.changing.x(), frame.changing.y(), + frame.changing.width() - 1, frame.changing.height() - 1); + } + } +#endif +} + + +void BlackboxWindow::enterNotifyEvent(const XCrossingEvent* ce) { + if (! (screen->isSloppyFocus() && isVisible())) + return; + + XEvent e; + bool leave = False, inferior = False; + + while (XCheckTypedWindowEvent(blackbox->getXDisplay(), ce->window, + LeaveNotify, &e)) { + if (e.type == LeaveNotify && e.xcrossing.mode == NotifyNormal) { + leave = True; + inferior = (e.xcrossing.detail == NotifyInferior); + } + } + + if ((! leave || inferior) && ! isFocused()) { + bool success = setInputFocus(); + if (success) // if focus succeeded install the colormap + installColormap(True); // XXX: shouldnt we honour no install? + } + + if (screen->doAutoRaise()) + timer->start(); +} + + +void BlackboxWindow::leaveNotifyEvent(const XCrossingEvent*) { + if (! (screen->isSloppyFocus() && screen->doAutoRaise())) + return; + + installColormap(False); + + if (timer->isTiming()) + timer->stop(); +} + + +#ifdef SHAPE +void BlackboxWindow::shapeEvent(XShapeEvent *) { + if (blackbox->hasShapeExtensions() && flags.shaped) { + configureShape(); + } +} +#endif // SHAPE + + +void BlackboxWindow::windowsWMControllerEvent(XWindowsWMNotifyEvent *windows_wm_event) { +#ifdef DEBUG + printf (stderr, "\tBlackboxWindow::windowsWMControllerEvent %d %d\n", + blackbox->hasWindowsWMExtensions(), windows_wm_event->arg); +#endif + if (blackbox->hasWindowsWMExtensions()) { + switch (windows_wm_event->arg) { + case WindowsWMMaximizeWindow: + //printf ("maximize 0x%08x\n", (int)c); + //raise_win(c); +#ifdef DEBUG + fprintf (stderr, "\tWindowsWMMaximizeWindow\n"); +#endif + break; + case WindowsWMMinimizeWindow: + //printf ("minimize 0x%08x\n", (int)c); + //iconify();//FIXME: This window become hide. Configure this behavior by ext? +#ifdef DEBUG + fprintf (stderr,"\tWindowsWMMinimizeWindow\n"); +#endif + //FIXME: + screen->getWorkspace(blackbox_attrib.workspace)->lowerWindow(this); + break; + case WindowsWMCloseWindow: +#ifdef DEBUG + fprintf (stderr, "\tWindowsWMCloseWindow\n"); +#endif + close(); + break; +#if 0 + case WindowsWMMoveWindow: +#ifdef DEBUG + fprintf (stderr, "move 0x%08x\n", (int)c); +#endif + c->x = e->x; + c->y = e->y; + XMoveWindow(dpy, c->frame, c->x, c->y - theight(c)); + send_config(c); + break; + case WindowsWMResizeWindow: +#ifdef DEBUG + fprintf (stderr, "resize 0x%08x\n", (int)c); +#endif + c->width = e->w; + c->height = e->h; + XMoveResizeWindow(dpy, c->frame, + c->x, c->y - theight(c), c->width, c->height + theight(c)); + XMoveResizeWindow(dpy, c->window, + 0, theight(c), c->width, c->height); + send_config(c); + break; +#endif + case WindowsWMActivateWindow: +#ifdef DEBUG + fprintf (stderr, "\tWindowsWMActivateWindow\n"); +#endif + if (! flags.focused) + setInputFocus(); + break; + default: + break; + } + } +} + + +bool BlackboxWindow::validateClient(void) const { + XSync(blackbox->getXDisplay(), False); + + XEvent e; + if (XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window, + DestroyNotify, &e) || + XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window, + UnmapNotify, &e)) { + XPutBackEvent(blackbox->getXDisplay(), &e); + + return False; + } + + return True; +} + + +void BlackboxWindow::restore(bool remap) { + XChangeSaveSet(blackbox->getXDisplay(), client.window, SetModeDelete); + XSelectInput(blackbox->getXDisplay(), client.window, NoEventMask); + + // do not leave a shaded window as an icon unless it was an icon + if (flags.shaded && ! flags.iconic) + current_state = NormalState; + + setState(current_state); + + restoreGravity(client.rect); + + XUnmapWindow(blackbox->getXDisplay(), frame.window); + XUnmapWindow(blackbox->getXDisplay(), client.window); + + XSetWindowBorderWidth(blackbox->getXDisplay(), client.window, client.old_bw); + + XEvent ev; + if (XCheckTypedWindowEvent(blackbox->getXDisplay(), client.window, + ReparentNotify, &ev)) { + remap = True; + } else { + // according to the ICCCM - if the client doesn't reparent to + // root, then we have to do it for them + XReparentWindow(blackbox->getXDisplay(), client.window, + screen->getRootWindow(), + client.rect.x(), client.rect.y()); + } + + if (remap) XMapWindow(blackbox->getXDisplay(), client.window); +} + + +// timer for autoraise +void BlackboxWindow::timeout(void) { + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); +} + + +void BlackboxWindow::changeBlackboxHints(const BlackboxHints *net) { + if ((net->flags & AttribShaded) && + ((blackbox_attrib.attrib & AttribShaded) != + (net->attrib & AttribShaded))) + shade(); + + if (flags.visible && // watch out for requests when we can not be seen + (net->flags & (AttribMaxVert | AttribMaxHoriz)) && + ((blackbox_attrib.attrib & (AttribMaxVert | AttribMaxHoriz)) != + (net->attrib & (AttribMaxVert | AttribMaxHoriz)))) { + if (flags.maximized) { + maximize(0); + } else { + int button = 0; + + if (net->flags & AttribMaxHoriz && net->flags & AttribMaxVert && + net->attrib & (AttribMaxHoriz | AttribMaxVert)) + button = 1; + else if (net->flags & AttribMaxVert && net->attrib & AttribMaxVert) + button = 2; + else if (net->flags & AttribMaxHoriz && net->attrib & AttribMaxHoriz) + button = 3; + + maximize(button); + } + } + + if ((net->flags & AttribOmnipresent) && + ((blackbox_attrib.attrib & AttribOmnipresent) != + (net->attrib & AttribOmnipresent))) + stick(); + + if ((net->flags & AttribWorkspace) && + (blackbox_attrib.workspace != net->workspace)) { + screen->reassociateWindow(this, net->workspace, True); + + if (screen->getCurrentWorkspaceID() != net->workspace) { + withdraw(); + } else { + show(); + screen->getWorkspace(blackbox_attrib.workspace)->raiseWindow(this); + } + } + + if (net->flags & AttribDecoration) { + switch (net->decoration) { + case DecorNone: + decorations = 0; + + break; + + default: + case DecorNormal: + decorations |= Decor_Titlebar | Decor_Handle | Decor_Border | + Decor_Iconify | Decor_Maximize; + + break; + + case DecorTiny: + decorations |= Decor_Titlebar | Decor_Iconify; + decorations &= ~(Decor_Border | Decor_Handle | Decor_Maximize); + + break; + + case DecorTool: + decorations |= Decor_Titlebar; + decorations &= ~(Decor_Iconify | Decor_Border | Decor_Handle); + + break; + } + + // sanity check the new decor + if (! (functions & Func_Resize) || isTransient()) + decorations &= ~(Decor_Maximize | Decor_Handle); + if (! (functions & Func_Maximize)) + decorations &= ~Decor_Maximize; + if (! (functions & Func_Iconify)) + decorations &= ~Decor_Iconify; + if (decorations & Decor_Titlebar) { + if (functions & Func_Close) // close button is controlled by function + decorations |= Decor_Close; // not decor type + } else { + if (flags.shaded) // we can not be shaded if we lack a titlebar + shade(); + } + + if (flags.visible && frame.window) { + XMapSubwindows(blackbox->getXDisplay(), frame.window); + XMapWindow(blackbox->getXDisplay(), frame.window); + } + + reconfigure(); + setState(current_state); + } +} + + +/* + * Set the sizes of all components of the window frame + * (the window decorations). + * These values are based upon the current style settings and the client + * window's dimensions. + */ +void BlackboxWindow::upsize(void) { + unsigned int + height = client.rect.height(), + width = client.rect.width(); + + frame.rect.setSize(width, height); +} + + +/* + * Calculate the size of the client window and constrain it to the + * size specified by the size hints of the client window. + * + * The logical width and height are placed into pw and ph, if they + * are non-zero. Logical size refers to the users perception of + * the window size (for example an xterm resizes in cells, not in pixels). + * pw and ph are then used to display the geometry during window moves, resize, + * etc. + * + * The physical geometry is placed into frame.changing_{x,y,width,height}. + * Physical geometry refers to the geometry of the window in pixels. + */ +void BlackboxWindow::constrain(Corner anchor, + unsigned int *pw, unsigned int *ph) { + // frame.changing represents the requested frame size, we need to + // strip the frame margin off and constrain the client size + frame.changing.setCoords(frame.changing.left(), frame.changing.top(), + frame.changing.right(), frame.changing.bottom()); + + unsigned int dw = frame.changing.width(), dh = frame.changing.height(), + base_width = (client.base_width) ? client.base_width : client.min_width, + base_height = (client.base_height) ? client.base_height : + client.min_height; + + // constrain + if (dw < client.min_width) dw = client.min_width; + if (dh < client.min_height) dh = client.min_height; + if (dw > client.max_width) dw = client.max_width; + if (dh > client.max_height) dh = client.max_height; + + assert(dw >= base_width && dh >= base_height); + + if (client.width_inc > 1) { + dw -= base_width; + dw /= client.width_inc; + } + if (client.height_inc > 1) { + dh -= base_height; + dh /= client.height_inc; + } + + if (pw) + *pw = dw; + + if (ph) + *ph = dh; + + if (client.width_inc > 1) { + dw *= client.width_inc; + dw += base_width; + } + if (client.height_inc > 1) { + dh *= client.height_inc; + dh += base_height; + } + + frame.changing.setSize(dw, dh); + + // add the frame margin back onto frame.changing + frame.changing.setCoords(frame.changing.left(), frame.changing.top(), + frame.changing.right(), frame.changing.bottom()); + + // move frame.changing to the specified anchor + switch (anchor) { + case TopLeft: + // nothing to do + break; + + case TopRight: + int dx = frame.rect.right() - frame.changing.right(); + frame.changing.setPos(frame.changing.x() + dx, frame.changing.y()); + break; + } +} + + +BWindowGroup::BWindowGroup(Blackbox *b, Window _group) + : blackbox(b), group(_group) { + XWindowAttributes wattrib; + if (! XGetWindowAttributes(blackbox->getXDisplay(), group, &wattrib)) { + // group window doesn't seem to exist anymore + delete this; + return; + } + + XSelectInput(blackbox->getXDisplay(), group, + PropertyChangeMask | FocusChangeMask | StructureNotifyMask); + + blackbox->saveGroupSearch(group, this); +} + + +BWindowGroup::~BWindowGroup(void) { + blackbox->removeGroupSearch(group); +} + + +BlackboxWindow * +BWindowGroup::find(BScreen *screen, bool allow_transients) const { + BlackboxWindow *ret = blackbox->getFocusedWindow(); + + // does the focus window match (or any transient_fors)? + for (; ret; ret = ret->getTransientFor()) { + if (ret->getScreen() == screen && ret->getGroupWindow() == group && + (! ret->isTransient() || allow_transients)) + break; + } + + if (ret) return ret; + + // the focus window didn't match, look in the group's window list + BlackboxWindowList::const_iterator it, end = windowList.end(); + for (it = windowList.begin(); it != end; ++it) { + ret = *it; + if (ret->getScreen() == screen && ret->getGroupWindow() == group && + (! ret->isTransient() || allow_transients)) + break; + } + + return ret; +} diff --git a/src/Window.hh b/src/Window.hh new file mode 100644 index 0000000..c7f39e5 --- /dev/null +++ b/src/Window.hh @@ -0,0 +1,361 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Window.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __Window_hh +#define __Window_hh + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#ifdef SHAPE +# include <X11/extensions/shape.h> +#endif // SHAPE +#include <X11/extensions/windowswm.h> +#include <X11/extensions/windowswmstr.h> +} + +#include <string> + +#include "BaseDisplay.hh" +#include "Timer.hh" +#include "Util.hh" + +#define MwmHintsFunctions (1l << 0) +#define MwmHintsDecorations (1l << 1) + +#define MwmFuncAll (1l << 0) +#define MwmFuncResize (1l << 1) +#define MwmFuncMove (1l << 2) +#define MwmFuncIconify (1l << 3) +#define MwmFuncMaximize (1l << 4) +#define MwmFuncClose (1l << 5) + +#define MwmDecorAll (1l << 0) +#define MwmDecorBorder (1l << 1) +#define MwmDecorHandle (1l << 2) +#define MwmDecorTitle (1l << 3) +#define MwmDecorMenu (1l << 4) // not used +#define MwmDecorIconify (1l << 5) +#define MwmDecorMaximize (1l << 6) + +// this structure only contains 3 elements... the Motif 2.0 structure contains +// 5... we only need the first 3... so that is all we will define +typedef struct MwmHints { + unsigned long flags, functions, decorations; +} MwmHints; + +#define PropMwmHintsElements 3 + +class BWindowGroup { +private: + Blackbox *blackbox; + Window group; + BlackboxWindowList windowList; + +public: + BWindowGroup(Blackbox *b, Window _group); + ~BWindowGroup(void); + + inline Window groupWindow(void) const { return group; } + + inline bool empty(void) const { return windowList.empty(); } + + void addWindow(BlackboxWindow *w) { windowList.push_back(w); } + void removeWindow(BlackboxWindow *w) { windowList.remove(w); } + + /* + find a window on the specified screen. the focused window (if any) is + checked first, otherwise the first matching window found is returned. + transients are returned only if allow_transients is True. + */ + BlackboxWindow *find(BScreen *screen, bool allow_transients = False) const; +}; + + +class BlackboxWindow : public TimeoutHandler { +public: + enum Function { Func_Resize = (1l << 0), + Func_Move = (1l << 1), + Func_Iconify = (1l << 2), + Func_Maximize = (1l << 3), + Func_Close = (1l << 4) }; + typedef unsigned char FunctionFlags; + + enum Decoration { Decor_Titlebar = (1l << 0), + Decor_Handle = (1l << 1), + Decor_Border = (1l << 2), + Decor_Iconify = (1l << 3), + Decor_Maximize = (1l << 4), + Decor_Close = (1l << 5) }; + typedef unsigned char DecorationFlags; + +private: + Blackbox *blackbox; + BScreen *screen; + BTimer *timer; + BlackboxAttributes blackbox_attrib; + + Time lastButtonPressTime; // used for double clicks, when were we clicked + + unsigned int window_number; + unsigned long current_state; + + enum FocusMode { F_NoInput = 0, F_Passive, + F_LocallyActive, F_GloballyActive }; + FocusMode focus_mode; + + struct _flags { + bool moving, // is moving? + resizing, // is resizing? + shaded, // is shaded? + visible, // is visible? + iconic, // is iconified? + focused, // has focus? + stuck, // is omnipresent + modal, // is modal? (must be dismissed to continue) + send_focus_message, // should we send focus messages to our client? + shaped; // does the frame use the shape extension? + unsigned int maximized; // maximize is special, the number corresponds + // with a mouse button + // if 0, not maximized + // 1 = HorizVert, 2 = Vertical, 3 = Horizontal + } flags; + + struct _client { + Window window, // the client's window + window_group; + BlackboxWindow *transient_for; // which window are we a transient for? + BlackboxWindowList transientList; // which windows are our transients? + + std::string title, icon_title; + + Rect rect; + + int old_bw; // client's borderwidth + + unsigned int + min_width, min_height, // can not be resized smaller + max_width, max_height, // can not be resized larger + width_inc, height_inc, // increment step +#if 0 // not supported at the moment + min_aspect_x, min_aspect_y, // minimum aspect ratio + max_aspect_x, max_aspect_y, // maximum aspect ratio +#endif + base_width, base_height, + win_gravity; + + unsigned long initial_state, normal_hint_flags; + } client; + + FunctionFlags functions; + /* + * what decorations do we have? + * this is based on the type of the client window as well as user input + * the menu is not really decor, but it goes hand in hand with the decor + */ + DecorationFlags decorations; + + unsigned int frame_style; + unsigned int frame_style_ex; + + /* + * client window = the application's window + * frame window = the window drawn around the outside of the client window + * by the window manager which contains items like the + * titlebar and close button + * title = the titlebar drawn above the client window, it displays the + * window's name and any buttons for interacting with the window, + * such as iconify, maximize, and close + * label = the window in the titlebar where the title is drawn + * buttons = maximize, iconify, close + * handle = the bar drawn at the bottom of the window, which contains the + * left and right grips used for resizing the window + * grips = the smaller reactangles in the handle, one of each side of it. + * When clicked and dragged, these resize the window interactively + * border = the line drawn around the outside edge of the frame window, + * between the title, the bordered client window, and the handle. + * Also drawn between the grips and the handle + */ + + struct _frame { + Window window; // the frame + + /* + * size and location of the box drawn while the window dimensions or + * location is being changed, ie. resized or moved + */ + Rect changing; + + Rect rect; // frame geometry + Rect rectFrame; // windows frame geometry + //Strut margin; // margins between the frame and client + + int grab_x, grab_y; // where was the window when it was grabbed? + + /*unsigned int inside_w, inside_h, // window w/h without border_w + title_h, label_w, label_h, handle_h, + button_w, grip_w, mwm_border_w, border_w, + bevel_w;*/ + } frame; + + BlackboxWindow(const BlackboxWindow&); + BlackboxWindow& operator=(const BlackboxWindow&); + + bool getState(void); + Window createToplevelWindow(); + Window createChildWindow(Window parent, unsigned long event_mask, + Cursor = None); + + void getWMName(void); + void getWMIconName(void); + void getWMNormalHints(void); + void getWMProtocols(void); + void getWMHints(void); + void getMWMHints(void); + void getWMClass(void); + bool getBlackboxHints(void); + void getTransientInfo(void); + void setNetWMAttributes(void); + void associateClientWindow(void); + void decorate(void); + void decorateLabel(void); + void positionButtons(bool redecorate_label = False); + void positionWindows(void); + void createHandle(void); + void destroyHandle(void); + void createTitlebar(void); + void destroyTitlebar(void); + void createCloseButton(void); + void destroyCloseButton(void); + void createIconifyButton(void); + void destroyIconifyButton(void); + void createMaximizeButton(void); + void destroyMaximizeButton(void); + void redrawWindowFrame(void) const; + void redrawLabel(void) const; + void redrawAllButtons(void) const; + void redrawCloseButton(bool pressed) const; + void redrawIconifyButton(bool pressed) const; + void redrawMaximizeButton(bool pressed) const; + void applyGravity(Rect &r); + void restoreGravity(Rect &r); + void setState(unsigned long new_state); + void upsize(void); + + enum Corner { TopLeft, TopRight }; + void constrain(Corner anchor, unsigned int *pw = 0, unsigned int *ph = 0); + +public: + BlackboxWindow(Blackbox *b, Window w, BScreen *s); + virtual ~BlackboxWindow(void); + + inline bool isTransient(void) const { return client.transient_for != 0; } + inline bool isFocused(void) const { return flags.focused; } + inline bool isVisible(void) const { return flags.visible; } + inline bool isIconic(void) const { return flags.iconic; } + inline bool isShaded(void) const { return flags.shaded; } + inline bool isMaximized(void) const { return flags.maximized; } + inline bool isModal(void) const { return flags.modal; } + inline bool isStuck(void) const { return flags.stuck; } + inline bool isIconifiable(void) const { return functions & Func_Iconify; } + inline bool isMaximizable(void) const { return functions & Func_Maximize; } + inline bool isResizable(void) const { return functions & Func_Resize; } + inline bool isClosable(void) const { return functions & Func_Close; } + + inline bool hasTitlebar(void) const { return decorations & Decor_Titlebar; } + + inline const BlackboxWindowList &getTransients(void) const + { return client.transientList; } + BlackboxWindow *getTransientFor(void) const; + + inline BScreen *getScreen(void) const { return screen; } + + inline Window getFrameWindow(void) const { return frame.window; } + inline Window getClientWindow(void) const { return client.window; } + inline Window getGroupWindow(void) const { return client.window_group; } + + inline const char *getTitle(void) const + { return client.title.c_str(); } + inline const char *getIconTitle(void) const + { return client.icon_title.c_str(); } + + inline unsigned int getWorkspaceNumber(void) const + { return blackbox_attrib.workspace; } + inline unsigned int getWindowNumber(void) const { return window_number; } + + inline const Rect &frameRect(void) const { return frame.rect; } + inline const Rect &clientRect(void) const { return client.rect; } + + inline void setWindowNumber(int n) { window_number = n; } + + inline void setModal(bool flag) { flags.modal = flag; } + + bool validateClient(void) const; + bool setInputFocus(void); + + void setFocusFlag(bool focus); + void iconify(void); + void deiconify(bool reassoc = True, bool raise = True); + void show(void); + void close(void); + void withdraw(void); + void maximize(unsigned int button); + void remaximize(void); + void shade(void); + void stick(void); + void reconfigure(void); + void grabButtons(void); + void ungrabButtons(void); + void installColormap(bool install); + void restore(bool remap); + void configure(int dx, int dy, unsigned int dw, unsigned int dh); + void setWorkspace(unsigned int n); + void changeBlackboxHints(const BlackboxHints *net); + void restoreAttributes(void); + + void buttonPressEvent(const XButtonEvent *be); + void buttonReleaseEvent(const XButtonEvent *re); + void motionNotifyEvent(const XMotionEvent *me); + void destroyNotifyEvent(const XDestroyWindowEvent */*unused*/); + void mapRequestEvent(const XMapRequestEvent *mre); + void unmapNotifyEvent(const XUnmapEvent */*unused*/); + void reparentNotifyEvent(const XReparentEvent */*unused*/); + void propertyNotifyEvent(const XPropertyEvent *pe); + void exposeEvent(const XExposeEvent *ee); + void configureRequestEvent(const XConfigureRequestEvent *cr); + void configureNotifyEvent(const XConfigureEvent *cr); + void enterNotifyEvent(const XCrossingEvent* ce); + void leaveNotifyEvent(const XCrossingEvent* /*unused*/); + +#ifdef SHAPE + void configureShape(void); + void shapeEvent(XShapeEvent * /*unused*/); +#endif // SHAPE + void windowsWMControllerEvent(XWindowsWMNotifyEvent *windows_wm_event); + + virtual void timeout(void); +}; + + +#endif // __Window_hh diff --git a/src/Workspace.cc b/src/Workspace.cc new file mode 100644 index 0000000..e4ad772 --- /dev/null +++ b/src/Workspace.cc @@ -0,0 +1,653 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Workspace.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xatom.h> + +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H +} + +#include <assert.h> + +#include <functional> +#include <string> + +using std::string; + +#include "i18n.hh" +#include "blackbox.hh" +#include "Netizen.hh" +#include "Screen.hh" +#include "Util.hh" +#include "Window.hh" +#include "Workspace.hh" + + +Workspace::Workspace(BScreen *scrn, unsigned int i) { + screen = scrn; + + cascade_x = cascade_y = 32; + + id = i; + + lastfocus = (BlackboxWindow *) 0; + + setName(screen->getNameOfWorkspace(id)); +} + + +void Workspace::addWindow(BlackboxWindow *w, bool place) { + assert(w != 0); + + if (place) placeWindow(w); + + w->setWorkspace(id); + w->setWindowNumber(windowList.size()); + + stackingList.push_front(w); + windowList.push_back(w); + + screen->updateNetizenWindowAdd(w->getClientWindow(), id); + + raiseWindow(w); +} + + +unsigned int Workspace::removeWindow(BlackboxWindow *w) { + assert(w != 0); + + stackingList.remove(w); + + // pass focus to the next appropriate window + if ((w->isFocused() || w == lastfocus) && + ! screen->getBlackbox()->doShutdown()) { + focusFallback(w); + + // if the window is sticky, then it needs to be removed on all other + // workspaces too! + if (w->isStuck()) { + for (unsigned int i = 0; i < screen->getWorkspaceCount(); ++i) + if (i != id) + screen->getWorkspace(i)->focusFallback(w); + } + } + + windowList.remove(w); + + screen->updateNetizenWindowDel(w->getClientWindow()); + + BlackboxWindowList::iterator it = windowList.begin(); + const BlackboxWindowList::iterator end = windowList.end(); + unsigned int i = 0; + for (; it != end; ++it, ++i) + (*it)->setWindowNumber(i); + + if (i == 0) + cascade_x = cascade_y = 32; + + return i; +} + + +void Workspace::focusFallback(const BlackboxWindow *old_window) { + BlackboxWindow *newfocus = 0; + + if (id == screen->getCurrentWorkspaceID()) { + // The window is on the visible workspace. + + // if it's a transient, then try to focus its parent + if (old_window && old_window->isTransient()) { + newfocus = old_window->getTransientFor(); + + if (! newfocus || + newfocus->isIconic() || // do not focus icons + newfocus->getWorkspaceNumber() != id || // or other workspaces + ! newfocus->setInputFocus()) + newfocus = 0; + } + + if (! newfocus) { + BlackboxWindowList::iterator it = stackingList.begin(), + end = stackingList.end(); + for (; it != end; ++it) { + BlackboxWindow *tmp = *it; + if (tmp && tmp->setInputFocus()) { + // we found our new focus target + newfocus = tmp; + break; + } + } + } + + screen->getBlackbox()->setFocusedWindow(newfocus); + } else { + // The window is not on the visible workspace. + + if (old_window && lastfocus == old_window) { + // The window was the last-focus target, so we need to replace it. + BlackboxWindow *win = (BlackboxWindow*) 0; + if (! stackingList.empty()) + win = stackingList.front(); + setLastFocusedWindow(win); + } + } +} + + +void Workspace::removeAll(void) { + while (! windowList.empty()) + windowList.front()->iconify(); +} + + +/* + * returns the number of transients for win, plus the number of transients + * associated with each transient of win + */ +static unsigned int countTransients(const BlackboxWindow * const win) { + BlackboxWindowList transients = win->getTransients(); + if (transients.empty()) return 0; + + unsigned int ret = transients.size(); + BlackboxWindowList::const_iterator it = transients.begin(), + end = transients.end(); + for (; it != end; ++it) + ret += countTransients(*it); + + return ret; +} + + +/* + * puts the transients of win into the stack. windows are stacked above + * the window before it in the stackvector being iterated, meaning + * stack[0] is on bottom, stack[1] is above stack[0], stack[2] is above + * stack[1], etc... + */ +void Workspace::raiseTransients(const BlackboxWindow * const win, + StackVector::iterator &stack) { + if (win->getTransients().empty()) return; // nothing to do + + // put win's transients in the stack + BlackboxWindowList::const_iterator it, end = win->getTransients().end(); + for (it = win->getTransients().begin(); it != end; ++it) { + BlackboxWindow *w = *it; + *stack++ = w->getFrameWindow(); + screen->updateNetizenWindowRaise(w->getClientWindow()); + + if (! w->isIconic()) { + Workspace *wkspc = screen->getWorkspace(w->getWorkspaceNumber()); + wkspc->stackingList.remove(w); + wkspc->stackingList.push_front(w); + } + } + + // put transients of win's transients in the stack + for (it = win->getTransients().begin(); it != end; ++it) + raiseTransients(*it, stack); +} + + +void Workspace::lowerTransients(const BlackboxWindow * const win, + StackVector::iterator &stack) { + if (win->getTransients().empty()) return; // nothing to do + + // put transients of win's transients in the stack + BlackboxWindowList::const_reverse_iterator it, + end = win->getTransients().rend(); + for (it = win->getTransients().rbegin(); it != end; ++it) + lowerTransients(*it, stack); + + // put win's transients in the stack + for (it = win->getTransients().rbegin(); it != end; ++it) { + BlackboxWindow *w = *it; + *stack++ = w->getFrameWindow(); + screen->updateNetizenWindowLower(w->getClientWindow()); + + if (! w->isIconic()) { + Workspace *wkspc = screen->getWorkspace(w->getWorkspaceNumber()); + wkspc->stackingList.remove(w); + wkspc->stackingList.push_back(w); + } + } +} + + +void Workspace::raiseWindow(BlackboxWindow *w) { + BlackboxWindow *win = w; + + // walk up the transient_for's to the window that is not a transient + while (win->isTransient() && win->getTransientFor()) + win = win->getTransientFor(); + + // get the total window count (win and all transients) + unsigned int i = 1 + countTransients(win); + + // stack the window with all transients above + StackVector stack_vector(i); + StackVector::iterator stack = stack_vector.begin(); + + *(stack++) = win->getFrameWindow(); + screen->updateNetizenWindowRaise(win->getClientWindow()); + if (! win->isIconic()) { + Workspace *wkspc = screen->getWorkspace(win->getWorkspaceNumber()); + wkspc->stackingList.remove(win); + wkspc->stackingList.push_front(win); + } + + raiseTransients(win, stack); + + screen->raiseWindows(&stack_vector[0], stack_vector.size()); +} + + +void Workspace::lowerWindow(BlackboxWindow *w) { + BlackboxWindow *win = w; + + // walk up the transient_for's to the window that is not a transient + while (win->isTransient() && win->getTransientFor()) + win = win->getTransientFor(); + + // get the total window count (win and all transients) + unsigned int i = 1 + countTransients(win); + + // stack the window with all transients above + StackVector stack_vector(i); + StackVector::iterator stack = stack_vector.begin(); + + lowerTransients(win, stack); + + *(stack++) = win->getFrameWindow(); + screen->updateNetizenWindowLower(win->getClientWindow()); + if (! win->isIconic()) { + Workspace *wkspc = screen->getWorkspace(win->getWorkspaceNumber()); + wkspc->stackingList.remove(win); + wkspc->stackingList.push_back(win); + } + + XLowerWindow(screen->getBaseDisplay()->getXDisplay(), stack_vector.front()); + XRestackWindows(screen->getBaseDisplay()->getXDisplay(), + &stack_vector[0], stack_vector.size()); +} + + +void Workspace::reconfigure(void) { + std::for_each(windowList.begin(), windowList.end(), + std::mem_fun(&BlackboxWindow::reconfigure)); +} + + +BlackboxWindow *Workspace::getWindow(unsigned int index) { + if (index < windowList.size()) { + BlackboxWindowList::iterator it = windowList.begin(); + while (index-- > 0) + it = next_it(it); + return *it; + } + + return 0; +} + + +BlackboxWindow* +Workspace::getNextWindowInList(BlackboxWindow *w) { + BlackboxWindowList::iterator it = std::find(windowList.begin(), + windowList.end(), + w); + assert(it != windowList.end()); // window must be in list + ++it; // next window + if (it == windowList.end()) + return windowList.front(); // if we walked off the end, wrap around + + return *it; +} + + +BlackboxWindow* Workspace::getPrevWindowInList(BlackboxWindow *w) { + BlackboxWindowList::iterator it = std::find(windowList.begin(), + windowList.end(), + w); + assert(it != windowList.end()); // window must be in list + if (it == windowList.begin()) + return windowList.back(); // if we walked of the front, wrap around + + return *(--it); +} + + +BlackboxWindow* Workspace::getTopWindowOnStack(void) const { + assert(! stackingList.empty()); + return stackingList.front(); +} + + +void Workspace::sendWindowList(Netizen &n) { + BlackboxWindowList::iterator it = windowList.begin(), + end = windowList.end(); + for(; it != end; ++it) + n.sendWindowAdd((*it)->getClientWindow(), getID()); +} + + +unsigned int Workspace::getCount(void) const { + return windowList.size(); +} + + +void Workspace::hide(void) { + BlackboxWindow *focused = screen->getBlackbox()->getFocusedWindow(); + if (focused && focused->getScreen() == screen) { + assert(focused->isStuck() || focused->getWorkspaceNumber() == id); + + lastfocus = focused; + } else { + // if no window had focus, no need to store a last focus + lastfocus = (BlackboxWindow *) 0; + } + + // when we switch workspaces, unfocus whatever was focused + screen->getBlackbox()->setFocusedWindow((BlackboxWindow *) 0); + + // withdraw windows in reverse order to minimize the number of Expose events + + BlackboxWindowList::reverse_iterator it = stackingList.rbegin(); + const BlackboxWindowList::reverse_iterator end = stackingList.rend(); + for (; it != end; ++it) { + BlackboxWindow *bw = *it; + if (! bw->isStuck()) + bw->withdraw(); + } +} + + +void Workspace::show(void) { + std::for_each(stackingList.begin(), stackingList.end(), + std::mem_fun(&BlackboxWindow::show)); + + XSync(screen->getBlackbox()->getXDisplay(), False); + + if (screen->doFocusLast()) { + if (! screen->isSloppyFocus() && ! lastfocus && ! stackingList.empty()) + lastfocus = stackingList.front(); + + if (lastfocus) + lastfocus->setInputFocus(); + } +} + + +bool Workspace::isCurrent(void) const { + return (id == screen->getCurrentWorkspaceID()); +} + + +bool Workspace::isLastWindow(const BlackboxWindow* const w) const { + return (w == windowList.back()); +} + + +void Workspace::setCurrent(void) { + screen->changeWorkspaceID(id); +} + + +void Workspace::setName(const string& new_name) { + if (! new_name.empty()) { + name = new_name; + } else { + string tmp =i18n(WorkspaceSet, WorkspaceDefaultNameFormat, "Workspace %d"); + assert(tmp.length() < 32); + char default_name[32]; + sprintf(default_name, tmp.c_str(), id + 1); + name = default_name; + } +} + + +/* + * Calculate free space available for window placement. + */ +typedef std::vector<Rect> rectList; + +static rectList calcSpace(const Rect &win, const rectList &spaces) { + Rect isect, extra; + rectList result; + rectList::const_iterator siter, end = spaces.end(); + for (siter = spaces.begin(); siter != end; ++siter) { + const Rect &curr = *siter; + + if(! win.intersects(curr)) { + result.push_back(curr); + continue; + } + + /* Use an intersection of win and curr to determine the space around + * curr that we can use. + * + * NOTE: the spaces calculated can overlap. + */ + isect = curr & win; + + // left + extra.setCoords(curr.left(), curr.top(), + isect.left() - 1, curr.bottom()); + if (extra.valid()) result.push_back(extra); + + // top + extra.setCoords(curr.left(), curr.top(), + curr.right(), isect.top() - 1); + if (extra.valid()) result.push_back(extra); + + // right + extra.setCoords(isect.right() + 1, curr.top(), + curr.right(), curr.bottom()); + if (extra.valid()) result.push_back(extra); + + // bottom + extra.setCoords(curr.left(), isect.bottom() + 1, + curr.right(), curr.bottom()); + if (extra.valid()) result.push_back(extra); + } + return result; +} + + +static bool rowRLBT(const Rect &first, const Rect &second) { + if (first.bottom() == second.bottom()) + return first.right() > second.right(); + return first.bottom() > second.bottom(); +} + +static bool rowRLTB(const Rect &first, const Rect &second) { + if (first.y() == second.y()) + return first.right() > second.right(); + return first.y() < second.y(); +} + +static bool rowLRBT(const Rect &first, const Rect &second) { + if (first.bottom() == second.bottom()) + return first.x() < second.x(); + return first.bottom() > second.bottom(); +} + +static bool rowLRTB(const Rect &first, const Rect &second) { + if (first.y() == second.y()) + return first.x() < second.x(); + return first.y() < second.y(); +} + +static bool colLRTB(const Rect &first, const Rect &second) { + if (first.x() == second.x()) + return first.y() < second.y(); + return first.x() < second.x(); +} + +static bool colLRBT(const Rect &first, const Rect &second) { + if (first.x() == second.x()) + return first.bottom() > second.bottom(); + return first.x() < second.x(); +} + +static bool colRLTB(const Rect &first, const Rect &second) { + if (first.right() == second.right()) + return first.y() < second.y(); + return first.right() > second.right(); +} + +static bool colRLBT(const Rect &first, const Rect &second) { + if (first.right() == second.right()) + return first.bottom() > second.bottom(); + return first.right() > second.right(); +} + + +bool Workspace::smartPlacement(Rect& win, const Rect& availableArea) { + rectList spaces; + spaces.push_back(availableArea); //initially the entire screen is free + + //Find Free Spaces + BlackboxWindowList::const_iterator wit = windowList.begin(), + end = windowList.end(); + Rect tmp; + for (; wit != end; ++wit) { + const BlackboxWindow* const curr = *wit; + if (curr->isShaded()) continue; + + tmp.setRect(curr->frameRect().x(), curr->frameRect().y(), + curr->frameRect().width() + screen->getBorderWidth(), + curr->frameRect().height() + screen->getBorderWidth()); + + spaces = calcSpace(tmp, spaces); + } + + if (screen->getPlacementPolicy() == BScreen::RowSmartPlacement) { + if(screen->getRowPlacementDirection() == BScreen::LeftRight) { + if(screen->getColPlacementDirection() == BScreen::TopBottom) + std::sort(spaces.begin(), spaces.end(), rowLRTB); + else + std::sort(spaces.begin(), spaces.end(), rowLRBT); + } else { + if(screen->getColPlacementDirection() == BScreen::TopBottom) + std::sort(spaces.begin(), spaces.end(), rowRLTB); + else + std::sort(spaces.begin(), spaces.end(), rowRLBT); + } + } else { + if(screen->getColPlacementDirection() == BScreen::TopBottom) { + if(screen->getRowPlacementDirection() == BScreen::LeftRight) + std::sort(spaces.begin(), spaces.end(), colLRTB); + else + std::sort(spaces.begin(), spaces.end(), colRLTB); + } else { + if(screen->getRowPlacementDirection() == BScreen::LeftRight) + std::sort(spaces.begin(), spaces.end(), colLRBT); + else + std::sort(spaces.begin(), spaces.end(), colRLBT); + } + } + + rectList::const_iterator sit = spaces.begin(), spaces_end = spaces.end(); + for(; sit != spaces_end; ++sit) { + if (sit->width() >= win.width() && sit->height() >= win.height()) + break; + } + + if (sit == spaces_end) + return False; + + //set new position based on the empty space found + const Rect& where = *sit; + win.setX(where.x()); + win.setY(where.y()); + + // adjust the location() based on left/right and top/bottom placement + if (screen->getPlacementPolicy() == BScreen::RowSmartPlacement) { + if (screen->getRowPlacementDirection() == BScreen::RightLeft) + win.setX(where.right() - win.width()); + if (screen->getColPlacementDirection() == BScreen::BottomTop) + win.setY(where.bottom() - win.height()); + } else { + if (screen->getColPlacementDirection() == BScreen::BottomTop) + win.setY(win.y() + where.height() - win.height()); + if (screen->getRowPlacementDirection() == BScreen::RightLeft) + win.setX(win.x() + where.width() - win.width()); + } + return True; +} + + +bool Workspace::cascadePlacement(Rect &win, const Rect &availableArea) { + if (cascade_x > (availableArea.width() / 2) || + cascade_y > (availableArea.height() / 2)) + cascade_x = cascade_y = 32; + + if (cascade_x == 32) { + cascade_x += availableArea.x(); + cascade_y += availableArea.y(); + } + + win.setPos(cascade_x, cascade_y); + + return True; +} + + +void Workspace::placeWindow(BlackboxWindow *win) { + Rect availableArea(screen->availableArea()), + new_win(availableArea.x(), availableArea.y(), + win->frameRect().width(), win->frameRect().height()); + bool placed = False; + + switch (screen->getPlacementPolicy()) { + case BScreen::RowSmartPlacement: + case BScreen::ColSmartPlacement: + placed = smartPlacement(new_win, availableArea); + break; + default: + break; // handled below + } // switch + + if (placed == False) { + cascadePlacement(new_win, availableArea); + //cascade_x += win->getTitleHeight() + (screen->getBorderWidth() * 2); + //cascade_y += win->getTitleHeight() + (screen->getBorderWidth() * 2); + } + + if (new_win.right() > availableArea.right()) + new_win.setX(availableArea.left()); + if (new_win.bottom() > availableArea.bottom()) + new_win.setY(availableArea.top()); + win->configure(new_win.x(), new_win.y(), new_win.width(), new_win.height()); +} diff --git a/src/Workspace.hh b/src/Workspace.hh new file mode 100644 index 0000000..5c38f25 --- /dev/null +++ b/src/Workspace.hh @@ -0,0 +1,110 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// Workspace.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __Workspace_hh +#define __Workspace_hh + +extern "C" { +#include <X11/Xlib.h> +} + +#include <list> +#include <string> +#include <vector> + +class BScreen; +class Clientmenu; +class Workspace; +class BlackboxWindow; +class Netizen; + +typedef std::list<BlackboxWindow*> BlackboxWindowList; +typedef std::vector<Window> StackVector; + +class Workspace { +private: + BScreen *screen; + BlackboxWindow *lastfocus; + Clientmenu *clientmenu; + + BlackboxWindowList stackingList, windowList; + + std::string name; + unsigned int id; + unsigned int cascade_x, cascade_y; + + Workspace(const Workspace&); + Workspace& operator=(const Workspace&); + + void raiseTransients(const BlackboxWindow * const win, + StackVector::iterator &stack); + void lowerTransients(const BlackboxWindow * const win, + StackVector::iterator &stack); + + void placeWindow(BlackboxWindow *win); + bool cascadePlacement(Rect& win, const Rect& availableArea); + bool smartPlacement(Rect& win, const Rect& availableArea); + +public: + Workspace(BScreen *scrn, unsigned int i = 0); + + inline BScreen *getScreen(void) { return screen; } + + inline BlackboxWindow *getLastFocusedWindow(void) { return lastfocus; } + + inline Clientmenu *getMenu(void) { return clientmenu; } + + inline const std::string& getName(void) const { return name; } + + inline unsigned int getID(void) const { return id; } + + inline void setLastFocusedWindow(BlackboxWindow *w) { lastfocus = w; } + + BlackboxWindow* getWindow(unsigned int index); + BlackboxWindow* getNextWindowInList(BlackboxWindow *w); + BlackboxWindow* getPrevWindowInList(BlackboxWindow *w); + BlackboxWindow* getTopWindowOnStack(void) const; + void sendWindowList(Netizen &n); + void focusFallback(const BlackboxWindow *old_window); + + bool isCurrent(void) const; + bool isLastWindow(const BlackboxWindow* w) const; + + void addWindow(BlackboxWindow *w, bool place = False); + unsigned int removeWindow(BlackboxWindow *w); + unsigned int getCount(void) const; + + void show(void); + void hide(void); + void removeAll(void); + void raiseWindow(BlackboxWindow *w); + void lowerWindow(BlackboxWindow *w); + void reconfigure(void); + void setCurrent(void); + void setName(const std::string& new_name); +}; + + +#endif // __Workspace_hh + diff --git a/src/blackbox.cc.in b/src/blackbox.cc.in new file mode 100644 index 0000000..3d942a4 --- /dev/null +++ b/src/blackbox.cc.in @@ -0,0 +1,1151 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// blackbox.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/Xresource.h> +#include <X11/Xatom.h> +#include <X11/cursorfont.h> +#include <X11/keysym.h> + +#include <X11/extensions/windowswm.h> +#include <X11/extensions/windowswmstr.h> + +#ifdef SHAPE +#include <X11/extensions/shape.h> +#endif // SHAPE + +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif // HAVE_STDLIB_H + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H + +#ifdef HAVE_UNISTD_H +# include <sys/types.h> +# include <unistd.h> +#endif // HAVE_UNISTD_H + +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif // HAVE_SYS_PARAM_H + +#ifdef HAVE_SYS_SELECT_H +# include <sys/select.h> +#endif // HAVE_SYS_SELECT_H + +#ifdef HAVE_SIGNAL_H +# include <signal.h> +#endif // HAVE_SIGNAL_H + +#ifdef HAVE_SYS_SIGNAL_H +# include <sys/signal.h> +#endif // HAVE_SYS_SIGNAL_H + +#ifdef HAVE_SYS_STAT_H +# include <sys/types.h> +# include <sys/stat.h> +#endif // HAVE_SYS_STAT_H + +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else // !TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else // !HAVE_SYS_TIME_H +# include <time.h> +# endif // HAVE_SYS_TIME_H +#endif // TIME_WITH_SYS_TIME + +#ifdef HAVE_LIBGEN_H +# include <libgen.h> +#endif // HAVE_LIBGEN_H +} + +#include <assert.h> + +#include <algorithm> +#include <string> +using std::string; + +#include "i18n.hh" +#include "blackbox.hh" +#include "GCCache.hh" +#include "Screen.hh" +#ifdef ADD_BLOAT +#include "Slit.hh" +#include "Toolbar.hh" +#endif // ADD_BLOAT +#include "Util.hh" +#include "Window.hh" +#include "Workspace.hh" + + +Blackbox *blackbox; + + +Blackbox::Blackbox(char **m_argv, char *dpy_name, char */*rc*/) + : BaseDisplay(m_argv[0], dpy_name) { + if (! XSupportsLocale()) + fprintf(stderr, "X server does not support locale\n"); + + if (XSetLocaleModifiers("") == NULL) + fprintf(stderr, "cannot set locale modifiers\n"); + + ::blackbox = this; + argv = m_argv; + + no_focus = False; + + resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0; + + active_screen = 0; + focused_window = (BlackboxWindow *) 0; + + load_rc(); + + init_icccm(); + + cursor.session = XCreateFontCursor(getXDisplay(), XC_left_ptr); + cursor.move = XCreateFontCursor(getXDisplay(), XC_fleur); + cursor.ll_angle = XCreateFontCursor(getXDisplay(), XC_ll_angle); + cursor.lr_angle = XCreateFontCursor(getXDisplay(), XC_lr_angle); + + for (unsigned int i = 0; i < getNumberOfScreens(); i++) { + BScreen *screen = new BScreen(this, i); + + if (! screen->isScreenManaged()) { + delete screen; + continue; + } + + screenList.push_back(screen); + } + + if (screenList.empty()) { + fprintf(stderr, + i18n(blackboxSet, blackboxNoManagableScreens, + "Blackbox::Blackbox: no managable screens found, aborting.\n")); + ::exit(3); + } + + // set the screen with mouse to the first managed screen + active_screen = screenList.front(); + setFocusedWindow(0); + + XSynchronize(getXDisplay(), False); + XSync(getXDisplay(), False); + + reconfigure_wait = False; + + timer = new BTimer(this, this); + timer->setTimeout(0l); +} + + +Blackbox::~Blackbox(void) { + std::for_each(screenList.begin(), screenList.end(), PointerAssassin()); + + delete timer; +} + + +void Blackbox::process_event(XEvent *e) { + switch (e->type) { + case ButtonPress: { + // strip the lock key modifiers + e->xbutton.state &= ~(NumLockMask | ScrollLockMask | LockMask); + + last_time = e->xbutton.time; + + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Slit *slit = (Slit *) 0; + Toolbar *tbar = (Toolbar *) 0; +#endif // ADD_BLOAT + BScreen *scrn = (BScreen *) 0; + + if ((win = searchWindow(e->xbutton.window))) { + win->buttonPressEvent(&e->xbutton); + + /* XXX: is this sane on low colour desktops? */ + if (e->xbutton.button == 1) + win->installColormap(True); +#ifdef ADD_BLOAT + } else if ((slit = searchSlit(e->xbutton.window))) { + slit->buttonPressEvent(&e->xbutton); + } else if ((tbar = searchToolbar(e->xbutton.window))) { + tbar->buttonPressEvent(&e->xbutton); +#endif // ADD_BLOAT + } else if ((scrn = searchScreen(e->xbutton.window))) { + scrn->buttonPressEvent(&e->xbutton); + if (active_screen != scrn) { + active_screen = scrn; + // first, set no focus window on the old screen + setFocusedWindow(0); + // and move focus to this screen + setFocusedWindow(0); + } + } + break; + } + + case ButtonRelease: { + // strip the lock key modifiers + e->xbutton.state &= ~(NumLockMask | ScrollLockMask | LockMask); + + last_time = e->xbutton.time; + + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Toolbar *tbar = (Toolbar *) 0; +#endif // ADD_BLOAT + + if ((win = searchWindow(e->xbutton.window))) + win->buttonReleaseEvent(&e->xbutton); +#ifdef ADD_BLOAT + else if ((tbar = searchToolbar(e->xbutton.window))) + tbar->buttonReleaseEvent(&e->xbutton); +#endif // ADD_BLOAT + + break; + } + + case ConfigureRequest: { +#ifdef DEBUG + fprintf(stderr, "ConfigureRequest\n"); +#endif + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Slit *slit = (Slit *) 0; +#endif // ADD_BLOAT + + if ((win = searchWindow(e->xconfigurerequest.window))) { + win->configureRequestEvent(&e->xconfigurerequest); +#ifdef ADD_BLOAT + } else if ((slit = searchSlit(e->xconfigurerequest.window))) { + slit->configureRequestEvent(&e->xconfigurerequest); +#endif // ADD_BLOAT + } else { + if (validateWindow(e->xconfigurerequest.window)) { + XWindowChanges xwc; + + xwc.x = e->xconfigurerequest.x; + xwc.y = e->xconfigurerequest.y; + xwc.width = e->xconfigurerequest.width; + xwc.height = e->xconfigurerequest.height; + xwc.border_width = e->xconfigurerequest.border_width; + xwc.sibling = e->xconfigurerequest.above; + xwc.stack_mode = e->xconfigurerequest.detail; + + XConfigureWindow(getXDisplay(), e->xconfigurerequest.window, + e->xconfigurerequest.value_mask, &xwc); + } + } + +#ifdef DEBUG + fprintf(stderr, "ConfigureRequest - done\n"); +#endif + + break; + } + + case ConfigureNotify: { + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef DEBUG + fprintf(stderr, "ConfigureNotify\n"); +#endif + + if ((win = searchWindow(e->xconfigure.window))) { + win->configureNotifyEvent(&e->xconfigure); + } + +#ifdef DEBUG + fprintf(stderr, "ConfigureNotify - done\n"); +#endif + + break; + } + + case MapRequest: { +#ifdef DEBUG + fprintf(stderr, "Blackbox::process_event(): MapRequest for 0x%lx\n", + e->xmaprequest.window); +#endif // DEBUG + + BlackboxWindow *win = searchWindow(e->xmaprequest.window); + + if (win) { + bool focus = False; + if (win->isIconic()) { + win->deiconify(); + focus = True; + } + if (win->isShaded()) { + win->shade(); + focus = True; + } + + if (focus && (win->isTransient() || win->getScreen()->doFocusNew())) + win->setInputFocus(); + } else { + BScreen *screen = searchScreen(e->xmaprequest.parent); + + if (! screen) { + /* + we got a map request for a window who's parent isn't root. this + can happen in only one circumstance: + + a client window unmapped a managed window, and then remapped it + somewhere between unmapping the client window and reparenting it + to root. + + regardless of how it happens, we need to find the screen that + the window is on + */ + XWindowAttributes wattrib; + if (! XGetWindowAttributes(getXDisplay(), e->xmaprequest.window, + &wattrib)) { + // failed to get the window attributes, perhaps the window has + // now been destroyed? + break; + } + + screen = searchScreen(wattrib.root); + assert(screen != 0); // this should never happen + } + screen->manageWindow(e->xmaprequest.window); + } + + break; + } + + case UnmapNotify: { + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Slit *slit = (Slit *) 0; +#endif // ADD_BLOAT + + if ((win = searchWindow(e->xunmap.window))) { + win->unmapNotifyEvent(&e->xunmap); +#ifdef ADD_BLOAT + } else if ((slit = searchSlit(e->xunmap.window))) { + slit->unmapNotifyEvent(&e->xunmap); +#endif // ADD_BLOAT + } + + break; + } + + case DestroyNotify: { + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Slit *slit = (Slit *) 0; +#endif // ADD_BLOAT + BWindowGroup *group = (BWindowGroup *) 0; + + if ((win = searchWindow(e->xdestroywindow.window))) { + win->destroyNotifyEvent(&e->xdestroywindow); +#ifdef ADD_BLOAT + } else if ((slit = searchSlit(e->xdestroywindow.window))) { + slit->removeClient(e->xdestroywindow.window, False); +#endif // ADD_BLOAT + } else if ((group = searchGroup(e->xdestroywindow.window))) { + delete group; + } + + break; + } + + case ReparentNotify: { + /* + this event is quite rare and is usually handled in unmapNotify + however, if the window is unmapped when the reparent event occurs + the window manager never sees it because an unmap event is not sent + to an already unmapped window. + */ + BlackboxWindow *win = searchWindow(e->xreparent.window); + if (win) { + win->reparentNotifyEvent(&e->xreparent); +#ifdef ADD_BLOAT + } else { + Slit *slit = searchSlit(e->xreparent.window); + if (slit && slit->getWindowID() != e->xreparent.parent) + slit->removeClient(e->xreparent.window, True); +#endif // ADD_BLOAT + } + break; + } + + case MotionNotify: { + // motion notify compression... + XEvent realevent; + unsigned int i = 0; + while (XCheckTypedWindowEvent(getXDisplay(), e->xmotion.window, + MotionNotify, &realevent)) { + i++; + } + + // if we have compressed some motion events, use the last one + if ( i > 0 ) + e = &realevent; + + // strip the lock key modifiers + e->xbutton.state &= ~(NumLockMask | ScrollLockMask | LockMask); + + last_time = e->xmotion.time; + + BlackboxWindow *win = (BlackboxWindow *) 0; + + if ((win = searchWindow(e->xmotion.window))) + win->motionNotifyEvent(&e->xmotion); + + break; + } + + case PropertyNotify: { + last_time = e->xproperty.time; + + BlackboxWindow *win = searchWindow(e->xproperty.window); + if (win) + win->propertyNotifyEvent(&e->xproperty); + break; + } + + case EnterNotify: { + last_time = e->xcrossing.time; + + //BScreen *screen = (BScreen *) 0; + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Toolbar *tbar = (Toolbar *) 0; + Slit *slit = (Slit *) 0; +#endif // ADD_BLOAT + + if (e->xcrossing.mode == NotifyGrab) break; + + if ((win = searchWindow(e->xcrossing.window))) { + if (! no_focus) + win->enterNotifyEvent(&e->xcrossing); +#ifdef ADD_BLOAT + } else if ((tbar = searchToolbar(e->xcrossing.window))) { + tbar->enterNotifyEvent(&e->xcrossing); + } else if ((slit = searchSlit(e->xcrossing.window))) { + slit->enterNotifyEvent(&e->xcrossing); +#endif // ADD_BLOAT + } + break; + } + + case LeaveNotify: { + last_time = e->xcrossing.time; + + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Toolbar *tbar = (Toolbar *) 0; + Slit *slit = (Slit *) 0; +#endif // ADD_BLOAT + + if ((win = searchWindow(e->xcrossing.window))) + win->leaveNotifyEvent(&e->xcrossing); +#ifdef ADD_BLOAT + else if ((tbar = searchToolbar(e->xcrossing.window))) + tbar->leaveNotifyEvent(&e->xcrossing); + else if ((slit = searchSlit(e->xcrossing.window))) + slit->leaveNotifyEvent(&e->xcrossing); +#endif // ADD_BLOAT + break; + } + + case Expose: { + // compress expose events + XEvent realevent; + unsigned int i = 0; + int ex1, ey1, ex2, ey2; + ex1 = e->xexpose.x; + ey1 = e->xexpose.y; + ex2 = ex1 + e->xexpose.width - 1; + ey2 = ey1 + e->xexpose.height - 1; + while (XCheckTypedWindowEvent(getXDisplay(), e->xexpose.window, + Expose, &realevent)) { + i++; + + // merge expose area + ex1 = std::min(realevent.xexpose.x, ex1); + ey1 = std::min(realevent.xexpose.y, ey1); + ex2 = std::max(realevent.xexpose.x + realevent.xexpose.width - 1, ex2); + ey2 = std::max(realevent.xexpose.y + realevent.xexpose.height - 1, ey2); + } + if ( i > 0 ) + e = &realevent; + + // use the merged area + e->xexpose.x = ex1; + e->xexpose.y = ey1; + e->xexpose.width = ex2 - ex1 + 1; + e->xexpose.height = ey2 - ey1 + 1; + + BlackboxWindow *win = (BlackboxWindow *) 0; +#ifdef ADD_BLOAT + Toolbar *tbar = (Toolbar *) 0; +#endif // ADD_BLOAT + + if ((win = searchWindow(e->xexpose.window))) + win->exposeEvent(&e->xexpose); +#ifdef ADD_BLOAT + else if ((tbar = searchToolbar(e->xexpose.window))) + tbar->exposeEvent(&e->xexpose); +#endif // ADD_BLOAT + + break; + } + + case KeyPress: { +#ifdef ADD_BLOAT + Toolbar *tbar = searchToolbar(e->xkey.window); + + if (tbar && tbar->isEditing()) + tbar->keyPressEvent(&e->xkey); +#endif // ADD_BLOAT + + break; + } + + case ColormapNotify: { + BScreen *screen = searchScreen(e->xcolormap.window); + + if (screen) + screen->setRootColormapInstalled((e->xcolormap.state == + ColormapInstalled) ? True : False); + + break; + } + + case FocusIn: { + if (e->xfocus.detail != NotifyNonlinear) { + /* + don't process FocusIns when: + 1. the new focus window isn't an ancestor or inferior of the old + focus window (NotifyNonlinear) + */ + break; + } + + BlackboxWindow *win = searchWindow(e->xfocus.window); + if (win) { + if (! win->isFocused()) + win->setFocusFlag(True); + + /* + set the event window to None. when the FocusOut event handler calls + this function recursively, it uses this as an indication that focus + has moved to a known window. + */ + e->xfocus.window = None; + } + + break; + } + + case FocusOut: { + if (e->xfocus.detail != NotifyNonlinear) { + /* + don't process FocusOuts when: + 2. the new focus window isn't an ancestor or inferior of the old + focus window (NotifyNonlinear) + */ + break; + } + + BlackboxWindow *win = searchWindow(e->xfocus.window); + if (win && win->isFocused()) { + /* + before we mark "win" as unfocused, we need to verify that focus is + going to a known location, is in a known location, or set focus + to a known location. + */ + + XEvent event; + // don't check the current focus if FocusOut was generated during a grab + bool check_focus = (e->xfocus.mode == NotifyNormal); + + /* + First, check if there is a pending FocusIn event waiting. if there + is, process it and determine if focus has moved to another window + (the FocusIn event handler sets the window in the event + structure to None to indicate this). + */ + if (XCheckTypedEvent(getXDisplay(), FocusIn, &event)) { + + process_event(&event); + if (event.xfocus.window == None) { + // focus has moved + check_focus = False; + } + } + + if (check_focus) { + /* + Second, we query the X server for the current input focus. + to make sure that we keep a consistent state. + */ + BlackboxWindow *focus; + Window w; + int revert; + XGetInputFocus(getXDisplay(), &w, &revert); + focus = searchWindow(w); + if (focus) { + /* + focus got from "win" to "focus" under some very strange + circumstances, and we need to make sure that the focus indication + is correct. + */ + setFocusedWindow(focus); + } else { + // we have no idea where focus went... so we set it to somewhere + setFocusedWindow(0); + } + } + } + + break; + } + + case ClientMessage: { + if (e->xclient.format == 32) { + if (e->xclient.message_type == getWMChangeStateAtom()) { + BlackboxWindow *win = searchWindow(e->xclient.window); + if (! win || ! win->validateClient()) return; + + if (e->xclient.data.l[0] == IconicState) + win->iconify(); + if (e->xclient.data.l[0] == NormalState) + win->deiconify(); + } else if(e->xclient.message_type == getBlackboxChangeWorkspaceAtom()) { + BScreen *screen = searchScreen(e->xclient.window); + unsigned int workspace = e->xclient.data.l[0]; + if (screen && workspace < screen->getWorkspaceCount()) + screen->changeWorkspaceID(workspace); + } else if (e->xclient.message_type == getBlackboxChangeWindowFocusAtom()) { + BlackboxWindow *win = searchWindow(e->xclient.window); + + if (win && win->isVisible() && win->setInputFocus()) + win->installColormap(True); + } else if (e->xclient.message_type == getBlackboxCycleWindowFocusAtom()) { + BScreen *screen = searchScreen(e->xclient.window); + + if (screen) { + if (! e->xclient.data.l[0]) + screen->prevFocus(); + else + screen->nextFocus(); + } + } else if (e->xclient.message_type == getBlackboxChangeAttributesAtom()) { + BlackboxWindow *win = searchWindow(e->xclient.window); + + if (win && win->validateClient()) { + BlackboxHints net; + net.flags = e->xclient.data.l[0]; + net.attrib = e->xclient.data.l[1]; + net.workspace = e->xclient.data.l[2]; + net.stack = e->xclient.data.l[3]; + net.decoration = e->xclient.data.l[4]; + + win->changeBlackboxHints(&net); + } + } + } + + break; + } + + case NoExpose: + case MapNotify: + break; // not handled, just ignore + + default: { +#ifdef DEBUG + fprintf (stderrr, "default %d %d %d %d %d\n", + e->type, getShapeEventBase(), getWindowsWMEventBase(), + WindowsWMControllerNotify, WindowsWMActivationNotify); +#endif +#ifdef SHAPE + if (e->type == getShapeEventBase()) { + XShapeEvent *shape_event = (XShapeEvent *) e; + BlackboxWindow *win = searchWindow(e->xany.window); + + if (win) + win->shapeEvent(shape_event); + } +#endif // SHAPE + + if (e->type == getWindowsWMEventBase() + WindowsWMControllerNotify) { + XWindowsWMNotifyEvent *windows_wm_event = (XWindowsWMNotifyEvent *) e; + BlackboxWindow *win = searchWindow(e->xany.window); + +#ifdef DEBUG + fprintf (stderr, "WindowsWMControllerNotify %08x\n", win); +#endif + if (win) + win->windowsWMControllerEvent(windows_wm_event); + } + if (e->type == getWindowsWMEventBase() + WindowsWMActivationNotify) { + XWindowsWMNotifyEvent *windows_wm_event = (XWindowsWMNotifyEvent *) e; + BlackboxWindow *win = searchWindow(e->xany.window); + //BScreen *screen = searchScreen(e->xclient.window); + + //printf ("WindowsWMActivationNotify\n"); + switch (windows_wm_event->arg) { + case WindowsWMIsActive: + //printf ("\tWindowsWMIsAcitve\n"); + break; + case WindowsWMIsInactive: + //printf ("\tWindowsWMIsInactive\n"); + if (win) + { + //printf ("\tungrab\n"); + win->ungrabButtons(); + win->grabButtons(); + } + setFocusedWindow(0); + break; + default: + printf ("\tUnknown WindowsWMEvent\n"); + } + } + } + } // switch +} + + +bool Blackbox::handleSignal(int sig) { + switch (sig) { + case SIGHUP: + reconfigure(); + break; + + case SIGUSR1: + reload_rc(); + break; + + case SIGUSR2: + //rereadMenu(); + break; + + case SIGPIPE: + case SIGSEGV: + case SIGFPE: + case SIGINT: + case SIGTERM: + shutdown(); + + default: + return False; + } + + return True; +} + + +void Blackbox::init_icccm(void) { + xa_wm_colormap_windows = + XInternAtom(getXDisplay(), "WM_COLORMAP_WINDOWS", False); + xa_wm_protocols = XInternAtom(getXDisplay(), "WM_PROTOCOLS", False); + xa_wm_state = XInternAtom(getXDisplay(), "WM_STATE", False); + xa_wm_change_state = XInternAtom(getXDisplay(), "WM_CHANGE_STATE", False); + xa_wm_delete_window = XInternAtom(getXDisplay(), "WM_DELETE_WINDOW", False); + xa_wm_take_focus = XInternAtom(getXDisplay(), "WM_TAKE_FOCUS", False); + motif_wm_hints = XInternAtom(getXDisplay(), "_MOTIF_WM_HINTS", False); + + blackbox_hints = XInternAtom(getXDisplay(), "_BLACKBOX_HINTS", False); + blackbox_attributes = + XInternAtom(getXDisplay(), "_BLACKBOX_ATTRIBUTES", False); + blackbox_change_attributes = + XInternAtom(getXDisplay(), "_BLACKBOX_CHANGE_ATTRIBUTES", False); + blackbox_structure_messages = + XInternAtom(getXDisplay(), "_BLACKBOX_STRUCTURE_MESSAGES", False); + blackbox_notify_startup = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_STARTUP", False); + blackbox_notify_window_add = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_WINDOW_ADD", False); + blackbox_notify_window_del = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_WINDOW_DEL", False); + blackbox_notify_current_workspace = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_CURRENT_WORKSPACE", False); + blackbox_notify_workspace_count = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_WORKSPACE_COUNT", False); + blackbox_notify_window_focus = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_WINDOW_FOCUS", False); + blackbox_notify_window_raise = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_WINDOW_RAISE", False); + blackbox_notify_window_lower = + XInternAtom(getXDisplay(), "_BLACKBOX_NOTIFY_WINDOW_LOWER", False); + blackbox_change_workspace = + XInternAtom(getXDisplay(), "_BLACKBOX_CHANGE_WORKSPACE", False); + blackbox_change_window_focus = + XInternAtom(getXDisplay(), "_BLACKBOX_CHANGE_WINDOW_FOCUS", False); + blackbox_cycle_window_focus = + XInternAtom(getXDisplay(), "_BLACKBOX_CYCLE_WINDOW_FOCUS", False); + + windowswm_raise_on_click = + XInternAtom(getXDisplay(), WINDOWSWM_RAISE_ON_CLICK, False); + windowswm_mouse_activate = + XInternAtom(getXDisplay(), WINDOWSWM_MOUSE_ACTIVATE, False); + windowswm_client_window = + XInternAtom(getXDisplay(), WINDOWSWM_CLIENT_WINDOW, False); + +#ifdef NEWWMSPEC + net_supported = XInternAtom(getXDisplay(), "_NET_SUPPORTED", False); + net_client_list = XInternAtom(getXDisplay(), "_NET_CLIENT_LIST", False); + net_client_list_stacking = + XInternAtom(getXDisplay(), "_NET_CLIENT_LIST_STACKING", False); + net_number_of_desktops = + XInternAtom(getXDisplay(), "_NET_NUMBER_OF_DESKTOPS", False); + net_desktop_geometry = + XInternAtom(getXDisplay(), "_NET_DESKTOP_GEOMETRY", False); + net_desktop_viewport = + XInternAtom(getXDisplay(), "_NET_DESKTOP_VIEWPORT", False); + net_current_desktop = + XInternAtom(getXDisplay(), "_NET_CURRENT_DESKTOP", False); + net_desktop_names = XInternAtom(getXDisplay(), "_NET_DESKTOP_NAMES", False); + net_active_window = XInternAtom(getXDisplay(), "_NET_ACTIVE_WINDOW", False); + net_workarea = XInternAtom(getXDisplay(), "_NET_WORKAREA", False); + net_supporting_wm_check = + XInternAtom(getXDisplay(), "_NET_SUPPORTING_WM_CHECK", False); + net_virtual_roots = XInternAtom(getXDisplay(), "_NET_VIRTUAL_ROOTS", False); + net_close_window = XInternAtom(getXDisplay(), "_NET_CLOSE_WINDOW", False); + net_wm_moveresize = XInternAtom(getXDisplay(), "_NET_WM_MOVERESIZE", False); + net_properties = XInternAtom(getXDisplay(), "_NET_PROPERTIES", False); + net_wm_name = XInternAtom(getXDisplay(), "_NET_WM_NAME", False); + net_wm_desktop = XInternAtom(getXDisplay(), "_NET_WM_DESKTOP", False); + net_wm_window_type = + XInternAtom(getXDisplay(), "_NET_WM_WINDOW_TYPE", False); + net_wm_state = XInternAtom(getXDisplay(), "_NET_WM_STATE", False); + net_wm_strut = XInternAtom(getXDisplay(), "_NET_WM_STRUT", False); + net_wm_icon_geometry = + XInternAtom(getXDisplay(), "_NET_WM_ICON_GEOMETRY", False); + net_wm_icon = XInternAtom(getXDisplay(), "_NET_WM_ICON", False); + net_wm_pid = XInternAtom(getXDisplay(), "_NET_WM_PID", False); + net_wm_handled_icons = + XInternAtom(getXDisplay(), "_NET_WM_HANDLED_ICONS", False); + net_wm_ping = XInternAtom(getXDisplay(), "_NET_WM_PING", False); +#endif // NEWWMSPEC + +#ifdef HAVE_GETPID + blackbox_pid = XInternAtom(getXDisplay(), "_BLACKBOX_PID", False); +#endif // HAVE_GETPID +} + + +bool Blackbox::validateWindow(Window window) { + XEvent event; + if (XCheckTypedWindowEvent(getXDisplay(), window, DestroyNotify, &event)) { + XPutBackEvent(getXDisplay(), &event); + + return False; + } + + return True; +} + + +BScreen *Blackbox::searchScreen(Window window) { + ScreenList::iterator it = screenList.begin(); + + for (; it != screenList.end(); ++it) { + BScreen *s = *it; + if (s->getRootWindow() == window) + return s; + } + + return (BScreen *) 0; +} + + +BlackboxWindow *Blackbox::searchWindow(Window window) { + WindowLookup::iterator it = windowSearchList.find(window); + if (it != windowSearchList.end()) + return it->second; + + return (BlackboxWindow*) 0; +} + + +BWindowGroup *Blackbox::searchGroup(Window window) { + GroupLookup::iterator it = groupSearchList.find(window); + if (it != groupSearchList.end()) + return it->second; + + return (BWindowGroup *) 0; +} + +#ifdef ADD_BLOAT +Toolbar *Blackbox::searchToolbar(Window window) { + ToolbarLookup::iterator it = toolbarSearchList.find(window); + if (it != toolbarSearchList.end()) + return it->second; + + return (Toolbar*) 0; +} + + +Slit *Blackbox::searchSlit(Window window) { + SlitLookup::iterator it = slitSearchList.find(window); + if (it != slitSearchList.end()) + return it->second; + + return (Slit*) 0; +} +#endif // ADD_BLOAT + + +void Blackbox::saveWindowSearch(Window window, BlackboxWindow *data) { + windowSearchList.insert(WindowLookupPair(window, data)); +} + + +void Blackbox::saveGroupSearch(Window window, BWindowGroup *data) { + groupSearchList.insert(GroupLookupPair(window, data)); +} + +#ifdef ADD_BLOAT +void Blackbox::saveToolbarSearch(Window window, Toolbar *data) { + toolbarSearchList.insert(ToolbarLookupPair(window, data)); +} + + +void Blackbox::saveSlitSearch(Window window, Slit *data) { + slitSearchList.insert(SlitLookupPair(window, data)); +} +#endif // ADD_BLOAT + + +void Blackbox::removeWindowSearch(Window window) { + windowSearchList.erase(window); +} + + +void Blackbox::removeGroupSearch(Window window) { + groupSearchList.erase(window); +} + + +#ifdef ADD_BLOAT +void Blackbox::removeToolbarSearch(Window window) { + toolbarSearchList.erase(window); +} + + +void Blackbox::removeSlitSearch(Window window) { + slitSearchList.erase(window); +} +#endif // ADD_BLOAT + + +void Blackbox::restart(const char *prog) { + shutdown(); + + if (prog) { + putenv(const_cast<char *>(screenList.front()->displayString().c_str())); + execlp(prog, prog, NULL); + perror(prog); + } + + // fall back in case the above execlp doesn't work + execvp(argv[0], argv); + string name = basename(argv[0]); + execvp(name.c_str(), argv); +} + + +void Blackbox::shutdown(void) { + BaseDisplay::shutdown(); + + XSetInputFocus(getXDisplay(), PointerRoot, None, CurrentTime); + + std::for_each(screenList.begin(), screenList.end(), + std::mem_fun(&BScreen::shutdown)); + + XSync(getXDisplay(), False); + + save_rc(); +} + + +void Blackbox::save_rc(void) { +} + + +void Blackbox::load_rc(void) { + resource.colors_per_channel = 4; + resource.double_click_interval = 250; + resource.auto_raise_delay.tv_usec = 400; + resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec / 1000; + resource.auto_raise_delay.tv_usec -= + (resource.auto_raise_delay.tv_sec * 1000); + resource.auto_raise_delay.tv_usec *= 1000; + resource.cache_life = 5l; + resource.cache_life *= 60000; + resource.cache_max = 200; +} + + +void Blackbox::load_rc(BScreen *screen) { + screen->saveFullMax(False); + screen->saveFocusNew(False); + screen->saveFocusLast(False); + screen->saveAllowScrollLock(False); + screen->saveRowPlacementDirection(BScreen::LeftRight); + screen->saveColPlacementDirection(BScreen::TopBottom); + screen->saveWorkspaces(1); + screen->saveSloppyFocus(True); + screen->saveAutoRaise(False); + screen->saveClickRaise(False); + screen->savePlacementPolicy(BScreen::RowSmartPlacement); + + screen->saveEdgeSnapThreshold(0); + screen->saveImageDither(True); + screen->saveOpaqueMove(False); +} + + +void Blackbox::reload_rc(void) { + load_rc(); + reconfigure(); +} + + +void Blackbox::reconfigure(void) { + reconfigure_wait = True; + + if (! timer->isTiming()) timer->start(); +} + + +void Blackbox::real_reconfigure(void) { + gcCache()->purge(); + + std::for_each(screenList.begin(), screenList.end(), + std::mem_fun(&BScreen::reconfigure)); +} + + +void Blackbox::timeout(void) { + if (reconfigure_wait) + real_reconfigure(); + + reconfigure_wait = False; +} + + +void Blackbox::setFocusedWindow(BlackboxWindow *win) { + if (focused_window && focused_window == win) // nothing to do + return; + + BScreen *old_screen = 0; + + if (focused_window) { + focused_window->setFocusFlag(False); + old_screen = focused_window->getScreen(); + } + + if (win && ! win->isIconic()) { + // the active screen is the one with the last focused window... + // this will keep focus on this screen no matter where the mouse goes, + // so multihead keybindings will continue to work on that screen until the + // user focuses a window on a different screen. + active_screen = win->getScreen(); + focused_window = win; + } else { + focused_window = 0; +#ifdef ADD_BLOAT + if (! old_screen) { + if (active_screen) { + // set input focus to the toolbar of the screen with mouse + XSetInputFocus(getXDisplay(), + active_screen->getToolbar()->getWindowID(), + RevertToPointerRoot, CurrentTime); + } else { + // set input focus to the toolbar of the first managed screen + XSetInputFocus(getXDisplay(), + screenList.front()->getToolbar()->getWindowID(), + RevertToPointerRoot, CurrentTime); + } + } else { + // set input focus to the toolbar of the last screen + XSetInputFocus(getXDisplay(), old_screen->getToolbar()->getWindowID(), + RevertToPointerRoot, CurrentTime); + } +#endif // ADD_BLOAT + } + +#ifdef ADD_BLOAT + if (active_screen && active_screen->isScreenManaged()) { + active_screen->getToolbar()->redrawWindowLabel(True); + active_screen->updateNetizenWindowFocus(); + } + + if (old_screen && old_screen != active_screen) { + old_screen->getToolbar()->redrawWindowLabel(True); + old_screen->updateNetizenWindowFocus(); + } +#endif // ADD_BLOAT +} + +#ifdef ENABLE_KEYBINDINGS +void Blackbox::setKeys() { + if (chpid != 0){ + kill(chpid,SIGTERM); + chpid = 0; + } + + if (enableKeyBindings()) { + chpid = fork(); + + if (chpid < 0){ + //cerr << "Error: Can't Fork Keybindings" << endl; + } + + if (chpid == 0){ + extern char **environ; + + char *args[]= {"sh", "-c", (char*)getkeycmd(), 0}; + execve("/bin/sh", args, environ); + exit(0); + } + } +} +#endif // ENABLE_KEYBINDINGS diff --git a/src/blackbox.hh b/src/blackbox.hh new file mode 100644 index 0000000..299fa02 --- /dev/null +++ b/src/blackbox.hh @@ -0,0 +1,421 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// blackbox.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __blackbox_hh +#define __blackbox_hh + +extern "C" { +#include <X11/Xlib.h> +#include <X11/Xresource.h> +#include <X11/extensions/windowswm.h> +#include <X11/extensions/windowswmstr.h> + +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + +#ifdef TIME_WITH_SYS_TIME +# include <sys/time.h> +# include <time.h> +#else // !TIME_WITH_SYS_TIME +# ifdef HAVE_SYS_TIME_H +# include <sys/time.h> +# else // !HAVE_SYS_TIME_H +# include <time.h> +# endif // HAVE_SYS_TIME_H +#endif // TIME_WITH_SYS_TIME + +#include <signal.h> +} + +#include <list> +#include <map> +#include <string> + +#include "i18n.hh" +#include "BaseDisplay.hh" +#include "Timer.hh" + +#define AttribShaded (1l << 0) +#define AttribMaxHoriz (1l << 1) +#define AttribMaxVert (1l << 2) +#define AttribOmnipresent (1l << 3) +#define AttribWorkspace (1l << 4) +#define AttribStack (1l << 5) +#define AttribDecoration (1l << 6) + +#define StackTop (0) +#define StackNormal (1) +#define StackBottom (2) + +#define DecorNone (0) +#define DecorNormal (1) +#define DecorTiny (2) +#define DecorTool (3) + +struct BlackboxHints { + unsigned long flags, attrib, workspace, stack, decoration; +}; + +struct BlackboxAttributes { + unsigned long flags, attrib, workspace, stack, decoration; + int premax_x, premax_y; + unsigned int premax_w, premax_h; +}; + +#define PropBlackboxHintsElements (5) +#define PropBlackboxAttributesElements (9) + + +//forward declaration +class BScreen; +class Blackbox; +class BlackboxWindow; +class BWindowGroup; + +#ifdef ADD_BLOAT +class Toolbar; +class Slit; +#endif // ADD_BLOAT + +extern I18n i18n; + +class Blackbox : public BaseDisplay, public TimeoutHandler { +private: + struct BCursor { + Cursor session, move, ll_angle, lr_angle; + }; + BCursor cursor; + + struct BResource { + Time double_click_interval; + + int colors_per_channel; + timeval auto_raise_delay; + unsigned long cache_life, cache_max; +#ifdef ENABLE_KEYBINDINGS + bool enable_Key_Bindings; + std::string key_cmd; +#endif // ENABLE_KEYBINDINGS + } resource; + + typedef std::map<Window, BlackboxWindow*> WindowLookup; + typedef WindowLookup::value_type WindowLookupPair; + WindowLookup windowSearchList; + + typedef std::map<Window, BWindowGroup*> GroupLookup; + typedef GroupLookup::value_type GroupLookupPair; + GroupLookup groupSearchList; + +#ifdef ADD_BLOAT + typedef std::map<Window, Toolbar*> ToolbarLookup; + typedef ToolbarLookup::value_type ToolbarLookupPair; + ToolbarLookup toolbarSearchList; + + typedef std::map<Window, Slit*> SlitLookup; + typedef SlitLookup::value_type SlitLookupPair; + SlitLookup slitSearchList; +#endif // ADD_BLOAT + + typedef std::list<BScreen*> ScreenList; + ScreenList screenList; + + BScreen *active_screen; + BlackboxWindow *focused_window; + BTimer *timer; + + bool no_focus, reconfigure_wait; + Time last_time; + char **argv; + + Atom xa_wm_colormap_windows, xa_wm_protocols, xa_wm_state, + xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state, + motif_wm_hints; + + // NETAttributes + Atom blackbox_attributes, blackbox_change_attributes, blackbox_hints; +#ifdef HAVE_GETPID + Atom blackbox_pid; +#endif // HAVE_GETPID + + // NETStructureMessages + Atom blackbox_structure_messages, blackbox_notify_startup, + blackbox_notify_window_add, blackbox_notify_window_del, + blackbox_notify_window_focus, blackbox_notify_current_workspace, + blackbox_notify_workspace_count, blackbox_notify_window_raise, + blackbox_notify_window_lower; + + // message_types for client -> wm messages + Atom blackbox_change_workspace, blackbox_change_window_focus, + blackbox_cycle_window_focus; + + // property for WindowsWM + Atom windowswm_raise_on_click, windowswm_mouse_activate, + windowswm_client_window; + +#ifdef NEWWMSPEC + // root window properties + Atom net_supported, net_client_list, net_client_list_stacking, + net_number_of_desktops, net_desktop_geometry, net_desktop_viewport, + net_current_desktop, net_desktop_names, net_active_window, net_workarea, + net_supporting_wm_check, net_virtual_roots; + + // root window messages + Atom net_close_window, net_wm_moveresize; + + // application window properties + Atom net_properties, net_wm_name, net_wm_desktop, net_wm_window_type, + net_wm_state, net_wm_strut, net_wm_icon_geometry, net_wm_icon, net_wm_pid, + net_wm_handled_icons; + + // application protocols + Atom net_wm_ping; +#endif // NEWWMSPEC + + Blackbox(const Blackbox&); + Blackbox& operator=(const Blackbox&); + + void load_rc(void); + void save_rc(void); + void reload_rc(void); + void real_reconfigure(void); + + void init_icccm(void); + + virtual void process_event(XEvent *e); + + +public: + Blackbox(char **m_argv, char *dpy_name = 0, char *rc = 0); + virtual ~Blackbox(void); + + BWindowGroup *searchGroup(Window window); + BlackboxWindow *searchWindow(Window window); + BScreen *searchScreen(Window window); + +#ifdef ADD_BLOAT + Toolbar *searchToolbar(Window); + Slit *searchSlit(Window); +#endif // ADD_BLOAT + + void saveWindowSearch(Window window, BlackboxWindow *data); + void saveGroupSearch(Window window, BWindowGroup *data); +#ifdef ADD_BLOAT + void saveToolbarSearch(Window window, Toolbar *data); + void saveSlitSearch(Window window, Slit *data); +#endif // ADD_BLOAT + void removeWindowSearch(Window window); + void removeGroupSearch(Window window); +#ifdef ADD_BLOAT + void removeToolbarSearch(Window window); + void removeSlitSearch(Window window); +#endif // ADD_BLOAT + +#ifdef ENABLE_KEYBINDINGS + inline bool enableKeyBindings(void) const { return resource.enable_Key_Bindings;}; + inline void saveEnableKeyBindings(bool e) { resource.enable_Key_Bindings = e;}; + inline const char *getkeycmd(void) const { return resource.key_cmd.c_str(); } + + void setKeys(); + + int pid; + int chpid; +#endif // ENABLE_KEYBINDINGS + + inline BlackboxWindow *getFocusedWindow(void) { return focused_window; } + + inline const Time &getDoubleClickInterval(void) const + { return resource.double_click_interval; } + inline const Time &getLastTime(void) const { return last_time; } + + inline int getColorsPerChannel(void) const + { return resource.colors_per_channel; } + + inline const timeval &getAutoRaiseDelay(void) const + { return resource.auto_raise_delay; } + + inline unsigned long getCacheLife(void) const + { return resource.cache_life; } + inline unsigned long getCacheMax(void) const + { return resource.cache_max; } + + inline void setNoFocus(bool f) { no_focus = f; } + + inline Cursor getSessionCursor(void) const + { return cursor.session; } + inline Cursor getMoveCursor(void) const + { return cursor.move; } + inline Cursor getLowerLeftAngleCursor(void) const + { return cursor.ll_angle; } + inline Cursor getLowerRightAngleCursor(void) const + { return cursor.lr_angle; } + + void setFocusedWindow(BlackboxWindow *w); + void shutdown(void); + void load_rc(BScreen *screen); + void restart(const char *prog = 0); + void reconfigure(void); + + bool validateWindow(Window window); + + virtual bool handleSignal(int sig); + + virtual void timeout(void); + +#ifdef HAVE_GETPID + inline Atom getBlackboxPidAtom(void) const { return blackbox_pid; } +#endif // HAVE_GETPID + + inline Atom getWMChangeStateAtom(void) const + { return xa_wm_change_state; } + inline Atom getWMStateAtom(void) const + { return xa_wm_state; } + inline Atom getWMDeleteAtom(void) const + { return xa_wm_delete_window; } + inline Atom getWMProtocolsAtom(void) const + { return xa_wm_protocols; } + inline Atom getWMTakeFocusAtom(void) const + { return xa_wm_take_focus; } + inline Atom getWMColormapAtom(void) const + { return xa_wm_colormap_windows; } + inline Atom getMotifWMHintsAtom(void) const + { return motif_wm_hints; } + + // this atom is for normal app->WM hints about decorations, stacking, + // starting workspace etc... + inline Atom getBlackboxHintsAtom(void) const + { return blackbox_hints;} + + // these atoms are for normal app->WM interaction beyond the scope of the + // ICCCM... + inline Atom getBlackboxAttributesAtom(void) const + { return blackbox_attributes; } + inline Atom getBlackboxChangeAttributesAtom(void) const + { return blackbox_change_attributes; } + + // these atoms are for window->WM interaction, with more control and + // information on window "structure"... common examples are + // notifying apps when windows are raised/lowered... when the user changes + // workspaces... i.e. "pager talk" + inline Atom getBlackboxStructureMessagesAtom(void) const + { return blackbox_structure_messages; } + + // *Notify* portions of the NETStructureMessages protocol + inline Atom getBlackboxNotifyStartupAtom(void) const + { return blackbox_notify_startup; } + inline Atom getBlackboxNotifyWindowAddAtom(void) const + { return blackbox_notify_window_add; } + inline Atom getBlackboxNotifyWindowDelAtom(void) const + { return blackbox_notify_window_del; } + inline Atom getBlackboxNotifyWindowFocusAtom(void) const + { return blackbox_notify_window_focus; } + inline Atom getBlackboxNotifyCurrentWorkspaceAtom(void) const + { return blackbox_notify_current_workspace; } + inline Atom getBlackboxNotifyWorkspaceCountAtom(void) const + { return blackbox_notify_workspace_count; } + inline Atom getBlackboxNotifyWindowRaiseAtom(void) const + { return blackbox_notify_window_raise; } + inline Atom getBlackboxNotifyWindowLowerAtom(void) const + { return blackbox_notify_window_lower; } + + // atoms to change that request changes to the desktop environment during + // runtime... these messages can be sent by any client... as the sending + // client window id is not included in the ClientMessage event... + inline Atom getBlackboxChangeWorkspaceAtom(void) const + { return blackbox_change_workspace; } + inline Atom getBlackboxChangeWindowFocusAtom(void) const + { return blackbox_change_window_focus; } + inline Atom getBlackboxCycleWindowFocusAtom(void) const + { return blackbox_cycle_window_focus; } + + inline Atom WindowsWMRaiseOnClick(void) const + { return windowswm_raise_on_click; } + inline Atom WindowsWMMouseActivate(void) const + { return windowswm_mouse_activate; } + /*inline */Atom WindowsWMClientWindow(void) const + { return windowswm_client_window; } + +#ifdef NEWWMSPEC + // root window properties + inline Atom getNETSupportedAtom(void) const + { return net_supported; } + inline Atom getNETClientListAtom(void) const + { return net_client_list; } + inline Atom getNETClientListStackingAtom(void) const + { return net_client_list_stacking; } + inline Atom getNETNumberOfDesktopsAtom(void) const + { return net_number_of_desktops; } + inline Atom getNETDesktopGeometryAtom(void) const + { return net_desktop_geometry; } + inline Atom getNETDesktopViewportAtom(void) const + { return net_desktop_viewport; } + inline Atom getNETCurrentDesktopAtom(void) const + { return net_current_desktop; } + inline Atom getNETDesktopNamesAtom(void) const + { return net_desktop_names; } + inline Atom getNETActiveWindowAtom(void) const + { return net_active_window; } + inline Atom getNETWorkareaAtom(void) const + { return net_workarea; } + inline Atom getNETSupportingWMCheckAtom(void) const + { return net_supporting_wm_check; } + inline Atom getNETVirtualRootsAtom(void) const + { return net_virtual_roots; } + + // root window messages + inline Atom getNETCloseWindowAtom(void) const + { return net_close_window; } + inline Atom getNETWMMoveResizeAtom(void) const + { return net_wm_moveresize; } + + // application window properties + inline Atom getNETPropertiesAtom(void) const + { return net_properties; } + inline Atom getNETWMNameAtom(void) const + { return net_wm_name; } + inline Atom getNETWMDesktopAtom(void) const + { return net_wm_desktop; } + inline Atom getNETWMWindowTypeAtom(void) const + { return net_wm_window_type; } + inline Atom getNETWMStateAtom(void) const + { return net_wm_state; } + inline Atom getNETWMStrutAtom(void) const + { return net_wm_strut; } + inline Atom getNETWMIconGeometryAtom(void) const + { return net_wm_icon_geometry; } + inline Atom getNETWMIconAtom(void) const + { return net_wm_icon; } + inline Atom getNETWMPidAtom(void) const + { return net_wm_pid; } + inline Atom getNETWMHandledIconsAtom(void) const + { return net_wm_handled_icons; } + + // application protocols + inline Atom getNETWMPingAtom(void) const + { return net_wm_ping; } +#endif // NEWWMSPEC +}; + + +#endif // __blackbox_hh diff --git a/src/i18n.cc b/src/i18n.cc new file mode 100644 index 0000000..66eab9e --- /dev/null +++ b/src/i18n.cc @@ -0,0 +1,139 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- +// i18n.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif // HAVE_STDLIB_H + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H + +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + +#ifdef HAVE_LOCALE_H +# include <locale.h> +#endif // HAVE_LOCALE_H + +#include <X11/Xlocale.h> +#include <X11/Xlib.h> +} + +#include <string> +using std::string; + +#include "i18n.hh" + + +//// the rest of bb source uses True and False from X, so we continue that +//#define True true +//#define False false + +I18n::I18n(void) { + printf("I18n::init(void)\n"); + initialized = true; + //mb = False; + mb = True; +#ifdef HAVE_SETLOCALE + locale = _Xsetlocale(LC_ALL, ""); + if (! locale) { + fprintf(stderr, "failed to set locale, reverting to \"C\"\n"); +#endif // HAVE_SETLOCALE + locale = "C"; +#ifdef HAVE_SETLOCALE + } else { + fprintf(stderr, "set locale %d %s\n", MB_CUR_MAX, locale); + // MB_CUR_MAX returns the size of a char in the current locale + if (MB_CUR_MAX > 1) + mb = True; + // truncate any encoding off the end of the locale + char *l = strchr(locale, '@'); + if (l) *l = '\0'; + l = strchr(locale, '.'); + if (l) *l = '\0'; + + /* See if X supports the current locale */ + if (!XSupportsLocale()) + { + fprintf(stderr, "Locale not supported by X\n"); + } + } + +#ifdef HAVE_CATOPEN + catalog_fd = (nl_catd) -1; +#endif +#endif // HAVE_SETLOCALE +} + +bool I18n::multibyte(void) { + return mb; +} + +//Lazy init. +void I18n::init(void) { +} + + +I18n::~I18n(void) { +#if defined(NLS) && defined(HAVE_CATCLOSE) + if (catalog_fd != (nl_catd) -1) + catclose(catalog_fd); +#endif // HAVE_CATCLOSE +} + + +void I18n::openCatalog(const char *catalog) { +#if defined(NLS) && defined(HAVE_CATOPEN) + string catalog_filename = LOCALEPATH; + catalog_filename += '/'; + catalog_filename += locale; + catalog_filename += '/'; + catalog_filename += catalog; + +# ifdef MCLoadBySet + catalog_fd = catopen(catalog_filename.c_str(), MCLoadBySet); +# else // !MCLoadBySet + catalog_fd = catopen(catalog_filename.c_str(), NL_CAT_LOCALE); +# endif // MCLoadBySet + + if (catalog_fd == (nl_catd) -1) + fprintf(stderr, "failed to open catalog, using default messages\n"); +#endif // HAVE_CATOPEN +} + +const char* I18n::operator()(int set, int msg, const char *msgString) const { +#if defined(NLS) && defined(HAVE_CATGETS) + if (catalog_fd != (nl_catd) -1) + return catgets(catalog_fd, set, msg, msgString); + else +#endif + return msgString; +} diff --git a/src/i18n.hh b/src/i18n.hh new file mode 100644 index 0000000..11ce22a --- /dev/null +++ b/src/i18n.hh @@ -0,0 +1,66 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// i18n.hh for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#ifndef __i18n_h +#define __i18n_h + +// always include this just for the #defines +// this keeps the calls to i18n->getMessage clean, otherwise we have to +// add ifdefs to every call to getMessage +#include "../nls/blackbox-nls.hh" + +extern "C" { +#ifdef HAVE_LOCALE_H +# include <locale.h> +#endif // HAVE_LOCALE_H + +#ifdef HAVE_NL_TYPES_H +# include <nl_types.h> +#endif // HAVE_NL_TYPES_H +} + + +class I18n { +private: + char *locale; + bool mb; +#ifdef HAVE_NL_TYPES_H + nl_catd catalog_fd; +#endif + bool initialized; + void init(void); + +public: + I18n(void); + ~I18n(void); + + bool multibyte(void); + + const char* operator()(int set, int msg, const char *msgString) const; + void openCatalog(const char *catalog); +}; + +extern I18n i18n; + +#endif // __i18n_h diff --git a/src/main.cc b/src/main.cc new file mode 100644 index 0000000..4d30274 --- /dev/null +++ b/src/main.cc @@ -0,0 +1,178 @@ +// -*- mode: C++; indent-tabs-mode: nil; -*- +// main.cc for Blackbox - an X11 Window manager +// Copyright (c) 2003 Kensuke Matsuzaki <zakki@peppermint.jp> +// Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry <shaleh@debian.org> +// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +#include "../version.h" + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +extern "C" { +#ifdef HAVE_STDIO_H +# include <stdio.h> +#endif // HAVE_STDIO_H + +#ifdef HAVE_STDLIB_H +# include <stdlib.h> +#endif // HAVE_STDLIB_H + +#ifdef HAVE_STRING_H +# include <string.h> +#endif // HAVE_STRING_H + +#ifdef HAVE_UNISTD_H +#include <sys/types.h> +#endif // HAVE_UNISTD_H + +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif // HAVE_SYS_PARAM_H +} + +#include <string> +using std::string; + +#include "i18n.hh" +#include "blackbox.hh" +#include <X11/Xlocale.h> + + +I18n i18n; // initialized in main // I want to control construct timing. + +static void showHelp(int exitval) { + // print program usage and command line options + printf(i18n(mainSet, mainUsage, + "XWinWM %s : (c) 2003 Kensuke Matsuzaki\n" + "\t\t\t 2002 Larry Owen\n" + "\t\t\t 2001 - 2002 Sean 'Shaleh' Perry\n" + "\t\t\t 1997 - 2000 Brad Hughes\n" + " -display <string>\t\tuse display connection.\n" + " -version\t\t\tdisplay version and exit.\n" + " -help\t\t\t\tdisplay this help text and exit.\n\n"), + __blackbox_version); + + // some people have requested that we print out compile options + // as well + printf(i18n(mainSet, mainCompileOptions, + "Compile time options:\n" + " Debugging:\t\t\t%s\n" + " Shape:\t\t\t%s\n" + " 8bpp Ordered Dithering:\t%s\n\n"), +#ifdef DEBUG + i18n(CommonSet, CommonYes, "yes"), +#else // !DEBUG + i18n(CommonSet, CommonNo, "no"), +#endif // DEBUG + +#ifdef SHAPE + i18n(CommonSet, CommonYes, "yes"), +#else // !SHAPE + i18n(CommonSet, CommonNo, "no"), +#endif // SHAPE + +#ifdef ORDEREDPSEUDO + i18n(CommonSet, CommonYes, "yes") +#else // !ORDEREDPSEUDO + i18n(CommonSet, CommonNo, "no") +#endif // ORDEREDPSEUDO + ); + + ::exit(exitval); +} + +int main(int argc, char **argv) { + char *session_display = (char *) 0; + char *rc_file = (char *) 0; + + i18n.openCatalog("blackbox.cat"); + + for (int i = 1; i < argc; ++i) { + if (! strcmp(argv[i], "-rc")) { + // look for alternative rc file to use + + if ((++i) >= argc) { + fprintf(stderr, + i18n(mainSet, mainRCRequiresArg, + "error: '-rc' requires and argument\n")); + + ::exit(1); + } + + rc_file = argv[i]; + } else if (! strcmp(argv[i], "-display")) { + // check for -display option... to run on a display other than the one + // set by the environment variable DISPLAY + + if ((++i) >= argc) { + fprintf(stderr, + i18n(mainSet, mainDISPLAYRequiresArg, + "error: '-display' requires an argument\n")); + + ::exit(1); + } + + session_display = argv[i]; + string dtmp = "DISPLAY="; + dtmp += session_display; + + if (putenv(const_cast<char*>(dtmp.c_str()))) { + fprintf(stderr, i18n(mainSet, mainWarnDisplaySet, + "warning: couldn't set environment variable 'DISPLAY'\n")); + perror("putenv()"); + } + } else if (! strcmp(argv[i], "-version")) { + // print current version string + printf("XWinWM %s : (c) 2003 Kensuke Matsuzaki\n" + "\t\t\t 2002 Larry Owen\n" + "\t\t\t 2001 - 2002 Sean 'Shaleh' Perry\n" + "\t\t\t 1997 - 2000 Brad Hughes\n", + __blackbox_version); + + ::exit(0); + } else if (! strcmp(argv[i], "-help")) { + showHelp(0); + } else { // invalid command line option + showHelp(-1); + } + } + +#ifdef __EMX__ + _chdir2(getenv("X11ROOT")); +#endif // __EMX__ + + char *locale = _Xsetlocale(LC_ALL, ""); + if (! locale) { + fprintf(stderr, "failed to set locale, reverting to \"C\"\n"); + } else { + if (!XSupportsLocale()) + { + fprintf(stderr, "Locale not supported by X\n"); + } + } + + Blackbox blackbox(argv, session_display, rc_file); + blackbox.eventLoop(); + + return(0); +} |