Browse Source

Added KDE3 version of kwin Crystal style


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kwin-style-crystal@1095345 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
tpearson 9 years ago
commit
f9c5bc16e1
100 changed files with 20605 additions and 0 deletions
  1. 3
    0
      AUTHORS
  2. 340
    0
      COPYING
  3. 248
    0
      Doxyfile
  4. 20
    0
      INSTALL
  5. 20
    0
      Makefile.am
  6. 7
    0
      Makefile.cvs
  7. 22
    0
      README
  8. 11863
    0
      acinclude.m4
  9. 881
    0
      aclocal.m4
  10. 22
    0
      client/Makefile.am
  11. 244
    0
      client/buttonimage.cpp
  12. 66
    0
      client/buttonimage.h
  13. 22
    0
      client/config/Makefile.am
  14. 2417
    0
      client/config/configdialog.ui
  15. 384
    0
      client/config/crystalconfig.cc
  16. 67
    0
      client/config/crystalconfig.h
  17. 284
    0
      client/config/infodialog.ui
  18. 5
    0
      client/crystal.desktop
  19. 337
    0
      client/crystalbutton.cpp
  20. 73
    0
      client/crystalbutton.h
  21. 1643
    0
      client/crystalclient.cc
  22. 204
    0
      client/crystalclient.h
  23. 171
    0
      client/imageholder.cpp
  24. 62
    0
      client/imageholder.h
  25. 200
    0
      client/myrootpixmap.cc
  26. 98
    0
      client/myrootpixmap.h
  27. 237
    0
      config.h.in
  28. 2
    0
      configure.files
  29. 119
    0
      configure.in
  30. 3
    0
      configure.in.in
  31. 225
    0
      crystal.kdevelop
  32. 49
    0
      pics/Makefile.am
  33. 20
    0
      pics/README
  34. 1
    0
      pics/aqua/AUTHOR
  35. BIN
      pics/aqua/BASE.xcf
  36. BIN
      pics/aqua/BUTTONS.xcf
  37. BIN
      pics/aqua/aqua_above.png
  38. BIN
      pics/aqua/aqua_below.png
  39. BIN
      pics/aqua/aqua_close.png
  40. BIN
      pics/aqua/aqua_default.png
  41. BIN
      pics/aqua/aqua_help.png
  42. BIN
      pics/aqua/aqua_max.png
  43. BIN
      pics/aqua/aqua_min.png
  44. BIN
      pics/aqua/aqua_shade.png
  45. BIN
      pics/aqua/aqua_sticky.png
  46. BIN
      pics/aqua/aqua_un_sticky.png
  47. 2
    0
      pics/default/AUTHOR
  48. BIN
      pics/default/crystal_above.png
  49. BIN
      pics/default/crystal_below.png
  50. BIN
      pics/default/crystal_close.png
  51. BIN
      pics/default/crystal_help.png
  52. BIN
      pics/default/crystal_max.png
  53. BIN
      pics/default/crystal_menu.png
  54. BIN
      pics/default/crystal_min.png
  55. BIN
      pics/default/crystal_restore.png
  56. BIN
      pics/default/crystal_shade.png
  57. BIN
      pics/default/crystal_sticky.png
  58. BIN
      pics/default/crystal_un_sticky.png
  59. BIN
      pics/default/crystal_unabove.png
  60. BIN
      pics/default/crystal_unbelow.png
  61. 240
    0
      pics/embedtool.cpp
  62. BIN
      pics/glass_overlay.png
  63. 1
    0
      pics/handpainted/AUTHOR
  64. BIN
      pics/handpainted/handpainted_above.png
  65. BIN
      pics/handpainted/handpainted_below.png
  66. BIN
      pics/handpainted/handpainted_close.png
  67. BIN
      pics/handpainted/handpainted_help.png
  68. BIN
      pics/handpainted/handpainted_max.png
  69. BIN
      pics/handpainted/handpainted_min.png
  70. BIN
      pics/handpainted/handpainted_restore.png
  71. BIN
      pics/handpainted/handpainted_shade.png
  72. BIN
      pics/handpainted/handpainted_sticky.png
  73. BIN
      pics/handpainted/handpainted_un_shade.png
  74. BIN
      pics/handpainted/handpainted_un_sticky.png
  75. BIN
      pics/handpainted/handpainted_unabove.png
  76. BIN
      pics/handpainted/handpainted_unbelow.png
  77. 1
    0
      pics/knifty/AUTHOR
  78. BIN
      pics/knifty/knifty_above.png
  79. BIN
      pics/knifty/knifty_below.png
  80. BIN
      pics/knifty/knifty_close.png
  81. BIN
      pics/knifty/knifty_help.png
  82. BIN
      pics/knifty/knifty_max.png
  83. BIN
      pics/knifty/knifty_min.png
  84. BIN
      pics/knifty/knifty_restore.png
  85. BIN
      pics/knifty/knifty_shade.png
  86. BIN
      pics/knifty/knifty_sticky.png
  87. BIN
      pics/knifty/knifty_un_sticky.png
  88. BIN
      pics/knifty/knifty_unabove.png
  89. BIN
      pics/knifty/knifty_unbelow.png
  90. 2
    0
      pics/kubuntu-dapper/AUTHOR
  91. BIN
      pics/kubuntu-dapper/dapper_above.png
  92. BIN
      pics/kubuntu-dapper/dapper_above_hovered.png
  93. BIN
      pics/kubuntu-dapper/dapper_above_pressed.png
  94. BIN
      pics/kubuntu-dapper/dapper_below.png
  95. BIN
      pics/kubuntu-dapper/dapper_below_hovered.png
  96. BIN
      pics/kubuntu-dapper/dapper_below_pressed.png
  97. BIN
      pics/kubuntu-dapper/dapper_close.png
  98. BIN
      pics/kubuntu-dapper/dapper_close_hovered.png
  99. BIN
      pics/kubuntu-dapper/dapper_close_pressed.png
  100. 0
    0
      pics/kubuntu-dapper/dapper_help.png

+ 3
- 0
AUTHORS View File

@@ -0,0 +1,3 @@
1
+Authors
2
+-------
3
+Sascha Hlusiak	<spam84@nurfuerspam.de>

+ 340
- 0
COPYING View File

@@ -0,0 +1,340 @@
1
+		    GNU GENERAL PUBLIC LICENSE
2
+		       Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
+                       51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+			    Preamble
10
+
11
+  The licenses for most software are designed to take away your
12
+freedom to share and change it.  By contrast, the GNU General Public
13
+License is intended to guarantee your freedom to share and change free
14
+software--to make sure the software is free for all its users.  This
15
+General Public License applies to most of the Free Software
16
+Foundation's software and to any other program whose authors commit to
17
+using it.  (Some other Free Software Foundation software is covered by
18
+the GNU Library General Public License instead.)  You can apply it to
19
+your programs, too.
20
+
21
+  When we speak of free software, we are referring to freedom, not
22
+price.  Our General Public Licenses are designed to make sure that you
23
+have the freedom to distribute copies of free software (and charge for
24
+this service if you wish), that you receive source code or can get it
25
+if you want it, that you can change the software or use pieces of it
26
+in new free programs; and that you know you can do these things.
27
+
28
+  To protect your rights, we need to make restrictions that forbid
29
+anyone to deny you these rights or to ask you to surrender the rights.
30
+These restrictions translate to certain responsibilities for you if you
31
+distribute copies of the software, or if you modify it.
32
+
33
+  For example, if you distribute copies of such a program, whether
34
+gratis or for a fee, you must give the recipients all the rights that
35
+you have.  You must make sure that they, too, receive or can get the
36
+source code.  And you must show them these terms so they know their
37
+rights.
38
+
39
+  We protect your rights with two steps: (1) copyright the software, and
40
+(2) offer you this license which gives you legal permission to copy,
41
+distribute and/or modify the software.
42
+
43
+  Also, for each author's protection and ours, we want to make certain
44
+that everyone understands that there is no warranty for this free
45
+software.  If the software is modified by someone else and passed on, we
46
+want its recipients to know that what they have is not the original, so
47
+that any problems introduced by others will not reflect on the original
48
+authors' reputations.
49
+
50
+  Finally, any free program is threatened constantly by software
51
+patents.  We wish to avoid the danger that redistributors of a free
52
+program will individually obtain patent licenses, in effect making the
53
+program proprietary.  To prevent this, we have made it clear that any
54
+patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+  The precise terms and conditions for copying, distribution and
57
+modification follow.
58
+
59
+		    GNU GENERAL PUBLIC LICENSE
60
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+  0. This License applies to any program or other work which contains
63
+a notice placed by the copyright holder saying it may be distributed
64
+under the terms of this General Public License.  The "Program", below,
65
+refers to any such program or work, and a "work based on the Program"
66
+means either the Program or any derivative work under copyright law:
67
+that is to say, a work containing the Program or a portion of it,
68
+either verbatim or with modifications and/or translated into another
69
+language.  (Hereinafter, translation is included without limitation in
70
+the term "modification".)  Each licensee is addressed as "you".
71
+
72
+Activities other than copying, distribution and modification are not
73
+covered by this License; they are outside its scope.  The act of
74
+running the Program is not restricted, and the output from the Program
75
+is covered only if its contents constitute a work based on the
76
+Program (independent of having been made by running the Program).
77
+Whether that is true depends on what the Program does.
78
+
79
+  1. You may copy and distribute verbatim copies of the Program's
80
+source code as you receive it, in any medium, provided that you
81
+conspicuously and appropriately publish on each copy an appropriate
82
+copyright notice and disclaimer of warranty; keep intact all the
83
+notices that refer to this License and to the absence of any warranty;
84
+and give any other recipients of the Program a copy of this License
85
+along with the Program.
86
+
87
+You may charge a fee for the physical act of transferring a copy, and
88
+you may at your option offer warranty protection in exchange for a fee.
89
+
90
+  2. You may modify your copy or copies of the Program or any portion
91
+of it, thus forming a work based on the Program, and copy and
92
+distribute such modifications or work under the terms of Section 1
93
+above, provided that you also meet all of these conditions:
94
+
95
+    a) You must cause the modified files to carry prominent notices
96
+    stating that you changed the files and the date of any change.
97
+
98
+    b) You must cause any work that you distribute or publish, that in
99
+    whole or in part contains or is derived from the Program or any
100
+    part thereof, to be licensed as a whole at no charge to all third
101
+    parties under the terms of this License.
102
+
103
+    c) If the modified program normally reads commands interactively
104
+    when run, you must cause it, when started running for such
105
+    interactive use in the most ordinary way, to print or display an
106
+    announcement including an appropriate copyright notice and a
107
+    notice that there is no warranty (or else, saying that you provide
108
+    a warranty) and that users may redistribute the program under
109
+    these conditions, and telling the user how to view a copy of this
110
+    License.  (Exception: if the Program itself is interactive but
111
+    does not normally print such an announcement, your work based on
112
+    the Program is not required to print an announcement.)
113
+
114
+These requirements apply to the modified work as a whole.  If
115
+identifiable sections of that work are not derived from the Program,
116
+and can be reasonably considered independent and separate works in
117
+themselves, then this License, and its terms, do not apply to those
118
+sections when you distribute them as separate works.  But when you
119
+distribute the same sections as part of a whole which is a work based
120
+on the Program, the distribution of the whole must be on the terms of
121
+this License, whose permissions for other licensees extend to the
122
+entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+Thus, it is not the intent of this section to claim rights or contest
125
+your rights to work written entirely by you; rather, the intent is to
126
+exercise the right to control the distribution of derivative or
127
+collective works based on the Program.
128
+
129
+In addition, mere aggregation of another work not based on the Program
130
+with the Program (or with a work based on the Program) on a volume of
131
+a storage or distribution medium does not bring the other work under
132
+the scope of this License.
133
+
134
+  3. You may copy and distribute the Program (or a work based on it,
135
+under Section 2) in object code or executable form under the terms of
136
+Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+    a) Accompany it with the complete corresponding machine-readable
139
+    source code, which must be distributed under the terms of Sections
140
+    1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+    b) Accompany it with a written offer, valid for at least three
143
+    years, to give any third party, for a charge no more than your
144
+    cost of physically performing source distribution, a complete
145
+    machine-readable copy of the corresponding source code, to be
146
+    distributed under the terms of Sections 1 and 2 above on a medium
147
+    customarily used for software interchange; or,
148
+
149
+    c) Accompany it with the information you received as to the offer
150
+    to distribute corresponding source code.  (This alternative is
151
+    allowed only for noncommercial distribution and only if you
152
+    received the program in object code or executable form with such
153
+    an offer, in accord with Subsection b above.)
154
+
155
+The source code for a work means the preferred form of the work for
156
+making modifications to it.  For an executable work, complete source
157
+code means all the source code for all modules it contains, plus any
158
+associated interface definition files, plus the scripts used to
159
+control compilation and installation of the executable.  However, as a
160
+special exception, the source code distributed need not include
161
+anything that is normally distributed (in either source or binary
162
+form) with the major components (compiler, kernel, and so on) of the
163
+operating system on which the executable runs, unless that component
164
+itself accompanies the executable.
165
+
166
+If distribution of executable or object code is made by offering
167
+access to copy from a designated place, then offering equivalent
168
+access to copy the source code from the same place counts as
169
+distribution of the source code, even though third parties are not
170
+compelled to copy the source along with the object code.
171
+
172
+  4. You may not copy, modify, sublicense, or distribute the Program
173
+except as expressly provided under this License.  Any attempt
174
+otherwise to copy, modify, sublicense or distribute the Program is
175
+void, and will automatically terminate your rights under this License.
176
+However, parties who have received copies, or rights, from you under
177
+this License will not have their licenses terminated so long as such
178
+parties remain in full compliance.
179
+
180
+  5. You are not required to accept this License, since you have not
181
+signed it.  However, nothing else grants you permission to modify or
182
+distribute the Program or its derivative works.  These actions are
183
+prohibited by law if you do not accept this License.  Therefore, by
184
+modifying or distributing the Program (or any work based on the
185
+Program), you indicate your acceptance of this License to do so, and
186
+all its terms and conditions for copying, distributing or modifying
187
+the Program or works based on it.
188
+
189
+  6. Each time you redistribute the Program (or any work based on the
190
+Program), the recipient automatically receives a license from the
191
+original licensor to copy, distribute or modify the Program subject to
192
+these terms and conditions.  You may not impose any further
193
+restrictions on the recipients' exercise of the rights granted herein.
194
+You are not responsible for enforcing compliance by third parties to
195
+this License.
196
+
197
+  7. If, as a consequence of a court judgment or allegation of patent
198
+infringement or for any other reason (not limited to patent issues),
199
+conditions are imposed on you (whether by court order, agreement or
200
+otherwise) that contradict the conditions of this License, they do not
201
+excuse you from the conditions of this License.  If you cannot
202
+distribute so as to satisfy simultaneously your obligations under this
203
+License and any other pertinent obligations, then as a consequence you
204
+may not distribute the Program at all.  For example, if a patent
205
+license would not permit royalty-free redistribution of the Program by
206
+all those who receive copies directly or indirectly through you, then
207
+the only way you could satisfy both it and this License would be to
208
+refrain entirely from distribution of the Program.
209
+
210
+If any portion of this section is held invalid or unenforceable under
211
+any particular circumstance, the balance of the section is intended to
212
+apply and the section as a whole is intended to apply in other
213
+circumstances.
214
+
215
+It is not the purpose of this section to induce you to infringe any
216
+patents or other property right claims or to contest validity of any
217
+such claims; this section has the sole purpose of protecting the
218
+integrity of the free software distribution system, which is
219
+implemented by public license practices.  Many people have made
220
+generous contributions to the wide range of software distributed
221
+through that system in reliance on consistent application of that
222
+system; it is up to the author/donor to decide if he or she is willing
223
+to distribute software through any other system and a licensee cannot
224
+impose that choice.
225
+
226
+This section is intended to make thoroughly clear what is believed to
227
+be a consequence of the rest of this License.
228
+
229
+  8. If the distribution and/or use of the Program is restricted in
230
+certain countries either by patents or by copyrighted interfaces, the
231
+original copyright holder who places the Program under this License
232
+may add an explicit geographical distribution limitation excluding
233
+those countries, so that distribution is permitted only in or among
234
+countries not thus excluded.  In such case, this License incorporates
235
+the limitation as if written in the body of this License.
236
+
237
+  9. The Free Software Foundation may publish revised and/or new versions
238
+of the General Public License from time to time.  Such new versions will
239
+be similar in spirit to the present version, but may differ in detail to
240
+address new problems or concerns.
241
+
242
+Each version is given a distinguishing version number.  If the Program
243
+specifies a version number of this License which applies to it and "any
244
+later version", you have the option of following the terms and conditions
245
+either of that version or of any later version published by the Free
246
+Software Foundation.  If the Program does not specify a version number of
247
+this License, you may choose any version ever published by the Free Software
248
+Foundation.
249
+
250
+  10. If you wish to incorporate parts of the Program into other free
251
+programs whose distribution conditions are different, write to the author
252
+to ask for permission.  For software which is copyrighted by the Free
253
+Software Foundation, write to the Free Software Foundation; we sometimes
254
+make exceptions for this.  Our decision will be guided by the two goals
255
+of preserving the free status of all derivatives of our free software and
256
+of promoting the sharing and reuse of software generally.
257
+
258
+			    NO WARRANTY
259
+
260
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
262
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
266
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
267
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+REPAIR OR CORRECTION.
269
+
270
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+POSSIBILITY OF SUCH DAMAGES.
279
+
280
+		     END OF TERMS AND CONDITIONS
281
+
282
+	    How to Apply These Terms to Your New Programs
283
+
284
+  If you develop a new program, and you want it to be of the greatest
285
+possible use to the public, the best way to achieve this is to make it
286
+free software which everyone can redistribute and change under these terms.
287
+
288
+  To do so, attach the following notices to the program.  It is safest
289
+to attach them to the start of each source file to most effectively
290
+convey the exclusion of warranty; and each file should have at least
291
+the "copyright" line and a pointer to where the full notice is found.
292
+
293
+    <one line to give the program's name and a brief idea of what it does.>
294
+    Copyright (C) <year>  <name of author>
295
+
296
+    This program is free software; you can redistribute it and/or modify
297
+    it under the terms of the GNU General Public License as published by
298
+    the Free Software Foundation; either version 2 of the License, or
299
+    (at your option) any later version.
300
+
301
+    This program is distributed in the hope that it will be useful,
302
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
304
+    GNU General Public License for more details.
305
+
306
+    You should have received a copy of the GNU General Public License
307
+    along with this program; if not, write to the Free Software
308
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
309
+
310
+
311
+Also add information on how to contact you by electronic and paper mail.
312
+
313
+If the program is interactive, make it output a short notice like this
314
+when it starts in an interactive mode:
315
+
316
+    Gnomovision version 69, Copyright (C) year name of author
317
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318
+    This is free software, and you are welcome to redistribute it
319
+    under certain conditions; type `show c' for details.
320
+
321
+The hypothetical commands `show w' and `show c' should show the appropriate
322
+parts of the General Public License.  Of course, the commands you use may
323
+be called something other than `show w' and `show c'; they could even be
324
+mouse-clicks or menu items--whatever suits your program.
325
+
326
+You should also get your employer (if you work as a programmer) or your
327
+school, if any, to sign a "copyright disclaimer" for the program, if
328
+necessary.  Here is a sample; alter the names:
329
+
330
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
332
+
333
+  <signature of Ty Coon>, 1 April 1989
334
+  Ty Coon, President of Vice
335
+
336
+This General Public License does not permit incorporating your program into
337
+proprietary programs.  If your program is a subroutine library, you may
338
+consider it more useful to permit linking proprietary applications with the
339
+library.  If this is what you want to do, use the GNU Library General
340
+Public License instead of this License.

