pax_global_header00006660000000000000000000000064132704034240014511gustar00rootroot0000000000000052 comment=1fb27513a2c66fdd6e19efc50a440e41a6d991d2 ddccontrol-0.4.4/000077500000000000000000000000001327040342400136515ustar00rootroot00000000000000ddccontrol-0.4.4/.gitignore000066400000000000000000000011511327040342400156370ustar00rootroot00000000000000*.la *.lo *.o .deps/ .libs/ /ABOUT-NLS /INSTALL /aclocal.m4 /ar-lib /autom4te.cache/ /compile /config.guess /config.log /config.rpath /config.status /config.sub /configure /doc/html/ /depcomp /install-sh /intltool-extract.in /intltool-merge.in /intltool-update.in /libtool /ltmain.sh /m4/ /missing /po/*.gmo /po/.intltool-merge-cache /po/Makefile.in.in /po/Makevars.template /po/POTFILES /po/Rules-quot /po/stamp-it /src/config.h /src/config.h.in /src/ddccontrol/ddccontrol /src/ddcpci/ddcpci /src/gddccontrol/gddccontrol /src/gddccontrol/gddccontrol.desktop /src/lib/ddccontrol.pc /src/stamp-h1 Makefile Makefile.in ddccontrol-0.4.4/.travis.yml000066400000000000000000000005471327040342400157700ustar00rootroot00000000000000language: cpp dist: trusty sudo: false addons: apt: packages: - intltool - autoconf - autopoint - libxml2-dev - pciutils-dev - libgtk2.0-dev env: matrix: - - CFLAGS='CFLAGS=-O0 -g' - CFLAGS='CFLAGS=-O2' compiler: - clang - gcc script: - ./autogen.sh - ./configure "${CFLAGS}" - make -j4 ddccontrol-0.4.4/AUTHORS000066400000000000000000000002731327040342400147230ustar00rootroot00000000000000vdovikin:Oleg I. Vdovikin nboichat:Nicolas Boichat cs123:Christian Schilling el_cubano:Roberto C. Sanchez ddccontrol-0.4.4/CHANGELOG.md000066400000000000000000000012341327040342400154620ustar00rootroot00000000000000# Changelog The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [0.4.4] - 2018-04-26 ### Added - changelog in *Keep a Changelog* style ### Changed - show warning message without blinking - install binary ddcpci to pkglibexec directory (it's not run by users) - fixed build with custom CFLAGS - fixed configure.ac to use `$PKGCONFIG` set by `PKG_PROG_PKG_CONFIG` macro ## 0.4.3 - 2017-12-28 ### Removed - original changelog written in GNU style, because it wasn't maintained [0.4.4]: https://github.com/ddccontrol/ddccontrol/compare/0.4.3...0.4.4 ddccontrol-0.4.4/COPYING000066400000000000000000000432541327040342400147140ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 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 Lesser 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. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 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) year 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. , 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 Lesser General Public License instead of this License. ddccontrol-0.4.4/CheckList000066400000000000000000000027251327040342400154530ustar00rootroot00000000000000Release Check List (Nicolas Boichat) - in po/: - make update-po - poedit fr.po - svn commit - update NEWS - update version in configure.ac - update version in doc/main.xml - make clean all # Test with other distributions linux headers # Fedora: glibc-kernheaders package - CFLAGS="-I/home/nicolas/dev/ddcci/headers/FC4/include" ./configure --disable-gnome --disable-gnome-applet && make clean all # Debian: http://packages.debian.org/testing/devel/linux-kernel-headers - CFLAGS="-I/home/nicolas/dev/ddcci/headers/Debian/include" ./configure --disable-gnome --disable-gnome-applet && make clean all # Set back default config - ./configure --enable-maintainter-mode --enable-doc && make - make distdir - in ddccontrol-0.x/: - ./configure - make - make install - test at least /usr/local/bin/gddccontrol - cd .. - in doc/: make publish publish-release - ./commit.sh "Prepare release 0.xx" - svn cp https://ddccontrol.svn.sourceforge.net/svnroot/ddccontrol/trunk/ddccontrol https://ddccontrol.svn.sourceforge.net/svnroot/ddccontrol/tags/ddccontrol-0.xx -m "Tag release 0.xx" - make dist-bzip2 - ftp upload.sourceforge.net: - cd incoming - bin - put ddccontrol-0.x.tar.bz2 - add file to SF - update website : - Update website.xml news - Update layout.xml - Add old doc to archives - ./commit.sh - Send a message to the lists - update FreshMeat infos - update Gentoo ebuild Set next version : - update version in configure.ac - update version in doc/main.xml ddccontrol-0.4.4/Makefile.am000066400000000000000000000004361327040342400157100ustar00rootroot00000000000000SUBDIRS = src po man $(DOC) EXTRA_DIST = config.rpath mkinstalldirs config.rpath mkinstalldirs intltool-extract.in intltool-merge.in intltool-update.in DISTCLEANFILES = intltool-extract intltool-merge intltool-update DISTCHECK_CONFIGURE_FLAGS = --enable-doc ACLOCAL_AMFLAGS = -I m4 ddccontrol-0.4.4/NEWS000066400000000000000000000044031327040342400143510ustar00rootroot00000000000000Version 0.4.3 - 2017-12-27 - Add support for Intel Mobile 945GME Express Graphics Controller. - Add support for AMD ADL as a backend. - Add support for FreeBSD - Make desktop file conforming to standards. - Create and install convenient .pc file. - Use custom icon instead of depending on (obsolete) third party icon. - Various build, spelling, and buffer overflow fixes. Version 0.4.2 - 2006-07-30 - Allow binary data in CAPS. - Add more I2C busses to Intel 810-like chips. - Fix gcc 4.0 and 4.1 compilation warnings. - Added manual pages. Version 0.4.1 - 2006-03-10 - Fix compilation error in Fedora Core 4 (may affect other distributions) Version 0.4 - 2006-03-08 - New database version (3), supporting generic profiles for monitors. - Add support for VIA and SiS chipsets (Thanks to Johannes Deisenhofer) - Fix memory leaks using valgrind. - Fix various compilation errors. Version 0.3 - 2005-11-14 - Use GTK/GDK high-level API to determine current screen (instead of Xinerama API). - Add Chinese translation (Thanks to "waq_cn"). - Add Gnome icon, thanks to 'lekma' on ddccontrol-users. - Add a new Gnome Panel Applet to switch between monitor profiles (Thanks to Christian Schilling). - Speed up gddccontrol loading by caching monitor list. - Add new fullscreen patterns. Version 0.2 - 2005-08-13 - Major changes in gddccontrol: + Add restore button for each control. + Add refresh button, and refresh all controls when needed. + Add support for profiles to save some controls values and restore them later. + Add a fullscreen pattern to adjust brightness and contrast. - New database version, please upgrade ddccontrol-db. Version 0.1.3 - 2005-07-15 - Add support for i810/i815/i830/i845/i855/i865/i915/i945 chipsets, thanks to Chernyavskyy Valentin for his tests. - Add Russian translation, thanks to Sergei Epiphanov. Version 0.1.2 - 2005-06-08 - Fix a compilation error in Fedora Core 3. Version 0.1.1 - 2005-06-07 - Add support for newest nVidia cards (e.g. GeForce 6200 TC). - Build ddcpci statically for security reasons. - Add status messages when gddccontrol loads. - Display less error messages when devices are not usable. - Fix compile error with latest kernel headers. - Other minor fixes. Version 0.1 - 2005-03-29 - Initial release ddccontrol-0.4.4/README.md000066400000000000000000000050561327040342400151360ustar00rootroot00000000000000[![Build Status][travis-badge]][travis] [travis-badge]: https://travis-ci.org/ddccontrol/ddccontrol.svg?branch=master [travis]: https://travis-ci.org/ddccontrol/ddccontrol # DDC/CI control DDCcontrol is a software used to control monitor parameters, like brightness, contrast, RGB color levels and others. DDCcontrol consists of: * `ddccontrol` - command-line tool for monitor parameters control * `gddccontrol` - GUI tool for monitor parameters control ## Installation The most convenient way to install DDCcontrol is to use packages from official distribution repositories. Manual installation is more complicated, but contains latest version of software and more monitor profiles. ### Installation from official packages DDCcontrol tools, `ddccontrol` and `gddccontrol` can be installed from official distribution repositories with following command: * on Ubuntu: `sudo apt install ddccontrol gddccontrol ddccontrol-db i2c-tools` * on Fedora: `TODO` * on openSUSE: `TODO` ### Installation from sources Install build dependencies: * on Ubuntu: `sudo apt install intltool i2c-tools libxml2-dev libpci-dev libgtk2.0-dev` * on others: `TODO` Clone, build and install built version: ```shell git clone https://github.com/ddccontrol/ddccontrol.git cd ddccontrol ./autogen.sh ./configure --prefix=/usr/ --libexecdir=/usr/lib make sudo make install ``` Monitor database is required for proper functionality. See for [ddccontrol-db installation](https://github.com/ddccontrol/ddccontrol-db#installation). ## Usage ### From GUI using gddccontrol `gddccontrol` is a graphical utility for monitor configuration. It is called **Monitor Settings** in list of applications. Following configuration is needed to allow non-root user to use `gddccontrol`: ```shell sudo adduser $USER i2c sudo /bin/sh -c 'echo i2c-dev >> /etc/modules' ``` Utility can launched directly from commandline: ```shell sudo gddccontrol ``` ### From command line using ddccontrol `ddccontrol` allows monitor configuration directly from commandline. To probe I2C devices to find monitor buses use: ```shell sudo ddccontrol -p ``` To read value of control `0x10` (brightness on VESA compliant monitors) for device `dev:/dev/i2c-4`: ```shell sudo ddccontrol -r 0x10 dev:/dev/i2c-4 ``` To set value of control `0x10` (brightness on VESA compliant monitors) to `75` for device `dev:/dev/i2c-4`: ```shell sudo ddccontrol -r 0x10 -w 75 dev:/dev/i2c-4 ``` See `ddccontrol -h` for more information. ## License The project is licensed under `GNU General Public License v2.0` license. See [COPYING](COPYING) for details. ddccontrol-0.4.4/TODO000066400000000000000000000007141327040342400143430ustar00rootroot00000000000000Nicolas: - Read EDID info, show it in gddccontrol - Add support for more than 2 monitors - See what to do with engineering VCP. - Better handling of --enable-doc. - Use rsync for SF file transfers. Roberto: - Update supportedmonitors.xml to list all the new monitors. BUGS: - Fix Samsung 720T (not detected as LCD as type is "LCD CM") - Fix Samsung 740BF (not detected as LCD) - Fix Mitsubishi DiamondPro 930SB (not detected as CRT (type(CRT_AG))) ddccontrol-0.4.4/autogen.sh000077500000000000000000000001731327040342400156530ustar00rootroot00000000000000#!/bin/sh set -e echo "Running autoreconf..." autoreconf --install $* echo "Running intltoolize..." intltoolize --force ddccontrol-0.4.4/commit.sh000077500000000000000000000007261327040342400155050ustar00rootroot00000000000000#!/bin/sh echo "Updating working copy..." svn update $SVN_OPTS || exit 1 echo "Committing your changes (message: '$1')..." svn commit $SVN_OPTS -m "$1" echo "Updating ChangeLog..." svn update $SVN_OPTS REVISION=$(svn info |grep ^Revision |cut -f2 -d' ') (TZ=GMT svn2cl -i -r $REVISION --authors=AUTHORS --stdout; cat ChangeLog) >ChangeLog.tmp && mv -f ChangeLog.tmp ChangeLog echo "Committing ChangeLog..." svn commit $SVN_OPTS -m "Update ChangeLog" ChangeLog echo "OK" ddccontrol-0.4.4/configure.ac000066400000000000000000000207621327040342400161460ustar00rootroot00000000000000AC_INIT([DDC/CI control tool],[0.4.4],[DDCControl users list ],[ddccontrol]) AC_CONFIG_SRCDIR([src/ddccontrol/main.c]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([subdir-objects -Wall foreign]) AUTOMAKE_OPTIONS = foreign IT_PROG_INTLTOOL AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION([0.18.1]) GETTEXT_PACKAGE=ddccontrol AC_SUBST([GETTEXT_PACKAGE]) AC_PROG_CC AM_PROG_AR AC_PROG_INSTALL LT_INIT PKG_PROG_PKG_CONFIG AC_LANG([C]) AC_HEADER_STDC AC_CHECK_HEADERS([stdio.h unistd.h sys/time.h stdlib.h errno.h unistd.h string.h sys/types.h sys/stat.h fcntl.h sys/ioctl.h dirent.h], [], [AC_MSG_ERROR([Important header not found, please install it.], [1])], []) check_xsltproc=yes AC_ARG_ENABLE(xsltproc-check, [AS_HELP_STRING([--disable-xsltproc-check],[omit check to see if xsltproc works (enabled)])], [if test x$enableval = xno; then check_xsltproc=no fi]) # /dev/i2c-* check support_i2c_dev=yes AC_ARG_ENABLE(i2cdev, [AS_HELP_STRING([--disable-i2c],[enable /dev/i2c-* busses (enabled)])], [if test x$enableval = xno; then support_i2c_dev=no fi]) if test "x$support_i2c_dev" = "xyes" ; then AC_DEFINE_UNQUOTED(HAVE_I2C_DEV, 1, [Define if ddccontrol is built with /dev/i2c-* support.]) AC_CANONICAL_HOST case $host_os in linux*) AC_CHECK_HEADERS([linux/types.h], [], [AC_MSG_ERROR([Linux kernel header files not found, please install them.], [1])], []) ;; esac support_i2c_dev_works=no AC_MSG_CHECKING([if linux/i2c-dev.h works with non-kernel linux/types.h]) AC_COMPILE_IFELSE([ [#include ] [#include ] [const int a = I2C_RDWR + I2C_M_RD;] [struct i2c_msg i2cmsg;] ], support_i2c_dev_works=yes AC_MSG_RESULT(yes), AC_MSG_RESULT(no) ) if test "x$support_i2c_dev_works" = "xno" ; then AC_MSG_CHECKING([if $srcdir/src/lib/i2c-dev.h works instead]) AC_COMPILE_IFELSE([ [#define HAVE_BUGGY_I2C_DEV 1] [#include "$srcdir/src/lib/i2c-dev.h"] [const int a = I2C_RDWR + I2C_M_RD;] [struct i2c_msg i2cmsg;] ], AC_DEFINE(HAVE_BUGGY_I2C_DEV, 1, [Define if linux/i2c-dev.h is buggy on your system, so defaults constants and structures must be used]) support_i2c_dev_works=yes AC_MSG_RESULT(yes), AC_MSG_RESULT(no) ) if test "x$support_i2c_dev_works" = "xno" ; then AC_MSG_ERROR([Unable to use neither linux/i2c-dev.h nor src/lib/i2c-dev.h on your system, kernel headers may be more buggy than usual, or inexistant, try to (re-)install kernel headers.], [1]) fi fi fi AC_DEFINE(_GNU_SOURCE, 1, [Define unconditionally for setting a GNU environment.]) CFLAGS="$CFLAGS -Wall -DDATADIR=\"\\\"${datadir}/ddccontrol-db\\\"\" -DBINDIR=\"\\\"${bindir}\\\"\"" # Check for extra libraries AC_SEARCH_LIBS([round],[m]) # libxml2 check AC_PATH_PROG(XML2_CONFIG, xml2-config, no) if test "x$XML2_CONFIG" = "xno" ; then AC_MSG_ERROR([xml2-config not found, please install libxml2, available at http://www.xmlsoft.org/.], [1]) fi LIBXML2_LDFLAGS="`xml2-config --libs`" LIBXML2_CFLAGS="`xml2-config --cflags`" AC_SUBST([LIBXML2_LDFLAGS]) AC_SUBST([LIBXML2_CFLAGS]) # Direct PCI memory access check support_ddcpci=yes AC_ARG_ENABLE(ddcpci, [AS_HELP_STRING([--disable-ddcpci],[enable direct PCI memory access (enabled)])], [if test x$enableval = xno; then support_ddcpci=no fi]) DDCPCI= if test x$support_ddcpci = xyes; then AC_CHECK_HEADERS([pci/pci.h], [], [AC_MSG_ERROR([PCI utils headers not found, please install pci-utils.], [1])], []) AC_CHECK_LIB([pci], [pci_alloc], [], [ AC_CHECK_LIB([z], [gzopen], [], [AC_MSG_ERROR([PCI utils library not found, please install pci-utils.], [1])]) AC_CHECK_LIB([pci], [pci_fill_info], [], [AC_MSG_ERROR([PCI utils library not found, please install pci-utils.], [1])], [-lz]) ]) DDCPCI=ddcpci AC_DEFINE_UNQUOTED(HAVE_DDCPCI, 1, [Define if ddccontrol is built with ddcpci support.]) fi AC_SUBST([DDCPCI]) # AMD ADL support check support_amdadl= AC_ARG_ENABLE(amdadl, [AS_HELP_STRING([--enable-amdadl],[enable AMD Display Library support (autodetect)])], [if test x$enableval = xno; then support_amdadl=no else support_amdadl=yes fi]) AMDADL= if test x$support_amdadl = xyes; then AC_CHECK_HEADERS([ADL/adl_sdk.h], [], [AC_MSG_ERROR([ADL headers not found, but ADL support requested.], [1])], [#ifndef __stdcall #define __stdcall #endif ]) AMDADL=amdadl elif test x$support_amdadl = x; then AC_CHECK_HEADERS([ADL/adl_sdk.h], [ AMDADL=amdadl ], [], [#ifndef __stdcall #define __stdcall #endif ]) fi if test x$AMDADL = xamdadl; then AC_DEFINE_UNQUOTED(HAVE_AMDADL, 1, [Define if ddccontrol is built with ADL support.]) fi AC_SUBST([AMDADL]) # Gnome check support_gnome=yes AC_ARG_ENABLE(gnome, AS_HELP_STRING([--disable-gnome],[disable build of gnome-console GUI (enabled)]), [if test x$enableval = xno; then support_gnome=no fi]) # This should use PKG_CHECK_MODULES() instead of explicitly calling $PKG_CONFIG. GDDCCONTROL= if test x$support_gnome = xyes; then if test "x$PKG_CONFIG" = "xno" ; then AC_MSG_ERROR(pkg-config not found, please install pkg-config) fi echo -n "checking for gtk+>=2.4 and gthread>=2.4... " if $PKG_CONFIG --atleast-version=2.4 gtk+-2.0 gthread-2.0 ; then GNOME_LDFLAGS="$LIBXML2_LDFLAGS `$PKG_CONFIG --libs gtk+-2.0 gthread-2.0`" GNOME_CFLAGS="$LIBXML2_CFLAGS `$PKG_CONFIG --cflags gtk+-2.0 gthread-2.0`" GDDCCONTROL=gddccontrol echo "yes" # Check for X11 AC_PATH_XTRA else echo "no" AC_MSG_ERROR([gtk+>=2.4 development packages not found]) fi fi support_gnome_applet=yes AC_ARG_ENABLE( gnome-applet, AS_HELP_STRING([--disable-gnome-applet],[disable build of gnome panel applet (enabled)]), [if test x$enableval = xno; then support_gnome_applet=no fi]) # This should use PKG_CHECK_MODULES() instead of explicitly calling $PKG_CONFIG. GNOME_APPLET= if test x$support_gnome_applet = xyes; then if $PKG_CONFIG --atleast-version=2.10 libpanelapplet-2.0 ; then GNOME_APPLET="gnome-ddcc-applet" GNOME_LDFLAGS="$LIBXML2_LDFLAGS `$PKG_CONFIG --libs gtk+-2.0 gthread-2.0 libpanelapplet-2.0`" GNOME_CFLAGS="$LIBXML2_CFLAGS `$PKG_CONFIG --cflags gtk+-2.0 gthread-2.0 libpanelapplet-2.0`" fi fi AC_SUBST([GNOME_LDFLAGS]) AC_SUBST([GNOME_CFLAGS]) AC_SUBST([GDDCCONTROL]) AC_SUBST([GNOME_APPLET]) # Doc check support_doc=no AC_ARG_ENABLE(doc, AS_HELP_STRING([--enable-doc],[enable build of the documentation (disabled)]), [if test x$enableval = xyes; then support_doc=yes fi]) AM_CONDITIONAL(BUILD_DOC, test x$support_doc = xyes) DOC= if test x$support_doc = xyes; then # Docbook tests # Based on http://www.movement.uklinux.net/docs/docbook-autotools/configure.html # Copyright © 2003 John Levon # It's just rude to go over the net to build XSLTPROC_FLAGS=--nonet AC_MSG_CHECKING([whether /etc/xml/catalog exists]) if test ! -f /etc/xml/catalog; then AC_MSG_ERROR([/etc/xml/catalog not found, fix this problem or disable doc building]) else AC_MSG_RESULT(yes) AC_PATH_PROG(XSLTPROC,xsltproc,no) if test "x$XSLTPROC" = "xno" ; then AC_MSG_ERROR([xsltproc not found, install it or disable doc building]) fi AC_PATH_PROG(SSH,ssh,ssh) AC_PATH_PROG(SCP,scp,scp) AC_PATH_PROG(ASPELL,aspell,no) AC_PATH_PROG(FOP,fop,no) AC_PATH_PROG(TIDY,tidy,no) if test "x$TIDY" = "xno" ; then AC_MSG_ERROR([tidy not found, install it or disable doc building]) fi if test x$check_xsltproc = xyes ; then AC_MSG_CHECKING([whether xsltproc works]) DOCBOOK_ROOT="http://docbook.sourceforge.net/release/xsl/current/xhtml" DB_FILE="$DOCBOOK_ROOT/docbook.xsl" $XSLTPROC $XSLTPROC_FLAGS $DB_FILE >/dev/null 2>&1 << END END if test "$?" = 0; then AC_MSG_RESULT(yes) DOC=doc else AC_MSG_ERROR([xsltproc does not work, fix this problem or disable doc building]) fi fi fi fi AC_SUBST(XML_CATALOG) AC_SUBST(XSLTPROC_FLAGS) AC_SUBST(DOCBOOK_ROOT) AC_SUBST(DOC) AC_CONFIG_FILES([ po/Makefile.in Makefile src/Makefile src/lib/Makefile src/lib/ddccontrol.pc src/ddccontrol/Makefile src/gddccontrol/Makefile src/ddcpci/Makefile src/gnome-ddcc-applet/Makefile doc/Makefile man/Makefile]) AC_OUTPUT ddccontrol-0.4.4/doc/000077500000000000000000000000001327040342400144165ustar00rootroot00000000000000ddccontrol-0.4.4/doc/Makefile.am000066400000000000000000000026111327040342400164520ustar00rootroot00000000000000XHTML_STYLESHEET=style.xsl dist_html_DATA = html/* EXTRA_DIST = main.xml gpl.xml install.xml about.xml report.xml supportedgc.xml supportedmonitors.xml thanks.xml techdocs.xml usage.xml style.xsl style-fo.xsl if BUILD_DOC html/*: main.xml gpl.xml install.xml about.xml report.xml supportedgc.xml supportedmonitors.xml thanks.xml techdocs.xml usage.xml style.xsl rm -rf html.old true `mv -f html html.old` mkdir html $(XSLTPROC) $(XSLTPROC_FLAGS) -o html/ $(top_srcdir)/doc/$(XHTML_STYLESHEET) $< -$(TIDY) -q -raw -im html/*.html publish: all $(SSH) $(SFUSER)@ssh.sf.net "cd /home/groups/d/dd/ddccontrol/htdocs/doc/; rm -rf latest" $(SCP) -C -r html $(SFUSER)@ssh.sf.net:/home/groups/d/dd/ddccontrol/htdocs/doc/latest publish-release: all pdf $(SSH) $(SFUSER)@ssh.sf.net "cd /home/groups/d/dd/ddccontrol/htdocs/doc/; rm -rf $(VERSION)" $(SCP) -C -r html $(SFUSER)@ssh.sf.net:/home/groups/d/dd/ddccontrol/htdocs/doc/$(VERSION) $(SCP) -C ddccontrol.pdf $(SFUSER)@ssh.sf.net:/home/groups/d/dd/ddccontrol/htdocs/doc/ddccontrol-$(VERSION).pdf spell: $(ASPELL) --mode=sgml check main.xml clean-local: rm -rf html rm -f ddccontrol.fo ddccontrol.pdf ddccontrol.fo: main.xml gpl.xml style-fo.xsl $(XSLTPROC) \ --output ddccontrol.fo \ --stringparam paper.type A4 \ style-fo.xsl \ $< ddccontrol.pdf: ddccontrol.fo $(FOP) -fo ddccontrol.fo -pdf ddccontrol.pdf pdf: ddccontrol.pdf endif ddccontrol-0.4.4/doc/about.xml000066400000000000000000000014641327040342400162570ustar00rootroot00000000000000 About DDCcontrol About DDCcontrol DDCcontrol is a tool used to control monitor parameters, like brightness and contrast, without using the OSD (On Screen Display) or the buttons in front of the monitor. All the software provided by monitor manufacturers (NEC/Mitsubishi NaviSet and Samsung MagicTune) are closed-source and only runs on Windows. DDCcontrol is open-source and runs on Linux. There are two parts to this tool: a command line version, and a user-friendly Gnome GUI. DDC/CI DDC/CI is a protocol designed by VESA to configure monitor by software, using two wires on the VGA or DVI cables, which forms an I2C bus. ddccontrol-0.4.4/doc/gpl.xml000066400000000000000000000530431327040342400157270ustar00rootroot00000000000000 GNU General Public License Version 2, June 1991 1989, 1991 Free Software Foundation, Inc.
Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Version 2, June 1991
GNU General Public License 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: copyright the software, and 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. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION Section 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. Section 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. Section 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: You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. 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. 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. Section 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: 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, 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, 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. Section 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. Section 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. Section 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. Section 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. Section 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. Section 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. Section 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. Section 11 NO WARRANTY 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. Section 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) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 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) year 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.
ddccontrol-0.4.4/doc/install.xml000066400000000000000000000117231327040342400166120ustar00rootroot00000000000000 Install notes Software Requirements To compile and run DDCcontrol, you need to have these packages installed: libxml2 pci-utils gtk+>=2.4 In addition to the library packages, you also need the development packages, which are not usually installed. For example, on Debian, their names are libxml2-dev, pciutils-dev and libgtk2.0-dev. Other distributions probably have similar package names. On Fedora Core 5, you will also need gnome-panel-devel package. You don't need pci-utils if you don't use direct PCI memory access, and you don't need gtk+ if you don't plan to use the Gnome GUI. Usually, this is not the case, so you will almost certainly want these packages for compiling ddccontrol. Download the sources Go to the download section of ddccontrol project's page and download the latest ddccontrol and ddccontrol-db source tarballs. Then unpack these two archives with: # tar xvfz ddccontrol-X.Y.tar.gz # tar xvfz ddccontrol-db-YYYYMMDD.tar.gz You should now have two directories, ddccontrol and ddccontrol-db. Compile and install To compile and install the source tarballs, type: # ./configure # make # su root Password: <root password> # make install You need to do this in ddccontrol and ddccontrol-db directories. If you set the parameter when configuring one package, you must set it to the same value when configuring the other. Configure <filename>/dev/i2c-*</filename> devices /dev/i2c-* devices are only working with kernel 2.6 or greater. If your graphics card is supported by /dev/i2c-* devices (see ), you must load the i2c-dev module by typing, as root: # modprobe i2c-dev You must also load your graphics card framebuffer driver (for card-specific instructions see ). If you want to automatically load these modules when Linux starts, see your distribution's documentation. On systems not using devfs, even after loading framebuffer and i2c-dev modules, the devices /dev/i2c/* or /dev/i2c-* does not exist. On Debian, these devices are created using this command : # /sbin/MAKEDEV i2c To allow standard (i.e. non-root) users to use DDCcontrol, you must change permissions on /dev/i2c-*. This is done by typing, as root: # chmod a+rw /dev/i2c-* Kernel configuration options If i2c-dev or your graphics card's framebuffer modules are not available with your kernel, you can build your own kernel with the following options turned on (with recommend to build them as modules): Devices drivers I2C support . Devices drivers I2C support I2C device interface . Devices drivers Graphics support Framebuffer support . and a specific driver for your graphic card (see ). Installation on Debian (and derivatives) The ddccontrol and ddccontrol-db packages are available in Debian (and derivatives). You simply need to install the ddccontrol package and all the proper dependencies will be installed along with it. For example: # apt-get install ddccontrol ddccontrol-0.4.4/doc/main.xml000066400000000000000000000023231327040342400160640ustar00rootroot00000000000000 ]> DDCcontrol Documentation Nicolas Boichat nicolas@boichat.ch Roberto C. Sanchez roberto@connexer.com 2007 Roberto C. Sanchez 2005-2006 Nicolas Boichat $Id$ Documentation for DDCcontrol version 0.4.4. &about; &install; &usage; &report; &supportedmonitors; &supportedgc; &thanks; &techdocs; &gpl; ddccontrol-0.4.4/doc/report.xml000066400000000000000000000010711327040342400164520ustar00rootroot00000000000000 Report problems and successes If you have problems building or running DDCcontrol, if your monitor doesn't work with DDCcontrol, or if your graphics card is not listed in the , please write a message to ddccontrol-users@lists.sourceforge.net. For more information on ddccontrol mailing lists, see the sourceforge project page. ddccontrol-0.4.4/doc/style-fo.xsl000066400000000000000000000035361327040342400167170ustar00rootroot00000000000000 start wrap pt false start 0.8em 1em 1.2em 0.8em 1em 1.2em false false always ddccontrol-0.4.4/doc/style.xsl000066400000000000000000000246461327040342400163220ustar00rootroot00000000000000
th th td 1 0 #00FF00 #FF0000 #FFFF00  
ddccontrol-0.4.4/doc/supportedgc.xml000066400000000000000000000336721327040342400175120ustar00rootroot00000000000000 Supported graphics cards <filename>/dev/i2c-*</filename> versus PCI memory To control a monitor, DDCcontrol must access the I2C bus of the graphics card. There are two methods to do so: the first one uses /dev/i2c-* devices provided by kernel drivers (abbreviated as dev in tables), the second one reads and writes directly in the card PCI memory (abbreviated as PCI in the tables). Depending on your hardware, one method or the other may work. Even both may work. ATI Radeon series Direct PCI memory access support Almost every ATI card should work with direct PCI memory access, even if it has not been very extensively tested. To use it, you have nothing special to do, everything is done by DDCcontrol. <filename>/dev/i2c-*</filename> devices support ATI Radeon cards also work with /dev/i2c-* devices. To use /dev/i2c-* devices with ATI cards, you must load the radeonfb module by typing, as root: # modprobe radeonfb The kernel configuration options needed to enable Radeon framebuffer driver and I2C support are: Devices drivers Graphics support Framebuffer support ATI Radeon display support . Devices drivers Graphics support Framebuffer support ATI Radeon display support DDC/I2C for ATI Radeon support . The radeonfb kernel module may cause system instability (crashes or screen corruption) when used at the same time as the ATI closed source drivers. This is why we recommend that you use direct PCI memory access with ATI cards. ATI cards support table These ATI cards have been reported to work, but others models should also work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see ). Name Works dev PCI Radeon 7000 Yes ??? Radeon 7500 Yes ??? Radeon 9200 Yes Yes Radeon 9200 SE ??? Yes Radeon 9500 Yes ??? Radeon 9550 SE Yes ??? Radeon 9600 Pro Yes ??? Radeon 9700 Yes ??? Radeon 9800 Pro Yes Yes nVidia <filename>/dev/i2c-*</filename> devices support Using proprietary drivers Starting with the proprietary drivers version 8762, nVidia provides access to the i2c bus through standard /dev/i2c-* interface. To use it, nothing special has to be done, just install and run the proprietary drivers. Then, when nvidia driver is loaded, the correct devices are accessible as with standard framebuffer drivers. Using <filename>rivafb</filename> or <filename>nvidiafb</filename> Most nVidia cards, starting with TNT, work with /dev/i2c-* devices. To use them, you must load the nvidiafb (or rivafb for old cards) module by typing, as root: # modprobe nvidiafb or # modprobe rivafb The kernel configuration options needed to enable nVidia framebuffer and I2C support are: Devices drivers Graphics support Support for frame buffer devices nVidia Framebuffer support (or nVidia Riva support) . Devices drivers Graphics support Support for frame buffer devices nVidia Framebuffer support (or nVidia Riva support) Enable DDC Support . These kernel modules are not compatible with binary nVidia X drivers, which are the only drivers for nVidia cards to provide 3D acceleration. This is why we recommend that you either use direct PCI memory access with nVidia cards, or i2c-dev access through the proprietary drivers. Direct PCI memory access support Almost every nVidia card works with direct PCI memory access, and this method is compatible with the nVidia proprietary drivers. To use it, you have nothing special to do, everything is done by DDCcontrol. nVidia cards support table Most of these nVidia cards have been reported to work, but other models should also work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see ). Name Works dev/framebuffer PCI dev/proprietary GeForce Ti 200 Yes Yes Yes GeForce FX 5600 No Yes ??? GeForce FX 5700 No Yes ??? GeForce FX 5700 LE ??? Yes ??? GeForce FX 5950 Ultra ??? Yes ??? GeForce 6200 TC ??? Yes ??? GeForce 6600 ??? Yes ??? GeForce 6800 GT ??? Yes ??? nForce 2 IGP No No ??? Intel i810/i815/i830/i845/i855/i865/i915/i945 with Integrated Graphics Controller Intel integrated graphics controllers only work with direct PCI memory access, so you don't have to have any kernel module built or loaded. Intel chipset support table These Intel chipsets have been reported to work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see ). Name Works dev PCI Intel i915G (82915G) No Yes Intel i865G (82865G) No Yes SiS SiS graphics controllers only work with direct PCI memory access, so you don't have to have any kernel module built or loaded. SiS chipset support table These SiS chipsets have been reported to work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see ). Name Works dev PCI SiS [M]661xX/[M]741[GX]/[M]760 PCI/AGP VGA Adapter No Yes VIA VIA graphics controllers only work with direct PCI memory access, so you don't have to have any kernel module built or loaded. VIA chipset support table These VIA chipsets have been reported to work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see ). Name Works dev PCI VIA VT8623 [Apollo CLE266] integrated CastleRock graphics No Yes VIA S3 Unichrome Pro VGA Adapter No Yes Matrox G200/G400/G450/G550 series Matrox cards only work with /dev/i2c-* devices. To use them, you must load both matroxfb and i2c-matroxfb modules by typing, as root: # modprobe matroxfb # modprobe i2c-matroxfb The kernel configuration options needed to enable Matrox framebuffer driver and I2C support are, at least: Devices drivers Graphics support Framebuffer support Matrox acceleration . Devices drivers Graphics support Framebuffer support Matrox acceleration G100/G200/G400/G450/G550 support . Devices drivers Graphics support Framebuffer support Matrox acceleration Matrox I2C support . Matrox cards support table These Matrox cards have been reported to work. If yours is not listed, please send a message to one of the DDCcontrol mailing lists (see ). Name Works dev PCI Matrox G200 AGP No No Matrox G450 AGP Yes No ddccontrol-0.4.4/doc/supportedmonitors.xml000066400000000000000000000076671327040342400210000ustar00rootroot00000000000000 Supported monitors The following monitors are supported by DDCcontrol: AOC AOC LM928 Compaq Compaq P1100 Dell Dell 1704FPT (DVI input) Dell 1905FP Dell 1907FP Dell 2005FPW Dell 2007FP Dell 2405FPW Fujitsu Siemens P17-2 P19-2 P20-2 (VGA and DVI inputs) LG Flatron L1952HM Mitsubishi Diamond Plus 92 Diamond Pro 2060u (VGA input B only) Diamond Pro 2070sb NEC LCD175VXM Multisync 2080UX+ (VGA and DVI inputs) Philips 170B 170C6 200P6 200W6 Samsung SyncMaster 171P (VGA input only) SyncMaster 173P (VGA and DVI inputs) SyncMaster 173P Plus (VGA and DVI inputs) SyncMaster 173s SyncMaster 173T (VGA input only) SyncMaster 174T (at least DVI input) SyncMaster 193P (VGA and DVI inputs) SyncMaster 193P Plus (VGA and DVI inputs) SyncMaster 204B SyncMaster 244T SyncMaster 215TW (VGA and DVI inputs) SyncMaster 701T SyncMaster 710T SyncMaster 710TM SyncMaster 712N (at least VGA input) SyncMaster 720T SyncMaster 730BF SyncMaster 753V SyncMaster 760BF (VGA and DVI inputs) SyncMaster 797MB SyncMaster 910T SyncMaster 912N (at least VGA input) SyncMaster 920N (at least VGA input) SyncMaster 913V SyncMaster 930BF (at least VGA input) SyncMaster 940B SyncMaster 940BF SyncMaster 960BF (VGA and DVI inputs) SyncMaster 970P (VGA and DVI inputs) SyncMaster 971P SyncMaster 997MB SGI GDM-5011P GDM-5411 Sony SDM-S205K SUN GDM-5410 (Sony OEM) Your monitor is not on this list? If your monitor is not on this list, and so doesn't work with DDCcontrol, but you think that it supports the DDC/CI protocol, please run this command: LANG= LC_ALL= ddccontrol -p -c -d And send the output to one of the DDCcontrol mailing lists (see ). ddccontrol-0.4.4/doc/techdocs.xml000066400000000000000000000321771327040342400167460ustar00rootroot00000000000000 Documents for developers Translation (I18N) guide Author: Nicolas Boichat <nicolas -at- boichat.ch> Do you want to translate ddccontrol to your favorite language? Then, this guide is for you! The distribution is split in two packages: ddccontrol (the main program), and ddccontrol-db (monitor database). Tools you need: subversion, automake/autoconf, gettext, make, poedit (or another tool, or a simple text editor). First, you need to check-out the sources from the Subversion repository (see project Subversion page, Subversion Access section). Note you need to perform the following operations in both the trunk/ddccontrol and trunk/ddccontrol-db directories (there are strings to translate in the main program, and in the database). Then run: # ./autogen.sh # ./configure (maybe you will need some devel package to make it working) # cd po # make update-po If the po file for your language doesn't exist, simply copy ddccontrol.pot to LANG.po (for example, for French, it is fr.po) and update the fields in it (like AUTHOR, CHARSET, etc...) Then open your .po file, and translate the strings! I recommend that you use a tool like poedit, as it warns you visually when strings are wrong, and offers spellcheck. But it's your choice . When you are finished, it would be nice to test if it works by installing and running the software, but it is not mandatory, particularly if you don't have the needed hardware (i.e. a monitor supporting DDC/CI). Then, sending the completed .po files to ddccontrol-devel. It is a good idea that you subscribe to ddccontrol-devel, particularly if you have problems to translate some technical strings. This way it is not necessary to explain the same terms repeatedly to all translators . Also, if you encounter mistakes in the original English strings, please report those as well. List of languages with active translators: French: Nicolas Boichat Russian: Sergei Epiphanov I hope my explanations were complete, otherwise do not hesitate to contact me (cc-ing the devel list) if you have questions. THANK YOU. Monitor database structure The monitor database is written in XML, it can be found in the db directory of ddccontrol-db package. This directory contains the following files: options.xml monitor/%monitor_id%.xml Control list XML file: options.xml control elements (e.g. brightness) are contained in group elements (e.g. color settings). group and subgroup elements allow the GUI to separate the controls in different branches on the tree. options attributes: date: indicates the release date of the current database (YYYYMMDD format). dbversion: indicates which version of database format is used (must be set to 3). group attributes: name: full English group name. subgroup attributes: name: full English subgroup name. pattern: name of the fullscreen pattern gddccontrol must display to help the user to adjust subgroup's controls (optional). For possible values, see ddccontrol/src/gddccontrol/fspatterns.c. control attributes: id: abbreviated control name. name: full English control name. address: DDC/CI address (optional). type: one of these values: value: The control accepts values in a continuous range (e.g. brightness). command: An action occurs when the value is set to something greater than 0 (e.g. degauss). If you don't define any value element in a command control, the default value 0x01 will be used. list: The control accepts a list of values (e.g. OSD language). refresh (only for list and command controls): Set whether other controls must be refreshed after changing list value or running the command associated with the control (optional). Possible values: none: Do not refresh anything. (default) all: Refresh all controls. value attributes: id: abbreviated value name. name: full English value name (it is not needed if there is only one value for command controls). value: DDC/CI control value (optional). File format: ]]> Monitor Profiles XML files: monitor/%monitor_id%.xml <sgmltag class="element">caps</sgmltag> element The caps attribute is optional. Its format is defined in ACCESS.bus specifications. To add controls to caps, use the add attribute. To remove controls from caps, use the remove attribute. Note remove is handled before add, so if you remove and add a same control, it will finally be in caps. <sgmltag class="element">controls</sgmltag> element List of controls supported by a monitor (optional if you have an include element). control id attributes are defined in options.xml. If control type is list or command without default values, supported values must be defined. address attribute for control elements and value attribute for value elements are optional if they are defined in the general options file. The init attribute in monitor element define the type of the initialization: DDC/CI standard (standard), or Samsung (samsung). This attribute is optional, as long as the monitor profile includes another profile which defines this attribute. You can set a delay attribute in control elements to set the time in milliseconds to wait after changing the value of this control. If you don't, a default value is used. <sgmltag class="element">include</sgmltag> element Includes another monitor, manufacturer or standard profile, specified by the file attribute. Monitor profile are read sequentially. Control and init mode redifinitions are ignored, so define specific controls and init mode before including a generic profile. Caps are also treated sequentially, so if a control is not in CAPS at the time it is defined, it won't be supported by ddccontrol. File format: ]]> If a monitor supports exactly the same controls as another one, you can define it as shown: ]]> Profile file structure Profile files are used to save the value of some controls. profile attributes: pnpid: indicates the PNP id of the monitor that this profile applies to. name: profile name. version: indicates which version of profile format is used (must be set to 1). control attributes: address: DDC/CI address of the control. value: DDC/CI control value. File format: ]]> ddccontrol-0.4.4/doc/thanks.xml000066400000000000000000000025311327040342400164310ustar00rootroot00000000000000 Thanks Thanks to OlegI. Vdovikin, for his work which was used as a basis for ddccontrol, and for his help when designing the XML database. Thanks to ChristianSchilling , for his nice additions to the Gnome GUI, and for the Gnome panel applet. Thanks to William Hollingworth, of NEC/Mitsubishi, for his constant help and support to this project. Thanks to ChernyavskyyValentin , for testing Intel graphics chipset support. Thanks to JohannesDeisenhofer , for providing a patch to add VIA and SiS graphics chipset support. Thanks to all users that reported if DDCcontrol works on their hardware. Thanks to various people on mailing-lists (X.org, fbdevel...), for their help, in particular JonSmirl , on the X.org list, who guided me in the direction of using the kernel framebuffer driver. ddccontrol-0.4.4/doc/usage.xml000066400000000000000000000126371327040342400162550ustar00rootroot00000000000000 Usage GTK+ GUI If GTK+>=2.4 is installed on your computer, the configure process will detect it, and build the GTK+ application. The GTK+ GUI is designed to be user-friendly, so it should be easy to use it. To launch this GUI, simply type: # gddccontrol Gnome panel applet If Gnome>=2.10 is installed on your computer, the configure process will detect it, and build the Gnome panel applet. The Gnome panel applet is useful to switch between different monitor profiles created with the GTK+ GUI. To add it to your Gnome Panel, simply right-click on the panel, choose Add to Panel, and select Monitor Profile Switcher. Command line tool The command line tool is useful for debugging purpose, and to create automatic scripts. We won't present everything you can do with ddccontrol, if you want more information, type: # ddccontrol -h Usage example This example explains how to list all available controls and then change the brightness parameter. List available controls To list available controls, type: # ddccontrol -p This probes for available monitors, then takes the first probed monitor and lists controls supported by it. This should give you an output like this (this example uses a Samsung Syncmaster 173P and a nVidia GeForce FX 5700): ddccontrol version 0.1 Copyright 2004 Oleg I. Vdovikin (oleg-at-cs.msu.su) Copyright 2004 Nicolas Boichat (nicolas-at-boichat.ch) This program comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of this program under the terms of the GNU General Public License. Device : pci:01:00.0-0 Error while reading write message answer: Bad message Reading EDID 0x50 failed. Device : pci:01:00.0-1 Device : pci:01:00.0-2 Detected monitors : - Device : pci:01:00.0-1 DDC/CI supported : Yes Monitor Name : Samsung SyncMaster 173P (DVI) Input type : Digital (Automatically selected) - Device : pci:01:00.0-2 DDC/CI supported : Yes Monitor Name : NEC Multisync 2080UX+ Input type : Analog Reading EDID and initializing DDC/CI at bus pci:01:00.0-1... Device : pci:01:00.0-1 EDID readings: Plug and Play ID: SAM00E2 [Samsung SyncMaster 173P (DVI)] Input type: Digital = Samsung SyncMaster 173P (DVI) > Color settings > Brightness and Contrast > id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0 supported, value=55, maximum=100 > id=contrast, name=Contrast, address=0x12, delay=-1ms, type=0 supported, value=60, maximum=100 > id=magicbright, name=Magic Bright Mode, address=0xdc, delay=-1ms, type=2 Possible values: > id=text - name=Text, value=1 > id=internet - name=Internet, value=2 > id=entertain - name=Entertain, value=3 > id=custom - name=Custom, value=4 supported, value=4, maximum=4 > Others > Restore defaults > id=defaults, name=Restore Factory Defaults, address=0x4, delay=-1ms, type=1 Possible values: > id=default - name=Restore Factory Defaults, value=1 supported, value=0, maximum=1 > id=defaultluma, name=Restore Brightness and Contrast, address=0x5, delay=-1ms, type=1 Possible values: > id=default - name=Restore Brightness and Contrast, value=1 supported, value=0, maximum=1 > id=settings, name=Settings, address=0xb0, delay=-1ms, type=1 Possible values: > id=store - name=Save Current Settings, value=1 > id=restorefactory - name=Restore Factory Settings, value=2 supported, value=0, maximum=2 > Input settings > id=inputsource, name=Input Source Select, address=0x60, delay=-1ms, type=2 Possible values: > id=analog - name=Analog, value=1 > id=digital - name=Digital, value=3 supported, value=3, maximum=3 > Power control > id=dpms, name=DPMS Control, address=0xd6, delay=-1ms, type=2 Possible values: > id=on - name=On, value=1 > id=standby - name=Standby, value=4 supported, value=1, maximum=4 Change the brightness The lines concerning brightness in the available controls list are: > id=brightness, name=Brightness, address=0x10, delay=-1ms, type=0 supported, value=55, maximum=100 The important elements are address (here: 0x10), current value (55) and maximum value (100). To change the brightness value to 70/100, type: ddccontrol -p -r 0x10 -w 70 The last lines of the output should be: Writing 0x10, 0x46(70)... Control 0x10: +/70/100 [Brightness] ddccontrol-0.4.4/man/000077500000000000000000000000001327040342400144245ustar00rootroot00000000000000ddccontrol-0.4.4/man/Makefile.am000066400000000000000000000001001327040342400164470ustar00rootroot00000000000000man_MANS = ddccontrol.1 gddccontrol.1 EXTRA_DIST = $(man_MANS) ddccontrol-0.4.4/man/ddccontrol.1000066400000000000000000000041441327040342400166440ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH DDCCONTROL 1 "July 26, 2006" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME ddccontrol \- A utility to control monitor parameters via software .SH SYNOPSIS .B ddccontrol .RB [ -b .IR datadir ] .RB [ -v ] .RB [ -c ] .RB [ -d ] .RB [ -f ] .RB [ -s ] .RB [ -r .IR ctrl .RB [ -w .IR value ]] .RB [ -p | dev ] .SH DESCRIPTION This manual page documents briefly the .B ddccontrol command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBddccontrol\fP is an open source utility which allows controlling monitor parameters via software. .SH OPTIONS A summary of options is included below. .TP .B dev device, e.g. dev:/dev/i2c-0 .TP .B \-p probe I2C devices to find monitor buses .TP .B \-c query capability .TP .B \-d query ctrls 0 - 255 .TP .B \-r query ctrl .TP .B \-w value to write to ctrl .TP .B \-f force (avoid validity checks) .TP .B \-s save settings .TP .B \-v verbosity (specify more to increase) .TP .B \-b ddccontrol-db directory (if other than /usr/share/ddccontrol-db) .SH SEE ALSO The program is documented fully in .br /usr/share/doc/ddccontrol/html/index.html .PP The project homepage: http://ddccontrol.sourceforge.net .SH AUTHOR ddccontrol was written by Oleg I. Vdovikin and Nicolas Boichat. .br Copyright 2004\-2005 Oleg I. Vdovikin (oleg@cs.msu.su) .br Copyright 2004\-2006 Nicolas Boichat (nicolas@boichat.ch) .PP This manual page was written by Roberto C. Sanchez . ddccontrol-0.4.4/man/gddccontrol.1000066400000000000000000000032311327040342400170070ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH GDDCCONTROL 1 "July 26, 2006" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME gddccontrol \- A graphical utility to control monitor parameters via software .SH SYNOPSIS .B gddccontrol .RI [options] .SH DESCRIPTION This manual page documents briefly the .B gddccontrol command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBgddccontrol\fP is an open source utility which allows controlling monitor parameters via software. .SH OPTIONS As a GTK2 application, \fBgddccontrol\fP accepts the standard GTK2 options. .SH SEE ALSO The program is documented fully in .br /usr/share/doc/ddccontrol/html/index.html .PP The project homepage: http://ddccontrol.sourceforge.net .SH AUTHOR ddccontrol was written by Oleg I. Vdovikin and Nicolas Boichat. .br Copyright 2004\-2005 Oleg I. Vdovikin (oleg@cs.msu.su) .br Copyright 2004\-2006 Nicolas Boichat (nicolas@boichat.ch) .PP This manual page was written by Roberto C. Sanchez . ddccontrol-0.4.4/po/000077500000000000000000000000001327040342400142675ustar00rootroot00000000000000ddccontrol-0.4.4/po/ChangeLog000066400000000000000000000000001327040342400160270ustar00rootroot00000000000000ddccontrol-0.4.4/po/LINGUAS000066400000000000000000000001471327040342400153160ustar00rootroot00000000000000# Set of available languages. # refresh by running: ls *.po | sed 's/[.]po$//' cs de es fr pl ru zh_CN ddccontrol-0.4.4/po/Makevars000066400000000000000000000044151327040342400157670ustar00rootroot00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = $(PACKAGE) # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Oleg I. Vdovikin and Nicolas Boichat # This tells whether or not to prepend "GNU " prefix to the package # name that gets inserted into the header of the $(DOMAIN).pot file. # Possible values are "yes", "no", or empty. If it is empty, try to # detect it automatically by scanning the files in $(top_srcdir) for # "GNU packagename" string. PACKAGE_GNU = no # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = ddccontrol-devel@lists.sourceforge.net # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = PACKAGE_GNU = MSGID_BUGS_ADDRESS = USE_MSGCTXT = no MSGMERGE_OPTIONS = MSGINIT_OPTIONS = PO_DEPENDS_ON_POT = yes DIST_DEPENDS_ON_UPDATE_PO = yes ddccontrol-0.4.4/po/POTFILES.in000066400000000000000000000010021327040342400160350ustar00rootroot00000000000000src/ddccontrol/main.c src/ddcpci/i2c-algo-bit.c src/ddcpci/intel740.c src/ddcpci/intel810.c src/ddcpci/main.c src/ddcpci/nvidia.c src/ddcpci/radeon.c src/ddcpci/sis.c src/ddcpci/via.c src/gddccontrol/fspatterns.c src/gddccontrol/gddccontrol.desktop.in src/gddccontrol/gprofile.c src/gddccontrol/main.c src/gddccontrol/notebook.c src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in src/gnome-ddcc-applet/GNOME_ddcc-applet.xml src/gnome-ddcc-applet/ddcc-applet.c src/lib/conf.c src/lib/ddcci.c src/lib/monitor_db.c ddccontrol-0.4.4/po/POTFILES.skip000066400000000000000000000000621327040342400164020ustar00rootroot00000000000000src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in ddccontrol-0.4.4/po/boldquot.sed000066400000000000000000000003311327040342400166120ustar00rootroot00000000000000s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g s/“/“/g s/â€/â€/g s/‘/‘/g s/’/’/g ddccontrol-0.4.4/po/cs.po000066400000000000000000001146401327040342400152420ustar00rootroot00000000000000# Czech translation for ddccontrol. # This file is distributed under the same license as the ddccontrol package. # Stanislav Brabec , 2010. INCOMPLETE. # msgid "" msgstr "" "Project-Id-Version: ddccontrol 0.4.3\n" "Report-Msgid-Bugs-To: ddccontrol-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2010-01-06 18:52+0100\n" "PO-Revision-Date: 2010-07-07 14:57+0200\n" "Last-Translator: Stanislav Brabec \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../src/ddccontrol/main.c:83 ../src/ddccontrol/main.c:87 #: ../src/ddccontrol/main.c:91 msgid "Control" msgstr "Ovládání" #: ../src/ddccontrol/main.c:132 #, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" "Použití:\n" " %s [-b data_adr] [-v] [-c] [-d] [-f] [-s] [-r prvek [-w hodnota]] [-p | zaÅ™]\n" "\\tzaÅ™: zařízení, napÅ™. dev:/dev/i2c-0\n" "\\t-p: Hledat sbÄ›rnice monitorů mezi I2C zařízeními\n" "\\t-c: dotaz na schopnosti\n" "\\t-d: dotaz na ovládací prvky 0 - 255\n" "\\t-r: dotaz na ovládací prvek\n" "\\t-w: vypsat hodnoty pro ovládací prvek\n" "\\t-f: vynutit (vyhnout se kontrolám platnosti)\n" "\\t-s: uložit nastavení\n" "\\t-v: upovidanost (pro zvýšení zadejte vyšší hodnotu)\n" "\\t-b: adresář s ddccontrol-db (je-li jiný než %s)\n" #: ../src/ddccontrol/main.c:150 ../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "Kontrola integrity %s...\n" #: ../src/ddccontrol/main.c:152 ../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "[ SELHALO ]\n" #: ../src/ddccontrol/main.c:156 ../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "[ OK ]\n" #: ../src/ddccontrol/main.c:217 #, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU " "General Public License.\n" "\n" msgstr "" "ddccontrol verze %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "Tento program je šířen ABSOLUTNÄš BEZ ZÃRUKY.\n" "Můžete šířit kopie tohoto programu za dodržení podmínek GNU General Public License.\n" "\n" #: ../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "'%s' nevypadá jako platné jméno registru\n" #: ../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "Nelze použít parametr -w bez parametru -r.\n" #: ../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "'%s' nevypadá jako platná hodnota.\n" #: ../src/ddccontrol/main.c:292 ../src/gddccontrol/main.c:415 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "Nelze inicializovat knihovnu ddcci.\n" #: ../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "Detekované monitory:\n" #: ../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr "- Zařízení: %s\n" #: ../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr " DDC/CI podporováno: %s\n" #: ../src/ddccontrol/main.c:310 msgid "Yes" msgstr "Ano" #: ../src/ddccontrol/main.c:310 msgid "No" msgstr "Ne" #: ../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr " Jméno monitoru: %s\n" #: ../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr " Typ vstupu: %s\n" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Digital" msgstr "Digitální" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Analog" msgstr "Analogový" #: ../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr " (volen automaticky)\n" #: ../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "Žádný monitor podporující DDC/CI není k dispozici.\n" "Pokud to vaÅ¡e grafická karta potÅ™ebuje, zkontrolujte, zda vÅ¡echny požadované moduly jádra jsou zavedeny (i2c-dev, a vaÅ¡e ovladaÄe frame bufferu).\n" #: ../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "ÄŒte se EDID a inicializuje se DDC/CI na sbÄ›rnici %s...\n" #: ../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "\n" "DDC/CI na %s není použitelný (%d).\n" "Pokud to vaÅ¡e grafická karta potÅ™ebuje, zkontrolujte, zda vÅ¡echny požadované moduly jádra jsou zavedeny (i2c-dev, a vaÅ¡e ovladaÄe frame bufferu).\n" #: ../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "\nNaÄtená EDID:\n" #: ../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "\tIdentifikátor Plug and Play: %s [%s]\n" #: ../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "\tTyp vstupu: %s\n" #. Put a big warning (in red if we are writing to a terminal). #: ../src/ddccontrol/main.c:354 ../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "============================== VAROVÃNà ===============================" #: ../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" "Váš monitor není v databázi podporovaných monitorů, ale ddccontrol\n" "použije obecný profil výrobce vaÅ¡eho monitoru. NÄ›které ovládací prvky\n" "nemusí být podporovány, nebo nemusí fungovat podle oÄekávání.\n" #: ../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" "Váš monitor není v databázi podporovaných monitorů, ale ddccontrol\n" "použije základní obecný profil. Mnoho ovládacích prvků nebude podporováno,\n" "a nÄ›které nemusí fungovat podle oÄekávání.\n" #: ../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" "Prosím aktualizujte ddccontrol-db, nebo, pokud jste již používáte\n" "nejnovÄ›jší verzi, zaÅ¡lete prosím výstup následujícího příkazu na\n" "ddccontrol-users@lists.sourceforge.net:\n" #: ../src/ddccontrol/main.c:372 ../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "DÄ›kujeme.\n" #: ../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "\nSchopnosti:\n" #: ../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "Surový výstup: %s\n" #: ../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "Analyzovaný výstup:\n" #: ../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "\tTyp: " #: ../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "LCD" #: ../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "CRT" #: ../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "Neznámý" #: ../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "NezdaÅ™ilo se naÄíst schopnosti.\n" #: ../src/ddccontrol/main.c:418 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "\nZápis 0x%02x, 0x%02x (%d) (zpoždÄ›ní %dms)...\n" #: ../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "\nZápis 0x%02x, 0x%02x (%d)...\n" #: ../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "\nÄŒtení 0x%02x...\n" #: ../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "\nOvládací prvky (platný/souÄasný/max) [Popis - Název hodnoty]:\n" #: ../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "\t\t> id=%s, název=%s adresa=%#x, zpoždÄ›ní=%dms, typ=%d\n" #: ../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "\t\t Možné hodnoty:\n" #: ../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "\t\t\t> id=%s - název=%s, hodnota=%d\n" #: ../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "\t\t podporován, hodnota=%d, maximum=%d\n" #: ../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "\t\t není podporován, hodnota=%d, maximum=%d\n" #: ../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "\nUkládá se nastavení...\n" #. arbitration or no acknowledge #: ../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "sendbytes: chyba - pomoc.\n" #. read timed out #: ../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "i2c-algo-bit.o: readbytes: Äas i2c_inb vyprÅ¡el.\n" #: ../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "i2c-algo-bit.o: readbytes: v ACK timeout\n" #: ../src/ddcpci/intel740.c:103 ../src/ddcpci/intel810.c:161 #: ../src/ddcpci/nvidia.c:155 ../src/ddcpci/radeon.c:209 #: ../src/ddcpci/sis.c:174 ../src/ddcpci/via.c:167 #, c-format msgid "%s: Malloc error.\n" msgstr "%s: Chyba malloc.\n" #: ../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "%s: ioperm selhalo" #: ../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "%s: Chyba: neznámý typ karty (%#x)\n" #: ../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr " %s: Chyba malloc." #: ../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "i810_open: nelze otevřít /dev/mem" #: ../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "i810_open: Chyba: nelze najít žádný platný MMIO PCI region.\n" #: ../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "i810_open: mmap selhalo" #: ../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "==>Chyba pÅ™i odesílání otevírací zprávy" #: ../src/ddcpci/main.c:178 ../src/ddcpci/main.c:184 ../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "==>Chyba pÅ™i odesílání dat zprávy s odpovÄ›dí" #: ../src/ddcpci/main.c:251 ../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "==>Chyba pÅ™i odesílání zprávy se seznamem" #: ../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "Neplatné argumenty.\n" #: ../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "==>Nelze pÅ™eÄíst upovídanost.\n" #: ../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "==>Nelze naÄíst klíÄ.\n" #: ../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "==>Nelze otevřít klÃ­Ä %u\n" #: ../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "==>BÄ›hem %ld sekund nebyl pÅ™ijat Žádný příkaz, ruší se.\n" #: ../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "==>Chyba pÅ™i příjmu dotazu\n" #: ../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "==>Neplatný dotaz...\n" #: ../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "nvidia.c: init_i2c_bus: Chyba malloc." #: ../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "nvidia_open: nelze otevřít /dev/mem" #: ../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "nvidia_open: mmap selhalo" #: ../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "radeon.c: init_i2c_bus: Chyba malloc." #: ../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "radeon_open: nelze otevřít /dev/mem" #: ../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "radeon_open: mmap selhalo" #: ../src/ddcpci/sis.c:133 #, c-format msgid "sis.c:init_i2c_bus: Malloc error." msgstr "sis.c: init_i2c_bus: Chyba malloc." #: ../src/ddcpci/via.c:125 #, c-format msgid "via.c:init_i2c_bus: Malloc error." msgstr "via.c: init_i2c_bus: Chyba malloc." #: ../src/ddcpci/via.c:177 msgid "via_open: cannot open /dev/mem" msgstr "via_open: cannot open /dev/mem" #: ../src/ddcpci/via.c:186 msgid "via_open: mmap failed" msgstr "via_open: mmap selhalo" #: ../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" "Úprava jasu a kontrastu podle následujících pravidel:\n" "- ÄŒerná, musí být co nejtmavší.\n" "- Bílá by mÄ›la být tak jasná, jak je to možné.\n" "- Musíte být schopni rozliÅ¡it každou úroveň Å¡edé (zvláštÄ› 0 a 12).\n" #: ../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "Snažte se, aby moaré vzorky zmizely." #: ../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" "Nastavte Hrubý zámek obrazu tak, aby zmizel svislý pruh.\n" "Minimalizujte pohyb obrazovce nastavením Jemného zámku obrazu." #: ../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "Neznámý název celoobrazovkového vzorku: %s" #: ../src/gddccontrol/gddccontrol.desktop.in.h:1 msgid "DDC Control" msgstr "Ovládání DDC" #: ../src/gddccontrol/gddccontrol.desktop.in.h:2 msgid "Monitor Settings" msgstr "Nastavení monitoru" #: ../src/gddccontrol/gddccontrol.desktop.in.h:3 msgid "" "Set your monitor preferences (contrast, brightness,...) and manage your " "profiles" msgstr "PÅ™ednastavení monitoru (kontrastu, jasu,...) a správa profilů" #: ../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "Musíte vybrat alespoň jeden ovládací prvek, které má být uložen v profilu." #: ../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "Vytváří se profil..." #: ../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "Chyba pÅ™i vytváření profilu." #: ../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "Použití profilu..." #: ../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "Jste si jisti, že chcete smazat profil ' %s'?" #: ../src/gddccontrol/gprofile.c:142 msgid "" "Please select the controls you want to save in the profile using the " "checkboxes to the left of each control." msgstr "" "Prosím zvolte ovládací prvky, které chcete uložit do profilu pomocí " "zaÅ¡krtávací políÄka nalevo od každé kontroly." #: ../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "Správce profilů" #: ../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "Apply Profil" #: ../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "Show details profil / PÅ™ejmenovat profil" #: ../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "Smazat profil" #: ../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "VytvoÅ™it profil" #: ../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "Zavřít profil manažera" #: ../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "Control name" #: ../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "Value" #: ../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "Address" #: ../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "Raw hodnota" #: ../src/gddccontrol/gprofile.c:434 ../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "Profil informace:" #: ../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "Název souboru: %s" #: ../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "Název profilu" #. Save #: ../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "Saving profil..." #: ../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "Chyba pÅ™i ukládání profilu." #: ../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "Monitor zmÄ›na (%d %d).\n" #: ../src/gddccontrol/main.c:330 msgid "Probing for available monitors..." msgstr "Probing k dispozici monitory..." #: ../src/gddccontrol/main.c:369 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver)." msgstr "" "No monitor podporuje DDC / CI k dispozici.\n" "\n" "Pokud vaÅ¡e grafická karta potÅ™ebuje, Zkontrolujte, zda vÅ¡echny požadované " "moduly jádra jsou zavedeny (I2C-dev, a vaÅ¡e frame buffer Å™idiÄe)." #: ../src/gddccontrol/main.c:421 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "Nelze inicializovat knihovnu ddcci, viz konzole pro více informací.\n" #: ../src/gddccontrol/main.c:431 msgid "Monitor settings" msgstr "Nastavení monitoru" #: ../src/gddccontrol/main.c:455 msgid "Current monitor: " msgstr "Aktuální monitor: " #: ../src/gddccontrol/main.c:465 msgid "Refresh monitor list" msgstr "Aktualizovat seznam monitorů" #: ../src/gddccontrol/main.c:482 msgid "Profile manager" msgstr "Správce profilů" #: ../src/gddccontrol/main.c:489 msgid "Save profile" msgstr "Uložit profil" #: ../src/gddccontrol/main.c:495 msgid "Cancel profile creation" msgstr "ZruÅ¡it vytvoÅ™ení profilu" #: ../src/gddccontrol/main.c:519 msgid "OK" msgstr "OK" #: ../src/gddccontrol/main.c:547 msgid "Refresh" msgstr "Aktualizovat" #: ../src/gddccontrol/main.c:547 msgid "Refresh all controls" msgstr "Aktualizovat vÅ¡echny ovládací prvky" #: ../src/gddccontrol/main.c:554 msgid "Close" msgstr "Zavřít" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../src/gddccontrol/main.c:593 #, c-format msgid "Welcome to gddccontrol %s." msgstr "Vítejte v gddccontrol %s." #: ../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "Chyba pÅ™i získávání hodnoty" #: ../src/gddccontrol/notebook.c:116 ../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "Aktualizují se nastavené hodnoty (%d %%)..." #: ../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "Nelze získat control_db struct související s ovládáním." #: ../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "Zobrazit celoobrazovkové vzory" #: ../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "Oddíl" #: ../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of " "monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other " "input, and then click on the refresh button near the monitor list." msgstr "" "SouÄasný monitor je v databázi, ale nepodporuje DDC/CI.\n" "\n" "K tomu Äasto dochází pÅ™i pÅ™ipojení VGA/DVI kabelu na nevhodný vstup u monitorů, které podporují DDC/CI pouze na jednom ze dvou vstupů.\n" "\n" "Pokud má váš monitor má dva vstupy, prosím, zkuste pÅ™ipojit kabel na jiný vstup, a potom kliknÄ›te na obnovovací tlaÄítko poblíž seznamu monitorů." #: ../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "Otvírá se zařízení monitoru (%s)..." #: ../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near " "the monitor list." msgstr "" "DoÅ¡lo k chybÄ› pÅ™i otevírání zařízení monitoru.\n" "Možná, že byl tento monitor odpojen, kliknÄ›te na obnovovací tlaÄítko poblíž seznamu monitorů." #: ../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" "Aktuální monitor není podporován, spusÅ¥te\n" "%s\n" "a odeÅ¡lete výstup na ddccontrol-users@lists.sourceforge.net.\n" "DÄ›kujeme." #: ../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "Prosím, kliknÄ›te na název skupiny." #: ../src/gddccontrol/notebook.c:639 ../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "Získávají se nastavené hodnoty (%d %%)..." #: ../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "ÄŒtou se profily..." #: ../src/gddccontrol/notebook.c:677 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls may " "not be supported, or may not work as expected.\n" msgstr "Váš monitor není zanesen v databázi, ale ddccontrol používá obecný profil výrobce monitoru. NÄ›které ovládací prvky nemusí být podporovány nebo nemusí fungovat podle oÄekávání.\n" #: ../src/gddccontrol/notebook.c:683 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and some " "controls may not work as expected.\n" msgstr "Váš monitor není zanesen v databázi, ale ddccontrol používá obecný profil. Mnohé ovládací prvky nebudou podporovány, nÄ›které nemusí fungovat podle oÄekávání.\n" #: ../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "Varování!" #: ../src/gddccontrol/notebook.c:690 msgid "" "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to ddccontrol-" "users@lists.sourceforge.net:\n" msgstr "Prosím aktualizujte ddccontrol-db, nebo, pokud již používáte nejnovÄ›jší verzi, zaÅ¡lete prosím výstup následujícího příkazu na ddccontrol-users@lists.sourceforge.net:\n" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "PÅ™epínaÄ profilů monitoru" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "Rychle pÅ™epíná profily monitoru vytvoÅ™ené pomocí gddccontrol" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "_O aplikaci..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "_Vlastosti..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "_Spustit gddccontrol..." #: ../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "Applet pro rychlé pÅ™epínání profilů monitoru.\n" "Založeno na libddccontrol a Äásti projektu ddccontrol.\n" "(http://ddccontrol.sourceforge.net)" #: ../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "Nelze inicializovat knihovnu ddcci" #: ../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "Žádné konfigurace monitoru nebyly nalezeny. SpusÅ¥te nejdříve gddccontrol" #: ../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "DoÅ¡lo k chybÄ› pÅ™i otevírání zařízení monitoru" #: ../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "Žádné profily nebyly nalezeny" #. only reached, if init was not finished #: ../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "chyba" #: ../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "Monitor:" #: ../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "Vlastnosti pÅ™epínaÄe profilů monitoru" #: ../src/lib/conf.c:61 ../src/lib/conf.c:258 ../src/lib/conf.c:308 #: ../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "Nelze vytvoÅ™it jméno souboru (buffer je příliÅ¡ malý)\n" #: ../src/lib/conf.c:86 ../src/lib/conf.c:363 ../src/lib/monitor_db.c:350 #: ../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "Dokument nebyl analyzován úspěšnÄ›.\n" #: ../src/lib/conf.c:93 ../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "prázdný soubor profilu\n" #: ../src/lib/conf.c:99 ../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "profil nevhodného typu, koÅ™enový uzel %s! = profil" #: ../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "Nebyla nalezena vlastnost verze dccontrol." #: ../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "ddccontrol byl od posledního zápisu seznamu monitorů aktualizován (%s proti %s).\n" #: ../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "Nebyla nalezena vlastnost jména souboru." #: ../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "Nebyla nalezena vlastnost podpory." #: ../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "Cannot convert podporována vlastnost int." #: ../src/lib/conf.c:138 ../src/lib/conf.c:385 ../src/lib/monitor_db.c:90 #: ../src/lib/monitor_db.c:194 ../src/lib/monitor_db.c:370 #: ../src/lib/monitor_db.c:426 ../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "Nebylo nalezeno jméno vlastnosti." #: ../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "Cannot find digitální majetek." #: ../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "Cannot convert digitální majetek int." #: ../src/lib/conf.c:175 ../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "Nelze vytvoÅ™it xml spisovatel\n" #: ../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "Cannot read kontrolní hodnota\n" #: ../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "Cannot write kontrolní hodnota\n" #: ../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "Chyba pÅ™i otevírání ddccontrol domovském adresáři." #: ../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "Chyba pÅ™i Ätení ddccontrol domovském adresáři." #: ../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "Cannot find pnpid majetku." #: ../src/lib/conf.c:388 ../src/lib/conf.c:391 msgid "Can't find version property." msgstr "Cannot find version majetku." #: ../src/lib/conf.c:390 ../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "Cannot convert int verzi." #: ../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "Profil verzi (%d) není podporován (mÄ›l by být %d).\n" #: ../src/lib/conf.c:407 ../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "Cannot find adresu majetku." #: ../src/lib/conf.c:409 ../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "Cannot convert adresu int." #: ../src/lib/conf.c:413 ../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "Cannot find hodnotu majetku." #: ../src/lib/conf.c:415 ../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "Cannot convert hodnotu int." #: ../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "ddcci_delete_profile: Chyba, nelze smazat profil.\n" #: ../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "ddcci_delete_profile: Chyba, nemohl najít profil smazat.\n" #: ../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "Chyba pÅ™i init mentalis Racing fronta zpráv" #: ../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "Chyba pÅ™i odesílání zprávy quit" #: ../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "Chyba pÅ™i odesílání zprávy Heartbeat" #: ../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "NepodaÅ™ilo se inicializovat ddccontrol databází...\n" #: ../src/lib/ddcci.c:275 ../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "ioctl vrátil %d\n" #: ../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "Chyba pÅ™i odesílání zprávy napsat" #: ../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "Chyba pÅ™i Ätení zprávy napsat odpovÄ›Ä" #: ../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "Chyba pÅ™i odesílání zprávy Äíst" #: ../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "Chyba pÅ™i Ätení zprávy Äíst odpovÄ›Ä" #: ../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "Invalid odpovÄ›Ä, první bajt je 0x %02x, by mÄ›la být 0x %02x\n" #: ../src/lib/ddcci.c:485 #, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "Non-Fatal error: Neplatná odpovÄ›Ä, magie je 0x %02x\n" #: ../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "Invalid odpovÄ›Ä, délka %d, by mÄ›la být maximálnÄ› %d\n" #: ../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "Invalid odpovÄ›Ä, poÅ¡kozená data - XOR je 0x %02x, délka 0x %02x\n" #: ../src/lib/ddcci.c:658 ../src/lib/ddcci.c:680 #, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "Cannot convert hodnotu int, neplatné Capsis (buf = %s, pos = %d).\n" #: ../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "Neplatná sekvence v víÄka.\n" #: ../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "Corrupted EDID na 0x %02x.\n" #: ../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "Sériové Äíslo: %d\n" #: ../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "Výrobce: Týden %d, %d\n" #: ../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "EDID version: %d. %d\n" #: ../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "Maximální velikost: %d × %d (cm)\n" #: ../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "Reading EDID 0x %02x selhal.\n" #: ../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "Device: %s\n" #: ../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "Chyba pÅ™i odesílání zprávy otevřít" #: ../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "Chyba pÅ™i Ätení zpráv otevÅ™ené odpovÄ›Ä" #: ../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "Neplatný název souboru (%s).\n" #: ../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "ddcci_open vrátil %d\n" #: ../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "Unknown monitor (%s)" #: ../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "Probing k dispozici monitory" #: ../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "Chyba pÅ™i odesílání zprávy Seznam" #: ../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "Chyba pÅ™i Ätení seznamu položku" #: ../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "Found PCI zařízení (%s)\n" #: ../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "Found I2C zařízení (%s)\n" #: ../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "Chyba pÅ™i získávání informací o ddccontrol domovském adresáři." #: ../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "Chyba pÅ™i vytváření ddccontrol domovském adresáři." #: ../src/lib/ddcci.c:1216 msgid "" "Error while getting information about ddccontrol home directory after " "creating it." msgstr "" "Chyba pÅ™i získávání informací o ddccontrol domovský adresář po vytvoÅ™ení to." #: ../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "Error: '. ddccontrol' ve vaÅ¡em domovském adresáři není adresář." #: ../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "Chyba pÅ™i získávání informací o ddccontrol profilu." #: ../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "Chyba pÅ™i vytváření ddccontrol profilu." #: ../src/lib/ddcci.c:1241 msgid "" "Error while getting information about ddccontrol profile directory after " "creating it." msgstr "Chyba pÅ™i získávání informací o ddccontrol profilu po vytvoÅ™ení to." #: ../src/lib/ddcci.c:1248 msgid "" "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "" "Error: '. ddccontrol / profiles' ve vaÅ¡em domovském adresáři není adresář." #: ../src/lib/monitor_db.c:82 ../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "Cannot find id majetku." #: ../src/lib/monitor_db.c:151 ../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "Element %s (id = %s) nebyl nalezen (řádek %ld).\n" #: ../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "Invalid Obnovit typ (! nula! = all)." #: ../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "Control %s byl odstraňují víÄka Å™etÄ›zce.\n" #: ../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "Control %s (0x %02x) již byl definován.\n" #: ../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "Cannot convert zpoždÄ›ní int." #: ../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "Cannot find typu vlastnictví." #: ../src/lib/monitor_db.c:292 ../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "Neplatný typ." #: ../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "Database musí být pÅ™ed Ätením inited monitor souboru.\n" #: ../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "empty monitor / %s.xml\n" #: ../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "monitor / %s.xml o nevhodný typ, koÅ™en %s! = monitor" #: ../src/lib/monitor_db.c:464 msgid "Can't find add or remove property in caps." msgstr "Cannot find pÅ™idat Äi odebrat majetek Äepice." #: ../src/lib/monitor_db.c:466 msgid "Invalid remove caps." msgstr "Invalid odstranit Äepice." #: ../src/lib/monitor_db.c:468 msgid "Invalid add caps." msgstr "Invalid pÅ™idat Äepice." #: ../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "Error, vÄetnÄ› rekurze úrovni> 15 (soubor: %s).\n" #: ../src/lib/monitor_db.c:479 msgid "Can't find file property." msgstr "Nelze nalézt soubor majetku." #: ../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "Dva ovládací Äást v souboru XML." #: ../src/lib/monitor_db.c:534 msgid "Error enumerating controls in subgroup." msgstr "Error výÄtu ovládacích prvků v podskupinÄ›." #: ../src/lib/monitor_db.c:589 #, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "doklad o nevhodný typ, nemohou najít ovládací prvky nebo obsahují.\n" #: ../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "empty options.xml\n" #: ../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "options.xml o nevhodný typ, koÅ™en %s! = volby" #: ../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "" "options.xml dbversion atribut chybí, aktualizujte prosím své databázi.\n" #: ../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "options.xml datum atribut chybí, aktualizujte prosím své databázi.\n" #: ../src/lib/monitor_db.c:755 #, c-format msgid "" "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "options.xml dbversion (%d) je vÄ›tší než podporovanou verzi (%d).\n" #: ../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "Prosím aktualizujte ddccontrol programu.\n" #: ../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "options.xml dbversion (%d) je menší než podporovanou verzi (%d).\n" #: ../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "Prosím aktualizujte ddccontrol databázi.\n" ddccontrol-0.4.4/po/de.po000066400000000000000000000644471327040342400152360ustar00rootroot00000000000000# German translation of PACKAGE. # Copyright (C) 2005 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # Christian Schilling , 2005. # , fuzzy # # msgid "" msgstr "" "Project-Id-Version: DDC/CI control tool 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-08-29 19:01+0800\n" "PO-Revision-Date: 2005-09-21 12:47+0200\n" "Last-Translator: Christian Schilling \n" "Language-Team: German\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../src/ddccontrol/main.c:83 ../src/ddccontrol/main.c:87 #: ../src/ddccontrol/main.c:91 msgid "Control" msgstr "" #: ../src/ddccontrol/main.c:132 #, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" #: ../src/ddccontrol/main.c:150 ../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "" #: ../src/ddccontrol/main.c:152 ../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "" #: ../src/ddccontrol/main.c:156 ../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "" #: ../src/ddccontrol/main.c:217 #, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU " "General Public License.\n" "\n" msgstr "" #: ../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "" #: ../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "" #: ../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "" #: ../src/ddccontrol/main.c:292 ../src/gddccontrol/main.c:414 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "" #: ../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "" #: ../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr "" #: ../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr "" #: ../src/ddccontrol/main.c:310 msgid "Yes" msgstr "" #: ../src/ddccontrol/main.c:310 msgid "No" msgstr "" #: ../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr "" #: ../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr "" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Digital" msgstr "" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Analog" msgstr "" #: ../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr "" #: ../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" #: ../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "" #: ../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" #: ../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "" #: ../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "" #: ../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "" #. Put a big warning (in red if we are writing to a terminal). #: ../src/ddccontrol/main.c:354 ../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "" #: ../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" #: ../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" #: ../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" #: ../src/ddccontrol/main.c:372 ../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "" #: ../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "" #: ../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "" #: ../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "" #: ../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "" #: ../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "" #: ../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "" #: ../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "" #: ../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "" #: ../src/ddccontrol/main.c:418 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "" #: ../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "" #: ../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "" #: ../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "" #: ../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "" #: ../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "" #: ../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "" #: ../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "" #: ../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "" #: ../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "" #. arbitration or no acknowledge #: ../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "" #. read timed out #: ../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "" #: ../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "" #: ../src/ddcpci/intel740.c:103 ../src/ddcpci/intel810.c:161 #: ../src/ddcpci/nvidia.c:155 ../src/ddcpci/radeon.c:209 #, c-format msgid "%s: Malloc error.\n" msgstr "" #: ../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "" #: ../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "" #: ../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr "" #: ../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "" #: ../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "" #: ../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "" #: ../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "" #: ../src/ddcpci/main.c:178 ../src/ddcpci/main.c:184 ../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "" #: ../src/ddcpci/main.c:251 ../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "" #: ../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "" #: ../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "" #: ../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "" #: ../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "" #: ../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "" #: ../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "" #: ../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "" #: ../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "" #: ../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "" #: ../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "" #: ../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "" #: ../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "" #: ../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "" #: ../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" #: ../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "" #: ../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" #: ../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "" #: ../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "" #: ../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "" #: ../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "" #: ../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "" #: ../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "" #: ../src/gddccontrol/gprofile.c:142 msgid "" "Please select the controls you want to save in the profile using the " "checkboxes to the left of each control." msgstr "" #: ../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "" #: ../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "" #: ../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "" #: ../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "" #: ../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "" #: ../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "" #: ../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "" #: ../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "" #: ../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "" #: ../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "" #: ../src/gddccontrol/gprofile.c:434 ../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "" #: ../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "" #: ../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "" #. Save #: ../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "" #: ../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "" #: ../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "" #: ../src/gddccontrol/main.c:329 msgid "Probing for available monitors..." msgstr "" #: ../src/gddccontrol/main.c:368 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver)." msgstr "" #: ../src/gddccontrol/main.c:420 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "" #: ../src/gddccontrol/main.c:430 msgid "Monitor settings" msgstr "Bildschirmeinstellungen" #: ../src/gddccontrol/main.c:454 msgid "Current monitor: " msgstr "" #: ../src/gddccontrol/main.c:464 msgid "Refresh monitor list" msgstr "" #: ../src/gddccontrol/main.c:481 msgid "Profile manager" msgstr "" #: ../src/gddccontrol/main.c:488 msgid "Save profile" msgstr "" #: ../src/gddccontrol/main.c:494 msgid "Cancel profile creation" msgstr "" #: ../src/gddccontrol/main.c:518 msgid "OK" msgstr "" #: ../src/gddccontrol/main.c:546 msgid "Refresh" msgstr "" #: ../src/gddccontrol/main.c:546 msgid "Refresh all controls" msgstr "" #: ../src/gddccontrol/main.c:553 msgid "Close" msgstr "" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../src/gddccontrol/main.c:592 #, c-format msgid "Welcome to gddccontrol %s." msgstr "" #: ../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "" #: ../src/gddccontrol/notebook.c:116 ../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "" #: ../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "" #: ../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "" #: ../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "" #: ../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of " "monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other " "input, and then click on the refresh button near the monitor list." msgstr "" #: ../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "" #: ../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near " "the monitor list." msgstr "" #: ../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" #: ../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "" #: ../src/gddccontrol/notebook.c:639 ../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "" #: ../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "" #: ../src/gddccontrol/notebook.c:677 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls may " "not be supported, or may not work as expected.\n" msgstr "" #: ../src/gddccontrol/notebook.c:683 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and some " "controls may not work as expected.\n" msgstr "" #: ../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "" #: ../src/gddccontrol/notebook.c:690 msgid "" "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to ddccontrol-" "users@lists.sourceforge.net:\n" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "Ein Applet zum schnellen Wechseln zwischen Bildschirmprofilen.\n" "Basiert auf libddccontrol und ist Teil des ddccontrol Projektes.\n" "(http://ddccontrol.sourceforge.net)" #: ../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "" #. only reached, if init was not finished #: ../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "" #: ../src/lib/conf.c:61 ../src/lib/conf.c:258 ../src/lib/conf.c:308 #: ../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "" #: ../src/lib/conf.c:86 ../src/lib/conf.c:363 ../src/lib/monitor_db.c:350 #: ../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "" #: ../src/lib/conf.c:93 ../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "" #: ../src/lib/conf.c:99 ../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "" #: ../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "" #: ../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "" #: ../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "" #: ../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "" #: ../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "" #: ../src/lib/conf.c:138 ../src/lib/conf.c:385 ../src/lib/monitor_db.c:90 #: ../src/lib/monitor_db.c:194 ../src/lib/monitor_db.c:370 #: ../src/lib/monitor_db.c:426 ../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "" #: ../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "" #: ../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "" #: ../src/lib/conf.c:175 ../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "" #: ../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "" #: ../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "" #: ../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "" #: ../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "" #: ../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "" #: ../src/lib/conf.c:388 ../src/lib/conf.c:391 msgid "Can't find version property." msgstr "" #: ../src/lib/conf.c:390 ../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "" #: ../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "" #: ../src/lib/conf.c:407 ../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "" #: ../src/lib/conf.c:409 ../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "" #: ../src/lib/conf.c:413 ../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "" #: ../src/lib/conf.c:415 ../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "" #: ../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "" #: ../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "" #: ../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "" #: ../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "" #: ../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "" #: ../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "" #: ../src/lib/ddcci.c:275 ../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "" #: ../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "" #: ../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "" #: ../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "" #: ../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "" #: ../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "" #: ../src/lib/ddcci.c:485 #, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "" #: ../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "" #: ../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "" #: ../src/lib/ddcci.c:658 ../src/lib/ddcci.c:680 #, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "" #: ../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "" #: ../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "" #: ../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "" #: ../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "" #: ../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "" #: ../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "" #: ../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "" #: ../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "" #: ../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "" #: ../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "" #: ../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "" #: ../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "" #: ../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "" #: ../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "" #: ../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "" #: ../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "" #: ../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "" #: ../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "" #: ../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "" #: ../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "" #: ../src/lib/ddcci.c:1216 msgid "" "Error while getting information about ddccontrol home directory after " "creating it." msgstr "" #: ../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "" #: ../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "" #: ../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "" #: ../src/lib/ddcci.c:1241 msgid "" "Error while getting information about ddccontrol profile directory after " "creating it." msgstr "" #: ../src/lib/ddcci.c:1248 msgid "" "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "" #: ../src/lib/monitor_db.c:82 ../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "" #: ../src/lib/monitor_db.c:151 ../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "" #: ../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "" #: ../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "" #: ../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "" #: ../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "" #: ../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "" #: ../src/lib/monitor_db.c:292 ../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "" #: ../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "" #: ../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "" #: ../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "" #: ../src/lib/monitor_db.c:464 msgid "Can't find add or remove property in caps." msgstr "" #: ../src/lib/monitor_db.c:466 msgid "Invalid remove caps." msgstr "" #: ../src/lib/monitor_db.c:468 msgid "Invalid add caps." msgstr "" #: ../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "" #: ../src/lib/monitor_db.c:479 msgid "Can't find file property." msgstr "" #: ../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "" #: ../src/lib/monitor_db.c:534 msgid "Error enumerating controls in subgroup." msgstr "" #: ../src/lib/monitor_db.c:589 #, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "" #: ../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "" #: ../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "" #: ../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "" #: ../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "" #: ../src/lib/monitor_db.c:755 #, c-format msgid "" "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "" #: ../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "" #: ../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "" #: ../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "" #~ msgid "Monitor Settings" #~ msgstr "Bildschirmeinstellungen" ddccontrol-0.4.4/po/en@boldquot.header000066400000000000000000000024711327040342400177210ustar00rootroot00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # ddccontrol-0.4.4/po/en@quot.header000066400000000000000000000022631327040342400170570ustar00rootroot00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # ddccontrol-0.4.4/po/es.po000066400000000000000000001211301327040342400152340ustar00rootroot00000000000000# ddccontrol # Copyright (C) 2007 Roberto C. Sánchez # This file is distributed under the same license as the ddcontrol package. # Roberto C. Sánchez , 2007 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 0.4.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2007-10-28 04:48-0400\n" "PO-Revision-Date: 2007-1028 04:52-0400\n" "Last-Translator: Roberto C. Sánchez \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../../po/../src/ddccontrol/main.c:83 ../../po/../src/ddccontrol/main.c:87 #: ../../po/../src/ddccontrol/main.c:91 msgid "Control" msgstr "Control" #: ../../po/../src/ddccontrol/main.c:132 #, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" "Uso:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: dispositivo, e.g. dev:/dev/i2c-0\n" "\t-p : investigar dispositivos I2C para encontrar buses del monitor\n" "\t-c : cuestionar habilidad\n" "\t-d : cuestionar controles 0 - 255\n" "\t-r : cuestionar control\n" "\t-w : valor para escribir a control\n" "\t-f : forzar (evitar comprobar validez)\n" "\t-s : guardar configuración\n" "\t-v : verbosidad (especificar más para aumentar)\n" "\t-b : directorio ddccontrol-db (si no es %s)\n" #: ../../po/../src/ddccontrol/main.c:150 ../../po/../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "Chequeando integridad de %s...\n" #: ../../po/../src/ddccontrol/main.c:152 ../../po/../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "[ FALLÓ ]\n" #: ../../po/../src/ddccontrol/main.c:156 ../../po/../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "[ BIEN ]\n" #: ../../po/../src/ddccontrol/main.c:217 #, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU " "General Public License.\n" "\n" msgstr "" "ddccontrol versión %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "Este programa trae NINGUNA GARANTIA.\n" "Puedes redistribuir copias de este programa bajo los términos del GNU " "General Public License.\n" "\n" #: ../../po/../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "'%s' no se parece a un nombre válido de registro\n" #: ../../po/../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "No puedes usar al parámetro -w sin -r.\n" #: ../../po/../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "'%s; no se parece a un valor válido.\n" #: ../../po/../src/ddccontrol/main.c:292 #: ../../po/../src/gddccontrol/main.c:414 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "No se pudo inicializar la biblioteca ddcci.\n" #: ../../po/../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "Monitores detectados :\n" #: ../../po/../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr " - Dispositivo: %s\n" #: ../../po/../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr " DDC/CI soportado: %s\n" #: ../../po/../src/ddccontrol/main.c:310 msgid "Yes" msgstr "Sí" #: ../../po/../src/ddccontrol/main.c:310 msgid "No" msgstr "No" #: ../../po/../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr " Nombre de Montor %s\n" #: ../../po/../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr " Tipo de entrada: %s\n" #: ../../po/../src/ddccontrol/main.c:312 ../../po/../src/ddccontrol/main.c:350 msgid "Digital" msgstr "Digital" #: ../../po/../src/ddccontrol/main.c:312 ../../po/../src/ddccontrol/main.c:350 msgid "Analog" msgstr "Analógico" #: ../../po/../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr " (Escogido automaticamente)\n" #: ../../po/../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "No hay monitor disponible que soporta DDC/CI.\n" "Si le hace falta a tu tarjeta de gráficos, por favor verifique que todos los " "módulos requeridos del núcleo están cargados (i2c-dev, y el manejador del framebuffer).\n" #: ../../po/../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "Leendo EDID e incializando DDC/CI en el bus %s...\n" #: ../../po/../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "\n" "DDC/CI en %s es inutilizable (%d).\n" "Si le hace falta a tu tarjeta de gráficos, por favor verifique que todos los " "módulos requeridos del núcleo están cargados (i2c-dev, y el manejador del framebuffer).\n" #: ../../po/../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "" "\n" "Lecturas EDID:\n" #: ../../po/../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "\tIdentificación Plug and Play: [%s]\n" #: ../../po/../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "\tTipo de entrada: %s\n" #. Put a big warning (in red if we are writing to a terminal). #: ../../po/../src/ddccontrol/main.c:354 ../../po/../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "================================ AVISO ================================" #: ../../po/../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" "No hay soporte para tu monitor en el base de datos, pero ddccontrol está\n" "utilizando un perfíl genérico que corresponde al fabricante de tu monitor.\n" "Algunos controles no serán soportados, o no funcionarán de la forma esperado.\n" #: ../../po/../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" "No hay soporte para tu monitor en el base de datos, pero ddccontrol está\n" "utilizando un perfíl genérico. Muchos controles no serán soportados, y\n" "algunos controles no funcionarán de la forma esperado.\n" #: ../../po/../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" "Por favor actualize ddccontrol-db, o, si ya estás usando la versión\n" "última, por favor mande la salida de esta instrucción a\n" "ddccontrol-users@lists.sourceforge.net:\n" #: ../../po/../src/ddccontrol/main.c:372 #: ../../po/../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "Gracias.\n" #: ../../po/../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "" "\n" "Habilidades:\n" #: ../../po/../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "Salida sin preparar: %s\n" #: ../../po/../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "Salida perparada: \n" #: ../../po/../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "\tTipo: " #: ../../po/../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "visor de cristal líquido" #: ../../po/../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "CRT" #: ../../po/../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "Desconocido" #: ../../po/../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "Fallo de lectura de habilidades.\n" #: ../../po/../src/ddccontrol/main.c:418 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "" "\n" "Escribiendo 0x%02x, 0x%02x(%d) (demora de %dms)...\n" #: ../../po/../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "" "\n" "Escribiendo 0x%02x, 0x%02x(%d)...\n" #: ../../po/../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "" "\n" "Leendo 0x%02x...\n" #: ../../po/../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "" "\n" "Controles (válido/actual/máximo) [Descripción - Nombre de valor]:\n" #: ../../po/../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "\t\t> identificación=%s, nombre=%s, dirección=%#x, demora=%dms, tipo=%d\n" #: ../../po/../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "\t\t Valores posibles:\n" #: ../../po/../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "\t\t\t> identificación=%s - nombre=%s, valor=%d\n" #: ../../po/../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "\t\t soportado, valor=%d, máximo=%d\n" #: ../../po/../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "\t\t no soportado, valor=%d, máximo=%d\n" #: ../../po/../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "" "\n" "Guardando configuración...\n" #. arbitration or no acknowledge #: ../../po/../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "sendbytes: error - saliendo.\n" #. read timed out #: ../../po/../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "i2c-algo-bit.o: readbytes: i2c_inb desconexión por tiempo.\n" #: ../../po/../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "i2c-algo-bit.o: readbytes: Desconexión por tiempo en ack\n" #: ../../po/../src/ddcpci/intel740.c:103 ../../po/../src/ddcpci/intel810.c:161 #: ../../po/../src/ddcpci/nvidia.c:155 ../../po/../src/ddcpci/radeon.c:209 #, c-format msgid "%s: Malloc error.\n" msgstr "%s: Error malloc.\n" #: ../../po/../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "%s: falló ioperm" #: ../../po/../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "%s: Error: tipo de tarjeta desconocido (%#x)\n" #: ../../po/../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr "%s: Error malloc." #: ../../po/../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "i810_open: no se puede abrir /dev/mem" #: ../../po/../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "i810_open: Error: no se encuentran regiones MMIO PCI válidos.\n" #: ../../po/../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "i810_open: mmap failed" #: ../../po/../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "==>Error mandando mensaje para abrir" #: ../../po/../src/ddcpci/main.c:178 ../../po/../src/ddcpci/main.c:184 #: ../../po/../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "==>Error mandando mensaje para contestar datos" #: ../../po/../src/ddcpci/main.c:251 ../../po/../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "==>Error mandando mensaje para listar" #: ../../po/../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "Argumentos inválidos.\n" #: ../../po/../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "==>No se puede leer verbosidád.\n" #: ../../po/../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "==>No se puede leer llave.\n" #: ../../po/../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "==>No se puede abrir llave %u\n" #: ../../po/../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "==>Instrucción no recibido por %ld segundos, abortando.\n" #: ../../po/../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "==>Error mientras recibiendo cuestión\n" #: ../../po/../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "==>Cuestión inválido...\n" #: ../../po/../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "nvidia.c:init_i2c_bus: Error malloc." #: ../../po/../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "nvidia_open: no se puede abrir /dev/mem" #: ../../po/../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "nvidia_open: falló mmap" #: ../../po/../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "radeon.c:init_i2c_bus: Error malloc." #: ../../po/../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "radeon_open: no se puede abrir /dev/mem" #: ../../po/../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "radeon_open: falló mmap" #: ../../po/../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" "Ajuste viveza y contraste siguiendo estas reglas:\n" " - Negro tiene que ser lo mas oscuro posible.\n" " - Blanco debe ser lo mas vivo posible.\n" " - Tu tienes que distinguir cada nivel de gris (especialmente 0 y 12).\n" #: ../../po/../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "Intente hacer los patrones moire desaparecer." #: ../../po/../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" "Ajuste Seguro Grueso de Imagen para hacer las bandas verticales desaparecer.\n" "Ajuste Seguri Fino de Imagen para minimizar movimiento en la pantalla." #: ../../po/../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "Patrón de pantalla entero desconocido: %s" #: ../../po/../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "Tienes que escoger por lo menos un control que sea guardado en el perfíl." #: ../../po/../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "Creando perfíl..." #: ../../po/../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "Error creando perfíl." #: ../../po/../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "Aplicando perfíl..." #: ../../po/../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "Estás seguro que quieres borrar el perfíl '%s'?" #: ../../po/../src/gddccontrol/gprofile.c:142 msgid "" "Please select the controls you want to save in the profile using the " "checkboxes to the left of each control." msgstr "" "Por favor escoge los controles que quieres guardar en el perfíl utilizando " "las cajitas a la izquierda de cada control." #: ../../po/../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "Gerente de Perfiles" #: ../../po/../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "Aplicar perfíl" #: ../../po/../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "Enseñar detalles del perfíl / Renombrar perfíl" #: ../../po/../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "Borrar perfíl" #: ../../po/../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "Crear perfíl" #: ../../po/../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "Cerrar gerente de perfiles" #: ../../po/../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "Nombre de control" #: ../../po/../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "Valor" #: ../../po/../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "Dirección" #: ../../po/../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "Valor sin preparar" #: ../../po/../src/gddccontrol/gprofile.c:434 #: ../../po/../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "Información de perfíl:" #: ../../po/../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "Nombre de ficher: %s" #: ../../po/../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "Nombre de perfíl:" #. Save #: ../../po/../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "Guardando perfíl..." #: ../../po/../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "Error guardando perfíl." #: ../../po/../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "Monitor cambiado (%d %d).\n" #: ../../po/../src/gddccontrol/main.c:329 msgid "Probing for available monitors..." msgstr "Investigando monitores disponibles..." #: ../../po/../src/gddccontrol/main.c:368 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver)." msgstr "" "No hay monitor disponible que soporta DDC/CI.\n" "\n" "Si le hace falta a tu tarjeta de gráficos, por favor verifique que todos los " "módulos requeridos del núcleo están cargados (i2c-dev, y el manejador del framebuffer)." #: ../../po/../src/gddccontrol/main.c:420 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "No se pudo inicializar la biblioteca ddcci, vea la consola para detalles.\n" #: ../../po/../src/gddccontrol/main.c:430 msgid "Monitor settings" msgstr "Configuración de monitor" #: ../../po/../src/gddccontrol/main.c:454 msgid "Current monitor: " msgstr "Monitor actial: " #: ../../po/../src/gddccontrol/main.c:464 msgid "Refresh monitor list" msgstr "Actualizar lista de monitores" #: ../../po/../src/gddccontrol/main.c:481 msgid "Profile manager" msgstr "Gerente de perfiles" #: ../../po/../src/gddccontrol/main.c:488 msgid "Save profile" msgstr "Guardar perfíl" #: ../../po/../src/gddccontrol/main.c:494 msgid "Cancel profile creation" msgstr "Cancelar creación de perfíl" #: ../../po/../src/gddccontrol/main.c:518 msgid "OK" msgstr "Bien" #: ../../po/../src/gddccontrol/main.c:546 msgid "Refresh" msgstr "Actualizar" #: ../../po/../src/gddccontrol/main.c:546 msgid "Refresh all controls" msgstr "Actualizar todos los controles" #: ../../po/../src/gddccontrol/main.c:553 msgid "Close" msgstr "Cerrar" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../../po/../src/gddccontrol/main.c:592 #, c-format msgid "Welcome to gddccontrol %s." msgstr "Bienvenidos a gddccontrol %s." #: ../../po/../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "Error obteniendo valor" #: ../../po/../src/gddccontrol/notebook.c:116 #: ../../po/../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "Actualizando valores de control (%d%%)..." #: ../../po/../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "No se pudo obtener la estructura control_db relacionado a un control." #: ../../po/../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "Enseñe patrones de pantalla entero" #: ../../po/../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "Sección" #: ../../po/../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of " "monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other " "input, and then click on the refresh button near the monitor list." msgstr "" "El monitor actual está en el base de datos pero on soporta DDC/CI.\n" "\n" "Muchas veces, esto pasa cuando tu connectas el cable VGA/DVI a la entrada " "incorrecto de monitores soportando DDC/CI solamente en una de las dos entradas.\n" "\n" "Si tu monitor tiene dos entradas, por favor intente conectar el cable a la " "otra entrada, y entonces presione el botón para actualizar la lista de monitores." #: ../../po/../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "Abriendo el dispositivo del monitor (%s)..." #: ../../po/../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near " "the monitor list." msgstr "" "Ocurrió un error abriendo el dispositivo del monitor.\n" "Tal vez este monitor estaba desconectado, por favor presione el botón para " "actualizar la list de monitores." #: ../../po/../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" "El monitor actual no es soportado, por favor ejecute\n" "%s\n" "y mande la salida a ddccontrol-users@lists.sourceforge.net.\n" "Gracias." #: ../../po/../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "Por favor haz clic en el nombre de un grupo." #: ../../po/../src/gddccontrol/notebook.c:639 #: ../../po/../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "Obteniendo valores de controles (%d%%)..." #: ../../po/../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "Cargando perfiles..." #: ../../po/../src/gddccontrol/notebook.c:677 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls may " "not be supported, or may not work as expected.\n" msgstr "" "No hay soporte para tu monitor en el base de datos, pero ddccontrol está " "utilizando un perfíl genérico que corresponde al fabricante de tu monitor. " "Algunos controles no serán soportados, o no funcionarán de la forma esperado.\n" #: ../../po/../src/gddccontrol/notebook.c:683 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and some " "controls may not work as expected.\n" msgstr "" "No hay soporte para tu monitor en el base de datos, pero ddccontrol está " "utilizando un perfíl genérico. Muchos controles no serán soportados, y " "algunos controles no funcionarán de la forma esperado.\n" #: ../../po/../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "Aviso!" #: ../../po/../src/gddccontrol/notebook.c:690 msgid "" "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to " "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" "Por favor actualize ddccontrol-db, o, si ya estás usando la versión\n" "última, por favor mande la salida de esta instrucción a\n" "ddccontrol-users@lists.sourceforge.net:\n" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "Cambiador de Perfíl de Monitor" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "Rapidamente cambie perfiles de monitor creado con gddccontrol" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "_Acerca de..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "_Propiedades..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "_Ejecutar gddccontrol..." #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "Un subprograma para rapidamente cambiar perfiles de monitor.\n" "Basado en libddccontrol y parte del proyecto ddccontrol.\n" "(http://ddccontrol.sourceforge.net)" #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "No se pudo inicializar la biblioteca ddcci." #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "No se encontró configuración de monitor. Por favor ejecute gddccontrol primero" #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "Ocurrió un error abriendo el dispositivo del monitor" #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "No se pudo encontrar ningunos perfiles" #. only reached, if init was not finished #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "error" #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "Monitor:" #: ../../po/../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "Propiedades del Cambiador de Perfiles de Monitor" #: ../../po/../src/lib/conf.c:61 ../../po/../src/lib/conf.c:258 #: ../../po/../src/lib/conf.c:308 ../../po/../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "No se pudo crear nombre de fichero (memoria intermedia muy pequeño)\n" #: ../../po/../src/lib/conf.c:86 ../../po/../src/lib/conf.c:363 #: ../../po/../src/lib/monitor_db.c:350 ../../po/../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "Análisis sintáctico del documento falló.\n" #: ../../po/../src/lib/conf.c:93 ../../po/../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "fichero de perfíl vacio\n" #: ../../po/../src/lib/conf.c:99 ../../po/../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "perfíl del tipo incorrecto, nódulo raíz %s != perfíl" #: ../../po/../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "No se encuentra propiedad 'ddccontrolversion'" #: ../../po/../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "ddccontrol ha sido actualizado desde que se guardó monitorlist (%s vs %s).\n" #: ../../po/../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "No se encuentra propiedad 'filename'" #: ../../po/../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "No se encuentra propiedad 'supported'" #: ../../po/../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "So se puede convertir propiedad 'supported' a número entero" #: ../../po/../src/lib/conf.c:138 ../../po/../src/lib/conf.c:385 #: ../../po/../src/lib/monitor_db.c:90 ../../po/../src/lib/monitor_db.c:194 #: ../../po/../src/lib/monitor_db.c:370 ../../po/../src/lib/monitor_db.c:426 #: ../../po/../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "No se encuentra propiedad 'name'" #: ../../po/../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "No se encuentra propiedad 'digital'" #: ../../po/../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "So se puede convertir propiedad 'digital' a número entero" #: ../../po/../src/lib/conf.c:175 ../../po/../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "No se pueded crear el escribidor xml\n" #: ../../po/../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "No se puede leer el valor del control\n" #: ../../po/../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "No se puede escribir el valor del control\n" #: ../../po/../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "Error abriendo directorio casero de ddccontrol" #: ../../po/../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "Error leendo el directorio casero de ddccontrol" #: ../../po/../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "No se encuentra la propiedad 'pnpid'" #: ../../po/../src/lib/conf.c:388 ../../po/../src/lib/conf.c:391 msgid "Can't find version property." msgstr "No se encuentra propiedad 'version'" #: ../../po/../src/lib/conf.c:390 ../../po/../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "So se puede convertir propiedad 'version' a número entero" #: ../../po/../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "versión de perfíl (%d) no es soportado (debe ser %d).\n" #: ../../po/../src/lib/conf.c:407 ../../po/../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "No se encuentra propiedad 'address'" #: ../../po/../src/lib/conf.c:409 ../../po/../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "So se puede convertir propiedad 'address' a número entero" #: ../../po/../src/lib/conf.c:413 ../../po/../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "No se encuentra propiedad 'value'" #: ../../po/../src/lib/conf.c:415 ../../po/../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "So se puede convertir propiedad 'value' a número entero" #: ../../po/../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "ddcci_delete_profile: Error, no se puede borrar perfíl.\n" #: ../../po/../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "ddcci_delete_profile: Error, no so encontró el perfíl para borrar.\n" #: ../../po/../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "Error inicializando la cola de mensajes" #: ../../po/../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "Error mandando el mensaje de abandonar" #: ../../po/../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "Error mandando el mansaje 'heartbeat'" #: ../../po/../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "Falló inicialización de base de datos ddccontrol...\n" #: ../../po/../src/lib/ddcci.c:275 ../../po/../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "ioctl devolvió %d\n" #: ../../po/../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "Error mandando mensaje de escribir" #: ../../po/../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "Error leendo respuesta del mensaje de escribir" #: ../../po/../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "Error mandando el mensaje de lectura" #: ../../po/../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "Error leendo respuesta del mensaje de lectura" #: ../../po/../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "Respuesta inválido, primer byte es 0x%02x, debe ser 0x%02x\n" #: ../../po/../src/lib/ddcci.c:485 #, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "Error no fatal: Respuesta inválido, magia es 0x%02x\n" #: ../../po/../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "Respuesta inválido, largo es %d, debe ser %d a lo más\n" #: ../../po/../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "Respuesta inválido, datos corruptos - xor es 0x%02x, largo 0x%02x\n" #: ../../po/../src/lib/ddcci.c:658 ../../po/../src/lib/ddcci.c:680 #, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "No se puede convertir valor a número entero, CAPS inválido (buf=%s, pos=%s).\n" #: ../../po/../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "Secuencia inválida en 'caps'.\n" #: ../../po/../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "EDID corrupto en 0x%02x.\n" #: ../../po/../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "Número de seria: %d\n" #: ../../po/../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "Fabricado: Semana %d, %d\n" #: ../../po/../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "Versión EDID: %d.%d\n" #: ../../po/../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "Tamaño máximo: %d x %d (cm)\n" #: ../../po/../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "Lectura de EDID 0x%02x falló.\n" #: ../../po/../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "Dispositivo: %s\n" #: ../../po/../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "Error mandando mensaje para abrir" #: ../../po/../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "Error leendo respuesta del mensaje para abrir" #: ../../po/../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "Nombre de fichero inválido (%s).\n" #: ../../po/../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "ddcci_open devolvió %d\n" #: ../../po/../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "Monitor desconocido (%s)" #: ../../po/../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "Investigando monitores disponibles" #: ../../po/../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "Error mandando mensaje para hacer lista" #: ../../po/../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "Error leendo entrada del mensaje de hacer lista" #: ../../po/../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "Se encontró dispositivo PCI (%s)\n" #: ../../po/../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "Se encontró dispositivo I2C (%s)\n" #: ../../po/../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "Error obteniendo información sobre el directorio casero de ddccontrol." #: ../../po/../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "Error creando el directorio casero de ddccontrol." #: ../../po/../src/lib/ddcci.c:1216 msgid "" "Error while getting information about ddccontrol home directory after " "creating it." msgstr "" "Error obteniendo información sobre el directorio casero de ddccontrol " "despues de crearlo." #: ../../po/../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "Error: '.ddccontro' en tu directorio casero no es un directorio." #: ../../po/../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "Error obteniendo información sobre el directorio de perfíl de ddccontrol." #: ../../po/../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "Error creando el directorio de perfíl de ddccontrol." #: ../../po/../src/lib/ddcci.c:1241 msgid "" "Error while getting information about ddccontrol profile directory after " "creating it." msgstr "" "Error obteniendo información sobre el directorio de perfíl de ddccontrol" "despues de crearlo." #: ../../po/../src/lib/ddcci.c:1248 msgid "" "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "" "Error: '.ddccontrol/profiles' en tu directorio casero no es un directorio." #: ../../po/../src/lib/monitor_db.c:82 ../../po/../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "No se encuentra propiedad 'id'." #: ../../po/../src/lib/monitor_db.c:151 ../../po/../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "Elemento %s (identificación=%s) no se ha encontrado (linea %ld).\n" #: ../../po/../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "Tipo de actualización inválido (!= ninguno, != todo)." #: ../../po/../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "Control %s ha sido descartado por la cadena 'caps'.\n" #: ../../po/../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "Control %s (0x%02x) ya ha sido definido.\n" #: ../../po/../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "So se puede convertir demora a número entero" #: ../../po/../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "No se encuentra propiedad 'type'." #: ../../po/../src/lib/monitor_db.c:292 ../../po/../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "Tipo inválido." #: ../../po/../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "Base de datos tiene que ser incializado antes de leer un fichero de monitor.\n" #: ../../po/../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "monitor/%s.xml vacio\n" #: ../../po/../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "monitor/%s.xml del tipo incorrecto, nódulo raíz %s != monitor" #: ../../po/../src/lib/monitor_db.c:464 msgid "Can't find add or remove property in caps." msgstr "No se encuentra propiedad 'add or remove' en caps." #: ../../po/../src/lib/monitor_db.c:466 msgid "Invalid remove caps." msgstr "'remove' caps inválido." #: ../../po/../src/lib/monitor_db.c:468 msgid "Invalid add caps." msgstr "'add' caps inválido." #: ../../po/../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "Error, nivel de repetición > 15 (fichero: %s).\n" #: ../../po/../src/lib/monitor_db.c:479 msgid "Can't find file property." msgstr "No se encuentra propiedad 'file'." #: ../../po/../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "Dos partes de controles en fichero XML." #: ../../po/../src/lib/monitor_db.c:534 msgid "Error enumerating controls in subgroup." msgstr "Error enumerando controles en subgrupo." #: ../../po/../src/lib/monitor_db.c:589 #, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "document del tipo incorrecto, no se encuentra 'controls' o 'include'.\n" #: ../../po/../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "options.xml vacio\n" #: ../../po/../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "options.xml del tipo incorrecto, nódulo raíz %s != options" #: ../../po/../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "options.xml atributo dbversion falta, por favor actualize tu base de datos.\n" #: ../../po/../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "options.xml atributo date falta, por favor actualize to base deo datos.\n" #: ../../po/../src/lib/monitor_db.c:755 #, c-format msgid "" "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "" "options.xml dbversion (%d) es más grande de la versión soportado (%d).\n" #: ../../po/../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "Por favor actualize el programa ddccontrol.\n" #: ../../po/../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "options.xml dbversion (%d) es más pequeño de la versión soportado (%d).\n" #: ../../po/../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "Por favor actualize el base de datos de ddccontrol.\n" ddccontrol-0.4.4/po/fr.po000066400000000000000000001170141327040342400152420ustar00rootroot00000000000000# French translations for DDC/CI control tool package # Traduction anglaise du package DDC/CI control tool. # Copyright (C) 2004 Oleg I. Vdovikin and Nicolas Boichat # This file is distributed under the same license as the DDC/CI control tool package. # , 2004. # msgid "" msgstr "" "Project-Id-Version: DDC/CI control tool 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-08-29 19:01+0800\n" "PO-Revision-Date: 2006-07-30 19:43+0100\n" "Last-Translator: Nicolas Boichat \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: ../src/ddccontrol/main.c:83 ../src/ddccontrol/main.c:87 #: ../src/ddccontrol/main.c:91 msgid "Control" msgstr "Contrôle" #: ../src/ddccontrol/main.c:132 #, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: périphérique, par exemple dev:/dev/i2c-0\n" "\t-p : interroge les périphériques I2C pour trouver un moniteur.\n" "\t-c : lit la chaîne de capacité\n" "\t-d : interroge les contrôles 0 à 255\n" "\t-r : interroge le contrôle ctrl\n" "\t-w : valeur à écrire dans le contrôle ctrl\n" "\t-f : force (ne fait pas de tests de validité)\n" "\t-s : sauve les paramètres\n" "\t-v : verbosité (utiliser ce paramètre plusieurs fois l'augmente)\n" "\t-b : répertoire contenant ddccontrol-db (si autre que %s)\n" #: ../src/ddccontrol/main.c:150 ../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "Vérification de l'intégrité de %s...\n" #: ../src/ddccontrol/main.c:152 ../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "[ ÉCHEC ]\n" #: ../src/ddccontrol/main.c:156 ../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "[ OK ]\n" #: ../src/ddccontrol/main.c:217 #, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU " "General Public License.\n" "\n" msgstr "" "ddccontrol, version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "Ce programme est livré SANS AUCUNE GARANTIE.\n" "Vous pouvez redistribuer des copies de ce programme sous les termes de la " "licence générale publique de GNU (GNU General Public License).\n" "\n" #: ../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "'%s' ne semble pas être un nom de contrôle valide\n" #: ../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "Vous ne pouvez pas utiliser le paramètre -w sans -r.\n" #: ../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "'%s' ne semble pas être une valeur valide\n" #: ../src/ddccontrol/main.c:292 ../src/gddccontrol/main.c:414 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "Impossible d'initialiser la librairie ddcci.\n" #: ../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "Moniteurs détectés :\n" #: ../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr " - Périphérique : %s\n" #: ../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr " DDC/CI supporté : %s\n" #: ../src/ddccontrol/main.c:310 msgid "Yes" msgstr "Oui" #: ../src/ddccontrol/main.c:310 msgid "No" msgstr "Non" #: ../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr " Nom du moniteur : %s\n" #: ../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr " Type d'entrée : %s\n" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Digital" msgstr "digitale" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Analog" msgstr "analogique" #: ../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr " (Choisi automatiquement)\n" #: ../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "Pas de moniteur supportant le DDC/CI disponible.\n" "Vérifiez que les modules du noyau sont chargés (i2c-dev, et votre driver de " "\"framebuffer\"), si votre carte graphique en a besoin.\n" #: ../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "Lecture de l'EDID et initialisation du DDC/CI sur le bus %s...\n" #: ../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "\n" "Le protocole DDC/CI est inutilisable sur %s (%d).\n" "Vérifiez que les modules du noyau sont chargés (i2c-dev, et votre driver de " "\"framebuffer\"), si votre carte graphique en a besoin.\n" #: ../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "" "\n" "Lectures EDID :\n" #: ../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "\tID Plug and Play: %s [%s]\n" #: ../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "\tType d'entrée : %s\n" #. Put a big warning (in red if we are writing to a terminal). #: ../src/ddccontrol/main.c:354 ../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "" "=============================== ATTENTION ===============================" #: ../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" "Votre moniteur n'est pas supporté dans la base de données.\n" "Toutefois, ddccontrol utilise un profil générique pour le fabriquant\n" "de votre moniteur. Quelques contrôles peuvent éventuellement\n" "ne pas être supportés, ou ne pas fonctionner correctement.\n" #: ../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" "Votre moniteur n'est pas supporté dans la base de données.\n" "Toutefois, ddccontrol utilise un profil générique de base.\n" "Quelques contrôles peuvent éventuellement ne pas être\n" "supportés, ou ne pas fonctionner correctement.\n" #: ../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" "Veuillez mettre à jour ddccontrol-db, ou, si vous utilisez déjà la\n" "dernière version, veuillez envoyez la sortie de la commande suivanteà " "ddccontrol-users@lists.sourceforge.net :\n" #: ../src/ddccontrol/main.c:372 ../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "Merci.\n" #: ../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "" "\n" "Capacités:\n" #: ../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "Sortie brute : %s\n" #: ../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "Sortie analysée : \n" #: ../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "\tType :" #: ../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "LCD" #: ../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "CRT" #: ../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "Inconnu" #: ../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "Échec lors de la lecture des capacités.\n" #: ../src/ddccontrol/main.c:418 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "" "\n" "Écriture 0x%02x, 0x%02x(%d) (délai de %dms)...\n" #: ../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "" "\n" "Écriture 0x%02x, 0x%02x(%d)...\n" #: ../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "" "\n" "Lecture 0x%02x...\n" #: ../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "" "\n" "Contrôles (valide/actuel/maximum) [Description - Nom de la valeur]:\n" #: ../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "\t\t> id=%s, nom=%s, adresse=%#x, délai=%dms, type=%d\n" #: ../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "\t\t Valeurs autorisées:\n" #: ../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "\t\t\t> id=%s - name=%s, value=%d\n" #: ../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "\t\t supporté, valeur=%d, maximum=%d\n" #: ../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "\t\t non supporté, valeur=%d, maximum=%d\n" #: ../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "" "\n" "Sauvegarde des paramètres...\n" #. arbitration or no acknowledge #: ../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "sendbytes: erreur - abandon.\n" #. read timed out #: ../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "i2c-algo-bit.o: readbytes: i2c_inb: temps dépassé.\n" #: ../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "i2c-algo-bit.o: readbytes: temps dépassé au moment du \"ack\".\n" #: ../src/ddcpci/intel740.c:103 ../src/ddcpci/intel810.c:161 #: ../src/ddcpci/nvidia.c:155 ../src/ddcpci/radeon.c:209 #, c-format msgid "%s: Malloc error.\n" msgstr "%s: Erreur lors de malloc.\n" #: ../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "%s: échec de ioperm" #: ../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "%s: Erreur: type de carte inconnu (%#x)\n" #: ../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr "%s: Erreur lors de malloc." #: ../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "i810_open: Ne peut ouvrir /dev/mem." #: ../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "i810_open: Erreur: impossible de trouver une région MMIO PCI valide.\n" #: ../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "i810_open: Erreur lors de mmap." #: ../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "==>Erreur lors de l'envoi du message d'ouverture" #: ../src/ddcpci/main.c:178 ../src/ddcpci/main.c:184 ../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "==>Erreur lors de l'envoi de la réponse du message de donnée" #: ../src/ddcpci/main.c:251 ../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "==>Erreur lors de l'envoi du message de type \"list\"" #: ../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "Arguments invalides.\n" #: ../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "==>Ne peut pas lire la \"verbosité\".\n" #: ../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "==>Ne peut pas lire la clé.\n" #: ../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "==>Ne peut ouvrir la clé %u.\n" #: ../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "==>Pas de commande reçue pendant %ld secondes, on quitte.\n" #: ../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "==>Erreur lors de la réception de la requête\n" #: ../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "==>Requête invalide...\n" #: ../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "nvidia.c:init_i2c_bus: Erreur lors de malloc." #: ../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "nvidia_open: Ne peut ouvrir /dev/mem." #: ../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "nvidia_open: Erreur lors de mmap." #: ../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "radeon.c:init_i2c_bus: Erreur lors de malloc." #: ../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "radeon_open: Ne peut ouvrir /dev/mem." #: ../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "radeon_open: Erreur lors de mmap." #: ../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" "Modifier la luminosité et le contraste en suivant ces règles :\n" " - Le noir doit être aussi sombre que possible.\n" " - Le blanc devrait être aussi clair que possible.\n" " - Chaque niveau de gris doit pouvoir être distingué (particulièrement les " "niveaux 0 et 12).\n" #: ../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "Essayez de faire disparaître les artefacts dus au moiré." #: ../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" "Ajustez l'horloge pour faire disparaître les bandes verticales.\n" "Ajustez la phase d'horloge pour diminuer les mouvements sur l'écran." #: ../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "Motif plein écran inconnu : %s" #: ../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "" "Au moins un contrôle doit être sélectionné pour être sauver dans le profil." #: ../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "Création du profil..." #: ../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "Erreur lors de la création du profil." #: ../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "Application du profil..." #: ../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "Êtes-vous sûr de vouloir supprimer le profil '%s' ?" #: ../src/gddccontrol/gprofile.c:142 msgid "" "Please select the controls you want to save in the profile using the " "checkboxes to the left of each control." msgstr "" "Veuillez sélectionner les contrôles que vous souhaitez sauver dans le " "profile en utilisant les cases à cocher à gauche de chaque contrôle." #: ../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "Gérer les profils" #: ../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "Appliquer le profil" #: ../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "Voir les détails / Renommer" #: ../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "Supprimer le profil" #: ../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "Créer un profil" #: ../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "Fermer" #: ../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "Nom du contrôle" #: ../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "Valeur" #: ../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "Adresse" #: ../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "Valeur brute" #: ../src/gddccontrol/gprofile.c:434 ../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "Informations au sujet du profile :" #: ../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "Nom du fichier : %s" #: ../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "Nom du profile :" #. Save #: ../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "Sauvegarde du profil..." #: ../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "Erreur lors de la sauvegarde du profil." #: ../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "Moniteur changé (%d %d).\n" #: ../src/gddccontrol/main.c:329 msgid "Probing for available monitors..." msgstr "Recherche des moniteurs disponibles..." #: ../src/gddccontrol/main.c:368 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver)." msgstr "" "Pas de moniteur supportant le DDC/CI accessible.\n" "\n" "Vérifiez que les modules du noyau sont chargés (i2c-dev, et votre driver de " "\"framebuffer\"), si votre carte graphique en a besoin." #: ../src/gddccontrol/main.c:420 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "" "Impossible d'initialiser la librairie ddcci, voir la console pour plus de " "détails.\n" #: ../src/gddccontrol/main.c:430 msgid "Monitor settings" msgstr "Paramètres du moniteur" #: ../src/gddccontrol/main.c:454 msgid "Current monitor: " msgstr "Moniteur actuel :" #: ../src/gddccontrol/main.c:464 msgid "Refresh monitor list" msgstr "Rafraîchir la liste de moniteurs" #: ../src/gddccontrol/main.c:481 msgid "Profile manager" msgstr "Gestion des profils" #: ../src/gddccontrol/main.c:488 msgid "Save profile" msgstr "Sauver le profil" #: ../src/gddccontrol/main.c:494 msgid "Cancel profile creation" msgstr "Annuler la création du profil" #: ../src/gddccontrol/main.c:518 msgid "OK" msgstr "OK" #: ../src/gddccontrol/main.c:546 msgid "Refresh" msgstr "Rafraîchir" #: ../src/gddccontrol/main.c:546 msgid "Refresh all controls" msgstr "Rafraîchir tous les contrôles" #: ../src/gddccontrol/main.c:553 msgid "Close" msgstr "Fermer" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../src/gddccontrol/main.c:592 #, c-format msgid "Welcome to gddccontrol %s." msgstr "Bienvenue dans gddccontrol %s." #: ../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "Erreur lors de la lecture de la valeur" #: ../src/gddccontrol/notebook.c:116 ../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "Rafraîchissement de la valeur des contrôles (%d%%)..." #: ../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "Impossible d'obtenir la structure control_db associée au contrôle." #: ../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "Voir le motif plein écran" #: ../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "Section" #: ../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of " "monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other " "input, and then click on the refresh button near the monitor list." msgstr "" "Le moniteur actuel est dans la base de données mais ne supporte pas le " "protocole DDC/CI.\n" "\n" "Cela arrive souvent lorsqu'on connecte le câble VGA/DVI sur la mauvaise " "prise d'un moniteur ne supportant le protocole DDC/CI que sur une des " "entrées.\n" "\n" "Si le moniteur a 2 entrées, veuillez essayer de connecter le cable sur " "l'autre entrée, puis cliquer sur le bouton Rafraîchir à côté de la liste des " "moniteurs." #: ../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "Ouverture du périphérique du moniteur (%s)..." #: ../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near " "the monitor list." msgstr "" "Erreur lors de l'ouverture du périphérique du moniteur.\n" "Le moniteur a peut-être été déconnecté, veuillez cliquer sur le bouton " "rafraîchir." #: ../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" "Le moniteur actuel n'est pas supporté. Veuillez exécuter :%s\n" "et envoyer la sortie à ddccontrol-users@lists.sourceforge.net.\n" "Merci." #: ../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "Veuillez cliquer sur un nom de groupe." #: ../src/gddccontrol/notebook.c:639 ../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "Lecture des valeurs des contrôles (%d%%)..." #: ../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "Chargement des profils..." #: ../src/gddccontrol/notebook.c:677 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls may " "not be supported, or may not work as expected.\n" msgstr "" "Votre moniteur n'est pas supporté dans la base de données.Toutefois, " "ddccontrol utilise un profil générique pour le fabriquant de votre moniteur. " "Quelques contrôles peuvent éventuellement ne pas être supportés, ou ne pas " "fonctionner correctement.\n" #: ../src/gddccontrol/notebook.c:683 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and some " "controls may not work as expected.\n" msgstr "" "Votre moniteur n'est pas supporté dans la base de données. Toutefois, " "ddccontrol utilise un profil générique de base. Quelques contrôles peuvent " "éventuellement ne pas être supportés, ou ne pas fonctionner correctement.\n" #: ../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "Attention !" #: ../src/gddccontrol/notebook.c:690 msgid "" "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to ddccontrol-" "users@lists.sourceforge.net:\n" msgstr "" "Veuillez mettre à jour ddccontrol-db, ou, si vous utilisez déjà la dernière " "version, veuillez envoyez la sortie de la commande suivanteà ddccontrol-" "users@lists.sourceforge.net :\n" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "Manager de profils d'affichage" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "Choisit rapidement entre les profils moniteur créés avec gddccontrol." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "_A propos de..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "_Propriétés" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "_Lancer gddccontrol..." #: ../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "Un applet pour changer rapidement de profiles de moniteurs.\n" "Basé sur libddccontrol et inclu dans le projet ddccontrol.\n" "(http://ddccontrol.sourceforge.net)" #: ../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "Impossible d'initialiser la librairie ddcci" #: ../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "" "Aucune configuration de moniteurs trouvée, veuillez lancer gddccontrol " "d'abord." #: ../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "Erreur lors de l'ouverture du périphérique du moniteur." #: ../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "Aucun profil trouvé." #. only reached, if init was not finished #: ../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "erreur" #: ../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "Moniteur :" #: ../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "Propriétés du manager de profils d'affichage." #: ../src/lib/conf.c:61 ../src/lib/conf.c:258 ../src/lib/conf.c:308 #: ../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "Ne peut créer le nom du fichier (tampon trop petit)\n" #: ../src/lib/conf.c:86 ../src/lib/conf.c:363 ../src/lib/monitor_db.c:350 #: ../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "Le document n'a pas été traité avec succès.\n" #: ../src/lib/conf.c:93 ../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "fichier de profil vide\n" #: ../src/lib/conf.c:99 ../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "profil de mauvais type, élement racine %s != profile" #: ../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "Ne peut trouver la propriété ddccontrolversion." #: ../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "" "ddccontrol a été mis à jour depuis que la liste des moniteurs a été sauvé (%" "s contre %s).\n" #: ../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "Ne peut trouver la propriété filename." #: ../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "Ne peut trouver la propriété supported." #: ../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "Ne peut convertir la propriété supported en entier." #: ../src/lib/conf.c:138 ../src/lib/conf.c:385 ../src/lib/monitor_db.c:90 #: ../src/lib/monitor_db.c:194 ../src/lib/monitor_db.c:370 #: ../src/lib/monitor_db.c:426 ../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "Ne peut trouver la propriété name." #: ../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "Ne peut trouver la propriété digital." #: ../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "Ne peut convertir la propriété digital en entier." #: ../src/lib/conf.c:175 ../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "Ne peut créer la structure écrivant les fichiers xml.\n" #: ../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "Impossible de lire la valeur du contrôle\n" #: ../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "Impossible d'écrire la valeur du contrôle\n" #: ../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "" "Erreur lors de l'ouverture du dossier de ddccontrol dans le répertoire " "personnel." #: ../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "" "Erreur lors de la lecture du dossier de ddccontrol dans le répertoire " "personnel." #: ../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "Ne peut trouver la propriété pnpid." #: ../src/lib/conf.c:388 ../src/lib/conf.c:391 msgid "Can't find version property." msgstr "Ne peut trouver la propriété version." #: ../src/lib/conf.c:390 ../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "Ne peut convertir la version en entier." #: ../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "La version du profile (%d) n'est pas supportée (devrait être %d).\n" #: ../src/lib/conf.c:407 ../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "Ne peut trouver la propriété address." #: ../src/lib/conf.c:409 ../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "Ne peut convertir l'adresse en entier." #: ../src/lib/conf.c:413 ../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "Ne peut trouver la propriété value." #: ../src/lib/conf.c:415 ../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "Ne peut convertir la valeur en entier." #: ../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "ddcci_delete_profile: Erreur, impossible de supprimer le profil.\n" #: ../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "" "ddcci_delete_profile: Erreur, ne peut trouver le profile à supprimer.\n" #: ../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "Erreur lors de l'initialisation de la file d'attente des messages." #: ../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "Erreur lors de l'envoi du message de type \"quit\"." #: ../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "Erreur lors de l'envoi du message de type \"heartbeat\"." #: ../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "Impossible d'initialiser la base de donnée ddccontrol.\n" #: ../src/lib/ddcci.c:275 ../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "ioctl a renvoyé %d\n" #: ../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "Erreur lors de l'envoi du message d'écriture." #: ../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "Erreur lors de la lecture de la réponse du message d'écriture." #: ../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "Erreur lors de l'envoi du message de lecture." #: ../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "Erreur lors de la lecture de la réponse du message de lecture." #: ../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "" "Réponse invalide, le premier caractère est 0x%02x, mais devrait être 0x%02x\n" #: ../src/lib/ddcci.c:485 #, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "" "Erreur non-fatale : Réponse invalide, le nombre \"magique\" est 0x%02x\n" #: ../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "Réponse invalide, la longueur est %d, et devrait être de %d au moins\n" #: ../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "" "Réponse invalide, données corrompues - le xor est 0x%02x, la longueur 0x%" "02x\n" #: ../src/lib/ddcci.c:658 ../src/lib/ddcci.c:680 #, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "" "Ne peut convertir la valeur en entier, CAPS invalide (buf=%s, pos=%d).\n" #: ../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "Séquence invalide dans la chaîne de capacité.\n" #: ../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "EDID corrompu à 0x%02x.\n" #: ../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "Numéro de série : %d\n" #: ../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "Manufacturé : Semaine %d, %d\n" #: ../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "Version de l'EDID : %d.%d\n" #: ../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "Taille maximale : %d x %d (cm)\n" #: ../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "Echec de lecture de l'EDID 0x%02x.\n" #: ../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "Périphérique : %s\n" #: ../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "Erreur lors de l'envoi du message de l'ouverture." #: ../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "Erreur lors de la lecture de la réponse du message d'ouverture." #: ../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "Nom de fichier invalide (%s).\n" #: ../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "ddcci_open a renvoyé %d\n" #: ../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "Moniteur inconnu (%s)" #: ../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "Recherche des moniteurs disponibles" #: ../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "Erreur lors de l'envoi du message de type \"list\"." #: ../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "Erreur lors de la lecture d'une entrée de la liste." #: ../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "Périphérique PCI trouvé (%s)\n" #: ../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "Périphérique I2C trouvé (%s)\n" #: ../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "" "Erreur lors de l'obtention d'informations au sujet du dossier de ddccontrol " "dans le répertoire personnel." #: ../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "" "Erreur lors de la création du dossier de ddccontrol dans le répertoire " "personnel." #: ../src/lib/ddcci.c:1216 msgid "" "Error while getting information about ddccontrol home directory after " "creating it." msgstr "" "Erreur lors de l'obtention d'informations au sujet du dossier de ddccontrol " "dans le répertoire personnel après l'avoir créé." #: ../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "" "Erreur : '.ddccontrol' dans votre répertoire personnel n'est pas un " "répertoire." #: ../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "" "Erreur lors de l'obtention d'informations au sujet du dossier des profils " "dans le répertoire personnel." #: ../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "" "Erreur lors de la création du dossier des profiles dans le répertoire " "personnel." #: ../src/lib/ddcci.c:1241 msgid "" "Error while getting information about ddccontrol profile directory after " "creating it." msgstr "" "Erreur lors de l'obtention d'informations au sujet du dossier des profils " "dans le répertoire personnel après l'avoir créé." #: ../src/lib/ddcci.c:1248 msgid "" "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "" "Erreur : '.ddccontrol/profiles' dans votre répertoire personnel n'est pas un " "répertoire." #: ../src/lib/monitor_db.c:82 ../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "Ne peut trouver la propriété id." #: ../src/lib/monitor_db.c:151 ../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "L'élement %s (id=%s) n'a pas été trouvé (ligne %ld).\n" #: ../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "Type de refresh invalide (!= none, != all)." #: ../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "Le contrôle %s a été désactivé à cause de la chaîne de capacité.\n" #: ../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "Le contrôle %s (0x%02x) a déjà été défini.\n" #: ../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "Ne peut convertir le délai en entier." #: ../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "Ne peut trouver la propriété type." #: ../src/lib/monitor_db.c:292 ../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "Type invalide." #: ../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "" "La base de donnée doit être initialisée avant de lire un fichier moniteur.\n" #: ../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "monitor/%s.xml vide\n" #: ../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "monitor/%s.xml de mauvais type, élement racine %s != monitor" #: ../src/lib/monitor_db.c:464 msgid "Can't find add or remove property in caps." msgstr "Ne peut trouver la propriété add ou remove dans caps." #: ../src/lib/monitor_db.c:466 msgid "Invalid remove caps." msgstr "Séquence invalide dans la chaîne de capacité \"remove\"." #: ../src/lib/monitor_db.c:468 msgid "Invalid add caps." msgstr "Séquence invalide dans la chaîne de capacité \"add\"." #: ../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "Erreur, niveau de récursion > 15 (file: %s).\n" #: ../src/lib/monitor_db.c:479 msgid "Can't find file property." msgstr "Ne peut trouver la propriété file." #: ../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "Deux parties controls dans le fichier XML." #: ../src/lib/monitor_db.c:534 msgid "Error enumerating controls in subgroup." msgstr "Erreur lors de l'énumération des contrôles dans d'un sous-groupe." #: ../src/lib/monitor_db.c:589 #, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "" "document de mauvais type, ne peut trouver les contrôles ou une inclusion.\n" #: ../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "options.xml vide\n" #: ../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "options.xml de mauvais type, élement racine %s != monitor" #: ../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "" "L'attribut dbversion dans options.xml est absent, veuillez mettre à jour " "votre base de données.\n" #: ../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "" "L'attribut date dans options.xml est absent, veuillez mettre à jour votre " "base de données.\n" #: ../src/lib/monitor_db.c:755 #, c-format msgid "" "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "" "La version de options.xml (%d) est plus grande que la version supportée (%" "d).\n" #: ../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "Veuillez mettre à jour le programme ddccontrol.\n" #: ../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "" "La version de options.xml (%d) est plus petite que la version supportée (%" "d).\n" #: ../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "Veuillez mettre à jour la base de données ddccontrol.\n" #~ msgid "Buffer too small to contain caps.\n" #~ msgstr "Tampon trop petit pour contenir la chaîne de capacité.\n" #~ msgid "Can't find init property." #~ msgstr "Ne peut trouver la propriété init." #~ msgid "i740" #~ msgstr "i740" #~ msgid "intel740_open" #~ msgstr "intel740_open" ddccontrol-0.4.4/po/insert-header.sin000066400000000000000000000012401327040342400175310ustar00rootroot00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ddccontrol-0.4.4/po/pl.po000066400000000000000000001131551327040342400152500ustar00rootroot00000000000000# Polish translations for DDC/CI control tool package. # Copyright (C) 2005 Oleg I. Vdovikin and Nicolas Boichat # This file is distributed under the same license as the DDC/CI control tool package. # Radek Marcinkowski , 2005. # Jakub Bogusz , 2006. # msgid "" msgstr "" "Project-Id-Version: ddccontrol 0.4.3\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-08-29 19:01+0800\n" "PO-Revision-Date: 2006-08-25 00:31+0200\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-2\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: ../src/ddccontrol/main.c:83 ../src/ddccontrol/main.c:87 #: ../src/ddccontrol/main.c:91 msgid "Control" msgstr "Control" #: ../src/ddccontrol/main.c:132 #, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" "Opcje:\n" "%s [-b katalog_danych] [-v] [-c] [-d] [-f] [-s] [-r parametr [-w warto¶æ]] [-" "p | dev]\n" "\tdev: urz±dznie, np.: dev:/dev/i2c-0\n" "\t-p : skanuje magistralê I2c w poszukiwaniu monitorów.\n" "\t-c : odczyt mo¿liwo¶ci\n" "\t-d : odczyt parametrów 0 - 255\n" "\t-r : odczyt parametru\n" "\t-w : warto¶æ wielko¶ci parametru\n" "\t-f : wymuszenie (pominiêcie kontroli poprawno¶ci)\n" "\t-s : zapisz ustawienia\n" "\t-v : gadatliwy (wiêcj -v, bardziej gadatliwy)\n" "\t-b : katalog bazy monitorów ddccontrol-db (je¿eli inny ni¿ %s)\n" #: ../src/ddccontrol/main.c:150 ../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "Sprawdznie integralno¶ci %s...\n" #: ../src/ddccontrol/main.c:152 ../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "[ B£¡D ]\n" #: ../src/ddccontrol/main.c:156 ../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "[ OK ]\n" #: ../src/ddccontrol/main.c:217 #, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU " "General Public License.\n" "\n" msgstr "" "ddccontrol wersja %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "Ten program jest dostarczany BEZ JAKIEJKOLWIEK GWARANCJI.\n" "Mo¿na go rozprowadzaæ na warunkach Powszechnej Licencji Publicznej GNU\n" "(General Public License).\n" "\n" #: ../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "'%s' nie jest zarejestrowan± nazw±\n" #: ../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "Nie mo¿esz u¿yæ -w bez -r.\n" #: ../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "%s' nie jest poprawn± warto¶ci±.\n" #: ../src/ddccontrol/main.c:292 ../src/gddccontrol/main.c:414 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "Biblioteka ddcci nie zosta³a zainicjalizowana.\n" #: ../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "Wykryte monitory:\n" #: ../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr " - Urz±dzenie: %s\n" #: ../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr " Obs³uguj±ce DDC/CI: %s\n" #: ../src/ddccontrol/main.c:310 msgid "Yes" msgstr "Tak" #: ../src/ddccontrol/main.c:310 msgid "No" msgstr "Nie" #: ../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr " Nazwa monitora: %s\n" #: ../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr " Typ wej¶cia: %s\n" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Digital" msgstr "Cyfrowe" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Analog" msgstr "Analogowe" #: ../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr " (Zaznaczony automatycznie)\n" #: ../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "Brak monitorów obs³uguj±cych DDC/CI.\n" "Karta graficzna mo¿e wymagaæ dodatkowych modu³ów kernela (i2c-dev i " "framebuffer)\n" #: ../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "Czyta EDID i inicjalizuje DDC/CI na magistrali %s...\n" #: ../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "\n" "DDC/CI w %s nie jest u¿yteczne (%d).\n" "Karta graficzna mo¿e wymagaæ dodatkowych modu³ów kernela (i2c-dev i " "framebuffer).\n" #: ../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "" "\n" "EDID zaczyta³:\n" #: ../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "\tPlug and Play ID: %s [%s]\n" #: ../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "\tType wej¶cia: %s\n" #. Put a big warning (in red if we are writing to a terminal). #: ../src/ddccontrol/main.c:354 ../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "" "================================ UWAGA ================================" #: ../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" "W bazie danych nie ma obs³ugi tego monitora, a ddccontrol u¿ywa ogólnego\n" "profilu dla tego producenta monitorów. Niektóre parametry mog± nie byæ\n" "obs³ugiwane, lub mog± dzia³aæ inaczej ni¿ powinny.\n" #: ../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" "W bazie danych nie ma obs³ugi tego monitora, a ddccontrol u¿ywa ogólnego\n" "profilu. Wiele parametrów mo¿e nie byæ obs³ugiwanych, a niektóre mog±\n" "dzia³aæ inaczej ni¿ powinny.\n" #: ../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" "Proszê uaktualniæ ddccontrol-db lub, je¶li to ju¿ jest najnowsza wersja,\n" "proszê wys³aæ wyj¶cie nastêpuj±cego polecenia na adres\n" "ddccontrol-users@lists.sourceforge.net:\n" #: ../src/ddccontrol/main.c:372 ../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "Dziêkujê.\n" #: ../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "" "\n" "Mo¿liwo¶ci:\n" #: ../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "Wyj¶cie czyste: %s\n" #: ../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "Wyj¶cie przetworzone: \n" #: ../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "\tRodzaj: " #: ../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "LCD" #: ../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "CRT" #: ../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "Nieznany" #: ../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "Odczyt mo¿liwo¶ci nie powiód³ siê.\n" #: ../src/ddccontrol/main.c:418 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "" "\n" "Zapis: 0x%02x, 0x%02x(%d) (opó¼nienie %dms)...\n" #: ../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "" "\n" "Zapis: 0x%02x, 0x%02x(%d)...\n" #: ../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "" "\n" "Odczyt 0x%02x...\n" #: ../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "" "\n" "Parametry (poprawny/aktualny/maksymalny) [Opis - nazwa warto¶ci]:\n" #: ../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "\t\t> id=%s, nazwa=%s, adres=%#x, opó¼nienie=%dms, typ=%d\n" #: ../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "\t\t Mo¿liwe warto¶ci:\n" #: ../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "\t\t\t> id=%s - nazwa=%s, warto¶æ=%d\n" #: ../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "\t\t suportowane, warto¶æ=%d, maksimum=%d\n" #: ../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "\t\t not supported, value=%d, maximum=%d\n" #: ../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "" "\n" "Zapisywanie ustawieñ...\n" #. arbitration or no acknowledge #: ../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "sendbytes: b³±d - przerwano.\n" #. read timed out #: ../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "i2c-algo-bit.o: readbytes: i2c_inb przekroczy³o limit czasu.\n" #: ../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "i2c-algo-bit.o: readbytes: Przekroczony limit czasu przy ack\n" #: ../src/ddcpci/intel740.c:103 ../src/ddcpci/intel810.c:161 #: ../src/ddcpci/nvidia.c:155 ../src/ddcpci/radeon.c:209 #, c-format msgid "%s: Malloc error.\n" msgstr "%s: B³±d malloca.\n" #: ../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "%s: ioperm nie powiod³o siê" #: ../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "%s: B³±d: nieznany typ karty (%#x)\n" #: ../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr "%s: B³±d malloca." #: ../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "i810_open: nie mo¿na otworzyæ /dev/mem" #: ../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "" "i810_open: B³±d: nie mo¿na odnale¼æ ¿adnego poprawnego regionu PCI MMIO.\n" #: ../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "i810_open: mmap nie powiod³o siê" #: ../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "==>B³±d podczas wysy³ania open message" #: ../src/ddcpci/main.c:178 ../src/ddcpci/main.c:184 ../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "==>B³±d podczas wysy³ania data answer message" #: ../src/ddcpci/main.c:251 ../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "==>B³±d podczas wysy³ania list message" #: ../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "B³êdne argumenty.\n" #: ../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "==>Nie mo¿na odczytaæ gadatliwo¶ci.\n" #: ../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "==>Nie mo¿na odczytaæ klucza.\n" #: ../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "==>Nie mo¿na otworzyæ klucza %u\n" #: ../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "==>Nie otrzymano polecenia przez %ld sekund, przerwano.\n" #: ../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "==>B³±d podczas odbierania zapytania\n" #: ../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "==>B³êdne zapytanie...\n" #: ../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "nvidia.c:init_i2c_bus: B³±d malloca." #: ../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "nvidia_open: nie mo¿na otworzyæ /dev/mem" #: ../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "nvidia_open: mmap nie powiod³o siê" #: ../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "radeon.c:init_i2c_bus: B³±d malloca." #: ../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "radeon_open: nie mo¿na otworzyæ /dev/mem" #: ../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "radeon_open: mmap nie powiod³o siê" #: ../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" "Wyreguluj jasno¶æ i kontrast zgodnie z poni¿szymi zasadami:\n" " - Czerñ musi byæ tak ciemna, jak to tylko mo¿liwe.\n" " - Biel musi byæ tak jasna, jak to tylko mo¿liwe.\n" " - Musisz byæ w stanie rozró¿niæ ka¿dy stopieñ szaro¶ci (szczególnie 0 i " "12).\n" #: ../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "Spróbuj doprowadziæ do znikniêcia wzorów mory." #: ../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" "Wyreguluj zgrubn± blokadê obrazu, aby pionowy pasek znikn±³.\n" "Wyreguluj dok³adn± blokadê obrazu, aby zminimalizowaæ ruch na ekranie." #: ../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "Nieznana nazwa wzoru ca³oekranowego: %s" #: ../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "" "Zaznacz przynajmniej jeden parametr, który zostanie zapisany w profilu." #: ../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "Tworzenie profilu..." #: ../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "B³±d podczas tworzenia profilu." #: ../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "Zastosowanie profilu..." #: ../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "Czy skasowaæ profil '%s'?" #: ../src/gddccontrol/gprofile.c:142 msgid "" "Please select the controls you want to save in the profile using the " "checkboxes to the left of each control." msgstr "" "Proszê wybraæ parametry do zapisu w profilu przy u¿yciu kontrolek z lewej " "strony ka¿dego parametru." #: ../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "Zarz±dzanie profilami" #: ../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "Zastosuj profil" #: ../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "Poka¿ szczegó³y profilu/Zmieñ profile" #: ../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "Usuñ profil" #: ../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "Stwórz profil" #: ../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "Zamknij menad¿er profilu" #: ../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "Nazwa parametru" #: ../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "Warto¶æ" #: ../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "Adres" #: ../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "Warto¶æ nieprzetworzona" #: ../src/gddccontrol/gprofile.c:434 ../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "Informacje o profilu" #: ../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "Nazwa pliku: %s" #: ../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "&Nazwa profilu:" #. Save #: ../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "Zapisz profil..." #: ../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "B³±d podczas zapisywania profilu." #: ../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "Monitor zmieni³ (%d %d).\n" #: ../src/gddccontrol/main.c:329 msgid "Probing for available monitors..." msgstr "Skanowanie w poszukiwaniu monitorów..." #: ../src/gddccontrol/main.c:368 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver)." msgstr "" "Brak monitorów obs³uguj±cych DDC/CI.\n" "\n" "Karta graficzna mo¿e wymagaæ dodatkowych modu³ów kernela (i2c-dev, i " "framebuffer)." #: ../src/gddccontrol/main.c:420 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "" "Brak mo¿liwo¶ci incjalizacji biblioteki ddcci, sprawd¼ komunikaty na " "konsoli.\n" #: ../src/gddccontrol/main.c:430 msgid "Monitor settings" msgstr "Ustawienia monitora" #: ../src/gddccontrol/main.c:454 msgid "Current monitor: " msgstr "Bie¿±cy monitor: " #: ../src/gddccontrol/main.c:464 msgid "Refresh monitor list" msgstr "&Od¶wie¿ listê monitorów" #: ../src/gddccontrol/main.c:481 msgid "Profile manager" msgstr "Zarz±dzanie profilami" #: ../src/gddccontrol/main.c:488 msgid "Save profile" msgstr "Zapisz profil" #: ../src/gddccontrol/main.c:494 msgid "Cancel profile creation" msgstr "Odwo³aj tworzenie profilu" #: ../src/gddccontrol/main.c:518 msgid "OK" msgstr "OK" #: ../src/gddccontrol/main.c:546 msgid "Refresh" msgstr "Od¶wie¿" #: ../src/gddccontrol/main.c:546 msgid "Refresh all controls" msgstr "&Od¶wie¿ wszystkie parametry" #: ../src/gddccontrol/main.c:553 msgid "Close" msgstr "Zamknij" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../src/gddccontrol/main.c:592 #, c-format msgid "Welcome to gddccontrol %s." msgstr "Witaj w gddccontrol %s." #: ../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "B³±d przy pobieraniu warto¶ci" #: ../src/gddccontrol/notebook.c:116 ../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "Od¶wie¿ wielko¶ci paramaetrów (%d%%)..." #: ../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "Nie mo¿na znale¼æ struktury control_db odpowiadaj±cej parametrówi." #: ../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "Poka¿ wzory ca³oekranowe" #: ../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "Sekcja" #: ../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of " "monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other " "input, and then click on the refresh button near the monitor list." msgstr "" "Aktualny monitor jest w bazie danych, ale nie obs³uguje DDC/CI.\n" "\n" "Zwykle zdarza siê to przy pod³±czeniu kabla VGA/DVI do z³ego wej¶cia " "monitora obs³uguj±cego DDC/CI tylko na jednym z dwóch wej¶æ.\n" "\n" "Je¶li monitor ma dwa wej¶cia, proszê spróbowaæ pod³±czyæ kabel do innego " "wej¶cia i klikn±æ na przycisku od¶wie¿enia blisko listy monitorów." #: ../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "Otwarcie urz±dzenia monitora (%s)..." #: ../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near " "the monitor list." msgstr "" "B³±d w trakcie otwierania urz±dzenia monitora.\n" "Byæ mo¿e monitor jest od³±czony, naci¶niej przycisk od¶wi¿ na li¶cie " "monitorów." #: ../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" "Aktualny monitor nie jest obs³ugiwany, proszê uruchomiæ\n" "%s\n" "i wys³aæ wyj¶cie na ddccontrol-users@lists.sourceforge.net.\n" "Dziêkujê." #: ../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "Wybierz nazwê grupy." #: ../src/gddccontrol/notebook.c:639 ../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "Pobieranie warto¶ci parametrów (%d%%)..." #: ../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "£adownie profili..." #: ../src/gddccontrol/notebook.c:677 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls may " "not be supported, or may not work as expected.\n" msgstr "" "W bazie danych nie ma obs³ugi tego monitora, a ddccontrol u¿ywa ogólnego " "profilu dla tego producenta monitorów. Niektóre parametry mog± nie byæ " "obs³ugiwane, lub mog± dzia³aæ inaczej ni¿ powinny.\n" #: ../src/gddccontrol/notebook.c:683 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and some " "controls may not work as expected.\n" msgstr "" "W bazie danych nie ma obs³ugi tego monitora, a ddccontrol u¿ywa ogólnego " "profilu. Wiele parametrów mo¿e nie byæ obs³ugiwanych, a niektóre mog± " "dzia³aæ inaczej ni¿ powinny.\n" #: ../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "Uwaga!" #: ../src/gddccontrol/notebook.c:690 msgid "" "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to ddccontrol-" "users@lists.sourceforge.net:\n" msgstr "" "Proszê uaktualniæ ddccontrol-db lub, je¶li to ju¿ jest najnowsza wersja, " "proszê wys³aæ wyj¶cie nastêpuj±cego polecenia na adres ddccontrol-" "users@lists.sourceforge.net:\n" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "Prze³±cznik profili monitora" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "" "Szybkie prze³±czanie profili monitora utworzonych przy u¿yciu gddccontrol" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "_O..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "_W³a¶ciwo¶ci..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "_Uruchomienie gddccontrol..." #: ../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "Aplet do szybkiego prze³±czania profili monitora.\n" "Oparty na libddccontrol i bêd±cy czê¶ci± projektu ddccontrol.\n" "(http://ddccontrol.sourceforge.net)" #: ../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "Biblioteka ddcci nie zosta³a zainicjalizowana" #: ../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "" "Nie znaleziono konfiguracji monitora. Proszê najpierw uruchomiæ gddccontrol" #: ../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "Wyst±pi³ b³±d podczas otwierania urz±dzenia monitora" #: ../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "Nie znaleziono ¿adnego profilu" #. only reached, if init was not finished #: ../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "b³±d" #: ../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "Monitor:" #: ../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "W³a¶ciwo¶ci prze³±czania profili monitora" #: ../src/lib/conf.c:61 ../src/lib/conf.c:258 ../src/lib/conf.c:308 #: ../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "Nie mo¿na utworzyæ nazwy pliku (bufor zbyt ma³y)\n" #: ../src/lib/conf.c:86 ../src/lib/conf.c:363 ../src/lib/monitor_db.c:350 #: ../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "Dokument nie zosta³ poprawnie przetworzony.\n" #: ../src/lib/conf.c:93 ../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "pusty plik profilu\n" #: ../src/lib/conf.c:99 ../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "profil z³ego rodzaju, g³ówny wêze³ %s != profile" #: ../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "Nie znaleziono w³a¶ciwo¶ci ddccontrolversion." #: ../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "" "ddccontrol zosta³ uaktualniony od zapisania listy monitorów (%s vs %s).\n" #: ../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "Nie znaleziono w³a¶ciwo¶ci filename." #: ../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "Nie znaleziono w³a¶ciwo¶ci supported." #: ../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "Nie mo¿na przekonwertowaæ w³a¶ciwo¶ci supported na int." #: ../src/lib/conf.c:138 ../src/lib/conf.c:385 ../src/lib/monitor_db.c:90 #: ../src/lib/monitor_db.c:194 ../src/lib/monitor_db.c:370 #: ../src/lib/monitor_db.c:426 ../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "Nie znaleziono w³a¶ciwo¶ci name." #: ../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "Nie znaleziono w³a¶ciwo¶ci digital." #: ../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "Nie mo¿na przekonwertowaæ w³a¶ciwo¶ci digital na int." #: ../src/lib/conf.c:175 ../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "Nie mo¿na utworzyæ pisarza xml\n" #: ../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "Nie mo¿na odczytaæ warto¶ci parametru\n" #: ../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "Nie mo¿na zapisaæ warto¶ci parametru\n" #: ../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "B³±d podczas otwierania katalogu domowego ddccontrol." #: ../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "B³±d podczas odczytu katalogu domowego ddccontrol." #: ../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "Nie znaleziono w³a¶ciwo¶ci pnpid." #: ../src/lib/conf.c:388 ../src/lib/conf.c:391 msgid "Can't find version property." msgstr "Nie znaleziono w³a¶ciwo¶ci version." #: ../src/lib/conf.c:390 ../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "Nie mo¿na przekonwertowaæ wersji na int." #: ../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "wersja profilu (%d) nie jest obs³ugiwana (powinna byæ %d).\n" #: ../src/lib/conf.c:407 ../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "Nie znaleziono w³a¶ciwo¶ci address." #: ../src/lib/conf.c:409 ../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "Nie mo¿na przekonwertowaæ adresu na int." #: ../src/lib/conf.c:413 ../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "Nie znaleziono w³a¶ciwo¶ci value." #: ../src/lib/conf.c:415 ../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "Nie mo¿na przekonwertowaæ warto¶ci na int." #: ../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "ddcci_delete_profile: B³±d, nie mo¿na usun±æ profilu.\n" #: ../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "ddcci_delete_profile: B³±d, nie znaleziono profilu do usuniêcia.\n" #: ../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "B³±d podczas inicjalizacji kolejki komunikatów" #: ../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "B³±d podczas wysy³ania komunikatu koñcz±cego" #: ../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "B³±d podczas wysy³ania komunikatu znaku ¿ycia" #: ../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "Nie uda³o siê zainicjowaæ bazy danych ddccontrol...\n" #: ../src/lib/ddcci.c:275 ../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "ioctl zwróci³o %d\n" #: ../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "B³±d podczas wysy³ania komunikatu zapisu" #: ../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "B³±d podczas odczytu odpowiedzi na komunikat zapisu" #: ../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "B³±d podczas wysy³ania komunikatu odczytu" #: ../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "B³±d podczas odczytu odpowiedzi na komunikat odczytu" #: ../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "B³êdna odpowied¼, pierwszy bajt to 0x%02x, powinien byæ 0x%02x\n" #: ../src/lib/ddcci.c:485 #, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "B³±d niekrytyczny: B³êdna odpowied¼, liczba magiczna wynosi 0x%02x\n" #: ../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "B³êdna odpowied¼, d³ugo¶æ wynosi %d, powinna byæ najwy¿ej %d\n" #: ../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "" "B³êdna odpowied¼, uszkodzone dane - xor wynosi 0x%02x, d³ugo¶æ 0x%02x\n" #: ../src/lib/ddcci.c:658 ../src/lib/ddcci.c:680 #, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "" "Nie mo¿na przekonwertowaæ warto¶ci na int, b³êdne CAPS (buf=%s, pos=%d).\n" #: ../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "B³êdna sekwencja w mo¿liwo¶ciach.\n" #: ../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "Uszkodzony EDID pod 0x%02x.\n" #: ../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "Numer seryjny: %d\n" #: ../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "Wyprodukowany: Tydzieñ %d, %d\n" #: ../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "Wersja EDID: %d.%d\n" #: ../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "Maksymalny rozmiar: %d x %d (cm)\n" #: ../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "Odczyt EDID 0x%02x nie powiód³ siê.\n" #: ../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "Urz±dzenie: %s\n" #: ../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "B³±d podczas wysy³ania open message" #: ../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "B³±d podczas czytania data answer message" #: ../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "Niepoprawna nazwa pliku (%s).\n" #: ../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "ddcci_open zwróci³ warto¶æ %d\n" #: ../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "Nieznany monitor (%s)" #: ../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "Skanowanie w poszukiwaniu znanych monitorów" #: ../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "B³±d podczas wysy³ania list message" #: ../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "B³±d podczas odczytu wpisu listy" #: ../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "Znaleziono urz±dznie PCI (%s)\n" #: ../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "Znaleziono urz±dzenie I2C (%s)\n" #: ../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "B³±d podczas pobierania informacji o katalogu domowym ddccontrol." #: ../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "B³±d podczas tworzenia katalogu domowego ddccontrol." #: ../src/lib/ddcci.c:1216 msgid "" "Error while getting information about ddccontrol home directory after " "creating it." msgstr "" "B³±d podczas pobierania informacji o katalogu domowym ddccontrol po " "utworzeniu go." #: ../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "" "B³±d: '.ddccontrol' w katalogu domowym u¿ytkownika nie jest katalogiem." #: ../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "B³±d podczas pobierania informacji o katalogu profili ddccontrol." #: ../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "B³±d podczas tworzenia katalogu profili ddccontrol." #: ../src/lib/ddcci.c:1241 msgid "" "Error while getting information about ddccontrol profile directory after " "creating it." msgstr "" "B³±d podczas pobierania informacji o katalogu profili ddccontrol po " "utworzeniu go." #: ../src/lib/ddcci.c:1248 msgid "" "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "" "B³±d: '.ddccontrol/profiles' w katalogu domowym u¿ytkownika nie jest " "katalogiem." #: ../src/lib/monitor_db.c:82 ../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "Nie znaleziono w³a¶ciwo¶ci id." #: ../src/lib/monitor_db.c:151 ../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "Element %s (id=%s) nie zosta³ odnaleziony (linia %ld).\n" #: ../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "B³êdny rodzaj od¶wie¿ania (!= none, != all)." #: ../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "Parametr %s zosta³ usuniêty przez ³añcuch mo¿liwo¶ci.\n" #: ../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "Parametr %s (0x%02x) ju¿ zosta³ zdefiniowany.\n" #: ../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "Nie mo¿na przekonwertowaæ opó¼nienia na int." #: ../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "Nie znaleziono w³a¶ciwo¶ci type." #: ../src/lib/monitor_db.c:292 ../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "Niepoprawny typ." #: ../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "Baza danych musi byæ zainicjowana przed odczytem pliku monitora.\n" #: ../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "pusty monitor/%s.xml\n" #: ../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "monitor/%s.xml jest z³ego typu, g³ówny wêze³ %s != monitor" #: ../src/lib/monitor_db.c:464 msgid "Can't find add or remove property in caps." msgstr "Nie znaleziono w³a¶ciwo¶ci add ani remove w caps." #: ../src/lib/monitor_db.c:466 msgid "Invalid remove caps." msgstr "B³êdne w³asno¶ci do usuniêcia." #: ../src/lib/monitor_db.c:468 msgid "Invalid add caps." msgstr "B³êdne w³asno¶ci do dodania." #: ../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "B³±d, poziom zag³êbienia do³±czania > 15 (plik: %s).\n" #: ../src/lib/monitor_db.c:479 msgid "Can't find file property." msgstr "Nie znaleziono w³a¶ciwo¶ci plik." #: ../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "Dwie czê¶ci controls w pliku XML." #: ../src/lib/monitor_db.c:534 msgid "Error enumerating controls in subgroup." msgstr "B³±d podczas zliczania parametrów w podgrupie." #: ../src/lib/monitor_db.c:589 #, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "niepoprawny typ documentu, nie znaleziono parametru lub do³±czenia.\n" #: ../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "pusty options.xml\n" #: ../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "options.xml z³ego typu, g³ówny wêze³ %s != options" #: ../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "options.xml atrybut dbversion nie znaleziony, od¶wie¿ bazê danych.\n" #: ../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "options.xml atrubut date nie znaleziony, od¶wie¿ bazê danych.\n" #: ../src/lib/monitor_db.c:755 #, c-format msgid "" "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "options.xml dbversion (%d) jest wy¿sze ni¿ suportowana wersja (%d).\n" #: ../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "Proszê uaktualniæ program ddccontrol.\n" #: ../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "dbversion options.xml (%d) jest mniejsza od obs³ugiwanej (%d).\n" #: ../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "Proszê uaktualniæ bazê danych ddccontrol.\n" ddccontrol-0.4.4/po/quot.sed000066400000000000000000000002311327040342400157500ustar00rootroot00000000000000s/"\([^"]*\)"/“\1â€/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“â€/""/g ddccontrol-0.4.4/po/remove-potcdate.sin000066400000000000000000000006601327040342400201020ustar00rootroot00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } ddccontrol-0.4.4/po/ru.po000066400000000000000000001343421327040342400152640ustar00rootroot00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Oleg I. Vdovikin and Nicolas Boichat # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: DDC/CI control tool 0.1\n" "Report-Msgid-Bugs-To: ddccontrol-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2009-03-10 03:54+0300\n" "PO-Revision-Date: 2009-03-10 04:50+0300\n" "Last-Translator: Alexandre Prokoudine \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../src/ddccontrol/main.c:83 #: ../src/ddccontrol/main.c:87 #: ../src/ddccontrol/main.c:91 msgid "Control" msgstr "Управление" #: ../src/ddccontrol/main.c:132 #, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" "ИÑпользование:\n" "%s [-b каталог] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: уÑтройÑтво, например dev:/dev/i2c-0\n" "\t-p : опроÑить уÑтройÑтва I2C Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка шины монитора.\n" "\t-c : запроÑить возможноÑти\n" "\t-d : опроÑить региÑтры 0 - 255\n" "\t-r : опроÑить региÑтр управлениÑ\n" "\t-w : значение, запиÑываемое в региÑтр ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ \n" "\t-f : выполнить принудительно (избежать проверок целоÑтноÑти)\n" "\t-s : Ñохранить параметры\n" "\t-v : подробный вывод (введите Ð´Ð»Ñ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ð±Ð¾Ð»ÐµÐµ подробной информации)\n" "\t-b : каталог ddccontrol-db (еÑли отличаетÑÑ Ð¾Ñ‚ %s)\n" #: ../src/ddccontrol/main.c:150 #: ../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "Проверка целоÑтноÑти %s...\n" #: ../src/ddccontrol/main.c:152 #: ../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "[ ОШИБКР]\n" #: ../src/ddccontrol/main.c:156 #: ../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "[ OK ]\n" #: ../src/ddccontrol/main.c:217 #, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU General Public License.\n" "\n" msgstr "" "ddccontrol верÑии %s\n" "ÐвторÑкие права 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "ÐвторÑкие права 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "Эта программа раÑпроÑтранÑетÑÑ Ð‘Ð•Ð— КÐКИХ-ЛИБО ГÐРÐÐТИЙ.\n" "Ð’Ñ‹ можете раÑпроÑтранÑть ее копии на уÑловиÑÑ… GNU General Public License.\n" "\n" #: ../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "'%s' не ÑвлÑетÑÑ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ñ‹Ð¼ именем региÑтра\n" #: ../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "ÐÐµÐ»ÑŒÐ·Ñ Ð¸Ñпользовать параметр -w без -r.\n" #: ../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "'%s' не ÑвлÑетÑÑ Ð¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ñ‹Ð¼ значением.\n" #: ../src/ddccontrol/main.c:292 #: ../src/gddccontrol/main.c:414 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "Ðе удалоÑÑŒ инициализировать библиотеку ddcci.\n" #: ../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "Ðайдены мониторы :\n" #: ../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr " - УÑтройÑтво: %s\n" #: ../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr " ПоддерживаетÑÑ DDC/CI: %s\n" #: ../src/ddccontrol/main.c:310 msgid "Yes" msgstr "Да" #: ../src/ddccontrol/main.c:310 msgid "No" msgstr "Ðет" #: ../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr " Ð˜Ð¼Ñ Ð¼Ð¾Ð½Ð¸Ñ‚Ð¾Ñ€Ð°: %s\n" #: ../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr " Тип входа: %s\n" #: ../src/ddccontrol/main.c:312 #: ../src/ddccontrol/main.c:350 msgid "Digital" msgstr "Цифровой" #: ../src/ddccontrol/main.c:312 #: ../src/ddccontrol/main.c:350 msgid "Analog" msgstr "Ðналоговый" #: ../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr " (ÐвтоматичеÑкий выбор)\n" #: ../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "Ðе обнаружены мониторы, поддерживающие DDC/CI.\n" "ЕÑли ваша видеокарта Ñтого требует, проверьте загружены ли вÑе требуемые модули Ñдра (i2c-dev и драйвер фреймбуфера).\n" #: ../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "Чтение EDID и Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ñ DDC/CI на шине %s...\n" #: ../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "\n" "DDC/CI на %s нерабочее (%d).\n" "ЕÑли ваша видеокарта Ñтого требует, проверьте загружены ли вÑе требуемые модули Ñдра (i2c-dev и драйвер фреймбуфера).\n" #: ../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "" "\n" "Чтение EDID:\n" #: ../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "\tPlug and Play ID: %s [%s]\n" #: ../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "\tТип входа: %s\n" #. Put a big warning (in red if we are writing to a terminal). #: ../src/ddccontrol/main.c:354 #: ../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "=============================== ПРЕДУПРЕЖДЕÐИЕ ===============================" #: ../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" #: ../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" #: ../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" #: ../src/ddccontrol/main.c:372 #: ../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "СпаÑибо.\n" #: ../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "" "\n" "ВозможноÑти:\n" #: ../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "Вывод как еÑть: %s\n" #: ../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "Разобранный вывод: \n" #: ../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "\tТип: " #: ../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "ЖК" #: ../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "ЭЛТ" #: ../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "ÐеизвеÑтно" #: ../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "Ðе удалоÑÑŒ прочеÑть возможноÑти.\n" #: ../src/ddccontrol/main.c:418 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "" "\n" "ЗапиÑываетÑÑ 0x%02x, 0x%02x(%d) (задержка %d мÑ)...\n" #: ../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "" "\n" "ЗапиÑываетÑÑ 0x%02x, 0x%02x(%d)...\n" #: ../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "" "\n" "ЧитаетÑÑ 0x%02x...\n" #: ../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "" "\n" "Управление (разрешенное/текущее/макÑимальное) [ОпиÑание - Ð˜Ð¼Ñ Ð²ÐµÐ»Ð¸Ñ‡Ð¸Ð½Ñ‹]:\n" #: ../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "\t\t> id=%s, имÑ=%s, адреÑ=%#x, задержка=%dms, тип=%d\n" #: ../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "\t\t Возможные значениÑ:\n" #: ../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "\t\t\t> id=%s - имÑ=%s, значение=%d\n" #: ../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "\t\t поддерживаетÑÑ, значение=%d, макÑимум=%d\n" #: ../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "\t\t не поддерживаетÑÑ, значение=%d, макÑимум=%d\n" #: ../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "" "\n" "СохранÑÑŽÑ‚ÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ...\n" #. arbitration or no acknowledge #: ../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "sendbytes: ошибка - отключаюÑÑŒ.\n" #. read timed out #: ../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "i2c-algo-bit.o: readbytes: тайм-аут i2c_inb .\n" #: ../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "i2c-algo-bit.o: readbytes: тайм-аут при подтверждении\n" #: ../src/ddcpci/intel740.c:103 #: ../src/ddcpci/intel810.c:161 #: ../src/ddcpci/nvidia.c:155 #: ../src/ddcpci/radeon.c:209 #, c-format msgid "%s: Malloc error.\n" msgstr "%s: ошибка malloc.\n" #: ../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "%s: ioperm не выполнена" #: ../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "%s: Ошибка: неизвеÑтный тип карты (%#x)\n" #: ../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr "%s: ошибка malloc." #: ../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "i810_open: не удалоÑÑŒ открыть /dev/mem" #: ../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "i810_open: Ошибка: не удалоÑÑŒ найти ни одной правильной облаÑти MMIO PCI.\n" #: ../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "i810_open: Ошибка: mmap не выполнена" #: ../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "==>Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ" #: ../src/ddcpci/main.c:178 #: ../src/ddcpci/main.c:184 #: ../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "==>Ошибка при отправке ответа на Ñообщение открытиÑ" #: ../src/ddcpci/main.c:251 #: ../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "==>Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ ÑпиÑка" #: ../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "Ðеверные аргументы.\n" #: ../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "==>Ðе удалоÑÑŒ прочеÑть подробные ÑообщениÑ.\n" #: ../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "==>Ðе удалоÑÑŒ прочеÑть ключ.\n" #: ../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "==>Ðе удалоÑÑŒ открыть ключ %u.\n" #: ../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "==>Команда не получена в течение %ld Ñекунд, прерывание.\n" #: ../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "==>Ошибка при получении очереди\n" #: ../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "==>ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ð¾Ñ‡ÐµÑ€ÐµÐ´ÑŒ...\n" #: ../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "nvidia.c:init_i2c_bus: ошибка malloc." #: ../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "nvidia_open: не удалоÑÑŒ открыть /dev/mem" #: ../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "nvidia_open: mmap не выполнена" #: ../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "radeon.c:init_i2c_bus: ошибка malloc." #: ../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "radeon_open: не удалоÑÑŒ открыть /dev/mem" #: ../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "radeon_open: mmap не выполнена" #: ../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" "ÐаÑтройте ÑркоÑть и контраÑтноÑть ÑоглаÑно Ñтим правилам:\n" " - Чёрный должен быть макÑимально чёрным.\n" " - Белый должен быть макÑимально Ñрким.\n" " - Ð’Ñ‹ должны различать каждый уровень Ñерого (в чаÑтноÑти 0 и 12).\n" #: ../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "Попробуйте убрать муар." #: ../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" "ÐаÑтройте грубо изображение, чтобы убрать вертикальные полоÑÑ‹.\n" "ÐаÑтройте тонко изображение, чтобы минимизировать Ñмещение Ñкрана." #: ../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "ÐеизвеÑтное Ð¸Ð¼Ñ Ð¿Ð¾Ð»Ð½Ð¾Ñкранного шаблона: %s" #: ../src/gddccontrol/gddccontrol.desktop.in.h:1 msgid "Monitor Settings" msgstr "Параметры монитора" #: ../src/gddccontrol/gddccontrol.desktop.in.h:2 msgid "Set your monitor preferences (contrast, brightness,...) and manage your profiles" msgstr "Изменить параметры работы монитора (контраÑÑ‚, ÑркоÑть, температура цвета) и переключитьÑÑ Ð¼ÐµÐ¶Ð´Ñƒ заводÑкими предуÑтановками" #: ../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "Ð’Ñ‹ должны выбрать Ñ…Ð¾Ñ‚Ñ Ð±Ñ‹ один региÑтр Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð² профиле." #: ../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "СоздаетÑÑ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÑŒ..." #: ../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "Ошибка при Ñоздании профилÑ" #: ../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "ПрименÑетÑÑ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÑŒ..." #: ../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "Ð’Ñ‹ дейÑтвительно хотите удалить профиль '%s'?" #: ../src/gddccontrol/gprofile.c:142 msgid "Please select the controls you want to save in the profile using the checkboxes to the left of each control." msgstr "Выберите региÑтры, которые хотите Ñохранить в профиле, отметив нужные Ñлева от каждого региÑтра." #: ../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "Управление профилÑми" #: ../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "Применить профиль" #: ../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "Показать профиль детально / Переименовать профиль" #: ../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "Удалить профиль" #: ../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "Создать профиль" #: ../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "Закрыть менеждер профилей" #: ../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "Ð˜Ð¼Ñ Ñ€ÐµÐ³Ð¸Ñтра" #: ../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "Значение" #: ../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "ÐдреÑ" #: ../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "Ðеобр. значение" #: ../src/gddccontrol/gprofile.c:434 #: ../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ профиле:" #: ../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð°: %s" #: ../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "Ð˜Ð¼Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ:" #. Save #: ../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "СохранÑетÑÑ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÑŒ..." #: ../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "Ошибка при Ñохранении профилÑ." #: ../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "Монитор изменилÑÑ (%d %d).\n" #: ../src/gddccontrol/main.c:329 msgid "Probing for available monitors..." msgstr "ПоиÑк доÑтупных мониторов..." #: ../src/gddccontrol/main.c:368 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver)." msgstr "" "Ðе обнаружены мониторы, поддерживающие DDC/CI.\n" "\n" "ЕÑли ваша видеокарта Ñтого требует, проверьте загружены ли вÑе требуемые модули Ñдра (i2c-dev и драйвер фреймбуфера)." #: ../src/gddccontrol/main.c:420 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "Ðе удалоÑÑŒ инициализировать библиотеку ddcci; поÑÑÐ½ÐµÐ½Ð¸Ñ Ð²Ñ‹Ð²ÐµÐ´ÐµÐ½Ñ‹ в конÑоль.\n" #: ../src/gddccontrol/main.c:430 msgid "Monitor settings" msgstr "Параметры монитора" #: ../src/gddccontrol/main.c:454 msgid "Current monitor: " msgstr "Текущий монитор: " #: ../src/gddccontrol/main.c:464 msgid "Refresh monitor list" msgstr "Обновить ÑпиÑок мониторов" #: ../src/gddccontrol/main.c:481 msgid "Profile manager" msgstr "Управление профилÑми" #: ../src/gddccontrol/main.c:488 msgid "Save profile" msgstr "Сохранить профиль" #: ../src/gddccontrol/main.c:494 msgid "Cancel profile creation" msgstr "Отменить Ñоздание профилÑ" #: ../src/gddccontrol/main.c:518 msgid "OK" msgstr "OK" #: ../src/gddccontrol/main.c:546 msgid "Refresh" msgstr "Обновить" #: ../src/gddccontrol/main.c:546 msgid "Refresh all controls" msgstr "Обновить вÑе региÑтры" #: ../src/gddccontrol/main.c:553 msgid "Close" msgstr "Закрыть" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../src/gddccontrol/main.c:592 #, c-format msgid "Welcome to gddccontrol %s." msgstr "Добро пожаловать в gddccontrol %s." #: ../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "Ошибка при получении значениÑ" #: ../src/gddccontrol/notebook.c:116 #: ../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "ОбновлÑÑŽÑ‚ÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ€ÐµÐ³Ð¸Ñтров (%d%%)..." #: ../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "Ðе могу получить Ñтруктуру control_db, ÑвÑзанную Ñ Ñ€ÐµÐ³Ð¸Ñтром." #: ../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "Показать полноÑкранные шаблоны" #: ../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "СекциÑ" #: ../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other input, and then click on the refresh button near the monitor list." msgstr "" "Этот монитор еÑть в базе данных, но не поддерживает DDC/CI.\n" "\n" "Это чаÑто проиÑходит при подключении ÐºÐ°Ð±ÐµÐ»Ñ VGA/DVI к не тому входу монитора, поддерживающего DDC/CI только по одному из двух входов.\n" "\n" "ЕÑли у вашего монитора два входа, попробуйте подключить кабель к другому входу и нажмите кнопку Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð²Ð¾Ð·Ð»Ðµ ÑпиÑка мониторов." #: ../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "ОткрываетÑÑ ÑƒÑтройÑтво монитора (%s)..." #: ../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near the monitor list." msgstr "" "Произошла ошибка при открывании уÑтройÑтва монитора.\n" "Возможно, монитор был отключён, пожалуйÑта, нажмите на кнопку Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ñ€Ñдом Ñо ÑпиÑком мониторов." #: ../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" #: ../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "Щёлкните Ð¸Ð¼Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹." #: ../src/gddccontrol/notebook.c:639 #: ../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "ПолучаютÑÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ñ€ÐµÐ³Ð¸Ñтров (%d%%)..." #: ../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "ЗагружаютÑÑ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ð¸..." #: ../src/gddccontrol/notebook.c:677 msgid "There is no support for your monitor in the database, but ddccontrol is using a generic profile for your monitor's manufacturer. Some controls may not be supported, or may not work as expected.\n" msgstr "" #: ../src/gddccontrol/notebook.c:683 msgid "There is no support for your monitor in the database, but ddccontrol is using a basic generic profile. Many controls will not be supported, and some controls may not work as expected.\n" msgstr "" #: ../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "Предупреждение!" #: ../src/gddccontrol/notebook.c:690 msgid "Please update ddccontrol-db, or, if you are already using the latest version, please send the output of the following command to ddccontrol-users@lists.sourceforge.net:\n" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "Переключатель профилей монитора" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "_О программе..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "_СвойÑтва..." #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "_ЗапуÑтить gddcontrol..." #: ../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "Ðпплет Ð´Ð»Ñ Ð±Ñ‹Ñтрого Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÐµÐ¹ монитора.\n" "Работает на оÑнове libddccontrol и ÑвлÑетÑÑ Ñ‡Ð°Ñтью проекта ddccontrol.\n" "(http://ddccontrol.sourceforge.net)" #: ../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "Ðе удалоÑÑŒ инициализировать библиотеку ddcci" #: ../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "Ðе найдена ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¼Ð¾Ð½Ð¸Ñ‚Ð¾Ñ€Ð¾Ð². ЗапуÑтите Ñначала gddccontrol" #: ../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "Произошла ошибка при открытии уÑтройÑтва монитора" #: ../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "Ðе удалоÑÑŒ найти ни один профиль" #. only reached, if init was not finished #: ../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "ошибка" #: ../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "Монитор:" #: ../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "СвойÑтва Ð¿ÐµÑ€ÐµÐºÐ»ÑŽÑ‡Ð°Ñ‚ÐµÐ»Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÐµÐ¹ монитора" #: ../src/lib/conf.c:61 #: ../src/lib/conf.c:258 #: ../src/lib/conf.c:308 #: ../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "Ðе удалоÑÑŒ Ñоздать Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° (буфер Ñлишком мал)\n" #: ../src/lib/conf.c:86 #: ../src/lib/conf.c:363 #: ../src/lib/monitor_db.c:350 #: ../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "Ðе удалоÑÑŒ разобрать документ.\n" #: ../src/lib/conf.c:93 #: ../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "пуÑтой файл профилÑ\n" #: ../src/lib/conf.c:99 #: ../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "некорректный тип профилÑ, корень %s != profile" #: ../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "Ðе удалоÑÑŒ найти ÑвойÑтво ddccontrolversion." #: ../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "ddccontrol был обновлён Ñ Ð¼Ð¾Ð¼ÐµÐ½Ñ‚Ð° поÑледнего ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ ÑпиÑка мониторов (%s vs %s).\n" #: ../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "Ðе удалоÑÑŒ найти ÑвойÑтво filename." #: ../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "Ðе удалоÑÑŒ найти поддерживаемое ÑвойÑтво." #: ../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "Ðе удалоÑÑŒ преобразовать поддерживаемое ÑвойÑтво в int." #: ../src/lib/conf.c:138 #: ../src/lib/conf.c:385 #: ../src/lib/monitor_db.c:90 #: ../src/lib/monitor_db.c:194 #: ../src/lib/monitor_db.c:370 #: ../src/lib/monitor_db.c:426 #: ../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "Ðе удалоÑÑŒ найти Ñлемент name." #: ../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "Ðе удалоÑÑŒ найти цифровое ÑвойÑтво." #: ../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "Ðе удалоÑÑŒ преобразовать цифровое ÑвойÑтво в int." #: ../src/lib/conf.c:175 #: ../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "Ðе удалоÑÑŒ Ñоздать модуль запиÑи xml\n" #: ../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "Ðе удалоÑÑŒ прочеÑть значение региÑтра\n" #: ../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "Ðе удалоÑÑŒ запиÑать значение региÑтра\n" #: ../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "Ошибка при открытии домашнего каталога ddccontrol." #: ../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "Ошибка при чтении домашнего каталога ddccontrol." #: ../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "Ðе удалоÑÑŒ найти ÑвойÑтво pnpid." #: ../src/lib/conf.c:388 #: ../src/lib/conf.c:391 msgid "Can't find version property." msgstr "Ðе удалоÑÑŒ найти ÑвойÑтво version." #: ../src/lib/conf.c:390 #: ../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "Ðе удалоÑÑŒ преобразовать верÑию в int" #: ../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "профиль version (%d) не поддерживаетÑÑ (должно быть %d).\n" #: ../src/lib/conf.c:407 #: ../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "Ðе удалоÑÑŒ найти Ñлемент address." #: ../src/lib/conf.c:409 #: ../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "Ðе удалоÑÑŒ преобразовать Ð°Ð´Ñ€ÐµÑ Ð² int." #: ../src/lib/conf.c:413 #: ../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "Ðе удалоÑÑŒ найти Ñлемент value." #: ../src/lib/conf.c:415 #: ../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "Ðе удалоÑÑŒ преобразовать значение в int." #: ../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "ddcci_delete_profile: Ошибка, не удалоÑÑŒ удалить профиль.\n" #: ../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "ddcci_delete_profile: Ошибка, не удалоÑÑŒ найти Ñтот удалÑемый профиль.\n" #: ../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "Ошибка при инициализации очереди Ñообщений" #: ../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾ выходе" #: ../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "Ошибка при отправке очередного ÑообщениÑ" #: ../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "Ðе удалоÑÑŒ инициализировать базу данных ddccontrol...\n" #: ../src/lib/ddcci.c:275 #: ../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "ioctl вернул %d\n" #: ../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿Ð¸Ñи" #: ../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "Ошибка при получении ответа на Ñообщение запиÑи" #: ../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ñ‡Ñ‚ÐµÐ½Ð¸Ñ" #: ../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "Ошибка при получении ответа на Ñообщение чтениÑ" #: ../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "Ðеправильный ответ, первый байт 0x%02x, должен быть 0x%02x\n" #: ../src/lib/ddcci.c:485 #, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "ÐÐµÐºÑ€Ð¸Ñ‚Ð¸Ñ‡Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°: неправильный ответ, код 0x%02x\n" #: ../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "Ðеправильный ответ, длина %d, должна быть не менее %d\n" #: ../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "Ðеправильный ответ, разрушенные данные - xor равен 0x%02x, длина 0x%02x\n" #: ../src/lib/ddcci.c:658 #: ../src/lib/ddcci.c:680 #, fuzzy, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "Ðе могу преобразовать значение в int, неверный заголовок." #: ../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "ÐÐµÐ¿Ñ€Ð°Ð²Ð¸Ð»ÑŒÐ½Ð°Ñ Ð¿Ð¾ÑледовательноÑть в заголовках.\n" #: ../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "Разрушен EDID в 0x%02x.\n" #: ../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "Серийный номер: %d\n" #: ../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "Произведён: %d неделÑ, %d\n" #: ../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "ВерÑÐ¸Ñ EDID: %d.%d\n" #: ../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "МакÑимальный размер: %d x %d (Ñм)\n" #: ../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "Ошибка Ñ‡Ñ‚ÐµÐ½Ð¸Ñ EDID 0x%02x.\n" #: ../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "УÑтройÑтво: %s\n" #: ../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¸Ñ" #: ../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "Ошибка при получении ответа на Ñообщение открытиÑ" #: ../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "Ðеправильное Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° (%s).\n" #: ../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "ddcci_open вернул %d\n" #: ../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "ÐеизвеÑтный монитор (%s)" #: ../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "ПоиÑк доÑтупных мониторов" #: ../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "Ошибка при отправке ÑÐ¾Ð¾Ð±Ñ‰ÐµÐ½Ð¸Ñ ÑпиÑка" #: ../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "Ошибка при чтении Ñлемента ÑпиÑка" #: ../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "Ðайдено уÑтройÑтво PCI (%s)\n" #: ../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "Ðайдено уÑтройÑтво I2C (%s)\n" #: ../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "Ошибка при получении информации о домашнем каталоге ddccontrol." #: ../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "Ошибка при Ñоздании домашнего каталога ddccontrol." #: ../src/lib/ddcci.c:1216 msgid "Error while getting information about ddccontrol home directory after creating it." msgstr "Ошибка при при получении информации о домашнем каталоге ddccontrol поÑле его ÑозданиÑ." #: ../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "Ошибка: '.ddccontrol' в Вашем домашнем каталоге не ÑвлÑетÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼." #: ../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "Ошибка при получении информации о каталоге профилей ddccontrol." #: ../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "Ошибка при Ñоздании каталога профилей ddccontrol." #: ../src/lib/ddcci.c:1241 msgid "Error while getting information about ddccontrol profile directory after creating it." msgstr "Ошибка при при получении информации о каталоге профилей ddccontrol поÑле его ÑозданиÑ." #: ../src/lib/ddcci.c:1248 msgid "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "Ошибка: '.ddccontrol/profiles' в Вашем домашнем каталоге не ÑвлÑетÑÑ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ð¾Ð¼." #: ../src/lib/monitor_db.c:82 #: ../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "Ðе удалоÑÑŒ найти Ñлемент id." #: ../src/lib/monitor_db.c:151 #: ../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "Элемент %s (id=%s) не найден (Ñтрока %ld).\n" #: ../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "Ðеверный тип Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ (!= none, != all)." #: ../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "Управление %s отключено ÑоглаÑно Ñтроке заголовка.\n" #: ../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "РегиÑтр %s (0x%02x) уже определен.\n" #: ../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "Ðе удалоÑÑŒ преобразовать задержку в int." #: ../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "Ðе удалоÑÑŒ найти Ñлемент type." #: ../src/lib/monitor_db.c:292 #: ../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "Ðеверный тип." #: ../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "База данных должна быть инициализирована до Ñ‡Ñ‚ÐµÐ½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° монитора.\n" #: ../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "ПуÑтой файл monitor/%s.xml\n" #: ../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "monitor/%s.xml неверного типа, root node %s != monitor" #: ../src/lib/monitor_db.c:464 #, fuzzy msgid "Can't find add or remove property in caps." msgstr "Ðе могу найти Ñлемент address." #: ../src/lib/monitor_db.c:466 #, fuzzy msgid "Invalid remove caps." msgstr "ÐÐµÐ¿Ñ€Ð°Ð²Ð»ÑŒÐ½Ð°Ñ Ð¿Ð¾ÑледовательноÑть в заголовках.\n" #: ../src/lib/monitor_db.c:468 #, fuzzy msgid "Invalid add caps." msgstr "Ðеверный тип." #: ../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "Ошибка, найдена глубина рекурÑии > 15 (файл: %s).\n" #: ../src/lib/monitor_db.c:479 msgid "Can't find file property." msgstr "Ðе удалоÑÑŒ найти ÑвойÑтво file." #: ../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "" #: ../src/lib/monitor_db.c:534 msgid "Error enumerating controls in subgroup." msgstr "Ошибка при перечиÑлении региÑтров в подгруппе." #: ../src/lib/monitor_db.c:589 #, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "Документ неправильного типа, не удалоÑÑŒ найти региÑтры.\n" #: ../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "пуÑтой options.xml\n" #: ../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "options.xml неверного типа, root node %s != options" #: ../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "Ð’ options.xml отÑутÑтвует атрибут dbversion, обновите базу данных.\n" #: ../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "Ð’ options.xml отÑутÑтвует атрибут date, обновите базу данных.\n" #: ../src/lib/monitor_db.c:755 #, c-format msgid "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "Ð’ options.xml верÑÐ¸Ñ Ð±Ð°Ð·Ñ‹ данных (%d) больше поддерживаемой (%d).\n" #: ../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "Обновите программу ddccontrol.\n" #: ../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "Ð’ options.xml верÑÐ¸Ñ Ð±Ð°Ð·Ñ‹ данных (%d) меньше поддерживаемой (%d).\n" #: ../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "Обновите базу данных ddccontrol.\n" #~ msgid "Buffer too small to contain caps.\n" #~ msgstr "Буфер Ñлишком маленький Ð´Ð»Ñ Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð².\n" #~ msgid "Can't find init property." #~ msgstr "Ðе могу найти ÑвойÑтво init." #~ msgid "i740" #~ msgstr "i740" #~ msgid "intel740_open" #~ msgstr "intel740_open" #~ msgid "Xinerama supported and active\n" #~ msgstr "Xinerama поддерживаетÑÑ Ð¸ активна\n" #~ msgid "Display %d: %d, %d, %d, %d, %d\n" #~ msgstr "Экран %d: %d, %d, %d, %d, %d\n" #~ msgid "Xinerama supported but inactive.\n" #~ msgstr "Xinerama поддерживаетÑÑ, но неактивна\n" #~ msgid "Xinerama not supported\n" #~ msgstr "Xinerama не поддерживаетÑÑ\n" #, fuzzy #~ msgid "intel810.c:init_i2c_bus" #~ msgstr "i810_open: ошибка malloc.\n" #, fuzzy #~ msgid "i810_open" #~ msgstr "nvidia_open: Ошибка: mmap не выполнена\n" #, fuzzy #~ msgid "nvidia_open" #~ msgstr "nvidia_open: Ошибка: mmap не выполнена\n" #, fuzzy #~ msgid "radeon_open" #~ msgstr "nvidia_open: mmap не выполнена" #, fuzzy #~ msgid "ddc_control" #~ msgstr "Управление" #, fuzzy #~ msgid "%s%s.ddccontrol/monitorlist" #~ msgstr "Управление" #, fuzzy #~ msgid "monitorlist" #~ msgstr "Обновить вÑе региÑтры" #, fuzzy #~ msgid "ddccontrolversion" #~ msgstr "Управление" #, fuzzy #~ msgid "filename" #~ msgstr "Ð˜Ð¼Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ:" #, fuzzy #~ msgid "digital" #~ msgstr "Цифровой" #, fuzzy #~ msgid "%s%s.ddccontrol/profiles/%s.xml" #~ msgstr "Управление" #, fuzzy #~ msgid "%s%s.ddccontrol/profiles/" #~ msgstr "Управление" #, fuzzy #~ msgid "profile" #~ msgstr "Сохранить профиль" #, fuzzy #~ msgid "control" #~ msgstr "Управление" #, fuzzy #~ msgid "address" #~ msgstr "ÐдреÑ" #, fuzzy #~ msgid "value" #~ msgstr "Значение" #, fuzzy #~ msgid "%s%s.ddccontrol" #~ msgstr "Управление" #, fuzzy #~ msgid "/profiles" #~ msgstr "Сохранить профиль" #, fuzzy #~ msgid "ddccontrol-db" #~ msgstr "Управление" #, fuzzy #~ msgid "refresh" #~ msgstr "Обновить" #, fuzzy #~ msgid "%s/monitor/%s.xml" #~ msgstr "ПуÑтой файл monitor/%s.xml\n" #, fuzzy #~ msgid "controls" #~ msgstr "Управление" #, fuzzy #~ msgid "%s/options.xml" #~ msgstr "пуÑтой options.xml\n" #, fuzzy #~ msgid "options" #~ msgstr "пуÑтой options.xml\n" #~ msgid "Error: %s @%s:%d (%s:%ld)\n" #~ msgstr "Ошибка: %s @%s:%d (%s:%ld)\n" #~ msgid "Error: %s @%s:%d\n" #~ msgstr "Ошибка: %s @%s:%d\n" #~ msgid "nvidia_open: Malloc error.\n" #~ msgstr "nvidia_open: ошибка malloc.\n" #~ msgid "Please click on a parameter on the left to change it." #~ msgstr "ПожалуйÑта, щёлкните на параметре Ñлева Ð´Ð»Ñ ÐµÐ³Ð¾ изменениÑ." #~ msgid "restore_callback should not be called for command controls." #~ msgstr "Ðежелательно вызывать restore_callback Ð´Ð»Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ñ‹Ñ… региÑтров" ddccontrol-0.4.4/po/zh_CN.po000066400000000000000000001063651327040342400156430ustar00rootroot00000000000000# Chinese for ddccontrol # Copyright (C) YEAR Oleg I. Vdovikin and Nicolas Boichat # This file is distributed under the same license as the PACKAGE package. # Wu Songhai waq@21cn.com 2005 # msgid "" msgstr "" "Project-Id-Version: DDC/CI control tool cvs version 2005-11-12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-08-29 19:01+0800\n" "PO-Revision-Date: 2005-11-12 15:50+0800\n" "Last-Translator: Wu Songhai waq@21cn.com\n" "Language-Team: Simple Chinese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../src/ddccontrol/main.c:83 ../src/ddccontrol/main.c:87 #: ../src/ddccontrol/main.c:91 msgid "Control" msgstr "控制器" #: ../src/ddccontrol/main.c:132 #, fuzzy, c-format msgid "" "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" msgstr "" "用法:\n" "%s [-b æ•°æ®ç›®å½•] [-v] [-c] [-d] [-f] [-s] [-r 控制器 [-w 值]] [-p | 设备]\n" "\t设备: 如: dev:/dev/i2c-0\n" "\t-p : 检测I2C设备以查找显示器.\n" "\t-c : 查询显示器的功能\n" "\t-d : 查询显示器控制器 0 - 255\n" "\t-r : è¦æŸ¥è¯¢çš„æŽ§åˆ¶å™¨\n" "\t-w : 设置到控制器的值\n" "\t-f : 强制 (é¿å…有效性检查)\n" "\t-s : ä¿å­˜è®¾ç½®\n" "\t-v : å†—é•¿æ¨¡å¼ (增加更多详细的说明)\n" "\t-b : ddccontrol-db 目录 (å¦‚æžœä¸æ˜¯ %s çš„è¯)\n" #: ../src/ddccontrol/main.c:150 ../src/ddccontrol/main.c:172 #, c-format msgid "Checking %s integrity...\n" msgstr "正在检查 %s 的完整性...\n" #: ../src/ddccontrol/main.c:152 ../src/ddccontrol/main.c:174 #, c-format msgid "[ FAILED ]\n" msgstr "[ 失败 ]\n" #: ../src/ddccontrol/main.c:156 ../src/ddccontrol/main.c:179 #, c-format msgid "[ OK ]\n" msgstr "[ æˆåŠŸ ]\n" #: ../src/ddccontrol/main.c:217 #, fuzzy, c-format msgid "" "ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU " "General Public License.\n" "\n" msgstr "" "ddccontrol 版本 %s\n" "ç‰ˆæƒæ‰€æœ‰ 2005 Oleg I. Vdovikin (oleg@cs.msu.su) å’Œ Nicolas Boichat " "(nicolas@boichat.ch)\n" "使用此程åºå®Œå…¨æ²¡æœ‰ä»»ä½•æ‹…ä¿.\n" "ä½ å¯ä»¥åœ¨GNU通用公共许å¯(GPL)æ¡æ¬¾ä¸‹é‡æ–°å‘布此程åºçš„æ‹·è´.\n" "\n" #: ../src/ddccontrol/main.c:236 #, c-format msgid "'%s' does not seem to be a valid register name\n" msgstr "'%s' ä¸åƒæ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„æŽ§åˆ¶å™¨å\n" #: ../src/ddccontrol/main.c:242 #, c-format msgid "You cannot use -w parameter without -r.\n" msgstr "ä½ ä¸èƒ½åœ¨æ²¡æœ‰ -r 傿•°çš„æƒ…况下使用 -w 傿•°.\n" #: ../src/ddccontrol/main.c:247 #, c-format msgid "'%s' does not seem to be a valid value.\n" msgstr "'%s' ä¸åƒæ˜¯ä¸€ä¸ªæœ‰æ•ˆçš„值.\n" #: ../src/ddccontrol/main.c:292 ../src/gddccontrol/main.c:414 #, c-format msgid "Unable to initialize ddcci library.\n" msgstr "未能åˆå§‹åŒ–ddcci库.\n" #: ../src/ddccontrol/main.c:304 #, c-format msgid "Detected monitors :\n" msgstr "检查到的显示器:\n" #: ../src/ddccontrol/main.c:309 #, c-format msgid " - Device: %s\n" msgstr " - 设备: %s\n" #: ../src/ddccontrol/main.c:310 #, c-format msgid " DDC/CI supported: %s\n" msgstr " DDC/CI 支æŒ: %s\n" #: ../src/ddccontrol/main.c:310 msgid "Yes" msgstr "是" #: ../src/ddccontrol/main.c:310 msgid "No" msgstr "å¦" #: ../src/ddccontrol/main.c:311 #, c-format msgid " Monitor Name: %s\n" msgstr " 显示器åç§°: %s\n" #: ../src/ddccontrol/main.c:312 #, c-format msgid " Input type: %s\n" msgstr " 输入类型: %s\n" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Digital" msgstr "æ•°å­—" #: ../src/ddccontrol/main.c:312 ../src/ddccontrol/main.c:350 msgid "Analog" msgstr "模拟" #: ../src/ddccontrol/main.c:316 #, c-format msgid " (Automatically selected)\n" msgstr " (已自动选择)\n" #: ../src/ddccontrol/main.c:326 #, c-format msgid "" "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "æ²¡æœ‰æ”¯æŒ DDC/CI 的显示器存在.\n" "如果你的图形å¡éœ€è¦å®ƒ,请检查所有的必需的内核模å—å·²ç»åŠ è½½ (i2c-dev, 以åŠä½ çš„ " "framebuffer 驱动).\n" #: ../src/ddccontrol/main.c:339 #, c-format msgid "Reading EDID and initializing DDC/CI at bus %s...\n" msgstr "正在总线 %s 中读å–EDIDå’Œåˆå§‹åŒ–DDC/CI...\n" #: ../src/ddccontrol/main.c:343 #, c-format msgid "" "\n" "DDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver).\n" msgstr "" "\n" "在 %s 中的DDC/CI是ä¸å¯ç”¨çš„(%d).\n" "如果你的图形å¡éœ€è¦å®ƒ,请检查所有的必需的内核模å—å·²ç»åŠ è½½ (i2c-dev, 以åŠä½ çš„ " "framebuffer 驱动).\n" #: ../src/ddccontrol/main.c:347 #, c-format msgid "" "\n" "EDID readings:\n" msgstr "" "\n" "正在读å–EDIDæ•°æ®:\n" #: ../src/ddccontrol/main.c:348 #, c-format msgid "\tPlug and Play ID: %s [%s]\n" msgstr "\t峿’å³ç”¨ID: %s [%s]\n" #: ../src/ddccontrol/main.c:350 #, c-format msgid "\tInput type: %s\n" msgstr "\t输入信å·ç±»åž‹: %s\n" #. Put a big warning (in red if we are writing to a terminal). #: ../src/ddccontrol/main.c:354 ../src/ddccontrol/main.c:373 msgid "=============================== WARNING ===============================" msgstr "" #: ../src/ddccontrol/main.c:357 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n" msgstr "" #: ../src/ddccontrol/main.c:363 #, c-format msgid "" "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n" msgstr "" #: ../src/ddccontrol/main.c:368 #, c-format msgid "" "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n" msgstr "" #: ../src/ddccontrol/main.c:372 ../src/gddccontrol/notebook.c:695 #, c-format msgid "Thank you.\n" msgstr "" #: ../src/ddccontrol/main.c:377 #, c-format msgid "" "\n" "Capabilities:\n" msgstr "" "\n" "功能:\n" #: ../src/ddccontrol/main.c:381 #, c-format msgid "Raw output: %s\n" msgstr "" #: ../src/ddccontrol/main.c:383 #, c-format msgid "Parsed output: \n" msgstr "" #: ../src/ddccontrol/main.c:392 #, c-format msgid "\tType: " msgstr "" #: ../src/ddccontrol/main.c:395 #, c-format msgid "LCD" msgstr "" #: ../src/ddccontrol/main.c:398 #, c-format msgid "CRT" msgstr "" #: ../src/ddccontrol/main.c:401 #, c-format msgid "Unknown" msgstr "" #: ../src/ddccontrol/main.c:410 #, c-format msgid "Capabilities read fail.\n" msgstr "读å–功能失败.\n" #: ../src/ddccontrol/main.c:418 #, fuzzy, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d) (%dms delay)...\n" msgstr "" "\n" "正在写 0x%02x, 0x%02x(%d)...\n" #: ../src/ddccontrol/main.c:422 #, c-format msgid "" "\n" "Writing 0x%02x, 0x%02x(%d)...\n" msgstr "" "\n" "正在写 0x%02x, 0x%02x(%d)...\n" #: ../src/ddccontrol/main.c:427 #, c-format msgid "" "\n" "Reading 0x%02x...\n" msgstr "" "\n" "正在读 0x%02x...\n" #: ../src/ddccontrol/main.c:434 #, c-format msgid "" "\n" "Controls (valid/current/max) [Description - Value name]:\n" msgstr "" "\n" "控制器 (有效/当å‰å€¼/最大值) [æè¿° - 值å]:\n" #: ../src/ddccontrol/main.c:458 #, c-format msgid "\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n" msgstr "\t\t> 标识符=%s, åå­—=%s, 地å€=%#x, 延迟=%dms, 类型=%d\n" #: ../src/ddccontrol/main.c:463 #, c-format msgid "\t\t Possible values:\n" msgstr "\t\t å¯èƒ½çš„值:\n" #: ../src/ddccontrol/main.c:467 #, c-format msgid "\t\t\t> id=%s - name=%s, value=%d\n" msgstr "\t\t\t> 标识符=%s - åå­—=%s, 值=%d\n" #: ../src/ddccontrol/main.c:477 #, c-format msgid "\t\t supported, value=%d, maximum=%d\n" msgstr "\t\t 已支æŒ, 值=%d, 最大值=%d\n" #: ../src/ddccontrol/main.c:478 #, c-format msgid "\t\t not supported, value=%d, maximum=%d\n" msgstr "\t\t 䏿”¯æŒ, 值=%d, 最大值=%d\n" #: ../src/ddccontrol/main.c:489 #, c-format msgid "" "\n" "Saving settings...\n" msgstr "" "\n" "正在ä¿å­˜è®¾ç½®...\n" #. arbitration or no acknowledge #: ../src/ddcpci/i2c-algo-bit.c:368 #, c-format msgid "sendbytes: error - bailout.\n" msgstr "sendbytes: 错误 - bailout.\n" #. read timed out #: ../src/ddcpci/i2c-algo-bit.c:395 #, c-format msgid "i2c-algo-bit.o: readbytes: i2c_inb timed out.\n" msgstr "i2c-algo-bit.o: readbytes: i2c_inb è¶…æ—¶.\n" #: ../src/ddcpci/i2c-algo-bit.c:414 #, c-format msgid "i2c-algo-bit.o: readbytes: Timeout at ack\n" msgstr "i2c-algo-bit.o: readbytes: 确认时超时\n" #: ../src/ddcpci/intel740.c:103 ../src/ddcpci/intel810.c:161 #: ../src/ddcpci/nvidia.c:155 ../src/ddcpci/radeon.c:209 #, c-format msgid "%s: Malloc error.\n" msgstr "%s: malloc 出错.\n" #: ../src/ddcpci/intel740.c:109 #, c-format msgid "%s: ioperm failed" msgstr "%s: ioperm 失败" #: ../src/ddcpci/intel740.c:121 #, c-format msgid "%s: Error: unknown card type (%#x)\n" msgstr "%s: 错误: 未知的显å¡ç±»åž‹ (%#x)\n" #: ../src/ddcpci/intel810.c:105 #, c-format msgid "%s: Malloc error." msgstr "%s: malloc 出错." #: ../src/ddcpci/intel810.c:171 msgid "i810_open: cannot open /dev/mem" msgstr "i810_open: 打ä¸å¼€ /dev/mem" #: ../src/ddcpci/intel810.c:206 #, c-format msgid "i810_open: Error: cannot find any valid MMIO PCI region.\n" msgstr "i810_open: 错误 :找ä¸åˆ°ä»»ä½•有效的 MMIO PCI 区域.\n" #: ../src/ddcpci/intel810.c:213 msgid "i810_open: mmap failed" msgstr "i810_open: mmap 失败" #: ../src/ddcpci/main.c:154 msgid "==>Error while sending open message" msgstr "==>å‘逿‰“å¼€æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/ddcpci/main.c:178 ../src/ddcpci/main.c:184 ../src/ddcpci/main.c:202 msgid "==>Error while sending data answer message" msgstr "==>å‘逿•°æ®åº”ç­”æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/ddcpci/main.c:251 ../src/ddcpci/main.c:266 msgid "==>Error while sending list message" msgstr "==>å‘é€åˆ—è¡¨æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/ddcpci/main.c:284 #, c-format msgid "Invalid arguments.\n" msgstr "æ— æ•ˆçš„å‚æ•°.\n" #: ../src/ddcpci/main.c:290 #, c-format msgid "==>Can't read verbosity.\n" msgstr "==>ä¸èƒ½è¯»å–详细资料.\n" #: ../src/ddcpci/main.c:297 #, c-format msgid "==>Can't read key.\n" msgstr "==>ä¸èƒ½è¯»å–键值.\n" #: ../src/ddcpci/main.c:302 #, c-format msgid "==>Can't open key %u\n" msgstr "==>打ä¸å¼€é”®å€¼ %u\n" #: ../src/ddcpci/main.c:316 #, c-format msgid "==>No command received for %ld seconds, aborting.\n" msgstr "==>在 %ld 秒时间内没收到命令, 中止.\n" #: ../src/ddcpci/main.c:324 msgid "==>Error while receiving query\n" msgstr "==>接收查询时出错\n" #: ../src/ddcpci/main.c:359 #, c-format msgid "==>Invalid query...\n" msgstr "==>无效的查询...\n" #: ../src/ddcpci/nvidia.c:122 #, c-format msgid "nvidia.c:init_i2c_bus: Malloc error." msgstr "nvidia.c:init_i2c_bus: malloc 出错." #: ../src/ddcpci/nvidia.c:165 msgid "nvidia_open: cannot open /dev/mem" msgstr "nvidia_open: 打ä¸å¼€ /dev/mem" #: ../src/ddcpci/nvidia.c:175 msgid "nvidia_open: mmap failed" msgstr "nvidia_open: mmap 失败" #: ../src/ddcpci/radeon.c:173 #, c-format msgid "radeon.c:init_i2c_bus: Malloc error." msgstr "radeon.c:init_i2c_bus: malloc 出错." #: ../src/ddcpci/radeon.c:221 msgid "radeon_open: cannot open /dev/mem" msgstr "radeon_open: 打ä¸å¼€ /dev/mem" #: ../src/ddcpci/radeon.c:230 msgid "radeon_open: mmap failed" msgstr "radeon_open: mmap 失败" #: ../src/gddccontrol/fspatterns.c:195 msgid "" "Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" msgstr "" "调节亮度åŠå¯¹æ¯”度è¦éµå¾ªä»¥ä¸‹è§„则:\n" " - 黑色必须尽å¯èƒ½åœ°æš—.\n" " - 白色必须尽å¯èƒ½åœ°äº®.\n" " - 你必须能够辨别æ¯ä¸€ä¸ªç°åº¦çº§ (特别是 0 å’Œ 12).\n" #: ../src/gddccontrol/fspatterns.c:211 msgid "Try to make moire patterns disappear." msgstr "试图使摩尔纹图案消失." #: ../src/gddccontrol/fspatterns.c:215 msgid "" "Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen." msgstr "" "粗调使垂直区域消失.\n" "调节图åƒé”定细调使å±å¹•波动最å°." #: ../src/gddccontrol/fspatterns.c:254 #, c-format msgid "Unknown fullscreen pattern name: %s" msgstr "未知的全å±å›¾æ¡ˆåå­—: %s" #: ../src/gddccontrol/gprofile.c:53 msgid "You must select at least one control to be saved in the profile." msgstr "你必须至少选择一个控制项æ¥ä¿å­˜åˆ°é¢„设文件中." #: ../src/gddccontrol/gprofile.c:61 msgid "Creating profile..." msgstr "正在创建预设文件..." #: ../src/gddccontrol/gprofile.c:76 msgid "Error while creating profile." msgstr "创建预设文件时出错." #: ../src/gddccontrol/gprofile.c:93 msgid "Applying profile..." msgstr "正在应用预设..." #: ../src/gddccontrol/gprofile.c:116 #, c-format msgid "Are you sure you want to delete the profile '%s'?" msgstr "你确认è¦åˆ é™¤é¢„设文件 '%s' å—?" #: ../src/gddccontrol/gprofile.c:142 msgid "" "Please select the controls you want to save in the profile using the " "checkboxes to the left of each control." msgstr "请选择你想è¦ä¿å­˜åˆ°é¢„设文件中的控制项, 使用å„个控制项å‰çš„æ£€æŸ¥æ¡†." #: ../src/gddccontrol/gprofile.c:174 msgid "Profile Manager" msgstr "预设文件管ç†å™¨" #: ../src/gddccontrol/gprofile.c:193 msgid "Apply profile" msgstr "应用预设" #: ../src/gddccontrol/gprofile.c:198 msgid "Show profile details / Rename profile" msgstr "显示预设文件详细信æ¯/给预设文件改å" #: ../src/gddccontrol/gprofile.c:203 msgid "Delete profile" msgstr "删除预设文件" #: ../src/gddccontrol/gprofile.c:229 msgid "Create profile" msgstr "创建预设文件" #: ../src/gddccontrol/gprofile.c:235 msgid "Close profile manager" msgstr "关闭预设文件管ç†å™¨" #: ../src/gddccontrol/gprofile.c:299 msgid "Control name" msgstr "控制器åç§°" #: ../src/gddccontrol/gprofile.c:310 msgid "Value" msgstr "值" #: ../src/gddccontrol/gprofile.c:313 msgid "Address" msgstr "地å€" #: ../src/gddccontrol/gprofile.c:316 msgid "Raw value" msgstr "原始值" #: ../src/gddccontrol/gprofile.c:434 ../src/gddccontrol/gprofile.c:454 msgid "Profile information:" msgstr "预设信æ¯:" #: ../src/gddccontrol/gprofile.c:463 #, c-format msgid "File name: %s" msgstr "文件å: %s" #: ../src/gddccontrol/gprofile.c:474 msgid "Profile name:" msgstr "预设å:" #. Save #: ../src/gddccontrol/gprofile.c:496 msgid "Saving profile..." msgstr "正在ä¿å­˜é¢„设文件..." #: ../src/gddccontrol/gprofile.c:505 msgid "Error while saving profile." msgstr "ä¿å­˜é¢„设文件是出错." #: ../src/gddccontrol/main.c:177 #, c-format msgid "Monitor changed (%d %d).\n" msgstr "æ˜¾ç¤ºå™¨å·²æ”¹å˜ (%d %d).\n" #: ../src/gddccontrol/main.c:329 msgid "Probing for available monitors..." msgstr "正在检测å¯ç”¨çš„æ˜¾ç¤ºå™¨..." #: ../src/gddccontrol/main.c:368 msgid "" "No monitor supporting DDC/CI available.\n" "\n" "If your graphics card need it, please check all the required kernel modules " "are loaded (i2c-dev, and your framebuffer driver)." msgstr "" "没有支æŒDDC/CI的显示器存在.\n" "\n" "如果你的图形å¡éœ€è¦å®ƒ,请检查所有必需的内核模å—å·²ç»åŠ è½½ (i2c-dev, åŠä½ çš„ " "framebuffer 驱动)." #: ../src/gddccontrol/main.c:420 msgid "Unable to initialize ddcci library, see console for more details.\n" msgstr "ä¸èƒ½åˆå§‹åŒ–ddcci库,详细信æ¯å‚è§æŽ§åˆ¶å°.\n" #: ../src/gddccontrol/main.c:430 msgid "Monitor settings" msgstr "显示器的设置" #: ../src/gddccontrol/main.c:454 msgid "Current monitor: " msgstr "当剿˜¾ç¤ºå™¨: " #: ../src/gddccontrol/main.c:464 msgid "Refresh monitor list" msgstr "刷新显示器列表" #: ../src/gddccontrol/main.c:481 msgid "Profile manager" msgstr "预设文件管ç†" #: ../src/gddccontrol/main.c:488 msgid "Save profile" msgstr "ä¿å­˜é¢„设文件" #: ../src/gddccontrol/main.c:494 msgid "Cancel profile creation" msgstr "å–æ¶ˆå»ºç«‹é¢„设文件" #: ../src/gddccontrol/main.c:518 msgid "OK" msgstr "" #: ../src/gddccontrol/main.c:546 msgid "Refresh" msgstr "刷新" #: ../src/gddccontrol/main.c:546 msgid "Refresh all controls" msgstr "刷新所有控制项" #: ../src/gddccontrol/main.c:553 msgid "Close" msgstr "关闭" #. moninfo = gtk_label_new (); #. gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); #. #. gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5); #: ../src/gddccontrol/main.c:592 #, c-format msgid "Welcome to gddccontrol %s." msgstr "欢迎使用gddccontrol %s" #: ../src/gddccontrol/notebook.c:81 msgid "Error while getting value" msgstr "在å–值时å‘生错误" #: ../src/gddccontrol/notebook.c:116 ../src/gddccontrol/notebook.c:128 #, c-format msgid "Refreshing controls values (%d%%)..." msgstr "正在刷新控制项的值 (%d%%)..." #: ../src/gddccontrol/notebook.c:133 msgid "Could not get the control_db struct related to a control." msgstr "ä¸èƒ½èŽ·å–与一个控制器相关的控制库结构." #: ../src/gddccontrol/notebook.c:493 msgid "Show fullscreen patterns" msgstr "显示全å±å¼æ ·" #: ../src/gddccontrol/notebook.c:525 msgid "Section" msgstr "区段" #: ../src/gddccontrol/notebook.c:572 msgid "" "The current monitor is in the database but does not supports DDC/CI.\n" "\n" "This often occurs when you connect the VGA/DVI cable on the wrong input of " "monitors supporting DDC/CI only on one of its two inputs.\n" "\n" "If your monitor has two inputs, please try to connect the cable to the other " "input, and then click on the refresh button near the monitor list." msgstr "" "当剿˜¾ç¤ºå™¨åœ¨æ•°æ®åº“䏭但䏿”¯æŒ DDC/CI.\n" "\n" "è¿™é€šå¸¸æ˜¯ä½ çš„æ˜¾ç¤ºå™¨åªæœ‰ä¸€ä¸ªè¾“入壿”¯æŒDDC/CI,但VGA/DVI电缆被错误地连接到了å¦å¤–" "的输入å£.\n" "\n" "如果你的显示器有两个信å·è¾“入接å£, 请å°è¯•连接到å¦ä¸€ä¸ªæŽ¥å£, ç„¶åŽç‚¹å‡»æ˜¾ç¤ºå™¨åˆ—表" "æ—的刷新按钮." #: ../src/gddccontrol/notebook.c:583 #, c-format msgid "Opening the monitor device (%s)..." msgstr "正在打开显示器设备 (%s)..." #: ../src/gddccontrol/notebook.c:591 msgid "" "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on the refresh button near " "the monitor list." msgstr "" "在打开显示器设备时å‘生了一个错误.\n" "å¯èƒ½æ˜¯æ˜¾ç¤ºå™¨æ²¡æœ‰è¿žæŽ¥, 请点击显示器列表æ—的刷新按钮." #: ../src/gddccontrol/notebook.c:600 #, c-format msgid "" "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks." msgstr "" #: ../src/gddccontrol/notebook.c:620 msgid "Please click on a group name." msgstr "请å•击一个组å." #: ../src/gddccontrol/notebook.c:639 ../src/gddccontrol/notebook.c:650 #, c-format msgid "Getting controls values (%d%%)..." msgstr "æ­£åœ¨èŽ·å–æŽ§åˆ¶å™¨çš„å€¼ (%d%%)..." #: ../src/gddccontrol/notebook.c:664 msgid "Loading profiles..." msgstr "正在装载预设文件..." #: ../src/gddccontrol/notebook.c:677 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls may " "not be supported, or may not work as expected.\n" msgstr "" #: ../src/gddccontrol/notebook.c:683 msgid "" "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and some " "controls may not work as expected.\n" msgstr "" #: ../src/gddccontrol/notebook.c:688 msgid "Warning!" msgstr "" #: ../src/gddccontrol/notebook.c:690 msgid "" "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to ddccontrol-" "users@lists.sourceforge.net:\n" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:1 #: ../src/gnome-ddcc-applet/ddcc-applet.c:184 msgid "Monitor Profile Switcher" msgstr "显示器预设切æ¢å™¨" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in.h:2 msgid "Quickly switch monitor profiles created with gddccontrol" msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:1 msgid "_About..." msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:2 msgid "_Properties..." msgstr "" #: ../src/gnome-ddcc-applet/GNOME_ddcc-applet.xml.h:3 msgid "_Run gddccontrol..." msgstr "" #: ../src/gnome-ddcc-applet/ddcc-applet.c:189 msgid "" "An applet for quick switching of monitor profiles.\n" "Based on libddccontrol and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" msgstr "" "ä¸€ä¸ªå¿«é€Ÿåˆ‡æ¢æ˜¾ç¤ºå™¨é¢„设的å°ç¨‹åº.\n" "基于 libddccontrol 和部分 ddccontrol 项目.\n" "(http://ddccontrol.sourceforge.net)" #: ../src/gnome-ddcc-applet/ddcc-applet.c:386 msgid "Unable to initialize ddcci library" msgstr "未能åˆå§‹åŒ–ddcci库" #: ../src/gnome-ddcc-applet/ddcc-applet.c:390 msgid "No monitor configuration found. Please run gddccontrol first" msgstr "没找到显示器é…ç½®. 请先è¿è¡Œ gddccontrol" #: ../src/gnome-ddcc-applet/ddcc-applet.c:395 msgid "An error occurred while opening the monitor device" msgstr "打开显示器设备时å‘生了一个错误" #: ../src/gnome-ddcc-applet/ddcc-applet.c:400 msgid "Can't find any profiles" msgstr "找ä¸åˆ°ä»»ä½•预设文件." #. only reached, if init was not finished #: ../src/gnome-ddcc-applet/ddcc-applet.c:416 msgid "error" msgstr "错误" #: ../src/gnome-ddcc-applet/ddcc-applet.c:440 msgid "Monitor:" msgstr "显示器:" #: ../src/gnome-ddcc-applet/ddcc-applet.c:443 msgid "Monitor Profile Switcher Properties" msgstr "显示器预设切æ¢å™¨å±žæ€§" #: ../src/lib/conf.c:61 ../src/lib/conf.c:258 ../src/lib/conf.c:308 #: ../src/lib/ddcci.c:1202 msgid "Cannot create filename (buffer too small)\n" msgstr "ä¸èƒ½åˆ›å»ºæ–‡ä»¶å (缓冲区太å°)\n" #: ../src/lib/conf.c:86 ../src/lib/conf.c:363 ../src/lib/monitor_db.c:350 #: ../src/lib/monitor_db.c:714 #, c-format msgid "Document not parsed successfully.\n" msgstr "文档语法分æžä¸æˆåŠŸ.\n" #: ../src/lib/conf.c:93 ../src/lib/conf.c:370 #, c-format msgid "empty profile file\n" msgstr "空的预设文件\n" #: ../src/lib/conf.c:99 ../src/lib/conf.c:376 #, c-format msgid "profile of the wrong type, root node %s != profile" msgstr "预设文件有错误类型, 根节点 %s ä¸ç­‰äºŽ profile" #: ../src/lib/conf.c:105 msgid "Can't find ddccontrolversion property." msgstr "找ä¸åˆ°ddccontrol版本属性." #: ../src/lib/conf.c:107 #, c-format msgid "ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n" msgstr "在显示器列表ä¿å­˜ä¹‹åŽ ddccontrol å·²ç»è¢«å‡çº§äº†(%s vs %s).\n" #: ../src/lib/conf.c:124 msgid "Can't find filename property." msgstr "找ä¸åˆ°æ–‡ä»¶å属性." #: ../src/lib/conf.c:130 msgid "Can't find supported property." msgstr "找ä¸åˆ°æ”¯æŒå±žæ€§." #: ../src/lib/conf.c:133 msgid "Can't convert supported property to int." msgstr "支æŒå±žæ€§ä¸èƒ½è½¬æ¢æˆæ•´æ•°." #: ../src/lib/conf.c:138 ../src/lib/conf.c:385 ../src/lib/monitor_db.c:90 #: ../src/lib/monitor_db.c:194 ../src/lib/monitor_db.c:370 #: ../src/lib/monitor_db.c:426 ../src/lib/monitor_db.c:447 msgid "Can't find name property." msgstr "找ä¸åˆ°å称属性." #: ../src/lib/conf.c:144 msgid "Can't find digital property." msgstr "找ä¸åˆ°æ•°å­—å¼å±žæ€§." #: ../src/lib/conf.c:147 msgid "Can't convert digital property to int." msgstr "æ•°å­—å¼å±žæ€§ä¸èƒ½è½¬æ¢æˆæ•´æ•°." #: ../src/lib/conf.c:175 ../src/lib/conf.c:439 msgid "Cannot create the xml writer\n" msgstr "ä¸èƒ½åˆ›å»ºxml写入器\n" #: ../src/lib/conf.c:239 msgid "Cannot read control value\n" msgstr "ä¸èƒ½è¯»å–控制器值\n" #: ../src/lib/conf.c:276 msgid "Cannot write control value\n" msgstr "ä¸èƒ½å†™æŽ§åˆ¶å™¨å€¼\n" #: ../src/lib/conf.c:313 msgid "Error while opening ddccontrol home directory." msgstr "打开ddccontrol的目录时出错." #: ../src/lib/conf.c:337 msgid "Error while reading ddccontrol home directory." msgstr "读å–ddccontrol的目录时出错." #: ../src/lib/conf.c:382 msgid "Can't find pnpid property." msgstr "找ä¸åˆ° pnpid 属性." #: ../src/lib/conf.c:388 ../src/lib/conf.c:391 msgid "Can't find version property." msgstr "找ä¸åˆ°ç‰ˆæœ¬å±žæ€§." #: ../src/lib/conf.c:390 ../src/lib/monitor_db.c:752 msgid "Can't convert version to int." msgstr "版本ä¸èƒ½è½¬æ¢åˆ°æ•´æ•°." #: ../src/lib/conf.c:393 #, c-format msgid "profile version (%d) is not supported (should be %d).\n" msgstr "䏿”¯æŒçš„预设文件版本 (%d), 应该是 (%d).\n" #: ../src/lib/conf.c:407 ../src/lib/monitor_db.c:229 msgid "Can't find address property." msgstr "找ä¸åˆ°åœ°å€å±žæ€§." #: ../src/lib/conf.c:409 ../src/lib/monitor_db.c:231 msgid "Can't convert address to int." msgstr "地å€ä¸èƒ½è½¬æ¢æˆæ•´æ•°." #: ../src/lib/conf.c:413 ../src/lib/monitor_db.c:112 msgid "Can't find value property." msgstr "找ä¸åˆ°å€¼å±žæ€§." #: ../src/lib/conf.c:415 ../src/lib/monitor_db.c:114 msgid "Can't convert value to int." msgstr "值ä¸èƒ½è½¬æ¢æˆæ•´æ•°." #: ../src/lib/conf.c:499 msgid "ddcci_delete_profile: Error, cannot delete profile.\n" msgstr "ddcci_delete_profile: 错误, ä¸èƒ½åˆ é™¤é¢„设文件.\n" #: ../src/lib/conf.c:519 #, c-format msgid "ddcci_delete_profile: Error, could not find the profile to delete.\n" msgstr "ddcci_delete_profile: 错误, 找ä¸åˆ°è¦åˆ é™¤çš„预设文件.\n" #: ../src/lib/ddcci.c:146 msgid "Error while initialisating the message queue" msgstr "åˆå§‹åŒ–消æ¯é˜Ÿåˆ—时出错" #: ../src/lib/ddcci.c:175 msgid "Error while sending quit message" msgstr "å‘é€é€€å‡ºæ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:221 msgid "Error while sending heartbeat message" msgstr "å‘é€å¿ƒè·³æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:239 #, c-format msgid "Failed to initialize ddccontrol database...\n" msgstr "åˆå§‹åŒ– ddccontrol æ•°æ®åº“时失败...\n" #: ../src/lib/ddcci.c:275 ../src/lib/ddcci.c:350 #, c-format msgid "ioctl returned %d\n" msgstr "ioctl返回 %d\n" #: ../src/lib/ddcci.c:300 msgid "Error while sending write message" msgstr "å‘é€å†™æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:309 msgid "Error while reading write message answer" msgstr "读å–写消æ¯çš„应答时出错" #: ../src/lib/ddcci.c:376 msgid "Error while sending read message" msgstr "å‘é€è¯»æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:385 msgid "Error while reading read message answer" msgstr "读å–读消æ¯çš„应答时出错" #: ../src/lib/ddcci.c:475 #, c-format msgid "Invalid response, first byte is 0x%02x, should be 0x%02x\n" msgstr "无效的å“应, 首字节是 0x%02x, 应该是 0x%02x\n" #: ../src/lib/ddcci.c:485 #, fuzzy, c-format msgid "Non-fatal error: Invalid response, magic is 0x%02x\n" msgstr "无效的å“应, 魔术数是 0x%02x\n" #: ../src/lib/ddcci.c:492 #, c-format msgid "Invalid response, length is %d, should be %d at most\n" msgstr "无效的å“应, 长度是 %d, 最多应该是 %d\n" #: ../src/lib/ddcci.c:505 #, c-format msgid "Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n" msgstr "无效的å“应, å·²æŸåçš„æ•°æ® - xor 是 0x%02x, 长度 0x%02x\n" #: ../src/lib/ddcci.c:658 ../src/lib/ddcci.c:680 #, fuzzy, c-format msgid "Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n" msgstr "值ä¸èƒ½è½¬æ¢æˆæ•´æ•°, 无效的功能值." #: ../src/lib/ddcci.c:763 #, c-format msgid "Invalid sequence in caps.\n" msgstr "无效的功能å“应.\n" #: ../src/lib/ddcci.c:841 #, c-format msgid "Corrupted EDID at 0x%02x.\n" msgstr "在 0x%02x 中已æŸåçš„ EDIT.\n" #: ../src/lib/ddcci.c:853 #, c-format msgid "Serial number: %d\n" msgstr "åºåˆ—å·: %d\n" #: ../src/lib/ddcci.c:856 #, c-format msgid "Manufactured: Week %d, %d\n" msgstr "制造: %2$då¹´ 第%1$d周\n" #: ../src/lib/ddcci.c:859 #, c-format msgid "EDID version: %d.%d\n" msgstr "EDID版本: %d.%d\n" #: ../src/lib/ddcci.c:862 #, c-format msgid "Maximum size: %d x %d (cm)\n" msgstr "最大尺寸: %d x %d (cm)\n" #: ../src/lib/ddcci.c:873 #, c-format msgid "Reading EDID 0x%02x failed.\n" msgstr "读å–EDID 0x%02x 失败.\n" #: ../src/lib/ddcci.c:903 #, c-format msgid "Device: %s\n" msgstr "设备: %s\n" #: ../src/lib/ddcci.c:917 msgid "Error while sending open message" msgstr "å‘逿‰“å¼€æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:925 msgid "Error while reading open message answer" msgstr "è¯»å–æ‰“开消æ¯çš„应答时出错" #: ../src/lib/ddcci.c:933 #, c-format msgid "Invalid filename (%s).\n" msgstr "无效的文件å (%s).\n" #: ../src/lib/ddcci.c:1049 #, c-format msgid "ddcci_open returned %d\n" msgstr "ddcci_open 返回 %d\n" #: ../src/lib/ddcci.c:1062 #, c-format msgid "Unknown monitor (%s)" msgstr "未知的显示器 (%s)" #: ../src/lib/ddcci.c:1083 #, c-format msgid "Probing for available monitors" msgstr "正在探测å¯ç”¨çš„æ˜¾ç¤ºå™¨" #: ../src/lib/ddcci.c:1097 msgid "Error while sending list message" msgstr "å‘é€åˆ—è¡¨æ¶ˆæ¯æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:1106 msgid "Error while reading list entry" msgstr "读å–åˆ—è¡¨å…¥å£æ—¶å‡ºé”™" #: ../src/lib/ddcci.c:1123 #, c-format msgid "Found PCI device (%s)\n" msgstr "找到 PCI 设备 (%s)\n" #: ../src/lib/ddcci.c:1157 #, c-format msgid "Found I2C device (%s)\n" msgstr "找到 I2C 设备 (%s)\n" #: ../src/lib/ddcci.c:1206 msgid "Error while getting information about ddccontrol home directory." msgstr "获å–ddccontrolçš„ç›®å½•ä¿¡æ¯æ—¶å‡ºé”™." #: ../src/lib/ddcci.c:1211 msgid "Error while creating ddccontrol home directory." msgstr "创建ddccontrol的目录时出错." #: ../src/lib/ddcci.c:1216 msgid "" "Error while getting information about ddccontrol home directory after " "creating it." msgstr "创建ddccontrol的目录åŽå†èŽ·å–ç›®å½•ä¿¡æ¯æ—¶å‡ºé”™." #: ../src/lib/ddcci.c:1223 msgid "Error: '.ddccontrol' in your home directory is not a directory." msgstr "错误: 你目录的中'.ddccontrol'䏿˜¯ä¸€ä¸ªç›®å½•." #: ../src/lib/ddcci.c:1231 msgid "Error while getting information about ddccontrol profile directory." msgstr "获å–ddccontrolçš„é¢„è®¾ç›®å½•ä¿¡æ¯æ—¶å‡ºé”™." #: ../src/lib/ddcci.c:1236 msgid "Error while creating ddccontrol profile directory." msgstr "创建ddccontrol的预设目录时出错." #: ../src/lib/ddcci.c:1241 msgid "" "Error while getting information about ddccontrol profile directory after " "creating it." msgstr "创建ddccontrol的预设文件目录åŽå†èŽ·å–ç›®å½•ä¿¡æ¯æ—¶å‡ºé”™." #: ../src/lib/ddcci.c:1248 msgid "" "Error: '.ddccontrol/profiles' in your home directory is not a directory." msgstr "错误: 你目录的中'.ddccontrol/profiles'䏿˜¯ä¸€ä¸ªç›®å½•." #: ../src/lib/monitor_db.c:82 ../src/lib/monitor_db.c:192 msgid "Can't find id property." msgstr "找ä¸åˆ°id属性." #: ../src/lib/monitor_db.c:151 ../src/lib/monitor_db.c:546 #, c-format msgid "Element %s (id=%s) has not been found (line %ld).\n" msgstr "元件 %s (id=%s) å·²ç»æ‰¾åˆ° (%ld行).\n" #: ../src/lib/monitor_db.c:205 msgid "Invalid refresh type (!= none, != all)." msgstr "无效的刷新类型 (!= none, != all)." #: ../src/lib/monitor_db.c:238 #, c-format msgid "Control %s has been discarded by the caps string.\n" msgstr "控制器 %s 功能字符串已ç»è¢«ä¸¢å¼ƒ.\n" #: ../src/lib/monitor_db.c:246 #, c-format msgid "Control %s (0x%02x) has already been defined.\n" msgstr "" #: ../src/lib/monitor_db.c:259 msgid "Can't convert delay to int." msgstr "延迟ä¸èƒ½è½¬æ¢æˆæ•´æ•°." #: ../src/lib/monitor_db.c:267 msgid "Can't find type property." msgstr "找ä¸åˆ°ç±»åž‹å±žæ€§." #: ../src/lib/monitor_db.c:292 ../src/lib/monitor_db.c:381 msgid "Invalid type." msgstr "无效的类型." #: ../src/lib/monitor_db.c:343 #, c-format msgid "Database must be inited before reading a monitor file.\n" msgstr "在读å–一个显示器文件之å‰å¿…é¡»åˆå§‹åŒ–æ•°æ®åº“.\n" #: ../src/lib/monitor_db.c:357 #, c-format msgid "empty monitor/%s.xml\n" msgstr "monitor/%s.xml 是空的\n" #: ../src/lib/monitor_db.c:363 #, c-format msgid "monitor/%s.xml of the wrong type, root node %s != monitor" msgstr "monitor/%s.xml 有错误的类型, 根节点 %s ä¸ç­‰äºŽ monitor" #: ../src/lib/monitor_db.c:464 #, fuzzy msgid "Can't find add or remove property in caps." msgstr "找ä¸åˆ°åœ°å€å±žæ€§." #: ../src/lib/monitor_db.c:466 #, fuzzy msgid "Invalid remove caps." msgstr "无效的功能å“应.\n" #: ../src/lib/monitor_db.c:468 #, fuzzy msgid "Invalid add caps." msgstr "无效的类型." #: ../src/lib/monitor_db.c:473 #, c-format msgid "Error, include recursion level > 15 (file: %s).\n" msgstr "错误, 循环嵌套大于15层 (文件:%s).\n" #: ../src/lib/monitor_db.c:479 #, fuzzy msgid "Can't find file property." msgstr "找ä¸åˆ°æ–‡ä»¶å属性." #: ../src/lib/monitor_db.c:487 msgid "Two controls part in XML file." msgstr "" #: ../src/lib/monitor_db.c:534 #, fuzzy msgid "Error enumerating controls in subgroup." msgstr "组中有错误的控制器列举." #: ../src/lib/monitor_db.c:589 #, fuzzy, c-format msgid "document of the wrong type, can't find controls or include.\n" msgstr "文档有错误的类型, 找ä¸åˆ°æŽ§åˆ¶å™¨.\n" #: ../src/lib/monitor_db.c:721 #, c-format msgid "empty options.xml\n" msgstr "options.xml 是空的\n" #: ../src/lib/monitor_db.c:728 #, c-format msgid "options.xml of the wrong type, root node %s != options" msgstr "options.xml 有错误的类型, 根节点 %s ä¸ç­‰äºŽ options" #: ../src/lib/monitor_db.c:738 #, c-format msgid "options.xml dbversion attribute missing, please update your database.\n" msgstr "options.xml 的数æ®åº“版本(dbversion)属性缺失, 请更新你的数æ®åº“.\n" #: ../src/lib/monitor_db.c:745 #, c-format msgid "options.xml date attribute missing, please update your database.\n" msgstr "options.xml 的日期(date)属性缺失, 请更新你的数æ®åº“.\n" #: ../src/lib/monitor_db.c:755 #, c-format msgid "" "options.xml dbversion (%d) is greater than the supported version (%d).\n" msgstr "options.xml 的数æ®åº“版本 (%d) 大于支æŒçš„版本 (%d).\n" #: ../src/lib/monitor_db.c:756 #, c-format msgid "Please update ddccontrol program.\n" msgstr "请更新ddccontrol程åº.\n" #: ../src/lib/monitor_db.c:763 #, c-format msgid "options.xml dbversion (%d) is less than the supported version (%d).\n" msgstr "options.xml 的数æ®åº“版本 (%d) å°äºŽæ”¯æŒçš„版本 (%d).\n" #: ../src/lib/monitor_db.c:764 #, c-format msgid "Please update ddccontrol database.\n" msgstr "请更新ddccontrolæ•°æ®åº“.\n" #~ msgid "Buffer too small to contain caps.\n" #~ msgstr "缓冲区太å°ä¸èƒ½å®¹çº³åŠŸèƒ½æ•°æ®.\n" #~ msgid "Can't find init property." #~ msgstr "找ä¸åˆ°åˆå§‹åŒ–属性." #~ msgid "Xinerama supported and active\n" #~ msgstr "Xinerama 已支æŒä¸”是激活的\n" #~ msgid "Display %d: %d, %d, %d, %d, %d\n" #~ msgstr "显示 %d: %d, %d, %d, %d, %d\n" #~ msgid "Xinerama supported but inactive.\n" #~ msgstr "Xinerama 已支æŒä½†æ²¡æœ‰æ¿€æ´».\n" #~ msgid "Xinerama not supported\n" #~ msgstr "Xinerama 䏿”¯æŒ\n" #~ msgid "Monitor Settings" #~ msgstr "显示器的设置" #~ msgid "Error: %s @%s:%d\n" #~ msgstr "错误: %s @%s:%d\n" #~ msgid "Error: %s @%s:%d (%s:%ld)\n" #~ msgstr "错误: %s @%s:%d (%s:%ld)\n" ddccontrol-0.4.4/src/000077500000000000000000000000001327040342400144405ustar00rootroot00000000000000ddccontrol-0.4.4/src/Makefile.am000066400000000000000000000001021327040342400164650ustar00rootroot00000000000000SUBDIRS = lib ddccontrol $(GNOME_APPLET) $(GDDCCONTROL) $(DDCPCI) ddccontrol-0.4.4/src/ddccontrol/000077500000000000000000000000001327040342400165735ustar00rootroot00000000000000ddccontrol-0.4.4/src/ddccontrol/Makefile.am000066400000000000000000000004121327040342400206240ustar00rootroot00000000000000localedir = $(datadir)/locale AM_CPPFLAGS = -I$(top_srcdir)/src/lib -DLOCALEDIR=\"$(localedir)\" LDADD = ../lib/libddccontrol.la bin_PROGRAMS = ddccontrol ddccontrol_SOURCES = main.c ddccontrol_LDFLAGS = $(LIBXML2_LDFLAGS) $(LIBINTL) AM_CFLAGS = $(LIBXML2_CFLAGS) ddccontrol-0.4.4/src/ddccontrol/main.c000066400000000000000000000323571327040342400176750ustar00rootroot00000000000000/* ddc/ci command line tool Copyright(c) 2004 Oleg I. Vdovikin (oleg@cs.msu.su) Copyright(c) 2004-2006 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "config.h" #include "ddcci.h" #include "internal.h" #include "monitor_db.h" #include #include #include #include #include #include #include #define RETRYS 3 /* number of retrys */ static void dumpctrl(struct monitor* mon, unsigned char ctrl, int force) { unsigned short value, maximum; int retry, result; struct monitor_db* monitor = mon->db; struct group_db* group; struct subgroup_db* subgroup; struct control_db* control; struct value_db* valued; xmlChar* controlname = NULL; xmlChar* valuename = NULL; for (retry = RETRYS; retry; retry--) { if ((result = ddcci_readctrl(mon, ctrl, &value, &maximum)) >= 0) { if ((result > 0) || force) { if (monitor) { /* loop through groups */ for (group = monitor->group_list; (group != NULL) && (controlname == NULL); group = group->next) { /* loop through subgroups inside group */ for (subgroup = group->subgroup_list; (subgroup != NULL); subgroup = subgroup->next) { /* loop through controls inside subgroup */ for (control = subgroup->control_list; (control != NULL); control = control->next) { /* check for control id */ if (control->address == ctrl) { controlname = control->name; /* look for the value */ for (valued = control->value_list; (valued != NULL); valued = valued->next) { if (valued->value == value) { valuename = valued->name; break; } } break; } } } } } if (controlname == NULL) { fprintf(stdout, "%s 0x%02x: %c/%d/%d %c [???]\n", _("Control"), ctrl, (result > 0) ? '+' : '-', value, maximum, (mon->caps.vcp[ctrl]) ? 'C' : ' '); } else if (valuename == NULL) { fprintf(stdout, "%s 0x%02x: %c/%d/%d %c [%s]\n", _("Control"), ctrl, (result > 0) ? '+' : '-', value, maximum, (mon->caps.vcp[ctrl]) ? 'C' : ' ', controlname); } else { fprintf(stdout, "%s 0x%02x: %c/%d/%d %c [%s - %s]\n", _("Control"), ctrl, (result > 0) ? '+' : '-', value, maximum, (mon->caps.vcp[ctrl]) ? 'C' : ' ', controlname, valuename); } } break; } } } /* Find the delay we must respect after writing to an address in the database. */ static int find_write_delay(struct monitor* mon, char ctrl) { struct monitor_db* monitor = mon->db; struct group_db* group; struct subgroup_db* subgroup; struct control_db* control; if (monitor) { /* loop through groups */ for (group = monitor->group_list; group != NULL; group = group->next) { /* loop through subgroups inside group */ for (subgroup = group->subgroup_list; subgroup != NULL; subgroup = subgroup->next) { /* loop through controls inside subgroup */ for (control = subgroup->control_list; control != NULL; control = control->next) { /* check for control id */ if (control->address == ctrl) { return control->delay; } } } } } return -1; } static void usage(char *name) { fprintf(stderr,_( "Usage:\n" "%s [-b datadir] [-v] [-c] [-d] [-f] [-s] [-r ctrl [-w value]] [-p | dev]\n" "\tdev: device, e.g. dev:/dev/i2c-0\n" "\t-p : probe I2C devices to find monitor buses\n" "\t-c : query capability\n" "\t-d : query ctrls 0 - 255\n" "\t-r : query ctrl\n" "\t-w : value to write to ctrl\n" "\t-f : force (avoid validity checks)\n" "\t-s : save settings\n" "\t-v : verbosity (specify more to increase)\n" "\t-b : ddccontrol-db directory (if other than %s)\n" ), name, DATADIR); } static void check_integrity(char* datadir, char* pnpname) { struct monitor_db* mon_db; printf(_("Checking %s integrity...\n"), "options.xml"); if (!ddcci_init_db(datadir)) { printf(_("[ FAILED ]\n")); exit(1); } printf(_("[ OK ]\n")); /* Create caps with all controls. */ char buf2[4]; char buffer[256*3+25]; strcpy(buffer, "(vcp("); int i; for (i = 0; i < 256; i++) { snprintf(buf2, 4, "%02x ", i); strcat(buffer, buf2); } strcat(buffer, "))"); struct caps caps; ddcci_parse_caps(buffer, &caps, 1); printf(_("Checking %s integrity...\n"), pnpname); if (!(mon_db = ddcci_create_db(pnpname, &caps, 0))) { printf(_("[ FAILED ]\n")); ddcci_release_db(); exit(1); } printf(_("[ OK ]\n")); ddcci_free_db(mon_db); ddcci_release_db(); exit(0); } int main(int argc, char **argv) { int i, retry, ret; /* filedescriptor and name of device */ struct monitor mon; char *fn; char *datadir = NULL; char *pnpname = NULL; /* pnpname for -i parameter */ /* what to do */ int dump = 0; int ctrl = -1; int value = -1; int caps = 0; int save = 0; int force = 0; int verbosity = 0; int probe = 0; #ifdef HAVE_GETTEXT setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain("ddccontrol-db", LOCALEDIR); textdomain(PACKAGE); #endif fprintf(stdout, _("ddccontrol version %s\n" "Copyright 2004-2005 Oleg I. Vdovikin (oleg@cs.msu.su)\n" "Copyright 2004-2006 Nicolas Boichat (nicolas@boichat.ch)\n" "This program comes with ABSOLUTELY NO WARRANTY.\n" "You may redistribute copies of this program under the terms of the GNU General Public License.\n\n"), VERSION); while ((i=getopt(argc,argv, "hdr:w:csfvpb:i:")) >= 0) { switch(i) { case 'h': usage(argv[0]); exit(1); break; case 'b': datadir = optarg; break; case 'r': if ((ctrl = strtol(optarg, NULL, 0)) < 0 || (ctrl > 255)) { fprintf(stderr,_("'%s' does not seem to be a valid register name\n"), optarg); exit(1); } break; case 'w': if (ctrl == -1) { fprintf(stderr,_("You cannot use -w parameter without -r.\n")); exit(1); } if ((value = strtol(optarg, NULL, 0)) < 0 || (value > 65535)) { fprintf(stderr,_("'%s' does not seem to be a valid value.\n"), optarg); exit(1); } break; case 'c': caps++; break; case 'd': dump++; break; case 's': save++; break; case 'f': force++; break; case 'v': verbosity++; break; case 'p': probe++; break; case 'i': /* Undocumented developer parameter: check integrity of a specific EDID id */ pnpname = optarg; break; } } ddcci_verbosity(verbosity); if (pnpname) { check_integrity(datadir, pnpname); } if ((optind == argc) && (!probe)) /* Nor device, nor probe option specified. */ { usage(argv[0]); exit(1); } else if ((optind != argc) && (probe)) /* Device and probe option specified. */ { usage(argv[0]); exit(1); } if (!ddcci_init(datadir)) { printf(_("Unable to initialize ddcci library.\n")); exit(1); } if (probe) { fn = NULL; struct monitorlist* monlist; struct monitorlist* current; monlist = ddcci_probe(); printf(_("Detected monitors :\n")); current = monlist; while (current != NULL) { printf(_(" - Device: %s\n"), current->filename); printf(_(" DDC/CI supported: %s\n"), current->supported ? _("Yes") : _("No")); printf(_(" Monitor Name: %s\n"), current->name); printf(_(" Input type: %s\n"), current->digital ? _("Digital") : _("Analog")); if ((!fn) && (current->supported)) { printf(_(" (Automatically selected)\n")); fn = malloc(strlen(current->filename)+1); strcpy(fn, current->filename); } current = current->next; } if (fn == NULL) { fprintf(stderr, _( "No monitor supporting DDC/CI available.\n" "If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).\n" )); ddcci_release(); exit(0); } ddcci_free_list(monlist); } else { fn = argv[optind]; } fprintf(stdout, _("Reading EDID and initializing DDC/CI at bus %s...\n"), fn); if ((ret = ddcci_open(&mon, fn, 0)) < 0) { fprintf(stderr, _( "\nDDC/CI at %s is unusable (%d).\n" "If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver).\n" ), fn, ret); } else { fprintf(stdout, _("\nEDID readings:\n")); fprintf(stdout, _("\tPlug and Play ID: %s [%s]\n"), mon.pnpid, mon.db ? mon.db->name : NULL); fprintf(stdout, _("\tInput type: %s\n"), mon.digital ? _("Digital") : _("Analog")); if (mon.fallback) { /* Put a big warning (in red if we are writing to a terminal). */ printf("%s%s\n", isatty(1) ? "\x1B[0;31m" : "", _("=============================== WARNING ===============================")); if (mon.fallback == 1) { printf(_( "There is no support for your monitor in the database, but ddccontrol is\n" "using a generic profile for your monitor's manufacturer. Some controls\n" "may not be supported, or may not work as expected.\n")); } else if (mon.fallback == 2) { printf(_( "There is no support for your monitor in the database, but ddccontrol is\n" "using a basic generic profile. Many controls will not be supported, and\n" "some controls may not work as expected.\n")); } printf(_( "Please update ddccontrol-db, or, if you are already using the latest\n" "version, please send the output of the following command to\n" "ddccontrol-users@lists.sourceforge.net:\n")); printf("\nLANG= LC_ALL= ddccontrol -p -c -d\n\n"); printf(_("Thank you.\n")); printf("%s%s\n", _("=============================== WARNING ==============================="), isatty(1) ? "\x1B[0m" : ""); } if (caps) { fprintf(stdout, _("\nCapabilities:\n")); for (retry = RETRYS; retry; retry--) { if (ddcci_caps(&mon) >= 0) { fprintf(stdout, _("Raw output: %s\n"), mon.caps.raw_caps); fprintf(stdout, _("Parsed output: \n")); fprintf(stdout, "\tVCP: "); int i; for (i = 0; i < 256; i++) { if (mon.caps.vcp[i]) { printf("%02x ", i); } } printf("\n"); printf(_("\tType: ")); switch(mon.caps.type) { case lcd: printf(_("LCD")); break; case crt: printf(_("CRT")); break; case unk: printf(_("Unknown")); break; } printf("\n"); break; } } if (retry == 0) { fprintf(stderr, _("Capabilities read fail.\n")); } } if (ctrl >= 0) { if (value >= 0) { int delay = find_write_delay(&mon, ctrl); if (delay >= 0) { fprintf(stdout, _("\nWriting 0x%02x, 0x%02x(%d) (%dms delay)...\n"), ctrl, value, value, delay); } else { fprintf(stdout, _("\nWriting 0x%02x, 0x%02x(%d)...\n"), ctrl, value, value); } ddcci_writectrl(&mon, ctrl, value, delay); } else { fprintf(stdout, _("\nReading 0x%02x...\n"), ctrl); } dumpctrl(&mon, ctrl, 1); } if (dump) { fprintf(stdout, _("\nControls (valid/current/max) [Description - Value name]:\n")); for (i = 0; i < 256; i++) { dumpctrl(&mon, i, force); } } else if (ctrl == -1 && caps == 0) { struct monitor_db* monitor = mon.db; struct group_db* group; struct subgroup_db* subgroup; struct control_db* control; struct value_db* valued; if (monitor) { printf("\n= %s\n", monitor->name); for (group = monitor->group_list; group != NULL; group = group->next) { printf("> %s\n", group->name); for (subgroup = group->subgroup_list; subgroup != NULL; subgroup = subgroup->next) { printf("\t> %s\n", subgroup->name); for (control = subgroup->control_list; control != NULL; control = control->next) { printf(_("\t\t> id=%s, name=%s, address=%#x, delay=%dms, type=%d\n"), control->id, control->name, control->address, control->delay, control->type); valued = control->value_list; if (valued) { printf(_("\t\t Possible values:\n")); } for (; valued != NULL; valued = valued->next) { printf(_("\t\t\t> id=%s - name=%s, value=%d\n"), valued->id, valued->name, valued->value); } for (retry = RETRYS; retry; retry--) { int result; unsigned short value, maximum; if ((result = ddcci_readctrl(&mon, control->address, &value, &maximum)) >= 0) { printf( (result > 0) ? _("\t\t supported, value=%d, maximum=%d\n") : _("\t\t not supported, value=%d, maximum=%d\n"), value, maximum); break; } } } } } } } if (save) { fprintf(stdout, _("\nSaving settings...\n")); ddcci_save(&mon); } } ddcci_close(&mon); if (probe) { free(fn); } ddcci_release(); exit(0); } ddccontrol-0.4.4/src/ddcpci/000077500000000000000000000000001327040342400156665ustar00rootroot00000000000000ddccontrol-0.4.4/src/ddcpci/Makefile.am000066400000000000000000000006311327040342400177220ustar00rootroot00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/lib -DLOCALEDIR=\"$(localedir)\" # install to libexec, because it's not intended to be run by user pkglibexec_PROGRAMS = ddcpci ddcpci_LDFLAGS = -Wl,-z,now ddcpci_SOURCES = main.c nvidia.c radeon.c i2c-algo-bit.c intel810.c ddcpci.h i2c-algo-bit.h via.c sis.c EXTRA_DIST = intel740.c install-exec-hook: chmod 4711 ${DESTDIR}/${pkglibexecdir}/ddcpci ddccontrol-0.4.4/src/ddcpci/ddcpci.h000066400000000000000000000035571327040342400172770ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface - header file Copyright(c) 2004 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DDCPCI_H #define DDCPCI_H #include #include "i2c-algo-bit.h" #include #include #define _(String) gettext (String) #define gettext_noop(String) String #define N_(String) gettext_noop (String) struct card { void* data; int nbusses; struct i2c_algo_bit_data* i2c_busses; }; int get_verbosity(); typedef struct card* (*card_open)(struct pci_dev*); typedef void (*card_close)(struct card*); /* nVidia functions */ struct card* nvidia_open (struct pci_dev *dev); void nvidia_close(struct card* nvidia_card); /* nVidia functions */ struct card* radeon_open (struct pci_dev *dev); void radeon_close(struct card* radeon_card); /* Intel 810 functions */ struct card* i810_open (struct pci_dev *dev); void i810_close(struct card* intel810_card); /* Via Unichrome functions */ struct card* via_open(struct pci_dev*dev); void via_close(struct card* via_card); /* SIS functions */ struct card* sis_open(struct pci_dev*dev); void sis_close(struct card* sis_card); #endif //DDCPCI_H ddccontrol-0.4.4/src/ddcpci/i2c-algo-bit.c000066400000000000000000000324571327040342400202160ustar00rootroot00000000000000/* ------------------------------------------------------------------------- */ /* i2c-algo-bit.c i2c driver algorithms for bit-shift adapters */ /* ------------------------------------------------------------------------- */ /* Copyright (C) 1995-2000 Simon G. Vogl 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ /* With some changes from Frodo Looijaard , Ky�sti M�lkki and Jean Delvare */ /* Adapted to user space by Nicolas Boichat */ #include #include #include #include #include #include #include "i2c-algo-bit.h" #include #include #define _(String) gettext (String) #define gettext_noop(String) String #define N_(String) gettext_noop (String) /* ----- global defines ----------------------------------------------- */ #define DEB(x) if (i2c_debug>=1) x; #define DEB2(x) if (i2c_debug>=2) x; #define DEBSTAT(x) if (i2c_debug>=3) x; /* print several statistical values*/ #define DEBPROTO(x) if (i2c_debug>=9) { x; } /* debug the protocol by showing transferred bits */ #define RETRIES 3 /* ----- global variables --------------------------------------------- */ /* module parameters: */ static int i2c_debug = 0; static struct timeval lasttv; static struct timeval newtv; /* ----- sleep function --------------------------------------------- */ static inline void ssleep(const int usec) { gettimeofday(&lasttv, NULL); while (1) { gettimeofday(&newtv, NULL); if (((newtv.tv_usec - lasttv.tv_usec) + ((newtv.tv_sec - lasttv.tv_sec)*1000000)) > usec) { break; } } } /* --- setting states on the bus with the right timing: --------------- */ #define setsda(adap,val) adap->setsda(adap->data, val) #define setscl(adap,val) adap->setscl(adap->data, val) #define getsda(adap) adap->getsda(adap->data) #define getscl(adap) adap->getscl(adap->data) static inline void sdalo(struct i2c_algo_bit_data *adap) { setsda(adap,0); ssleep(adap->udelay); } static inline void sdahi(struct i2c_algo_bit_data *adap) { setsda(adap,1); ssleep(adap->udelay); } static inline void scllo(struct i2c_algo_bit_data *adap) { setscl(adap,0); ssleep(adap->udelay); } /* * Raise scl line, and do checking for delays. This is necessary for slower * devices. */ static inline int sclhi(struct i2c_algo_bit_data *adap) { setscl(adap,1); /* Not all adapters have scl sense line... */ if (adap->getscl == NULL ) { ssleep(adap->udelay); return 0; } gettimeofday(&lasttv, NULL); gettimeofday(&newtv, NULL); while (! getscl(adap) ) { /* the hw knows how to read the clock line, * so we wait until it actually gets high. * This is safer as some chips may hold it low * while they are processing data internally. */ gettimeofday(&newtv, NULL); if (((newtv.tv_usec - lasttv.tv_usec) + ((newtv.tv_sec - lasttv.tv_sec)*1000000)) > adap->timeout) { return -1; } } DEBSTAT(printf("waited %ld usecs\n", ((newtv.tv_usec - lasttv.tv_usec) + ((newtv.tv_sec - lasttv.tv_sec)*1000000)))); ssleep(adap->udelay); return 0; } /* --- other auxiliary functions -------------------------------------- */ static void i2c_start(struct i2c_algo_bit_data *adap) { /* assert: scl, sda are high */ DEBPROTO(printf("S ")); sdalo(adap); scllo(adap); } static void i2c_repstart(struct i2c_algo_bit_data *adap) { /* scl, sda may not be high */ DEBPROTO(printf(" Sr ")); setsda(adap,1); sclhi(adap); ssleep(adap->udelay); sdalo(adap); scllo(adap); } static void i2c_stop(struct i2c_algo_bit_data *adap) { DEBPROTO(printf("P\n")); /* assert: scl is low */ sdalo(adap); sclhi(adap); sdahi(adap); } /* send a byte without start cond., look for arbitration, check ackn. from slave */ /* returns: * 1 if the device acknowledged * 0 if the device did not ack * -1 if an error occurred (while raising the scl line) */ static int i2c_outb(struct i2c_algo_bit_data *adap, char c) { int i; int sb; int ack; /* assert: scl is low */ for ( i=7 ; i>=0 ; i-- ) { sb = c & ( 1 << i ); setsda(adap,sb); ssleep(adap->udelay); DEBPROTO(printf("%d",sb!=0)); if (sclhi(adap)<0) { /* timed out */ sdahi(adap); /* we don't want to block the net */ DEB2(printf(" i2c_outb: 0x%02x, timeout at bit #%d\n", c&0xff, i)); return -1; }; /* do arbitration here: * if ( sb && ! getsda(adap) ) -> ouch! Get out of here. */ setscl(adap, 0 ); ssleep(adap->udelay); } sdahi(adap); if (sclhi(adap)<0){ /* timeout */ DEB2(printf(" i2c_outb: 0x%02x, timeout at ack\n", c&0xff)); return -1; }; /* read ack: SDA should be pulled down by slave */ ack=getsda(adap); /* ack: sda is pulled low ->success. */ DEB2(printf(" i2c_outb: 0x%02x , getsda() = %d\n", c & 0xff, ack)); DEBPROTO( printf("[%2.2x]",c&0xff) ); DEBPROTO(if (0==ack){ printf(" A ");} else printf(" NA ") ); scllo(adap); return 0==ack; /* return 1 if device acked */ /* assert: scl is low (sda undef) */ } static int i2c_inb(struct i2c_algo_bit_data *adap) { /* read byte via i2c port, without start/stop sequence */ /* acknowledge is sent in i2c_read. */ int i; unsigned char indata=0; /* assert: scl is low */ sdahi(adap); for (i=0;i<8;i++) { if (sclhi(adap)<0) { /* timeout */ DEB2(printf(" i2c_inb: timeout at bit #%d\n", 7-i)); return -1; }; indata *= 2; if ( getsda(adap) ) indata |= 0x01; scllo(adap); } /* assert: scl is low */ DEB2(printf("i2c_inb: 0x%02x\n", indata & 0xff)); DEBPROTO(printf(" 0x%02x", indata & 0xff)); return (int) (indata & 0xff); } /* * Sanity check for the adapter hardware - check the reaction of * the bus lines only if it seems to be idle. */ int test_bus(struct i2c_algo_bit_data *adap, char* name) { int scl,sda; if (adap->getscl==NULL) printf("i2c-algo-bit.o: Testing SDA only, " "SCL is not readable.\n"); sda=getsda(adap); scl=(adap->getscl==NULL?1:getscl(adap)); printf("i2c-algo-bit.o: (0) scl=%d, sda=%d\n",scl,sda); if (!scl || !sda ) { printf("i2c-algo-bit.o: %s seems to be busy.\n", name); goto bailout; } sdalo(adap); sda=getsda(adap); scl=(adap->getscl==NULL?1:getscl(adap)); printf("i2c-algo-bit.o: (1) scl=%d, sda=%d\n",scl,sda); if ( 0 != sda ) { printf("i2c-algo-bit.o: SDA stuck high!\n"); goto bailout; } if ( 0 == scl ) { printf("i2c-algo-bit.o: SCL unexpected low " "while pulling SDA low!\n"); goto bailout; } sdahi(adap); sda=getsda(adap); scl=(adap->getscl==NULL?1:getscl(adap)); printf("i2c-algo-bit.o: (2) scl=%d, sda=%d\n",scl,sda); if ( 0 == sda ) { printf("i2c-algo-bit.o: SDA stuck low!\n"); goto bailout; } if ( 0 == scl ) { printf("i2c-algo-bit.o: SCL unexpected low " "while pulling SDA high!\n"); goto bailout; } scllo(adap); sda=getsda(adap); scl=(adap->getscl==NULL?0:getscl(adap)); printf("i2c-algo-bit.o: (3) scl=%d, sda=%d\n",scl,sda); if ( 0 != scl ) { printf("i2c-algo-bit.o: SCL stuck high!\n"); goto bailout; } if ( 0 == sda ) { printf("i2c-algo-bit.o: SDA unexpected low " "while pulling SCL low!\n"); goto bailout; } sclhi(adap); sda=getsda(adap); scl=(adap->getscl==NULL?1:getscl(adap)); printf("i2c-algo-bit.o: (4) scl=%d, sda=%d\n",scl,sda); if ( 0 == scl ) { printf("i2c-algo-bit.o: SCL stuck low!\n"); goto bailout; } if ( 0 == sda ) { printf("i2c-algo-bit.o: SDA unexpected low " "while pulling SCL high!\n"); goto bailout; } printf("i2c-algo-bit.o: %s passed test.\n",name); return 0; bailout: sdahi(adap); sclhi(adap); return -1; } /* ----- Utility functions */ /* try_address tries to contact a chip for a number of * times before it gives up. * return values: * 1 chip answered * 0 chip did not answer * -x transmission error */ static inline int try_address(struct i2c_algo_bit_data *adap, unsigned char addr, int retries) { int i,ret = -1; for (i=0;i<=retries;i++) { ret = i2c_outb(adap,addr); if (ret==1) break; /* success! */ i2c_stop(adap); ssleep(5/*adap->udelay*/); if (i==retries) /* no success */ break; i2c_start(adap); ssleep(adap->udelay); } DEB2(if (i) printf("i2c-algo-bit.o: Used %d tries to %s client at 0x%02x : %s\n", i+1, addr & 1 ? "read" : "write", addr>>1, ret==1 ? "success" : ret==0 ? "no ack" : "failed, timeout?" ) ); return ret; } int sendbytes(struct i2c_algo_bit_data *adap, struct i2c_msg *msg) { unsigned char c; const unsigned char *temp = msg->buf; int count = msg->len; unsigned short nak_ok = msg->flags & I2C_M_IGNORE_NAK; int retval; int wrcount=0; while (count > 0) { c = *temp; DEB2(printf("sendbytes: writing %2.2X\n", c&0xff)); retval = i2c_outb(adap,c); if ((retval>0) || (nak_ok && (retval==0))) { /* ok or ignored NAK */ count--; temp++; wrcount++; } else { /* arbitration or no acknowledge */ printf(_("sendbytes: error - bailout.\n")); i2c_stop(adap); return (retval<0)? retval : -EFAULT; /* got a better one ?? */ } #if 0 /* from asm/delay.h */ __delay(adap->mdelay * (loops_per_sec / 1000) ); #endif } return wrcount; } static inline int readbytes(struct i2c_algo_bit_data *adap, struct i2c_msg *msg) { int inval; int rdcount=0; /* counts bytes read */ unsigned char *temp = msg->buf; int count = msg->len; while (count > 0) { inval = i2c_inb(adap); /*printf("%#02x ",inval); if ( ! (count % 16) ) printf("\n"); */ if (inval>=0) { *temp = inval; rdcount++; } else { /* read timed out */ printf(_("i2c-algo-bit.o: readbytes: i2c_inb timed out.\n")); break; } temp++; count--; if (msg->flags & I2C_M_NO_RD_ACK) continue; if ( count > 0 ) { /* send ack */ sdalo(adap); DEBPROTO(printf(" Am ")); } else { sdahi(adap); /* neg. ack on last byte */ DEBPROTO(printf(" NAm ")); } if (sclhi(adap)<0) { /* timeout */ sdahi(adap); printf(_("i2c-algo-bit.o: readbytes: Timeout at ack\n")); return -1; }; scllo(adap); sdahi(adap); } return rdcount; } /* doAddress initiates the transfer by generating the start condition (in * try_address) and transmits the address in the necessary format to handle * reads, writes as well as 10bit-addresses. * returns: * 0 everything went okay, the chip ack'ed, or IGNORE_NAK flag was set * -x an error occurred (like: -EREMOTEIO if the device did not answer, or * -1, for example if the lines are stuck...) */ static inline int bit_doAddress(struct i2c_algo_bit_data *adap, struct i2c_msg *msg) { unsigned short flags = msg->flags; unsigned short nak_ok = msg->flags & I2C_M_IGNORE_NAK; unsigned char addr; int ret, retries; retries = nak_ok ? 0 : RETRIES; if ( (flags & I2C_M_TEN) ) { /* a ten bit address, never happen in ddccontrol */ addr = 0xf0 | (( msg->addr >> 7) & 0x03); DEB2(printf("addr0: %d\n",addr)); /* try extended address code...*/ ret = try_address(adap, addr, retries); if ((ret != 1) && !nak_ok) { printf("died at extended address code.\n"); return -EREMOTEIO; } /* the remaining 8 bit address */ ret = i2c_outb(adap,msg->addr & 0x7f); if ((ret != 1) && !nak_ok) { /* the chip did not ack / xmission error occurred */ printf("died at 2nd address code.\n"); return -EREMOTEIO; } if ( flags & I2C_M_RD ) { i2c_repstart(adap); /* okay, now switch into reading mode */ addr |= 0x01; ret = try_address(adap, addr, retries); if ((ret!=1) && !nak_ok) { printf("died at extended address code.\n"); return -EREMOTEIO; } } } else { /* normal 7bit address */ addr = ( msg->addr << 1 ); if (flags & I2C_M_RD ) addr |= 1; if (flags & I2C_M_REV_DIR_ADDR ) addr ^= 1; ret = try_address(adap, addr, retries); if ((ret!=1) && !nak_ok) return -EREMOTEIO; } return 0; } int bit_xfer(struct i2c_algo_bit_data *adap, struct i2c_msg msgs[], int num) { struct i2c_msg *pmsg; int i,ret; unsigned short nak_ok; i2c_start(adap); for (i=0;iflags & I2C_M_IGNORE_NAK; if (!(pmsg->flags & I2C_M_NOSTART)) { if (i) { i2c_repstart(adap); } ret = bit_doAddress(adap, pmsg); if ((ret != 0) && !nak_ok) { DEB2(printf("i2c-algo-bit.o: NAK from device addr %2.2x msg #%d\n" ,msgs[i].addr,i)); return (ret<0) ? ret : -EREMOTEIO; } } if (pmsg->flags & I2C_M_RD ) { /* read bytes into buffer*/ ret = readbytes(adap, pmsg); DEB2(printf("i2c-algo-bit.o: read %d bytes.\n",ret)); if (ret < pmsg->len ) { return (ret<0)? ret : -EREMOTEIO; } } else { /* write bytes from buffer */ ret = sendbytes(adap, pmsg); DEB2(printf("i2c-algo-bit.o: wrote %d bytes.\n",ret)); if (ret < pmsg->len ) { return (ret<0) ? ret : -EREMOTEIO; } } } i2c_stop(adap); return num; } ddccontrol-0.4.4/src/ddcpci/i2c-algo-bit.h000066400000000000000000000047251327040342400202200ustar00rootroot00000000000000/* ------------------------------------------------------------------------- */ /* i2c-algo-bit.h i2c driver algorithms for bit-shift adapters */ /* ------------------------------------------------------------------------- */ /* Copyright (C) 1995-99 Simon G. Vogl 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ /* With some changes from Kyösti Mälkki and even Frodo Looijaard */ /* Adapted to user space by Nicolas Boichat */ /* $Id$ */ #ifndef I2C_ALGO_BIT_H #define I2C_ALGO_BIT_H #include "config.h" #include "lib/i2c-dev.h" // Old headers (2.4) doesn't define some constants #ifndef I2C_M_NO_RD_ACK #define I2C_M_NO_RD_ACK 0x0800 #endif #ifndef I2C_M_IGNORE_NAK #define I2C_M_IGNORE_NAK 0x1000 #endif /* --- Defines for bit-adapters --------------------------------------- */ /* * This struct contains the hw-dependent functions of bit-style adapters to * manipulate the line states, and to init any hw-specific features. This is * only used if you have more than one hw-type of adapter running. */ struct i2c_algo_bit_data { void *data; /* private data for lowlevel routines */ void (*setsda) (void *data, int state); void (*setscl) (void *data, int state); int (*getsda) (void *data); int (*getscl) (void *data); /* local settings */ int udelay; /* half-clock-cycle time in microsecs */ /* i.e. clock is (500 / udelay) KHz */ int timeout; /* in microsecs */ }; #define I2C_BIT_ADAP_MAX 16 int bit_xfer(struct i2c_algo_bit_data *adap, struct i2c_msg msgs[], int num); int test_bus(struct i2c_algo_bit_data *adap, char* name); //int i2c_bit_add_bus(struct i2c_adapter *); //int i2c_bit_del_bus(struct i2c_adapter *); #endif /* I2C_ALGO_BIT_H */ ddccontrol-0.4.4/src/ddcpci/intel740.c000066400000000000000000000062771327040342400174140ustar00rootroot00000000000000/* Note: this file is not built by Makefile ddc/ci direct PCI memory interface for some Intel chips (i740) Copyright(c) 2005 Nicolas Boichat (nicolas@boichat.ch) Completely experimental: Never tested. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include "ddcpci.h" static void intel740_setscl(void* data, int state) { outb(0x62, 0x3d6); u8 val = (inb(0x3d7) & 0xF7); //Remove SCL bit if (state) { val = val | 0x08; } outb(0x62, 0x3d6); outb(val, 0x3d7); } static void intel740_setsda(void* data, int state) { outb(0x62, 0x3d6); u8 val = (inb(0x3d7) & 0xFB); //Remove SDA bit if (state) { val = val | 0x04; } outb(0x62, 0x3d6); outb(val, 0x3d7); } static int intel740_getscl(void* data) { outb(0x63, 0x3d6); u8 val = inb(0x3d7); return ((val >> 3) & 0x01); } static int intel740_getsda(void* data) { outb(0x63, 0x3d6); u8 val = inb(0x3d7); return ((val >> 2) & 0x01); } static int init_i2c_bus(struct i2c_algo_bit_data* algo) { algo->setsda = intel740_setsda; algo->setscl = intel740_setscl; algo->getsda = intel740_getsda; algo->getscl = intel740_getscl; algo->udelay = 40; algo->timeout = 100; algo->data = NULL; /* Raise SCL and SDA */ intel740_setsda(algo->data, 1); intel740_setscl(algo->data, 1); usleep(200000); test_bus(algo, "i740"); return 1; } struct card* intel740_open(struct pci_dev *dev) { return 0; if (dev->vendor_id != 0x8086) { return 0; } struct card* intel740_card = malloc(sizeof(struct card)); if (!intel740_card) { fprintf(stderr, _("%s: Malloc error.\n"), "intel740_open"); exit(-1); } memset(intel740_card, 0, sizeof(struct card)); if (ioperm(0x3d6, 2, 1)) { perror(_("%s: ioperm failed"), "intel740_open"); intel740_close(intel740_card); return 0; } switch (dev->device_id) { case 0x2572: intel740_card->nbusses = 1; intel740_card->i2c_busses = malloc(1*sizeof(struct i2c_algo_bit_data)); init_i2c_bus(&intel740_card->i2c_busses[0]); break; default: fprintf(stderr, _("%s: Error: unknown card type (%#x)\n"), "intel740_open", dev->device_id); intel740_close(intel740_card); return 0; } return intel740_card; } void intel740_close(struct card* intel740_card) { int i; ioperm(0x3d6, 2, 0); for (i = 0; i < intel740_card->nbusses; i++) { free((&intel740_card->i2c_busses[i])->data); } free(intel740_card->i2c_busses); free(intel740_card); } ddccontrol-0.4.4/src/ddcpci/intel810.c000066400000000000000000000176331327040342400174100ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface for intel i810/815/865... Copyright(c) 2005 Nicolas Boichat (nicolas@boichat.ch) Based on i810-i2c.c from the kernel source patch available at http://i810fb.sourceforge.net/. Copyright (C) 2004 Antonino Daplas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Doc : http://www.intel.com/design/chipsets/manuals/29802601.pdf */ #include #include #include #include #include #include #include #include #include #include "ddcpci.h" #define SCL_DIR_MASK 0x0001 #define SCL_DIR 0x0002 #define SCL_VAL_MASK 0x0004 #define SCL_VAL_OUT 0x0008 #define SCL_VAL_IN 0x0010 #define SDA_DIR_MASK 0x0100 #define SDA_DIR 0x0200 #define SDA_VAL_MASK 0x0400 #define SDA_VAL_OUT 0x0800 #define SDA_VAL_IN 0x1000 static inline unsigned int readl(const volatile void *addr) { return *(volatile unsigned int*) addr; } static inline void writel(unsigned int b, volatile void *addr) { *(volatile unsigned int*) addr = b; } #define i810_readl(where, mmio) readl(mmio + where) #define i810_writel(where, mmio, val) writel(val, mmio + where) struct mem_data { int fd; // /dev/mem fd char* memory; // mmaped memory size_t length; // mmaped memory length }; struct i2c_data { char* mmio; int gpio; }; static void i810i2c_setscl(void *data, int state) { i810_writel(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio, (state ? SCL_VAL_OUT : 0) | SCL_DIR | SCL_DIR_MASK | SCL_VAL_MASK); i810_readl(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio); /* flush posted write */ } static void i810i2c_setsda(void *data, int state) { i810_writel(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio, (state ? SDA_VAL_OUT : 0) | SDA_DIR | SDA_DIR_MASK | SDA_VAL_MASK); i810_readl(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio); /* flush posted write */ } static int i810i2c_getscl(void *data) { i810_writel(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio, SCL_DIR_MASK); i810_writel(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio, 0); return (0 != (i810_readl(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio) & SCL_VAL_IN)); } static int i810i2c_getsda(void *data) { i810_writel(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio, SDA_DIR_MASK); i810_writel(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio, 0); return (0 != (i810_readl(((struct i2c_data*)data)->mmio, ((struct i2c_data*)data)->gpio) & SDA_VAL_IN)); } static int init_i2c_bus(struct i2c_algo_bit_data* algo, char* mmio, int gpio) { //fprintf(stderr, "init_i2c_bus: (ddc_base: %#x)\n", ddc_base); struct i2c_data* data = malloc(sizeof(struct i2c_data)); if (!data) { fprintf(stderr, _("%s: Malloc error."), "intel810.c:init_i2c_bus"); exit(-1); } data->mmio = mmio; data->gpio = gpio; algo->setsda = i810i2c_setsda; algo->setscl = i810i2c_setscl; algo->getsda = i810i2c_getsda; algo->getscl = i810i2c_getscl; algo->udelay = 40; algo->timeout = 100; algo->data = data; /* Raise SCL and SDA */ i810i2c_setsda(algo->data, 1); i810i2c_setscl(algo->data, 1); usleep(200000); //test_bus(algo, "i810"); return 1; } struct card* i810_open(struct pci_dev *dev) { if (dev->vendor_id != 0x8086) { // PCI_VENDOR_ID_INTEL return 0; } switch (dev->device_id) { case 0x1102: // PCI_DEVICE_ID_INTEL_82815_100 case 0x1112: // PCI_DEVICE_ID_INTEL_82815_NOAGP case 0x1132: // 82815 CGC [Chipset Graphics Controller] case 0x2562: // 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device case 0x2572: // 82865G Integrated Graphics Controller [TESTED] case 0x2582: // 82915G/GV/910GL Express Chipset Family Graphics Controller case 0x2592: // Mobile 915GM/GMS/910GML Express Graphics Controller case 0x2772: // 945G Integrated Graphics Controller case 0x2776: // 945G Integrated Graphics Controller case 0x2782: // 82915G Express Chipset Family Graphics Controller case 0x2792: // Mobile 915GM/GMS/910GML Express Graphics Controller case 0x27AE: // Mobile 945GME Express Graphics Controller case 0x3577: // 82830 CGC [Chipset Graphics Controller] case 0x3582: // 82852/855GM Integrated Graphics Device case 0x7121: // 82810 CGC [Chipset Graphics Controller] case 0x7123: // 82810 DC-100 CGC [Chipset Graphics Controller] case 0x7125: // 82810E DC-133 CGC [Chipset Graphics Controller] break; default: return 0; } struct card* i810_card = malloc(sizeof(struct card)); struct mem_data* data = malloc(sizeof(struct mem_data)); if ((!i810_card) || (!data)) { fprintf(stderr, _("%s: Malloc error.\n"), "i810_open"); exit(-1); } memset(i810_card, 0, sizeof(struct card)); i810_card->data = data; data->fd = open("/dev/mem", O_RDWR); if (data->fd < 0) { perror(_("i810_open: cannot open /dev/mem")); i810_close(i810_card); return 0; } data->length = 512*1024; //MMIO_SIZE data->memory = 0; int reg; int found = 0; for (reg = 0; reg < 6; reg++) { if (dev->size[reg] == data->length) { data->memory = mmap(data->memory, data->length, PROT_READ|PROT_WRITE, MAP_SHARED, data->fd, dev->base_addr[reg]); if (get_verbosity()) printf("i810_open: Using region %d (%lx, %lx)\n", reg, (long unsigned int)dev->base_addr[reg], (long unsigned int)dev->size[reg]); found = 1; break; } } if (!found) { /* We did not find a region with a valid size, so we take the first one with a zero size (915G) */ if (get_verbosity()) printf("i810_open: Cannot find any 512k region, searching for a 0 one.\n"); for (reg = 0; reg < 6; reg++) { if (dev->size[reg] == 0) { data->memory = mmap(data->memory, data->length, PROT_READ|PROT_WRITE, MAP_SHARED, data->fd, dev->base_addr[reg]); if (get_verbosity()) printf("i810_open: Using region %d (%lx, %lx)\n", reg, (long unsigned int)dev->base_addr[reg], (long unsigned int)dev->size[reg]); found = 1; break; } } if (!found) { fprintf(stderr, _("i810_open: Error: cannot find any valid MMIO PCI region.\n")); i810_close(i810_card); return 0; } } if (data->memory == MAP_FAILED) { perror(_("i810_open: mmap failed")); i810_close(i810_card); return 0; } char* mmio = data->memory; /* I2C registers see http://mail.directfb.org/pipermail/directfb-dev/2005-July/000457.html */ i810_card->nbusses = 6; i810_card->i2c_busses = malloc(6*sizeof(struct i2c_algo_bit_data)); init_i2c_bus(&i810_card->i2c_busses[0], mmio, 0x05010); // GPIOA init_i2c_bus(&i810_card->i2c_busses[1], mmio, 0x05014); // GPIOB init_i2c_bus(&i810_card->i2c_busses[2], mmio, 0x05018); // GPIO"C" init_i2c_bus(&i810_card->i2c_busses[3], mmio, 0x0501C); // GPIO"D" (82865G DVI daughter card) init_i2c_bus(&i810_card->i2c_busses[4], mmio, 0x05020); // GPIO"E" init_i2c_bus(&i810_card->i2c_busses[5], mmio, 0x05024); // GPIO"F" return i810_card; } void i810_close(struct card* i810_card) { int i; if (i810_card->data) { struct mem_data* data = i810_card->data; if ((data->memory) && (data->memory == MAP_FAILED) && (data->length)) { munmap(data->memory, data->length); } free(i810_card->data); } for (i = 0; i < i810_card->nbusses; i++) { free((&i810_card->i2c_busses[i])->data); } free(i810_card->i2c_busses); free(i810_card); } ddccontrol-0.4.4/src/ddcpci/main.c000066400000000000000000000210051327040342400167540ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface Copyright(c) 2004-2005 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include #include #include "ddcpci.h" #include "ddcpci-ipc.h" /* card list */ card_open cards_open[] = { &nvidia_open, &radeon_open, &i810_open, &via_open, &sis_open, NULL }; card_close cards_close[] = { &nvidia_close, &radeon_close, &i810_close, &via_close, &sis_close, NULL }; /* end of card list */ /* debugging */ /*static void dumphex(FILE *f, unsigned char *buf, int len) { int i, j; for (j = 0; j < len; j +=16) { if (len > 16) { fprintf(f, "%04x: ", j); } for (i = 0; i < 16; i++) { if (i + j < len) fprintf(f, "%02x ", buf[i + j]); else fprintf(f, " "); } fprintf(f, "| "); for (i = 0; i < 16; i++) { if (i + j < len) fprintf(f, "%c", buf[i + j] >= ' ' && buf[i + j] < 127 ? buf[i + j] : '.'); else fprintf(f, " "); } fprintf(f, "\n"); } }*/ struct pci_access *pacc; struct card* current_card = NULL; card_close current_card_close = NULL; struct i2c_algo_bit_data* current_algo = NULL; static int msqid; static int verbosity = 0; int get_verbosity() { return verbosity; } static void open_card(struct i2c_bus* bus) { if (verbosity == 2) { printf("==>Opening...\n"); printf("==>%02x:%02x.%d-%d\n", bus->bus, bus->dev, bus->func, bus->i2cbus); } struct answer aopen; memset(&aopen, 0, sizeof(struct answer)); aopen.mtype = 2; aopen.status = -1; struct pci_dev *dev; unsigned int c; int i; if (current_card && current_card_close) { current_card_close(current_card); } current_card = NULL; current_card_close = NULL; current_algo = NULL; for(dev=pacc->devices; dev && (aopen.status != 0); dev=dev->next) /* Iterate over all devices */ { pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES); c = pci_read_word(dev, PCI_CLASS_DEVICE); if ((c == 0x0300) && (bus->bus == dev->bus) && (bus->dev == dev->dev) && (bus->func == dev->func)) // Right card { for (i = 0; cards_open[i] != NULL; i++) { if ((current_card = cards_open[i](dev))) { current_card_close = cards_close[i]; if (bus->i2cbus < current_card->nbusses) { current_algo = ¤t_card->i2c_busses[bus->i2cbus]; aopen.status = 0; if (verbosity == 2) { printf("==>%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d base0=%lx size0=%lx\n", dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id, c, dev->irq, (long unsigned int)dev->base_addr[0], (long unsigned int)dev->size[0]); } break; } else { current_card_close(current_card); } } } } } if (verbosity == 2) { printf("==>Opened (status=%d)...\n", aopen.status); } if (msgsnd(msqid, &aopen, ANSWER_SIZE, IPC_NOWAIT) < 0) { perror(_("==>Error while sending open message")); } } static void data(struct query* mquery, int len) { if (verbosity == 2) { printf("==>Data, mquery->flags = %d\n", mquery->flags); } if (mquery->flags & I2C_M_RD) { struct answer adata; memset(&adata, 0, sizeof(struct answer)); adata.mtype = 2; int ret; struct i2c_msg i2cmsg[1]; i2cmsg[0].addr = mquery->addr; i2cmsg[0].flags = mquery->flags; i2cmsg[0].len = mquery->len; i2cmsg[0].buf = adata.buffer; ret = bit_xfer(current_algo, i2cmsg, 1); if (ret < 0) { adata.status = -1; if (msgsnd(msqid, &adata, ANSWER_SIZE, IPC_NOWAIT) < 0) { perror(_("==>Error while sending data answer message")); } } else { adata.status = 0; if (msgsnd(msqid, &adata, ANSWER_SIZE + mquery->len, IPC_NOWAIT) < 0) { perror(_("==>Error while sending data answer message")); } } } else { // Write int ret; struct i2c_msg i2cmsg[1]; i2cmsg[0].addr = mquery->addr; i2cmsg[0].flags = mquery->flags; i2cmsg[0].len = len - QUERY_SIZE; i2cmsg[0].buf = mquery->buffer; ret = bit_xfer(current_algo, i2cmsg, 1); struct answer adata; memset(&adata, 0, sizeof(struct answer)); adata.mtype = 2; adata.status = (ret < 0) ? -1 : ret; if (msgsnd(msqid, &adata, ANSWER_SIZE, IPC_NOWAIT) < 0) { perror(_("==>Error while sending data answer message")); } } } static void list() { if (verbosity == 2) { printf("==>Listing...\n"); } struct pci_dev *dev; unsigned int c; int i, j; struct card* thecard; //char buffer[256]; for(dev=pacc->devices; dev; dev=dev->next) /* Iterate over all devices */ { pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES); c = pci_read_word(dev, PCI_CLASS_DEVICE); if (c == 0x0300) // VGA { if (verbosity == 2) { printf("==>%02x:%02x.%d vendor=%04x device=%04x class=%04x irq=%d base0=%lx size0=%lx\n", dev->bus, dev->dev, dev->func, dev->vendor_id, dev->device_id, c, dev->irq, (long unsigned int)dev->base_addr[0], (long unsigned int)dev->size[0]); } for (i = 0; cards_open[i] != NULL; i++) { if ((thecard = cards_open[i](dev))) { if (verbosity == 2) { printf("==>Supported\n"); } for (j = 0; j < thecard->nbusses; j++) { struct answer alist; memset(&alist, 0, sizeof(struct answer)); alist.mtype = 2; alist.status = 0; alist.last = 0; alist.bus.bus = dev->bus; alist.bus.dev = dev->dev; alist.bus.func = dev->func; alist.bus.i2cbus = j; if (verbosity == 2) { printf("==>%02x:%02x.%d-%d\n", alist.bus.bus, alist.bus.dev, alist.bus.func, alist.bus.i2cbus); } if (msgsnd(msqid, &alist, ANSWER_SIZE, IPC_NOWAIT) < 0) { perror(_("==>Error while sending list message")); } } cards_close[i](thecard); } } } } struct answer alist; memset(&alist, 0, sizeof(struct answer)); alist.mtype = 2; alist.status = 0; alist.last = 1; if (msgsnd(msqid, &alist, ANSWER_SIZE, IPC_NOWAIT) < 0) { perror(_("==>Error while sending list message")); } if (verbosity == 2) { printf("==>EOL\n"); } } int main(int argc, char **argv) { pacc = pci_alloc(); pci_init(pacc); pci_scan_bus(pacc); struct query mquery; char* endptr; if (argc != 3) { fprintf(stderr, _("Invalid arguments.\n")); exit(1); } verbosity = strtol(argv[1], &endptr, 0); if (*endptr != 0) { fprintf(stderr, _("==>Can't read verbosity.\n")); exit(1); } key_t key = strtol(argv[2], &endptr, 0); if (*endptr != 0) { fprintf(stderr, _("==>Can't read key.\n")); exit(1); } if ((msqid = msgget(key, 0666)) < 0) { fprintf(stderr, _("==>Can't open key %u\n"), key); perror("msgget"); exit(1); } int cont = 1; int len = 0; time_t last = time(NULL); while (cont) { if ((len = msgrcv(msqid, &mquery, sizeof(struct query) - sizeof(long), 1, IPC_NOWAIT)) < 0) { if (errno == ENOMSG) { if ((time(NULL) - last) > (IDLE_TIMEOUT*1.1)) { fprintf(stderr, _("==>No command received for %ld seconds, aborting.\n"), (time(NULL) - last)); cont = 0; msgctl(msqid, IPC_RMID, NULL); break; } usleep(10000); continue; } perror(_("==>Error while receiving query\n")); break; } if (verbosity == 2) { printf("==>Received!\n"); } last = time(NULL); switch (mquery.qtype) { case QUERY_LIST: list(); break; case QUERY_OPEN: open_card(&mquery.bus); break; case QUERY_DATA: data(&mquery, len); break; case QUERY_HEARTBEAT: if (verbosity == 2) { printf("==>Heartbeat received.\n"); } break; case QUERY_QUIT: if (verbosity == 2) { printf("==>Quitting...\n"); } if (current_card && current_card_close) { current_card_close(current_card); } cont = 0; break; default: fprintf(stderr, _("==>Invalid query...\n")); break; } } if (verbosity) { printf("==>ddcpci is quitting.\n"); } pci_cleanup(pacc); exit(0); } ddccontrol-0.4.4/src/ddcpci/nvidia.c000066400000000000000000000130221327040342400173020ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface for nvidia cards Copyright(c) 2004 Nicolas Boichat (nicolas@boichat.ch) Based on rivafb-i2c.c from the kernel source. Copyright 2004 Antonino A. Daplas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include "ddcpci.h" struct mem_data { int fd; // /dev/mem fd char* memory; // mmaped memory size_t length; // mmaped memory length }; struct i2c_data { char* PCIO; int ddc_base; }; typedef unsigned char U008; #define VGA_WR08(p,i,d) (((U008 *)(p))[i]=(d)) #define VGA_RD08(p,i) (((U008 *)(p))[i]) static void riva_gpio_setscl(void* data, int state) { u32 val; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, 0x1f); VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d5, 0x57); VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, 0x44); val = VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5) & 0xf0; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, ((struct i2c_data*)data)->ddc_base + 1); val = VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5) & 0xf0; if (state) val |= 0x20; else val &= ~0x20; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, ((struct i2c_data*)data)->ddc_base + 1); VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d5, val | 0x1); } static void riva_gpio_setsda(void* data, int state) { u32 val; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, 0x1f); VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d5, 0x57); VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, 0x44); val = VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5) & 0xf0; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, ((struct i2c_data*)data)->ddc_base + 1); val = VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5) & 0xf0; if (state) val |= 0x10; else val &= ~0x10; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, ((struct i2c_data*)data)->ddc_base + 1); VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d5, val | 0x1); } static int riva_gpio_getscl(void* data) { u32 val = 0; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, ((struct i2c_data*)data)->ddc_base); if (VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5) & 0x04) val = 1; // val = VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5); return val; } static int riva_gpio_getsda(void* data) { u32 val = 0; VGA_WR08(((struct i2c_data*)data)->PCIO, 0x3d4, ((struct i2c_data*)data)->ddc_base); if (VGA_RD08(((struct i2c_data*)data)->PCIO, 0x3d5) & 0x08) val = 1; return val; } static int init_i2c_bus(struct i2c_algo_bit_data* algo, char* PCIO, int ddc_base) { //fprintf(stderr, "init_i2c_bus: (ddc_base: %#x)\n", ddc_base); struct i2c_data* data = malloc(sizeof(struct i2c_data)); if (!data) { fprintf(stderr, _("nvidia.c:init_i2c_bus: Malloc error.")); exit(-1); } data->PCIO = PCIO; data->ddc_base = ddc_base; algo->setsda = riva_gpio_setsda; algo->setscl = riva_gpio_setscl; algo->getsda = riva_gpio_getsda; algo->getscl = riva_gpio_getscl; algo->udelay = 40; algo->timeout = 100; algo->data = data; /* Raise SCL and SDA */ riva_gpio_setsda(algo->data, 1); riva_gpio_setscl(algo->data, 1); usleep(200000); //test_bus(algo, "Boubou"); return 1; } struct card* nvidia_open(struct pci_dev *dev) { if (dev->vendor_id != 0x10de) { return 0; } struct card* nvidia_card = malloc(sizeof(struct card)); struct mem_data* data = malloc(sizeof(struct mem_data)); if ((!nvidia_card) || (!data)) { fprintf(stderr, _("%s: Malloc error.\n"), "nvidia_open"); exit(-1); } memset(nvidia_card, 0, sizeof(struct card)); nvidia_card->data = data; data->fd = open("/dev/mem", O_RDWR); if (data->fd < 0) { perror(_("nvidia_open: cannot open /dev/mem")); nvidia_close(nvidia_card); return 0; } data->memory = NULL; data->length = 0x00001000; data->memory = mmap(data->memory, data->length, PROT_READ|PROT_WRITE, MAP_SHARED, data->fd, dev->base_addr[0] + 0x00601000); if (data->memory == MAP_FAILED) { perror(_("nvidia_open: mmap failed")); nvidia_close(nvidia_card); return 0; } char* PCIO = data->memory; nvidia_card->nbusses = 3; nvidia_card->i2c_busses = malloc(3*sizeof(struct i2c_algo_bit_data)); init_i2c_bus(&nvidia_card->i2c_busses[0], PCIO, 0x50); init_i2c_bus(&nvidia_card->i2c_busses[1], PCIO, 0x36); init_i2c_bus(&nvidia_card->i2c_busses[2], PCIO, 0x3e); //fprintf(stderr, "nvidia_open: OK\n"); return nvidia_card; } void nvidia_close(struct card* nvidia_card) { int i; if (nvidia_card->data) { struct mem_data* data = nvidia_card->data; if ((data->memory) && (data->memory == MAP_FAILED) && (data->length)) { munmap(data->memory, data->length); } free(nvidia_card->data); } for (i = 0; i < nvidia_card->nbusses; i++) { free((&nvidia_card->i2c_busses[i])->data); } free(nvidia_card->i2c_busses); free(nvidia_card); } ddccontrol-0.4.4/src/ddcpci/radeon.c000066400000000000000000000155061327040342400173110ustar00rootroot00000000000000/* * ddc/ci direct PCI memory interface for ATI cards * Copyright(c) 2005 Christian Schilling * * Based on radeon_i2c.c from the kernel source. * * Original copyright: * * framebuffer driver for ATI Radeon chipset video boards * * Copyright 2003 Ben. Herrenschmidt * Copyright 2000 Ani Joshi * * i2c bits from Luca Tettamanti * * Special thanks to ATI DevRel team for their hardware donations. * * ...Insert GPL boilerplate here... * * Significant portions of this driver apdated from XFree86 Radeon * driver which has the following copyright notice: * * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * 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 on 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 (including the * next paragraph) 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS 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. * * XFree86 driver authors: * * Kevin E. Martin * Rickard E. Faith * Alan Hourihane * */ #include #include #include #include #include #include #include #include #include "ddcpci.h" #define RADEON_REGSIZE 0x4000 /* GPIO bit constants */ #define GPIO_A_0 (1 << 0) #define GPIO_A_1 (1 << 1) #define GPIO_Y_0 (1 << 8) #define GPIO_Y_1 (1 << 9) #define GPIO_EN_0 (1 << 16) #define GPIO_EN_1 (1 << 17) #define GPIO_MASK_0 (1 << 24) #define GPIO_MASK_1 (1 << 25) #define VGA_DDC_DATA_OUTPUT GPIO_A_0 #define VGA_DDC_CLK_OUTPUT GPIO_A_1 #define VGA_DDC_DATA_INPUT GPIO_Y_0 #define VGA_DDC_CLK_INPUT GPIO_Y_1 #define VGA_DDC_DATA_OUT_EN GPIO_EN_0 #define VGA_DDC_CLK_OUT_EN GPIO_EN_1 /* Radeons i2c busses */ #define GPIO_VGA_DDC 0x0060 #define GPIO_DVI_DDC 0x0064 #define GPIO_MONID 0x0068 #define GPIO_CRT2_DDC 0x006c static inline unsigned int readl(const volatile void *addr) { return *(volatile unsigned int*) addr; } static inline void writel(unsigned int b, volatile void *addr) { *(volatile unsigned int*) addr = b; } #define INREG(addr) readl((ldata->PCIO)+addr) #define OUTREG(addr,val) writel(val, (ldata->PCIO)+addr) struct mem_data { int fd; // /dev/mem fd char* memory; // mmaped memory size_t length; // mmaped memory length }; struct i2c_data { char* PCIO; int ddc_base; }; static void radeon_gpio_setscl(void* data, int state) { struct i2c_data *ldata = data; u32 val; val = INREG(ldata->ddc_base) & ~(VGA_DDC_CLK_OUT_EN); if (!state) val |= VGA_DDC_CLK_OUT_EN; OUTREG(ldata->ddc_base, val); (void)INREG(ldata->ddc_base); } static void radeon_gpio_setsda(void* data, int state) { struct i2c_data *ldata = data; u32 val; val = INREG(ldata->ddc_base) & ~(VGA_DDC_DATA_OUT_EN); if (!state) val |= VGA_DDC_DATA_OUT_EN; OUTREG(ldata->ddc_base, val); (void)INREG(ldata->ddc_base); } static int radeon_gpio_getscl(void* data) { struct i2c_data *ldata = data; u32 val; val = INREG(ldata->ddc_base); return (val & VGA_DDC_CLK_INPUT) ? 1 : 0; } static int radeon_gpio_getsda(void* data) { struct i2c_data *ldata = data; u32 val; val = INREG(ldata->ddc_base); return (val & VGA_DDC_DATA_INPUT) ? 1 : 0; } static int radeon_setup_i2c_bus(struct i2c_algo_bit_data* algo, char* PCIO, int ddc_base) { //fprintf(stderr, "init_i2c_bus: (ddc_base: %#x)\n", ddc_base); struct i2c_data* data = malloc(sizeof(struct i2c_data)); if (!data) { fprintf(stderr, _("radeon.c:init_i2c_bus: Malloc error.")); exit(-1); } data->PCIO = PCIO; data->ddc_base = ddc_base; algo->setsda = radeon_gpio_setsda; algo->setscl = radeon_gpio_setscl; algo->getsda = radeon_gpio_getsda; algo->getscl = radeon_gpio_getscl; algo->udelay = 40; algo->timeout = 100; algo->data = data; /* Raise SCL and SDA */ radeon_gpio_setsda(data, 1); radeon_gpio_setscl(data, 1); usleep(200000); // test_bus(algo, "Radeon"); return 1; } struct card* radeon_open(struct pci_dev *dev) { if (dev->vendor_id != 0x1002) { return 0; } struct card* radeon_card = malloc(sizeof(struct card)); struct mem_data* data = malloc(sizeof(struct mem_data)); if ((!radeon_card) || (!data)) { fprintf(stderr, _("%s: Malloc error.\n"), "radeon_open"); exit(-1); } memset(radeon_card, 0, sizeof(struct card)); radeon_card->data = data; data->fd = open("/dev/mem", O_RDWR); if (data->fd < 0) { perror(_("radeon_open: cannot open /dev/mem")); radeon_close(radeon_card); return 0; } data->length = RADEON_REGSIZE; data->memory = mmap(data->memory, data->length, PROT_READ|PROT_WRITE, MAP_SHARED, data->fd, dev->base_addr[2]); if (data->memory == MAP_FAILED) { perror(_("radeon_open: mmap failed")); radeon_close(radeon_card); return 0; } char* PCIO = data->memory; radeon_card->nbusses = 4; radeon_card->i2c_busses = malloc(4*sizeof(struct i2c_algo_bit_data)); radeon_setup_i2c_bus(&radeon_card->i2c_busses[0], PCIO, GPIO_VGA_DDC); radeon_setup_i2c_bus(&radeon_card->i2c_busses[1], PCIO, GPIO_DVI_DDC); radeon_setup_i2c_bus(&radeon_card->i2c_busses[2], PCIO, GPIO_MONID); radeon_setup_i2c_bus(&radeon_card->i2c_busses[3], PCIO, GPIO_CRT2_DDC); return radeon_card; } void radeon_close(struct card* radeon_card) { int i; if (radeon_card) { struct mem_data* data = radeon_card->data; if ((data->memory) && (data->memory == MAP_FAILED) && (data->length)) { munmap(data->memory, data->length); } free(radeon_card->data); } for (i = 0; i < radeon_card->nbusses; i++) { free((&radeon_card->i2c_busses[i])->data); } free(radeon_card->i2c_busses); free(radeon_card); } ddccontrol-0.4.4/src/ddcpci/sis.c000066400000000000000000000113431327040342400166320ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface for some SIS video cards Copyright 2006 Johannes Deisenhofer j.deisenhofer@tomorrow-focus.de Based on nvidia.c and the sis framebuffer driver from the Kernel source. Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria Copyright(c) 2004 Nicolas Boichat (nicolas@boichat.ch) Based on rivafb-i2c.c from the kernel source. Copyright 2004 Antonino A. Daplas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include #include "ddcpci.h" struct mem_data { char* memory; // mmaped memory size_t length; // mmaped memory length }; struct i2c_data { unsigned short int ddc_base; u32 cstate; // Register_state }; #define VGA_WR08(p,i,d) (outb(i,d)) #define VGA_RD08(p,i) (inb(i)) #define VGA_SR_IX 0x3c4 #define VGA_SR_DATA 0x3c5 // There is only one bus probed. More busses are probably accessible in the same register, // probably in pairs at bit positions 2/3, 4/5 #define SIS_I2C_SCL 0x01 #define SIS_I2C_SDA 0x02 static void sis_gpio_setscl(void* data, int state) { u32 val; struct i2c_data* ldata = (struct i2c_data*)data; outb(ldata->ddc_base,VGA_SR_IX ); val = inb(VGA_SR_DATA) & 0xfc; if (state) ldata->cstate |= SIS_I2C_SCL; else ldata->cstate &= ~SIS_I2C_SCL; val |= ldata->cstate; outb(val ,VGA_SR_DATA); } static void sis_gpio_setsda(void* data, int state) { u32 val; struct i2c_data* ldata = (struct i2c_data*)data; outb(ldata->ddc_base, VGA_SR_IX ); val = inb(VGA_SR_DATA) & 0xfc; if (state) ldata->cstate |= SIS_I2C_SDA; else ldata->cstate &= ~SIS_I2C_SDA; val |= ldata->cstate; outb(val, VGA_SR_DATA); } static int sis_gpio_getscl(void* data) { u32 val = 0; struct i2c_data* ldata = (struct i2c_data*)data; outb(ldata->ddc_base, VGA_SR_IX); if (inb(VGA_SR_DATA) & SIS_I2C_SCL) val = 1; return val; } static int sis_gpio_getsda(void* data) { u32 val = 0; struct i2c_data* ldata = (struct i2c_data*)data; outb( ldata->ddc_base, VGA_SR_IX); if (inb(VGA_SR_DATA) & SIS_I2C_SDA) val = 1; return val; } static int init_i2c_bus(struct i2c_algo_bit_data* algo, char* PCIO, int ddc_base) { //fprintf(stderr, "init_i2c_bus: (ddc_base: %#x)\n", ddc_base); // Request io Permission if(ioperm(VGA_SR_IX,2,1)<0) { perror("Request IO Perm"); return 0; } struct i2c_data* data = malloc(sizeof(struct i2c_data)); if (!data) { fprintf(stderr, _("sis.c:init_i2c_bus: Malloc error.")); exit(-1); } data->ddc_base = ddc_base; data->cstate = 0; algo->setsda = sis_gpio_setsda; algo->setscl = sis_gpio_setscl; algo->getsda = sis_gpio_getsda; algo->getscl = sis_gpio_getscl; algo->udelay = 40; algo->timeout = 100; algo->data = data; /* Raise SCL and SDA */ sis_gpio_setsda(algo->data, 1); sis_gpio_setscl(algo->data, 1); usleep(200000); //test_bus(algo, "Boubou"); return 1; } struct card* sis_open(struct pci_dev *dev) { // SIS if (dev->vendor_id != 0x1039) { return 0; } /* switch (dev->device_id) { case 0x6330: // PCI_DEVICE_ID_SIS_VGA_MIRAGE break; default: return 0; }*/ struct card* sis_card = malloc(sizeof(struct card)); if (!sis_card) { fprintf(stderr, _("%s: Malloc error.\n"), "sis_open"); exit(-1); } memset(sis_card, 0, sizeof(struct card)); sis_card->nbusses = 1; sis_card->i2c_busses = malloc(2*sizeof(struct i2c_algo_bit_data)); // Note: Only first Bus is accessible init_i2c_bus(&sis_card->i2c_busses[0], 0, 0x11); return sis_card; } void sis_close(struct card* sis_card) { int i; if (sis_card->data) { struct mem_data* data = sis_card->data; if ((data->memory) && (data->memory == MAP_FAILED) && (data->length)) { munmap(data->memory, data->length); } free(sis_card->data); } for (i = 0; i < sis_card->nbusses; i++) { free((&sis_card->i2c_busses[i])->data); } free(sis_card->i2c_busses); free(sis_card); } ddccontrol-0.4.4/src/ddcpci/via.c000066400000000000000000000132711327040342400166150ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface for VIA Unichrome cards Based on nvidia.c and via_i2c from the openchrome Project openchrome@sourceforge.net and the savagefb-i2c.c from the Kernel sources Copyright 2006 Johannes Deisenhofer j.deisenhofer@tomorrow-focus.de Copyright 2004 The Unichrome Project [unichrome.sf.net] Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. Copyright 2004 Nicolas Boichat (nicolas@boichat.ch) Copyright 2004 Antonino A. Daplas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include #include "ddcpci.h" struct mem_data { int fd; // /dev/mem fd char* memory; // mmaped memory size_t length; // mmaped memory length }; struct i2c_data { char* PCIO; int ddc_base; }; typedef unsigned char U008; #define VGA_WR08(p,i,d) (((U008 *)(p))[i]=(d)) #define VGA_RD08(p,i) (((U008 *)(p))[i]) #define VGA_SR_IX 0x3c4 #define VGA_SR_DATA 0x3c5 #define UNICHROME_I2C_ENAB 0x01 #define UNICHROME_I2C_SCL_OUT 0x20 #define UNICHROME_I2C_SDA_OUT 0x10 #define UNICHROME_I2C_SCL_IN 0x08 #define UNICHROME_I2C_SDA_IN 0x04 static void via_gpio_setscl(void* data, int state) { u32 val; VGA_WR08(((struct i2c_data*)data)->PCIO, VGA_SR_IX, ((struct i2c_data*)data)->ddc_base ); val = VGA_RD08(((struct i2c_data*)data)->PCIO, VGA_SR_DATA); val |= UNICHROME_I2C_ENAB; if (state) val |= UNICHROME_I2C_SCL_OUT; else val &= ~UNICHROME_I2C_SCL_OUT; VGA_WR08(((struct i2c_data*)data)->PCIO, VGA_SR_DATA, val); } static void via_gpio_setsda(void* data, int state) { u32 val; VGA_WR08(((struct i2c_data*)data)->PCIO, VGA_SR_IX, ((struct i2c_data*)data)->ddc_base ); val = VGA_RD08(((struct i2c_data*)data)->PCIO, VGA_SR_DATA); val |= UNICHROME_I2C_ENAB; if (state) val |= UNICHROME_I2C_SDA_OUT; else val &= ~UNICHROME_I2C_SDA_OUT; VGA_WR08(((struct i2c_data*)data)->PCIO, VGA_SR_DATA, val); } static int via_gpio_getscl(void* data) { u32 val = 0; VGA_WR08(((struct i2c_data*)data)->PCIO, VGA_SR_IX, ((struct i2c_data*)data)->ddc_base); if (VGA_RD08(((struct i2c_data*)data)->PCIO, VGA_SR_DATA) & UNICHROME_I2C_SCL_IN) val = 1; return val; } static int via_gpio_getsda(void* data) { u32 val = 0; VGA_WR08(((struct i2c_data*)data)->PCIO, VGA_SR_IX, ((struct i2c_data*)data)->ddc_base); if (VGA_RD08(((struct i2c_data*)data)->PCIO, VGA_SR_DATA) & UNICHROME_I2C_SDA_IN) val = 1; return val; } static int init_i2c_bus(struct i2c_algo_bit_data* algo, char* PCIO, int ddc_base) { //fprintf(stderr, "init_i2c_bus: (ddc_base: %#x)\n", ddc_base); struct i2c_data* data = malloc(sizeof(struct i2c_data)); if (!data) { fprintf(stderr, _("via.c:init_i2c_bus: Malloc error.")); exit(-1); } data->PCIO = PCIO; data->ddc_base = ddc_base; algo->setsda = via_gpio_setsda; algo->setscl = via_gpio_setscl; algo->getsda = via_gpio_getsda; algo->getscl = via_gpio_getscl; algo->udelay = 40; algo->timeout = 100; algo->data = data; /* Raise SCL and SDA */ via_gpio_setsda(algo->data, 1); via_gpio_setscl(algo->data, 1); usleep(200000); //test_bus(algo, "Boubou"); return 1; } struct card* via_open(struct pci_dev *dev) { if (dev->vendor_id != 0x1106) { return 0; } /* switch (dev->device_id) { case 0x3122: // PCI_DEVICE_ID_VIA_UNICHROME case 0x3118: // PCI_DEVICE_ID_VIA_UNICHROME_PRO break; default: return 0; }*/ struct card* via_card = malloc(sizeof(struct card)); struct mem_data* data = malloc(sizeof(struct mem_data)); if ((!via_card) || (!data)) { fprintf(stderr, _("%s: Malloc error.\n"), "via_open"); exit(-1); } memset(via_card, 0, sizeof(struct card)); via_card->data = data; data->fd = open("/dev/mem", O_RDWR); if (data->fd < 0) { perror(_("via_open: cannot open /dev/mem")); via_close(via_card); return 0; } data->length = 0x00001000; data->memory = mmap(data->memory, data->length, PROT_READ|PROT_WRITE, MAP_SHARED, data->fd, dev->base_addr[1]+0x8000 ); if (data->memory == MAP_FAILED) { perror(_("via_open: mmap failed")); via_close(via_card); return 0; } char* PCIO = data->memory; // Note: There is a third bus, which uses the GPIO bits. This one is not supported here! via_card->nbusses = 2; via_card->i2c_busses = malloc(2*sizeof(struct i2c_algo_bit_data)); init_i2c_bus(&via_card->i2c_busses[0], PCIO, 0x26); init_i2c_bus(&via_card->i2c_busses[1], PCIO, 0x31); return via_card; } void via_close(struct card* via_card) { int i; if (via_card->data) { struct mem_data* data = via_card->data; if ((data->memory) && (data->memory == MAP_FAILED) && (data->length)) { munmap(data->memory, data->length); } free(via_card->data); } for (i = 0; i < via_card->nbusses; i++) { free((&via_card->i2c_busses[i])->data); } free(via_card->i2c_busses); free(via_card); } ddccontrol-0.4.4/src/gddccontrol/000077500000000000000000000000001327040342400167425ustar00rootroot00000000000000ddccontrol-0.4.4/src/gddccontrol/Makefile.am000066400000000000000000000023311327040342400207750ustar00rootroot00000000000000localedir = $(datadir)/locale AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/src -DLOCALEDIR=\"$(localedir)\" EXTRA_DIST = gddccontrol.desktop.in gddccontrol.png gddccontrol-bluecurve.png LDADD = ../lib/libddccontrol.la bin_PROGRAMS = gddccontrol gddccontrol_SOURCES = main.c notebook.c notebook.h gprofile.c fspatterns.c gddccontrol_LDFLAGS = $(GNOME_LDFLAGS) -lm AM_CFLAGS = $(GNOME_CFLAGS) desktopdir = $(datadir)/applications desktop_in_files = gddccontrol.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ icondir = $(datadir)/icons/hicolor/48x48/apps icon_DATA = gddccontrol.png Bluecurvedir = $(datadir)/icons/Bluecurve/48x48/apps Bluecurve_DATA = gddccontrol.png # # GTK icon cache # gtk_update_icon_cache = \ gtk-update-icon-cache -f -t $(datadir)/icons/hicolor; \ gtk-update-icon-cache -f -t $(datadir)/icons/Bluecurve install-data-hook: update-icon-cache uninstall-hook: update-icon-cache update-icon-cache: if test -z "$(DESTDIR)"; then \ echo "Updating Gtk icon cache."; \ $(gtk_update_icon_cache); \ else \ echo "*** Icon cache not updated. After (un)install, run this:"; \ echo "*** $(gtk_update_icon_cache)"; \ fi ddccontrol-0.4.4/src/gddccontrol/fspatterns.c000066400000000000000000000273651327040342400213140ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2005 by Nicolas Boichat * * nicolas@boichat.ch * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #include "notebook.h" #include "internal.h" #include static GtkWidget* fs_patterns_window = NULL; static GtkWidget* table; static GtkWidget* centervbox; static GtkWidget* scrolled_window; static GtkWidget* monmainvbox; /* Monitor manager main GtkVBox (containing vbox) */ static GtkWidget* vbox; /* GtkVBox containing controls */ static GtkWidget* images[4] = {NULL, NULL, NULL, NULL}; /* top-bottom-left-right images */ //static GdkColor* oldvboxbg = NULL; /*static void set_vbox_bg_color(GdkColor* bg) { GList* list = gtk_container_get_children(GTK_CONTAINER(vbox)); while (list) { gtk_widget_modify_bg(list->data, GTK_STATE_NORMAL, bg); list = g_list_next(list); } }*/ static void destroy(GtkWidget *widget, gpointer data) { /*set_vbox_bg_color(oldvboxbg); g_free(oldvboxbg);*/ gtk_widget_ref(vbox); gtk_container_remove(GTK_CONTAINER(centervbox), vbox); gtk_box_pack_start(GTK_BOX(monmainvbox), vbox, 0, 5, 5); gtk_widget_unref(vbox); gtk_widget_hide(fs_patterns_window); } static void create_fullscreen_patterns_window() { fs_patterns_window = gtk_window_new(GTK_WINDOW_POPUP); gtk_container_set_border_width(GTK_CONTAINER(fs_patterns_window), 0); table = gtk_table_new(3, 3, FALSE); gtk_container_add(GTK_CONTAINER(fs_patterns_window), table); scrolled_window = gtk_scrolled_window_new(NULL, NULL); centervbox = gtk_vbox_new(FALSE,10); GtkWidget* align = gtk_alignment_new(0.5, 0, 0, 0); GtkWidget* close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); g_signal_connect(G_OBJECT(close_button),"clicked",G_CALLBACK (destroy), NULL); gtk_widget_show(close_button); gtk_container_add(GTK_CONTAINER(align), close_button); gtk_widget_show(align); gtk_box_pack_end(GTK_BOX(centervbox), align, TRUE, 5, 5); gtk_widget_show(centervbox); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), centervbox); /*GdkColor color; color.red = color.green = color.blue = 0x5000; gtk_widget_modify_bg(gtk_bin_get_child(GTK_BIN(scrolled_window)), GTK_STATE_NORMAL, &color);*/ gtk_widget_show(scrolled_window); } static void drawShade(GdkDrawable* pixmap, int ry, int rh, int number) { GdkColor color; PangoLayout* layout; gchar* tmp; GdkGC* gc = gdk_gc_new(pixmap); GdkGC* gcwhite = gdk_gc_new(pixmap); int width, height; gdk_drawable_get_size(pixmap, &width, &height); int rx = width/12; int rw = (width-(rx*2))/number; int i; int w, h; color.red = color.green = color.blue = 0x8000; gdk_gc_set_rgb_fg_color(gcwhite, &color); gdk_gc_set_rgb_bg_color(gcwhite, &color); color.red = color.green = color.blue = 0x0000; for (i = 0; i < number; i++) { gdk_gc_set_rgb_fg_color(gc, &color); gdk_gc_set_rgb_bg_color(gc, &color); gdk_draw_rectangle(pixmap, gc, TRUE, rx, ry, rw, rh); gdk_draw_line(pixmap, gcwhite, rx, ry+rh, rx, ry+rh+5); gdk_draw_line(pixmap, gcwhite, rx, ry-5, rx, ry); tmp = g_strdup_printf("%d", color.red*0xFF/0xFFFF); layout = gtk_widget_create_pango_layout(fs_patterns_window, tmp); g_free(tmp); pango_layout_get_pixel_size(layout, &w, &h); gdk_draw_layout(pixmap, gcwhite, rx+(rw-w)/2, ry+rh+2, layout); rx += rw; color.red = color.green = color.blue = (i+1)*0xFFFF/(number-1); } gdk_draw_line(pixmap, gcwhite, rx, ry+rh, rx, ry+rh+5); gdk_draw_line(pixmap, gcwhite, rx, ry-5, rx, ry); g_object_unref(gc); g_object_unref(gcwhite); } static void drawchecker(GdkDrawable* pixmap, int width, int height, gchar* text) { int w, h; GdkGC* gc = gdk_gc_new(pixmap); GdkColor color; color.red = color.green = color.blue = 0xFFFF; gdk_gc_set_rgb_fg_color(gc, &color); int x, y; for (x = 0; x < width; x += 1) { for (y = x%2; y < height; y += 2) { gdk_draw_point(pixmap, gc, x, y); } } PangoLayout* layout = pango_layout_new(gtk_widget_get_pango_context(fs_patterns_window)); pango_layout_set_markup(layout, text, -1); pango_layout_get_pixel_size(layout, &w, &h); color.red = color.green = color.blue = 0x8000; gdk_gc_set_rgb_fg_color(gc, &color); gdk_gc_set_rgb_bg_color(gc, &color); gdk_draw_rectangle(pixmap, gc, TRUE, (width-w)/2-5, 3*height/8-5, w+10, h+10); color.red = color.green = color.blue = 0x0000; gdk_gc_set_rgb_fg_color(gc, &color); gdk_draw_layout(pixmap, gc, (width-w)/2, 3*height/8, layout); g_object_unref(gc); } static void show_pattern(gchar* patternname) { GdkRectangle drect; GdkScreen* screen = gdk_screen_get_default(); int i = gdk_screen_get_monitor_at_window(gdk_screen_get_default(), main_app_window->window); gdk_screen_get_monitor_geometry(screen, i, &drect); int top = 7*drect.height/12, bottom = 11*drect.height/12, left = drect.width/3, right = 2*drect.width/3; gtk_widget_set_size_request(fs_patterns_window, drect.width, drect.height); gtk_window_move(GTK_WINDOW(fs_patterns_window), drect.x, drect.y); GdkDrawable* pixmap = gdk_pixmap_new(0, drect.width, drect.height, gdk_colormap_get_visual(gdk_colormap_get_system())->depth); gdk_drawable_set_colormap(pixmap, gdk_colormap_get_system()); int w, h; GdkColor color; GdkGC* gc = gdk_gc_new(pixmap); color.red = color.green = color.blue = 0x0000; gdk_gc_set_rgb_fg_color(gc, &color); gdk_gc_set_rgb_bg_color(gc, &color); gdk_draw_rectangle(pixmap, gc, TRUE, 0, 0, drect.width, drect.height); if (g_str_equal(patternname, "brightnesscontrast")) { drawShade(pixmap, drect.height/8, drect.height/8, 21); color.red = color.green = color.blue = 0xFFFF; gdk_gc_set_rgb_fg_color(gc, &color); PangoLayout* layout = pango_layout_new(gtk_widget_get_pango_context(fs_patterns_window)); pango_layout_set_markup(layout, _("Adjust brightness and contrast following these rules:\n" " - Black must be as dark as possible.\n" " - White should be as bright as possible.\n" " - You must be able to distinguish each gray level (particularly 0 and 12).\n" ) , -1); pango_layout_get_pixel_size(layout, &w, &h); gdk_draw_layout(pixmap, gc, (drect.width-w)/2, 3*drect.height/8, layout); /* Fujitsu-Siemens blank lines for auto level (0xfe). */ color.red = color.green = color.blue = 0xFFFF; gdk_gc_set_rgb_fg_color(gc, &color); gdk_draw_line(pixmap, gc, 0, (drect.height)/24, drect.width, (drect.height)/24); gdk_draw_line(pixmap, gc, 0, (23*drect.height)/24, drect.width, (23*drect.height)/24); } else if (g_str_equal(patternname, "moire")) { drawchecker(pixmap, drect.width, drect.height, _("Try to make moire patterns disappear.")); } else if (g_str_equal(patternname, "clock")) { drawchecker(pixmap, drect.width, drect.height, _("Adjust Image Lock Coarse to make the vertical band disappear.\n" "Adjust Image Lock Fine to minimize movement on the screen.")); } else if (g_str_equal(patternname, "misconvergence")) { const int csize = 51; const int dsize = 25; int x, y, c = 0, d = 0; for (x = 0; x < drect.width; x += csize) { c = d; for (y = 0; y < drect.height; y += csize) { color.red = 0x0000; color.green = 0x0000; color.blue = 0x0000; switch (c % 4) { case 0: color.red = 0xFFFF; break; case 1: color.green = 0xFFFF; break; case 2: color.blue = 0xFFFF; break; default: color.red = 0xFFFF; color.green = 0xFFFF; color.blue = 0xFFFF; } gdk_gc_set_rgb_fg_color(gc, &color); gdk_draw_line(pixmap, gc, x+dsize, y, x+dsize, y+csize); gdk_draw_line(pixmap, gc, x, y+dsize, x+csize, y+dsize); c++; } d++; } } else { color.red = color.green = color.blue = 0xFFFF; gdk_gc_set_rgb_fg_color(gc, &color); gchar* tmp = g_strdup_printf(_("Unknown fullscreen pattern name: %s"), patternname); PangoLayout* layout = pango_layout_new(gtk_widget_get_pango_context(fs_patterns_window)); pango_layout_set_markup(layout, tmp, -1); g_free(tmp); pango_layout_get_pixel_size(layout, &w, &h); gdk_draw_layout(pixmap, gc, (drect.width-w)/2, drect.height/8, layout); } g_object_unref(gc); GdkPixbuf* pixbufs[4]; pixbufs[0] = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, 0, 0, 0, drect.width, top); pixbufs[1] = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, bottom, 0, 0, drect.width, drect.height-bottom); pixbufs[2] = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, top, 0, 0, left, bottom-top); pixbufs[3] = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, right, top, 0, 0, drect.width-right, bottom-top); if (images[0]) { /* GtkImages already exist */ for (i = 0; i < 4; i++) { gtk_image_set_from_pixbuf(GTK_IMAGE(images[i]), pixbufs[i]); } } else { for (i = 0; i < 4; i++) { images[i] = gtk_image_new_from_pixbuf(pixbufs[i]); gtk_widget_show(images[i]); g_object_unref(pixbufs[i]); } gtk_table_attach(GTK_TABLE(table), images[0], 0, 3, 0, 1, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 0, 0); gtk_table_attach(GTK_TABLE(table), images[2], 0, 1, 1, 2, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 0, 0); gtk_table_attach(GTK_TABLE(table), scrolled_window, 1, 2, 1, 2, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 0, 0); gtk_table_attach(GTK_TABLE(table), images[3], 2, 3, 1, 2, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 0, 0); gtk_table_attach(GTK_TABLE(table), images[1], 0, 3, 2, 3, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 0, 0); gtk_widget_show(table); } gtk_widget_set_size_request(scrolled_window, right-left, bottom-top); GdkGeometry hints; hints.min_width = drect.width; hints.min_height = drect.height; hints.max_width = drect.width; hints.max_height = drect.height; gtk_window_set_geometry_hints(GTK_WINDOW(fs_patterns_window), GTK_WIDGET(fs_patterns_window), &hints, GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE); gtk_widget_show(fs_patterns_window); } void fullscreen_callback(GtkWidget *widget, gpointer data) { monmainvbox = g_object_get_data(G_OBJECT(widget),"mainvbox"); vbox = g_object_get_data(G_OBJECT(widget),"vbox"); if (!fs_patterns_window) create_fullscreen_patterns_window(); gtk_widget_ref(vbox); gtk_container_remove(GTK_CONTAINER(monmainvbox), vbox); gtk_box_pack_start(GTK_BOX(centervbox), vbox, 0, 5, 5); gtk_widget_unref(vbox); /*oldvboxbg = g_malloc(sizeof(GdkColor)); memcpy(oldvboxbg, >k_widget_get_style(vbox)->bg[GTK_STATE_NORMAL], sizeof(GdkColor)); GdkColor black; black.red = black.green = black.blue = 0x5000; set_vbox_bg_color(&black);*/ show_pattern(g_object_get_data(G_OBJECT(widget),"pattern")); } ddccontrol-0.4.4/src/gddccontrol/gddccontrol-bluecurve.png000066400000000000000000000055511327040342400237520ustar00rootroot00000000000000‰PNG  IHDR00Wù‡bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ  \fÓh öIDAThÞí™yl”çÇ?ãϼ3ãÎaÙøÀ ΘËNšøDY7‰"• [wQ m•åʲ›BWŽA$ÙeAu’6!D‘ Þm6ÛíR±¹P`µ²•…scÆã Æ×3ïœÏ}¼ýÃxä4Ž©ÝCâ+½z5ï3ïó|¿Ïïû{®îâ.îâ.îâ/eÀ€ΛÍfÉl6K€íæó¯…ìOD¸iò2›Íå555ÔÖÖRSSƒN§C¥RáñxxñÅùä“O^^þS ¨šJ¸¦¦ÆPSSÃ$i•J…Z­F£Ñàõzq¹\œ={–õë×·ß¾]åŠY üW7ÉVëtº¦xÀPYYy[ …Q±Ûí¸Ýn4 A~ocŠ$ܤÓéšêêêÒv0›Í¤R©¯öz½8NÜn7ñx<]VZZ:a YæÆ˜®ý;T—––6Õ××S__O]]sçÎE’$²²²P©TiÂ'M8‹¡ÑhP«Õ¤+öù|ŒŒŒàt:©®®F¯×g$$S»€U&“©º±±‘ÆÆF())A’$d2ÙÙÙ(•Jd2>Ÿ‡Ã‘&¬V«Q«Õäçç§IME§Ó‰Ëág?ýgÂá0###3]O<ñÄKÛ·o§¼¼:‚T*5ãä3Nâd2‰$IéßW®\áôÙ ìÙýJú™$I·ôól#+S“=(“ɈÇãìÙýŠ8›Äf57‘Ÿ.O¥ÈºÙ`[[ÑhôKcülŠ˜vnU±|˜®®.,K¼»»û“I<+˜Šââbìv;7ndçÎ,_¾œ9sæ°k×.Nž< Àºuëhnn¦¿¿I’(..æêÕ«\¾|™@ €ßï§··—Ë—/Úl¶çãñø :[{â/Ï”YY”””››Ë /¼@KK ´´´ÐÒÒÂÊ•+Y³f 6›T*EAAáp˜“'Oât:9uê===øýþV ÿà=ñt£0i“%K–ðú믳iÓ&ÊËËiii¡­­ ™L†N§EJxÅ{Øl6†††8uêÔE ÝñRb*ñ;!? £ÑHNN;vìàèÑ£FÖ­[G·ånÛkÔÿœ‹ÿÂG}„R©dÕªUÞÛ‘ÿ£XàGëÿ¹zìv;Ï>û,[·nå³Ï>#³xñbV¯ÔòxMu>8j'*"??ŸŽŽ€Á=VÉ$ÅeÔÖÖ‰D‡ÃD"!Nœ¸Ì»ï¾Ëƒ>ˆV«eÉ’%|øá‡Ì1 ±¶é’1ü£P¤†Õgˆ ¡û,ÿ¼:ÛçBøÆB|C«"N,°RaýiÁ‹…ýû÷óôÓO3gμ^/F£‘¥AV/?L¡:EÔ‰<ó¨ Á€e ©ýùÐÚÙÍf`hƘL&2™Œp8L(BtÄÒÑ™z¿tédÏž=x½^¢Ñ(ƒ—ËÅ‚Ò1L…) .…À8 Á½‹È~cßùιà§úV"2à S-¤×ë¹~ýúWÈNÞOŸ>ÍÑ£G¹ví†Í›7ãóùH$èõzA §§‡ÿ;=‹Õî»a'üÊfоU¶Q†A©€óàÓ70<¿_}náï£qÎNw9m®¨¨¨^ºt)¢(~éÄlòn·Û9~ü8mmmìØ±ƒ¡¡¡@]]]Ö£>*_±bƒx<ž>véééáÆ\¼xÙr¬ýúß•ÌÅøÈr–ú¯C*’ ’È$²A©…ª…{¼4öÓ=5™Œ‰U>øàFFF0™LX­V:;;éììÄjµb·ÛÛÏ€Ê 6|ãÆ$ T*‚  R©P*•$ †‡‡±X,ìÛ·oÐb±¬Næóì«ÛÙ_®€D ŠŠÁ¹rP© ®€¬¬Ú –š€Žé¯ÿ ªªêß,XÀ±cÇíÀäÕ››û½õë×|üñÇs£Ñ(ñxœH$‚J¥¢¬¬ ­VK,£··—íÛ·sîܹÕÀ¯'÷×óKÙó¯?ásŒ»¡°Æ‚ÑPk@ ‰lHaç; tœc‹sŒOå ¸èp8ŽX­ÖÿŒÅb?~y“x:”uuu?innnT*•„B!zzzÀb±PVV†ÑhDEùøãñûýÛ€±›¯‡¼c|~ò<š¹&j¾9¼"hÕ…±8È䂔ߪ$·×FÉ€_Ng&¾8ÙÛ·‚Á`Ð+•J|>½½½ìÝ»wðå—_t¹\âr¹èêêb``€¡¡¡v`ôw·Â×lyáuv´[‰«uàóƒV5‘¡Ä Ž‚&ÙɉSùLͶ¡Pèž¼¼¼@ÖÚ=Oÿ–-[Ÿzê)®]»†Õje`` uøðáN—ËõpËíY<ÁÙÏÏ“œ÷Mï)C€A=‘Ô±(¨dpð×x>9Ï®`”‹3&Àï÷»Gã‰'>½zõê.N÷íµk×Vº\.l6´··ÿÍfÛšL&û¿¦ªx,Îéçpg«h¨0¡ A—ò ì=ÿõ9Ï;â³¹úÛªª*é¾ûî“Aè¼ù%gºøîæf¼WþÉò ¤«‘2ùr9“XTüV•Ïüð¯9¿å»ô—äòÓ?‡Ï¬w"b>ôÁ©…¿ÈØè+H _IEND®B`‚ddccontrol-0.4.4/src/gddccontrol/gddccontrol.desktop.in000066400000000000000000000004061327040342400232440ustar00rootroot00000000000000[Desktop Entry] _Name=DDC Control _GenericName=Monitor Settings _Comment=Set your monitor preferences (contrast, brightness,...) and manage your profiles Exec=gddccontrol Icon=gddccontrol Terminal=false Type=Application Categories=GTK;Settings;HardwareSettings; ddccontrol-0.4.4/src/gddccontrol/gddccontrol.png000066400000000000000000000066731327040342400217660ustar00rootroot00000000000000‰PNG  IHDR00Wù‡bKGDÿÿÿ ½§“ pHYs ‡ ‡“@‡StIMEÕ  !/šþð… HIDAThÞí™ypÕÇ?}Ì¥ktYŸ±±-$c‚1±—Ä1BLmÄÁÀB1Á˜¡*!vÃîqALl®’8ERYެ‰ñ/ÙÆ–°lÖ1²¥ÑhtŒ¤™î×ïíÝ3É’eØ-6UáU=MwOkê÷ýÝ¿ïƒÏÖg볕^ u]Wš¦)àoui´ÐZֵд6äóû*}>?š¦e¶T Ðt}\ôJ)ÇAI¥Ü{wK”)P Û¶I&“8Ž#G „ƒã¸[xŸ¶B:Ò‘X–EKKó‘ï­}pî(™1³orró*ÛÛÐu]×=:šîAþw¥@ón”ûG)P(”T…”GJW)‘R"„p….[÷™Gà‡”B éôôôÌKqæ(=ºÂêÃÚ×½k¼û ‹BRYZ—Ò ¤k ©JÊÌuæ{•~ætJºu<¤,‹ ¸ZÖÑÐèŽÇéééEÏr¥,õ£<­£@*Jºz ¤tï¥ã äHK8NÚ[8žE„çNaÛœY^†#]—’Ò™Çãq®\þÿ׬òÆož§+óÈÓ°@v|¨áà+`•R!èëë#‰ÐØØH$¡¯¯!DVŸü^[[Ûˆ÷Æ[Á@)/f& pýR×ñ§¹Ònæf¦Ó°€#Òq@×ÿ&HGzÜØ™Ø^¾–¨qƒæSµ€tk„ðêÃÄAì#MÊqMö©»—±!ÆÉRIG iú'¶@º"g'€SêéÄ@ºŒêT€ž¶„” !4]áç ÇÙºu+‘H„k¯½–üü|¯X© dGŒÕ)0€4¶m¹%}“M¤ùúú£ÜzË*þôæ&;Imm ÇŽc``àcƒØ¼­š÷÷5Ʋ]:»ÒÒÚ$SCnÀöǶ€m[ضÍÎ;(..æþîã¶[¾Í¼ªÙìÙ³‡d2yÚ ü¹aæVÇ#?ºŸ¹gŸCGGt,èÞ3mÇÛúD0MóçŸKCc3Ÿ›5‡¿¼ý6s+¸è‹òµ¥—ÒÑÑ‘IÏXuÛí¬ºñzü>o\·‚ùŸ_˜ @3ˆ…ã`[6º®Ÿ6!–eeÓuªª*¦L™ÂÆͼùç"›²3ÊH&‡Ð4ý”¿È/båÍ«øñwÓÓÓCaq)õõ5Dc]þŽ54~M·ºš¦aŸ)%ÕÕÕlܸ‘ŠŠ 1 ƒ@ @NN¡œ†i2©´”®X7ÉdŠ@ pÊì´æ®»¸÷î;L““ƒ†¢³óû)Æt¡¬¨w;A!ì±¢þ$áy衇xô?¡¡þ(ÇGJ‰¦ilÚ´‰•7Ý@NÐO,'ÑŸ@1a…_pnŽ#1MºnèðÔ³/“4pܸ<É…²J·À¶mt]CØbBŸO$´´´ Ð¸wíÝ|ÿ¾ •Â0 ~µþi.¼èh9ÖÀÑú£œ8qœd2™I©c-Ã0Ð5 á¤H%“´µ6òïëžÂP6EEál¥Ë11 àt\( ²fÍ{ìqî¹çnlGŽÔqÖœ9Ì™}ÍGéïëÃï rûm·°xÑxëí·Ø¾£zL‹¾p‹-ÀJtÒÚáÅWK[k3çÍ›C<Þ;Úk2u «÷p°, ˶3CÅ©–a\~ùå %ùõ«¿¡²r—-YÊŒ)Sèêh§©±mìfڌ锕sÉE‹yåå—ùÝë/SQ1û¤ß[¿þi¢Ñ?õ<—-½ŽšCuœÎ\·Æ »ž>® Ù–›Ç5©MX4MÃçó …¸ä’Kذau‡så²e(Çf×®xË_²ihhbÕÊbÒåDZ[8kÖL~ÿú«¼ðÂF6oÙÁñÔ“O‹uqÿ}°{ï>¾~Õeª©s§»áfÎð@8'H` ]êºP@nn.%%%,Y²„;wòè£ë0tÁ¡$áp¹&»öìãÈ‘:®¹f9ß¾i%ƒ z{º¹úªå\·b5µ‡Ù·o7ëÖýŒÚê†]Ú¶±½¡'+ø¬@V#-`»-„ØöÄÐu`0H8¦´´”ŠŠ ŠŠŠÀ²,t]Ç4MJKK‰F£<ü¯?cûÖm<ü“‡™1kí-ĺº¨œ;›eW^ÁÅ_ºïÝ}?‘öR©TfjËêFÍl7À²mlËFÓ·} Â0 ü~?yyy"„  ¹m¹G¤‹bee%ïmÝÍwWßÅwV}‡%_YÂŒ‚"âÝ4=LUå<þºù6lxžwþ²…ƒµGH$Ùó€/;F±e¥°l [؈ÓìF5MÃ4Mü~?¡Pˆ¼¼< ‡Ã„Ãaòóó3;//¢¢"ö¨eã ¯pó­·ÓÐÐ@ÙS™:}&©ä ±®(7ÝxÏüò,ùêåìÛ_C¤ý8Éd*S¬³:ˆ‘¤”ضÀ¶ì ]h,wJ ƒƒA@æ3`mmm\ñµË¹~Å òB|ó†›yãµ×s˜þ¹9”N*¥+ÚIœåË—óÞæ·Y¼hÍ-­†öšOÐÍ“»IË-d^%Ö4í=Y†ÁÌÙ””N"'¿€¼\?õuÕl~o ý‰$«ïy€âÒK/ã«K—Rqv˜žxŒ‘ÂE%¬]»†k¯¹šÇŸXO¬+úÃ}û¾$Û€~ ÈŠæ Ïý’#‡¡i“'—3yr9:JײL¥yô¡7¤ ŽK%¦™·4‰ÕÐtŒ½ŽR2½Šó_Œq¬þ#ìÞŽoå‚ó+–Mo?íÇ£tu÷±pÁî]{“ÊÊè#ÖÝÉ`"?"\XBí¡õôúgšþüÖ{ÿüq€_=û$ÕÈêU†‘S.w˜¡_Ò}½LÏÏ^±‘Ò%dûÔpÏa ¥ØS½—I“§Ó|B8¤l+e‘LYtÅzhniçÕ—žãË—\Fn^>ݱ ô÷òλïŹñ†›¨š–Žp¡d*‰m ô4 ­<šGYxœgZóÃŒ´ÌTK[Z[“°}Üqï©>X‡2çìsÈ úù`o-õÍíèfÀM>ÃÍfºN8fÚÔiÌ™}kï{ª³+¸ë»wR9ïÂÅåìÙwúú&®ýúõœÞ<§zÍ‘i4•’B=Ã…fh•a#X·4ãì‚‘45·R6­Š\¶‚‡PX4‰@(‡ò’BÞÚò~Hª¯\¿‰¦k 4tüšÁÌ™³¨­9HÊp¬ù÷ÿàA.\È­«VrõòeL>‹žxœžÞ>tìF•£éd¨ôaÑÉ\+—ÍõØhé1Ê.˜xO/2t&W~ëŸùÝopöçÊÍgZY˜Cu ¼ý‡7é±lÌ($Ñ1ü« 4Ɔ#X–›ÂKŠ ±,›”e±}ǶnßÉMß¼ŽD_//¾òŸÉƦÖwN âÕwÞÖÙÒÒT¦k#’ψ³€áa$}àHɉÎ(9åÜxÇZö×Ô.)#'/L~ŽÔÐO>»‘d¢—EçΦ±z+~ŸCa8?Ãr+åÒ:x4½“¦×33º“¬;z,ìZw€#ë¸X—–ùû÷®I)%>ÓMÃgú0MÓôašº¦cúýèšF´«‹ÖÝܺú>^ûýŸÈ-,¡ x¦&Ñ¥ÃϽÂñö&æNÄÔ¼!º£q/¾Ó4‘ŽkA”ô: ¤‡×ÙïnÞæËRå €no·›Þp €÷€ë€iÀÏã=½vG{‹”nxÊ4}ø|>ü~?>ŸŸéÇ0MêŽ6²üú•üáÏÿMAa˜ò)ÓvŠÜPˆ'ž™–Ƙ5ù ÊrLvlßË/ ùXSæ\OûÊ;ÊÂ;ééèŒY^ëðCOà˜÷Ù›ÞšWšsàL ¸X}º…ê+K¯`õƒ?%ÞuœÒ3¦` ‡¾¾/ýöMölßFQqå¹:5û‰uu~Ü:ø °ˆ]@Ф€¤éõÕC@Ü‹Ó> <€¾ÑmG61?iÊOtÝ0¦L›eY45·±e×~öíÚNqasÎ,æÀî­±X,º ¨ç¤Sˆ‘ã¶'SÒ4îi>îi}°<¯qÒÒǘ60ཛྷçY&˜5DŒ åè*Ú#ÞÛG"A¤£“u»(ÊósÖô2Þÿ¯MI+•z¥ö­O å ÛïíAï™%3¦w!½/E–üžæÑcÜè^®3ÒüúÎêýß’ÊahpÓI`£‘ãGÚ½µÖJYÿ‚R»ÇâÆ#= /* Protos */ void refresh_profile_manager(); /* Profile manager */ void cancelprofile_callback(GtkWidget *widget, gpointer data) { gtk_widget_hide(saveprofile_button); gtk_widget_hide(cancelprofile_button); gtk_widget_show(profile_manager_button); show_profile_checks(FALSE); set_status(""); } void saveprofile_callback(GtkWidget *widget, gpointer data) { unsigned char controls[256]; int size; struct profile* profile; size = get_profile_checked_controls(&controls[0]); if (!size) { GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(main_app_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("You must select at least one control to be saved in the profile.")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return; } set_status(""); set_message(_("Creating profile...")); gtk_widget_hide(saveprofile_button); gtk_widget_hide(cancelprofile_button); gtk_widget_show(profile_manager_button); show_profile_checks(FALSE); profile = ddcci_create_profile(mon, controls, size); if (!profile) { GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(main_app_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error while creating profile.")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); set_message(""); return; } show_profile_information(profile, TRUE); set_message(""); } /* Callbacks */ static void apply_callback(GtkWidget *widget, gpointer data) { struct profile* profile = (struct profile*)data; set_message(_("Applying profile...")); ddcci_apply_profile(profile, mon); refresh_all_controls(widget, data); set_current_main_component(0); } static void show_info_callback(GtkWidget *widget, gpointer data) { struct profile* profile = (struct profile*)data; show_profile_information(profile, FALSE); } static void delete_callback(GtkWidget *widget, gpointer data) { struct profile* profile = (struct profile*)data; GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(main_app_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Are you sure you want to delete the profile '%s'?"), profile->name); gint result = gtk_dialog_run(GTK_DIALOG(dialog)); switch (result) { case GTK_RESPONSE_YES: ddcci_delete_profile(profile, mon); refresh_profile_manager(); break; case GTK_RESPONSE_NO: default: break; } gtk_widget_destroy(dialog); } static void create_callback(GtkWidget *widget, gpointer data) { show_profile_checks(TRUE); set_current_main_component(0); gtk_widget_hide(profile_manager_button); gtk_widget_show(saveprofile_button); gtk_widget_show(cancelprofile_button); set_status(_("Please select the controls you want to save in the profile using the checkboxes to the left of each control.")); } static void close_profile_manager(GtkWidget *widget, gpointer data) { set_current_main_component(0); } /* Initializers */ /* Fill profile manager with components */ void fill_profile_manager() { GtkWidget* table; GtkWidget* label; GtkWidget* button; GtkWidget* hsep; GtkWidget* hbox; GtkWidget* scrolled_window; struct profile* profile; int count = 0; int crow = 0; gchar* tmp; profile = mon->profiles; while (profile != NULL) { count++; profile = profile->next; } profile = mon->profiles; label = gtk_label_new(NULL); tmp = g_strdup_printf("%s", _("Profile Manager")); gtk_label_set_markup(GTK_LABEL(label), tmp); g_free(tmp); gtk_box_pack_start(GTK_BOX(profile_manager), label, 0, 0, 0); gtk_widget_show(label); scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrolled_window), 10); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); table = gtk_table_new(count == 0 ? 1 : (count*2)-1, 5, FALSE); while (profile != NULL) { label = gtk_label_new((gchar*)profile->name); gtk_table_attach(GTK_TABLE(table), label, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 0, 5); gtk_widget_show(label); button = stock_label_button(GTK_STOCK_APPLY, NULL, _("Apply profile")); gtk_table_attach(GTK_TABLE(table), button, 1, 2, crow, crow+1, GTK_SHRINK, 0, 5, 5); gtk_widget_show(button); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(apply_callback), profile); button = stock_label_button(GTK_STOCK_EDIT, NULL, _("Show profile details / Rename profile")); gtk_table_attach(GTK_TABLE(table), button, 2, 3, crow, crow+1, GTK_SHRINK, 0, 5, 5); gtk_widget_show(button); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(show_info_callback), profile); button = stock_label_button(GTK_STOCK_DELETE, NULL, _("Delete profile")); gtk_table_attach(GTK_TABLE(table), button, 3, 4, crow, crow+1, GTK_SHRINK, 0, 5, 5); gtk_widget_show(button); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(delete_callback), profile); crow++; if (profile->next) { hsep = gtk_hseparator_new(); gtk_table_attach(GTK_TABLE(table), hsep, 0, 3, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 0, 5); crow++; gtk_widget_show(hsep); } profile = profile->next; } gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), table); gtk_widget_show(table); gtk_box_pack_start(GTK_BOX(profile_manager), scrolled_window, TRUE, TRUE, 0); gtk_widget_show(scrolled_window); GtkWidget* salign = gtk_alignment_new(0.5, 0, 0, 0); hbox = gtk_hbox_new(FALSE, 10); button = stock_label_button(GTK_STOCK_SAVE, _("Create profile"), NULL); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(create_callback), NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 0); gtk_widget_show(button); button = stock_label_button(GTK_STOCK_CLOSE, _("Close profile manager"), NULL); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(close_profile_manager), NULL); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 0); gtk_widget_show(button); gtk_container_add(GTK_CONTAINER(salign), hbox); gtk_widget_show(hbox); gtk_box_pack_start(GTK_BOX(profile_manager), salign, 0, 0, 0); gtk_widget_show(salign); } void create_profile_manager() { profile_manager = gtk_vbox_new(FALSE, 10); fill_profile_manager(); } void refresh_profile_manager() { /* Remove all elements from the container */ GList *list = gtk_container_get_children(GTK_CONTAINER(profile_manager)); GList *iter; if (list) { for (iter = g_list_copy(list); iter; iter = g_list_next(iter)) { GtkWidget *child = GTK_WIDGET(iter->data); gtk_container_remove(GTK_CONTAINER(profile_manager), child); } g_list_free(iter); } fill_profile_manager(); } /* Profile information dialog */ enum { TITLE_COL, VALUE_COL, ADDRESS_COL, RAW_VALUE_COL, N_COLS, }; static GtkWidget* create_info_tree(struct profile* profile, GtkWidget* dialog) { gchar* tmp; gchar* tmp2; gchar* tmp3; short max; GValue val; GtkTreeStore *store = gtk_tree_store_new(N_COLS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); GtkWidget *tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); g_object_unref(G_OBJECT(store)); GtkCellRenderer *renderer; GtkTreeViewColumn *column; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Control name"),renderer,"text",TITLE_COL,NULL); gtk_tree_view_column_set_expand(column, TRUE); gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column); renderer = gtk_cell_renderer_text_new(); memset(&val, 0, sizeof(val)); g_value_init (&val, G_TYPE_FLOAT); g_value_set_float (&val, 1.0); g_object_set_property(G_OBJECT(renderer), "xalign", &val); column = gtk_tree_view_column_new_with_attributes(_("Value"),renderer,"text",VALUE_COL,NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column); column = gtk_tree_view_column_new_with_attributes(_("Address"),renderer,"text",ADDRESS_COL,NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column); column = gtk_tree_view_column_new_with_attributes(_("Raw value"),renderer,"text",RAW_VALUE_COL,NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column); GtkTreeIter top_iter; GtkTreeIter sub_iter; GtkTreeIter con_iter; struct group_db* group; struct subgroup_db* subgroup; struct control_db* control; struct value_db* value_db; gboolean group_created, subgroup_created; int i; for (group = mon->db->group_list; group != NULL; group = group->next) { group_created = FALSE; for (subgroup = group->subgroup_list; subgroup != NULL; subgroup = subgroup->next) { subgroup_created = FALSE; for (control = subgroup->control_list; control != NULL; control = control->next) { for (i = 0; i < profile->size; i++) { if (profile->address[i] == control->address) { if (!group_created) { gtk_tree_store_append(store,&top_iter,NULL); gtk_tree_store_set(store,&top_iter,TITLE_COL,group->name,-1); group_created = TRUE; } if (!subgroup_created) { gtk_tree_store_append(store,&sub_iter,&top_iter); gtk_tree_store_set(store,&sub_iter,TITLE_COL,subgroup->name,-1); subgroup_created = TRUE; } gtk_tree_store_append(store,&con_iter,&sub_iter); tmp = g_strdup_printf("%#x", control->address); tmp2 = g_strdup_printf("%u", profile->value[i]); switch (control->type) { case value: /* Try to get the control maximum */ max = get_control_max(control); if (max) { tmp3 = g_strdup_printf("%.1f %%", (double)profile->value[i]*100.0/(double)max); } else { tmp3 = g_strdup("??%"); } break; case list: tmp3 = NULL; for (value_db = control->value_list; value_db != NULL; value_db = value_db->next) { if (value_db->value == profile->value[i]) { tmp3 = g_strdup((gchar*)value_db->name); } } if (!tmp) tmp3 = g_strdup("???"); break; default: tmp3 = g_strdup(""); } gtk_tree_store_set( store, &con_iter, TITLE_COL, control->name, VALUE_COL, tmp3, ADDRESS_COL, tmp, RAW_VALUE_COL, tmp2,-1); g_free(tmp); g_free(tmp2); g_free(tmp3); break; } } } } } gtk_tree_view_expand_all(GTK_TREE_VIEW(tree)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree),1); // gtk_container_set_border_width(GTK_CONTAINER(tree),1); GtkTreeSelection *select; select = gtk_tree_view_get_selection(GTK_TREE_VIEW (tree)); gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); return tree; } static void entry_modified_callback(GtkWidget* entry, GtkWidget* dialog) { GtkWidget* ok_button = g_object_get_data(G_OBJECT(dialog), "ok_button"); if (ok_button) { gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(ok_button)), ok_button); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, GTK_RESPONSE_OK); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); g_object_set_data(G_OBJECT(dialog), "ok_button", NULL); } } /* Creates a profile information dialog and show it. * new_profile - indicates if the profile has just been created. */ void show_profile_information(struct profile* profile, gboolean new_profile) { GtkWidget *label; GtkWidget *entry; GtkWidget *hbox; int rc; gchar* title = g_strdup_printf("%s %s", _("Profile information:"), profile->name); gchar* tmp; GtkWidget *dialog = gtk_dialog_new_with_buttons( title, GTK_WINDOW(main_app_window), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, NULL); if (new_profile) { g_object_set_data(G_OBJECT(dialog), "ok_button", NULL); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_SAVE, GTK_RESPONSE_OK); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); } else { GtkWidget* ok_button = gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); g_object_set_data(G_OBJECT(dialog), "ok_button", ok_button); } label = gtk_label_new(NULL); tmp = g_strdup_printf("%s %s", _("Profile information:"), profile->name); gtk_label_set_markup(GTK_LABEL(label), tmp); g_free(tmp); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), label, FALSE, FALSE, 5); gtk_widget_show(label); hbox = gtk_hbox_new(FALSE,0); label = gtk_label_new(NULL); tmp = g_strdup_printf(_("File name: %s"), profile->filename); gtk_label_set_text(GTK_LABEL(label), tmp); g_free(tmp); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 5); gtk_widget_show(hbox); hbox = gtk_hbox_new(FALSE,0); label = gtk_label_new(_("Profile name:")); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 5); gtk_widget_show(label); entry = gtk_entry_new(); gtk_entry_set_text(GTK_ENTRY(entry), (gchar*)profile->name); gtk_box_pack_start(GTK_BOX(hbox), entry, FALSE, FALSE, 5); g_signal_connect(GTK_ENTRY(entry), "changed", G_CALLBACK(entry_modified_callback), dialog); gtk_widget_show(entry); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox, FALSE, FALSE, 5); gtk_widget_show(hbox); GtkWidget* tree = create_info_tree(profile, dialog); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), tree, FALSE, FALSE, 5); gtk_widget_show(tree); gint result = gtk_dialog_run(GTK_DIALOG(dialog)); switch (result) { case GTK_RESPONSE_OK: /* Save */ set_message(_("Saving profile...")); ddcci_set_profile_name(profile, gtk_entry_get_text(GTK_ENTRY(entry))); rc = ddcci_save_profile(profile, mon); if (!rc) { GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(main_app_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Error while saving profile.")); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); set_message(""); return; } refresh_profile_manager(); set_message(""); break; case GTK_RESPONSE_ACCEPT: /* Ok */ case GTK_RESPONSE_CANCEL: /* Cancel */ default: break; } g_free(title); gtk_widget_destroy (dialog); } ddccontrol-0.4.4/src/gddccontrol/main.c000066400000000000000000000432151327040342400200370ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2004-2005 by Nicolas Boichat * * nicolas@boichat.ch * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #include "config.h" #include #include #include #include #define IDLE_TIMEOUT 60 #include "notebook.h" #include "internal.h" GtkWidget* table; GtkWidget *combo_box; GtkWidget* refresh_monitors_button; GtkWidget *messagebox = NULL; GtkWidget *messagelabel = NULL; GtkWidget *messagebutton = NULL; GtkWidget *statuslabel = NULL; GtkWidget* close_button = NULL; GtkWidget* choice_hbox = NULL; GtkWidget* profile_hbox = NULL; GtkWidget* bottom_hbox = NULL; struct monitorlist* monlist; GtkTooltips *tooltips; gulong combo_box_changed_handler_id = 0; int mainrow = 0; /* Main center row in the table widget */ /* Indicate what is now displayed at the center of the main window: * 0 - Monitor manager * 1 - Profile manager */ int current_main_component = 0; /* Current monitor id, and next one. */ int currentid = -1; int nextid = -1; static GMutex* combo_change_mutex; static gboolean delete_event( GtkWidget *widget, GdkEvent *event, gpointer data ) { return FALSE; } static void destroy( GtkWidget *widget, gpointer data ) { gtk_main_quit (); } static void loadprofile_callback(GtkWidget *widget, gpointer data) { set_current_main_component(1); } static void combo_change(GtkWidget *widget, gpointer data) { nextid = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); if (!g_mutex_trylock(combo_change_mutex)) { if (get_verbosity()) printf("Tried to change to %d, but mutex locked.\n", gtk_combo_box_get_active(GTK_COMBO_BOX(widget))); return; } gtk_widget_set_sensitive(widget, FALSE); while (currentid != nextid) { if (get_verbosity()) printf("currentid(%d) != nextid(%d), trying...\n", currentid, nextid); currentid = nextid; int i = 0; if (monitor_manager != NULL) { delete_monitor_manager(); gtk_widget_destroy(monitor_manager); monitor_manager = NULL; } char buffer[256]; struct monitorlist* current; for (current = monlist;; current = current->next) { g_assert(current != NULL); if (i == currentid) { snprintf(buffer, 256, "%s: %s", current->filename, current->name); create_monitor_manager(current); if (monitor_manager) { gtk_widget_set_sensitive(refresh_controls_button, TRUE); } else { gtk_widget_set_sensitive(close_button, TRUE); gtk_widget_set_sensitive(choice_hbox, TRUE); } break; } i++; } if (monitor_manager) { gtk_table_attach(GTK_TABLE(table), monitor_manager, 0, 1, mainrow, mainrow+1, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 5, 5); gtk_table_attach(GTK_TABLE(table), profile_manager, 0, 1, mainrow, mainrow+1, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 5, 5); } while (gtk_events_pending ()) gtk_main_iteration (); } if (get_verbosity()) printf("currentid == nextid (%d)\n", currentid); gtk_widget_set_sensitive(widget, TRUE); g_mutex_unlock(combo_change_mutex); } static gboolean window_changed(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data) { if (num_monitor == 2) { // If there are more than two monitors, we need a configuration menu int cx, cy, i; struct monitorlist* current; if (monlist == NULL) { if (get_verbosity()) printf("monlist == NULL\n"); return FALSE; } i = 0; for (current = monlist; current != NULL; current = current->next) i++; if (i != 2) { // Every monitor does not support DDC/CI, or there are more monitors plugged-in //printf("i : %d\n", i); return FALSE; } cx = event->x + (event->width/2); cy = event->y + (event->height/2); i = gdk_screen_get_monitor_at_window(gdk_screen_get_default(), main_app_window->window); if (i != current_monitor) { int k = nextid; if (get_verbosity()) printf(_("Monitor changed (%d %d).\n"), i, k); k = (k == 0) ? 1 : 0; current_monitor = i; gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), k); } //g_warning(_("Could not find the current monitor in Xinerama monitors list.")); } return FALSE; } /* Enable or disable widgets (monitor choice, close/refresh button) */ static void widgets_set_sensitive(gboolean sensitive) { gtk_widget_set_sensitive(choice_hbox, sensitive); gtk_widget_set_sensitive(refresh_controls_button, sensitive && (current_main_component == 0)); gtk_widget_set_sensitive(close_button, sensitive); gtk_widget_set_sensitive(profile_manager_button, sensitive && (current_main_component == 0)); gtk_widget_set_sensitive(saveprofile_button, sensitive); gtk_widget_set_sensitive(cancelprofile_button, sensitive); } void set_current_main_component(int component) { g_assert((component == 0) || (component == 1)); current_main_component = component; if (!monitor_manager) return; if (current_main_component == 0) { gtk_widget_show(monitor_manager); gtk_widget_hide(profile_manager); gtk_widget_set_sensitive(refresh_controls_button, TRUE); gtk_widget_set_sensitive(profile_manager_button, TRUE); } else if (current_main_component == 1) { gtk_widget_hide(monitor_manager); gtk_widget_show(profile_manager); gtk_widget_set_sensitive(refresh_controls_button, FALSE); gtk_widget_set_sensitive(profile_manager_button, FALSE); } } /* Set the status message */ void set_status(char* message) { gtk_label_set_text(GTK_LABEL(statuslabel), message); } static void messagebutton_callback(GtkWidget *widget, gpointer data) { set_message(""); } void set_message(char* message) { set_message_ok(message, 0); } /* Show a message on top of every other controls, with a ok button * if the user can hide it himself. */ void set_message_ok(char* message, int with_ok) { gtk_widget_show(messagebutton); if (!message[0]) { gtk_widget_hide(messagebox); if (monitor_manager) { set_current_main_component(current_main_component); } widgets_set_sensitive(TRUE); return; } gtk_label_set_markup(GTK_LABEL(messagelabel), message); gtk_label_set_selectable(GTK_LABEL(messagelabel), TRUE); widgets_set_sensitive(FALSE); gtk_widget_show(messagebox); if (with_ok) { gtk_widget_show(messagebutton); } else { gtk_widget_hide(messagebutton); } if (monitor_manager) { gtk_widget_hide(monitor_manager); gtk_widget_hide(profile_manager); } while (gtk_events_pending()) gtk_main_iteration(); } static gboolean heartbeat(gpointer data) { ddcpci_send_heartbeat(); return TRUE; } /* Create a new button with an image and a label packed into it * and return the button. */ GtkWidget *stock_label_button(const gchar * stockid, const gchar *label_text, const gchar *tool_tip) { GtkWidget *box; GtkWidget *label = NULL; GtkWidget *image; GtkWidget *button; button = gtk_button_new(); /* Create box for image and label */ box = gtk_hbox_new(FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER (box), 1); /* Now on to the image stuff */ image = gtk_image_new_from_stock(stockid, GTK_ICON_SIZE_BUTTON); gtk_box_pack_start(GTK_BOX(box), image, FALSE, FALSE, 3); gtk_widget_show(image); if (label_text) { /* Create a label for the button */ label = gtk_label_new(label_text); /* Pack the image and label into the box */ gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 3); gtk_widget_show(label); } gtk_widget_show(box); gtk_container_add (GTK_CONTAINER(button), box); g_object_set_data(G_OBJECT(button), "button_label", label); if (tool_tip) { gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), button, tool_tip, NULL); } return button; } static void probe_monitors(GtkWidget *widget, gpointer data) { if (combo_box_changed_handler_id) g_signal_handler_disconnect(G_OBJECT(combo_box), combo_box_changed_handler_id); gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(combo_box)))); set_message(_( "Probing for available monitors..." )); if (widget == NULL) monlist = ddcci_load_list(); else monlist = NULL; if (!monlist) { monlist = ddcci_probe(); ddcci_save_list(monlist); } struct monitorlist* current; char buffer[256]; for (current = monlist; current != NULL; current = current->next) { snprintf(buffer, 256, "%s: %s", current->filename, current->name); gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), buffer); } combo_box_changed_handler_id = g_signal_connect(G_OBJECT(combo_box), "changed", G_CALLBACK(combo_change), NULL); currentid = -1; nextid = -1; if (monlist) { widgets_set_sensitive(TRUE); gtk_combo_box_set_active(GTK_COMBO_BOX(combo_box), 0); } else { widgets_set_sensitive(FALSE); gtk_widget_set_sensitive(close_button, TRUE); gtk_widget_set_sensitive(refresh_controls_button, TRUE); set_message(_( "No monitor supporting DDC/CI available.\n\n" "If your graphics card need it, please check all the required kernel modules are loaded (i2c-dev, and your framebuffer driver)." )); } } int main( int argc, char *argv[] ) { int i, verbosity = 0; mon = NULL; monitor_manager = NULL; #ifdef HAVE_GETTEXT setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain("ddccontrol-db", LOCALEDIR); bind_textdomain_codeset(PACKAGE, "UTF-8"); bind_textdomain_codeset("ddccontrol-db", "UTF-8"); textdomain(PACKAGE); #endif while ((i=getopt(argc,argv,"v")) >= 0) { switch(i) { case 'v': verbosity++; break; } } ddcci_verbosity(verbosity); gtk_init(&argc, &argv); g_thread_init(NULL); combo_change_mutex = g_mutex_new(); tooltips = gtk_tooltips_new(); /* Full screen patterns test */ /*create_fullscreen_patterns_window(); show_pattern(); gtk_main();*/ if (!ddcci_init(NULL)) { printf(_("Unable to initialize ddcci library.\n")); GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(main_app_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("Unable to initialize ddcci library, see console for more details.\n")); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); return 1; } g_timeout_add( IDLE_TIMEOUT*1000, heartbeat, NULL ); gtk_window_set_default_icon_name ("gddccontrol"); main_app_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(main_app_window),_("Monitor settings")); gtk_window_set_default_size(GTK_WINDOW(main_app_window), 500, 500); gtk_window_set_position (GTK_WINDOW (main_app_window), GTK_WIN_POS_CENTER); g_signal_connect (G_OBJECT (main_app_window), "delete_event", G_CALLBACK (delete_event), NULL); g_signal_connect (G_OBJECT (main_app_window), "destroy", G_CALLBACK (destroy), NULL); g_signal_connect (G_OBJECT (main_app_window), "configure-event", G_CALLBACK (window_changed), NULL); gtk_container_set_border_width (GTK_CONTAINER (main_app_window), 4); table = gtk_table_new(5, 1, FALSE); gtk_widget_show (table); int crow = 0; /* Current row */ /* Monitor choice combo box */ choice_hbox = gtk_hbox_new(FALSE, 10); GtkWidget* label = gtk_label_new(_("Current monitor: ")); gtk_widget_show(label); gtk_box_pack_start(GTK_BOX(choice_hbox),label, 0, 0, 0); combo_box = gtk_combo_box_new_text(); gtk_widget_show(combo_box); gtk_box_pack_start(GTK_BOX(choice_hbox),combo_box, 1, 1, 0); refresh_monitors_button = stock_label_button(GTK_STOCK_REFRESH, NULL, _("Refresh monitor list")); g_signal_connect(G_OBJECT(refresh_monitors_button), "clicked", G_CALLBACK(probe_monitors), NULL); gtk_widget_show(refresh_monitors_button); gtk_box_pack_start(GTK_BOX(choice_hbox),refresh_monitors_button, 0, 0, 0); gtk_table_attach(GTK_TABLE(table), choice_hbox, 0, 1, crow, crow+1, GTK_FILL_EXPAND, 0, 5, 5); crow++; gtk_widget_show(choice_hbox); GtkWidget* hsep = gtk_hseparator_new(); gtk_widget_show (hsep); gtk_table_attach(GTK_TABLE(table), hsep, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 0, 0); crow++; /* Toolbar (profile...) */ profile_hbox = gtk_hbox_new(FALSE, 10); profile_manager_button = stock_label_button(GTK_STOCK_OPEN, _("Profile manager"), NULL); g_signal_connect(G_OBJECT(profile_manager_button), "clicked", G_CALLBACK(loadprofile_callback), NULL); gtk_box_pack_start(GTK_BOX(profile_hbox), profile_manager_button, 0, 0, 0); gtk_widget_show (profile_manager_button); gtk_widget_set_sensitive(profile_manager_button, FALSE); saveprofile_button = stock_label_button(GTK_STOCK_SAVE, _("Save profile"), NULL); g_signal_connect(G_OBJECT(saveprofile_button), "clicked", G_CALLBACK(saveprofile_callback), NULL); gtk_box_pack_start(GTK_BOX(profile_hbox), saveprofile_button, 0, 0, 0); gtk_widget_set_sensitive(saveprofile_button, FALSE); cancelprofile_button = stock_label_button(GTK_STOCK_SAVE, _("Cancel profile creation"), NULL); g_signal_connect(G_OBJECT(cancelprofile_button), "clicked", G_CALLBACK(cancelprofile_callback), NULL); gtk_box_pack_start(GTK_BOX(profile_hbox), cancelprofile_button, 0, 0, 0); gtk_widget_set_sensitive(cancelprofile_button, FALSE); gtk_widget_show (profile_hbox); gtk_table_attach(GTK_TABLE(table), profile_hbox, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 8, 8); crow++; hsep = gtk_hseparator_new(); gtk_widget_show (hsep); gtk_table_attach(GTK_TABLE(table), hsep, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 0, 0); crow++; /* Status message label (used when loading or refreshing, or when displaying some kind of warnings) */ messagebox = gtk_vbox_new(FALSE, 10); messagelabel = gtk_label_new (""); gtk_label_set_line_wrap(GTK_LABEL(messagelabel), TRUE); gtk_box_pack_start(GTK_BOX(messagebox), messagelabel, 1, 1, 0); gtk_widget_show(messagelabel); GtkWidget* messagealign = gtk_alignment_new(0.5, 0.5, 0, 0); messagebutton = stock_label_button(GTK_STOCK_OK, _("OK"), NULL); g_signal_connect(G_OBJECT(messagebutton), "clicked", G_CALLBACK(messagebutton_callback), NULL); gtk_container_add(GTK_CONTAINER(messagealign), messagebutton); gtk_widget_show(messagebutton); gtk_box_pack_start(GTK_BOX(messagebox), messagealign, 0, 0, 10); gtk_widget_show(messagealign); gtk_table_attach(GTK_TABLE(table), messagebox, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 5, 5); mainrow = crow; crow++; hsep = gtk_hseparator_new(); gtk_widget_show (hsep); gtk_table_attach(GTK_TABLE(table), hsep, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 0, 0); crow++; /* Refresh and close buttons */ bottom_hbox = gtk_hbox_new(FALSE, 10); statuslabel = gtk_label_new(""); gtk_label_set_line_wrap(GTK_LABEL(statuslabel), TRUE); gtk_box_pack_start(GTK_BOX(bottom_hbox),statuslabel, TRUE, TRUE, 0); gtk_widget_show(statuslabel); GtkWidget* align = gtk_alignment_new(1, 0.5, 0, 0); GtkWidget* br_hbox = gtk_hbox_new(FALSE, 30); refresh_controls_button = stock_label_button(GTK_STOCK_REFRESH, _("Refresh"), _("Refresh all controls")); g_signal_connect(G_OBJECT(refresh_controls_button),"clicked",G_CALLBACK (refresh_all_controls), NULL); gtk_box_pack_start(GTK_BOX(br_hbox),refresh_controls_button,0,0,0); gtk_widget_show (refresh_controls_button); gtk_widget_set_sensitive(refresh_controls_button, FALSE); close_button = stock_label_button(GTK_STOCK_CLOSE, _("Close"), NULL); g_signal_connect(G_OBJECT(close_button),"clicked",G_CALLBACK (destroy), NULL); gtk_box_pack_start(GTK_BOX(br_hbox),close_button,0,0,0); gtk_widget_show (close_button); gtk_container_add(GTK_CONTAINER(align),br_hbox); gtk_widget_show (br_hbox); gtk_widget_show (align); gtk_box_pack_start(GTK_BOX(bottom_hbox),align, TRUE, TRUE,0); gtk_widget_show (bottom_hbox); gtk_table_attach(GTK_TABLE(table), bottom_hbox, 0, 1, crow, crow+1, GTK_FILL_EXPAND, GTK_SHRINK, 8, 8); crow++; gtk_container_add (GTK_CONTAINER(main_app_window), table); gtk_widget_show(main_app_window); GdkScreen* screen = gdk_screen_get_default(); num_monitor = gdk_screen_get_n_monitors(screen); /*for (i = 0; i < nscreen; i++) { GdkRectangle dest; gdk_screen_get_monitor_geometry(screen, i, &dest); printf("%d: %d, %d %dx%d\n", nscreen, dest.x, dest.y, dest.width, dest.height); }*/ current_monitor = gdk_screen_get_monitor_at_window(screen, main_app_window->window); probe_monitors(NULL, NULL); /* moninfo = gtk_label_new (); gtk_misc_set_alignment(GTK_MISC(moninfo), 0, 0); gtk_table_attach(GTK_TABLE(table), moninfo, 0, 1, 1, 2, GTK_FILL_EXPAND, 0, 5, 5);*/ gchar* tmp = g_strdup_printf(_("Welcome to gddccontrol %s."), VERSION); set_status(tmp); g_free(tmp); gtk_main(); delete_monitor_manager(); ddcci_free_list(monlist); ddcci_release(); return 0; } ddccontrol-0.4.4/src/gddccontrol/notebook.c000066400000000000000000000531501327040342400207320ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2004-2005 by Nicolas Boichat * * nicolas@boichat.ch * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #include "config.h" #include #include #include #include #include #include #include #include "notebook.h" #include "internal.h" #define GTK_FILL_EXPAND (GtkAttachOptions)(GTK_FILL|GTK_EXPAND) #define RETRYS 5 // number of read retrys enum { TITLE_COL, ID_COL, WIDGET_COL, N_COLS, }; // Protos //////////////////// static void change_control_value(GtkWidget *widget, gpointer nval); // Globals //////////////////// int modified; GSList *all_controls; int refreshing = 0; // Helpers //////////////////// static void get_value_and_max(struct control_db *control, unsigned short *currentValue, unsigned short *currentMaximum) { int retry = 1; if (control->type != command) { for(retry = RETRYS; retry; retry--) { if (ddcci_readctrl(mon, control->address, currentValue, currentMaximum) >= 0) { break; } usleep(20000); } } if(!retry) { GtkWidget* dialog = gtk_message_dialog_new( GTK_WINDOW(main_app_window), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s: %s", _("Error while getting value"), control->name); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } } short get_control_max(struct control_db *control) { GSList* list = all_controls; while (list) { struct control_db *control_db = (struct control_db*)g_object_get_data(G_OBJECT(list->data), "ddc_control"); if (control == control_db) { return (short)(long)g_object_get_data(G_OBJECT(list->data), "ddc_max"); } list = g_slist_next(list); } return 0; } // Callbacks //////////////////// void refresh_all_controls(GtkWidget *widget, gpointer data) { /* Maybe we could lock a Mutex here, but I don't think it is really necessary... */ gtk_widget_set_sensitive(refresh_controls_button, FALSE); int current = 0; int count = g_slist_length(all_controls); GSList* list = all_controls; unsigned short currentValue = 1; unsigned short currentMaximum = 1; gchar* tmp = g_strdup_printf(_("Refreshing controls values (%d%%)..."), (current*100)/count); set_message(tmp); g_free(tmp); refreshing = 1; /* Tell callbacks not to write values back to the monitor. */ while (list) { struct control_db *control = (struct control_db*)g_object_get_data(G_OBJECT(list->data), "ddc_control"); if (control) { if (control->type != command) { get_value_and_max(control, ¤tValue, ¤tMaximum); change_control_value(list->data, (gpointer)(long)currentValue); } gchar* tmp = g_strdup_printf(_("Refreshing controls values (%d%%)..."), (current*100)/count); set_message(tmp); g_free(tmp); } else { g_warning(_("Could not get the control_db struct related to a control.")); } list = g_slist_next(list); current++; } refreshing = 0; set_message(""); gtk_widget_set_sensitive(refresh_controls_button, TRUE); } static void change_control_value(GtkWidget *widget, gpointer nval) { struct control_db *control = (struct control_db*)g_object_get_data(G_OBJECT(widget),"ddc_control"); /* No control found on the widget, we are probably on an item of a group (list) */ if (control == NULL) { GtkWidget *parent = gtk_widget_get_parent(widget); control = (struct control_db*)g_object_get_data(G_OBJECT(parent),"ddc_control"); if ((control) && (control->type == list)) { struct value_db *value = (struct value_db*)g_object_get_data(G_OBJECT(widget), "ddc_value"); unsigned short val = value->value; gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), (long)nval == val); } return; } switch(control->type) { case value: { unsigned long Maximum = (unsigned long) g_object_get_data(G_OBJECT(widget),"ddc_max"); gtk_range_set_increments(GTK_RANGE(widget), 100.0/(double)Maximum, 10.0*100.0/(double)Maximum); gtk_range_set_value(GTK_RANGE(widget), 100.0*(double)(long)nval/(double)Maximum); break; } case command: break; case list: gtk_container_foreach(GTK_CONTAINER(widget), change_control_value, nval); break; } } static void range_callback(GtkWidget *widget, gpointer data) { struct control_db *control = (struct control_db*)g_object_get_data(G_OBJECT(widget),"ddc_control"); if (!control) { return; } GtkWidget* button = (GtkWidget*)g_object_get_data(G_OBJECT(widget),"restore_button"); g_return_if_fail(button); double val = gtk_range_get_value(GTK_RANGE(widget))/100.0; unsigned long Default = (unsigned long) g_object_get_data(G_OBJECT(widget),"ddc_default"); unsigned long Maximum = (unsigned long) g_object_get_data(G_OBJECT(widget),"ddc_max"); #if 0 printf("Would change %#x to %#x (%f, %f, %#x)\n", control->address, (unsigned char)round(val*(double)Maximum), val*(double)Maximum, val, Maximum); #endif unsigned short nval = (unsigned short)round(val*(double)Maximum); if (!refreshing) ddcci_writectrl(mon, control->address, nval, control->delay); gtk_range_set_value(GTK_RANGE(widget), (double)100.0*nval/(double)Maximum); gtk_widget_set_sensitive(GTK_WIDGET(button), nval != Default); modified = 1; } static void group_callback(GtkWidget *widget, gpointer data) { struct value_db *value = (struct value_db*)g_object_get_data(G_OBJECT(widget), "ddc_value"); g_return_if_fail(value); GtkWidget *parent = gtk_widget_get_parent(widget); g_return_if_fail(parent); struct control_db *control = (struct control_db*)g_object_get_data(G_OBJECT(parent),"ddc_control"); if (!control) { return; } GtkWidget* button = (GtkWidget*)g_object_get_data(G_OBJECT(parent),"restore_button"); g_return_if_fail(button); unsigned long Default = (unsigned long) g_object_get_data(G_OBJECT(parent),"ddc_default"); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { unsigned short val = value->value; #if 0 printf("Would change %#x to %#x\n", currentControl->address, val); #endif if (control) { if (!refreshing) ddcci_writectrl(mon, control->address, val, control->delay); gtk_widget_set_sensitive(GTK_WIDGET(button), val != Default); modified = 1; /* Refresh if needed */ if (control->refresh == all) { refresh_all_controls(NULL, NULL); } } } } static void command_callback(GtkWidget *widget, gpointer data) { struct value_db *value = (struct value_db*) data; struct control_db *control = (struct control_db*)g_object_get_data(G_OBJECT(widget),"ddc_control"); unsigned short val; val = value->value; #if 0 printf("Would change %#x to %#x\n", currentControl->address, val); #endif if (control) { ddcci_writectrl(mon, control->address, val, control->delay); modified = 1; /* Refresh if needed */ if (control->refresh == all) { refresh_all_controls(NULL, NULL); } } //g_slist_foreach(all_controls,refresh_control,0); } static void restore_callback(GtkWidget *widget, gpointer data) { GtkWidget* cwidget = (GtkWidget*)data; unsigned long Default = (unsigned long) g_object_get_data(G_OBJECT(cwidget),"ddc_default"); struct control_db *control = (struct control_db*)g_object_get_data(G_OBJECT(cwidget),"ddc_control"); if (control) { ddcci_writectrl(mon, control->address, Default, control->delay); change_control_value(cwidget, (gpointer)Default); } } static void tree_selection_changed_callback(GtkTreeSelection *selection, gpointer data) { GtkTreeIter iter; GtkTreeModel *model; gint id; GtkWidget *notebook; if (gtk_tree_selection_get_selected(selection, &model, &iter)) { gtk_tree_model_get(model,&iter,ID_COL,&id,-1); gtk_tree_model_get(model,&iter,WIDGET_COL,¬ebook,-1); gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook),id); } } // Initializers //////////////////// void show_profile_checks(gboolean show) { GSList* list = all_controls; while (list) { GtkWidget* check_frame = (GtkWidget*)g_object_get_data(G_OBJECT(list->data), "check_frame"); GtkWidget* check = (GtkWidget*)g_object_get_data(G_OBJECT(list->data), "check"); if (check_frame) { if (show) gtk_widget_show(check_frame); else gtk_widget_hide(check_frame); } if (check && show) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), FALSE); } list = g_slist_next(list); } } /* returns: Number of selected controls */ int get_profile_checked_controls(unsigned char* controls) { int current = 0; GSList* list = all_controls; struct control_db *control; while (list) { GtkWidget* check = (GtkWidget*)g_object_get_data(G_OBJECT(list->data), "check"); if (check) { if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check))) { control = (struct control_db*)g_object_get_data(G_OBJECT(list->data), "ddc_control"); controls[current] = control->address; current++; } } list = g_slist_next(list); } return current; } static void createControl(GtkWidget *parent,struct control_db *control) { unsigned short currentDefault = 1; unsigned short currentMaximum = 1; if (control->type != command) get_value_and_max(control,¤tDefault,¤tMaximum); GtkWidget* hbox = gtk_hbox_new(FALSE,0); GtkWidget *widget = NULL; GtkWidget *button = NULL; GtkWidget *check_frame = NULL; /* Frame around the check */ GtkWidget *check = NULL; switch (control->type) { case value: case list: button = gtk_button_new(); GtkWidget *image = gtk_image_new_from_stock(GTK_STOCK_UNDO, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(image); gtk_container_add(GTK_CONTAINER(button), image); gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE); check_frame = gtk_frame_new(NULL); check = gtk_check_button_new(); image = gtk_image_new_from_stock(GTK_STOCK_SAVE, GTK_ICON_SIZE_LARGE_TOOLBAR); gtk_widget_show(image); gtk_container_add(GTK_CONTAINER(check), image); gtk_widget_show(check); gtk_container_add(GTK_CONTAINER(check_frame),check); break; default: button = NULL; break; } switch (control->type) { case value: { widget = gtk_hscale_new_with_range(0.0, 100.0, 1.0); gtk_scale_set_digits(GTK_SCALE(widget), 1); g_object_set_data(G_OBJECT(widget), "ddc_default", (gpointer)(long)currentDefault); g_object_set_data(G_OBJECT(widget), "ddc_max", (gpointer)(long)currentMaximum); g_object_set_data(G_OBJECT(widget), "restore_button", button); g_object_set_data(G_OBJECT(widget), "check_frame", check_frame); g_object_set_data(G_OBJECT(widget), "check", check); gtk_range_set_increments(GTK_RANGE(widget), 100.0/(double)currentMaximum, 100.0/(double)currentMaximum); gtk_range_set_value(GTK_RANGE(widget), (double)100.0*currentDefault/(double)currentMaximum); g_signal_connect_after(G_OBJECT(widget), "change-value", G_CALLBACK(range_callback), NULL); } break; case command: { widget = gtk_vbox_new(TRUE, 0); struct value_db* value; for (value = control->value_list; value != NULL; value = value->next) { GtkWidget* button = gtk_button_new_with_label((char*)value->name); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(command_callback),value); g_object_set_data(G_OBJECT(button),"ddc_control",control); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(widget), button, FALSE, FALSE, 5); } } break; case list: { widget = gtk_vbox_new(TRUE, 0); struct value_db* value; GSList* group = NULL; for (value = control->value_list; value != NULL; value = value->next) { GtkWidget* radio = gtk_radio_button_new_with_label(group, (char*)value->name); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), (value->value == currentDefault)); g_object_set_data(G_OBJECT(radio), "ddc_value", value); gtk_widget_show(radio); gtk_box_pack_start(GTK_BOX(widget), radio, TRUE, TRUE, 0); group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); g_signal_connect(G_OBJECT(radio), "toggled", G_CALLBACK(group_callback), NULL); } g_object_set_data(G_OBJECT(widget), "ddc_default", (gpointer)(long)currentDefault); g_object_set_data(G_OBJECT(widget), "restore_button", button); g_object_set_data(G_OBJECT(widget), "check_frame", check_frame); g_object_set_data(G_OBJECT(widget), "check", check); break; } default: return; } if (check) { //gtk_widget_show(check_frame); gtk_box_pack_start(GTK_BOX(hbox), check_frame, 0, 0, 0); } all_controls = g_slist_append(all_controls,widget); g_object_set_data(G_OBJECT(widget), "ddc_control", control); /*g_print("%i - %i\n",all_controls,g_slist_length(all_controls));*/ gtk_widget_show(widget); gtk_box_pack_start(GTK_BOX(hbox), widget, 1, 1, 0); if (button) { g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(restore_callback), widget); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(hbox), button, 0, 0, 0); } gtk_widget_show(hbox); gtk_container_add(GTK_CONTAINER(parent),hbox); } static void createPage(GtkWidget* notebook, struct subgroup_db* subgroup) { int i=0; GtkWidget* mainvbox = gtk_vbox_new(FALSE,10); GtkWidget* vbox = gtk_vbox_new(FALSE,10); GtkWidget* frame; struct control_db* control; for (control = subgroup->control_list; control != NULL; control = control->next) { frame = gtk_frame_new((char*)control->name); gtk_container_set_border_width(GTK_CONTAINER(frame),5); createControl(frame,control); gtk_widget_show(frame); gtk_box_pack_start(GTK_BOX(vbox),frame,0,0,0); i++; } if (subgroup->pattern) { GtkWidget* align = gtk_alignment_new(0.5, 0, 0, 0); GtkWidget* button = stock_label_button(GTK_STOCK_FULLSCREEN, _("Show fullscreen patterns"), NULL); gtk_widget_show(button); gtk_container_add(GTK_CONTAINER(align), button); gtk_widget_show(align); gtk_box_pack_end(GTK_BOX(mainvbox), align, TRUE, 5, 5); g_object_set_data(G_OBJECT(button), "pattern", subgroup->pattern); g_object_set_data(G_OBJECT(button), "mainvbox", mainvbox); g_object_set_data(G_OBJECT(button), "vbox", vbox); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(fullscreen_callback), value); } gtk_box_pack_start(GTK_BOX(mainvbox), vbox, 0, 5, 5); gtk_widget_show(vbox); GtkWidget* label; label = gtk_label_new((char*)subgroup->name); gtk_widget_show(label); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), mainvbox, label); gtk_widget_show(mainvbox); } static GtkWidget* createTree(GtkWidget *notebook) { GtkTreeStore *store = gtk_tree_store_new(N_COLS,G_TYPE_STRING,G_TYPE_INT,G_TYPE_POINTER); GtkWidget *tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); g_object_unref(G_OBJECT(store)); GtkCellRenderer *renderer; GtkTreeViewColumn *column; renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes(_("Section"),renderer,"text",TITLE_COL,NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree),column); GtkTreeIter top_iter; GtkTreeIter sub_iter; struct group_db* group; struct subgroup_db* subgroup; if (mon->db) { int id = 1; for (group = mon->db->group_list; group != NULL; group = group->next) { gtk_tree_store_append(store,&top_iter,NULL); gtk_tree_store_set(store,&top_iter,TITLE_COL,group->name,ID_COL,0,WIDGET_COL,notebook,-1); for (subgroup = group->subgroup_list; subgroup != NULL; subgroup = subgroup->next) { gtk_tree_store_append(store,&sub_iter,&top_iter); gtk_tree_store_set(store,&sub_iter,TITLE_COL,subgroup->name,ID_COL,id,WIDGET_COL,notebook,-1); id++; } } } gtk_tree_view_expand_all(GTK_TREE_VIEW(tree)); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree),0); // gtk_container_set_border_width(GTK_CONTAINER(tree),1); GtkTreeSelection *select; select = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree)); gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE); g_signal_connect (G_OBJECT (select), "changed", G_CALLBACK (tree_selection_changed_callback), NULL); return tree; } void create_monitor_manager(struct monitorlist* monitor) { modified = 0; all_controls = NULL; if (!monitor->supported) { set_message(_( "The current monitor is in the database but does not supports " "DDC/CI.\n\nThis often occurs when you connect the VGA/DVI cable " "on the wrong input of monitors supporting DDC/CI only on one of " "its two inputs.\n\n" "If your monitor has two inputs, please try to connect the cable " "to the other input, and then click on the refresh button near " "the monitor list.")); monitor_manager = NULL; return; } gchar* tmp = g_strdup_printf(_("Opening the monitor device (%s)..."), monitor->filename); set_message(tmp); g_free(tmp); mon = malloc(sizeof(struct monitor)); if (ddcci_open(mon, monitor->filename, 0) < 0) { set_message(_( "An error occurred while opening the monitor device.\n" "Maybe this monitor was disconnected, please click on " "the refresh button near the monitor list.")); monitor_manager = NULL; return; } if (!mon->db) { tmp = g_strdup_printf(_( "The current monitor is not supported, please run\n" "%s\n" "and send the output to ddccontrol-users@lists.sourceforge.net.\n" "Thanks."), "LANG= LC_ALL= ddccontrol -p -c -d"); set_message(tmp); g_free(tmp); monitor_manager = NULL; return; } GtkWidget *notebook = gtk_notebook_new(); struct group_db* group; struct subgroup_db* subgroup; GtkWidget *tree = createTree(notebook); ////////////////////////////// GtkWidget* none = gtk_table_new(1, 1, TRUE); GtkWidget *valuelabel = gtk_label_new (_("Please click on a group name.")); gtk_table_attach(GTK_TABLE(none), valuelabel, 0, 1, 0, 1, GTK_FILL_EXPAND, GTK_EXPAND, 5, 5); GtkWidget *label = gtk_label_new("zero"); gtk_widget_show(valuelabel); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), none, label); gtk_widget_show(none); ///////////////////////////// if (mon->db) { int count = 0, current = 0; for (group = mon->db->group_list; group != NULL; group = group->next) { for (subgroup = group->subgroup_list; subgroup != NULL; subgroup = subgroup->next) count++; } gchar* tmp = g_strdup_printf(_("Getting controls values (%d%%)..."), (current*100)/count); set_message(tmp); g_free(tmp); for (group = mon->db->group_list; group != NULL; group = group->next) { gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook),0); // gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook),0); for (subgroup = group->subgroup_list; subgroup != NULL; subgroup = subgroup->next) { createPage(notebook, subgroup); current++; gchar* tmp = g_strdup_printf(_("Getting controls values (%d%%)..."), (current*100)/count); set_message(tmp); g_free(tmp); } } } GtkWidget* table = gtk_table_new(2, 1, FALSE); gtk_widget_show (tree); gtk_table_attach(GTK_TABLE(table), tree, 0, 1, 0, 1, 0, GTK_FILL_EXPAND, 3, 0); gtk_widget_show (notebook); gtk_table_attach(GTK_TABLE(table), notebook, 1, 2, 0, 1, GTK_FILL_EXPAND, GTK_FILL_EXPAND, 3, 0); gtk_widget_show (table); set_message(_("Loading profiles...")); ddcci_get_all_profiles(mon); create_profile_manager(); monitor_manager = table; if (mon->fallback) { /* Put a big warning. */ gchar* message; if (mon->fallback == 1) { message = g_strdup(_( "There is no support for your monitor in the database, but ddccontrol is " "using a generic profile for your monitor's manufacturer. Some controls " "may not be supported, or may not work as expected.\n")); } else { /*if (mon->fallback == 2) {*/ message = g_strdup(_( "There is no support for your monitor in the database, but ddccontrol is " "using a basic generic profile. Many controls will not be supported, and " "some controls may not work as expected.\n")); } gchar* tmp = g_strconcat("", _("Warning!"), "\n\n", message, _( "Please update ddccontrol-db, or, if you are already using the latest " "version, please send the output of the following command to " "ddccontrol-users@lists.sourceforge.net:\n" ), "\nLANG= LC_ALL= ddccontrol -p -c -d\n\n", _("Thank you.\n"), NULL); gtk_widget_show(monitor_manager); set_message_ok(tmp, 1); g_free(message); g_free(tmp); } else { set_message(""); gtk_widget_show(monitor_manager); } } // Cleanup //////////////////// void delete_monitor_manager() { if (mon) { if (modified) ddcci_save(mon); ddcci_close(mon); free(mon); g_slist_free(all_controls); } if (profile_manager) { gtk_widget_destroy(profile_manager); profile_manager = NULL; } } ddccontrol-0.4.4/src/gddccontrol/notebook.h000066400000000000000000000065531327040342400207440ustar00rootroot00000000000000/*************************************************************************** * Copyright (C) 2004-2005 by Nicolas Boichat * * nicolas@boichat.ch * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifndef NOTEBOOK_H #define NOTEBOOK_H #include "config.h" #include #include #include "ddcci.h" #include "monitor_db.h" #include "conf.h" /* constants */ #define GTK_FILL_EXPAND (GtkAttachOptions)(GTK_FILL|GTK_EXPAND) #ifndef GTK_STOCK_EDIT /* GTK <2.6 */ #define GTK_STOCK_EDIT GTK_STOCK_PREFERENCES #endif #ifndef GTK_STOCK_FULLSCREEN /* GTK <2.8 */ #define GTK_STOCK_FULLSCREEN GTK_STOCK_EXECUTE #endif /* globals */ struct monitor* mon; GtkWidget* main_app_window; GtkWidget* monitor_manager; GtkWidget* profile_manager; /* notebook.c */ void create_monitor_manager(struct monitorlist* monitor); void delete_monitor_manager(); void show_profile_checks(gboolean show); int get_profile_checked_controls(unsigned char* controls); void refresh_all_controls(GtkWidget *widget, gpointer nval); short get_control_max(struct control_db *control); /* gprofile.c */ void create_profile_manager(); void saveprofile_callback(GtkWidget *widget, gpointer data); void cancelprofile_callback(GtkWidget *widget, gpointer data); void show_profile_information(struct profile* profile, gboolean new_profile); /* fspatterns.c */ void fullscreen_callback(GtkWidget *widget, gpointer data); /* main.c */ /* Set what is now displayed at the center of the main window: * 0 - Monitor manager * 1 - Profile manager */ void set_current_main_component(int component); /* Set the status message */ void set_status(char* message); /* Show a message on top of every other controls. */ void set_message(char* message); void set_message_ok(char* message, int with_ok); GtkWidget *stock_label_button(const gchar * stockid, const gchar *label_text, const gchar *tool_tip); GtkWidget* profile_manager_button; GtkWidget* saveprofile_button; GtkWidget* cancelprofile_button; GtkWidget* refresh_controls_button; /* Multimonitor support */ int current_monitor; /* current monitor */ int num_monitor; /* total number of monitors */ #endif //NOTEBOOK_H ddccontrol-0.4.4/src/gnome-ddcc-applet/000077500000000000000000000000001327040342400177235ustar00rootroot00000000000000ddccontrol-0.4.4/src/gnome-ddcc-applet/GNOME_ddcc-applet.server.in.in000066400000000000000000000024051327040342400252730ustar00rootroot00000000000000 ddccontrol-0.4.4/src/gnome-ddcc-applet/GNOME_ddcc-applet.xml000066400000000000000000000010571327040342400235550ustar00rootroot00000000000000 ddccontrol-0.4.4/src/gnome-ddcc-applet/Makefile.am000066400000000000000000000015141327040342400217600ustar00rootroot00000000000000 localedir = $(datadir)/locale AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_srcdir)/src -DLOCALEDIR=\"$(localedir)\" DDCC_LDADD = ../lib/libddccontrol.la EXTRA_DIST = GNOME_ddcc-applet.server.in.in GNOME_ddcc-applet.xml applet_PROGRAMS = ddcc-applet appletdir = $(libexecdir) ddcc_applet_SOURCES = ddcc-applet.c ddcc-applet.h ddcc_applet_LDADD = $(GNOME_LDFLAGS) $(DDCC_LDADD) AM_CFLAGS = $(GNOME_CFLAGS) '-DPKGDATADIR="$(pkgdatadir)"' pkgdata_DATA = GNOME_ddcc-applet.xml serverdir = $(libdir)/bonobo/servers server_in_files = GNOME_ddcc-applet.server.in server_DATA = $(server_in_files:.server.in=.server) $(server_in_files): $(server_in_files:.server.in=.server.in.in) Makefile $(AM_V_GEN)sed \ -e "s|\@appletdir\@|$(appletdir)|" \ $< > $@ CLEANFILES = $(server_in_files) $(server_DATA) @INTLTOOL_SERVER_RULE@ ddccontrol-0.4.4/src/gnome-ddcc-applet/ddcc-applet.c000066400000000000000000000330661327040342400222570ustar00rootroot00000000000000/* gnome-ddcc-applet * Copyright (C) 2005 Christian Schilling * * 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, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ /* **************** * Includes * ****************/ /* config */ #include "config.h" /* libddccontrol */ #include "ddcci.h" #include "conf.h" /* libc */ #include #include /* GNOME */ #include #include #include /* private */ #include "ddcc-applet.h" /* libddccontrol ipc */ #include "ddcpci-ipc.h" #define GETTEXT_PACKAGE PACKAGE #define GNOMELOCALEDIR LOCALEDIR /* **************** * Constants * ****************/ /* Popup menu on the applet */ static const BonoboUIVerb ddccapplet_applet_menu_verbs[] = { BONOBO_UI_UNSAFE_VERB ("DdccAppletProperties", menu_properties_cb), BONOBO_UI_UNSAFE_VERB ("DdccAppletRunGddcontrol", menu_rungdcc_cb), BONOBO_UI_UNSAFE_VERB ("DdccAppletAbout", menu_about_cb), BONOBO_UI_VERB_END }; /* **************** * Helpers * ****************/ /* display [msg] as popup errormessage */ static void error_msg (char *msg) { GtkWidget* dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, msg); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } /* makes the menu appear next to the widget [user_data] * instead off right under the cursor */ static void position_menu ( GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { GtkWidget *widget = GTK_WIDGET (user_data); GdkScreen *screen; gint twidth, theight, tx, ty; GtkTextDirection direction; GdkRectangle monitor; gint monitor_num; g_return_if_fail (menu != NULL); g_return_if_fail (x != NULL); g_return_if_fail (y != NULL); if (push_in) *push_in = FALSE; direction = gtk_widget_get_direction (widget); twidth = GTK_WIDGET (menu)->requisition.width; theight = GTK_WIDGET (menu)->requisition.height; screen = gtk_widget_get_screen (GTK_WIDGET (menu)); monitor_num = gdk_screen_get_monitor_at_window (screen, widget->window); if (monitor_num < 0) monitor_num = 0; gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor); if (!gdk_window_get_origin (widget->window, &tx, &ty)) { g_warning ("Menu not on screen"); return; } tx += widget->allocation.x; ty += widget->allocation.y; if (direction == GTK_TEXT_DIR_RTL) tx += widget->allocation.width - twidth; if ((ty + widget->allocation.height + theight) <= monitor.y + monitor.height) ty += widget->allocation.height; else if ((ty - theight) >= monitor.y) ty -= theight; else if (monitor.y + monitor.height - (ty + widget->allocation.height) > ty) ty += widget->allocation.height; else ty -= theight; *x = CLAMP (tx, monitor.x, MAX (monitor.x, monitor.x + monitor.width - twidth)); *y = ty; gtk_menu_set_monitor (menu, monitor_num); } /* sends heartbeat message to ddcpci, so it does not time out */ static gboolean heartbeat (gpointer data) { ddcpci_send_heartbeat(); return TRUE; } /* **************** * Callbacks * ****************/ /* called when the user selects the "Properties..." entry from the menu * shows (not creates!) the properties dialog */ static void menu_properties_cb (BonoboUIComponent *uic, DdccApplet *applet, const gchar *verbname) { gtk_widget_show(applet->w_properties_dialog); } /* runs the gddccontrol programm */ static void menu_rungdcc_cb (BonoboUIComponent *uic, DdccApplet *applet, const gchar *verbname) { system("gddccontrol &"); } /* shows the about dialog, when the user selects the coresponding * menu entry */ static void menu_about_cb (BonoboUIComponent *uic, DdccApplet *applet, const gchar *verbname) { static const gchar *authors[] = { "Christian Schilling ", NULL }; gtk_show_about_dialog (NULL, "name", _("Monitor Profile Switcher"), "version", VERSION, "copyright", "\xC2\xA9 2005 Christian Schilling", "comments", _( "An applet for quick switching of" " monitor profiles.\n" "Based on libddccontrol" " and part of the ddccontrol project.\n" "(http://ddccontrol.sourceforge.net)" ), "authors", authors, NULL); } /* called when the user klicks on the applet */ static gboolean applet_button_cb (GtkWidget *widget, GdkEventButton *event, DdccApplet *applet) { if (event->button == 1) { if (applet->error) ddcc_applet_init(applet); if (applet->error) return FALSE; if (applet->w_profiles_menu) { gtk_menu_popup (GTK_MENU (applet->w_profiles_menu), NULL, NULL, position_menu, applet->w_applet, event->button, event->time); } return TRUE; } return FALSE; } /* called when the user chooses a profile from the profiles menu */ static gboolean change_profile_cb (GtkMenuItem* item, DdccApplet* applet) { struct profile* profile = NULL; profile = g_object_get_data (G_OBJECT (item), "ddcc_profile"); ddcci_apply_profile (profile, applet->monitor); applet->profile = profile; gtk_label_set_label (GTK_LABEL (applet->w_label), (gchar*)profile->name); return FALSE; } /* called when properties window should be closed * in fact, it prevents it from being closed and just hides it */ static gboolean dialog_delete_cb (GtkWidget *widget, GdkEvent *event, DdccApplet* applet) { gtk_widget_hide(applet->w_properties_dialog); return TRUE; } /* does the same as above function */ static gboolean dialog_close_button_cb (GtkWidget *widget, DdccApplet* applet) { gtk_widget_hide(applet->w_properties_dialog); return TRUE; } /* called when the user selects a different monitor, causes some * reinitialisation */ static void monitor_combo_cb (GtkComboBox* widget, DdccApplet* applet) { char buffer[256]; strncpy (buffer, gtk_combo_box_get_active_text (widget), 256); /* FIXME: filename never contains spaces?? */ memset(applet->monitor_name,0,256); strncpy (applet->monitor_name, buffer, strcspn(buffer, " ")-1); if(applet->error < ERR_DDCCI_OPEN) { ddcci_close(applet->monitor); applet->error = ERR_DDCCI_OPEN; } } /* **************** * Cleanup * ****************/ /* called when the main widget is destroyed * (user removes applet from pannel) */ static void destroy_cb (GtkObject* object, DdccApplet* applet) { ddcci_close (applet->monitor); ddcci_release (); if (applet->monitor) free (applet->monitor); g_free (applet); } /* **************** * Initializers * ****************/ /* returns a GtkMenu containing all available profiles for * monitor [mon] */ static int fill_profiles_menu (DdccApplet *applet) { struct profile* profile; GtkWidget* item; if (!ddcci_get_all_profiles (applet->monitor)) return 0; for (profile=applet->monitor->profiles;profile;profile=profile->next) { item = gtk_menu_item_new_with_label ((gchar*)profile->name); g_object_set_data (G_OBJECT (item), "ddcc_profile", profile); g_signal_connect (item, "activate", G_CALLBACK (change_profile_cb), applet); gtk_widget_show (item); gtk_container_add (GTK_CONTAINER (applet->w_profiles_menu), item); } return 1; } /* fills [applet->w_monitor] with entrys for each monitor */ static int fill_monitor_combo (DdccApplet *applet) { struct monitorlist* monlist; struct monitorlist* current; char buffer[256]; if (!(monlist = ddcci_load_list ())) return 0; gtk_list_store_clear ( GTK_LIST_STORE ( gtk_combo_box_get_model ( GTK_COMBO_BOX (applet->w_properties_monitor)))); for (current = monlist; current; current = current->next) { snprintf (buffer, 256, "%s: %s", current->filename, current->name); gtk_combo_box_append_text (GTK_COMBO_BOX ( applet->w_properties_monitor), buffer); } gtk_combo_box_set_active ( GTK_COMBO_BOX (applet->w_properties_monitor), 0); ddcci_free_list (monlist); return 1; } /* initializes the ddccontrol library, if initialisation is already * partly done it's just completed */ static void ddcc_applet_init (DdccApplet* applet) { # define START_INIT() \ switch (applet->error) { \ case ERR_NO_INIT: \ # define TRY_INIT(call_func,err_val,err_msg) \ case err_val: \ if (call_func) { \ error_msg (err_msg); \ applet->error = err_val;\ break; \ } # define FINISH_INIT() \ applet->error = ERR_OK; \ case ERR_OK: # define END_INIT() \ return; } START_INIT() TRY_INIT (!ddcci_init (NULL), ERR_DDCCI_INIT, _("Unable to initialize ddcci library")) TRY_INIT (!fill_monitor_combo (applet), ERR_FILL_MONITOR_COMBO, _("No monitor configuration found." " Please run gddccontrol first")) TRY_INIT (ddcci_open (applet->monitor, applet->monitor_name , 0) < 0, ERR_DDCCI_OPEN, _("An error occurred while" " opening the monitor device")) TRY_INIT (!fill_profiles_menu (applet), ERR_FILL_PROFILES_MENU, _("Can't find any profiles")) FINISH_INIT() if (applet->profile) gtk_label_set_label (GTK_LABEL (applet->w_label), (gchar*)applet->profile->name); else gtk_label_set_label (GTK_LABEL (applet->w_label), "ddcc"); g_timeout_add( IDLE_TIMEOUT*1000, heartbeat, NULL ); END_INIT() /* only reached, if init was not finished */ gtk_label_set_label (GTK_LABEL (applet->w_label), _("error")); # undef START_INIT # undef TRY_INIT # undef FINISH_INIT # undef END_INIT } /* creates the properties dialog */ static void create_properties_dialog (DdccApplet* applet) { GtkWidget* top_hbox; GtkWidget* bottom_hbox; GtkWidget* main_vbox; GtkWidget* close_button; GtkWidget* combo_label; applet->w_properties_dialog = gtk_window_new (GTK_WINDOW_TOPLEVEL); applet->w_properties_monitor = gtk_combo_box_new_text (); close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); main_vbox = gtk_vbox_new (FALSE,10); top_hbox = gtk_hbox_new (FALSE, 10); bottom_hbox = gtk_hbox_new (FALSE, 10); combo_label = gtk_label_new (_("Monitor:")); gtk_window_set_title (GTK_WINDOW (applet->w_properties_dialog), _("Monitor Profile Switcher Properties")); gtk_window_set_position (GTK_WINDOW (applet->w_properties_dialog), GTK_WIN_POS_CENTER); gtk_box_pack_start(GTK_BOX (main_vbox), top_hbox, 0, 0, 10); gtk_box_pack_start(GTK_BOX (main_vbox), bottom_hbox,0, 0, 10); gtk_box_pack_start(GTK_BOX (top_hbox), combo_label, 0, 0, 10); gtk_box_pack_start(GTK_BOX (top_hbox), applet->w_properties_monitor, 0, 0, 10); gtk_box_pack_end(GTK_BOX (bottom_hbox), close_button,0,0,10); gtk_container_add (GTK_CONTAINER (applet->w_properties_dialog), main_vbox); gtk_widget_show (top_hbox); gtk_widget_show (bottom_hbox); gtk_widget_show (main_vbox); gtk_widget_show (close_button); gtk_widget_show (combo_label); gtk_widget_show (applet->w_properties_monitor); g_signal_connect (G_OBJECT (close_button), "clicked", G_CALLBACK (dialog_close_button_cb), applet); } /* main entrance point for the applet */ static int ddcc_applet_main (PanelApplet* root_applet) { DdccApplet* applet; //GtkPixbuff* pixbuf; GtkIconTheme* icon_theme; GtkWidget* icon; GtkWidget* applet_hbox; applet = g_malloc0 (sizeof (DdccApplet)); applet->error = ERR_NO_INIT; applet->monitor = g_malloc (sizeof (struct monitor)); applet->w_applet = root_applet; /* create the label */ applet->w_label = gtk_label_new ("ddcc"); icon_theme = gtk_icon_theme_get_default(); icon = gtk_image_new_from_icon_name ("gddccontrol", GTK_ICON_SIZE_BUTTON); applet_hbox = gtk_hbox_new (FALSE,0); gtk_box_pack_start (GTK_BOX (applet_hbox), icon, 0, 0, 0); gtk_box_pack_start (GTK_BOX (applet_hbox), applet->w_label, 0, 0, 0); gtk_container_add ( GTK_CONTAINER (applet->w_applet), applet_hbox); /* add the popup menu */ panel_applet_setup_menu_from_file(applet->w_applet, PKGDATADIR, "GNOME_ddcc-applet.xml", NULL, ddccapplet_applet_menu_verbs, applet); /* create the profiles menu (its filled later by * fill_profiles_menu ()) */ applet->w_profiles_menu = gtk_menu_new (); /* create the properties dialog */ create_properties_dialog (applet); /* connect all callbacks */ g_signal_connect (G_OBJECT (applet->w_applet), "button-press-event", G_CALLBACK (applet_button_cb), applet); g_signal_connect (G_OBJECT (root_applet), "destroy", G_CALLBACK (destroy_cb), applet); g_signal_connect (G_OBJECT (applet->w_properties_dialog),"delete-event", G_CALLBACK (dialog_delete_cb), applet); g_signal_connect (G_OBJECT (applet->w_properties_monitor), "changed", G_CALLBACK (monitor_combo_cb), applet); /* initialize ddcci lib */ ddcc_applet_init(applet); gtk_widget_show_all (GTK_WIDGET (applet->w_applet)); return TRUE; } /* the bonobo activation factory */ static gboolean ddcc_applet_factory ( PanelApplet *applet, const gchar *iid, gpointer data) { if (strcmp (iid, "OAFIID:GNOME_ddcc-applet")) return FALSE; return ddcc_applet_main (applet); } PANEL_APPLET_BONOBO_FACTORY ("OAFIID:GNOME_ddcc-applet_Factory", PANEL_TYPE_APPLET, "Monitor profile switcher", "0", ddcc_applet_factory, NULL); ddccontrol-0.4.4/src/gnome-ddcc-applet/ddcc-applet.h000066400000000000000000000040141327040342400222530ustar00rootroot00000000000000/* ddcc-applet * Copyright (C) 2005 Christian Schilling * * 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, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA. */ #ifndef __DDCC_APPLET_H__ #define __DDCC_APPLET_H__ /* **************** * Constants * ****************/ /* Errorlevels to indicate how far the initialisation has succeded * and what still needs to be done */ typedef enum _DdccError { ERR_OK = 0, ERR_FILL_PROFILES_MENU, ERR_DDCCI_OPEN, ERR_FILL_MONITOR_COMBO, ERR_DDCCI_INIT, ERR_NO_INIT, } DdccError; /* **************** * Datatypes * ****************/ /* groups all data the applet together, a pointer to an * instance of this is passed to most funktions of the applet */ typedef struct _DdccApplet { PanelApplet* w_applet; GtkWidget* w_label; GtkWidget* w_profiles_menu; GtkWidget* w_properties_dialog; GtkWidget* w_properties_monitor; struct monitor* monitor; char monitor_name[256]; struct profile* profile; DdccError error; } DdccApplet; /* **************** * Protoypes * ****************/ static void ddcc_applet_init (DdccApplet* applet); static void menu_properties_cb(BonoboUIComponent *uic, DdccApplet *applet, const gchar *verbname); static void menu_about_cb(BonoboUIComponent *uic, DdccApplet *applet, const gchar *verbname); static void menu_rungdcc_cb(BonoboUIComponent *uic, DdccApplet *applet, const gchar *verbname); #endif /* __DDCC_APPLET_H__ */ ddccontrol-0.4.4/src/lib/000077500000000000000000000000001327040342400152065ustar00rootroot00000000000000ddccontrol-0.4.4/src/lib/Makefile.am000066400000000000000000000011141327040342400172370ustar00rootroot00000000000000localedir = $(datadir)/locale AM_CFLAGS = -DDDCPCIDIR=\"${pkglibexecdir}\" $(LIBXML2_CFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src -DLOCALEDIR=\"$(localedir)\" pkginclude_HEADERS = conf.h monitor_db.h ddcci.h ddcpci-ipc.h pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = ddccontrol.pc $(pkgconfig_DATA): $(srcdir)/ddccontrol.pc.in $(top_builddir)/config.status lib_LTLIBRARIES = libddccontrol.la libddccontrol_la_SOURCES = ddcci.c ddcci.h monitor_db.c monitor_db.h \ ddcpci-ipc.h i2c-dev.h conf.c conf.h amd_adl.c amd_adl.h internal.h libddccontrol_la_LIBADD = $(LIBXML2_LDFLAGS) ddccontrol-0.4.4/src/lib/amd_adl.c000066400000000000000000000167361327040342400167500ustar00rootroot00000000000000/* ddc/ci interface functions header Copyright(c) 2012 Vitaly V. Bursov (vitaly@bursov.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "config.h" #ifdef HAVE_AMDADL #include #include #include #include #include #include #include #include #include #include #define MAX_DISPLAYS (64) #ifndef LINUX #define LINUX /* not Windows */ #endif #include #include "amd_adl.h" #include "ddcci.h" #include "internal.h" #if 1 # define D(x) #else # define D(x) x #endif struct adl_state { int initialized; void *lib; int (*ADL_Main_Control_Create)(ADL_MAIN_MALLOC_CALLBACK, int ); int (*ADL_Main_Control_Destroy)(); int (*ADL_Adapter_NumberOfAdapters_Get)(int *lpNumAdapters); int (*ADL_Adapter_AdapterInfo_Get)(LPAdapterInfo lpInfo, int iInputSize); int (*ADL_Display_NumberOfDisplays_Get)(int iAdapterIndex, int *lpNumDisplays); int (*ADL_Display_DisplayInfo_Get)(int iAdapterIndex, int *lpNumDisplays, ADLDisplayInfo **lppInfo, int iForceDetect); int (*ADL_Display_DDCBlockAccess_Get)(int iAdapterIndex, int iDisplayIndex, int iOption, int iCommandIndex, int iSendMsgLen, char *lpucSendMsgBuf, int *lpulRecvMsgLen, char *lpucRecvMsgBuf); struct _displays { int adapter_index; int display_index; } displays[MAX_DISPLAYS]; int displays_count; }; static struct adl_state *adl; static void* __stdcall adl_malloc (int size) { void* buffer = malloc (size); if (buffer) memset(buffer, 0, size); return buffer; } static void __stdcall adl_free ( void **buffer ) { if (*buffer != NULL) { free (*buffer); *buffer = NULL; } } int amd_adl_get_displays_count() { if (!adl->initialized) return -1; return adl->displays_count; } int amd_adl_get_display(int idx, int *adapter, int *display) { if (!adl->initialized) return -1; if (idx < 0 || idx >= adl->displays_count) return -1; if (adapter) *adapter = adl->displays[idx].adapter_index; if (display) *display = adl->displays[idx].display_index; return 0; } int amd_adl_check_display(int adapter, int display) { int i; if (!adl->initialized) return -1; for (i=0;idisplays_count;i++){ if (adl->displays[i].adapter_index == adapter && adl->displays[i].display_index == display) return 0; } return -1; } int amd_adl_i2c_read(int adapter, int display, unsigned int addr, unsigned char *buf, unsigned int len) { int res; char wbuf = addr << 1 | 1; res = adl->ADL_Display_DDCBlockAccess_Get(adapter, display, 0, 0, 1, &wbuf, (int*)&len, (char*)buf); D(fprintf(stderr, " >>>>>>>> adl i2c r on %d:%d a %x l %d err %d\n", adapter, display, addr, len, res)); if (res != ADL_OK){ return -1; } return len; } int amd_adl_i2c_write(int adapter, int display, unsigned int addr, unsigned char *buf, unsigned int len) { int res, rlen; char *wbuf = alloca(len+1); wbuf[0] = addr << 1; memcpy(&wbuf[1], buf, len); rlen = 0; res = adl->ADL_Display_DDCBlockAccess_Get(adapter, display, 0, 0, len+1, wbuf, &rlen, NULL); D(fprintf(stderr, " >>>>>>>> adl i2c w on %d:%d a %x l %d err %d\n", adapter, display, addr, len, res)); if (res != ADL_OK){ return -1; } return len; } int amd_adl_init() { int i; int res; int adapters_count; AdapterInfo *adapter_info; adl = adl_malloc(sizeof(struct adl_state)); if (!adl){ fprintf(stderr, "ADL error: malloc failed\n"); return 0; } adl->lib = dlopen("libatiadlxx.so", RTLD_LAZY|RTLD_GLOBAL); if (!adl->lib){ if (get_verbosity()) perror("ADL error: dlopen() failed\n"); return 0; } #define LOADFUNC(_n_) \ do { \ adl->_n_ = dlsym(adl->lib, #_n_); \ if (!adl->_n_) { \ fprintf(stderr, "ADL error: loading symbol %s\n", #_n_); \ return 0; \ } \ } while (0) LOADFUNC(ADL_Main_Control_Create); LOADFUNC(ADL_Main_Control_Destroy); LOADFUNC(ADL_Adapter_NumberOfAdapters_Get); LOADFUNC(ADL_Adapter_AdapterInfo_Get); LOADFUNC(ADL_Display_NumberOfDisplays_Get); LOADFUNC(ADL_Display_DisplayInfo_Get); LOADFUNC(ADL_Display_DDCBlockAccess_Get); #undef LOADFUNC res = adl->ADL_Main_Control_Create(adl_malloc, 1); // retrieve adapter information only for adapters that are physically present and enabled if (res != ADL_OK){ if (get_verbosity()) fprintf(stderr, "Failed to initialize ADL: %d\n", res); return 0; } res = adl->ADL_Adapter_NumberOfAdapters_Get(&adapters_count); if (res != ADL_OK){ if (get_verbosity()) fprintf(stderr, "Failed to get number of ADL adapters: %d\n", res); return 0; } if (adapters_count < 1){ if (get_verbosity()) fprintf(stderr, "No ADL adapters found.\n"); return 0; } adapter_info = adl_malloc(sizeof(AdapterInfo) * adapters_count); if (!adapter_info){ fprintf(stderr, "ADL error: malloc failed\n"); return 0; } res = adl->ADL_Adapter_AdapterInfo_Get(adapter_info, sizeof(AdapterInfo) * adapters_count); if (res != ADL_OK){ fprintf(stderr, "Failed to get ADL adapters info: %d\n", res); return 0; } for (i=0;iADL_Display_DisplayInfo_Get(aidx, &numdisplays, &display_info, 1) != ADL_OK) { printf("adl error: ADL_Display_DisplayInfo_Get: %d\n", res); continue; } D(printf("\t ================================\n")); D(printf("\t %d: %s - %s %d %x:%x.%x %s\n", adapter_info[i].iAdapterIndex, adapter_info[i].strAdapterName, adapter_info[i].strDisplayName, adapter_info[i].iPresent, adapter_info[i].iBusNumber, adapter_info[i].iDeviceNumber, adapter_info[i].iFunctionNumber, adapter_info[i].strUDID)); for (j=0;jdisplays[adl->displays_count].adapter_index = aidx; adl->displays[adl->displays_count].display_index = didx; adl->displays_count++; if (adl->displays_count >= MAX_DISPLAYS){ break; } } } adl_free((void**)&display_info); if (adl->displays_count >= MAX_DISPLAYS){ break; } } adl_free((void**)&adapter_info); D(fprintf(stderr, "adl initialized, %d displays\n", adl->displays_count)); adl->initialized = 1; return 1; } void amd_adl_free() { if (!adl) return; adl->ADL_Main_Control_Destroy(); if (adl->lib){ dlclose(adl->lib); adl->lib = NULL; } adl_free((void**)&adl); } #endif /* HAVE_AMDADL */ ddccontrol-0.4.4/src/lib/amd_adl.h000066400000000000000000000024111327040342400167360ustar00rootroot00000000000000/* ddc/ci interface functions header Copyright(c) 2012 Vitaly V. Bursov (vitaly@bursov.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef AMD_ADL_H #define AMD_ADL_H int amd_adl_init(); void amd_adl_free(); int amd_adl_get_displays_count(); int amd_adl_get_display(int idx, int *adapter, int *display); int amd_adl_check_display(int adapter, int display); int amd_adl_i2c_read(int adapter, int display, unsigned int addr, unsigned char *buf, unsigned int len); int amd_adl_i2c_write(int adapter, int display, unsigned int addr, unsigned char *buf, unsigned int len); #endif /* AMD_ADL_H */ ddccontrol-0.4.4/src/lib/conf.c000066400000000000000000000407311327040342400163040ustar00rootroot00000000000000/* read/write configuration files in ~/.ddccontrol (profiles, cached monitor list) Copyright(c) 2005 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* * Profiles are stored in HOME_DIR/.ddccontrol */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "conf.h" #include "internal.h" #define RETRYS 3 // number of read retrys /* Read/write monitor list */ static char* get_monitorlist_filename() { char* filename; int trailing; int len, ret; char* home; ddcci_create_config_dir(); home = getenv("HOME"); trailing = (home[strlen(home)-1] == '/'); len = strlen(home) + 64; filename = malloc(len); ret = snprintf(filename, len, "%s%s.ddccontrol/monitorlist", home, trailing ? "" : "/"); DDCCI_RETURN_IF_RUN(ret == len, NULL, _("Cannot create filename (buffer too small)\n"), {free(filename);}) return filename; } /* Load a saved monitorlist */ struct monitorlist* ddcci_load_list() { xmlNodePtr cur, root; xmlDocPtr list_doc; char* filename; xmlChar *tmp; char *endptr; struct monitorlist* list = NULL; struct monitorlist* current = NULL; struct monitorlist** last = &list; filename = get_monitorlist_filename(); if (!filename) return 0; list_doc = xmlParseFile(filename); free(filename); if (list_doc == NULL) { fprintf(stderr, _("Document not parsed successfully.\n")); return 0; } root = xmlDocGetRootElement(list_doc); if (root == NULL) { fprintf(stderr, _("empty profile file\n")); xmlFreeDoc(list_doc); return 0; } if (xmlStrcmp(root->name, BAD_CAST "monitorlist")) { fprintf(stderr, _("profile of the wrong type, root node %s != profile"), root->name); xmlFreeDoc(list_doc); return 0; } tmp = xmlGetProp(root, BAD_CAST "ddccontrolversion"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find ddccontrolversion property."), root, {xmlFreeDoc(list_doc);}); if (strcmp((const char*)tmp, PACKAGE_VERSION)) { fprintf(stderr, _("ddccontrol has been upgraded since monitorlist was saved (%s vs %s).\n"), tmp, PACKAGE_VERSION); xmlFreeDoc(list_doc); xmlFree(tmp); return 0; } xmlFree(tmp); cur = root->xmlChildrenNode; while (1) { if (cur == NULL) { break; } if (!(xmlStrcmp(cur->name, BAD_CAST "monitor"))) { current = malloc(sizeof(struct monitorlist)); tmp = xmlGetProp(cur, BAD_CAST "filename"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find filename property."), cur, {ddcci_free_list(list); free(current); xmlFreeDoc(list_doc);}); current->filename = strdup((const char*)tmp); xmlFree(tmp); tmp = xmlGetProp(cur, BAD_CAST "supported"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find supported property."), cur, {ddcci_free_list(list); free(current); xmlFreeDoc(list_doc);}); current->supported = strtol((const char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF_RUN(*endptr != 0, 0, _("Can't convert supported property to int."), cur, {xmlFree(tmp); ddcci_free_list(list); free(current); xmlFreeDoc(list_doc);}); xmlFree(tmp); tmp = xmlGetProp(cur, BAD_CAST "name"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find name property."), cur, {ddcci_free_list(list); free(current); xmlFreeDoc(list_doc);}); current->name = strdup((const char*)tmp); xmlFree(tmp); tmp = xmlGetProp(cur, BAD_CAST "digital"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find digital property."), cur, {ddcci_free_list(list); free(current); xmlFreeDoc(list_doc);}); current->digital = strtol((const char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF_RUN(*endptr != 0, 0, _("Can't convert digital property to int."), cur, {xmlFree(tmp); ddcci_free_list(list); free(current); xmlFreeDoc(list_doc);}); xmlFree(tmp); current->next = NULL; *last = current; last = ¤t->next; } cur = cur->next; } xmlFreeDoc(list_doc); return list; } /* Save the monitorlist */ int ddcci_save_list(struct monitorlist* monlist) { char* filename; struct monitorlist* current; int rc; xmlTextWriterPtr writer; filename = get_monitorlist_filename(); if (!filename) return 0; writer = xmlNewTextWriterFilename(filename, 0); DDCCI_RETURN_IF_RUN(writer == NULL, 0, _("Cannot create the xml writer\n"), {xmlFreeTextWriter(writer);}) free(filename); xmlTextWriterSetIndent(writer, 1); rc = xmlTextWriterStartDocument(writer, NULL, NULL, NULL); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartDocument\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterStartElement(writer, BAD_CAST "monitorlist"); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartElement monitorlist\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "ddccontrolversion", BAD_CAST PACKAGE_VERSION); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteAttribute ddccontrolversion\n", {xmlFreeTextWriter(writer);}) for (current = monlist; current != NULL; current = current->next) { rc = xmlTextWriterStartElement(writer, BAD_CAST "monitor"); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartElement monitor\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "filename", "%s", current->filename); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute filename\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "supported", "%d", current->supported); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute supported\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "name", "%s", current->name); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute name\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "digital", "%d", current->digital); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute digital\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterEndElement(writer); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterEndElement\n", {xmlFreeTextWriter(writer);}) } rc = xmlTextWriterEndDocument(writer); DDCCI_RETURN_IF_RUN(rc < 0, 0, "testXmlwriterFilename\n", {xmlFreeTextWriter(writer);}) xmlFreeTextWriter(writer); return 1; } /* Profile functions */ struct profile* ddcci_create_profile(struct monitor* mon, const unsigned char* address, int size) { int retry, i; struct profile* profile = malloc(sizeof(struct profile)); memset(profile, 0, sizeof(struct profile)); profile->size = size; for (i = 0; i < size; i++) { profile->address[i] = address[i]; for(retry = RETRYS; retry; retry--) { if (ddcci_readctrl (mon, address[i], &profile->value[i], NULL) >= 0) { break; } } DDCCI_RETURN_IF_RUN(!retry, 0, _("Cannot read control value\n"), {free(profile);}) } profile->pnpid = xmlCharStrdup ((const char*) mon->pnpid); char date[32]; int len, ret; char* home; int trailing; time_t tm = time(NULL); len = strftime(&date[0], 32, "%Y%m%d-%H%M%S", localtime(&tm)); home = getenv("HOME"); trailing = (home[strlen(home)-1] == '/'); len += strlen(home) + 32; profile->filename = malloc(len); ret = snprintf(profile->filename, len, "%s%s.ddccontrol/profiles/%s.xml", home, trailing ? "" : "/", date); DDCCI_RETURN_IF_RUN(ret == len, 0, _("Cannot create filename (buffer too small)\n"), {ddcci_free_profile(profile);}) profile->name = xmlCharStrdup(date); return profile; } int ddcci_apply_profile(struct profile* profile, struct monitor* mon) { int retry, i; for (i = 0; i < profile->size; i++) { for(retry = RETRYS; retry; retry--) { if (ddcci_writectrl(mon, profile->address[i], profile->value[i], -1) >= 0) { break; } } DDCCI_RETURN_IF(!retry, 0, _("Cannot write control value\n")) } return 1; } void ddcci_set_profile_name(struct profile* profile, const char* name) { /* FIXME: What happens if the profile name contains chars like '"<>'? */ profile->name = xmlCharStrdup(name); } /* Get all profiles available for a given monitor */ int ddcci_get_all_profiles(struct monitor* mon) { int len, ret, pos; char* home; char* dirname; char* filename; int trailing; DIR* dir; struct dirent* entry; struct stat buf; struct profile** next = &mon->profiles; struct profile* profile; home = getenv("HOME"); trailing = (home[strlen(home)-1] == '/'); len = strlen(home) + 64; dirname = malloc(len); ret = snprintf(dirname, len, "%s%s.ddccontrol/profiles/", home, trailing ? "" : "/"); DDCCI_RETURN_IF_RUN(ret == len, 0, _("Cannot create filename (buffer too small)\n"), {free(dirname);}) dir = opendir(dirname); if (!dir) { perror(_("Error while opening ddccontrol home directory.")); free(dirname); return 0; } filename = malloc(len); strcpy(filename, dirname); pos = strlen(filename); while ((entry = readdir(dir))) { strcpy(filename+pos, entry->d_name); if (!stat(filename, &buf)) { if (S_ISREG(buf.st_mode)) { /* Is a regular file ? */ profile = ddcci_load_profile(filename); if (!xmlStrcmp(profile->pnpid, BAD_CAST mon->pnpid)) { *next = profile; next = &profile->next; } else { ddcci_free_profile(profile); } } } } if (errno) { perror(_("Error while reading ddccontrol home directory.")); free(dirname); free(filename); closedir(dir); return 0; } closedir(dir); free(dirname); free(filename); return 1; } struct profile* ddcci_load_profile(const char* filename) { xmlNodePtr cur, root; xmlDocPtr profile_doc; xmlChar *tmp; char *endptr; int itmp; struct profile* profile = malloc(sizeof(struct profile)); memset(profile, 0, sizeof(struct profile)); profile_doc = xmlParseFile(filename); if (profile_doc == NULL) { fprintf(stderr, _("Document not parsed successfully.\n")); free(profile); return 0; } root = xmlDocGetRootElement(profile_doc); if (root == NULL) { fprintf(stderr, _("empty profile file\n")); xmlFreeDoc(profile_doc); free(profile); return 0; } if (xmlStrcmp(root->name, BAD_CAST "profile")) { fprintf(stderr, _("profile of the wrong type, root node %s != profile"), root->name); xmlFreeDoc(profile_doc); free(profile); return 0; } profile->pnpid = xmlGetProp(root,BAD_CAST "pnpid"); DDCCI_DB_RETURN_IF_RUN(profile->pnpid == NULL, 0, _("Can't find pnpid property."), root, {free(profile); xmlFreeDoc(profile_doc);}); profile->name = xmlGetProp(root,BAD_CAST "name"); DDCCI_DB_RETURN_IF_RUN(profile->name == NULL, 0, _("Can't find name property."), root, {free(profile); xmlFreeDoc(profile_doc);}); tmp = xmlGetProp(root,BAD_CAST "version"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find version property."), root, {free(profile); xmlFreeDoc(profile_doc);}); itmp = strtol ((const char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF_RUN(*endptr != 0, 0, _("Can't convert version to int."), root, {free(profile); xmlFreeDoc(profile_doc);}); DDCCI_DB_RETURN_IF_RUN(itmp != PROFILEVERSION, 0, _("Can't find version property."), root, {free(profile); xmlFreeDoc(profile_doc);}); if (itmp > PROFILEVERSION) { fprintf(stderr, _("profile version (%d) is not supported (should be %d).\n"), itmp, PROFILEVERSION); xmlFreeDoc(profile_doc); free(profile); return 0; } xmlFree(tmp); cur = root->xmlChildrenNode; while (1) { if (cur == NULL) { break; } if (!(xmlStrcmp(cur->name, BAD_CAST "control"))) { tmp = xmlGetProp (cur, BAD_CAST "address"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find address property."), cur, {free(profile); xmlFreeDoc(profile_doc);}); profile->address[profile->size] = strtol ((const char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF_RUN(*endptr != 0, 0, _("Can't convert address to int."), cur, {xmlFree(tmp); free(profile); xmlFreeDoc(profile_doc);}); xmlFree(tmp); tmp = xmlGetProp(cur, BAD_CAST "value"); DDCCI_DB_RETURN_IF_RUN(tmp == NULL, 0, _("Can't find value property."), cur, {free(profile); xmlFreeDoc(profile_doc);}); profile->value[profile->size] = strtol ((const char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF_RUN(*endptr != 0, 0, _("Can't convert value to int."), cur, {xmlFree(tmp); free(profile); xmlFreeDoc(profile_doc);}); xmlFree(tmp); profile->size++; } cur = cur->next; } profile->filename = strdup(filename); xmlFreeDoc(profile_doc); return profile; } /* Save profile and add it to the profiles list of the given monitor if necessary */ int ddcci_save_profile(struct profile* profile, struct monitor* monitor) { int rc; xmlTextWriterPtr writer; int i; ddcci_create_config_dir(); writer = xmlNewTextWriterFilename(profile->filename, 0); DDCCI_RETURN_IF_RUN(writer == NULL, 0, _("Cannot create the xml writer\n"), {xmlFreeTextWriter(writer);}) xmlTextWriterSetIndent(writer, 1); rc = xmlTextWriterStartDocument(writer, NULL, NULL, NULL); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartDocument\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterStartElement(writer, BAD_CAST "profile"); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartElement profile\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "name", profile->name); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteAttribute name\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "pnpid", profile->pnpid); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteAttribute pnpid\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteAttribute(writer, BAD_CAST "version", BAD_CAST "1"); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteAttribute version\n", {xmlFreeTextWriter(writer);}) /*rc = xmlTextWriterWriteComment(writer, BAD_CAST "My comment"); PROFILE_RETURN_IF(rc < 0, 0, "xmlTextWriterWriteComment\n")*/ for (i = 0; i < profile->size; i++) { rc = xmlTextWriterStartElement(writer, BAD_CAST "control"); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterStartElement control\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "address", "%#x", profile->address[i]); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute address\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "value", "%#x", profile->value[i]); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterWriteFormatAttribute value\n", {xmlFreeTextWriter(writer);}) rc = xmlTextWriterEndElement(writer); DDCCI_RETURN_IF_RUN(rc < 0, 0, "xmlTextWriterEndElement\n", {xmlFreeTextWriter(writer);}) } rc = xmlTextWriterEndDocument(writer); DDCCI_RETURN_IF_RUN(rc < 0, 0, "testXmlwriterFilename\n", {xmlFreeTextWriter(writer);}) xmlFreeTextWriter(writer); /* Update database */ struct profile** profileptr = &monitor->profiles; while (*profileptr) { if (*profileptr == profile) /* We are already in the database... */ return 1; profileptr = &((*profileptr)->next); } *profileptr = profile; return 1; } /* Deletes the profile file, and remove it from the monitor database. */ void ddcci_delete_profile(struct profile* profile, struct monitor* monitor) { /* Delete the file */ if (unlink(profile->filename) < 0) { perror(_("ddcci_delete_profile: Error, cannot delete profile.\n")); return; } /* Delete the database entry */ struct profile** profileptr = &monitor->profiles; while (*profileptr) { if (*profileptr == profile) { /* We found the profile to delete. */ *profileptr = profile->next; ddcci_free_profile(profile); return; } profileptr = &((*profileptr)->next); } *profileptr = profile; fprintf(stderr, _("ddcci_delete_profile: Error, could not find the profile to delete.\n")); } void ddcci_free_profile(struct profile* profile) { if (profile->next) ddcci_free_profile(profile->next); free(profile->filename); xmlFree(profile->pnpid); xmlFree(profile->name); free(profile); } ddccontrol-0.4.4/src/lib/conf.h000066400000000000000000000036751327040342400163170ustar00rootroot00000000000000/* read/write configuration files in ~/.ddccontrol (profiles, cached monitor list) Copyright(c) 2005 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef PROFILE_H #define PROFILE_H #include "ddcci.h" /* Read/write monitor list */ struct monitorlist* ddcci_load_list(); int ddcci_save_list(struct monitorlist* monlist); /* Profile structures and functions */ /* Current profile format version */ #define PROFILEVERSION 1 struct profile { char* filename; xmlChar* name; xmlChar* pnpid; int size; /* Number of controls */ unsigned char address[256]; unsigned short value[256]; struct profile* next; /* Next profile in the list (used by get_all_profiles) */ }; struct profile* ddcci_create_profile(struct monitor* mon, const unsigned char* address, int size); int ddcci_apply_profile(struct profile* profile, struct monitor* mon); void ddcci_set_profile_name(struct profile* profile, const char* name); int ddcci_get_all_profiles(struct monitor* mon); struct profile* ddcci_load_profile(const char* filename); int ddcci_save_profile(struct profile* profile, struct monitor* monitor); void ddcci_delete_profile(struct profile* profile, struct monitor* monitor); void ddcci_free_profile(struct profile* profile); #endif //PROFILE_H ddccontrol-0.4.4/src/lib/ddcci.c000066400000000000000000000732441327040342400164320ustar00rootroot00000000000000/* ddc/ci interface functions Copyright(c) 2004 Oleg I. Vdovikin (oleg@cs.msu.su) Copyright(c) 2004-2006 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "config.h" #include #include #include #include #include #ifdef HAVE_I2C_DEV #include "i2c-dev.h" #endif #include #include #include #include #include #include "ddcci.h" #include "internal.h" #include "amd_adl.h" #include "conf.h" /* ddc/ci defines */ #define DEFAULT_DDCCI_ADDR 0x37 /* ddc/ci logic sits at 0x37 */ #define DEFAULT_EDID_ADDR 0x50 /* edid sits at 0x50 */ #define DDCCI_COMMAND_READ 0x01 /* read ctrl value */ #define DDCCI_REPLY_READ 0x02 /* read ctrl value reply */ #define DDCCI_COMMAND_WRITE 0x03 /* write ctrl value */ #define DDCCI_COMMAND_SAVE 0x0c /* save current settings */ #define DDCCI_REPLY_CAPS 0xe3 /* get monitor caps reply */ #define DDCCI_COMMAND_CAPS 0xf3 /* get monitor caps */ #define DDCCI_COMMAND_PRESENCE 0xf7 /* ACCESS.bus presence check */ /* control numbers */ #define DDCCI_CTRL_BRIGHTNESS 0x10 /* samsung specific, magictune starts with writing 1 to this register */ #define DDCCI_CTRL 0xf5 #define DDCCI_CTRL_ENABLE 0x0001 #define DDCCI_CTRL_DISABLE 0x0000 /* ddc/ci iface tunables */ #define MAX_BYTES 127 /* max message length */ #define DELAY 45000 /* uS to wait after write */ #define CONTROL_WRITE_DELAY 80000 /* uS to wait after writing to a control (default) */ /* magic numbers */ #define MAGIC_1 0x51 /* first byte to send, host address */ #define MAGIC_2 0x80 /* second byte to send, ored with length */ #define MAGIC_XOR 0x50 /* initial xor for received frame */ /* verbosity level (0 - normal, 1 - encoded data, 2 - ddc/ci frames) */ static int verbosity = 0; void ddcci_verbosity(int _verbosity) { verbosity = _verbosity; } int get_verbosity() { return verbosity; } /* debugging */ static void dumphex(FILE *f, char *text, unsigned char *buf, int len) { int i, j; if (text) { if (len > 16) { fprintf(f, "%s:\n", text); } else { fprintf(f, "%s: ", text); } } for (j = 0; j < len; j +=16) { if (len > 16) { fprintf(f, "%04x: ", j); } for (i = 0; i < 16; i++) { if (i + j < len) fprintf(f, "%02x ", buf[i + j]); else fprintf(f, " "); } fprintf(f, "| "); for (i = 0; i < 16; i++) { if (i + j < len) fprintf(f, "%c", buf[i + j] >= ' ' && buf[i + j] < 127 ? buf[i + j] : '.'); else fprintf(f, " "); } fprintf(f, "\n"); } } /* IPC functions */ #ifdef HAVE_DDCPCI #include "ddcpci-ipc.h" #include #include #define DDCPCI_RETRY_DELAY 10000 /* in us */ #define DDCPCI_RETRIES 100000 static int msqid = -2; int ddcpci_init() { if (msqid == -2) { if (verbosity) { printf("ddcpci initing...\n"); } key_t key = ftok(DDCPCIDIR "/ddcpci", getpid()); if ((msqid = msgget(key, IPC_CREAT | 0666)) < 0) { perror(_("Error while initialisating the message queue")); return 0; } char buffer[256]; snprintf(buffer, 256, DDCPCIDIR "/ddcpci %d %d &", verbosity, key); if (verbosity) { printf("Starting %s...\n", buffer); } system(buffer); } return (msqid >= 0); } void ddcpci_release() { if (verbosity) { printf("ddcpci being released...\n"); } if (msqid >= 0) { struct query qlist; memset(&qlist, 0, sizeof(struct query)); qlist.mtype = 1; qlist.qtype = QUERY_QUIT; if (msgsnd(msqid, &qlist, QUERY_SIZE, IPC_NOWAIT) < 0) { perror(_("Error while sending quit message")); } usleep(20000); msgctl(msqid, IPC_RMID, NULL); } } /* Returns : 0 - OK, negative value - timed out or another error */ int ddcpci_read(struct answer* manswer) { int i, ret; for (i = DDCPCI_RETRIES;; i--) { if ((ret = msgrcv(msqid, manswer, sizeof(struct answer) - sizeof(long), 2, IPC_NOWAIT)) < 0) { if (errno != ENOMSG) { return -errno; } } else { if (manswer->status < 0) { errno = EBADMSG; return -EBADMSG; } else { return ret; } } if (i == 0) { errno = ETIMEDOUT; return -ETIMEDOUT; } usleep(DDCPCI_RETRY_DELAY); } } /* Send heartbeat so ddcpci doesn't timeout */ void ddcpci_send_heartbeat() { if (msqid >= 0) { struct query qheart; memset(&qheart, 0, sizeof(struct query)); qheart.mtype = 1; qheart.qtype = QUERY_HEARTBEAT; if (msgsnd(msqid, &qheart, QUERY_SIZE, IPC_NOWAIT) < 0) { perror(_("Error while sending heartbeat message")); } } } #else int ddcpci_init() { return 1; } void ddcpci_release() {} void ddcpci_send_heartbeat() {} #endif int ddcci_init(char* usedatadir) { if (!ddcci_init_db(usedatadir)) { printf(_("Failed to initialize ddccontrol database...\n")); return 0; } #ifdef HAVE_AMDADL if (!amd_adl_init()){ if (verbosity) { printf(_("Failed to initialize ADL...\n")); } } #endif return ddcpci_init(); } void ddcci_release() { ddcpci_release(); ddcci_release_db(); #ifdef HAVE_AMDADL amd_adl_free(); #endif } /* write len bytes (stored in buf) to i2c address addr */ /* return 0 on success, -1 on failure */ static int i2c_write(struct monitor* mon, unsigned int addr, unsigned char *buf, unsigned char len) { switch (mon->type) { #ifdef HAVE_I2C_DEV case dev: { int i; struct i2c_rdwr_ioctl_data msg_rdwr; struct i2c_msg i2cmsg; /* done, prepare message */ msg_rdwr.msgs = &i2cmsg; msg_rdwr.nmsgs = 1; #ifdef __FreeBSD__ i2cmsg.slave = addr << 1; #else i2cmsg.addr = addr; #endif i2cmsg.flags = 0; i2cmsg.len = len; i2cmsg.buf = buf; if ((i = ioctl(mon->fd, I2C_RDWR, &msg_rdwr)) < 0 ) { if (!mon->probing || verbosity) { perror("ioctl()"); fprintf(stderr,_("ioctl returned %d\n"),i); } return -1; } if (verbosity > 1) { dumphex(stderr, "Send", buf, len); } #ifdef __FreeBSD__ i = len; // FreeBSD ioctl() returns 0 #endif return i; } #endif #ifdef HAVE_DDCPCI case pci: { struct query qdata; memset(&qdata, 0, sizeof(struct query)); qdata.mtype = 1; qdata.qtype = QUERY_DATA; qdata.addr = addr; qdata.flags = 0; memcpy(qdata.buffer, buf, len); if (msgsnd(msqid, &qdata, QUERY_SIZE + len, IPC_NOWAIT) < 0) { if (!mon->probing || verbosity) { perror(_("Error while sending write message")); } return -3; } struct answer adata; if (ddcpci_read(&adata) < 0) { if (!mon->probing || verbosity) { perror(_("Error while reading write message answer")); } return -1; } if (verbosity > 1) { dumphex(stderr, "Send", buf, len); } return adata.status; } #endif #ifdef HAVE_AMDADL case type_adl: { return amd_adl_i2c_write(mon->adl_adapter, mon->adl_display, addr, buf, len); } #endif default: return -1; } } /* read at most len bytes from i2c address addr, to buf */ /* return -1 on failure */ static int i2c_read(struct monitor* mon, unsigned int addr, unsigned char *buf, unsigned char len) { switch (mon->type) { #ifdef HAVE_I2C_DEV case dev: { struct i2c_rdwr_ioctl_data msg_rdwr; struct i2c_msg i2cmsg; int i; msg_rdwr.msgs = &i2cmsg; msg_rdwr.nmsgs = 1; #ifdef __FreeBSD__ i2cmsg.slave = addr << 1; #else i2cmsg.addr = addr; #endif i2cmsg.flags = I2C_M_RD; i2cmsg.len = len; i2cmsg.buf = buf; if ((i = ioctl(mon->fd, I2C_RDWR, &msg_rdwr)) < 0) { if (!mon->probing || verbosity) { perror("ioctl()"); fprintf(stderr,_("ioctl returned %d\n"),i); } return -1; } if (verbosity > 1) { dumphex(stderr, "Recv", buf, i); } #ifdef __FreeBSD__ i = len; // FreeBSD ioctl() returns 0 #endif return i; } #endif #ifdef HAVE_DDCPCI case pci: { int ret; struct query qdata; memset(&qdata, 0, sizeof(struct query)); qdata.mtype = 1; qdata.qtype = QUERY_DATA; qdata.addr = addr; qdata.flags = I2C_M_RD; qdata.len = len; if (msgsnd(msqid, &qdata, QUERY_SIZE, IPC_NOWAIT) < 0) { if (!mon->probing || verbosity) { perror(_("Error while sending read message")); } return -3; } struct answer adata; if ((ret = ddcpci_read(&adata)) < 0) { if (!mon->probing || verbosity) { perror(_("Error while reading read message answer")); } return -1; } memcpy(buf, adata.buffer, ret - ANSWER_SIZE); if (verbosity > 1) { dumphex(stderr, "Recv", buf, ret - ANSWER_SIZE); } return ret - ANSWER_SIZE; } #endif #ifdef HAVE_AMDADL case type_adl: { return amd_adl_i2c_read(mon->adl_adapter, mon->adl_display, addr, buf, len); } #endif default: return -1; } } /* stalls execution, allowing write transaction to complete */ static void ddcci_delay(struct monitor* mon, int iswrite) { struct timeval now; if (gettimeofday(&now, NULL)) { usleep(DELAY); } else { if (mon->last.tv_sec >= (now.tv_sec - 1)) { unsigned long usec = (now.tv_sec - mon->last.tv_sec) * 10000000 + now.tv_usec - mon->last.tv_usec; if (usec < DELAY) { usleep(DELAY - usec); if ((now.tv_usec += (DELAY - usec)) > 1000000) { now.tv_usec -= 1000000; now.tv_sec++; } } } if (iswrite) { mon->last = now; } } } /* write len bytes (stored in buf) to ddc/ci at address addr */ /* return 0 on success, -1 on failure */ static int ddcci_write(struct monitor* mon, unsigned char *buf, unsigned char len) { int i = 0; unsigned char _buf[MAX_BYTES + 3]; unsigned xor = ((unsigned char)mon->addr << 1); /* initial xor value */ /* put first magic */ xor ^= (_buf[i++] = MAGIC_1); /* second magic includes message size */ xor ^= (_buf[i++] = MAGIC_2 | len); while (len--) /* bytes to send */ xor ^= (_buf[i++] = *buf++); /* finally put checksum */ _buf[i++] = xor; /* wait for previous command to complete */ ddcci_delay(mon, 1); return i2c_write(mon, mon->addr, _buf, i); } /* read ddc/ci formatted frame from ddc/ci at address addr, to buf */ static int ddcci_read(struct monitor* mon, unsigned char *buf, unsigned char len) { unsigned char _buf[MAX_BYTES]; unsigned char xor = MAGIC_XOR; int i, _len; /* wait for previous command to complete */ ddcci_delay(mon, 0); if (i2c_read(mon, mon->addr, _buf, len + 3) <= 0) /* busy ??? */ { return -1; } /* validate answer */ if (_buf[0] != mon->addr * 2) { /* busy ??? */ if (!mon->probing || verbosity) { fprintf(stderr, _("Invalid response, first byte is 0x%02x, should be 0x%02x\n"), _buf[0], mon->addr * 2); dumphex(stderr, NULL, _buf, len + 3); } return -1; } if ((_buf[1] & MAGIC_2) == 0) { /* Fujitsu Siemens P19-2 and NEC LCD 1970NX send wrong magic when reading caps. */ if (!mon->probing || verbosity) { fprintf(stderr, _("Non-fatal error: Invalid response, magic is 0x%02x\n"), _buf[1]); } } _len = _buf[1] & ~MAGIC_2; if (_len > len || _len > sizeof(_buf)) { if (!mon->probing || verbosity) { fprintf(stderr, _("Invalid response, length is %d, should be %d at most\n"), _len, len); } return -1; } /* get the xor value */ for (i = 0; i < _len + 3; i++) { xor ^= _buf[i]; } if (xor != 0) { if (!mon->probing || verbosity) { fprintf(stderr, _("Invalid response, corrupted data - xor is 0x%02x, length 0x%02x\n"), xor, _len); dumphex(stderr, NULL, _buf, len + 3); } return -1; } /* copy payload data */ memcpy(buf, _buf + 2, _len); return _len; } /* write value to register ctrl of ddc/ci at address addr */ int ddcci_writectrl(struct monitor* mon, unsigned char ctrl, unsigned short value, int delay) { unsigned char buf[4]; buf[0] = DDCCI_COMMAND_WRITE; buf[1] = ctrl; buf[2] = (value >> 8); buf[3] = (value & 255); int ret = ddcci_write(mon, buf, sizeof(buf)); /* Do the delay */ if (delay > 0) { usleep(1000*delay); } /* Default delay : 80ms (anyway we won't get below 45ms (due to DELAY)) */ else if (delay < 0) { usleep(CONTROL_WRITE_DELAY); } return ret; } /* read register ctrl raw data of ddc/ci at address addr */ static int ddcci_raw_readctrl(struct monitor* mon, unsigned char ctrl, unsigned char *buf, unsigned char len) { unsigned char _buf[2]; _buf[0] = DDCCI_COMMAND_READ; _buf[1] = ctrl; if (ddcci_write(mon, _buf, sizeof(_buf)) < 0) { return -1; } return ddcci_read(mon, buf, len); } int ddcci_readctrl(struct monitor* mon, unsigned char ctrl, unsigned short *value, unsigned short *maximum) { unsigned char buf[8]; int len = ddcci_raw_readctrl(mon, ctrl, buf, sizeof(buf)); if (len == sizeof(buf) && buf[0] == DDCCI_REPLY_READ && buf[2] == ctrl) { if (value) { *value = buf[6] * 256 + buf[7]; } if (maximum) { *maximum = buf[4] * 256 + buf[5]; } return !buf[1]; } return -1; } /* See documentation Appendix D. * Returns : * -1 if an error occurred * number of controls added * * add: if true: add caps_str to caps, otherwise remove caps_str from the caps. */ int ddcci_parse_caps(const char* caps_str, struct caps* caps, int add) { // printf("Parsing CAPS (%s).\n", caps_str); int pos = 0; /* position in caps_str */ int level = 0; /* CAPS parenthesis level */ int svcp = 0; /* Current CAPS section is vcp */ int stype = 0; /* Current CAPS section is type */ char buf[128]; char* endptr; int ind = -1; long val = -1; int i; int removeprevious = 0; int num = 0; for (pos = 0; caps_str[pos] != 0; pos++) { if (caps_str[pos] == '(') { level++; } else if (caps_str[pos] == ')') { level--; if (level == 1) { svcp = 0; stype = 0; } } else if (caps_str[pos] != ' ') { if (level == 1) { if ((strncmp(caps_str+pos, "vcp(", 4) == 0) || (strncmp(caps_str+pos, "vcp ", 4) == 0)) { svcp = 1; pos += 2; } else if (strncmp(caps_str+pos, "type", 4) == 0) { stype = 1; pos += 3; } } else if ((stype == 1) && (level == 2)) { if (strncmp(caps_str+pos, "lcd", 3) == 0) { caps->type = lcd; pos += 2; } else if (strncmp(caps_str+pos, "crt", 3) == 0) { caps->type = crt; pos += 2; } } else if ((svcp == 1) && (level == 2)) { if (!add && ((removeprevious == 1) || (caps->vcp[ind] && caps->vcp[ind]->values_len == 0))) { if(caps->vcp[ind]) { if (caps->vcp[ind]->values) { free(caps->vcp[ind]->values); } free(caps->vcp[ind]); caps->vcp[ind] = NULL; } } buf[0] = caps_str[pos]; buf[1] = caps_str[++pos]; buf[2] = 0; ind = strtol(buf, &endptr, 16); if (*endptr != 0) { printf(_("Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n"), buf, pos); return -1; } if (add) { caps->vcp[ind] = malloc(sizeof(struct vcp_entry)); caps->vcp[ind]->values_len = -1; caps->vcp[ind]->values = NULL; } else { removeprevious = 1; } num++; } else if ((svcp == 1) && (level == 3)) { i = 0; while ((caps_str[pos+i] != ' ') && (caps_str[pos+i] != ')')) { buf[i] = caps_str[pos+i]; i++; } buf[i] = 0; val = strtol(buf, &endptr, 16); if (*endptr != 0) { printf(_("Can't convert value to int, invalid CAPS (buf=%s, pos=%d).\n"), buf, pos); return -1; } if (add) { if (caps->vcp[ind]->values_len == -1) { caps->vcp[ind]->values_len = 1; } else { caps->vcp[ind]->values_len++; } caps->vcp[ind]->values = realloc(caps->vcp[ind]->values, caps->vcp[ind]->values_len*sizeof(unsigned short)); caps->vcp[ind]->values[caps->vcp[ind]->values_len-1] = val; } else { if (caps->vcp[ind]->values_len > 0) { removeprevious = 0; int j = 0; for (i = 0; i < caps->vcp[ind]->values_len; i++) { if (caps->vcp[ind]->values[i] != val) { caps->vcp[ind]->values[j++] = caps->vcp[ind]->values[i]; } } caps->vcp[ind]->values_len--; } } } } } if (!add && ((removeprevious == 1) || (caps->vcp[ind] && caps->vcp[ind]->values_len == 0))) { if(caps->vcp[ind]) { if (caps->vcp[ind]->values) { free(caps->vcp[ind]->values); } free(caps->vcp[ind]); caps->vcp[ind] = NULL; } } return num; } /* read capabilities raw data of ddc/ci at address addr starting at offset to buf */ static int ddcci_raw_caps(struct monitor* mon, unsigned int offset, unsigned char *buf, unsigned char len) { unsigned char _buf[3]; _buf[0] = DDCCI_COMMAND_CAPS; _buf[1] = offset >> 8; _buf[2] = offset & 255; if (ddcci_write(mon, _buf, sizeof(_buf)) < 0) { return -1; } return ddcci_read(mon, buf, len); } int ddcci_caps(struct monitor* mon) { mon->caps.raw_caps = (char*)malloc(16); int bufferpos = 0; unsigned char buf[64]; /* 64 bytes chunk (was 35, but 173P+ send 43 bytes chunks) */ int offset = 0; int len, i; int retries = 3; do { mon->caps.raw_caps[bufferpos] = 0; if (retries == 0) { return -1; } len = ddcci_raw_caps(mon, offset, buf, sizeof(buf)); if (len < 0) { retries--; continue; } if (len < 3 || buf[0] != DDCCI_REPLY_CAPS || (buf[1] * 256 + buf[2]) != offset) { if (!mon->probing || verbosity) { fprintf(stderr, _("Invalid sequence in caps.\n")); } retries--; continue; } mon->caps.raw_caps = (char*)realloc(mon->caps.raw_caps, bufferpos + len - 2); for (i = 3; i < len; i++) { mon->caps.raw_caps[bufferpos++] = buf[i]; } offset += len - 3; retries = 3; } while (len != 3); #if 0 /* Test CAPS with binary data */ mon->caps.raw_caps = realloc(mon->caps.raw_caps, 2048); strcpy(mon->caps.raw_caps, "( prot(monitor) type(crt) edid bin(128("); bufferpos = strlen(mon->caps.raw_caps); for (i = 0; i < 128; i++) { mon->caps.raw_caps[bufferpos++] = i; } strcpy(&mon->caps.raw_caps[bufferpos], ")) vdif bin(128("); bufferpos += strlen(")) vdif bin(128("); for (i = 0; i < 128; i++) { mon->caps.raw_caps[bufferpos++] = i; } strcpy(&mon->caps.raw_caps[bufferpos], ")) vcp (10 12 16 18 1A 50 92)))"); bufferpos += strlen(")) vcp (10 12 16 18 1A 50 92)))"); /* End */ #endif mon->caps.raw_caps[bufferpos] = 0; char* last_substr = mon->caps.raw_caps; char* endptr; while ((last_substr = strstr(last_substr, "bin("))) { last_substr += 4; len = strtol(last_substr, &endptr, 0); if (*endptr != '(') { printf("Invalid bin in CAPS.\n"); continue; } for (i = 0; i < len; i++) { *(++endptr) = '#'; } last_substr += len; } ddcci_parse_caps(mon->caps.raw_caps, &mon->caps, 1); return bufferpos; } /* save current settings */ int ddcci_command(struct monitor* mon, unsigned char cmd) { unsigned char _buf[1]; _buf[0] = cmd; return ddcci_write(mon, _buf, sizeof(_buf)); } int ddcci_read_edid(struct monitor* mon, int addr) { unsigned char buf[128]; buf[0] = 0; /* eeprom offset */ if (i2c_write(mon, addr, buf, 1) > 0 && i2c_read(mon, addr, buf, sizeof(buf)) > 0) { if (buf[0] != 0 || buf[1] != 0xff || buf[2] != 0xff || buf[3] != 0xff || buf[4] != 0xff || buf[5] != 0xff || buf[6] != 0xff || buf[7] != 0) { if (!mon->probing || verbosity) { fprintf(stderr, _("Corrupted EDID at 0x%02x.\n"), addr); } return -1; } snprintf(mon->pnpid, 8, "%c%c%c%02X%02X", ((buf[8] >> 2) & 31) + 'A' - 1, ((buf[8] & 3) << 3) + (buf[9] >> 5) + 'A' - 1, (buf[9] & 31) + 'A' - 1, buf[11], buf[10]); if (!mon->probing && verbosity) { int sn = buf[0xc] + (buf[0xd]<<8) + (buf[0xe]<<16) + (buf[0xf]<<24); printf(_("Serial number: %d\n"), sn); int week = buf[0x10]; int year = buf[0x11] + 1990; printf(_("Manufactured: Week %d, %d\n"), week, year); int ver = buf[0x12]; int rev = buf[0x13]; printf(_("EDID version: %d.%d\n"), ver, rev); int maxwidth = buf[0x15]; int maxheight = buf[0x16]; printf(_("Maximum size: %d x %d (cm)\n"), maxwidth, maxheight); /* Parse more infos... */ } mon->digital = (buf[0x14] & 0x80); return 0; } else { if (!mon->probing || verbosity) { fprintf(stderr, _("Reading EDID 0x%02x failed.\n"), addr); } return -1; } } /* Param probing indicates if we are probing for available devices (so we must be much less verbose) Returns : - 0 if OK - -1 if DDC/CI is not available - -2 if EDID is not available - -3 if file can't be opened */ static int ddcci_open_with_addr(struct monitor* mon, const char* filename, int addr, int edid, int probing) { memset(mon, 0, sizeof(struct monitor)); mon->probing = probing; if (strncmp(filename, "dev:", 4) == 0) { if ((mon->fd = open(filename+4, O_RDWR)) < 0) { if ((!probing) || verbosity) perror(filename); return -3; } mon->type = dev; } #ifdef HAVE_DDCPCI else if (strncmp(filename, "pci:", 4) == 0) { if (verbosity) printf(_("Device: %s\n"), filename); struct query qopen; memset(&qopen, 0, sizeof(struct query)); qopen.mtype = 1; qopen.qtype = QUERY_OPEN; sscanf(filename, "pci:%02x:%02x.%d-%d\n", (unsigned int*)&qopen.bus.bus, (unsigned int*)&qopen.bus.dev, (unsigned int*)&qopen.bus.func, &qopen.bus.i2cbus); if (msgsnd(msqid, &qopen, QUERY_SIZE, IPC_NOWAIT) < 0) { perror(_("Error while sending open message")); return -3; } struct answer aopen; if (ddcpci_read(&aopen) < 0) { perror(_("Error while reading open message answer")); return -3; } mon->type = pci; } #endif #ifdef HAVE_AMDADL else if (strncmp(filename, "adl:", 4) == 0) { mon->adl_adapter = -1; mon->adl_display = -1; if (sscanf(filename, "adl:%d:%d", &mon->adl_adapter, &mon->adl_display) != 2){ fprintf(stderr, _("Invalid filename (%s).\n"), filename); return -3; } if (amd_adl_check_display(mon->adl_adapter, mon->adl_display)){ fprintf(stderr, _("ADL display not found (%s).\n"), filename); return -3; } mon->type = type_adl; } #endif else { fprintf(stderr, _("Invalid filename (%s).\n"), filename); return -3; } mon->addr = addr; if (ddcci_read_edid(mon, edid) < 0) { return -2; } ddcci_caps(mon); mon->db = ddcci_create_db(mon->pnpid, &mon->caps, 1); mon->fallback = 0; /* No fallback */ if (!mon->db) { /* Fallback on manufacturer generic profile */ char buffer[7]; buffer[0] = 0; strncat(buffer, mon->pnpid, 3); /* copy manufacturer id */ switch(mon->caps.type) { case lcd: strcat(buffer, "lcd"); mon->db = ddcci_create_db(buffer, &mon->caps, 1); mon->fallback = 1; break; case crt: strcat(buffer, "crt"); mon->db = ddcci_create_db(buffer, &mon->caps, 1); mon->fallback = 1; break; case unk: break; } if (!mon->db) { /* Fallback on VESA generic profile */ mon->db = ddcci_create_db("VESA", &mon->caps, 1); mon->fallback = 2; } } if ((mon->db) && (mon->db->init == samsung)) { if (ddcci_writectrl(mon, DDCCI_CTRL, DDCCI_CTRL_ENABLE, 0) < 0) { return -1; } } else { if (ddcci_command(mon, DDCCI_COMMAND_PRESENCE) < 0) { return -1; } } return 0; } int ddcci_open(struct monitor* mon, const char* filename, int probing) { return ddcci_open_with_addr(mon, filename, DEFAULT_DDCCI_ADDR, DEFAULT_EDID_ADDR, probing); } int ddcci_save(struct monitor* mon) { return ddcci_command(mon, DDCCI_COMMAND_SAVE); } /* Returns : - 0 if OK - -1 if DDC/CI is not available - -3 if file can't be closed */ int ddcci_close(struct monitor* mon) { if (mon->db) { if (mon->db->init == samsung) { if ((ddcci_writectrl(mon, DDCCI_CTRL, DDCCI_CTRL_DISABLE, 0)) < 0) { return -1; } } ddcci_free_db(mon->db); } else { /* Alternate way of init mode detecting for unsupported monitors */ if (strncmp(mon->pnpid, "SAM", 3) == 0) { if ((ddcci_writectrl(mon, DDCCI_CTRL, DDCCI_CTRL_DISABLE, 0)) < 0) { return -1; } } } int i; for (i = 0; i < 256; i++) { if(mon->caps.vcp[i]) { if (mon->caps.vcp[i]->values) { free(mon->caps.vcp[i]->values); } free(mon->caps.vcp[i]); } } if (mon->profiles) { ddcci_free_profile(mon->profiles); } if ((mon->fd > -1) && (close(mon->fd) < 0)) { return -3; } return 0; } void ddcci_probe_device(char* filename, struct monitorlist** current, struct monitorlist*** last) { struct monitor mon; int ret = ddcci_open(&mon, filename, 1); if (verbosity) { printf(_("ddcci_open returned %d\n"), ret); } if (ret > -2) { /* At least the EDID has been read correctly */ (*current) = malloc(sizeof(struct monitorlist)); (*current)->filename = filename; (*current)->supported = (ret == 0); if (mon.db) { (*current)->name = malloc(strlen((char*)mon.db->name)+1); strcpy((char*)(*current)->name, (char*)mon.db->name); } else { (*current)->name = malloc(32); snprintf((char*)(*current)->name, 32, _("Unknown monitor (%s)"), mon.pnpid); } (*current)->digital = mon.digital; (*current)->next = NULL; **last = (*current); *last = &(*current)->next; } else { free(filename); } ddcci_close(&mon); } struct monitorlist* ddcci_probe() { char* filename = NULL; struct monitorlist* list = NULL; struct monitorlist* current = NULL; struct monitorlist** last = &list; printf(_("Probing for available monitors")); if (verbosity) printf("...\n"); fflush(stdout); #ifdef HAVE_DDCPCI /* Fetch bus list from ddcpci */ if (msqid >= 0) { struct query qlist; memset(&qlist, 0, sizeof(struct query)); qlist.mtype = 1; qlist.qtype = QUERY_LIST; if (msgsnd(msqid, &qlist, QUERY_SIZE, IPC_NOWAIT) < 0) { perror(_("Error while sending list message")); } else { int len = 0, i; struct answer alist; char** filelist = NULL; while (1) { if (ddcpci_read(&alist) < 0){ perror(_("Error while reading list entry")); break; } else { if (alist.last == 1) { break; } filelist = realloc(filelist, (len+1)*sizeof(struct answer)); //printf("<==%02x:%02x.%d-%d\n", alist.bus.bus, alist.bus.dev, alist.bus.func, alist.bus.i2cbus); filelist[len] = malloc(32); snprintf(filelist[len], 32, "pci:%02x:%02x.%d-%d", alist.bus.bus, alist.bus.dev, alist.bus.func, alist.bus.i2cbus); if (verbosity) { printf(_("Found PCI device (%s)\n"), filelist[len]); } len++; } } for (i = 0; i < len; i++) { ddcci_probe_device(filelist[i], ¤t, &last); if (!verbosity) { printf("."); fflush(stdout); } } free(filelist); } } #endif /* Probe real I2C device */ DIR *dirp; struct dirent *direntp; dirp = opendir("/dev/"); #ifdef __FreeBSD__ const char *prefix = "iic"; #else const char *prefix = "i2c-"; #endif int prefix_len = strlen(prefix); while ((direntp = readdir(dirp)) != NULL) { if (!strncmp(direntp->d_name, prefix, prefix_len)) { filename = malloc(strlen(direntp->d_name)+12); snprintf(filename, strlen(direntp->d_name)+12, "dev:/dev/%s", direntp->d_name); if (verbosity) { printf(_("Found I2C device (%s)\n"), filename); } ddcci_probe_device(filename, ¤t, &last); if (!verbosity) { printf("."); fflush(stdout); } } } closedir(dirp); #ifdef HAVE_AMDADL /* ADL probe */ int adl_disp; for (adl_disp=0; adl_dispfilename); free(list->name); ddcci_free_list(list->next); free(list); } /* Create $HOME/.ddccontrol and subdirectories if necessary */ int ddcci_create_config_dir() { int len, ret; char* home; char* filename; int trailing; struct stat buf; home = getenv("HOME"); trailing = (home[strlen(home)-1] == '/'); len = strlen(home) + 32; filename = malloc(len); ret = snprintf(filename, len, "%s%s.ddccontrol", home, trailing ? "" : "/"); DDCCI_RETURN_IF_RUN(ret == len, 0, _("Cannot create filename (buffer too small)\n"), {free(filename);}) if (stat(filename, &buf) < 0) { if (errno != ENOENT) { perror(_("Error while getting information about ddccontrol home directory.")); free(filename); return 0; } if (mkdir(filename, 0750) < 0) { perror(_("Error while creating ddccontrol home directory.")); free(filename); return 0; } if (stat(filename, &buf) < 0) { perror(_("Error while getting information about ddccontrol home directory after creating it.")); free(filename); return 0; } } if (!S_ISDIR(buf.st_mode)) { errno = ENOTDIR; perror(_("Error: '.ddccontrol' in your home directory is not a directory.")); free(filename); return 0; } strcat(filename, "/profiles"); if (stat(filename, &buf) < 0) { if (errno != ENOENT) { perror(_("Error while getting information about ddccontrol profile directory.")); free(filename); return 0; } if (mkdir(filename, 0750) < 0) { perror(_("Error while creating ddccontrol profile directory.")); free(filename); return 0; } if (stat(filename, &buf) < 0) { perror(_("Error while getting information about ddccontrol profile directory after creating it.")); free(filename); return 0; } } if (!S_ISDIR(buf.st_mode)) { errno = ENOTDIR; perror(_("Error: '.ddccontrol/profiles' in your home directory is not a directory.")); free(filename); return 0; } free(filename); return 1; } ddccontrol-0.4.4/src/lib/ddcci.h000066400000000000000000000076361327040342400164410ustar00rootroot00000000000000/* ddc/ci interface functions header Copyright(c) 2004 Oleg I. Vdovikin (oleg@cs.msu.su) Copyright(c) 2004-2005 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DDCCI_H #define DDCCI_H #include #include struct profile; enum monitor_type { unk = 0, lcd = 1, crt = 2 }; /* Structure to store CAPS vcp entry (control and related values) */ struct vcp_entry { int values_len; /* -1 if values are not specified */ unsigned short* values; }; /* Structure to store CAPS */ struct caps { struct vcp_entry* vcp[256]; /* vcp entries */ enum monitor_type type; char* raw_caps; /* raw text caps */ }; #include "monitor_db.h" struct monitor { int fd; unsigned int addr; int adl_adapter, adl_display; char pnpid[8]; unsigned char digital; /* 0 - digital, 1 - analog */ struct timeval last; struct monitor_db* db; struct caps caps; struct profile* profiles; /* profiles available for this monitor. Filled by get_all_profiles. */ enum { dev ,pci ,type_adl } type; int probing; /* are we probing? */ int fallback; /* 0 - the db is designed for this monitor 1 - we are using a manufacturer standard profile (warn the user) 2 - we are using the VESA generic profile (warn the user) */ }; /* Struct used to return monitor data probed by ddcci_probe */ struct monitorlist { char* filename; /* I2C device filename */ unsigned char supported; /* 0 - DDC/CI not supported, 1 - DDC/CI supported */ char* name; unsigned char digital; /* 0 - digital, 1 - analog */ struct monitorlist* next; }; struct monitorlist* ddcci_probe(); void ddcci_free_list(struct monitorlist* list); int ddcci_open(struct monitor* mon, const char* filename, int probing); int ddcci_save(struct monitor* mon); int ddcci_close(struct monitor* mon); int ddcci_writectrl(struct monitor* mon, unsigned char ctrl, unsigned short value, int delay); /* return values: < 0 - failure, 0 - contron not supported, > 0 - supported */ int ddcci_readctrl(struct monitor* mon, unsigned char ctrl, unsigned short *value, unsigned short *maximum); int ddcci_parse_caps(const char* caps_str, struct caps* caps, int add); int ddcci_caps(struct monitor* mon); /* verbosity level (0 - normal, 1 - encoded data, 2 - ddc/ci frames) */ void ddcci_verbosity(int verbosity); int get_verbosity(); int ddcci_init(char* usedatadir); void ddcci_release(); void ddcpci_send_heartbeat(); /* Create $HOME/.ddccontrol and subdirectories if necessary */ int ddcci_create_config_dir(); /* Macros */ #define DDCCI_DB_RETURN_IF_RUN(cond, value, message, node, run) \ if (cond) { \ if (node) \ fprintf(stderr, _("Error: %s @%s:%d (%s:%ld)\n"), message, __FILE__, __LINE__, \ ((xmlNodePtr)node)->doc->name, XML_GET_LINE(node)); \ else \ fprintf(stderr, _("Error: %s @%s:%d\n"), message, __FILE__, __LINE__); \ run \ return value; \ } #define DDCCI_DB_RETURN_IF(cond, value, message, node) \ DDCCI_DB_RETURN_IF_RUN(cond, value, message, node, {}) #define DDCCI_RETURN_IF_RUN(cond, value, message, run) \ if (cond) { \ fprintf(stderr, _("Error: %s @%s:%d\n"), message, __FILE__, __LINE__); \ run \ return value; \ } #define DDCCI_RETURN_IF(cond, value, message) \ DDCCI_RETURN_IF_RUN(cond, value, message, {}) #endif //DDCCI_H ddccontrol-0.4.4/src/lib/ddccontrol.pc.in000066400000000000000000000004201327040342400202660ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ datarootdir = @datarootdir@ bindir=@bindir@ datadir=@datadir@ libdir=@libdir@ includedir=@includedir@ Name: ddccontrol Description: Display DDC/CI control Version: @VERSION@ Libs: -L${libdir} -lddccontrol Cflags: -I${includedir} ddccontrol-0.4.4/src/lib/ddcpci-ipc.h000066400000000000000000000047531327040342400173670ustar00rootroot00000000000000/* ddc/ci direct PCI memory interface - header file for IPC Copyright(c) 2004 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DDCPCI_IPC_H #define DDCPCI_IPC_H #include "config.h" #if !HAVE_DDCPCI #error "This file mustn\'t be included if ddcpci support is disabled." #endif //#include /* If ddcpci receives no connections during IDLE_TIMEOUT seconds, it will break the connection and exit. */ #define IDLE_TIMEOUT 60 struct i2c_bus { int bus; int dev; int func; int i2cbus; }; #define MAX_BUFFER_SIZE 256 #define QUERY_SIZE (sizeof(struct query) - (MAX_BUFFER_SIZE) - sizeof(long)) #define ANSWER_SIZE (sizeof(struct answer) - (MAX_BUFFER_SIZE) - sizeof(long)) /* ddccontrol to ddcpci messages (queries) */ #define QUERY_LIST 0 /* Nothing should be defined */ #define QUERY_OPEN 1 /* i2c_bus must be defined */ #define QUERY_DATA 2 /* addr and flags must be defined (and buffer for write operations) */ #define QUERY_HEARTBEAT 3 /* Nothing should be defined */ #define QUERY_QUIT 4 /* Nothing should be defined */ struct query { long mtype; /* Always 1 */ int qtype; /* see above for possible values */ /* QUERY_OPEN */ struct i2c_bus bus; /* QUERY_DATA */ int addr; int flags; int len; /* only for read queries, number of bytes to read */ unsigned char buffer[MAX_BUFFER_SIZE]; }; /* ddcpci to ddccontrol messages (answers) */ struct answer { long mtype; /* Always 2 */ int status; /* 0 or greater - OK (bytes read/written for answers to QUERY_DATA), -1 - an error occurred */ int last; /* 0 - Last message, no bus to read, 1 - Other messages follows (for QUERY_LIST) */ struct i2c_bus bus; /* For answers to QUERY_LIST */ unsigned char buffer[MAX_BUFFER_SIZE]; /* For answers to QUERY_DATA, read operations */ }; #endif //DDCPCI_IPC_H ddccontrol-0.4.4/src/lib/i2c-dev.h000066400000000000000000000040771327040342400166200ustar00rootroot00000000000000/* ddc/ci i2c-dev header Copyright(c) 2004 Nicolas Boichat (nicolas@boichat.ch) Copyright (C) 1995-2000 Simon G. Vogl (original i2c.h headers) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DDCCONTROL_I2C_DEV_H #define DDCCONTROL_I2C_DEV_H /* If linux/i2c-dev.h is usable, use it, otherwise, define * the required constants and structures. */ #ifdef __FreeBSD__ #include #include #define I2C_M_RD IIC_M_RD #define I2C_RDWR I2CRDWR #define i2c_msg iic_msg #define i2c_rdwr_ioctl_data iic_rdwr_data #else #if HAVE_BUGGY_I2C_DEV #include /* * I2C Message - used for pure i2c transaction, also from /dev interface */ struct i2c_msg { __u16 addr; /* slave address */ __u16 flags; #define I2C_M_TEN 0x10 /* we have a ten bit chip address */ #define I2C_M_RD 0x01 #define I2C_M_NOSTART 0x4000 #define I2C_M_REV_DIR_ADDR 0x2000 #define I2C_M_IGNORE_NAK 0x1000 #define I2C_M_NO_RD_ACK 0x0800 __u16 len; /* msg length */ __u8 *buf; /* pointer to msg data */ }; #define I2C_RDWR 0x0707 /* Combined R/W transfer (one stop only)*/ /* This is the structure as used in the I2C_RDWR ioctl call */ struct i2c_rdwr_ioctl_data { struct i2c_msg *msgs; /* pointers to i2c_msgs */ __u32 nmsgs; /* number of i2c_msgs */ }; #else #include #include #endif #endif // __FreeBSD__ #endif //DDCCONTROL_I2C_DEV_H ddccontrol-0.4.4/src/lib/internal.h000066400000000000000000000022641327040342400171770ustar00rootroot00000000000000/* ddc/ci interface functions header Copyright(c) 2004 Oleg I. Vdovikin (oleg@cs.msu.su) Copyright(c) 2004-2005 Nicolas Boichat (nicolas@boichat.ch) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef DDCCI_INTERNAL_H #define DDCCI_INTERNAL_H #ifdef HAVE_GETTEXT #include #include #define _(String) gettext (String) #define gettext_noop(String) String #define N_(String) gettext_noop (String) #else #define _(String) String #define N_(String) String #endif #endif //DDCCI_INTERNAL_H ddccontrol-0.4.4/src/lib/monitor_db.c000066400000000000000000000562411327040342400175160ustar00rootroot00000000000000/* ddc/ci interface functions Copyright(c) 2004-2005 Nicolas Boichat (nicolas@boichat.ch) Copyright(c) 2004 Oleg I. Vdovikin (oleg@cs.msu.su) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include #include #include "monitor_db.h" #include "ddcci.h" #include "internal.h" /* Localize, and alloc in libxml */ #ifdef HAVE_GETTEXT #define _D(text) xmlCharStrdup(dgettext(DBPACKAGE, text)) #else #define _D(text) xmlCharStrdup(text) #endif #define DBPACKAGE "ddccontrol-db" char* datadir = NULL; xmlDocPtr options_doc = NULL; int get_verbosity(); /* Defined in ddcci.c */ /* End of CAPS structs/functions */ int ddcci_get_value_list(xmlNodePtr options_control, xmlNodePtr mon_control, struct control_db *current_control, int command, int faulttolerance) { xmlNodePtr value, cur; xmlChar *options_valueid, *options_valuename, *mon_valueid; xmlChar *tmp; char *endptr; int nvalues = 0; /* Number of values in monitor control */ char *matchedvalues; /* Array of monitor values with (=1) or without (=0) corresponding global value */ int i; /* Compute nvalues */ cur = mon_control->xmlChildrenNode; while (cur) { if (cur->type == XML_ELEMENT_NODE) { nvalues++; } cur = cur->next; } matchedvalues = malloc((nvalues+1)*sizeof(char)); /* Will not be freed on error, no problem */ memset(matchedvalues, 0, nvalues*sizeof(char)); struct value_db *current_value = malloc(sizeof(struct value_db)); struct value_db **last_value_ref = ¤t_control->value_list; memset(current_value, 0, sizeof(struct value_db)); value = options_control->xmlChildrenNode; while (value != NULL) { if (!xmlStrcmp(value->name, (const xmlChar *) "value")) { options_valueid = xmlGetProp(value, BAD_CAST "id"); DDCCI_DB_RETURN_IF(options_valueid == NULL, -1, _("Can't find id property."), value); options_valuename = xmlGetProp(value, BAD_CAST "name"); if (command) { if (options_valuename == NULL) { options_valuename = current_control->name; } } else { DDCCI_DB_RETURN_IF(options_valuename == NULL, -1, _("Can't find name property."), value); } //printf("!!control id=%s group=%s name=%s\n", options_ctrlid, options_groupname, options_ctrlname); i = 0; cur = mon_control->xmlChildrenNode; while (1) { if (cur == NULL) { /* Control not found */ /* TODO: return */ break; } if (!(xmlStrcmp(cur->name, (const xmlChar *)"value"))) { mon_valueid = xmlGetProp(cur, BAD_CAST "id"); if (!xmlStrcmp(mon_valueid, options_valueid)) { current_value->id = xmlStrdup(options_valueid); current_value->name = _D((char*)options_valuename); tmp = xmlGetProp(cur, BAD_CAST "value"); DDCCI_DB_RETURN_IF(tmp == NULL, -1, _("Can't find value property."), cur); current_value->value = strtol((char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF(*endptr != 0, -1, _("Can't convert value to int."), cur); xmlFree(tmp); /*printf("**control id=%s group=%s name=%s address=%s\n", options_ctrlid, options_groupname, options_ctrlname, mon_address);*/ *last_value_ref = current_value; last_value_ref = ¤t_value->next; current_value = malloc(sizeof(struct value_db)); memset(current_value, 0, sizeof(struct value_db)); matchedvalues[i] = 1; xmlFree(mon_valueid); break; } else { xmlFree(mon_valueid); } } if (cur->type == XML_ELEMENT_NODE) i++; cur = cur->next; } xmlFree(options_valueid); xmlFree(options_valuename); } value = value->next; } // controls loop i = 0; cur = mon_control->xmlChildrenNode; while (cur) { if (cur->type == XML_ELEMENT_NODE) { if (!matchedvalues[i]) { tmp = xmlGetProp(cur, BAD_CAST "id"); fprintf(stderr, _("Element %s (id=%s) has not been found (line %ld).\n"), cur->name, tmp, XML_GET_LINE(cur)); xmlFree(tmp); if (!faulttolerance) return -1; } i++; } cur = cur->next; } free(matchedvalues); free(current_value); return 0; } int ddcci_add_controls_to_subgroup(xmlNodePtr control, xmlNodePtr mon_control, struct subgroup_db *current_group, struct vcp_entry** vcp, char* defined, char *matchedcontrols, int faulttolerance) { xmlNodePtr cur; xmlChar *mon_ctrlid; xmlChar *options_ctrlid, *options_ctrlname; enum refresh_type options_refresh; xmlChar *tmp; char *endptr; int i; struct control_db *current_control = malloc(sizeof(struct control_db)); struct control_db **last_control_ref = ¤t_group->control_list; memset(current_control, 0, sizeof(struct control_db)); /* TODO: fix it, don't break order. */ /* This might break control order, but it is no big deal... */ while (*last_control_ref) { last_control_ref = &(*last_control_ref)->next; } /* List controls in group (options.xml) */ while (control != NULL) { if (!xmlStrcmp(control->name, (const xmlChar *) "control")) { options_ctrlid = xmlGetProp(control, BAD_CAST "id"); DDCCI_DB_RETURN_IF(options_ctrlid == NULL, 0, _("Can't find id property."), control); options_ctrlname = xmlGetProp(control, BAD_CAST "name"); DDCCI_DB_RETURN_IF(options_ctrlname == NULL, 0, _("Can't find name property."), control); tmp = xmlGetProp(control, BAD_CAST "refresh"); if (tmp) { if (!xmlStrcmp(tmp, BAD_CAST "none")) { options_refresh = none; } else if (!xmlStrcmp(tmp, BAD_CAST "all")) { options_refresh = all; } else { DDCCI_DB_RETURN_IF(1, 0, _("Invalid refresh type (!= none, != all)."), control); } xmlFree(tmp); } else { options_refresh = none; } //printf("!!control id=%s group=%s name=%s\n", options_ctrlid, options_groupname, options_ctrlname); /* Find the related control in monitor specifications */ i = 0; cur = mon_control->xmlChildrenNode; while (1) { if (cur == NULL) { /* Control not found */ /* TODO: return */ break; } if (!(xmlStrcmp(cur->name, (const xmlChar *)"control"))) { mon_ctrlid = xmlGetProp(cur, BAD_CAST "id"); if (!xmlStrcmp(mon_ctrlid, options_ctrlid)) { tmp = xmlGetProp(cur, BAD_CAST "address"); DDCCI_DB_RETURN_IF(tmp == NULL, 0, _("Can't find address property."), cur); current_control->address = strtol((char*)tmp, &endptr, 0); DDCCI_DB_RETURN_IF(*endptr != 0, 0, _("Can't convert address to int."), cur); xmlFree(tmp); matchedcontrols[i] = 1; if (vcp[current_control->address] == NULL) { if (get_verbosity()) { printf(_("Control %s has been discarded by the caps string.\n"), options_ctrlid); } memset(current_control, 0, sizeof(struct control_db)); break; } if (defined[current_control->address]) { if (get_verbosity() > 1) { printf(_("Control %s (0x%02x) has already been defined.\n"), options_ctrlid, current_control->address); } memset(current_control, 0, sizeof(struct control_db)); break; } current_control->id = xmlStrdup(options_ctrlid); current_control->name = _D((char*)options_ctrlname); current_control->refresh = options_refresh; tmp = xmlGetProp(cur, BAD_CAST "delay"); if (tmp) { current_control->delay = strtol((char*)tmp, &endptr, 10); DDCCI_DB_RETURN_IF(*endptr != 0, 0, _("Can't convert delay to int."), cur); xmlFree(tmp); } else { current_control->delay = -1; } tmp = xmlGetProp(control, BAD_CAST "type"); DDCCI_DB_RETURN_IF(tmp == NULL, 0, _("Can't find type property."), control); if (!(xmlStrcmp(tmp, (const xmlChar *)"value"))) { current_control->type = value; } else if (!(xmlStrcmp(tmp, (const xmlChar *)"command"))) { current_control->type = command; if (ddcci_get_value_list(control, cur, current_control, 1, faulttolerance) < 0) { return 0; } if (current_control->value_list == NULL) { /* No value defined, use the default 0x01 value */ struct value_db *current_value = malloc(sizeof(struct value_db)); current_value->id = xmlCharStrdup("default"); current_value->name = _D((char*)options_ctrlname); current_value->value = 0x01; current_value->next = NULL; current_control->value_list = current_value; } } else if (!(xmlStrcmp(tmp, (const xmlChar *)"list"))) { current_control->type = list; if (ddcci_get_value_list(control, cur, current_control, 0, faulttolerance) < 0) { return 0; } } else { DDCCI_DB_RETURN_IF(1, 0, _("Invalid type."), control); } xmlFree(tmp); /*printf("**control id=%s group=%s name=%s address=%s\n", options_ctrlid, options_groupname, options_ctrlname, mon_address);*/ defined[current_control->address] = 1; *last_control_ref = current_control; last_control_ref = ¤t_control->next; current_control = malloc(sizeof(struct control_db)); memset(current_control, 0, sizeof(struct control_db)); xmlFree(mon_ctrlid); break; } else { xmlFree(mon_ctrlid); } } if (cur->type == XML_ELEMENT_NODE) i++; cur = cur->next; } xmlFree(options_ctrlid); xmlFree(options_ctrlname); } control = control->next; } // controls loop free(current_control); return 1; } /* recursionlevel: Protection against looping includes * default_caps: CAPS passed to ddcci_create_db (read from the monitor) * prof_caps: CAPS read from one of the profile (NULL if none has been read yet) */ int ddcci_create_db_protected( struct monitor_db* mon_db, const char* pnpname, struct caps* caps, int recursionlevel, char* defined, int faulttolerance) { xmlDocPtr mon_doc; xmlNodePtr root, mon_child, mon_control; xmlChar *tmp; char buffer[256]; if (options_doc == NULL) { fprintf(stderr, _("Database must be inited before reading a monitor file.\n")); return 0; } snprintf(buffer, 256, "%s/monitor/%s.xml", datadir, pnpname); mon_doc = xmlParseFile(buffer); if (mon_doc == NULL) { fprintf(stderr, _("Document not parsed successfully.\n")); return 0; } root = xmlDocGetRootElement(mon_doc); if (root == NULL) { fprintf(stderr, _("empty monitor/%s.xml\n"), pnpname); xmlFreeDoc(mon_doc); return 0; } if (xmlStrcmp(root->name, (const xmlChar *) "monitor")) { fprintf(stderr, _("monitor/%s.xml of the wrong type, root node %s != monitor"), pnpname, root->name); xmlFreeDoc(mon_doc); return 0; } if (!mon_db->name) { mon_db->name = xmlGetProp(root, BAD_CAST "name"); DDCCI_DB_RETURN_IF(mon_db->name == NULL, 0, _("Can't find name property."), root); } if ((mon_db->init == unknown) && (tmp = xmlGetProp(root, BAD_CAST "init"))) { if (!(xmlStrcmp(tmp, (const xmlChar *)"standard"))) { mon_db->init = standard; } else if (!(xmlStrcmp(tmp, (const xmlChar *)"samsung"))) { mon_db->init = samsung; } else { DDCCI_DB_RETURN_IF(1, 0, _("Invalid type."), root); } xmlFree(tmp); } if ((tmp = xmlGetProp(root, BAD_CAST "caps"))) { if (faulttolerance) fprintf(stderr, "Warning: caps property is deprecated.\n"); else { fprintf(stderr, "Error: caps property is deprecated.\n"); return 0; } } if ((tmp = xmlGetProp(root, BAD_CAST "include"))) { if (faulttolerance) fprintf(stderr, "Warning: include property is deprecated.\n"); else { fprintf(stderr, "Error: include property is deprecated.\n"); return 0; } } /* Create group-subgroup structure (we'll clean it up later) */ if (!recursionlevel) { /*printf("Creating struct...\n");*/ xmlNodePtr group, subgroup; xmlChar *options_groupname, *options_subgroupname; struct group_db *current_group; struct group_db **last_group_ref = &mon_db->group_list; /* List groups (options.xml) */ for (group = xmlDocGetRootElement(options_doc)->xmlChildrenNode; group != NULL; group = group->next) { options_groupname = NULL; if (xmlStrcmp(group->name, (const xmlChar *) "group")) { // Not a group continue; } *last_group_ref = current_group = malloc(sizeof(struct group_db)); memset(current_group, 0, sizeof(struct group_db)); last_group_ref = ¤t_group->next; /*printf("On group %p\n", current_group);*/ options_groupname = xmlGetProp(group, BAD_CAST "name"); DDCCI_DB_RETURN_IF(options_groupname == NULL, 0, _("Can't find name property."), group); current_group->name = _D((char*)options_groupname); /* Note: copy string, so we can free options_groupname */ xmlFree(options_groupname); struct subgroup_db *current_subgroup; struct subgroup_db **last_subgroup_ref = ¤t_group->subgroup_list; /* List subgroups (options.xml) */ for (subgroup = group->xmlChildrenNode; subgroup != NULL; subgroup = subgroup->next) { options_subgroupname = NULL; if (xmlStrcmp(subgroup->name, (const xmlChar *) "subgroup")) { // Not a subgroup continue; } *last_subgroup_ref = current_subgroup = malloc(sizeof(struct subgroup_db)); memset(current_subgroup, 0, sizeof(struct subgroup_db)); last_subgroup_ref = ¤t_subgroup->next; /*printf("On subgroup %p\n", current_subgroup);*/ options_subgroupname = xmlGetProp(subgroup, BAD_CAST "name"); DDCCI_DB_RETURN_IF(options_subgroupname == NULL, 0, _("Can't find name property."), subgroup); current_subgroup->name = _D((char*)options_subgroupname); /* Note: copy string, so we can free options_subgroupname */ xmlFree(options_subgroupname); current_subgroup->pattern = xmlGetProp(subgroup, BAD_CAST "pattern"); } } } mon_child = root->xmlChildrenNode; mon_control = NULL; int controls_or_include = 0; while (mon_child != NULL) { if (!xmlStrcmp(mon_child->name, (const xmlChar *) "caps")) { xmlChar* remove = xmlGetProp(mon_child, BAD_CAST "remove"); xmlChar* add = xmlGetProp(mon_child, BAD_CAST "add"); DDCCI_DB_RETURN_IF(!remove && !add, 0, _("Can't find add or remove property in caps."), mon_child); if (remove) DDCCI_DB_RETURN_IF(ddcci_parse_caps((char*)remove, caps, 0) <= 0, 0, _("Invalid remove caps."), mon_child); if (add) DDCCI_DB_RETURN_IF(ddcci_parse_caps((char*)add, caps, 1) <= 0, 0, _("Invalid add caps."), mon_child); } else if (!xmlStrcmp(mon_child->name, (const xmlChar *) "include")) { controls_or_include = 1; if (recursionlevel > 15) { fprintf(stderr, _("Error, include recursion level > 15 (file: %s).\n"), pnpname); mon_db = NULL; return 0; } xmlChar* file = xmlGetProp(mon_child, BAD_CAST "file"); DDCCI_DB_RETURN_IF(file == NULL, 0, _("Can't find file property."), mon_child); if (!ddcci_create_db_protected(mon_db, (char*)file, caps, recursionlevel+1, defined, faulttolerance)) { xmlFree(file); return 0; } xmlFree(file); } else if (!xmlStrcmp(mon_child->name, (const xmlChar *) "controls")) { DDCCI_DB_RETURN_IF(mon_control != NULL, 0, _("Two controls part in XML file."), root); controls_or_include = 1; mon_control = mon_child; /* Find, if possible, each element of options_doc in mon_doc. */ xmlNodePtr mon_control_child, group, subgroup, control; struct group_db *current_group = mon_db->group_list; int ncontrols = 0; /* Number of controls in monitor file */ char *matchedcontrols; /* Array of monitor controls with (=1) or without (=0) corresponding global control */ /* Compute nvalues */ mon_control_child = mon_control->xmlChildrenNode; while (mon_control_child) { if (mon_control_child->type == XML_ELEMENT_NODE) { ncontrols++; } mon_control_child = mon_control_child->next; } matchedcontrols = malloc((ncontrols+1)*sizeof(char)); /* Will not be freed on error, no problem */ memset(matchedcontrols, 0, ncontrols*sizeof(char)); /*printf("Filling struct...\n");*/ /* List groups (options.xml) */ for (group = xmlDocGetRootElement(options_doc)->xmlChildrenNode; group != NULL; group = group->next) { if (xmlStrcmp(group->name, (const xmlChar *) "group")) { // Not a group continue; } /*printf("On group %p\n", current_group);*/ struct subgroup_db *current_subgroup = current_group->subgroup_list; /* List subgroups (options.xml) */ for (subgroup = group->xmlChildrenNode; subgroup != NULL; subgroup = subgroup->next) { if (xmlStrcmp(subgroup->name, (const xmlChar *) "subgroup")) { // Not a subgroup continue; } /*printf("On subgroup %p\n", current_subgroup);*/ control = subgroup->xmlChildrenNode; DDCCI_DB_RETURN_IF( !ddcci_add_controls_to_subgroup(control, mon_control, current_subgroup, caps->vcp, defined, matchedcontrols, faulttolerance), 0, _("Error enumerating controls in subgroup."), control); current_subgroup = current_subgroup->next; } current_group = current_group->next; } int i = 0; mon_control_child = mon_control->xmlChildrenNode; while (mon_control_child) { if (mon_control_child->type == XML_ELEMENT_NODE) { if (!matchedcontrols[i]) { tmp = xmlGetProp(mon_control_child, BAD_CAST "id"); fprintf(stderr, _("Element %s (id=%s) has not been found (line %ld).\n"), mon_control_child->name, tmp, XML_GET_LINE(mon_control_child)); xmlFree(tmp); if (!faulttolerance) return 0; } i++; } mon_control_child = mon_control_child->next; } free(matchedcontrols); } /* mon_child->name == "controls" */ mon_child = mon_child->next; } if (!recursionlevel) { struct group_db** group; struct subgroup_db** subgroup; /* loop through groups */ group = &mon_db->group_list; while (*group != NULL) { /* loop through subgroups inside group */ subgroup = &((*group)->subgroup_list); while (*subgroup != NULL) { if (!(*subgroup)->control_list) { *subgroup = (*subgroup)->next; continue; } subgroup = &(*subgroup)->next; } if (!(*group)->subgroup_list) { *group = (*group)->next; continue; } group = &(*group)->next; } } if (!controls_or_include) { fprintf(stderr, _("document of the wrong type, can't find controls or include.\n")); xmlFreeDoc(mon_doc); return 0; } xmlFreeDoc(mon_doc); return 1; } /* * Logic concerning CAPS, see documentation Appendix D. * faulttolerance : * - 0 : fail on every database error " - 1 : do not fail on minor errors */ struct monitor_db* ddcci_create_db(const char* pnpname, struct caps* caps, int faulttolerance) { struct monitor_db* mon_db = malloc(sizeof(struct monitor_db)); memset(mon_db, 0, sizeof(struct monitor_db)); /* defined controls, when including another file, we don't define the same control 2 times. */ char defined[256]; memset(defined, 0, 256*sizeof(char)); if (!ddcci_create_db_protected(mon_db, pnpname, caps, 0, defined, faulttolerance)) { free(mon_db); mon_db = NULL; } if (mon_db && (mon_db->init == unknown)) { if (faulttolerance) { fprintf(stderr, "Warning: init mode not set, using standard.\n"); mon_db->init = standard; } else { fprintf(stderr, "Error: init mode not set.\n"); free(mon_db); mon_db = NULL; } } return mon_db; } void ddcci_free_db(struct monitor_db* monitor) { struct group_db *group, *ogroup; struct subgroup_db *subgroup, *osubgroup; struct control_db *control, *ocontrol; struct value_db *value, *ovalue; xmlFree(monitor->name); /* free groups */ group = monitor->group_list; while (group != NULL) { xmlFree(group->name); /* free subgroups inside group */ subgroup = group->subgroup_list; while (subgroup != NULL) { xmlFree(subgroup->name); xmlFree(subgroup->pattern); /* free controls inside subgroup */ control = subgroup->control_list; while (control != NULL) { xmlFree(control->name); xmlFree(control->id); /* free controls' value list */ value = control->value_list; while (value != NULL) { xmlFree(value->name); xmlFree(value->id); ovalue = value; value = ovalue->next; free(ovalue); } ocontrol = control; control = ocontrol->next; free(ocontrol); } osubgroup = subgroup; subgroup = osubgroup->next; free(osubgroup); } ogroup = group; group = ogroup->next; free(ogroup); } free(monitor); } /* usedatadir : data directory to use (if NULL, uses DATADIR preprocessor symbol) */ int ddcci_init_db(char* usedatadir) { xmlChar *version; xmlChar *date; char buffer[256]; xmlNodePtr cur; char* endptr; int iversion; if (usedatadir) { datadir = malloc(strlen(usedatadir)+1); strcpy(datadir, usedatadir); } else { datadir = malloc(strlen(DATADIR)+1); strcpy(datadir, DATADIR); } snprintf(buffer, 256, "%s/options.xml", datadir); options_doc = xmlParseFile(buffer); if (options_doc == NULL) { fprintf(stderr, _("Document not parsed successfully.\n")); return 0; } // Version check cur = xmlDocGetRootElement(options_doc); if (cur == NULL) { fprintf(stderr, _("empty options.xml\n")); xmlFreeDoc(options_doc); free(datadir); return 0; } if (xmlStrcmp(cur->name, (const xmlChar *) "options")) { fprintf(stderr, _("options.xml of the wrong type, root node %s != options"), cur->name); xmlFreeDoc(options_doc); free(datadir); return 0; } version = xmlGetProp(cur, BAD_CAST "dbversion"); date = xmlGetProp(cur, BAD_CAST "date"); if (!version) { fprintf(stderr, _("options.xml dbversion attribute missing, please update your database.\n")); xmlFreeDoc(options_doc); free(datadir); return 0; } if (!date) { fprintf(stderr, _("options.xml date attribute missing, please update your database.\n")); xmlFreeDoc(options_doc); free(datadir); return 0; } iversion = strtol((char*)version, &endptr, 0); DDCCI_DB_RETURN_IF(*endptr != 0, 0, _("Can't convert version to int."), cur); if (iversion > DBVERSION) { fprintf(stderr, _("options.xml dbversion (%d) is greater than the supported version (%d).\n"), iversion, DBVERSION); fprintf(stderr, _("Please update ddccontrol program.\n")); xmlFreeDoc(options_doc); free(datadir); return 0; } if (iversion < DBVERSION) { fprintf(stderr, _("options.xml dbversion (%d) is less than the supported version (%d).\n"), iversion, DBVERSION); fprintf(stderr, _("Please update ddccontrol database.\n")); xmlFreeDoc(options_doc); free(datadir); return 0; } /* TODO: do something with the date */ xmlFree(version); xmlFree(date); return 1; } void ddcci_release_db() { if (options_doc) { xmlFreeDoc(options_doc); } free(datadir); } ddccontrol-0.4.4/src/lib/monitor_db.h000066400000000000000000000040051327040342400175120ustar00rootroot00000000000000/* ddc/ci interface functions header Copyright(c) 2004 Nicolas Boichat (nicolas@boichat.ch) Copyright(c) 2004 Oleg I. Vdovikin (oleg@cs.msu.su) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef MONITOR_DB_H #define MONITOR_DB_H #include "ddcci.h" #include /* Current database version */ #define DBVERSION 3 enum control_type { value = 0, command = 1, list = 2 }; enum refresh_type { none = 0, all = 1 }; enum init_type { unknown = 0, standard = 1, samsung = 2 }; struct value_db { xmlChar* id; xmlChar* name; unsigned char value; struct value_db* next; }; struct control_db { xmlChar* id; xmlChar* name; unsigned char address; int delay; /* -1 indicate default value */ enum control_type type; enum refresh_type refresh; struct control_db* next; struct value_db* value_list; }; struct subgroup_db { xmlChar* name; xmlChar* pattern; struct subgroup_db* next; struct control_db* control_list; }; struct group_db { xmlChar* name; struct group_db* next; struct subgroup_db* subgroup_list; }; struct monitor_db { xmlChar* name; enum init_type init; struct group_db* group_list; }; struct monitor_db* ddcci_create_db(const char* pnpname, struct caps* caps, int faulttolerance); void ddcci_free_db(struct monitor_db* mon_db); int ddcci_init_db(char* usedatadir); void ddcci_release_db(); #endif