diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/attachments/20110207/b9c02b7a/attachment-0001.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/attachments/20110207/b9c02b7a/attachment-0001.html | 2443 |
1 files changed, 2443 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/attachments/20110207/b9c02b7a/attachment-0001.html b/zarb-ml/mageia-sysadm/attachments/20110207/b9c02b7a/attachment-0001.html new file mode 100644 index 000000000..b07329d45 --- /dev/null +++ b/zarb-ml/mageia-sysadm/attachments/20110207/b9c02b7a/attachment-0001.html @@ -0,0 +1,2443 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" +"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /> +<title>[460] Import cleaned xsettings-kde</title> +</head> +<body> + +<style type="text/css"><!-- +#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; } +#msg dl.meta dt { float: left; width: 6em; font-weight: bold; } +#msg dt:after { content:':';} +#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; } +#msg dl a { font-weight: bold} +#msg dl a:link { color:#fc3; } +#msg dl a:active { color:#ff0; } +#msg dl a:visited { color:#cc6; } +h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; } +#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; } +#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; } +#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; } +#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; } +#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; } +#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; } +#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; } +#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; } +#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; } +#logmsg pre { background: #eee; padding: 1em; } +#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;} +#logmsg dl { margin: 0; } +#logmsg dt { font-weight: bold; } +#logmsg dd { margin: 0; padding: 0 0 0.5em 0; } +#logmsg dd:before { content:'\00bb';} +#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; } +#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; } +#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; } +#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; } +#logmsg table th.Corner { text-align: left; } +#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; } +#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; } +#patch { width: 100%; } +--></style> +<div id="msg"> +<dl class="meta"> +<dt>Revision</dt> <dd>460</dd> +<dt>Author</dt> <dd>dmorgan</dd> +<dt>Date</dt> <dd>2011-02-07 10:11:39 +0100 (Mon, 07 Feb 2011)</dd> +</dl> + +<h3>Log Message</h3> +<pre>Import cleaned xsettings-kde</pre> + +<h3>Added Paths</h3> +<ul> +<li>theme/xsettings-kde/</li> +<li>theme/xsettings-kde/trunk/</li> +<li><a href="#themexsettingskdetrunkcvsignore">theme/xsettings-kde/trunk/.cvsignore</a></li> +<li><a href="#themexsettingskdetrunkgitignore">theme/xsettings-kde/trunk/.gitignore</a></li> +<li><a href="#themexsettingskdetrunkCOPYING">theme/xsettings-kde/trunk/COPYING</a></li> +<li><a href="#themexsettingskdetrunkChangeLog">theme/xsettings-kde/trunk/ChangeLog</a></li> +<li><a href="#themexsettingskdetrunkMakefile">theme/xsettings-kde/trunk/Makefile</a></li> +<li><a href="#themexsettingskdetrunkREADME">theme/xsettings-kde/trunk/README</a></li> +<li><a href="#themexsettingskdetrunkxsettingscommonc">theme/xsettings-kde/trunk/xsettings-common.c</a></li> +<li><a href="#themexsettingskdetrunkxsettingscommonh">theme/xsettings-kde/trunk/xsettings-common.h</a></li> +<li><a href="#themexsettingskdetrunkxsettingskdec">theme/xsettings-kde/trunk/xsettings-kde.c</a></li> +<li><a href="#themexsettingskdetrunkxsettingsmanagerc">theme/xsettings-kde/trunk/xsettings-manager.c</a></li> +<li><a href="#themexsettingskdetrunkxsettingsmanagerh">theme/xsettings-kde/trunk/xsettings-manager.h</a></li> +</ul> + +</div> +<div id="patch"><pre> +<a id="themexsettingskdetrunkcvsignore">Added: theme/xsettings-kde/trunk/.cvsignore</a> +=================================================================== +--- theme/xsettings-kde/trunk/.cvsignore (rev 0) ++++ theme/xsettings-kde/trunk/.cvsignore 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1 @@ ++*.swp + +<a id="themexsettingskdetrunkgitignore">Added: theme/xsettings-kde/trunk/.gitignore</a> +=================================================================== +--- theme/xsettings-kde/trunk/.gitignore (rev 0) ++++ theme/xsettings-kde/trunk/.gitignore 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,3 @@ ++*.o ++xsettings-kde ++*.patch + +<a id="themexsettingskdetrunkCOPYING">Added: theme/xsettings-kde/trunk/COPYING</a> +=================================================================== +--- theme/xsettings-kde/trunk/COPYING (rev 0) ++++ theme/xsettings-kde/trunk/COPYING 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,340 @@ ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 ++ ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc. ++ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ Everyone is permitted to copy and distribute verbatim copies ++ of this license document, but changing it is not allowed. ++ ++ Preamble ++ ++ The licenses for most software are designed to take away your ++freedom to share and change it. By contrast, the GNU General Public ++License is intended to guarantee your freedom to share and change free ++software--to make sure the software is free for all its users. This ++General Public License applies to most of the Free Software ++Foundation's software and to any other program whose authors commit to ++using it. (Some other Free Software Foundation software is covered by ++the GNU Library General Public License instead.) You can apply it to ++your programs, too. ++ ++ When we speak of free software, we are referring to freedom, not ++price. Our General Public Licenses are designed to make sure that you ++have the freedom to distribute copies of free software (and charge for ++this service if you wish), that you receive source code or can get it ++if you want it, that you can change the software or use pieces of it ++in new free programs; and that you know you can do these things. ++ ++ To protect your rights, we need to make restrictions that forbid ++anyone to deny you these rights or to ask you to surrender the rights. ++These restrictions translate to certain responsibilities for you if you ++distribute copies of the software, or if you modify it. ++ ++ For example, if you distribute copies of such a program, whether ++gratis or for a fee, you must give the recipients all the rights that ++you have. You must make sure that they, too, receive or can get the ++source code. And you must show them these terms so they know their ++rights. ++ ++ We protect your rights with two steps: (1) copyright the software, and ++(2) offer you this license which gives you legal permission to copy, ++distribute and/or modify the software. ++ ++ Also, for each author's protection and ours, we want to make certain ++that everyone understands that there is no warranty for this free ++software. If the software is modified by someone else and passed on, we ++want its recipients to know that what they have is not the original, so ++that any problems introduced by others will not reflect on the original ++authors' reputations. ++ ++ Finally, any free program is threatened constantly by software ++patents. We wish to avoid the danger that redistributors of a free ++program will individually obtain patent licenses, in effect making the ++program proprietary. To prevent this, we have made it clear that any ++patent must be licensed for everyone's free use or not licensed at all. ++ ++ The precise terms and conditions for copying, distribution and ++modification follow. ++ ++ GNU GENERAL PUBLIC LICENSE ++ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION ++ ++ 0. This License applies to any program or other work which contains ++a notice placed by the copyright holder saying it may be distributed ++under the terms of this General Public License. The "Program", below, ++refers to any such program or work, and a "work based on the Program" ++means either the Program or any derivative work under copyright law: ++that is to say, a work containing the Program or a portion of it, ++either verbatim or with modifications and/or translated into another ++language. (Hereinafter, translation is included without limitation in ++the term "modification".) Each licensee is addressed as "you". ++ ++Activities other than copying, distribution and modification are not ++covered by this License; they are outside its scope. The act of ++running the Program is not restricted, and the output from the Program ++is covered only if its contents constitute a work based on the ++Program (independent of having been made by running the Program). ++Whether that is true depends on what the Program does. ++ ++ 1. You may copy and distribute verbatim copies of the Program's ++source code as you receive it, in any medium, provided that you ++conspicuously and appropriately publish on each copy an appropriate ++copyright notice and disclaimer of warranty; keep intact all the ++notices that refer to this License and to the absence of any warranty; ++and give any other recipients of the Program a copy of this License ++along with the Program. ++ ++You may charge a fee for the physical act of transferring a copy, and ++you may at your option offer warranty protection in exchange for a fee. ++ ++ 2. You may modify your copy or copies of the Program or any portion ++of it, thus forming a work based on the Program, and copy and ++distribute such modifications or work under the terms of Section 1 ++above, provided that you also meet all of these conditions: ++ ++ a) You must cause the modified files to carry prominent notices ++ stating that you changed the files and the date of any change. ++ ++ b) You must cause any work that you distribute or publish, that in ++ whole or in part contains or is derived from the Program or any ++ part thereof, to be licensed as a whole at no charge to all third ++ parties under the terms of this License. ++ ++ c) If the modified program normally reads commands interactively ++ when run, you must cause it, when started running for such ++ interactive use in the most ordinary way, to print or display an ++ announcement including an appropriate copyright notice and a ++ notice that there is no warranty (or else, saying that you provide ++ a warranty) and that users may redistribute the program under ++ these conditions, and telling the user how to view a copy of this ++ License. (Exception: if the Program itself is interactive but ++ does not normally print such an announcement, your work based on ++ the Program is not required to print an announcement.) ++ ++These requirements apply to the modified work as a whole. If ++identifiable sections of that work are not derived from the Program, ++and can be reasonably considered independent and separate works in ++themselves, then this License, and its terms, do not apply to those ++sections when you distribute them as separate works. But when you ++distribute the same sections as part of a whole which is a work based ++on the Program, the distribution of the whole must be on the terms of ++this License, whose permissions for other licensees extend to the ++entire whole, and thus to each and every part regardless of who wrote it. ++ ++Thus, it is not the intent of this section to claim rights or contest ++your rights to work written entirely by you; rather, the intent is to ++exercise the right to control the distribution of derivative or ++collective works based on the Program. ++ ++In addition, mere aggregation of another work not based on the Program ++with the Program (or with a work based on the Program) on a volume of ++a storage or distribution medium does not bring the other work under ++the scope of this License. ++ ++ 3. You may copy and distribute the Program (or a work based on it, ++under Section 2) in object code or executable form under the terms of ++Sections 1 and 2 above provided that you also do one of the following: ++ ++ a) Accompany it with the complete corresponding machine-readable ++ source code, which must be distributed under the terms of Sections ++ 1 and 2 above on a medium customarily used for software interchange; or, ++ ++ b) Accompany it with a written offer, valid for at least three ++ years, to give any third party, for a charge no more than your ++ cost of physically performing source distribution, a complete ++ machine-readable copy of the corresponding source code, to be ++ distributed under the terms of Sections 1 and 2 above on a medium ++ customarily used for software interchange; or, ++ ++ c) Accompany it with the information you received as to the offer ++ to distribute corresponding source code. (This alternative is ++ allowed only for noncommercial distribution and only if you ++ received the program in object code or executable form with such ++ an offer, in accord with Subsection b above.) ++ ++The source code for a work means the preferred form of the work for ++making modifications to it. For an executable work, complete source ++code means all the source code for all modules it contains, plus any ++associated interface definition files, plus the scripts used to ++control compilation and installation of the executable. However, as a ++special exception, the source code distributed need not include ++anything that is normally distributed (in either source or binary ++form) with the major components (compiler, kernel, and so on) of the ++operating system on which the executable runs, unless that component ++itself accompanies the executable. ++ ++If distribution of executable or object code is made by offering ++access to copy from a designated place, then offering equivalent ++access to copy the source code from the same place counts as ++distribution of the source code, even though third parties are not ++compelled to copy the source along with the object code. ++ ++ 4. You may not copy, modify, sublicense, or distribute the Program ++except as expressly provided under this License. Any attempt ++otherwise to copy, modify, sublicense or distribute the Program is ++void, and will automatically terminate your rights under this License. ++However, parties who have received copies, or rights, from you under ++this License will not have their licenses terminated so long as such ++parties remain in full compliance. ++ ++ 5. You are not required to accept this License, since you have not ++signed it. However, nothing else grants you permission to modify or ++distribute the Program or its derivative works. These actions are ++prohibited by law if you do not accept this License. Therefore, by ++modifying or distributing the Program (or any work based on the ++Program), you indicate your acceptance of this License to do so, and ++all its terms and conditions for copying, distributing or modifying ++the Program or works based on it. ++ ++ 6. Each time you redistribute the Program (or any work based on the ++Program), the recipient automatically receives a license from the ++original licensor to copy, distribute or modify the Program subject to ++these terms and conditions. You may not impose any further ++restrictions on the recipients' exercise of the rights granted herein. ++You are not responsible for enforcing compliance by third parties to ++this License. ++ ++ 7. If, as a consequence of a court judgment or allegation of patent ++infringement or for any other reason (not limited to patent issues), ++conditions are imposed on you (whether by court order, agreement or ++otherwise) that contradict the conditions of this License, they do not ++excuse you from the conditions of this License. If you cannot ++distribute so as to satisfy simultaneously your obligations under this ++License and any other pertinent obligations, then as a consequence you ++may not distribute the Program at all. For example, if a patent ++license would not permit royalty-free redistribution of the Program by ++all those who receive copies directly or indirectly through you, then ++the only way you could satisfy both it and this License would be to ++refrain entirely from distribution of the Program. ++ ++If any portion of this section is held invalid or unenforceable under ++any particular circumstance, the balance of the section is intended to ++apply and the section as a whole is intended to apply in other ++circumstances. ++ ++It is not the purpose of this section to induce you to infringe any ++patents or other property right claims or to contest validity of any ++such claims; this section has the sole purpose of protecting the ++integrity of the free software distribution system, which is ++implemented by public license practices. Many people have made ++generous contributions to the wide range of software distributed ++through that system in reliance on consistent application of that ++system; it is up to the author/donor to decide if he or she is willing ++to distribute software through any other system and a licensee cannot ++impose that choice. ++ ++This section is intended to make thoroughly clear what is believed to ++be a consequence of the rest of this License. ++ ++ 8. If the distribution and/or use of the Program is restricted in ++certain countries either by patents or by copyrighted interfaces, the ++original copyright holder who places the Program under this License ++may add an explicit geographical distribution limitation excluding ++those countries, so that distribution is permitted only in or among ++countries not thus excluded. In such case, this License incorporates ++the limitation as if written in the body of this License. ++ ++ 9. The Free Software Foundation may publish revised and/or new versions ++of the General Public License from time to time. Such new versions will ++be similar in spirit to the present version, but may differ in detail to ++address new problems or concerns. ++ ++Each version is given a distinguishing version number. If the Program ++specifies a version number of this License which applies to it and "any ++later version", you have the option of following the terms and conditions ++either of that version or of any later version published by the Free ++Software Foundation. If the Program does not specify a version number of ++this License, you may choose any version ever published by the Free Software ++Foundation. ++ ++ 10. If you wish to incorporate parts of the Program into other free ++programs whose distribution conditions are different, write to the author ++to ask for permission. For software which is copyrighted by the Free ++Software Foundation, write to the Free Software Foundation; we sometimes ++make exceptions for this. Our decision will be guided by the two goals ++of preserving the free status of all derivatives of our free software and ++of promoting the sharing and reuse of software generally. ++ ++ NO WARRANTY ++ ++ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY ++FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN ++OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES ++PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED ++OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ++MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS ++TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE ++PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, ++REPAIR OR CORRECTION. ++ ++ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING ++WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR ++REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, ++INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING ++OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED ++TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY ++YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER ++PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ++POSSIBILITY OF SUCH DAMAGES. ++ ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs ++ ++ If you develop a new program, and you want it to be of the greatest ++possible use to the public, the best way to achieve this is to make it ++free software which everyone can redistribute and change under these terms. ++ ++ To do so, attach the following notices to the program. It is safest ++to attach them to the start of each source file to most effectively ++convey the exclusion of warranty; and each file should have at least ++the "copyright" line and a pointer to where the full notice is found. ++ ++ <one line to give the program's name and a brief idea of what it does.> ++ Copyright (C) <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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++ ++Also add information on how to contact you by electronic and paper mail. ++ ++If the program is interactive, make it output a short notice like this ++when it starts in an interactive mode: ++ ++ Gnomovision version 69, Copyright (C) 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. + +<a id="themexsettingskdetrunkChangeLog">Added: theme/xsettings-kde/trunk/ChangeLog</a> +=================================================================== +--- theme/xsettings-kde/trunk/ChangeLog (rev 0) ++++ theme/xsettings-kde/trunk/ChangeLog 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,391 @@ ++2009-08-19 10:01 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Release 0.11 ++ ++2009-08-19 10:01 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Fix detection for Ia Ora-kde ++ ++2009-03-26 17:07 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Thu 26 Mar 2009 06:07:56 PM ++ CET ++ ++2009-03-26 17:04 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Thu 26 Mar 2009 06:04:21 PM ++ CET ++ ++2009-03-26 17:04 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Fix build when CFLAGS is redefined ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Thu 26 Mar 2009 05:38:50 PM ++ CET ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Release 0.10 ++ ++2009-03-26 17:04 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Thu 26 Mar 2009 06:04:21 PM ++ CET ++ ++2009-03-26 17:04 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Fix build when CFLAGS is redefined ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Thu 26 Mar 2009 05:38:50 PM ++ CET ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Release 0.10 ++ ++2009-03-26 17:04 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Fix build when CFLAGS is redefined ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Thu 26 Mar 2009 05:38:50 PM ++ CET ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Release 0.10 ++ ++2009-03-26 16:38 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Release 0.10 ++ ++2009-02-11 14:21 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Use pkg-config for x11 too ++ ++2009-02-11 14:15 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: use a thread instead of a timer ++ ++2009-02-11 14:15 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * .gitignore: Add .gitignore file ++ ++2009-02-03 13:32 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: drop DPI settings if they're not set in KDE ++ ++ Setting them to 0 or -1 sets them to 96dpi instead of the actual ++ dpi ++ setting since gdk doesn't reprobe this. So intead of adding the ++ whole ++ logic simply fall back to what gdk probed during application ++ startup. ++ ++2009-02-03 13:32 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Show icons in buttons when running under KDE4 ++ ++2009-02-03 13:32 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: use glib event loop ++ ++2008-09-29 17:45 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Mon 29 Sep 2008 07:45:17 PM ++ CEST ++ ++2008-09-29 17:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Mon 29 Sep 2008 07:44:36 PM ++ CEST ++ ++2008-09-29 17:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: - Release 0.9 : fix color scheme ++ support for KDE4 ++ ++2008-09-29 17:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Mon 29 Sep 2008 07:44:36 PM ++ CEST ++ ++2008-09-29 17:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: - Release 0.9 : fix color scheme ++ support for KDE4 ++ ++2008-09-29 17:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: - Release 0.9 : fix color scheme ++ support for KDE4 ++ ++2008-09-05 16:59 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Fri 05 Sep 2008 06:59:41 PM ++ CEST ++ ++2008-09-05 16:59 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Release 0.8 ++ ++2008-09-05 16:59 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: - Add support for DPI, change fileselector ++ backend to gio ++ ++2008-09-05 16:58 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: - Add KDE4 support ++ ++2008-09-05 16:59 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: - Release 0.8 ++ ++2008-09-05 16:59 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: - Add support for DPI, change fileselector ++ backend to gio ++ ++2008-09-05 16:58 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: - Add KDE4 support ++ ++2008-02-08 17:21 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: - Release 0.7 ++ - don't set theme name in XSettings if KDE has set it itself ++ - fix memleak ++ ++2007-09-26 12:42 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Wed 26 Sep 2007 02:42:28 PM ++ CEST ++ ++2007-09-26 12:41 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: Release 0.6 ++ - Failover correctly when some configuration files are missing ++ ++2007-09-26 12:41 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: Release 0.6 ++ - Failover correctly when some configuration files are missing ++ ++2007-09-21 16:47 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Use correct svnroot ++ ++2007-09-21 16:45 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Fri 21 Sep 2007 06:45:10 PM ++ CEST ++ ++2007-09-21 16:45 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Add svnroot ++ ++2007-09-21 16:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Fri 21 Sep 2007 06:44:24 PM ++ CEST ++ ++2007-09-21 16:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix typo ++ ++2007-09-21 16:43 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix support for SVN ++ ++2007-09-21 16:43 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Fix support for multiple profiles ++ ++2007-09-21 16:45 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Add svnroot ++ ++2007-09-21 16:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * ChangeLog: Generated by svn2cl the Fri 21 Sep 2007 06:44:24 PM ++ CEST ++ ++2007-09-21 16:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix typo ++ ++2007-09-21 16:43 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix support for SVN ++ ++2007-09-21 16:43 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Fix support for multiple profiles ++ ++2007-09-21 16:44 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix typo ++ ++2007-09-21 16:43 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix support for SVN ++ ++2007-09-21 16:43 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Fix support for multiple profiles ++ ++2007-09-17 16:59 Olivier Blin <oblin at mandriva.com> ++ ++ * : move xsettings-kde in theme ++ ++2006-09-13 17:03 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 13_Sep ++ ++2006-09-13 17:02 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Don't apply theme if ~/.gtkrc-2.0 exists ++ ++2006-09-13 16:35 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 13_Sep ++ ++2006-09-13 16:35 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : 2006-09-13 Frederic Crozat <fcrozat@mandriva.com> ++ ++ * Makefile: ++ Release 0.4 ++ X11 libs are in libdir now ++ ++ * xsettings-kde.c: (readConfig): ++ change theme according to color scheme for Ia Ora, ++ fix theme detection ++ support kde profile ++ ++2006-03-06 17:14 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 06_Mar ++ ++2006-03-06 17:14 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : * Makefile: Release 0.3 ++ * xsettings-kde.c: (initial_init): ++ Add support for Net/FallbackIconTheme (Mdk bug #19441) ++ ++2005-08-25 16:35 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 25_Aug ++ ++2005-08-25 16:35 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Fix typo ++ ++2005-08-25 16:21 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 25_Aug ++ ++2005-08-25 16:21 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Release 0.2 ++ ++2005-08-25 16:20 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Set GTK file selection backend to gnome-vfs one. ++ ++2005-07-27 08:04 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 27_jui ++ ++2005-07-27 08:03 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Multiscreen support ++ ++2005-07-27 07:15 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 27_jui ++ ++2005-07-27 07:15 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : add license and README ++ ++2005-07-27 07:00 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Generated by cvs2cl the 27_jui ++ ++2005-07-27 06:56 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Fix make dist/distcheck ++ ++2005-07-27 06:54 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : initial import ++ ++2005-07-27 06:53 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * : Initial import ++ ++2005-07-27 06:53 ++ ++ * : New repository initialized by cvs2svn. ++ ++2006-09-13 19:02 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Don't apply theme if ~/.gtkrc-2.0 exists ++ ++2006-09-13 18:35 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: 2006-09-13 Frederic Crozat ++ <fcrozat@mandriva.com> ++ ++ * Makefile: ++ Release 0.4 ++ X11 libs are in libdir now ++ ++ * xsettings-kde.c: (readConfig): ++ change theme according to color scheme for Ia Ora, ++ fix theme detection ++ support kde profile ++ ++2006-03-06 18:14 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile, xsettings-kde.c: * Makefile: Release 0.3 ++ * xsettings-kde.c: (initial_init): ++ Add support for Net/FallbackIconTheme (Mdk bug #19441) ++ ++2005-08-25 18:35 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Fix typo ++ ++2005-08-25 18:21 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Release 0.2 ++ ++2005-08-25 18:20 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Set GTK file selection backend to gnome-vfs one. ++ ++2005-07-27 10:03 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * xsettings-kde.c: Multiscreen support ++ ++2005-07-27 09:15 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * COPYING, README: add license and README ++ ++2005-07-27 08:56 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * Makefile: Fix make dist/distcheck ++ ++2005-07-27 08:53 Frederic Crozat <fcrozat at mandriva.com> ++ ++ * .cvsignore, Makefile, xsettings-common.c, xsettings-common.h, ++ xsettings-kde.c, xsettings-manager.c, xsettings-manager.h: ++ Initial import ++ + +<a id="themexsettingskdetrunkMakefile">Added: theme/xsettings-kde/trunk/Makefile</a> +=================================================================== +--- theme/xsettings-kde/trunk/Makefile (rev 0) ++++ theme/xsettings-kde/trunk/Makefile 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,50 @@ ++PACKAGE=xsettings-kde ++VERSION=0.11 ++lib=lib ++TAG := $(shell echo "V$(VERSION)_$(RELEASE)" | tr -- '-.' '__') ++SVNROOT = svn+ssh://svn.mageia.org/svn/soft/theme/$(PACKAGE) ++ ++CFLAGS= -Wall -g ++xsettings_kde_CFLAGS = $(shell pkg-config --cflags x11 gio-2.0 gthread-2.0) ++ ++xsettings_kde_LDFLAGS = $(shell pkg-config --libs x11 gio-2.0 gthread-2.0) ++ ++manager_objects_CFLAGS = $(shell pkg-config --cflags x11 gio-2.0 gthread-2.0) ++manager_objects = xsettings-kde.o xsettings-common.o xsettings-manager.o ++ ++.c.o: ++ $(CC) -c $(CFLAGS) $(xsettings_kde_CFLAGS) $< -o $@ ++ ++all: xsettings-kde ++ ++xsettings-kde: $(manager_objects) ++ $(CC) -o $@ $(manager_objects) $(LDFLAGS) $(xsettings_kde_LDFLAGS) ++ ++changelog: ++ svn2cl --authors ../common/username.xml --accum ++ rm -f ChangeLog.bak ++ svn commit -m "Generated by svn2cl the `date '+%c'`" ChangeLog ++ ++clean: ++ rm -f *.o xsettings-kde ++ ++checktag: ++ @if [ "x$(VERSION)" == "x" -o "x$(RELEASE)" = "x" ]; then \ ++ echo usage is "make VERSION=version_number RELEASE=release_number dist" ; \ ++ exit 1 ; \ ++ fi ++ ++dist: checktag changelog ++ svn copy $(SVNROOT)/trunk $(SVNROOT)/tags/$(TAG) -m "$(TAG)" ++ svn export $(SVNROOT)/tags/$(TAG) $(PACKAGE)-$(VERSION) ++ tar cvf $(PACKAGE)-$(VERSION).tar $(PACKAGE)-$(VERSION) ++ bzip2 -9vf $(PACKAGE)-$(VERSION).tar ++ rm -rf $(PACKAGE)-$(VERSION) ++ ++distcheck: dist ++ distdir=$(PACKAGE)-$(VERSION) ; \ ++ tar xvfj $$distdir.tar.bz2 && \ ++ cd $$distdir && \ ++ make && \ ++ cd .. && \ ++ rm -rf $$distdir + + +Property changes on: theme/xsettings-kde/trunk/Makefile +___________________________________________________________________ +<a id="svneolstyle">Added: svn:eol-style</a> + + native + +<a id="themexsettingskdetrunkREADME">Added: theme/xsettings-kde/trunk/README</a> +=================================================================== +--- theme/xsettings-kde/trunk/README (rev 0) ++++ theme/xsettings-kde/trunk/README 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,14 @@ ++XSettings-KDE is a XSettings (http://freedesktop.org/wiki/Standards_2fxsettings_2dspec ) daemon, wrapping some KDE configuration paramaters for XSettings aware applications, such as most GTK+ 2 applications and GNOME 2 applications. ++ ++Currently, it allows those applications to receive instant notification of the following changes in KDE configuration : ++-default font name and size ++-theme name ++-icon theme name ++-maximum interval of time between two clicks to be considered as a double-click ++-threshold to trigger drag and drop ++-icon presence in stock buttons ++-toolbar style (text only, icons only, ...) ++ ++This daemon is based on Owen Taylor xsetting reference implementation which can be found on http://cvs.freedesktop.org/xsettings/xsettings/ ++ ++ + +<a id="themexsettingskdetrunkxsettingscommonc">Added: theme/xsettings-kde/trunk/xsettings-common.c</a> +=================================================================== +--- theme/xsettings-kde/trunk/xsettings-common.c (rev 0) ++++ theme/xsettings-kde/trunk/xsettings-common.c 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,264 @@ ++/* ++ * Copyright © 2001 Red Hat, Inc. ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Red Hat not be used in advertising or ++ * publicity pertaining to distribution of the software without specific, ++ * written prior permission. Red Hat makes no representations about the ++ * suitability of this software for any purpose. It is provided "as is" ++ * without express or implied warranty. ++ * ++ * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT ++ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ * Author: Owen Taylor, Red Hat, Inc. ++ */ ++#include "string.h" ++#include "stdlib.h" ++ ++#include <X11/Xlib.h> ++#include <X11/Xmd.h> /* For CARD32 */ ++ ++#include "xsettings-common.h" ++ ++XSettingsSetting * ++xsettings_setting_copy (XSettingsSetting *setting) ++{ ++ XSettingsSetting *result; ++ size_t str_len; ++ ++ result = malloc (sizeof *result); ++ if (!result) ++ return NULL; ++ ++ str_len = strlen (setting->name); ++ result->name = malloc (str_len + 1); ++ if (!result->name) ++ goto err; ++ ++ memcpy (result->name, setting->name, str_len + 1); ++ ++ result->type = setting->type; ++ ++ switch (setting->type) ++ { ++ case XSETTINGS_TYPE_INT: ++ result->data.v_int = setting->data.v_int; ++ break; ++ case XSETTINGS_TYPE_COLOR: ++ result->data.v_color = setting->data.v_color; ++ break; ++ case XSETTINGS_TYPE_STRING: ++ str_len = strlen (setting->data.v_string); ++ result->data.v_string = malloc (str_len + 1); ++ if (!result->data.v_string) ++ goto err; ++ ++ memcpy (result->data.v_string, setting->data.v_string, str_len + 1); ++ break; ++ } ++ ++ result->last_change_serial = setting->last_change_serial; ++ ++ return result; ++ ++ err: ++ if (result->name) ++ free (result->name); ++ free (result); ++ ++ return NULL; ++} ++ ++XSettingsList * ++xsettings_list_copy (XSettingsList *list) ++{ ++ XSettingsList *new = NULL; ++ XSettingsList *old_iter = list; ++ XSettingsList *new_iter = NULL; ++ ++ while (old_iter) ++ { ++ XSettingsList *new_node; ++ ++ new_node = malloc (sizeof *new_node); ++ if (!new_node) ++ goto error; ++ ++ new_node->setting = xsettings_setting_copy (old_iter->setting); ++ if (!new_node->setting) ++ { ++ free (new_node); ++ goto error; ++ } ++ ++ if (new_iter) ++ new_iter->next = new_node; ++ else ++ new = new_node; ++ ++ new_iter = new_node; ++ ++ old_iter = old_iter->next; ++ } ++ ++ return new; ++ ++ error: ++ xsettings_list_free (new); ++ return NULL; ++} ++ ++int ++xsettings_setting_equal (XSettingsSetting *setting_a, ++ XSettingsSetting *setting_b) ++{ ++ if (setting_a->type != setting_b->type) ++ return 0; ++ ++ if (strcmp (setting_a->name, setting_b->name) != 0) ++ return 0; ++ ++ switch (setting_a->type) ++ { ++ case XSETTINGS_TYPE_INT: ++ return setting_a->data.v_int == setting_b->data.v_int; ++ case XSETTINGS_TYPE_COLOR: ++ return (setting_a->data.v_color.red == setting_b->data.v_color.red && ++ setting_a->data.v_color.green == setting_b->data.v_color.green && ++ setting_a->data.v_color.blue == setting_b->data.v_color.blue && ++ setting_a->data.v_color.alpha == setting_b->data.v_color.alpha); ++ case XSETTINGS_TYPE_STRING: ++ return strcmp (setting_a->data.v_string, setting_b->data.v_string) == 0; ++ } ++ ++ return 0; ++} ++ ++void ++xsettings_setting_free (XSettingsSetting *setting) ++{ ++ if (setting->type == XSETTINGS_TYPE_STRING) ++ free (setting->data.v_string); ++ ++ if (setting->name) ++ free (setting->name); ++ ++ free (setting); ++} ++ ++void ++xsettings_list_free (XSettingsList *list) ++{ ++ while (list) ++ { ++ XSettingsList *next = list->next; ++ ++ xsettings_setting_free (list->setting); ++ free (list); ++ ++ list = next; ++ } ++} ++ ++XSettingsResult ++xsettings_list_insert (XSettingsList **list, ++ XSettingsSetting *setting) ++{ ++ XSettingsList *node; ++ XSettingsList *iter; ++ XSettingsList *last = NULL; ++ ++ node = malloc (sizeof *node); ++ if (!node) ++ return XSETTINGS_NO_MEM; ++ node->setting = setting; ++ ++ iter = *list; ++ while (iter) ++ { ++ int cmp = strcmp (setting->name, iter->setting->name); ++ ++ if (cmp < 0) ++ break; ++ else if (cmp == 0) ++ { ++ free (node); ++ return XSETTINGS_DUPLICATE_ENTRY; ++ } ++ ++ last = iter; ++ iter = iter->next; ++ } ++ ++ if (last) ++ last->next = node; ++ else ++ *list = node; ++ ++ node->next = iter; ++ ++ return XSETTINGS_SUCCESS; ++} ++ ++XSettingsResult ++xsettings_list_delete (XSettingsList **list, ++ const char *name) ++{ ++ XSettingsList *iter; ++ XSettingsList *last = NULL; ++ ++ iter = *list; ++ while (iter) ++ { ++ if (strcmp (name, iter->setting->name) == 0) ++ { ++ if (last) ++ last->next = iter->next; ++ else ++ *list = iter->next; ++ ++ xsettings_setting_free (iter->setting); ++ free (iter); ++ ++ return XSETTINGS_SUCCESS; ++ } ++ ++ last = iter; ++ iter = iter->next; ++ } ++ ++ return XSETTINGS_FAILED; ++} ++ ++XSettingsSetting * ++xsettings_list_lookup (XSettingsList *list, ++ const char *name) ++{ ++ XSettingsList *iter; ++ ++ iter = list; ++ while (iter) ++ { ++ if (strcmp (name, iter->setting->name) == 0) ++ return iter->setting; ++ ++ iter = iter->next; ++ } ++ ++ return NULL; ++} ++ ++char ++xsettings_byte_order (void) ++{ ++ CARD32 myint = 0x01020304; ++ return (*(char *)&myint == 1) ? MSBFirst : LSBFirst; ++} + + +Property changes on: theme/xsettings-kde/trunk/xsettings-common.c +___________________________________________________________________ +Added: svn:eol-style + + native + +<a id="themexsettingskdetrunkxsettingscommonh">Added: theme/xsettings-kde/trunk/xsettings-common.h</a> +=================================================================== +--- theme/xsettings-kde/trunk/xsettings-common.h (rev 0) ++++ theme/xsettings-kde/trunk/xsettings-common.h 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,110 @@ ++/* ++ * Copyright © 2001 Red Hat, Inc. ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Red Hat not be used in advertising or ++ * publicity pertaining to distribution of the software without specific, ++ * written prior permission. Red Hat makes no representations about the ++ * suitability of this software for any purpose. It is provided "as is" ++ * without express or implied warranty. ++ * ++ * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT ++ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ * Author: Owen Taylor, Red Hat, Inc. ++ */ ++#ifndef XSETTINGS_COMMON_H ++#define XSETTINGS_COMMON_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++typedef struct _XSettingsBuffer XSettingsBuffer; ++typedef struct _XSettingsColor XSettingsColor; ++typedef struct _XSettingsList XSettingsList; ++typedef struct _XSettingsSetting XSettingsSetting; ++ ++/* Types of settings possible. Enum values correspond to ++ * protocol values. ++ */ ++typedef enum ++{ ++ XSETTINGS_TYPE_INT = 0, ++ XSETTINGS_TYPE_STRING = 1, ++ XSETTINGS_TYPE_COLOR = 2 ++} XSettingsType; ++ ++typedef enum ++{ ++ XSETTINGS_SUCCESS, ++ XSETTINGS_NO_MEM, ++ XSETTINGS_ACCESS, ++ XSETTINGS_FAILED, ++ XSETTINGS_NO_ENTRY, ++ XSETTINGS_DUPLICATE_ENTRY ++} XSettingsResult; ++ ++struct _XSettingsBuffer ++{ ++ char byte_order; ++ size_t len; ++ unsigned char *data; ++ unsigned char *pos; ++}; ++ ++struct _XSettingsColor ++{ ++ unsigned short red, green, blue, alpha; ++}; ++ ++struct _XSettingsList ++{ ++ XSettingsSetting *setting; ++ XSettingsList *next; ++}; ++ ++struct _XSettingsSetting ++{ ++ char *name; ++ XSettingsType type; ++ ++ union { ++ int v_int; ++ char *v_string; ++ XSettingsColor v_color; ++ } data; ++ ++ unsigned long last_change_serial; ++}; ++ ++XSettingsSetting *xsettings_setting_copy (XSettingsSetting *setting); ++void xsettings_setting_free (XSettingsSetting *setting); ++int xsettings_setting_equal (XSettingsSetting *setting_a, ++ XSettingsSetting *setting_b); ++ ++void xsettings_list_free (XSettingsList *list); ++XSettingsList *xsettings_list_copy (XSettingsList *list); ++XSettingsResult xsettings_list_insert (XSettingsList **list, ++ XSettingsSetting *setting); ++XSettingsSetting *xsettings_list_lookup (XSettingsList *list, ++ const char *name); ++XSettingsResult xsettings_list_delete (XSettingsList **list, ++ const char *name); ++ ++char xsettings_byte_order (void); ++ ++#define XSETTINGS_PAD(n,m) ((n + m - 1) & (~(m-1))) ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif /* XSETTINGS_COMMON_H */ + + +Property changes on: theme/xsettings-kde/trunk/xsettings-common.h +___________________________________________________________________ +Added: svn:eol-style + + native + +<a id="themexsettingskdetrunkxsettingskdec">Added: theme/xsettings-kde/trunk/xsettings-kde.c</a> +=================================================================== +--- theme/xsettings-kde/trunk/xsettings-kde.c (rev 0) ++++ theme/xsettings-kde/trunk/xsettings-kde.c 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,600 @@ ++/* ++ * Copyright (c) 2001 Red Hat, Inc. ++ * (c) 2005, 2006, 2007, 2008 Mandriva ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Red Hat not be used in advertising or ++ * publicity pertaining to distribution of the software without specific, ++ * written prior permission. Red Hat makes no representations about the ++ * suitability of this software for any purpose. It is provided "as is" ++ * without express or implied warranty. ++ * ++ * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT ++ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ * Authors: Owen Taylor, Red Hat, Inc. ++ * Frederic Crozat, Mandriva ++ * ++ */ ++#define _GNU_SOURCE ++#include <stdlib.h> ++#include <stdio.h> ++#include <string.h> ++#include <X11/Xlib.h> ++#include <sys/types.h> ++#include <pwd.h> ++#include <unistd.h> ++#include <glib.h> ++ ++#include "xsettings-manager.h" ++ ++static XSettingsManager **managers; ++static int max_display; ++static int is_kde4; ++ ++void ++terminate_cb (void *data) ++{ ++} ++ ++/* ++ * X Settings existing ++ * ++ * Net/DoubleClickTime => supported ++ * Net/DoubleClickDistance => can't be configured in KDE ++ * Net/DndDragThreshold => supported ++ * Net/CursorBlink => can't be configured in KDE ++ * Net/CursorBlinkTime => can be only configured in QT, no KIPC involved, no real added value ++ * Net/ThemeName => supported ++ * Net/IconThemeName => supported ++ * Net/FallbackIconTheme => supported ++ * Gtk/CanChangeAccels => not supported ++ * Gtk/ColorPalette => no added value ++ * Gtk/FontName => supported ++ * Gtk/IconSizes => not really useful ++ * Gtk/KeyThemeName => not supported ++ * Gtk/ToolbarStyle => supported ++ * Gtk/ToolbarIconSize => implemented but disabled, doesn't seem to work in GTK+ ++ * Gtk/IMPreeditStyle => not supported ++ * Gtk/IMStatusStyle => not supported ++ * Gtk/Modules => not supported ++ * Gtk/FileChooserBackend => forced to gnome-vfs ++ * Gtk/ButtonImages => supported ++ * Gtk/MenuImages => can't be configured in KDE ++ * Gtk/MenuBarAccel => not supported ++ * Xft/Antialias => KDE uses .fonts.conf directly ++ * Xft/Hinting => KDE uses .fonts.conf directly ++ * Xft/HintStyle => KDE uses .fonts.conf directly ++ * Xft/RGBA => KDE uses .fonts.conf directly ++ * Xft/DPI => supported ++ */ ++ ++static Atom* atoms[2]; ++ ++static char * atom_names [2] = { ++ "KIPC_COMM_ATOM", ++ "KDE_DESKTOP_WINDOW" ++ }; ++ ++enum Section { ++ Unknown = 0, ++ General, ++ Toolbar, ++ KDE, ++ Icons, ++ MainToolbarIcons, ++ Directories ++}; ++ ++static char * file_name [2] = { ++ "kdeglobals", ++ "kcmfonts" ++}; ++ ++int readString (char *key, char * buffer, char *xsetting_key) { ++ if (strncmp (buffer, key, strlen (key)) == 0) { ++ char tmp_string[1024]; ++ char search_string[1024]; ++ ++ sprintf(search_string, "%s=%%s", key); ++ if (sscanf (buffer, search_string, tmp_string) >= 0) { ++ int i; ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], xsetting_key, tmp_string); ++ } ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++int readInt (char *key, char * buffer, char *xsetting_key, int multiplier) { ++ if (strncmp (buffer, key, strlen (key)) == 0) { ++ int tmp_int; ++ char search_string[1024]; ++ ++ sprintf(search_string, "%s=%%d", key); ++ if (sscanf (buffer, search_string, &tmp_int) >= 0) { ++ int i; ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_int (managers[i], xsetting_key, tmp_int*multiplier); ++ } ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++int readBoolean (char *key, char * buffer, char *xsetting_key) { ++ if (strncmp (buffer, key, strlen (key)) == 0) { ++ char tmp_string[1024]; ++ char search_string[1024]; ++ ++ sprintf(search_string, "%s=%%s", key); ++ if (sscanf (buffer, search_string, &tmp_string) >= 0) { ++ int i; ++ ++ if (strncmp(tmp_string, "1",1) == 0 || strncasecmp (tmp_string, "true", 4) == 0) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_int (managers[i], xsetting_key, 1); ++ } ++ } ++ else { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_int (managers[i], xsetting_key, 0); ++ } ++ } ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++ ++int readDPI(char *buffer) ++{ ++ const char *key = "forceFontDPI"; ++ const char *xsetting_key = "Xft/DPI"; ++ ++ if (strncmp (buffer, key, strlen(key)) == 0) { ++ int tmp_int; ++ char search_string[1024]; ++ ++ sprintf(search_string, "%s=%%d", key); ++ if (sscanf (buffer, search_string, &tmp_int) >= 0) { ++ int i; ++ /* GTK+ expects this as 1024 * dots/inch */ ++ tmp_int *= 1024; ++ ++ for (i = 0 ; i < max_display ; i++) { ++ if (tmp_int) { ++ xsettings_manager_set_int (managers[i], xsetting_key, tmp_int); ++ } else { ++ xsettings_manager_delete_setting (managers[i], xsetting_key); ++ } ++ } ++ return 1; ++ } ++ } ++ return 0; ++} ++ ++ ++void readConfig () { ++ FILE *file = NULL; ++ char *buffer = NULL; ++ size_t len = 0, read; ++ enum Section section = Unknown; ++ int notify = 0, buttonIconSet = 0; ++ char filename[1024]; ++ char kdeprefix[1024]; ++ char *prefix; ++ char color[1024]; ++ char style[1024]; ++ char themefilename[1024]; ++ struct passwd *password; ++ int i; ++ int user_file; ++ int file_index; ++ ++ color[0]= '\0'; ++ kdeprefix[0]= '\0'; ++ filename[0]= '\0'; ++ style[0]='\0'; ++ prefix = NULL; ++ ++ file = fopen (is_kde4 ? "/etc/kde4rc" : "/etc/kderc", "r"); ++ if (file) { ++ while ((read = getline (&buffer,&len, file)) != -1) { ++ char tmp_string[1024]; ++ ++ if (buffer[0] == '[') { ++ if (strncmp(buffer, "[Directories-default]", 21) == 0) ++ section = Directories; ++ continue; ++ } ++ switch (section) { ++ case Directories: ++ if (sscanf (buffer, "prefixes=%s", tmp_string) >= 0) { ++ strcpy(kdeprefix, tmp_string); ++ } ++ break; ++ default: ++ break; ++ } ++ ++ } ++ fclose (file); ++ file = NULL; ++ } ++ ++ for (file_index = 0 ; file_index < 2 ; file_index++) { ++ ++ user_file = 0; ++ do { ++ do { ++ if (kdeprefix[0]) { ++ if (prefix == NULL) { ++ prefix = strtok (kdeprefix, ","); ++ } ++ else { ++ prefix = strtok (NULL, ","); ++ } ++ if (prefix != NULL) { ++ sprintf(filename, "%s/share/config/%s",prefix, file_name[file_index]); ++ if (access (filename, F_OK) == 0) { ++ file = fopen (filename, "r"); ++ if (file != NULL) ++ break; ++ } ++ } ++ } ++ } while (prefix != NULL ); ++ ++ if ((file == NULL) && !user_file) { ++ ++ user_file = 1; ++ if ((password = getpwuid (geteuid()))) { ++ sprintf(filename, "%s/%s/share/config/%s",password->pw_dir, is_kde4 ? ".kde4" : ".kde", file_name[file_index]); ++ ++ if (access (filename, F_OK) == 0) { ++ file = fopen (filename, "r"); ++ } ++ } ++ } ++ ++ section = Unknown; ++ ++ while (file && (read = getline (&buffer,&len, file)) != -1) { ++ if (buffer[0] == '[') { ++ if (strncmp(buffer, "[General]", 9) == 0) ++ section = General; ++ else { if (strncmp(buffer, "[Toolbar style]", 15) == 0) ++ section = Toolbar; ++ else { ++ if (strncmp(buffer, "[KDE]", 5) == 0) ++ section = KDE; ++ else { ++ if (strncmp(buffer, "[Icons]", 5) == 0) ++ section = Icons; ++ else { ++ if (strncmp(buffer, "[MainToolbarIcons]", 18) == 0) ++ section = MainToolbarIcons; ++ else ++ section = Unknown; ++ } ++ } ++ } ++ } ++ continue; ++ } ++ switch (section) { ++ /* doesn't seem to work in GTK */ ++ /* ++ case MainToolbarIcons: ++ if (strncmp (buffer, "Size=", 5) == 0) { ++ int size; ++ ++ if (sscanf (buffer, "Size=%d", &size) >= 0) { ++ char new_size[1024]; ++ sprintf(new_size, "%d",size); ++ xsettings_manager_set_string(manager, "Gtk/ToolbarIconSize", "large-toolbar"); ++ notify = 1; ++ } ++ } ++ break; ++*/ ++ ++ case Icons: ++ notify |= readString ("Theme",buffer, "Net/IconThemeName"); ++ break; ++ ++ case KDE: ++ notify |= readInt ("DoubleClickInterval", buffer, "Net/DoubleClickTime", 1); ++ ++ notify |= readInt ("StartDragDist", buffer, "Net/DndDragThreshold", 1); ++ ++ buttonIconSet |= readBoolean("ShowIconsOnPushButtons", buffer, "Gtk/ButtonImages"); ++ notify |= buttonIconSet; ++ if (strncmp(buffer,"colorScheme=",12) == 0) { ++ strcpy(color, buffer+12); ++ color[strlen(color)-1]='\0'; ++ } ++ ++ break; ++ case General: ++ if (strncmp(buffer,"font=",5) == 0) { ++ char font[1024]; ++ char size[1024]; ++ char fontname[1024]; ++ ++ /* found font */ ++ sscanf(buffer,"font=%[^,],%[^,]", font, size); ++ sprintf(fontname, "%s %s",font,size); ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], "Gtk/FontName", fontname); ++ } ++ notify = 1; ++ } ++ if (strncmp(buffer,"widgetStyle=",12) == 0) { ++ ++ /* found style */ ++ sscanf(buffer,"widgetStyle=%s", style); ++ ++ } ++ notify |= readDPI(buffer); ++ ++ break; ++ case Toolbar: ++ if (strncmp (buffer, "IconText=", 9) == 0) { ++ char toolbar[1024]; ++ int found; ++ ++ /* found toolbar */ ++ found = sscanf(buffer,"IconText=%s", toolbar); ++ if (found && strcmp (toolbar, "IconOnly") == 0) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], "Gtk/ToolbarStyle", "icons"); ++ } ++ notify = 1; ++ found = 0; ++ } ++ if (found && strcmp (toolbar, "TextOnly") == 0) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], "Gtk/ToolbarStyle", "text"); ++ } ++ notify = 1; ++ found = 0; ++ } ++ if (found && strcmp (toolbar, "IconTextRight") == 0) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], "Gtk/ToolbarStyle", "both-horiz"); ++ } ++ notify = 1; ++ found = 0; ++ } ++ if (found && strcmp (toolbar, "IconTextBottom") == 0) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], "Gtk/ToolbarStyle", "both"); ++ } ++ notify = 1; ++ found = 0; ++ } ++ } ++ break; ++ default: /* ignore the rest */ ++ break; ++ } ++ } ++ if (file) { ++ fclose (file); ++ file = NULL; ++ } ++ ++ } while (user_file == 0); ++ } ++ ++ if (buffer) { ++ free (buffer); ++ } ++ ++ if ((style[0] == '\0' || (!is_kde4 && strcmp(style, "ia_ora") == 0) || (is_kde4 && strcmp(style, "iaora-qt") == 0) || (is_kde4 && strcmp(style, "iaorakde") == 0)) && strncmp("Ia Ora ", color, 7) == 0) ++ { ++ strcpy(style, color); ++ if (!is_kde4) { ++ style[strlen(style)-6] = '\0'; ++ } ++ } ++ ++ if (style[0]) { ++ int gtkrc_access = 1; ++ sprintf(themefilename, "/usr/share/themes/%s/gtk-2.0/gtkrc", style); ++ ++ if (password) { ++ char gtkrc[1024]; ++ sprintf(gtkrc,"%s/.gtkrc-2.0", password->pw_dir); ++ gtkrc_access = access (gtkrc, F_OK); ++ /* if not .gtkrc-2.0, try KDE variant */ ++ if (gtkrc_access) { ++ char *gtkrc_env; ++ char *gtkrc_file; ++ ++ gtkrc_env = getenv ("GTK2_RC_FILES"); ++ gtkrc_file = NULL; ++ ++ if (gtkrc_env) { ++ do { ++ if (gtkrc_file == NULL) { ++ gtkrc_file = strtok (gtkrc_env, ":"); ++ } ++ else { ++ gtkrc_file = strtok (NULL, ":"); ++ } ++ if (gtkrc_file != NULL) { ++ if ((gtkrc_access = access (gtkrc_file, F_OK)) == 0) { ++ break; ++ } ++ } ++ } while (gtkrc_file != NULL ); ++ } ++ } ++ } ++ ++ /* do not set theme name if .gtkrc is being used */ ++ if (gtkrc_access && (access (themefilename, F_OK) == 0 )) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string (managers[i], "Net/ThemeName", style); ++ } ++ notify = 1; ++ } ++ } ++ ++ ++ if (!buttonIconSet) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_int(managers[i], "Gtk/ButtonImages", is_kde4); ++ } ++ notify = 1; ++ } ++ ++ if (notify) { ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_notify (managers[i]); ++ } ++ } ++} ++ ++void initial_init () { ++ int i; ++ const char *kde_version; ++ ++ kde_version = getenv("KDE_SESSION_VERSION"); ++ ++ if (kde_version && (kde_version[0] == '4')) ++ is_kde4 = 1; ++ else ++ is_kde4 = 0; ++ ++ for (i = 0 ; i < max_display ; i++) { ++ xsettings_manager_set_string(managers[i], "Gtk/FileChooserBackend", "gio"); ++ xsettings_manager_set_string(managers[i], "Net/FallbackIconTheme", "gnome"); ++ xsettings_manager_notify (managers[i]); ++ } ++} ++ ++struct xevent_data { ++ Atom KIPCAtom; ++ Atom KDEDesktopAtom; ++ Display *display; ++}; ++ ++static void ++xevent_handle (gpointer user_data) ++{ ++ XEvent xevent; ++ struct xevent_data* xev = (struct xevent_data*)user_data; ++ int i; ++ ++ while (1) { ++ XNextEvent (xev->display, &xevent); ++ ++ for (i = 0 ; i < max_display ; i++) { ++ if (xsettings_manager_process_event (managers[i], &xevent)) ++ break; ++ } ++ ++ if ((xevent.type == ClientMessage) && (xevent.xclient.message_type == xev->KIPCAtom)) { ++ int id = ((XClientMessageEvent *) &xevent)->data.l[0]; ++ ++ switch (id) { ++ case 0: /* palette changed */ ++ case 1: /* font changed */ ++ case 2: /* style changed */ ++ case 4: /* settings changed */ ++ case 5: /* icons style changed */ ++ case 6: /* toolbar style changed */ ++ readConfig(); ++ break; ++ default: ++ break; ++ } ++ } ++ } ++} ++ ++ ++int main (int argc, char **argv) { ++ long data = 1; ++ Atom atoms_return[2]; ++ int i; ++ int terminated = 0; ++ struct xevent_data xev; ++ GMainLoop *loop; ++ ++ g_thread_init(NULL); ++ ++ xev.display = XOpenDisplay (NULL); ++ if (xev.display == NULL) { ++ fprintf(stderr, "unable to open display\n"); ++ return 1; ++ } ++ ++ if (xsettings_manager_check_running (xev.display, DefaultScreen (xev.display))) { ++ fprintf(stderr, "xsettings server already running\n"); ++ XCloseDisplay (xev.display); ++ return 2; ++ } ++ ++ max_display = ScreenCount (xev.display); ++ ++ managers = malloc (max_display * sizeof (XSettingsManager *)); ++ ++ for (i = 0 ; i < max_display ; i++ ) { ++ managers[i] = xsettings_manager_new (xev.display, i, ++ terminate_cb, &terminated); ++ if (!managers[i]) { ++ fprintf (stderr, "Could not create manager for screen %d", i); ++ return 3; ++ } ++ } ++ ++ initial_init (); ++ ++ atoms[0] = &xev.KIPCAtom; ++ atoms[1] = &xev.KDEDesktopAtom; ++ ++ XInternAtoms(xev.display, atom_names, 2, 0, atoms_return ); ++ ++ *atoms[0] = atoms_return [0]; ++ *atoms[1] = atoms_return [1]; ++ ++ XChangeProperty(xev.display, xsettings_manager_get_window (managers[0]), ++ xev.KDEDesktopAtom, xev.KDEDesktopAtom, ++ 32, PropModeReplace, (unsigned char *)&data, 1); ++ ++ XChangeProperty(xev.display, xsettings_manager_get_window (managers[0]), ++ xev.KIPCAtom, xev.KIPCAtom, ++ 32, PropModeReplace, (unsigned char *)&data, 1); ++ ++ readConfig(); ++ ++ g_thread_create ((GThreadFunc)xevent_handle, &xev, FALSE, NULL); ++ loop = g_main_loop_new (NULL, TRUE); ++ g_main_loop_run (loop); ++ ++ for (i = 0; i < max_display; i++) { ++ xsettings_manager_destroy (managers [i]); ++ } ++ free (managers); ++ ++ XCloseDisplay (xev.display); ++ ++ return 0; ++} + + +Property changes on: theme/xsettings-kde/trunk/xsettings-kde.c +___________________________________________________________________ +Added: svn:eol-style + + native + +<a id="themexsettingskdetrunkxsettingsmanagerc">Added: theme/xsettings-kde/trunk/xsettings-manager.c</a> +=================================================================== +--- theme/xsettings-kde/trunk/xsettings-manager.c (rev 0) ++++ theme/xsettings-kde/trunk/xsettings-manager.c 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,424 @@ ++/* ++ * Copyright © 2001 Red Hat, Inc. ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Red Hat not be used in advertising or ++ * publicity pertaining to distribution of the software without specific, ++ * written prior permission. Red Hat makes no representations about the ++ * suitability of this software for any purpose. It is provided "as is" ++ * without express or implied warranty. ++ * ++ * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT ++ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ * Author: Owen Taylor, Red Hat, Inc. ++ */ ++#include <stdio.h> ++#include <stdlib.h> ++#include <string.h> ++ ++#include <X11/Xmd.h> /* For CARD16 */ ++ ++#include "xsettings-manager.h" ++ ++struct _XSettingsManager ++{ ++ Display *display; ++ int screen; ++ ++ Window window; ++ Atom manager_atom; ++ Atom selection_atom; ++ Atom xsettings_atom; ++ ++ XSettingsTerminateFunc terminate; ++ void *cb_data; ++ ++ XSettingsList *settings; ++ unsigned long serial; ++}; ++ ++XSettingsList *settings; ++ ++typedef struct ++{ ++ Window window; ++ Atom timestamp_prop_atom; ++} TimeStampInfo; ++ ++static Bool ++timestamp_predicate (Display *display, ++ XEvent *xevent, ++ XPointer arg) ++{ ++ TimeStampInfo *info = (TimeStampInfo *)arg; ++ ++ if (xevent->type == PropertyNotify && ++ xevent->xproperty.window == info->window && ++ xevent->xproperty.atom == info->timestamp_prop_atom) ++ return True; ++ ++ return False; ++} ++ ++/** ++ * get_server_time: ++ * @display: display from which to get the time ++ * @window: a #Window, used for communication with the server. ++ * The window must have PropertyChangeMask in its ++ * events mask or a hang will result. ++ * ++ * Routine to get the current X server time stamp. ++ * ++ * Return value: the time stamp. ++ **/ ++static Time ++get_server_time (Display *display, ++ Window window) ++{ ++ unsigned char c = 'a'; ++ XEvent xevent; ++ TimeStampInfo info; ++ ++ info.timestamp_prop_atom = XInternAtom (display, "_TIMESTAMP_PROP", False); ++ info.window = window; ++ ++ XChangeProperty (display, window, ++ info.timestamp_prop_atom, info.timestamp_prop_atom, ++ 8, PropModeReplace, &c, 1); ++ ++ XIfEvent (display, &xevent, ++ timestamp_predicate, (XPointer)&info); ++ ++ return xevent.xproperty.time; ++} ++ ++Bool ++xsettings_manager_check_running (Display *display, ++ int screen) ++{ ++ char buffer[256]; ++ Atom selection_atom; ++ ++ sprintf(buffer, "_XSETTINGS_S%d", screen); ++ selection_atom = XInternAtom (display, buffer, False); ++ ++ if (XGetSelectionOwner (display, selection_atom)) ++ return True; ++ else ++ return False; ++} ++ ++XSettingsManager * ++xsettings_manager_new (Display *display, ++ int screen, ++ XSettingsTerminateFunc terminate, ++ void *cb_data) ++{ ++ XSettingsManager *manager; ++ Time timestamp; ++ XClientMessageEvent xev; ++ ++ char buffer[256]; ++ ++ manager = malloc (sizeof *manager); ++ if (!manager) ++ return NULL; ++ ++ manager->display = display; ++ manager->screen = screen; ++ ++ sprintf(buffer, "_XSETTINGS_S%d", screen); ++ manager->selection_atom = XInternAtom (display, buffer, False); ++ manager->xsettings_atom = XInternAtom (display, "_XSETTINGS_SETTINGS", False); ++ manager->manager_atom = XInternAtom (display, "MANAGER", False); ++ ++ manager->terminate = terminate; ++ manager->cb_data = cb_data; ++ ++ manager->settings = NULL; ++ manager->serial = 0; ++ ++ manager->window = XCreateSimpleWindow (display, ++ RootWindow (display, screen), ++ 0, 0, 10, 10, 0, ++ WhitePixel (display, screen), ++ WhitePixel (display, screen)); ++ ++ XSelectInput (display, manager->window, PropertyChangeMask); ++ timestamp = get_server_time (display, manager->window); ++ ++ XSetSelectionOwner (display, manager->selection_atom, ++ manager->window, timestamp); ++ ++ /* Check to see if we managed to claim the selection. If not, ++ * we treat it as if we got it then immediately lost it ++ */ ++ ++ if (XGetSelectionOwner (display, manager->selection_atom) == ++ manager->window) ++ { ++ xev.type = ClientMessage; ++ xev.window = RootWindow (display, screen); ++ xev.message_type = manager->manager_atom; ++ xev.format = 32; ++ xev.data.l[0] = timestamp; ++ xev.data.l[1] = manager->selection_atom; ++ xev.data.l[2] = manager->window; ++ xev.data.l[3] = 0; /* manager specific data */ ++ xev.data.l[4] = 0; /* manager specific data */ ++ ++ XSendEvent (display, RootWindow (display, screen), ++ False, StructureNotifyMask, (XEvent *)&xev); ++ } ++ else ++ { ++ manager->terminate (manager->cb_data); ++ } ++ ++ return manager; ++} ++ ++void ++xsettings_manager_destroy (XSettingsManager *manager) ++{ ++ XDestroyWindow (manager->display, manager->window); ++ ++ xsettings_list_free (manager->settings); ++ free (manager); ++} ++ ++Window ++xsettings_manager_get_window (XSettingsManager *manager) ++{ ++ return manager->window; ++} ++ ++Bool ++xsettings_manager_process_event (XSettingsManager *manager, ++ XEvent *xev) ++{ ++ if (xev->xany.window == manager->window && ++ xev->xany.type == SelectionClear && ++ xev->xselectionclear.selection == manager->selection_atom) ++ { ++ manager->terminate (manager->cb_data); ++ return True; ++ } ++ ++ return False; ++} ++ ++XSettingsResult ++xsettings_manager_set_setting (XSettingsManager *manager, ++ XSettingsSetting *setting) ++{ ++ XSettingsSetting *old_setting = xsettings_list_lookup (settings, setting->name); ++ XSettingsSetting *new_setting; ++ XSettingsResult result; ++ ++ if (old_setting) ++ { ++ if (xsettings_setting_equal (old_setting, setting)) ++ return XSETTINGS_SUCCESS; ++ ++ xsettings_list_delete (&settings, setting->name); ++ } ++ ++ new_setting = xsettings_setting_copy (setting); ++ if (!new_setting) ++ return XSETTINGS_NO_MEM; ++ ++ new_setting->last_change_serial = manager->serial; ++ ++ result = xsettings_list_insert (&settings, new_setting); ++ ++ if (result != XSETTINGS_SUCCESS) ++ xsettings_setting_free (new_setting); ++ ++ return result; ++} ++ ++XSettingsResult ++xsettings_manager_delete_setting (XSettingsManager *manager, ++ const char *name) ++{ ++ return xsettings_list_delete (&settings, name); ++} ++ ++XSettingsResult ++xsettings_manager_set_int (XSettingsManager *manager, ++ const char *name, ++ int value) ++{ ++ XSettingsSetting setting; ++ ++ setting.name = (char *)name; ++ setting.type = XSETTINGS_TYPE_INT; ++ setting.data.v_int = value; ++ ++ return xsettings_manager_set_setting (manager, &setting); ++} ++ ++XSettingsResult ++xsettings_manager_set_string (XSettingsManager *manager, ++ const char *name, ++ const char *value) ++{ ++ XSettingsSetting setting; ++ ++ setting.name = (char *)name; ++ setting.type = XSETTINGS_TYPE_STRING; ++ setting.data.v_string = (char *)value; ++ ++ return xsettings_manager_set_setting (manager, &setting); ++} ++ ++XSettingsResult ++xsettings_manager_set_color (XSettingsManager *manager, ++ const char *name, ++ XSettingsColor *value) ++{ ++ XSettingsSetting setting; ++ ++ setting.name = (char *)name; ++ setting.type = XSETTINGS_TYPE_COLOR; ++ setting.data.v_color = *value; ++ ++ return xsettings_manager_set_setting (manager, &setting); ++} ++ ++size_t ++setting_length (XSettingsSetting *setting) ++{ ++ size_t length = 8; /* type + pad + name-len + last-change-serial */ ++ length += XSETTINGS_PAD (strlen (setting->name), 4); ++ ++ switch (setting->type) ++ { ++ case XSETTINGS_TYPE_INT: ++ length += 4; ++ break; ++ case XSETTINGS_TYPE_STRING: ++ length += 4 + XSETTINGS_PAD (strlen (setting->data.v_string), 4); ++ break; ++ case XSETTINGS_TYPE_COLOR: ++ length += 8; ++ break; ++ } ++ ++ return length; ++} ++ ++void ++setting_store (XSettingsSetting *setting, ++ XSettingsBuffer *buffer) ++{ ++ size_t string_len; ++ size_t length; ++ ++ *(buffer->pos++) = setting->type; ++ *(buffer->pos++) = 0; ++ ++ string_len = strlen (setting->name); ++ *(CARD16 *)(buffer->pos) = string_len; ++ buffer->pos += 2; ++ ++ length = XSETTINGS_PAD (string_len, 4); ++ memcpy (buffer->pos, setting->name, string_len); ++ length -= string_len; ++ buffer->pos += string_len; ++ ++ while (length > 0) ++ { ++ *(buffer->pos++) = 0; ++ length--; ++ } ++ ++ *(CARD32 *)(buffer->pos) = setting->last_change_serial; ++ buffer->pos += 4; ++ ++ switch (setting->type) ++ { ++ case XSETTINGS_TYPE_INT: ++ *(CARD32 *)(buffer->pos) = setting->data.v_int; ++ buffer->pos += 4; ++ break; ++ case XSETTINGS_TYPE_STRING: ++ string_len = strlen (setting->data.v_string); ++ *(CARD32 *)(buffer->pos) = string_len; ++ buffer->pos += 4; ++ ++ length = XSETTINGS_PAD (string_len, 4); ++ memcpy (buffer->pos, setting->data.v_string, string_len); ++ length -= string_len; ++ buffer->pos += string_len; ++ ++ while (length > 0) ++ { ++ *(buffer->pos++) = 0; ++ length--; ++ } ++ break; ++ case XSETTINGS_TYPE_COLOR: ++ *(CARD16 *)(buffer->pos) = setting->data.v_color.red; ++ *(CARD16 *)(buffer->pos + 2) = setting->data.v_color.green; ++ *(CARD16 *)(buffer->pos + 4) = setting->data.v_color.blue; ++ *(CARD16 *)(buffer->pos + 6) = setting->data.v_color.alpha; ++ buffer->pos += 8; ++ break; ++ } ++} ++ ++XSettingsResult ++xsettings_manager_notify (XSettingsManager *manager) ++{ ++ XSettingsBuffer buffer; ++ XSettingsList *iter; ++ int n_settings = 0; ++ ++ buffer.len = 12; /* byte-order + pad + SERIAL + N_SETTINGS */ ++ ++ iter = settings; ++ while (iter) ++ { ++ buffer.len += setting_length (iter->setting); ++ n_settings++; ++ iter = iter->next; ++ } ++ ++ buffer.data = buffer.pos = malloc (buffer.len); ++ if (!buffer.data) ++ return XSETTINGS_NO_MEM; ++ ++ *buffer.pos = xsettings_byte_order (); ++ ++ buffer.pos += 4; ++ *(CARD32 *)buffer.pos = manager->serial++; ++ buffer.pos += 4; ++ *(CARD32 *)buffer.pos = n_settings; ++ buffer.pos += 4; ++ ++ iter = settings; ++ while (iter) ++ { ++ setting_store (iter->setting, &buffer); ++ iter = iter->next; ++ } ++ ++ XChangeProperty (manager->display, manager->window, ++ manager->xsettings_atom, manager->xsettings_atom, ++ 8, PropModeReplace, buffer.data, buffer.len); ++ ++ free (buffer.data); ++ ++ return XSETTINGS_SUCCESS; ++} ++ + + +Property changes on: theme/xsettings-kde/trunk/xsettings-manager.c +___________________________________________________________________ +Added: svn:eol-style + + native + +<a id="themexsettingskdetrunkxsettingsmanagerh">Added: theme/xsettings-kde/trunk/xsettings-manager.h</a> +=================================================================== +--- theme/xsettings-kde/trunk/xsettings-manager.h (rev 0) ++++ theme/xsettings-kde/trunk/xsettings-manager.h 2011-02-07 09:11:39 UTC (rev 460) +@@ -0,0 +1,69 @@ ++/* ++ * Copyright © 2001 Red Hat, Inc. ++ * ++ * Permission to use, copy, modify, distribute, and sell this software and its ++ * documentation for any purpose is hereby granted without fee, provided that ++ * the above copyright notice appear in all copies and that both that ++ * copyright notice and this permission notice appear in supporting ++ * documentation, and that the name of Red Hat not be used in advertising or ++ * publicity pertaining to distribution of the software without specific, ++ * written prior permission. Red Hat makes no representations about the ++ * suitability of this software for any purpose. It is provided "as is" ++ * without express or implied warranty. ++ * ++ * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT ++ * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION ++ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN ++ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++ * ++ * Author: Owen Taylor, Red Hat, Inc. ++ */ ++#ifndef XSETTINGS_MANAGER_H ++#define XSETTINGS_MANAGER_H ++ ++#include <X11/Xlib.h> ++#include "xsettings-common.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif /* __cplusplus */ ++ ++typedef struct _XSettingsManager XSettingsManager; ++ ++typedef void (*XSettingsTerminateFunc) (void *cb_data); ++ ++Bool xsettings_manager_check_running (Display *display, ++ int screen); ++ ++XSettingsManager *xsettings_manager_new (Display *display, ++ int screen, ++ XSettingsTerminateFunc terminate, ++ void *cb_data); ++ ++void xsettings_manager_destroy (XSettingsManager *manager); ++Window xsettings_manager_get_window (XSettingsManager *manager); ++Bool xsettings_manager_process_event (XSettingsManager *manager, ++ XEvent *xev); ++ ++XSettingsResult xsettings_manager_set_setting (XSettingsManager *manager, ++ XSettingsSetting *setting); ++XSettingsResult xsettings_manager_delete_setting (XSettingsManager *manager, ++ const char *name); ++XSettingsResult xsettings_manager_set_int (XSettingsManager *manager, ++ const char *name, ++ int value); ++XSettingsResult xsettings_manager_set_string (XSettingsManager *manager, ++ const char *name, ++ const char *value); ++XSettingsResult xsettings_manager_set_color (XSettingsManager *manager, ++ const char *name, ++ XSettingsColor *value); ++XSettingsResult xsettings_manager_notify (XSettingsManager *manager); ++ ++#ifdef __cplusplus ++} ++#endif /* __cplusplus */ ++ ++#endif /* XSETTINGS_MANAGER_H */ + + +Property changes on: theme/xsettings-kde/trunk/xsettings-manager.h +___________________________________________________________________ +Added: svn:eol-style + + native + +</pre></div> + +</body> +</html>
\ No newline at end of file |