+ 248
- 0
Doxyfile View File

@@ -0,0 +1,248 @@
1
+# Doxyfile 1.3.5-KDevelop
2
+
3
+#---------------------------------------------------------------------------
4
+# Project related configuration options
5
+#---------------------------------------------------------------------------
6
+PROJECT_NAME           = crystal.kdevelop
7
+PROJECT_NUMBER         = 0.7
8
+OUTPUT_DIRECTORY       = 
9
+OUTPUT_LANGUAGE        = English
10
+USE_WINDOWS_ENCODING   = NO
11
+BRIEF_MEMBER_DESC      = YES
12
+REPEAT_BRIEF           = YES
13
+ABBREVIATE_BRIEF       = "The $name class" \
14
+                         "The $name widget" \
15
+                         "The $name file" \
16
+                         is \
17
+                         provides \
18
+                         specifies \
19
+                         contains \
20
+                         represents \
21
+                         a \
22
+                         an \
23
+                         the
24
+ALWAYS_DETAILED_SEC    = NO
25
+INLINE_INHERITED_MEMB  = NO
26
+FULL_PATH_NAMES        = NO
27
+STRIP_FROM_PATH        = /home/sascha/Develop/crystal/crystal/
28
+SHORT_NAMES            = NO
29
+JAVADOC_AUTOBRIEF      = NO
30
+MULTILINE_CPP_IS_BRIEF = NO
31
+DETAILS_AT_TOP         = NO
32
+INHERIT_DOCS           = YES
33
+DISTRIBUTE_GROUP_DOC   = NO
34
+TAB_SIZE               = 8
35
+ALIASES                = 
36
+OPTIMIZE_OUTPUT_FOR_C  = NO
37
+OPTIMIZE_OUTPUT_JAVA   = NO
38
+SUBGROUPING            = YES
39
+#---------------------------------------------------------------------------
40
+# Build related configuration options
41
+#---------------------------------------------------------------------------
42
+EXTRACT_ALL            = NO
43
+EXTRACT_PRIVATE        = NO
44
+EXTRACT_STATIC         = NO
45
+EXTRACT_LOCAL_CLASSES  = YES
46
+HIDE_UNDOC_MEMBERS     = NO
47
+HIDE_UNDOC_CLASSES     = NO
48
+HIDE_FRIEND_COMPOUNDS  = NO
49
+HIDE_IN_BODY_DOCS      = NO
50
+INTERNAL_DOCS          = NO
51
+CASE_SENSE_NAMES       = YES
52
+HIDE_SCOPE_NAMES       = NO
53
+SHOW_INCLUDE_FILES     = YES
54
+INLINE_INFO            = YES
55
+SORT_MEMBER_DOCS       = YES
56
+SORT_BRIEF_DOCS        = NO
57
+SORT_BY_SCOPE_NAME     = NO
58
+GENERATE_TODOLIST      = YES
59
+GENERATE_TESTLIST      = YES
60
+GENERATE_BUGLIST       = YES
61
+GENERATE_DEPRECATEDLIST= YES
62
+ENABLED_SECTIONS       = 
63
+MAX_INITIALIZER_LINES  = 30
64
+SHOW_USED_FILES        = YES
65
+#---------------------------------------------------------------------------
66
+# configuration options related to warning and progress messages
67
+#---------------------------------------------------------------------------
68
+QUIET                  = NO
69
+WARNINGS               = YES
70
+WARN_IF_UNDOCUMENTED   = YES
71
+WARN_IF_DOC_ERROR      = YES
72
+WARN_FORMAT            = "$file:$line: $text"
73
+WARN_LOGFILE           = 
74
+#---------------------------------------------------------------------------
75
+# configuration options related to the input files
76
+#---------------------------------------------------------------------------
77
+INPUT                  = /home/sascha/Develop/crystal/crystal
78
+FILE_PATTERNS          = *.c \
79
+                         *.cc \
80
+                         *.cxx \
81
+                         *.cpp \
82
+                         *.c++ \
83
+                         *.java \
84
+                         *.ii \
85
+                         *.ixx \
86
+                         *.ipp \
87
+                         *.i++ \
88
+                         *.inl \
89
+                         *.h \
90
+                         *.hh \
91
+                         *.hxx \
92
+                         *.hpp \
93
+                         *.h++ \
94
+                         *.idl \
95
+                         *.odl \
96
+                         *.cs \
97
+                         *.php \
98
+                         *.php3 \
99
+                         *.inc \
100
+                         *.C \
101
+                         *.H \
102
+                         *.tlh \
103
+                         *.diff \
104
+                         *.patch \
105
+                         *.moc \
106
+                         *.xpm \
107
+                         *.dox
108
+RECURSIVE              = yes
109
+EXCLUDE                = 
110
+EXCLUDE_SYMLINKS       = NO
111
+EXCLUDE_PATTERNS       = 
112
+EXAMPLE_PATH           = 
113
+EXAMPLE_PATTERNS       = *
114
+EXAMPLE_RECURSIVE      = NO
115
+IMAGE_PATH             = 
116
+INPUT_FILTER           = 
117
+FILTER_SOURCE_FILES    = NO
118
+#---------------------------------------------------------------------------
119
+# configuration options related to source browsing
120
+#---------------------------------------------------------------------------
121
+SOURCE_BROWSER         = NO
122
+INLINE_SOURCES         = NO
123
+STRIP_CODE_COMMENTS    = YES
124
+REFERENCED_BY_RELATION = YES
125
+REFERENCES_RELATION    = YES
126
+VERBATIM_HEADERS       = YES
127
+#---------------------------------------------------------------------------
128
+# configuration options related to the alphabetical class index
129
+#---------------------------------------------------------------------------
130
+ALPHABETICAL_INDEX     = NO
131
+COLS_IN_ALPHA_INDEX    = 5
132
+IGNORE_PREFIX          = 
133
+#---------------------------------------------------------------------------
134
+# configuration options related to the HTML output
135
+#---------------------------------------------------------------------------
136
+GENERATE_HTML          = YES
137
+HTML_OUTPUT            = html
138
+HTML_FILE_EXTENSION    = .html
139
+HTML_HEADER            = 
140
+HTML_FOOTER            = 
141
+HTML_STYLESHEET        = 
142
+HTML_ALIGN_MEMBERS     = YES
143
+GENERATE_HTMLHELP      = NO
144
+CHM_FILE               = 
145
+HHC_LOCATION           = 
146
+GENERATE_CHI           = NO
147
+BINARY_TOC             = NO
148
+TOC_EXPAND             = NO
149
+DISABLE_INDEX          = NO
150
+ENUM_VALUES_PER_LINE   = 4
151
+GENERATE_TREEVIEW      = NO
152
+TREEVIEW_WIDTH         = 250
153
+#---------------------------------------------------------------------------
154
+# configuration options related to the LaTeX output
155
+#---------------------------------------------------------------------------
156
+GENERATE_LATEX         = YES
157
+LATEX_OUTPUT           = latex
158
+LATEX_CMD_NAME         = latex
159
+MAKEINDEX_CMD_NAME     = makeindex
160
+COMPACT_LATEX          = NO
161
+PAPER_TYPE             = a4wide
162
+EXTRA_PACKAGES         = 
163
+LATEX_HEADER           = 
164
+PDF_HYPERLINKS         = NO
165
+USE_PDFLATEX           = NO
166
+LATEX_BATCHMODE        = NO
167
+LATEX_HIDE_INDICES     = NO
168
+#---------------------------------------------------------------------------
169
+# configuration options related to the RTF output
170
+#---------------------------------------------------------------------------
171
+GENERATE_RTF           = NO
172
+RTF_OUTPUT             = rtf
173
+COMPACT_RTF            = NO
174
+RTF_HYPERLINKS         = NO
175
+RTF_STYLESHEET_FILE    = 
176
+RTF_EXTENSIONS_FILE    = 
177
+#---------------------------------------------------------------------------
178
+# configuration options related to the man page output
179
+#---------------------------------------------------------------------------
180
+GENERATE_MAN           = NO
181
+MAN_OUTPUT             = man
182
+MAN_EXTENSION          = .3
183
+MAN_LINKS              = NO
184
+#---------------------------------------------------------------------------
185
+# configuration options related to the XML output
186
+#---------------------------------------------------------------------------
187
+GENERATE_XML           = yes
188
+XML_OUTPUT             = xml
189
+XML_SCHEMA             = 
190
+XML_DTD                = 
191
+XML_PROGRAMLISTING     = YES
192
+#---------------------------------------------------------------------------
193
+# configuration options for the AutoGen Definitions output
194
+#---------------------------------------------------------------------------
195
+GENERATE_AUTOGEN_DEF   = NO
196
+#---------------------------------------------------------------------------
197
+# configuration options related to the Perl module output
198
+#---------------------------------------------------------------------------
199
+GENERATE_PERLMOD       = NO
200
+PERLMOD_LATEX          = NO
201
+PERLMOD_PRETTY         = YES
202
+PERLMOD_MAKEVAR_PREFIX = 
203
+#---------------------------------------------------------------------------
204
+# Configuration options related to the preprocessor   
205
+#---------------------------------------------------------------------------
206
+ENABLE_PREPROCESSING   = YES
207
+MACRO_EXPANSION        = NO
208
+EXPAND_ONLY_PREDEF     = NO
209
+SEARCH_INCLUDES        = YES
210
+INCLUDE_PATH           = 
211
+INCLUDE_FILE_PATTERNS  = 
212
+PREDEFINED             = 
213
+EXPAND_AS_DEFINED      = 
214
+SKIP_FUNCTION_MACROS   = YES
215
+#---------------------------------------------------------------------------
216
+# Configuration::additions related to external references   
217
+#---------------------------------------------------------------------------
218
+TAGFILES               = 
219
+GENERATE_TAGFILE       = 
220
+ALLEXTERNALS           = NO
221
+EXTERNAL_GROUPS        = YES
222
+PERL_PATH              = /usr/bin/perl
223
+#---------------------------------------------------------------------------
224
+# Configuration options related to the dot tool   
225
+#---------------------------------------------------------------------------
226
+CLASS_DIAGRAMS         = YES
227
+HIDE_UNDOC_RELATIONS   = YES
228
+HAVE_DOT               = NO
229
+CLASS_GRAPH            = YES
230
+COLLABORATION_GRAPH    = YES
231
+UML_LOOK               = NO
232
+TEMPLATE_RELATIONS     = NO
233
+INCLUDE_GRAPH          = YES
234
+INCLUDED_BY_GRAPH      = YES
235
+CALL_GRAPH             = NO
236
+GRAPHICAL_HIERARCHY    = YES
237
+DOT_IMAGE_FORMAT       = png
238
+DOT_PATH               = 
239
+DOTFILE_DIRS           = 
240
+MAX_DOT_GRAPH_WIDTH    = 1024
241
+MAX_DOT_GRAPH_HEIGHT   = 1024
242
+MAX_DOT_GRAPH_DEPTH    = 1000
243
+GENERATE_LEGEND        = YES
244
+DOT_CLEANUP            = YES
245
+#---------------------------------------------------------------------------
246
+# Configuration::additions related to the search engine   
247
+#---------------------------------------------------------------------------
248
+SEARCHENGINE           = NO

+ 20
- 0
INSTALL View File

@@ -0,0 +1,20 @@
1
+-- INSTALL -----------------------------------
2
+
3
+Basic Installation (from the console):
4
+  - Step 1
5
+      $ ./configure --prefix=`kde-config --prefix`
6
+  - Step 2
7
+      $ make
8
+  - Step 3 (as root)
9
+      # make install
10
+
11
+If configure fails, check that you have both
12
+the Qt and KDE development headers installed.
13
+
14
+You need at least KDE 3.2 and QT 3.3.
15
+
16
+Debian note: You may need to append
17
+--with-qt-includes=/usr/include/qt3
18
+to the configure line.
19
+
20
+----------------------------------------------

+ 20
- 0
Makefile.am View File

@@ -0,0 +1,20 @@
1
+SUBDIRS = pics client
2
+
3
+MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files
4
+
5
+EXTRA_DIST = Makefile.cvs admin
6
+
7
+AUTOMAKE_OPTIONS = foreign
8
+
9
+$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
10
+	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
11
+
12
+$(top_srcdir)/subdirs:
13
+	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs
14
+
15
+$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
16
+	@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4
17
+
18
+dist-hook:
19
+	cd $(top_distdir) && perl admin/am_edit -padmin
20
+	cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs

+ 7
- 0
Makefile.cvs View File

@@ -0,0 +1,7 @@
1
+all: 
2
+	$(MAKE) -f admin/Makefile.common cvs
3
+
4
+dist:
5
+	$(MAKE) -f admin/Makefile.common dist
6
+
7
+.SILENT:

+ 22
- 0
README View File

@@ -0,0 +1,22 @@
1
+Crystal
2
+=======
3
+
4
+This is the Crystal KDE Windowdecoration Theme. The theme is pretty simple and clean, but has very nice pseudo transparency within the border and the title bar. You can choose of other image effects too.
5
+
6
+It is based on the KDE-WM "Example", which can be found here:
7
+http://www.kde-look.org/content/show.php?content=6332
8
+
9
+And it is modelled on the crystal fvwm2 style. Check it out:
10
+http://www.fvwm-crystal.org/
11
+
12
+
13
+Check out crystal at kde-look.org:
14
+http://kde-look.org/content/show.php?content=13969
15
+
16
+
17
+I hope, you like it.
18
+
19
+Have Fun!
20
+
21
+
22
+- Sascha Hlusiak

+ 11863
- 0
acinclude.m4
File diff suppressed because it is too large
View File


+ 881
- 0
aclocal.m4 View File

@@ -0,0 +1,881 @@
1
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
2
+
3
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5
+# This file is free software; the Free Software Foundation
6
+# gives unlimited permission to copy and/or distribute it,
7
+# with or without modifications, as long as this notice is preserved.
8
+
9
+# This program is distributed in the hope that it will be useful,
10
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
+# PARTICULAR PURPOSE.
13
+
14
+m4_ifndef([AC_AUTOCONF_VERSION],
15
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
17
+[m4_warning([this file was generated for autoconf 2.61.
18
+You have another version of autoconf.  It may work, but is not guaranteed to.
19
+If you have problems, you may need to regenerate the build system entirely.
20
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
+
22
+# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
23
+#
24
+# This file is free software; the Free Software Foundation
25
+# gives unlimited permission to copy and/or distribute it,
26
+# with or without modifications, as long as this notice is preserved.
27
+
28
+# AM_AUTOMAKE_VERSION(VERSION)
29
+# ----------------------------
30
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
31
+# generated from the m4 files accompanying Automake X.Y.
32
+# (This private macro should not be called outside this file.)
33
+AC_DEFUN([AM_AUTOMAKE_VERSION],
34
+[am__api_version='1.10'
35
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36
+dnl require some minimum version.  Point them to the right macro.
37
+m4_if([$1], [1.10.1], [],
38
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39
+])
40
+
41
+# _AM_AUTOCONF_VERSION(VERSION)
42
+# -----------------------------
43
+# aclocal traces this macro to find the Autoconf version.
44
+# This is a private macro too.  Using m4_define simplifies
45
+# the logic in aclocal, which can simply ignore this definition.
46
+m4_define([_AM_AUTOCONF_VERSION], [])
47
+
48
+# AM_SET_CURRENT_AUTOMAKE_VERSION
49
+# -------------------------------
50
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
52
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
54
+m4_ifndef([AC_AUTOCONF_VERSION],
55
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
57
+
58
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
+
60
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61
+#
62
+# This file is free software; the Free Software Foundation
63
+# gives unlimited permission to copy and/or distribute it,
64
+# with or without modifications, as long as this notice is preserved.
65
+
66
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69
+#
70
+# Of course, Automake must honor this variable whenever it calls a
71
+# tool from the auxiliary directory.  The problem is that $srcdir (and
72
+# therefore $ac_aux_dir as well) can be either absolute or relative,
73
+# depending on how configure is run.  This is pretty annoying, since
74
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75
+# source directory, any form will work fine, but in subdirectories a
76
+# relative path needs to be adjusted first.
77
+#
78
+# $ac_aux_dir/missing
79
+#    fails when called from a subdirectory if $ac_aux_dir is relative
80
+# $top_srcdir/$ac_aux_dir/missing
81
+#    fails if $ac_aux_dir is absolute,
82
+#    fails when called from a subdirectory in a VPATH build with
83
+#          a relative $ac_aux_dir
84
+#
85
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86
+# are both prefixed by $srcdir.  In an in-source build this is usually
87
+# harmless because $srcdir is `.', but things will broke when you
88
+# start a VPATH build or use an absolute $srcdir.
89
+#
90
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93
+# and then we would define $MISSING as
94
+#   MISSING="\${SHELL} $am_aux_dir/missing"
95
+# This will work as long as MISSING is not called from configure, because
96
+# unfortunately $(top_srcdir) has no meaning in configure.
97
+# However there are other variables, like CC, which are often used in
98
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
99
+#
100
+# Another solution, used here, is to always expand $ac_aux_dir to an
101
+# absolute PATH.  The drawback is that using absolute paths prevent a
102
+# configured tree to be moved without reconfiguration.
103
+
104
+AC_DEFUN([AM_AUX_DIR_EXPAND],
105
+[dnl Rely on autoconf to set up CDPATH properly.
106
+AC_PREREQ([2.50])dnl
107
+# expand $ac_aux_dir to an absolute path
108
+am_aux_dir=`cd $ac_aux_dir && pwd`
109
+])
110
+
111
+# AM_CONDITIONAL                                            -*- Autoconf -*-
112
+
113
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
114
+# Free Software Foundation, Inc.
115
+#
116
+# This file is free software; the Free Software Foundation
117
+# gives unlimited permission to copy and/or distribute it,
118
+# with or without modifications, as long as this notice is preserved.
119
+
120
+# serial 8
121
+
122
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123
+# -------------------------------------
124
+# Define a conditional.
125
+AC_DEFUN([AM_CONDITIONAL],
126
+[AC_PREREQ(2.52)dnl
127
+ ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128
+	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129
+AC_SUBST([$1_TRUE])dnl
130
+AC_SUBST([$1_FALSE])dnl
131
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133
+if $2; then
134
+  $1_TRUE=
135
+  $1_FALSE='#'
136
+else
137
+  $1_TRUE='#'
138
+  $1_FALSE=
139
+fi
140
+AC_CONFIG_COMMANDS_PRE(
141
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
142
+  AC_MSG_ERROR([[conditional "$1" was never defined.
143
+Usually this means the macro was only invoked conditionally.]])
144
+fi])])
145
+
146
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
147
+# Free Software Foundation, Inc.
148
+#
149
+# This file is free software; the Free Software Foundation
150
+# gives unlimited permission to copy and/or distribute it,
151
+# with or without modifications, as long as this notice is preserved.
152
+
153
+# serial 9
154
+
155
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
156
+# written in clear, in which case automake, when reading aclocal.m4,
157
+# will think it sees a *use*, and therefore will trigger all it's
158
+# C support machinery.  Also note that it means that autoscan, seeing
159
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
160
+
161
+
162
+# _AM_DEPENDENCIES(NAME)
163
+# ----------------------
164
+# See how the compiler implements dependency checking.
165
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
166
+# We try a few techniques and use that to set a single cache variable.
167
+#
168
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
169
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
170
+# dependency, and given that the user is not expected to run this macro,
171
+# just rely on AC_PROG_CC.
172
+AC_DEFUN([_AM_DEPENDENCIES],
173
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
174
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
175
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
176
+AC_REQUIRE([AM_DEP_TRACK])dnl
177
+
178
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
179
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
180
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
181
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
182
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
183
+                   [depcc="$$1"   am_compiler_list=])
184
+
185
+AC_CACHE_CHECK([dependency style of $depcc],
186
+               [am_cv_$1_dependencies_compiler_type],
187
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
188
+  # We make a subdir and do the tests there.  Otherwise we can end up
189
+  # making bogus files that we don't know about and never remove.  For
190
+  # instance it was reported that on HP-UX the gcc test will end up
191
+  # making a dummy file named `D' -- because `-MD' means `put the output
192
+  # in D'.
193
+  mkdir conftest.dir
194
+  # Copy depcomp to subdir because otherwise we won't find it if we're
195
+  # using a relative directory.
196
+  cp "$am_depcomp" conftest.dir
197
+  cd conftest.dir
198
+  # We will build objects and dependencies in a subdirectory because
199
+  # it helps to detect inapplicable dependency modes.  For instance
200
+  # both Tru64's cc and ICC support -MD to output dependencies as a
201
+  # side effect of compilation, but ICC will put the dependencies in
202
+  # the current directory while Tru64 will put them in the object
203
+  # directory.
204
+  mkdir sub
205
+
206
+  am_cv_$1_dependencies_compiler_type=none
207
+  if test "$am_compiler_list" = ""; then
208
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
209
+  fi
210
+  for depmode in $am_compiler_list; do
211
+    # Setup a source with many dependencies, because some compilers
212
+    # like to wrap large dependency lists on column 80 (with \), and
213
+    # we should not choose a depcomp mode which is confused by this.
214
+    #
215
+    # We need to recreate these files for each test, as the compiler may
216
+    # overwrite some of them when testing with obscure command lines.
217
+    # This happens at least with the AIX C compiler.
218
+    : > sub/conftest.c
219
+    for i in 1 2 3 4 5 6; do
220
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
221
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
222
+      # Solaris 8's {/usr,}/bin/sh.
223
+      touch sub/conftst$i.h
224
+    done
225
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
226
+
227
+    case $depmode in
228
+    nosideeffect)
229
+      # after this tag, mechanisms are not by side-effect, so they'll
230
+      # only be used when explicitly requested
231
+      if test "x$enable_dependency_tracking" = xyes; then
232
+	continue
233
+      else
234
+	break
235
+      fi
236
+      ;;
237
+    none) break ;;
238
+    esac
239
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
240
+    # mode.  It turns out that the SunPro C++ compiler does not properly
241
+    # handle `-M -o', and we need to detect this.
242
+    if depmode=$depmode \
243
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
244
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
245
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
246
+         >/dev/null 2>conftest.err &&
247
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
248
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
249
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
250
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
251
+      # icc doesn't choke on unknown options, it will just issue warnings
252
+      # or remarks (even with -Werror).  So we grep stderr for any message
253
+      # that says an option was ignored or not supported.
254
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
255
+      #   icc: Command line warning: ignoring option '-M'; no argument required
256
+      # The diagnosis changed in icc 8.0:
257
+      #   icc: Command line remark: option '-MP' not supported
258
+      if (grep 'ignoring option' conftest.err ||
259
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
260
+        am_cv_$1_dependencies_compiler_type=$depmode
261
+        break
262
+      fi
263
+    fi
264
+  done
265
+
266
+  cd ..
267
+  rm -rf conftest.dir
268
+else
269
+  am_cv_$1_dependencies_compiler_type=none
270
+fi
271
+])
272
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
273
+AM_CONDITIONAL([am__fastdep$1], [
274
+  test "x$enable_dependency_tracking" != xno \
275
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
276
+])
277
+
278
+
279
+# AM_SET_DEPDIR
280
+# -------------
281
+# Choose a directory name for dependency files.
282
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
283
+AC_DEFUN([AM_SET_DEPDIR],
284
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
285
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
286
+])
287
+
288
+
289
+# AM_DEP_TRACK
290
+# ------------
291
+AC_DEFUN([AM_DEP_TRACK],
292
+[AC_ARG_ENABLE(dependency-tracking,
293
+[  --disable-dependency-tracking  speeds up one-time build
294
+  --enable-dependency-tracking   do not reject slow dependency extractors])
295
+if test "x$enable_dependency_tracking" != xno; then
296
+  am_depcomp="$ac_aux_dir/depcomp"
297
+  AMDEPBACKSLASH='\'
298
+fi
299
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
300
+AC_SUBST([AMDEPBACKSLASH])dnl
301
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
302
+])
303
+
304
+# Generate code to set up dependency tracking.              -*- Autoconf -*-
305
+
306
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
307
+# Free Software Foundation, Inc.
308
+#
309
+# This file is free software; the Free Software Foundation
310
+# gives unlimited permission to copy and/or distribute it,
311
+# with or without modifications, as long as this notice is preserved.
312
+
313
+#serial 3
314
+
315
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
316
+# ------------------------------
317
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
318
+[for mf in $CONFIG_FILES; do
319
+  # Strip MF so we end up with the name of the file.
320
+  mf=`echo "$mf" | sed -e 's/:.*$//'`
321
+  # Check whether this is an Automake generated Makefile or not.
322
+  # We used to match only the files named `Makefile.in', but
323
+  # some people rename them; so instead we look at the file content.
324
+  # Grep'ing the first line is not enough: some people post-process
325
+  # each Makefile.in and add a new line on top of each file to say so.
326
+  # Grep'ing the whole file is not good either: AIX grep has a line
327
+  # limit of 2048, but all sed's we know have understand at least 4000.
328
+  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
329
+    dirpart=`AS_DIRNAME("$mf")`
330
+  else
331
+    continue
332
+  fi
333
+  # Extract the definition of DEPDIR, am__include, and am__quote
334
+  # from the Makefile without running `make'.
335
+  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
336
+  test -z "$DEPDIR" && continue
337
+  am__include=`sed -n 's/^am__include = //p' < "$mf"`
338
+  test -z "am__include" && continue
339
+  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
340
+  # When using ansi2knr, U may be empty or an underscore; expand it
341
+  U=`sed -n 's/^U = //p' < "$mf"`
342
+  # Find all dependency output files, they are included files with
343
+  # $(DEPDIR) in their names.  We invoke sed twice because it is the
344
+  # simplest approach to changing $(DEPDIR) to its actual value in the
345
+  # expansion.
346
+  for file in `sed -n "
347
+    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
348
+       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
349
+    # Make sure the directory exists.
350
+    test -f "$dirpart/$file" && continue
351
+    fdir=`AS_DIRNAME(["$file"])`
352
+    AS_MKDIR_P([$dirpart/$fdir])
353
+    # echo "creating $dirpart/$file"
354
+    echo '# dummy' > "$dirpart/$file"
355
+  done
356
+done
357
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
358
+
359
+
360
+# AM_OUTPUT_DEPENDENCY_COMMANDS
361
+# -----------------------------
362
+# This macro should only be invoked once -- use via AC_REQUIRE.
363
+#
364
+# This code is only required when automatic dependency tracking
365
+# is enabled.  FIXME.  This creates each `.P' file that we will
366
+# need in order to bootstrap the dependency handling code.
367
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
368
+[AC_CONFIG_COMMANDS([depfiles],
369
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
370
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
371
+])
372
+
373
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
374
+# Free Software Foundation, Inc.
375
+#
376
+# This file is free software; the Free Software Foundation
377
+# gives unlimited permission to copy and/or distribute it,
378
+# with or without modifications, as long as this notice is preserved.
379
+
380
+# serial 8
381
+
382
+# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
383
+AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
384
+
385
+# Do all the work for Automake.                             -*- Autoconf -*-
386
+
387
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
388
+# 2005, 2006, 2008 Free Software Foundation, Inc.
389
+#
390
+# This file is free software; the Free Software Foundation
391
+# gives unlimited permission to copy and/or distribute it,
392
+# with or without modifications, as long as this notice is preserved.
393
+
394
+# serial 13
395
+
396
+# This macro actually does too much.  Some checks are only needed if
397
+# your package does certain things.  But this isn't really a big deal.
398
+
399
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
400
+# AM_INIT_AUTOMAKE([OPTIONS])
401
+# -----------------------------------------------
402
+# The call with PACKAGE and VERSION arguments is the old style
403
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
404
+# and VERSION should now be passed to AC_INIT and removed from
405
+# the call to AM_INIT_AUTOMAKE.
406
+# We support both call styles for the transition.  After
407
+# the next Automake release, Autoconf can make the AC_INIT
408
+# arguments mandatory, and then we can depend on a new Autoconf
409
+# release and drop the old call support.
410
+AC_DEFUN([AM_INIT_AUTOMAKE],
411
+[AC_PREREQ([2.60])dnl
412
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
413
+dnl the ones we care about.
414
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
415
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
416
+AC_REQUIRE([AC_PROG_INSTALL])dnl
417
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
418
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
419
+  # is not polluted with repeated "-I."
420
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
421
+  # test to see if srcdir already configured
422
+  if test -f $srcdir/config.status; then
423
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
424
+  fi
425
+fi
426
+
427
+# test whether we have cygpath
428
+if test -z "$CYGPATH_W"; then
429
+  if (cygpath --version) >/dev/null 2>/dev/null; then
430
+    CYGPATH_W='cygpath -w'
431
+  else
432
+    CYGPATH_W=echo
433
+  fi
434
+fi
435
+AC_SUBST([CYGPATH_W])
436
+
437
+# Define the identity of the package.
438
+dnl Distinguish between old-style and new-style calls.
439
+m4_ifval([$2],
440
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
441
+ AC_SUBST([PACKAGE], [$1])dnl
442
+ AC_SUBST([VERSION], [$2])],
443
+[_AM_SET_OPTIONS([$1])dnl
444
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
445
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
446
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
447
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
448
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
449
+
450
+_AM_IF_OPTION([no-define],,
451
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
452
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
453
+
454
+# Some tools Automake needs.
455
+AC_REQUIRE([AM_SANITY_CHECK])dnl
456
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
457
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
458
+AM_MISSING_PROG(AUTOCONF, autoconf)
459
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
460
+AM_MISSING_PROG(AUTOHEADER, autoheader)
461
+AM_MISSING_PROG(MAKEINFO, makeinfo)
462
+AM_PROG_INSTALL_SH
463
+AM_PROG_INSTALL_STRIP
464
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
465
+# We need awk for the "check" target.  The system "awk" is bad on
466
+# some platforms.
467
+AC_REQUIRE([AC_PROG_AWK])dnl
468
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
469
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
470
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
471
+              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
472
+	      		     [_AM_PROG_TAR([v7])])])
473
+_AM_IF_OPTION([no-dependencies],,
474
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
475
+                  [_AM_DEPENDENCIES(CC)],
476
+                  [define([AC_PROG_CC],
477
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
478
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
479
+                  [_AM_DEPENDENCIES(CXX)],
480
+                  [define([AC_PROG_CXX],
481
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
482
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
483
+                  [_AM_DEPENDENCIES(OBJC)],
484
+                  [define([AC_PROG_OBJC],
485
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
486
+])
487
+])
488
+
489
+
490
+# When config.status generates a header, we must update the stamp-h file.
491
+# This file resides in the same directory as the config header
492
+# that is generated.  The stamp files are numbered to have different names.
493
+
494
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
495
+# loop where config.status creates the headers, so we can generate
496
+# our stamp files there.
497
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
498
+[# Compute $1's index in $config_headers.
499
+_am_arg=$1
500
+_am_stamp_count=1
501
+for _am_header in $config_headers :; do
502
+  case $_am_header in
503
+    $_am_arg | $_am_arg:* )
504
+      break ;;
505
+    * )
506
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
507
+  esac
508
+done
509
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
510
+
511
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
512
+#
513
+# This file is free software; the Free Software Foundation
514
+# gives unlimited permission to copy and/or distribute it,
515
+# with or without modifications, as long as this notice is preserved.
516
+
517
+# AM_PROG_INSTALL_SH
518
+# ------------------
519
+# Define $install_sh.
520
+AC_DEFUN([AM_PROG_INSTALL_SH],
521
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
522
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
523
+AC_SUBST(install_sh)])
524
+
525
+# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
526
+#
527
+# This file is free software; the Free Software Foundation
528
+# gives unlimited permission to copy and/or distribute it,
529
+# with or without modifications, as long as this notice is preserved.
530
+
531
+# serial 2
532
+
533
+# Check whether the underlying file-system supports filenames
534
+# with a leading dot.  For instance MS-DOS doesn't.
535
+AC_DEFUN([AM_SET_LEADING_DOT],
536
+[rm -rf .tst 2>/dev/null
537
+mkdir .tst 2>/dev/null
538
+if test -d .tst; then
539
+  am__leading_dot=.
540
+else
541
+  am__leading_dot=_
542
+fi
543
+rmdir .tst 2>/dev/null
544
+AC_SUBST([am__leading_dot])])
545
+
546
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
547
+
548
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
549
+#
550
+# This file is free software; the Free Software Foundation
551
+# gives unlimited permission to copy and/or distribute it,
552
+# with or without modifications, as long as this notice is preserved.
553
+
554
+# serial 3
555
+
556
+# AM_MAKE_INCLUDE()
557
+# -----------------
558
+# Check to see how make treats includes.
559
+AC_DEFUN([AM_MAKE_INCLUDE],
560
+[am_make=${MAKE-make}
561
+cat > confinc << 'END'
562
+am__doit:
563
+	@echo done
564
+.PHONY: am__doit
565
+END
566
+# If we don't find an include directive, just comment out the code.
567
+AC_MSG_CHECKING([for style of include used by $am_make])
568
+am__include="#"
569
+am__quote=
570
+_am_result=none
571
+# First try GNU make style include.
572
+echo "include confinc" > confmf
573
+# We grep out `Entering directory' and `Leaving directory'
574
+# messages which can occur if `w' ends up in MAKEFLAGS.
575
+# In particular we don't look at `^make:' because GNU make might
576
+# be invoked under some other name (usually "gmake"), in which
577
+# case it prints its new name instead of `make'.
578
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
579
+   am__include=include
580
+   am__quote=
581
+   _am_result=GNU
582
+fi
583
+# Now try BSD make style include.
584
+if test "$am__include" = "#"; then
585
+   echo '.include "confinc"' > confmf
586
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
587
+      am__include=.include
588
+      am__quote="\""
589
+      _am_result=BSD
590
+   fi
591
+fi
592
+AC_SUBST([am__include])
593
+AC_SUBST([am__quote])
594
+AC_MSG_RESULT([$_am_result])
595
+rm -f confinc confmf
596
+])
597
+
598
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
599
+
600
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
601
+# Free Software Foundation, Inc.
602
+#
603
+# This file is free software; the Free Software Foundation
604
+# gives unlimited permission to copy and/or distribute it,
605
+# with or without modifications, as long as this notice is preserved.
606
+
607
+# serial 5
608
+
609
+# AM_MISSING_PROG(NAME, PROGRAM)
610
+# ------------------------------
611
+AC_DEFUN([AM_MISSING_PROG],
612
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
613
+$1=${$1-"${am_missing_run}$2"}
614
+AC_SUBST($1)])
615
+
616
+
617
+# AM_MISSING_HAS_RUN
618
+# ------------------
619
+# Define MISSING if not defined so far and test if it supports --run.
620
+# If it does, set am_missing_run to use it, otherwise, to nothing.
621
+AC_DEFUN([AM_MISSING_HAS_RUN],
622
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
623
+AC_REQUIRE_AUX_FILE([missing])dnl
624
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
625
+# Use eval to expand $SHELL
626
+if eval "$MISSING --run true"; then
627
+  am_missing_run="$MISSING --run "
628
+else
629
+  am_missing_run=
630
+  AC_MSG_WARN([`missing' script is too old or missing])
631
+fi
632
+])
633
+
634
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
635
+#
636
+# This file is free software; the Free Software Foundation
637
+# gives unlimited permission to copy and/or distribute it,
638
+# with or without modifications, as long as this notice is preserved.
639
+
640
+# AM_PROG_MKDIR_P
641
+# ---------------
642
+# Check for `mkdir -p'.
643
+AC_DEFUN([AM_PROG_MKDIR_P],
644
+[AC_PREREQ([2.60])dnl
645
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
646
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
647
+dnl while keeping a definition of mkdir_p for backward compatibility.
648
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
649
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
650
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
651
+dnl adjustment using top_builddir (which is defined more often than
652
+dnl MKDIR_P).
653
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
654
+case $mkdir_p in
655
+  [[\\/$]]* | ?:[[\\/]]*) ;;
656
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
657
+esac
658
+])
659
+
660
+# Helper functions for option handling.                     -*- Autoconf -*-
661
+
662
+# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
663
+#
664
+# This file is free software; the Free Software Foundation
665
+# gives unlimited permission to copy and/or distribute it,
666
+# with or without modifications, as long as this notice is preserved.
667
+
668
+# serial 3
669
+
670
+# _AM_MANGLE_OPTION(NAME)
671
+# -----------------------
672
+AC_DEFUN([_AM_MANGLE_OPTION],
673
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
674
+
675
+# _AM_SET_OPTION(NAME)
676
+# ------------------------------
677
+# Set option NAME.  Presently that only means defining a flag for this option.
678
+AC_DEFUN([_AM_SET_OPTION],
679
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
680
+
681
+# _AM_SET_OPTIONS(OPTIONS)
682
+# ----------------------------------
683
+# OPTIONS is a space-separated list of Automake options.
684
+AC_DEFUN([_AM_SET_OPTIONS],
685
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
686
+
687
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
688
+# -------------------------------------------
689
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
690
+AC_DEFUN([_AM_IF_OPTION],
691
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
692
+
693
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
694
+
695
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
696
+# Free Software Foundation, Inc.
697
+#
698
+# This file is free software; the Free Software Foundation
699
+# gives unlimited permission to copy and/or distribute it,
700
+# with or without modifications, as long as this notice is preserved.
701
+
702
+# serial 4
703
+
704
+# AM_SANITY_CHECK
705
+# ---------------
706
+AC_DEFUN([AM_SANITY_CHECK],
707
+[AC_MSG_CHECKING([whether build environment is sane])
708
+# Just in case
709
+sleep 1
710
+echo timestamp > conftest.file
711
+# Do `set' in a subshell so we don't clobber the current shell's
712
+# arguments.  Must try -L first in case configure is actually a
713
+# symlink; some systems play weird games with the mod time of symlinks
714
+# (eg FreeBSD returns the mod time of the symlink's containing
715
+# directory).
716
+if (
717
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
718
+   if test "$[*]" = "X"; then
719
+      # -L didn't work.
720
+      set X `ls -t $srcdir/configure conftest.file`
721
+   fi
722
+   rm -f conftest.file
723
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
724
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
725
+
726
+      # If neither matched, then we have a broken ls.  This can happen
727
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
728
+      # broken ls alias from the environment.  This has actually
729
+      # happened.  Such a system could not be considered "sane".
730
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
731
+alias in your environment])
732
+   fi
733
+
734
+   test "$[2]" = conftest.file
735
+   )
736
+then
737
+   # Ok.
738
+   :
739
+else
740
+   AC_MSG_ERROR([newly created file is older than distributed files!
741
+Check your system clock])
742
+fi
743
+AC_MSG_RESULT(yes)])
744
+
745
+# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
746
+#
747
+# This file is free software; the Free Software Foundation
748
+# gives unlimited permission to copy and/or distribute it,
749
+# with or without modifications, as long as this notice is preserved.
750
+
751
+# AM_PROG_INSTALL_STRIP
752
+# ---------------------
753
+# One issue with vendor `install' (even GNU) is that you can't
754
+# specify the program used to strip binaries.  This is especially
755
+# annoying in cross-compiling environments, where the build's strip
756
+# is unlikely to handle the host's binaries.
757
+# Fortunately install-sh will honor a STRIPPROG variable, so we
758
+# always use install-sh in `make install-strip', and initialize
759
+# STRIPPROG with the value of the STRIP variable (set by the user).
760
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
761
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
762
+# Installed binaries are usually stripped using `strip' when the user
763
+# run `make install-strip'.  However `strip' might not be the right
764
+# tool to use in cross-compilation environments, therefore Automake
765
+# will honor the `STRIP' environment variable to overrule this program.
766
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
767
+if test "$cross_compiling" != no; then
768
+  AC_CHECK_TOOL([STRIP], [strip], :)
769
+fi
770
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
771
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
772
+
773
+# Copyright (C) 2006  Free Software Foundation, Inc.
774
+#
775
+# This file is free software; the Free Software Foundation
776
+# gives unlimited permission to copy and/or distribute it,
777
+# with or without modifications, as long as this notice is preserved.
778
+
779
+# _AM_SUBST_NOTMAKE(VARIABLE)
780
+# ---------------------------
781
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
782
+# This macro is traced by Automake.
783
+AC_DEFUN([_AM_SUBST_NOTMAKE])
784
+
785
+# Check how to create a tarball.                            -*- Autoconf -*-
786
+
787
+# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
788
+#
789
+# This file is free software; the Free Software Foundation
790
+# gives unlimited permission to copy and/or distribute it,
791
+# with or without modifications, as long as this notice is preserved.
792
+
793
+# serial 2
794
+
795
+# _AM_PROG_TAR(FORMAT)
796
+# --------------------
797
+# Check how to create a tarball in format FORMAT.
798
+# FORMAT should be one of `v7', `ustar', or `pax'.
799
+#
800
+# Substitute a variable $(am__tar) that is a command
801
+# writing to stdout a FORMAT-tarball containing the directory
802
+# $tardir.
803
+#     tardir=directory && $(am__tar) > result.tar
804
+#
805
+# Substitute a variable $(am__untar) that extract such
806
+# a tarball read from stdin.
807
+#     $(am__untar) < result.tar
808
+AC_DEFUN([_AM_PROG_TAR],
809
+[# Always define AMTAR for backward compatibility.
810
+AM_MISSING_PROG([AMTAR], [tar])
811
+m4_if([$1], [v7],
812
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
813
+     [m4_case([$1], [ustar],, [pax],,
814
+              [m4_fatal([Unknown tar format])])
815
+AC_MSG_CHECKING([how to create a $1 tar archive])
816
+# Loop over all known methods to create a tar archive until one works.
817
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
818
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
819
+# Do not fold the above two line into one, because Tru64 sh and
820
+# Solaris sh will not grok spaces in the rhs of `-'.
821
+for _am_tool in $_am_tools
822
+do
823
+  case $_am_tool in
824
+  gnutar)
825
+    for _am_tar in tar gnutar gtar;
826
+    do
827
+      AM_RUN_LOG([$_am_tar --version]) && break
828
+    done
829
+    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
830
+    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
831
+    am__untar="$_am_tar -xf -"
832
+    ;;
833
+  plaintar)
834
+    # Must skip GNU tar: if it does not support --format= it doesn't create
835
+    # ustar tarball either.
836
+    (tar --version) >/dev/null 2>&1 && continue
837
+    am__tar='tar chf - "$$tardir"'
838
+    am__tar_='tar chf - "$tardir"'
839
+    am__untar='tar xf -'
840
+    ;;
841
+  pax)
842
+    am__tar='pax -L -x $1 -w "$$tardir"'
843
+    am__tar_='pax -L -x $1 -w "$tardir"'
844
+    am__untar='pax -r'
845
+    ;;
846
+  cpio)
847
+    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
848
+    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
849
+    am__untar='cpio -i -H $1 -d'
850
+    ;;
851
+  none)
852
+    am__tar=false
853
+    am__tar_=false
854
+    am__untar=false
855
+    ;;
856
+  esac
857
+
858
+  # If the value was cached, stop now.  We just wanted to have am__tar
859
+  # and am__untar set.
860
+  test -n "${am_cv_prog_tar_$1}" && break
861
+
862
+  # tar/untar a dummy directory, and stop if the command works
863
+  rm -rf conftest.dir
864
+  mkdir conftest.dir
865
+  echo GrepMe > conftest.dir/file
866
+  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
867
+  rm -rf conftest.dir
868
+  if test -s conftest.tar; then
869
+    AM_RUN_LOG([$am__untar <conftest.tar])
870
+    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
871
+  fi
872
+done
873
+rm -rf conftest.dir
874
+
875
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
876
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
877
+AC_SUBST([am__tar])
878
+AC_SUBST([am__untar])
879
+]) # _AM_PROG_TAR
880
+
881
+m4_include([acinclude.m4])

+ 22
- 0
client/Makefile.am View File

@@ -0,0 +1,22 @@
1
+AUTOMAKE_OPTIONS = foreign
2
+
3
+SUBDIRS = config
4
+
5
+KDE_CXXFLAGS = -DQT_PLUGIN
6
+
7
+INCLUDES = $(all_includes) -I$(kde_includes)/kwin
8
+
9
+kwindir = $(kde_datadir)/kwin/
10
+kwin_DATA = crystal.desktop
11
+
12
+noinst_HEADERS = crystalclient.h crystalbutton.h imageholder.h buttonimage.h tiles.h overlays.h
13
+
14
+kde_module_LTLIBRARIES = kwin3_crystal.la
15
+kwin3_crystal_la_SOURCES = crystalclient.cc myrootpixmap.cc crystalbutton.cpp \
16
+	imageholder.cpp buttonimage.cpp tiles.h overlays.h
17
+kwin3_crystal_la_LIBADD = $(kde_libraries)/libkdecorations.la $(LIB_QT) $(LIB_KDEUI)
18
+kwin3_crystal_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN)
19
+kwin3_crystal_la_METASOURCES = AUTO
20
+
21
+CLEANFILES = tiles.h overlays.h
22
+DISTCLEANFILES = $(kwin3_crystal_la_METASOURCES)

+ 244
- 0
client/buttonimage.cpp View File

@@ -0,0 +1,244 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2006 by Sascha Hlusiak                                  *
3
+ *   Spam84@gmx.de                                                         *
4
+ *                                                                         *
5
+ *   This program is free software; you can redistribute it and/or modify  *
6
+ *   it under the terms of the GNU General Public License as published by  *
7
+ *   the Free Software Foundation; either version 2 of the License, or     *
8
+ *   (at your option) any later version.                                   *
9
+ *                                                                         *
10
+ *   This program is distributed in the hope that it will be useful,       *
11
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
+ *   GNU General Public License for more details.                          *
14
+ *                                                                         *
15
+ *   You should have received a copy of the GNU General Public License     *
16
+ *   along with this program; if not, write to the                         *
17
+ *   Free Software Foundation, Inc.,                                       *
18
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
19
+ ***************************************************************************/
20
+
21
+
22
+#include <qimage.h>
23
+#include <math.h>
24
+#include <kimageeffect.h>
25
+
26
+#include "buttonimage.h"
27
+
28
+
29
+
30
+
31
+
32
+ButtonImage::ButtonImage(const QRgb *d_normal,int w,int h)
33
+{ 
34
+	normal=hovered=pressed=animated=NULL;
35
+	image_width=w;
36
+	image_height=h;
37
+	normal_data=hovered_data=animated_data=pressed_data=NULL;
38
+	org_normal_data=org_hovered_data=NULL;
39
+	normal_color=hovered_color=pressed_color=QColor(255,255,255);
40
+	reset();
41
+	if (d_normal)SetNormal(d_normal,w,h);
42
+}
43
+
44
+ButtonImage::~ButtonImage()
45
+{
46
+	if (normal)delete normal;
47
+	if (hovered)delete hovered;
48
+	if (pressed)delete pressed;
49
+	if (animated)delete animated;
50
+	if (animated_data)delete[] animated_data;
51
+	if (pressed_data)delete[] pressed_data;
52
+	if (hovered_data)delete[] hovered_data;
53
+	if (normal_data)delete[] normal_data;
54
+	if (org_normal_data)delete[] org_normal_data;
55
+	if (org_hovered_data)delete[] org_hovered_data;
56
+}
57
+
58
+QImage ButtonImage::CreateImage(QRgb *data,QColor color)
59
+{
60
+	tint(data,color);
61
+	QImage img=QImage((uchar*)data,image_width,image_height,32,NULL,0,QImage::LittleEndian),img2;
62
+	img.setAlphaBuffer(true);
63
+	
64
+	return img;
65
+}
66
+
67
+void ButtonImage::reset()
68
+{
69
+	if (normal)delete normal;
70
+	if (hovered)delete hovered;
71
+	if (pressed)delete pressed;
72
+	if (animated)delete animated;
73
+	normal=hovered=pressed=animated=NULL;
74
+
75
+	if (normal_data)delete[] normal_data;
76
+	if (hovered_data)delete[] hovered_data;
77
+	if (pressed_data)delete[] pressed_data;
78
+	if (animated_data)delete[] animated_data;
79
+
80
+	if (org_hovered_data)delete[] org_hovered_data;
81
+	if (org_normal_data)delete[] org_normal_data;
82
+	normal_data=hovered_data=animated_data=pressed_data=NULL;
83
+	org_normal_data=org_hovered_data=NULL;
84
+
85
+	hSpace=vSpace=2;
86
+	drawMode=0;
87
+}
88
+
89
+void ButtonImage::SetNormal(const QRgb *d_normal,int w,int h)
90
+{
91
+	image_width=w;
92
+	image_height=h;
93
+	if (normal)delete normal;
94
+	if (animated)delete animated;
95
+	animated=NULL;
96
+	if (animated_data)delete[] animated_data;
97
+	animated_data=NULL;
98
+	if (hovered_data)delete[] hovered_data;
99
+	hovered_data=NULL;
100
+	if (pressed_data)delete[] pressed_data;
101
+	pressed_data=NULL;
102
+	if (normal_data)delete[] normal_data;
103
+
104
+	org_normal_data=new QRgb[image_width*image_height];
105
+	memcpy(org_normal_data,d_normal,sizeof(QRgb)*image_width*image_height);
106
+	normal_data=new QRgb[image_width*image_height];
107
+	memcpy(normal_data,d_normal,sizeof(QRgb)*image_width*image_height);
108
+	normal=new QImage(CreateImage(normal_data,normal_color));
109
+}
110
+
111
+void ButtonImage::SetHovered(const QRgb *d_hovered)
112
+{
113
+	if (hovered)delete hovered;
114
+	if (hovered_data)delete[] hovered_data;
115
+	if (org_hovered_data)delete[] org_hovered_data;
116
+	if (d_hovered)
117
+	{
118
+		org_hovered_data=new QRgb[image_width*image_height];
119
+		hovered_data=new QRgb[image_width*image_height];
120
+		memcpy(hovered_data,d_hovered,sizeof(QRgb)*image_width*image_height);
121
+		memcpy(org_hovered_data,d_hovered,sizeof(QRgb)*image_width*image_height);
122
+		hovered=new QImage(CreateImage(hovered_data,hovered_color));
123
+	}else{
124
+		hovered=NULL;
125
+		hovered_data=NULL;
126
+		org_hovered_data=NULL;
127
+	}
128
+}
129
+
130
+void ButtonImage::SetPressed(const QRgb *d_pressed)
131
+{
132
+	if (pressed)delete pressed;
133
+	if (pressed_data)delete[] pressed_data;
134
+	if (d_pressed)
135
+	{
136
+		pressed_data=new QRgb[image_width*image_height];
137
+		memcpy(pressed_data,d_pressed,sizeof(QRgb)*image_width*image_height);
138
+		pressed=new QImage(CreateImage(pressed_data,pressed_color));
139
+	}else{
140
+		pressed=NULL;
141
+		pressed_data=NULL;
142
+	}
143
+}
144
+
145
+bool ButtonImage::initialized()
146
+{
147
+	return ((org_normal_data!=NULL)&&(normal_data!=NULL)&&(normal!=NULL));
148
+}
149
+
150
+void ButtonImage::finish()
151
+{
152
+	if (!org_normal_data)
153
+	{
154
+/*		printf("ERROR: No org_normal_data set!\n"); */
155
+		return;
156
+	}
157
+
158
+	if (!hovered_data){
159
+		hovered_data=new QRgb[image_width*image_height];
160
+		float faktor=::factory->hovereffect?0.5:1.0;
161
+		for (int i=0;i<image_width*image_height;i++)
162
+		{
163
+			hovered_data[i]=qRgba(qRed(org_normal_data[i]),qGreen(org_normal_data[i]),qBlue(org_normal_data[i]),
164
+				(int)(255.0*pow((float)qAlpha(org_normal_data[i])/255.0,faktor)));
165
+		}
166
+		if (org_hovered_data)delete[] org_hovered_data;
167
+		org_hovered_data=new QRgb[image_width*image_height];
168
+		memcpy(org_hovered_data,hovered_data,sizeof(QRgb)*image_width*image_height);
169
+		hovered=new QImage(CreateImage(hovered_data,hovered_color));
170
+	}
171
+
172
+	if (!pressed_data){
173
+		float faktor=::factory->hovereffect?0.5:0.4;
174
+		pressed_data=new QRgb[image_width*image_height];
175
+		if (!org_hovered_data)
176
+		{
177
+			org_hovered_data=hovered_data;
178
+			printf("ERROR: %s (@%d)\n",__FILE__,__LINE__);
179
+		}
180
+
181
+		for (int i=0;i<image_width*image_height;i++)
182
+		{
183
+			pressed_data[i]=qRgba(qRed(org_hovered_data[i]),qGreen(org_hovered_data[i]),qBlue(org_hovered_data[i]),
184
+				(int)(255.0*pow((float)qAlpha(org_hovered_data[i])/255.0,faktor)));
185
+		}
186
+		pressed=new QImage(CreateImage(pressed_data,pressed_color));
187
+	}
188
+
189
+	if (!animated_data)animated_data=new QRgb[image_width*image_height];
190
+	if (!animated)
191
+	{
192
+		animated=new QImage((uchar*)animated_data,image_width,image_height,32,NULL,0,QImage::LittleEndian);
193
+		animated->setAlphaBuffer(true);
194
+	}
195
+}
196
+
197
+QImage* ButtonImage::getAnimated( float anim)
198
+{
199
+	if (!normal_data)return NULL;
200
+	if (!animated_data)return NULL;
201
+
202
+	for (int i=0;i<image_width*image_height;i++)
203
+	{
204
+		const float r1=(float)qRed(normal_data[i])/255.0f;
205
+		const float r2=(float)qRed(hovered_data[i])/255.0f;
206
+		const float g1=(float)qGreen(normal_data[i])/255.0f;
207
+		const float g2=(float)qGreen(hovered_data[i])/255.0f;
208
+		const float b1=(float)qBlue(normal_data[i])/255.0f;
209
+		const float b2=(float)qBlue(hovered_data[i])/255.0f;
210
+		const float a1=(float)qAlpha(normal_data[i])/255.0f;
211
+		const float a2=(float)qAlpha(hovered_data[i])/255.0f;
212
+		
213
+		animated_data[i]=qRgba(
214
+			(int)((r1*(1.0f-anim)+r2*anim)*255.0f),
215
+			(int)((g1*(1.0f-anim)+g2*anim)*255.0f),
216
+			(int)((b1*(1.0f-anim)+b2*anim)*255.0f),
217
+			(int)((a1*(1.0f-anim)+a2*anim)*255.0f));
218
+	}
219
+	
220
+	return animated;
221
+}
222
+
223
+void ButtonImage::tint(QRgb *data,QColor color)
224
+{
225
+	float f_r=(float)color.red()/255.0;
226
+	float f_g=(float)color.green()/255.0;
227
+	float f_b=(float)color.blue()/255.0;
228
+	for (int i=0;i<image_width*image_height;i++)
229
+	{
230
+		float r=(float)qRed(data[i])/255.0;
231
+		float g=(float)qGreen(data[i])/255.0;
232
+		float b=(float)qBlue(data[i])/255.0;
233
+
234
+		r*=f_r;
235
+		g*=f_g;
236
+		b*=f_b;
237
+
238
+		data[i]=qRgba(
239
+			(int)(r*255.0),
240
+			(int)(g*255.0),
241
+			(int)(b*255.0),
242
+			qAlpha(data[i]));
243
+	}
244
+}

+ 66
- 0
client/buttonimage.h View File

@@ -0,0 +1,66 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2006 by Sascha Hlusiak                                  *
3
+ *   Spam84@gmx.de                                                         *
4
+ *                                                                         *
5
+ *   This program is free software; you can redistribute it and/or modify  *
6
+ *   it under the terms of the GNU General Public License as published by  *
7
+ *   the Free Software Foundation; either version 2 of the License, or     *
8
+ *   (at your option) any later version.                                   *
9
+ *                                                                         *
10
+ *   This program is distributed in the hope that it will be useful,       *
11
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
+ *   GNU General Public License for more details.                          *
14
+ *                                                                         *
15
+ *   You should have received a copy of the GNU General Public License     *
16
+ *   along with this program; if not, write to the                         *
17
+ *   Free Software Foundation, Inc.,                                       *
18
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
19
+ ***************************************************************************/
20
+
21
+
22
+
23
+#ifndef _BUTTON_IMAGE_INCLUDED_
24
+#define _BUTTON_IMAGE_INCLUDED_
25
+
26
+#include <qimage.h>
27
+#include "crystalclient.h"
28
+
29
+#define DEFAULT_IMAGE_SIZE 14
30
+
31
+
32
+class ButtonImage
33
+{
34
+public:
35
+	QImage *normal,*hovered,*pressed;
36
+	int image_width,image_height;
37
+	int hSpace,vSpace;
38
+	int drawMode;
39
+	QColor normal_color,hovered_color,pressed_color;
40
+	
41
+	QImage *animated;
42
+	QRgb *normal_data,*hovered_data,*animated_data,*pressed_data;
43
+	QRgb *org_normal_data,*org_hovered_data;
44
+	
45
+	ButtonImage(const QRgb *d_normal=NULL,int w=DEFAULT_IMAGE_SIZE,int h=DEFAULT_IMAGE_SIZE);
46
+	virtual ~ButtonImage();
47
+	
48
+	void SetNormal(const QRgb *d_normal,int w=DEFAULT_IMAGE_SIZE,int h=DEFAULT_IMAGE_SIZE);
49
+	void SetHovered(const QRgb *d_hovered=NULL);
50
+	void SetPressed(const QRgb *d_pressed=NULL);
51
+	void reset();
52
+	void finish();
53
+	bool initialized();
54
+
55
+	void setSpace(int hS,int vS) { hSpace=hS; vSpace=vS; }
56
+	void setDrawMode(int dm) { drawMode=dm; }
57
+	void setColors(QColor n,QColor h,QColor p) { normal_color=n; hovered_color=h; pressed_color=p; }
58
+
59
+	QImage* getAnimated(float anim);
60
+	
61
+private:
62
+	QImage CreateImage(QRgb *data,QColor color);
63
+	void tint(QRgb *data,QColor color);
64
+};
65
+
66
+#endif

+ 22
- 0
client/config/Makefile.am View File

@@ -0,0 +1,22 @@
1
+AUTOMAKE_OPTIONS = foreign
2
+
3
+KDE_CXXFLAGS = -DQT_PLUGIN
4
+
5
+INCLUDES = $(all_includes)
6
+
7
+noinst_HEADERS = crystalconfig.h
8
+
9
+kde_module_LTLIBRARIES = kwin_crystal_config.la
10
+kwin_crystal_config_la_SOURCES = configdialog.ui infodialog.ui crystalconfig.cc crystalconfig.h
11
+kwin_crystal_config_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN)
12
+kwin_crystal_config_la_LIBADD = $(LIB_KDEUI) $(LIB_KIO) $(LIB_QT)
13
+kwin_crystal_config_la_METASOURCES = AUTO
14
+
15
+DISTCLEANFILES = $(kwin_crystal_config_la_METASOURCES)
16
+
17
+crystalconfig.cc: configdialog.h infodialog.h
18
+
19
+
20
+messages:
21
+	$(XGETTEXT) *.cpp -o $(podir)/kwin_crystal_config.pot
22
+METASOURCES = AUTO

+ 2417
- 0
client/config/configdialog.ui
File diff suppressed because it is too large
View File


+ 384
- 0
client/config/crystalconfig.cc View File

@@ -0,0 +1,384 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2006 by Sascha Hlusiak                                  *
3
+ *   Spam84@gmx.de                                                         *
4
+ *                                                                         *
5
+ *   This program is free software; you can redistribute it and/or modify  *
6
+ *   it under the terms of the GNU General Public License as published by  *
7
+ *   the Free Software Foundation; either version 2 of the License, or     *
8
+ *   (at your option) any later version.                                   *
9
+ *                                                                         *
10
+ *   This program is distributed in the hope that it will be useful,       *
11
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
+ *   GNU General Public License for more details.                          *
14
+ *                                                                         *
15
+ *   You should have received a copy of the GNU General Public License     *
16
+ *   along with this program; if not, write to the                         *
17
+ *   Free Software Foundation, Inc.,                                       *
18
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
19
+ ***************************************************************************/
20
+
21
+#include <kconfig.h>
22
+#include <klocale.h>
23
+#include <kglobal.h>
24
+#include <qbuttongroup.h>
25
+#include <qlabel.h>
26
+#include <qgroupbox.h>
27
+#include <qbuttongroup.h>
28
+#include <qcheckbox.h>
29
+#include <qradiobutton.h>
30
+#include <qwhatsthis.h>
31
+#include <qspinbox.h>
32
+#include <qcheckbox.h>
33
+#include <qcombobox.h>
34
+#include <qwidgetstack.h>
35
+#include <qlineedit.h>
36
+#include <qfiledialog.h>
37
+#include <kcolorbutton.h>
38
+#include <kfiledialog.h>
39
+#include <qpicture.h>
40
+#include <kapplication.h>
41
+#include <kurlrequester.h>
42
+
43
+#include "configdialog.h"
44
+#include "infodialog.h"
45
+#include "crystalconfig.h"
46
+
47
+
48
+CrystalConfig::CrystalConfig(KConfig*, QWidget* parent)
49
+    : QObject(parent), config_(0), dialog_(0)
50
+{
51
+	config_ = new KConfig("kwincrystalrc");
52
+	
53
+	dialog_ = new ConfigDialog(parent);
54
+	dialog_->show();
55
+		
56
+	connect(dialog_->titlealign, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int)));
57
+	
58
+	connect(dialog_->drawCaption, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
59
+	connect(dialog_->textshadow, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int)));
60
+	connect(dialog_->tooltip,SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
61
+	connect(dialog_->wheelTask,SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
62
+	
63
+	connect(dialog_->trackdesktop, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int)));
64
+	
65
+	connect(dialog_->shade1, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int)));
66
+	connect(dialog_->shade2, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int)));
67
+	
68
+	connect(dialog_->frame1, SIGNAL(activated(int)),this, SLOT(selectionChanged(int)));
69
+	connect(dialog_->frame2, SIGNAL(activated(int)),this, SLOT(selectionChanged(int)));
70
+	connect(dialog_->frameColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
71
+	connect(dialog_->frameColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
72
+	
73
+	connect(dialog_->inline1, SIGNAL(activated(int)),this, SLOT(selectionChanged(int)));
74
+	connect(dialog_->inline2, SIGNAL(activated(int)),this, SLOT(selectionChanged(int)));
75
+	connect(dialog_->inlineColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
76
+	connect(dialog_->inlineColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
77
+		
78
+	connect(dialog_->type1,SIGNAL(activated(int)),this,SLOT(selectionChanged(int)));
79
+	connect(dialog_->type2,SIGNAL(activated(int)),this,SLOT(selectionChanged(int)));
80
+	
81
+	connect(dialog_->enableTransparency,SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
82
+	
83
+	connect(dialog_->borderwidth, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int)));
84
+	connect(dialog_->titlebarheight, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int)));
85
+	
86
+	connect(dialog_->tlc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
87
+	connect(dialog_->trc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
88
+	connect(dialog_->blc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
89
+	connect(dialog_->brc, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
90
+	connect(dialog_->buttonColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
91
+	connect(dialog_->buttonColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
92
+	connect(dialog_->buttonColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
93
+	connect(dialog_->minColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
94
+	connect(dialog_->minColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
95
+	connect(dialog_->minColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
96
+	connect(dialog_->maxColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
97
+	connect(dialog_->maxColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
98
+	connect(dialog_->maxColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
99
+	connect(dialog_->closeColor1, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
100
+	connect(dialog_->closeColor2, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
101
+	connect(dialog_->closeColor3, SIGNAL(changed(const QColor&)),this,SLOT(colorChanged(const QColor&)));
102
+	
103
+	connect(dialog_->hover, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
104
+	connect(dialog_->animateHover, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
105
+	connect(dialog_->buttonTheme, SIGNAL(activated(int)),this,SLOT(selectionChanged(int)));
106
+	connect(dialog_->tintButtons, SIGNAL(toggled(bool)),this,SLOT(boolChanged(bool)));
107
+	connect(dialog_->menuimage, SIGNAL(stateChanged(int)),this,SLOT(selectionChanged(int)));
108
+	
109
+	connect(dialog_->repaintMode, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int)));
110
+	
111
+	connect(dialog_->updateTime, SIGNAL(valueChanged(int)),this, SLOT(selectionChanged(int)));
112
+		
113
+	connect(dialog_->infoButton, SIGNAL(clicked(void)),this,SLOT(infoDialog(void)));
114
+
115
+	connect(dialog_->active_blur, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int)));
116
+	connect(dialog_->inactive_blur, SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int)));
117
+
118
+	connect(dialog_->userPicture1, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int)));
119
+	connect(dialog_->userPicture2, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int)));
120
+	connect(dialog_->activeFile,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged( const QString& )));
121
+	connect(dialog_->inactiveFile,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged( const QString& )));
122
+
123
+
124
+	connect(dialog_->overlay_active, SIGNAL(activated(int)),this, SLOT(overlay_active_changed(int)));
125
+	connect(dialog_->overlay_inactive, SIGNAL(activated(int)),this, SLOT(overlay_inactive_changed(int)));
126
+
127
+	connect(dialog_->overlay_active_file,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged(const QString &)));
128
+	connect(dialog_->overlay_inactive_file,SIGNAL(textChanged(const QString&)),this,SLOT(textChanged(const QString &)));
129
+
130
+
131
+	connect(dialog_->logoEnabled, SIGNAL(clicked(int)),this, SLOT(selectionChanged(int)));
132
+	connect(dialog_->logoFile, SIGNAL(textChanged(const QString &)),this, SLOT(logoTextChanged(const QString&)));
133
+	connect(dialog_->logoStretch, SIGNAL(activated(int)),this, SLOT(selectionChanged(int)));
134
+	connect(dialog_->logoActive, SIGNAL(stateChanged(int)),this, SLOT(selectionChanged(int)));
135
+	connect(dialog_->logoDistance,SIGNAL(valueChanged(int)),this,SLOT(selectionChanged(int)));
136
+
137
+	load(config_);
138
+}
139
+
140
+CrystalConfig::~CrystalConfig()
141
+{
142
+	if (dialog_) delete dialog_;
143
+	if (config_) delete config_;
144
+}
145
+
146
+void CrystalConfig::selectionChanged(int)
147
+{
148
+	emit changed();
149
+}
150
+
151
+void CrystalConfig::load(KConfig*)
152
+{
153
+	QColor color(255,255,255);
154
+
155
+	config_->setGroup("General");
156
+
157
+	QString value = config_->readEntry("TitleAlignment", "AlignHCenter");
158
+	QRadioButton *button = (QRadioButton*)dialog_->titlealign->child(value);
159
+	if (button) button->setChecked(true);
160
+	
161
+	dialog_->drawCaption->setChecked(config_->readBoolEntry("DrawCaption",true));
162
+	dialog_->textshadow->setChecked(config_->readBoolEntry("TextShadow",true));
163
+	dialog_->tooltip->setChecked(config_->readBoolEntry("CaptionTooltip",true));
164
+	dialog_->wheelTask->setChecked(config_->readBoolEntry("WheelTask",false));
165
+
166
+	dialog_->enableTransparency->setChecked(config_->readBoolEntry("EnableTransparency",true));
167
+	dialog_->trackdesktop->setChecked(config_->readBoolEntry("TrackDesktop",false));
168
+
169
+	dialog_->frame1->setCurrentItem(config_->readNumEntry("ActiveFrame",1));
170
+	color=QColor(192,192,192);
171
+	dialog_->frameColor1->setColor(config_->readColorEntry("FrameColor1",&color));
172
+	dialog_->frame2->setCurrentItem(config_->readNumEntry("InactiveFrame",1));
173
+	color=QColor(192,192,192);
174
+	dialog_->frameColor2->setColor(config_->readColorEntry("FrameColor2",&color));
175
+
176
+	dialog_->inline1->setCurrentItem(config_->readNumEntry("ActiveInline",0));
177
+	color=QColor(192,192,192);
178
+	dialog_->inlineColor1->setColor(config_->readColorEntry("InlineColor1",&color));
179
+	dialog_->inline2->setCurrentItem(config_->readNumEntry("InactiveInline",0));
180
+	color=QColor(192,192,192);
181
+	dialog_->inlineColor2->setColor(config_->readColorEntry("InlineColor2",&color));
182
+
183
+
184
+	dialog_->borderwidth->setValue(config_->readNumEntry("Borderwidth",5));
185
+	dialog_->titlebarheight->setValue(config_->readNumEntry("Titlebarheight",19));
186
+
187
+	int active=config_->readNumEntry("ActiveShade",30);
188
+	dialog_->shade1->setValue(active);
189
+
190
+	active=config_->readNumEntry("InactiveShade",-30);
191
+	dialog_->shade2->setValue(active);
192
+
193
+	dialog_->type1->setCurrentItem(config_->readNumEntry("ActiveMode",0));
194
+	dialog_->type2->setCurrentItem(config_->readNumEntry("InactiveMode",2));
195
+
196
+	int cornersFlag = config_->readNumEntry("RoundCorners",TOP_LEFT & TOP_RIGHT );
197
+	dialog_->tlc->setChecked( cornersFlag & TOP_LEFT );
198
+	dialog_->trc->setChecked( cornersFlag & TOP_RIGHT );
199
+	dialog_->blc->setChecked( cornersFlag & BOT_LEFT );
200
+	dialog_->brc->setChecked( cornersFlag & BOT_RIGHT );
201
+
202
+	dialog_->hover->setChecked(config_->readBoolEntry("HoverEffect",true));
203
+	dialog_->animateHover->setChecked(config_->readBoolEntry("AnimateHover",true));
204
+	dialog_->menuimage->setChecked(config_->readBoolEntry("MenuImage",true));
205
+
206
+	color=QColor(255,255,255);
207
+	dialog_->buttonColor1->setColor(config_->readColorEntry("ButtonColor",&color));
208
+	dialog_->buttonColor2->setColor(config_->readColorEntry("ButtonColor2",&color));
209
+	dialog_->buttonColor3->setColor(config_->readColorEntry("ButtonColor3",&color));
210
+	dialog_->minColor1->setColor(config_->readColorEntry("MinColor",&color));
211
+	dialog_->minColor2->setColor(config_->readColorEntry("MinColor2",&color));
212
+	dialog_->minColor3->setColor(config_->readColorEntry("MinColor3",&color));
213
+	dialog_->maxColor1->setColor(config_->readColorEntry("MaxColor",&color));
214
+	dialog_->maxColor2->setColor(config_->readColorEntry("MaxColor2",&color));
215
+	dialog_->maxColor3->setColor(config_->readColorEntry("MaxColor3",&color));
216
+	dialog_->closeColor1->setColor(config_->readColorEntry("CloseColor",&color));
217
+	dialog_->closeColor2->setColor(config_->readColorEntry("CloseColor2",&color));
218
+	dialog_->closeColor3->setColor(config_->readColorEntry("CloseColor3",&color));
219
+
220
+	dialog_->tintButtons->setChecked(config_->readBoolEntry("TintButtons",dialog_->buttonColor1->color()!=QColor(255,255,255)));
221
+
222
+	dialog_->buttonTheme->setCurrentItem(config_->readNumEntry("ButtonTheme",8));
223
+	
224
+	dialog_->updateTime->setValue(config_->readNumEntry("RepaintTime",200));
225
+	button=(QRadioButton*)dialog_->repaintMode->find(config_->readNumEntry("RepaintMode",1));
226
+	if (button)button->setChecked(true);
227
+
228
+	dialog_->active_blur->setValue(config_->readNumEntry("ActiveBlur",0));
229
+	dialog_->inactive_blur->setValue(config_->readNumEntry("InactiveBlur",0));
230
+
231
+
232
+	dialog_->activeFile->setURL(config_->readEntry("ActiveUserdefinedPicture",""));
233
+	dialog_->userPicture1->setChecked(config_->readBoolEntry("ActiveUserdefined",false));
234
+	dialog_->inactiveFile->setURL(config_->readEntry("InactiveUserdefinedPicture",""));
235
+	dialog_->userPicture2->setChecked(config_->readBoolEntry("InactiveUserdefined",false));
236
+
237
+
238
+	dialog_->overlay_active->setCurrentItem(config_->readNumEntry("OverlayModeActive",0));
239
+	dialog_->overlay_active_file->setURL(config_->readEntry("OverlayFileActive",""));
240
+	overlay_active_changed(dialog_->overlay_active->currentItem());
241
+
242
+	dialog_->overlay_inactive->setCurrentItem(config_->readNumEntry("OverlayModeInactive",0));
243
+	dialog_->overlay_inactive_file->setURL(config_->readEntry("OverlayFileInactive",""));
244
+	overlay_inactive_changed(dialog_->overlay_inactive->currentItem());
245
+
246
+	dialog_->logoEnabled->setButton(config_->readNumEntry("LogoAlignment",1));
247
+	dialog_->logoFile->setURL(config_->readEntry("LogoFile",""));
248
+	dialog_->logoActive->setChecked(config_->readBoolEntry("LogoActive",1));
249
+	dialog_->logoStretch->setCurrentItem(config_->readNumEntry("LogoStretch",0));
250
+	dialog_->logoDistance->setValue(config_->readNumEntry("LogoDistance",0));
251
+	updateLogo();
252
+}
253
+
254
+void CrystalConfig::save(KConfig*)
255
+{
256
+	config_->setGroup("General");
257
+
258
+	QRadioButton *button = (QRadioButton*)dialog_->titlealign->selected();
259
+	if (button) config_->writeEntry("TitleAlignment", QString(button->name()));
260
+	config_->writeEntry("DrawCaption",dialog_->drawCaption->isChecked());
261
+	config_->writeEntry("TextShadow",dialog_->textshadow->isChecked());
262
+	config_->writeEntry("CaptionTooltip",dialog_->tooltip->isChecked());
263
+	config_->writeEntry("WheelTask",dialog_->wheelTask->isChecked());
264
+
265
+	config_->writeEntry("EnableTransparency",dialog_->enableTransparency->isChecked());
266
+	config_->writeEntry("TrackDesktop",dialog_->trackdesktop->isChecked());
267
+
268
+	config_->writeEntry("Borderwidth",dialog_->borderwidth->value());
269
+	config_->writeEntry("Titlebarheight",dialog_->titlebarheight->value());
270
+
271
+	config_->writeEntry("ActiveShade",dialog_->shade1->value());
272
+	config_->writeEntry("InactiveShade",dialog_->shade2->value());
273
+	config_->writeEntry("ActiveFrame",dialog_->frame1->currentItem());
274
+	config_->writeEntry("FrameColor1",dialog_->frameColor1->color());
275
+	config_->writeEntry("InactiveFrame",dialog_->frame2->currentItem());
276
+	config_->writeEntry("ActiveMode",dialog_->type1->currentItem());
277
+	config_->writeEntry("InactiveMode",dialog_->type2->currentItem());
278
+	config_->writeEntry("FrameColor2",dialog_->frameColor2->color());
279
+
280
+	config_->writeEntry("ActiveInline",dialog_->inline1->currentItem());
281
+	config_->writeEntry("InlineColor1",dialog_->inlineColor1->color());
282
+	config_->writeEntry("InactiveInline",dialog_->inline2->currentItem());
283
+	config_->writeEntry("InlineColor2",dialog_->inlineColor2->color());
284
+
285
+	config_->writeEntry("ButtonColor",dialog_->buttonColor1->color());
286
+	config_->writeEntry("ButtonColor2",dialog_->buttonColor2->color());
287
+	config_->writeEntry("ButtonColor3",dialog_->buttonColor3->color());
288
+	config_->writeEntry("MinColor",dialog_->minColor1->color());
289
+	config_->writeEntry("MinColor2",dialog_->minColor2->color());
290
+	config_->writeEntry("MinColor3",dialog_->minColor3->color());
291
+	config_->writeEntry("MaxColor",dialog_->maxColor1->color());
292
+	config_->writeEntry("MaxColor2",dialog_->maxColor2->color());
293
+	config_->writeEntry("MaxColor3",dialog_->maxColor3->color());
294
+	config_->writeEntry("CloseColor",dialog_->closeColor1->color());
295
+	config_->writeEntry("CloseColor2",dialog_->closeColor2->color());
296
+	config_->writeEntry("CloseColor3",dialog_->closeColor3->color());
297
+
298
+	int cornersFlag = 0;
299
+	if(dialog_->tlc->isChecked()) cornersFlag += TOP_LEFT;
300
+	if(dialog_->trc->isChecked()) cornersFlag += TOP_RIGHT;
301
+	if(dialog_->blc->isChecked()) cornersFlag += BOT_LEFT;
302
+	if(dialog_->brc->isChecked()) cornersFlag += BOT_RIGHT;
303
+	config_->writeEntry("RoundCorners", cornersFlag );
304
+	
305
+	config_->writeEntry("HoverEffect",dialog_->hover->isChecked());
306
+	config_->writeEntry("AnimateHover",dialog_->animateHover->isChecked());
307
+	config_->writeEntry("TintButtons",dialog_->tintButtons->isChecked());
308
+	config_->writeEntry("MenuImage",dialog_->menuimage->isChecked());
309
+	
310
+	config_->writeEntry("ButtonTheme",dialog_->buttonTheme->currentItem());
311
+	config_->writeEntry("RepaintMode",dialog_->repaintMode->selectedId());
312
+	config_->writeEntry("RepaintTime",dialog_->updateTime->value());
313
+
314
+	config_->writeEntry("ActiveBlur",dialog_->active_blur->value());
315
+	config_->writeEntry("InactiveBlur",dialog_->inactive_blur->value());
316
+
317
+	config_->writeEntry("ActiveUserdefined",dialog_->userPicture1->isChecked());
318
+	config_->writeEntry("ActiveUserdefinedPicture",dialog_->activeFile->url());
319
+	config_->writeEntry("InactiveUserdefined",dialog_->userPicture2->isChecked());
320
+	config_->writeEntry("InactiveUserdefinedPicture",dialog_->inactiveFile->url());
321
+
322
+	config_->writeEntry("OverlayModeActive",dialog_->overlay_active->currentItem());
323
+	config_->writeEntry("OverlayFileActive",dialog_->overlay_active_file->url());
324
+	config_->writeEntry("OverlayModeInactive",dialog_->overlay_inactive->currentItem());
325
+	config_->writeEntry("OverlayFileInactive",dialog_->overlay_inactive_file->url());
326
+
327
+	config_->writeEntry("LogoAlignment",dialog_->logoEnabled->selectedId());
328
+	config_->writeEntry("LogoFile",dialog_->logoFile->url());
329
+	config_->writeEntry("LogoActive",dialog_->logoActive->isChecked());
330
+	config_->writeEntry("LogoStretch",dialog_->logoStretch->currentItem());
331
+	config_->writeEntry("LogoDistance",dialog_->logoDistance->value());
332
+
333
+	config_->sync();
334
+}
335
+
336
+void CrystalConfig::infoDialog()
337
+{
338
+	InfoDialog d(dialog_);
339
+	connect((QLabel*)(d.kURLLabel1),SIGNAL(leftClickedURL(const QString&)),KApplication::kApplication(),SLOT(invokeBrowser(const QString &)));
340
+	d.exec();
341
+}
342
+
343
+void CrystalConfig::logoTextChanged(const QString&)
344
+{
345
+	updateLogo();
346
+	emit changed();
347
+}
348
+
349
+void CrystalConfig::overlay_active_changed(int a)
350
+{
351
+	dialog_->overlay_active_file->setEnabled(a==4);
352
+	emit changed();
353
+}
354
+
355
+void CrystalConfig::overlay_inactive_changed(int a)
356
+{
357
+	dialog_->overlay_inactive_file->setEnabled(a==4);
358
+	emit changed();
359
+}
360
+
361
+void CrystalConfig::updateLogo()
362
+{
363
+	QPixmap pic;
364
+	pic.load(dialog_->logoFile->url());
365
+	dialog_->logoPreview->setPixmap(pic);
366
+}
367
+
368
+void CrystalConfig::defaults()
369
+{
370
+	QRadioButton *button =
371
+		(QRadioButton*)dialog_->titlealign->child("AlignHCenter");
372
+	if (button) button->setChecked(true);
373
+	dialog_->shade1->setValue(50);
374
+	dialog_->shade2->setValue(50);
375
+}
376
+
377
+extern "C"
378
+{
379
+	QObject* allocate_config(KConfig* config, QWidget* parent) {
380
+		return (new CrystalConfig(config, parent));
381
+	}
382
+}
383
+
384
+#include "crystalconfig.moc"

+ 67
- 0
client/config/crystalconfig.h View File

@@ -0,0 +1,67 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2006 by Sascha Hlusiak                                  *
3
+ *   Spam84@gmx.de                                                         *
4
+ *                                                                         *
5
+ *   This program is free software; you can redistribute it and/or modify  *
6
+ *   it under the terms of the GNU General Public License as published by  *
7
+ *   the Free Software Foundation; either version 2 of the License, or     *
8
+ *   (at your option) any later version.                                   *
9
+ *                                                                         *
10
+ *   This program is distributed in the hope that it will be useful,       *
11
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
+ *   GNU General Public License for more details.                          *
14
+ *                                                                         *
15
+ *   You should have received a copy of the GNU General Public License     *
16
+ *   along with this program; if not, write to the                         *
17
+ *   Free Software Foundation, Inc.,                                       *
18
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
19
+ ***************************************************************************/
20
+
21
+
22
+#ifndef CRYSTALCONFIG_H
23
+#define CRYSTALCONFIG_H
24
+
25
+#include <qobject.h>
26
+
27
+#define TOP_LEFT 1
28
+#define TOP_RIGHT 2
29
+#define BOT_LEFT 4
30
+#define BOT_RIGHT 8
31
+
32
+class KConfig;
33
+class ConfigDialog;
34
+
35
+class CrystalConfig : public QObject
36
+{
37
+	Q_OBJECT
38
+public:
39
+	CrystalConfig(KConfig* config, QWidget* parent);
40
+	~CrystalConfig();
41
+    
42
+signals:
43
+	void changed();
44
+
45
+public slots:
46
+	void load(KConfig*);
47
+	void save(KConfig*);
48
+	void defaults();
49
+	void infoDialog();
50
+
51
+protected slots:
52
+	void selectionChanged(int);
53
+	void overlay_active_changed(int);
54
+	void overlay_inactive_changed(int);
55
+	void boolChanged(bool) { selectionChanged(0); }
56
+	void colorChanged(const QColor&) { selectionChanged(0); }
57
+	void textChanged(const QString&) { selectionChanged(0); }
58
+	void logoTextChanged(const QString&);
59
+
60
+private:
61
+	KConfig *config_;
62
+	ConfigDialog *dialog_;
63
+
64
+	void updateLogo();
65
+};
66
+
67
+#endif // CRYSTALCONFIG_H

+ 284
- 0
client/config/infodialog.ui
File diff suppressed because it is too large
View File


+ 5
- 0
client/crystal.desktop View File

@@ -0,0 +1,5 @@
1
+# KDE Desktop Entry
2
+[Desktop Entry]
3
+Encoding=UTF-8
4
+Name=Crystal
5
+X-KDE-Library=kwin3_crystal

+ 337
- 0
client/crystalbutton.cpp View File

@@ -0,0 +1,337 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2006 by Sascha Hlusiak                                  *
3
+ *   Spam84@gmx.de                                                         *
4
+ *                                                                         *
5
+ *   This program is free software; you can redistribute it and/or modify  *
6
+ *   it under the terms of the GNU General Public License as published by  *
7
+ *   the Free Software Foundation; either version 2 of the License, or     *
8
+ *   (at your option) any later version.                                   *
9
+ *                                                                         *
10
+ *   This program is distributed in the hope that it will be useful,       *
11
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
+ *   GNU General Public License for more details.                          *
14
+ *                                                                         *
15
+ *   You should have received a copy of the GNU General Public License     *
16
+ *   along with this program; if not, write to the                         *
17
+ *   Free Software Foundation, Inc.,                                       *
18
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
19
+ ***************************************************************************/
20
+
21
+
22
+#include <qimage.h>
23
+#include <qtooltip.h>
24
+#include <qpainter.h>
25
+
26
+#include "crystalclient.h"
27
+#include "crystalbutton.h"
28
+#include "buttonimage.h"
29
+#include "imageholder.h"
30
+
31
+
32
+CrystalButton::CrystalButton(CrystalClient *parent, const char *name,
33
+				const QString& tip, ButtonType type,
34
+				ButtonImage *vimage)
35
+: QButton(parent->widget(), name), client_(parent), type_(type), image(vimage), lastmouse_(0)
36
+{
37
+	setBackgroundMode(NoBackground);
38
+	resetSize(false);
39
+	setCursor(arrowCursor);
40
+	
41
+	hover=first=last=false;
42
+	animation=0.0;
43
+	QToolTip::add(this, tip);
44
+	connect ( &animation_timer,SIGNAL(timeout()),this,SLOT(animate()));
45
+}
46
+
47
+CrystalButton::~CrystalButton()
48
+{
49
+}
50
+
51
+void CrystalButton::resetSize(bool FullSize)
52
+{
53
+	if (FullSize || (image && image->drawMode==1))
54
+	{
55
+		setFixedSize(buttonSizeH(),factory->titlesize);
56
+	}else setFixedSize(buttonSizeH(),buttonSizeV());
57
+}
58
+
59
+void CrystalButton::setBitmap(ButtonImage *newimage)
60
+{
61
+	image=newimage;
62
+	repaint(false);
63
+}
64
+
65
+QSize CrystalButton::sizeHint() const
66
+{
67
+	return QSize(buttonSizeH(),buttonSizeV());
68
+}
69
+
70
+int CrystalButton::buttonSizeH() const
71
+{
72
+	int w=image?image->image_width:DEFAULT_IMAGE_SIZE;
73
+	int h=image?image->image_height:DEFAULT_IMAGE_SIZE;
74
+	int vS=image?image->vSpace:2;
75
+	int hS=image?image->hSpace:2;
76
+	return (factory->titlesize-1-vS>=h)?
77
+		w+hS*2:
78
+		(int)(((float)buttonSizeV()/(float)h)*(float)w)+hS;
79
+}
80
+
81
+int CrystalButton::buttonSizeV() const
82
+{
83
+	int h=image?image->image_height:DEFAULT_IMAGE_SIZE;
84
+	int vS=image?image->vSpace:2;
85
+	return (factory->titlesize-1-vS>h)?h:factory->titlesize-1-vS;
86
+}
87
+
88
+void CrystalButton::enterEvent(QEvent *e)
89
+{
90
+	hover=true;
91
+	if (factory->hovereffect)repaint(false);
92
+	if (factory->animateHover)animation_timer.start(60);
93
+	QButton::enterEvent(e);
94
+}
95
+
96
+void CrystalButton::leaveEvent(QEvent *e)
97
+{
98
+	hover=false;
99
+	if (factory->hovereffect)repaint(false);
100
+	if (factory->animateHover)animation_timer.start(80);
101
+	QButton::leaveEvent(e);
102
+}
103
+
104
+void CrystalButton::mousePressEvent(QMouseEvent* e)
105
+{
106
+	lastmouse_ = e->button();
107
+	int button;