Browse Source

Added KDE3 KDM themer application


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdmtheme@1088046 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
tpearson 9 years ago
commit
215dff2396
23 changed files with 13427 additions and 0 deletions
  1. 4
    0
      AUTHORS
  2. 340
    0
      COPYING
  3. 94
    0
      ChangeLog
  4. 167
    0
      INSTALL
  5. 22
    0
      Makefile.am
  6. 10
    0
      Makefile.cvs
  7. 0
    0
      NEWS
  8. 1
    0
      README
  9. 0
    0
      TODO
  10. 11638
    0
      acinclude.m4
  11. 244
    0
      config.h.in
  12. 2
    0
      configure.files
  13. 107
    0
      configure.in
  14. 5
    0
      configure.in.in
  15. 6
    0
      doc/Makefile.am
  16. 2
    0
      doc/en/Makefile.am
  17. 322
    0
      doc/en/index.docbook
  18. 1
    0
      po/Makefile.am
  19. 16
    0
      src/Makefile.am
  20. 344
    0
      src/kdmtheme.cpp
  21. 31
    0
      src/kdmtheme.desktop
  22. 71
    0
      src/kdmtheme.h
  23. 0
    0
      stamp-h.in

+ 4
- 0
AUTHORS View File

@@ -0,0 +1,4 @@
1
+Stephen Leaf <smileaf@smileaf.org>
2
+
3
+Laurent Montel <montel@kde.org>
4
+	Numerious fixes

+ 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.

+ 94
- 0
ChangeLog View File

@@ -0,0 +1,94 @@
1
+2005-03-22 (0.1): Initial Release
2
+
3
+2005-03-22 (0.2): Removed ugly kde conf directory hack with a *good* way of getting this!
4
+                  Listview now works
5
+                  removed lineedit
6
+                  theme previewing
7
+                  theme removing (no theme adding :S)
8
+
9
+2005-03-23 (0.3): Replaced 2 listview columns in favor of a qmap
10
+                  fixed 2 crashes
11
+                  added Copyright display
12
+
13
+2005-03-23 (0.4): Applied 7 patches from Laurent Montel to fix various problems of which include:
14
+                  memory leak
15
+                  change to superuser
16
+                  don't crash if "Themes" doesn't exist
17
+                  fix for kde 3.3.90
18
+                  disable actions if we are not root
19
+                  and a possible Makefile error.
20
+                  Thanks Laurent!!
21
+
22
+2005-03-23 (0.5): Theme adding now possible! (code borrowed from kcmicon)
23
+                  Known limitation currently is if you don't have a $KDEDIR/share/apps/kdm/themes/
24
+                  then the install will fail the first time but will be successful the 2nd time.
25
+
26
+2005-03-23 (0.6): Applied another patch from Laurent to fix a potential memory leak.
27
+                  Error dialog now shows what themes were not installed.
28
+                  Added #include <unistd.h> to fix report by nightdragon.
29
+                  Copyright information now updates when a new theme is selected.
30
+                  Theme dir is now created if it doesn't exist.
31
+                  Fixed a bug where a theme was not getting removed.
32
+                  Display Description
33
+                  If a theme's source directory no longer exists remove it from out list.
34
+
35
+2005-03-24 (0.7): Use KDM icon.
36
+                  Moved to System Administration section.
37
+                  Updated Documentation.
38
+                  Fixed layout issues.
39
+                  Applied 2 more patches from Laurent to fix missing i18n on Copyright and Description.
40
+
41
+2005-03-24 (0.8): Select previous or next depending on where you are in the list when you delete a theme.
42
+                  Use information list dialog box to report failed installation of themes.
43
+                  Prompt user if they really want to delete a theme.
44
+                  Ability to delete a theme from disk.
45
+
46
+2005-03-24 (0.8.1): Fixed bug where installing a theme did not save the theme to Themes.
47
+
48
+2005-03-24 (0.8.2): Fixed crash on save where if you had a your Theme set but it doesn't exist in your Themes.
49
+                    Fixed bug where you could install duplicates.
50
+                    If we have Theme set to a theme that isn't in our list, and we do have a list.
51
+                    Set the selected/default theme to the first entry in the list.
52
+
53
+2005-03-24 (0.9): If the default theme is removed set the default theme to the next/previous theme
54
+                  on the list depending on where you are in the list.
55
+                  Fixed UI issue where the kcm buttons (Ok, Cancel, Help, Default) were hidden at times. They still can be
56
+                  Hidden however only if you resize the window small enough.
57
+                  Updated UI tab order.
58
+                  Added Theme Inserting.
59
+                  Fixed Theme not found Error.
60
+
61
+2005-07-19 (0.9.1): Updated the UI (added a bar, autosized the listbox columns and top aligned the details)
62
+                    Fixed a bug where the Insert Url box and Button were not being disabled when loaded as non-root.
63
+                    Updated /admin to kde's in 3.4.1 (fixes the problem with --prefix not defaulting to kde's installed dir.)
64
+                    Attempt at fixing the "cannot find kdmrc file" error.
65
+
66
+2005-12-29 (0.9.2): Disable widgets when UseTheme is set to false.
67
+                    When loading make sure a thumbnail is displayed, if one exists.
68
+                    Code clean-up
69
+2006-01-30 (1.0): Fixed an issue where when loaded as a normal user buttons were still enabled, but not usable.
70
+                  Removed the Insert widgets in favor of a single install new theme.
71
+                  Because we removed the insert widgets the same functionality is now available in the Install New Theme dialog, Click on a directory and click Ok and it will insert that directory into your list.
72
+                  Fixed the lack of an access key for the Remove button (thanks to the one in #kde for pointing this out.)
73
+
74
+2006-01-30 (1.0.1): When inserting a theme configChanged() was not run.
75
+
76
+2006-02-23 (1.1): Applied a patch from Jonathan Patrick Davies to fix an i18n/l10n issue.
77
+                  Removed Themes Variable in the kdmrc (kdm devs didn't like it :) The problem with removing this however is you can now no longer "insert" themes, instead they all must be your $KDEDIR/share/kdm/themes dir. If you have always used kdmtheme to install themes and not insert them, you'll not need to worry. This will also mean that your list can now never be lost! (unless of course you lose your themes directory.) Also being that this list is now auto generated if you remove a theme be sure to check "remove from hard drive" if you don't want it to show up again on the next load.
78
+                  Updated address for the GPL license to match that found in KDE.
79
+
80
+2006-06-20 (1.1.1): Fixed 2 crashes 1 where no themes were found in your theme directory
81
+                    and one where while installing a new theme when you didn't have any themes would also generate a crash.
82
+
83
+2006-06-21 (1.1.2): Applied patch from Chitlesh to fix a few errors in the .desktop file
84
+                    Removed untranslated comment/name vars (if anyone cares to I'd love translations!)
85
+                    Added a spacer in next to the buttons in the UI.
86
+                    Updated Documentation (last update was version 0.7!)
87
+                    You can now select Directories
88
+                    Fixed removing of themes from the list to a less hack-ish way.
89
+                    Few i18n fixes
90
+2006-08-12 (1.1.3): Added Indonesian/Manaysian translation to the .desktop (thanks kucrut!)
91
+                    Finally applied a patch sent to me back when 1.1 was released, which fixes an issue when the kdmrc file could not be found. To the one who sent me this patch Sorry it took me so long, patch got lost in all my files and didn't apply cleanly due to the massive changes in 1.0.1 -> 1.1
92
+                    Added French, Italian and Japanese translations to the .desktop (thanks Lorenzo La Spada!)
93
+                    Fixed a typo which caused an error message to be printed when it shouldn't have.
94
+                    Updated documentation.

+ 167
- 0
INSTALL View File

@@ -0,0 +1,167 @@
1
+Basic Installation
2
+==================
3
+
4
+   These are generic installation instructions.
5
+
6
+   The `configure' shell script attempts to guess correct values for
7
+various system-dependent variables used during compilation.  It uses
8
+those values to create a `Makefile' in each directory of the package.
9
+It may also create one or more `.h' files containing system-dependent
10
+definitions.  Finally, it creates a shell script `config.status' that
11
+you can run in the future to recreate the current configuration, a file
12
+`config.cache' that saves the results of its tests to speed up
13
+reconfiguring, and a file `config.log' containing compiler output
14
+(useful mainly for debugging `configure').
15
+
16
+   If you need to do unusual things to compile the package, please try
17
+to figure out how `configure' could check whether to do them, and mail
18
+diffs or instructions to the address given in the `README' so they can
19
+be considered for the next release.  If at some point `config.cache'
20
+contains results you don't want to keep, you may remove or edit it.
21
+
22
+   The file `configure.in' is used to create `configure' by a program
23
+called `autoconf'.  You only need `configure.in' if you want to change
24
+it or regenerate `configure' using a newer version of `autoconf'.
25
+
26
+The simplest way to compile this package is:
27
+
28
+  1. `cd' to the directory containing the package's source code and type
29
+     `./configure' to configure the package for your system.  If you're
30
+     using `csh' on an old version of System V, you might need to type
31
+     `sh ./configure' instead to prevent `csh' from trying to execute
32
+     `configure' itself.
33
+
34
+     Running `configure' takes a while.  While running, it prints some
35
+     messages telling which features it is checking for.
36
+
37
+  2. Type `make' to compile the package.
38
+
39
+  3. Type `make install' to install the programs and any data files and
40
+     documentation.
41
+
42
+  4. You can remove the program binaries and object files from the
43
+     source code directory by typing `make clean'.  
44
+
45
+Compilers and Options
46
+=====================
47
+
48
+   Some systems require unusual options for compilation or linking that
49
+the `configure' script does not know about.  You can give `configure'
50
+initial values for variables by setting them in the environment.  Using
51
+a Bourne-compatible shell, you can do that on the command line like
52
+this:
53
+     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
54
+
55
+Or on systems that have the `env' program, you can do it like this:
56
+     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
57
+
58
+Compiling For Multiple Architectures
59
+====================================
60
+
61
+   You can compile the package for more than one kind of computer at the
62
+same time, by placing the object files for each architecture in their
63
+own directory.  To do this, you must use a version of `make' that
64
+supports the `VPATH' variable, such as GNU `make'.  `cd' to the
65
+directory where you want the object files and executables to go and run
66
+the `configure' script.  `configure' automatically checks for the
67
+source code in the directory that `configure' is in and in `..'.
68
+
69
+   If you have to use a `make' that does not supports the `VPATH'
70
+variable, you have to compile the package for one architecture at a time
71
+in the source code directory.  After you have installed the package for
72
+one architecture, use `make distclean' before reconfiguring for another
73
+architecture.
74
+
75
+Installation Names
76
+==================
77
+
78
+   By default, `make install' will install the package's files in
79
+`/usr/local/bin', `/usr/local/man', etc.  You can specify an
80
+installation prefix other than `/usr/local' by giving `configure' the
81
+option `--prefix=PATH'.
82
+
83
+   You can specify separate installation prefixes for
84
+architecture-specific files and architecture-independent files.  If you
85
+give `configure' the option `--exec-prefix=PATH', the package will use
86
+PATH as the prefix for installing programs and libraries.
87
+Documentation and other data files will still use the regular prefix.
88
+
89
+   If the package supports it, you can cause programs to be installed
90
+with an extra prefix or suffix on their names by giving `configure' the
91
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
92
+
93
+Optional Features
94
+=================
95
+
96
+   Some packages pay attention to `--enable-FEATURE' options to
97
+`configure', where FEATURE indicates an optional part of the package.
98
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
99
+is something like `gnu-as' or `x' (for the X Window System).  The
100
+`README' should mention any `--enable-' and `--with-' options that the
101
+package recognizes.
102
+
103
+   For packages that use the X Window System, `configure' can usually
104
+find the X include and library files automatically, but if it doesn't,
105
+you can use the `configure' options `--x-includes=DIR' and
106
+`--x-libraries=DIR' to specify their locations.
107
+
108
+Specifying the System Type
109
+==========================
110
+
111
+   There may be some features `configure' can not figure out
112
+automatically, but needs to determine by the type of host the package
113
+will run on.  Usually `configure' can figure that out, but if it prints
114
+a message saying it can not guess the host type, give it the
115
+`--host=TYPE' option.  TYPE can either be a short name for the system
116
+type, such as `sun4', or a canonical name with three fields:
117
+     CPU-COMPANY-SYSTEM
118
+
119
+See the file `config.sub' for the possible values of each field.  If
120
+`config.sub' isn't included in this package, then this package doesn't
121
+need to know the host type.
122
+
123
+   If you are building compiler tools for cross-compiling, you can also
124
+use the `--target=TYPE' option to select the type of system they will
125
+produce code for and the `--build=TYPE' option to select the type of
126
+system on which you are compiling the package.
127
+
128
+Sharing Defaults
129
+================
130
+
131
+   If you want to set default values for `configure' scripts to share,
132
+you can create a site shell script called `config.site' that gives
133
+default values for variables like `CC', `cache_file', and `prefix'.
134
+`configure' looks for `PREFIX/share/config.site' if it exists, then
135
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
136
+`CONFIG_SITE' environment variable to the location of the site script.
137
+A warning: not all `configure' scripts look for a site script.
138
+
139
+Operation Controls
140
+==================
141
+
142
+   `configure' recognizes the following options to control how it
143
+operates.
144
+
145
+`--cache-file=FILE'
146
+     Use and save the results of the tests in FILE instead of
147
+     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
148
+     debugging `configure'.
149
+
150
+`--help'
151
+     Print a summary of the options to `configure', and exit.
152
+
153
+`--quiet'
154
+`--silent'
155
+`-q'
156
+     Do not print messages saying which checks are being made.
157
+
158
+`--srcdir=DIR'
159
+     Look for the package's source code in directory DIR.  Usually
160
+     `configure' can determine that directory automatically.
161
+
162
+`--version'
163
+     Print the version of Autoconf used to generate the `configure'
164
+     script, and exit.
165
+
166
+`configure' also accepts some other, not widely useful, options.
167
+

+ 22
- 0
Makefile.am View File

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

+ 10
- 0
Makefile.cvs View File

@@ -0,0 +1,10 @@
1
+all: 
2
+	@echo "This Makefile is only for the CVS repository"
3
+	@echo "This will be deleted before making the distribution"
4
+	@echo ""
5
+	$(MAKE) -f admin/Makefile.common cvs
6
+
7
+dist:
8
+	$(MAKE) -f admin/Makefile.common dist
9
+
10
+.SILENT:

+ 0
- 0
NEWS View File


+ 1
- 0
README View File

@@ -0,0 +1 @@
1
+Currently this module is installed in KDE Components found in the K Control Center.

+ 0
- 0
TODO View File


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


+ 244
- 0
config.h.in View File

@@ -0,0 +1,244 @@
1
+/* config.h.in.  Generated from configure.in by autoheader.  */
2
+
3
+/* Define to 1 if you have the <Carbon/Carbon.h> header file. */
4
+#undef HAVE_CARBON_CARBON_H
5
+
6
+/* Define if you have the CoreAudio API */
7
+#undef HAVE_COREAUDIO
8
+
9
+/* Define to 1 if you have the <crt_externs.h> header file. */
10
+#undef HAVE_CRT_EXTERNS_H
11
+
12
+/* Defines if your system has the crypt function */
13
+#undef HAVE_CRYPT
14
+
15
+/* Define to 1 if you have the <dlfcn.h> header file. */
16
+#undef HAVE_DLFCN_H
17
+
18
+/* Define to 1 if you have the <inttypes.h> header file. */
19
+#undef HAVE_INTTYPES_H
20
+
21
+/* Define if you have libjpeg */
22
+#undef HAVE_LIBJPEG
23
+
24
+/* Define if you have libpng */
25
+#undef HAVE_LIBPNG
26
+
27
+/* Define if you have a working libpthread (will enable threaded code) */
28
+#undef HAVE_LIBPTHREAD
29
+
30
+/* Define if you have libz */
31
+#undef HAVE_LIBZ
32
+
33
+/* Define to 1 if you have the <memory.h> header file. */
34
+#undef HAVE_MEMORY_H
35
+
36
+/* Define if your system needs _NSGetEnviron to set up the environment */
37
+#undef HAVE_NSGETENVIRON
38
+
39
+/* Define if you have res_init */
40
+#undef HAVE_RES_INIT
41
+
42
+/* Define if you have the res_init prototype */
43
+#undef HAVE_RES_INIT_PROTO
44
+
45
+/* Define if you have a STL implementation by SGI */
46
+#undef HAVE_SGI_STL
47
+
48
+/* Define to 1 if you have the `snprintf' function. */
49
+#undef HAVE_SNPRINTF
50
+
51
+/* Define to 1 if you have the <stdint.h> header file. */
52
+#undef HAVE_STDINT_H
53
+
54
+/* Define to 1 if you have the <stdlib.h> header file. */
55
+#undef HAVE_STDLIB_H
56
+
57
+/* Define to 1 if you have the <strings.h> header file. */
58
+#undef HAVE_STRINGS_H
59
+
60
+/* Define to 1 if you have the <string.h> header file. */
61
+#undef HAVE_STRING_H
62
+
63
+/* Define if you have strlcat */
64
+#undef HAVE_STRLCAT
65
+
66
+/* Define if you have the strlcat prototype */
67
+#undef HAVE_STRLCAT_PROTO
68
+
69
+/* Define if you have strlcpy */
70
+#undef HAVE_STRLCPY
71
+
72
+/* Define if you have the strlcpy prototype */
73
+#undef HAVE_STRLCPY_PROTO
74
+
75
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
76
+#undef HAVE_SYS_BITYPES_H
77
+
78
+/* Define to 1 if you have the <sys/stat.h> header file. */
79
+#undef HAVE_SYS_STAT_H
80
+
81
+/* Define to 1 if you have the <sys/types.h> header file. */
82
+#undef HAVE_SYS_TYPES_H
83
+
84
+/* Define to 1 if you have the <unistd.h> header file. */
85
+#undef HAVE_UNISTD_H
86
+
87
+/* Define to 1 if you have the `vsnprintf' function. */
88
+#undef HAVE_VSNPRINTF
89
+
90
+/* Suffix for lib directories */
91
+#undef KDELIBSUFF
92
+
93
+/* Define a safe value for MAXPATHLEN */
94
+#undef KDEMAXPATHLEN
95
+
96
+/* Name of package */
97
+#undef PACKAGE
98
+
99
+/* Define to the address where bug reports for this package should be sent. */
100
+#undef PACKAGE_BUGREPORT
101
+
102
+/* Define to the full name of this package. */
103
+#undef PACKAGE_NAME
104
+
105
+/* Define to the full name and version of this package. */
106
+#undef PACKAGE_STRING
107
+
108
+/* Define to the one symbol short name of this package. */
109
+#undef PACKAGE_TARNAME
110
+
111
+/* Define to the version of this package. */
112
+#undef PACKAGE_VERSION
113
+
114
+/* The size of a `char *', as computed by sizeof. */
115
+#undef SIZEOF_CHAR_P
116
+
117
+/* The size of a `int', as computed by sizeof. */
118
+#undef SIZEOF_INT
119
+
120
+/* The size of a `long', as computed by sizeof. */
121
+#undef SIZEOF_LONG
122
+
123
+/* The size of a `short', as computed by sizeof. */
124
+#undef SIZEOF_SHORT
125
+
126
+/* The size of a `size_t', as computed by sizeof. */
127
+#undef SIZEOF_SIZE_T
128
+
129
+/* The size of a `unsigned long', as computed by sizeof. */
130
+#undef SIZEOF_UNSIGNED_LONG
131
+
132
+/* Define to 1 if you have the ANSI C header files. */
133
+#undef STDC_HEADERS
134
+
135
+/* Version number of package */
136
+#undef VERSION
137
+
138
+/* Defined if compiling without arts */
139
+#undef WITHOUT_ARTS
140
+
141
+/* Define to 1 if your processor stores words with the most significant byte
142
+   first (like Motorola and SPARC, unlike Intel and VAX). */
143
+#undef WORDS_BIGENDIAN
144
+
145
+/*
146
+ * jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
147
+ * headers and I'm too lazy to write a configure test as long as only
148
+ * unixware is related
149
+ */
150
+#ifdef _UNIXWARE
151
+#define HAVE_BOOLEAN
152
+#endif
153
+
154
+
155
+
156
+/*
157
+ * AIX defines FD_SET in terms of bzero, but fails to include <strings.h>
158
+ * that defines bzero.
159
+ */
160
+
161
+#if defined(_AIX)
162
+#include <strings.h>
163
+#endif
164
+
165
+
166
+
167
+#if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
168
+# include <sys/time.h>
169
+# include <crt_externs.h>
170
+# define environ (*_NSGetEnviron())
171
+#endif
172
+
173
+
174
+
175
+#if !defined(HAVE_RES_INIT_PROTO)
176
+#ifdef __cplusplus
177
+extern "C" {
178
+#endif
179
+int res_init(void);
180
+#ifdef __cplusplus
181
+}
182
+#endif
183
+#endif
184
+
185
+
186
+
187
+#if !defined(HAVE_STRLCAT_PROTO)
188
+#ifdef __cplusplus
189
+extern "C" {
190
+#endif
191
+unsigned long strlcat(char*, const char*, unsigned long);
192
+#ifdef __cplusplus
193
+}
194
+#endif
195
+#endif
196
+
197
+
198
+
199
+#if !defined(HAVE_STRLCPY_PROTO)
200
+#ifdef __cplusplus
201
+extern "C" {
202
+#endif
203
+unsigned long strlcpy(char*, const char*, unsigned long);
204
+#ifdef __cplusplus
205
+}
206
+#endif
207
+#endif
208
+
209
+
210
+
211
+/*
212
+ * On HP-UX, the declaration of vsnprintf() is needed every time !
213
+ */
214
+
215
+#if !defined(HAVE_VSNPRINTF) || defined(hpux)
216
+#if __STDC__
217
+#include <stdarg.h>
218
+#include <stdlib.h>
219
+#else
220
+#include <varargs.h>
221
+#endif
222
+#ifdef __cplusplus
223
+extern "C"
224
+#endif
225
+int vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
226
+#ifdef __cplusplus
227
+extern "C"
228
+#endif
229
+int snprintf(char *str, size_t n, char const *fmt, ...);
230
+#endif
231
+
232
+
233
+
234
+#if defined(__SVR4) && !defined(__svr4__)
235
+#define __svr4__ 1
236
+#endif
237
+
238
+
239
+/* type to use in place of socklen_t if not defined */
240
+#undef kde_socklen_t
241
+
242
+/* type to use in place of socklen_t if not defined (deprecated, use
243
+   kde_socklen_t) */
244
+#undef ksize_t

+ 2
- 0
configure.files View File

@@ -0,0 +1,2 @@
1
+./admin/configure.in.min
2
+configure.in.in

+ 107
- 0
configure.in View File

@@ -0,0 +1,107 @@
1
+dnl =======================================================
2
+dnl FILE: ./admin/configure.in.min
3
+dnl =======================================================
4
+
5
+dnl    This file is part of the KDE libraries/packages
6
+dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
7
+ 
8
+dnl    This file is free software; you can redistribute it and/or
9
+dnl    modify it under the terms of the GNU Library General Public
10
+dnl    License as published by the Free Software Foundation; either
11
+dnl    version 2 of the License, or (at your option) any later version.
12
+ 
13
+dnl    This library is distributed in the hope that it will be useful,
14
+dnl    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+dnl    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16
+dnl    Library General Public License for more details.
17
+ 
18
+dnl    You should have received a copy of the GNU Library General Public License
19
+dnl    along with this library; see the file COPYING.LIB.  If not, write to
20
+dnl    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
+dnl    Boston, MA 02110-1301, USA.
22
+
23
+# Original Author was Kalle@kde.org
24
+# I lifted it in some mater. (Stephan Kulow)
25
+# I used much code from Janos Farkas
26
+
27
+dnl Process this file with autoconf to produce a configure script.
28
+
29
+AC_INIT(acinclude.m4) dnl a source file from your sub dir
30
+
31
+dnl This is so we can use kde-common
32
+AC_CONFIG_AUX_DIR(admin)
33
+
34
+dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
35
+unset CDPATH
36
+
37
+dnl Checking host/target/build systems, for make, install etc.
38
+AC_CANONICAL_SYSTEM 
39
+dnl Perform program name transformation
40
+AC_ARG_PROGRAM
41
+
42
+dnl Automake doc recommends to do this only here. (Janos)
43
+AM_INIT_AUTOMAKE(kdmtheme, 0.1) dnl searches for some needed programs
44
+
45
+KDE_SET_PREFIX
46
+
47
+dnl generate the config header
48
+AM_CONFIG_HEADER(config.h) dnl at the distribution this done
49
+
50
+dnl Checks for programs.
51
+AC_CHECK_COMPILERS
52
+AC_ENABLE_SHARED(yes)
53
+AC_ENABLE_STATIC(no)
54
+KDE_PROG_LIBTOOL
55
+
56
+dnl for NLS support. Call them in this order!
57
+dnl WITH_NLS is for the po files
58
+AM_KDE_WITH_NLS
59
+
60
+KDE_USE_QT(3.0.0)
61
+AC_PATH_KDE
62
+dnl =======================================================
63
+dnl FILE: configure.in.in
64
+dnl =======================================================
65
+
66
+#MIN_CONFIG(3.0.0)
67
+
68
+dnl PACKAGE set before
69
+AC_C_BIGENDIAN
70
+AC_CHECK_KDEMAXPATHLEN
71
+KDE_CREATE_SUBDIRSLIST
72
+AC_CONFIG_FILES([ Makefile ])
73
+AC_CONFIG_FILES([ doc/Makefile ])
74
+AC_CONFIG_FILES([ doc/en/Makefile ])
75
+AC_CONFIG_FILES([ po/Makefile ])
76
+AC_CONFIG_FILES([ src/Makefile ])
77
+AC_OUTPUT
78
+# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
79
+if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
80
+  # And if so, warn when they don't match
81
+  if test "$kde_libs_prefix" != "$given_prefix"; then
82
+    # And if kde doesn't know about the prefix yet
83
+    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
84
+    if test $? -ne 0; then
85
+      echo ""
86
+      echo "Warning: you chose to install this package in $given_prefix,"
87
+      echo "but KDE was found in $kde_libs_prefix."
88
+      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
89
+      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
90
+      echo "Then restart KDE."
91
+      echo ""
92
+    fi
93
+  fi
94
+fi
95
+
96
+if test "$all_tests" = "bad"; then
97
+  if test ! "$cache_file" = "/dev/null"; then
98
+    echo ""
99
+    echo "Please remove the file $cache_file after changing your setup"
100
+    echo "so that configure will find the changes next time."
101
+    echo ""
102
+  fi
103
+else
104
+  echo ""
105
+  echo "Good - your configure finished. Start make now"
106
+  echo ""
107
+fi

+ 5
- 0
configure.in.in View File

@@ -0,0 +1,5 @@
1
+#MIN_CONFIG(3.0.0)
2
+
3
+AM_INIT_AUTOMAKE(kdmtheme, 0.1)
4
+AC_C_BIGENDIAN
5
+AC_CHECK_KDEMAXPATHLEN

+ 6
- 0
doc/Makefile.am View File

@@ -0,0 +1,6 @@
1
+# the SUBDIRS is filled automatically by am_edit. If files are 
2
+# in this directory they are installed into the english dir
3
+
4
+KDE_LANG = en
5
+KDE_DOCS = kdmtheme
6
+SUBDIRS = $(AUTODIRS)  

+ 2
- 0
doc/en/Makefile.am View File

@@ -0,0 +1,2 @@
1
+KDE_DOCS = kdmtheme
2
+KDE_LANG = en

+ 322
- 0
doc/en/index.docbook View File

@@ -0,0 +1,322 @@
1
+<?xml version="1.0" ?>
2
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
3
+  <!ENTITY kdmtheme "<application>kdmtheme 1.1.3</application>">
4
+  <!ENTITY kappname "&kdmtheme;"><!-- Do *not* replace kappname-->
5
+  <!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc -->
6
+  <!ENTITY % addindex "IGNORE">
7
+  <!ENTITY % English "INCLUDE"><!-- change language only here -->
8
+
9
+
10
+  <!-- Do not define any other entities; instead, use the entities
11
+       from kde-genent.entities and $LANG/user.entities. -->
12
+]>
13
+<!-- kdoctemplate v0.8 October 1 1999
14
+     Minor update to "Credits and Licenses" section on August 24, 2000
15
+     Removed "Revision history" section on 22 January 2001
16
+     Changed to Installation/Help menu entities 18 October 2001
17
+     Other minor cleanup and changes 18 October 2001 -->
18
+
19
+
20
+<!--
21
+This template was designed by: David Rugge davidrugge@mindspring.com
22
+with lots of help from: Eric Bischoff ebisch@cybercable.tm.fr
23
+and Frederik Fouvry fouvry@sfs.nphil.uni-tuebingen.de
24
+of the KDE DocBook team.
25
+
26
+You may freely use this template for writing any sort of KDE documentation.
27
+If you have any changes or improvements, please let us know.
28
+
29
+Remember:
30
+- in XML, the case of the <tags> and attributes is relevant ;
31
+- also, quote all attributes.
32
+
33
+Please don't forget to remove all these comments in your final documentation,
34
+thanks ;-).
35
+-->
36
+
37
+<!-- ................................................................ -->
38
+
39
+<!-- The language must NOT be changed here. -->
40
+
41
+<book lang="&language;">
42
+
43
+<!-- This header contains all of the meta-information for the document such
44
+as Authors, publish date, the abstract, and Keywords -->
45
+
46
+<bookinfo>
47
+<title>The &kdmtheme; Handbook</title>
48
+
49
+<authorgroup>
50
+<author>
51
+<firstname></firstname>
52
+<othername></othername>
53
+<surname>Stephen Leaf</surname>
54
+<affiliation>
55
+<address><email>smileaf@smileaf.org</email></address>
56
+</affiliation>
57
+</author>
58
+</authorgroup>
59
+
60
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
61
+
62
+<copyright>
63
+<year>2005</year>
64
+<year>%{YEAR}</year>
65
+<holder>Stephen Leaf</holder>
66
+</copyright>
67
+<!-- Translators: put here the copyright notice of the translation -->
68
+<!-- Put here the FDL notice.  Read the explanation in fdl-notice.docbook
69
+     and in the FDL itself on how to use it. -->
70
+<legalnotice>&FDLNotice;</legalnotice>
71
+
72
+<!-- Date and version information of the documentation
73
+Don't forget to include this last date and this last revision number, we
74
+need them for translation coordination !
75
+Please respect the format of the date (YYYY-MM-DD) and of the version
76
+(V.MM.LL), it could be used by automation scripts.
77
+Do NOT change these in the translation. -->
78
+
79
+<date>2006-08-12</date>
80
+<releaseinfo>1.1.3</releaseinfo>
81
+
82
+<!-- Abstract about this handbook -->
83
+
84
+<abstract>
85
+<para>
86
+&kdmtheme; is  K Control Center Module designed to easily configure your KDM themes.
87
+</para>
88
+</abstract>
89
+
90
+<!-- This is a set of Keywords for indexing by search engines.
91
+Please at least include KDE, the KDE package it is in, the name
92
+ of your application, and a few relevant keywords. -->
93
+
94
+<keywordset>
95
+<keyword>KDE</keyword>
96
+<keyword>kdmtheme</keyword>
97
+<keyword>KDM</keyword>
98
+<keyword>KDM Theme Manager</keyword>
99
+</keywordset>
100
+
101
+</bookinfo>
102
+
103
+<!-- The contents of the documentation begin here.  Label
104
+each chapter so with the id attribute. This is necessary for two reasons: it
105
+allows you to easily reference the chapter from other chapters of your
106
+document, and if there is no ID, the name of the generated HTML files will vary
107
+from time to time making it hard to manage for maintainers and for the CVS
108
+system. Any chapter labelled (OPTIONAL) may be left out at the author's
109
+discretion. Other chapters should not be left out in order to maintain a
110
+consistent documentation style across all KDE apps. -->
111
+
112
+<chapter id="introduction">
113
+<title>Introduction</title>
114
+
115
+<!-- The introduction chapter contains a brief introduction for the
116
+application that explains what it does and where to report
117
+problems. Basically a long version of the abstract.  Don't include a
118
+revision history. (see installation appendix comment) -->
119
+
120
+<para>
121
+&kdmtheme; is a K Control Module designed to easily configure your KDM themes. Please report problems either on <ulink url="http://kde-look.org/content/show.php?content=22120">kde-look/kde-apps</ulink> or email <email>smileaf@smileaf.org</email>
122
+</para>
123
+</chapter>
124
+
125
+<chapter id="using-kdmtheme">
126
+<title>Using &kdmtheme;</title>
127
+
128
+<!-- This chapter should tell the user how to use your app. You should use as
129
+many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
130
+your application. -->
131
+
132
+<para>
133
+
134
+<!-- Note that all graphics should be in .png format. Use no gifs because of
135
+patent issues. -->
136
+
137
+<screenshot>
138
+<screeninfo>Here's a screenshot of &kdmtheme;</screeninfo>
139
+	<mediaobject>
140
+	  <imageobject>
141
+	    <imagedata fileref="kdmtheme.png" format="PNG"/>
142
+	  </imageobject>
143
+	  <textobject>
144
+	    <phrase>Screenshot</phrase>
145
+	  </textobject>
146
+	</mediaobject>
147
+</screenshot>
148
+</para>
149
+
150
+</chapter>
151
+
152
+<chapter id="faq">
153
+<title>Questions and Answers</title>
154
+
155
+<!-- (OPTIONAL but recommended) This chapter should include all of the silly
156
+(and not-so-silly) newbie questions that fill up your mailbox. This chapter
157
+should be reserved for BRIEF questions and answers! If one question uses more
158
+than a page or so then it should probably be part of the
159
+"Using this Application" chapter instead. You should use links to
160
+cross-reference questions to the parts of your documentation that answer them.
161
+This is also a great place to provide pointers to other FAQ's if your users
162
+must do some complicated configuration on other programs in order for your
163
+application work. -->
164
+
165
+&reporting.bugs;
166
+&updating.documentation;
167
+
168
+<qandaset id="faqlist">
169
+	<qandaentry>
170
+		<question>
171
+			<para>How do I create themes?</para>
172
+		</question>
173
+		<answer>
174
+			<para>I don't know but if you find a FAQ or tutorial please email me. I get this question ALOT.</para>
175
+		</answer>
176
+	</qandaentry>
177
+	<qandaentry>
178
+		<question>
179
+			<para>How do I install themes?</para>
180
+		</question>
181
+		<answer>
182
+			<para>Simply click the "install new theme" button on the bottom then use the browse button to find your theme archive, or type in the path to theme archive. URLs are accepted also. Alternatively you may supply a directory name of an un-archived theme, in this case the theme is temporarily inserted into the list.</para>
183
+		</answer>
184
+	</qandaentry>
185
+	<qandaentry>
186
+		<question>
187
+			<para>My buttons are disabled!</para>
188
+		</question>
189
+		<answer>
190
+			<para>Is the "Enable KDM Themes" check box checked?</para>
191
+		</answer>
192
+	</qandaentry>
193
+	<qandaentry>
194
+		<question>
195
+			<para>I don't see any themes what's wrong?!</para>
196
+		</question>
197
+		<answer>
198
+			<para>First make sure you didn't 'insert' any themes those are not saved only themes that appear in your theme directory are used. Next check your theme directory it should be located in your $KDEDIR/share/apps/kdm/themes/</para>
199
+		</answer>
200
+	</qandaentry>
201
+</qandaset>
202
+</chapter>
203
+
204
+<chapter id="credits">
205
+
206
+<!-- Include credits for the programmers, documentation writers, and
207
+contributors here. The license for your software should then be included below
208
+the credits with a reference to the appropriate license file included in the KDE
209
+distribution. -->
210
+
211
+<title>Credits and License</title>
212
+
213
+<para>
214
+&kdmtheme;
215
+</para>
216
+<para>
217
+Program copyright %{YEAR} Stephen Leaf <email>smileaf@smileaf.org</email>
218
+</para>
219
+<para>
220
+Contributors:
221
+<itemizedlist>
222
+	<listitem>
223
+		<para>Laurent Montel <email>montel@kde.org</email></para>
224
+	</listitem>
225
+	<listitem>
226
+		<para>Jonathan Patrick Davies <email>jpatrick@ubuntu.com</email></para>
227
+	</listitem>
228
+	<listitem>
229
+		<para>Chitlesh</para>
230
+	</listitem>
231
+	<listitem>
232
+		<para>kucrut</para>
233
+	</listitem>
234
+	<listitem>
235
+		<para>Lorenzo La Spada <email>l.laspada@yahoo.fr</email></para>
236
+	</listitem>
237
+</itemizedlist>
238
+</para>
239
+
240
+<para>
241
+Documentation copyright %{YEAR} Stephen Leaf <email>smileaf@smileaf.org</email>
242
+</para>
243
+
244
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
245
+
246
+&underFDL;               <!-- FDL: do not remove -->
247
+
248
+<!-- Determine which license your application is licensed under,
249
+     and delete all the remaining licenses below:
250
+
251
+     (NOTE:  All documentation are licensed under the FDL,
252
+     regardless of what license the application uses) -->
253
+
254
+&underGPL;        	 <!-- GPL License -->
255
+
256
+</chapter>
257
+
258
+<appendix id="installation">
259
+<title>Installation</title>
260
+
261
+<sect1 id="getting-kdmtheme">
262
+<title>How to obtain &kdmtheme;</title>
263
+
264
+<para>
265
+&kdmtheme; is in most major distributions. Should yours not have a package please visit: <ulink url="http://kde-look.org/content/show.php?content=22120">The project page</ulink>
266
+</para>
267
+</sect1>
268
+
269
+<sect1 id="requirements">
270
+<title>Requirements</title>
271
+
272
+<!--
273
+List any special requirements for your application here. This should include:
274
+.Libraries or other software that is not included in kdesupport,
275
+kdelibs, or kdebase.
276
+.Hardware requirements like amount of RAM, disk space, graphics card
277
+capabilities, screen resolution, special expansion cards, etc.
278
+.Operating systems the app will run on. If your app is designed only for a
279
+specific OS, (you wrote a graphical LILO configurator for example) put this
280
+information here.
281
+-->
282
+
283
+<para>
284
+In order to successfully use &kdmtheme;, you need &kde; >=3.4
285
+</para>
286
+
287
+
288
+<!-- For a list of updates, you may refer to the application web site
289
+or the ChangeLog file, or ... -->
290
+<para>
291
+You can find a list of changes at <ulink url="http://www.kde-apps.org/content/show.php?content=22120">The &kdmtheme; project page</ulink>.
292
+</para>
293
+</sect1>
294
+
295
+<sect1 id="compilation">
296
+<title>Compilation and Installation</title>
297
+
298
+<!-- This entity contains the boilerplate text for standard -->
299
+<!-- compilation instructions.  If your application requires any -->
300
+<!-- special handling, remove it, and replace with your own text. -->
301
+
302
+&install.compile.documentation;
303
+
304
+</sect1>
305
+
306
+</appendix>
307
+
308
+&documentation.index;
309
+</book>
310
+
311
+<!--
312
+Local Variables:
313
+mode: sgml
314
+sgml-minimize-attributes:nil
315
+sgml-general-insert-case:lower
316
+sgml-indent-step:0
317
+sgml-indent-data:nil
318
+End:
319
+
320
+vim:tabstop=2:shiftwidth=2:expandtab
321
+-->
322
+

+ 1
- 0
po/Makefile.am View File

@@ -0,0 +1 @@
1
+POFILES = AUTO

+ 16
- 0
src/Makefile.am View File

@@ -0,0 +1,16 @@
1
+INCLUDES    = $(all_includes)
2
+METASOURCES = AUTO
3
+
4
+# Install this plugin in the KDE modules directory
5
+kde_module_LTLIBRARIES = kcm_kdmtheme.la
6
+
7
+kcm_kdmtheme_la_SOURCES = kdmtheme.cpp
8
+kcm_kdmtheme_la_LIBADD = -lkio -lknewstuff $(LIB_KDEUI)
9
+kcm_kdmtheme_la_LDFLAGS = -avoid-version -module -no-undefined $(all_libraries)
10
+
11
+
12
+xdg_apps_DATA = kdmtheme.desktop
13
+
14
+
15
+messages: rc.cpp
16
+	$(XGETTEXT) *.cpp -o $(podir)/kcmkdmtheme.pot

+ 344
- 0
src/kdmtheme.cpp View File

@@ -0,0 +1,344 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2005-2007 by Stephen Leaf <smileaf@gmail.com>           *
3
+ *   Copyright (C) 2006 by Oswald Buddenhagen <ossi@kde.org>               *
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 "kdmtheme.h"
22
+
23
+#include <kdialog.h>
24
+#include <kglobal.h>
25
+#include <kio/job.h>
26
+#include <kio/netaccess.h>
27
+#include <klocale.h>
28
+#include <kmessagebox.h>
29
+#include <kprogress.h>
30
+#include <kstandarddirs.h>
31
+#include <ktar.h>
32
+#include <kurlrequester.h>
33
+#include <kurlrequesterdlg.h>
34
+#include <kparts/genericfactory.h>
35
+
36
+#include <qcheckbox.h>
37
+#include <qdir.h>
38
+#include <qlayout.h>
39
+#include <qlabel.h>
40
+#include <qptrlist.h>
41
+#include <qpixmap.h>
42
+#include <qpushbutton.h>
43
+#include <qlistview.h>
44
+#include <qwhatsthis.h>
45
+#include <qwidget.h>
46
+
47
+#include <unistd.h>
48
+
49
+class ThemeData : public QListViewItem {
50
+  public:
51
+	ThemeData( QListView *parent = 0 ) : QListViewItem( parent ) {}
52
+
53
+	QString name;
54
+	QString path;
55
+	QString screenShot;
56
+	QString copyright;
57
+	QString description;
58
+};
59
+
60
+typedef KGenericFactory<KDMThemeWidget, QWidget> kdmthemeFactory;
61
+K_EXPORT_COMPONENT_FACTORY( kcm_kdmtheme, kdmthemeFactory("kcmkdmtheme"))
62
+
63
+KDMThemeWidget::KDMThemeWidget( QWidget *parent, const char *name, const QStringList& )
64
+	: KCModule(parent, name), config( 0L )
65
+{
66
+	QGridLayout *ml = new QGridLayout( this );
67
+	ml->setSpacing( KDialog::spacingHint() );
68
+	ml->setMargin( KDialog::marginHint() );
69
+
70
+	cUseTheme = new QCheckBox( this );
71
+	cUseTheme->setText( i18n( "En&able KDM Themes" ) );
72
+	ml->addMultiCellWidget( cUseTheme, 0, 0, 0, 2 );
73
+
74
+	themeWidget = new QListView( this );
75
+    themeWidget->addColumn( i18n( "Theme" ) );
76
+    themeWidget->addColumn( i18n( "Author" ) );
77
+	themeWidget->setAllColumnsShowFocus( true );
78
+	themeWidget->setShowSortIndicator( true );
79
+	themeWidget->setRootIsDecorated( false );
80
+	QWhatsThis::add( themeWidget, i18n("This is a list of installed themes.\n"
81
+	                                "Click the one to be used.") );
82
+
83
+	ml->addMultiCellWidget( themeWidget, 1, 3, 0, 1 );
84
+
85
+	preview = new QLabel( this );
86
+	preview->setFixedSize( QSize( 200, 150 ) );
87
+	preview->setScaledContents( true );
88
+	QWhatsThis::add(preview, i18n("This is a screen shot of what KDM will look like.") );
89
+
90
+	ml->addWidget( preview, 1, 2 );
91
+
92
+	info = new QLabel( this );
93
+	info->setMaximumWidth( 200 );
94
+	info->setAlignment( int( QLabel::AlignTop | QLabel::WordBreak) );
95
+	QWhatsThis::add(info, i18n("This contains information about the selected theme.") );
96
+
97
+	ml->addMultiCellWidget( info, 3, 4, 2, 2 );
98
+
99
+	bInstallTheme = new QPushButton( i18n("Install &new theme"), this );
100
+	QWhatsThis::add(bInstallTheme, i18n("This will install a theme into the theme directory.") );
101
+
102
+	ml->addWidget( bInstallTheme, 4, 0 );
103
+
104
+	bRemoveTheme = new QPushButton( i18n("&Remove theme"), this );
105
+	QWhatsThis::add(bRemoveTheme, i18n("This will remove the selected theme.") );
106
+
107
+	ml->addWidget( bRemoveTheme, 4, 1 );
108
+
109
+	connect( themeWidget, SIGNAL(selectionChanged()), SLOT(themeSelected()) );
110
+	connect( bInstallTheme, SIGNAL(clicked()), SLOT(installNewTheme()) );
111
+	connect( bRemoveTheme, SIGNAL(clicked()), SLOT(removeSelectedThemes()) );
112
+	connect( cUseTheme, SIGNAL( toggled( bool ) ), SLOT( toggleUseTheme( bool ) ) );
113
+
114
+	QStringList themeDirs = KGlobal::dirs()->findDirs("data","kdm/");
115
+	themeDir = KGlobal::dirs()->findDirs("data","kdm/").last();
116
+	QDir d;
117
+	for ( QStringList::Iterator dirs = themeDirs.begin(); dirs != themeDirs.end(); ++dirs ) {
118
+		kdDebug() << "Loading themes... ( " + *dirs + "themes/" + " )" << endl;
119
+		d.setPath( *dirs + "themes/" );
120
+		d.setFilter( QDir::Dirs );
121
+		QStringList list = d.entryList();
122
+		for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
123
+			if (*it == "." || *it == "..") continue;
124
+			insertTheme( *dirs + "themes/" + *it );
125
+		}
126
+	}
127
+
128
+	load();
129
+
130
+	if (getuid() != 0) {
131
+		cUseTheme->setEnabled( false );
132
+		setReadOnly(false);
133
+	}
134
+}
135
+
136
+void KDMThemeWidget::selectTheme( const QString &path )
137
+{
138
+	for ( QListViewItemIterator tdi( themeWidget ); tdi.current(); tdi++ ) {
139
+		ThemeData * td = ((ThemeData *)*tdi);
140
+		if (td->path == path) {
141
+			themeWidget->clearSelection();
142
+			themeWidget->setSelected(td, true );
143
+			updateInfoView( td );
144
+		}
145
+	}
146
+}
147
+
148
+void KDMThemeWidget::load()
149
+{
150
+	QString kdmrc = KGlobal::dirs()->findResource("config", "kdm/kdmrc");
151
+	if ( kdmrc.isEmpty() ) {
152
+		kdError() << "Failed to find kdm resource file kdmrc!" << endl;
153
+
154
+		KMessageBox msgBox;
155
+		msgBox.sorry(0, i18n("I can't find the configuration file for the Login Manager, kdm. Check you have set up the Login Manager from the Control Center, and that you have permision to read and write the Login Manager's configuration file.\n\n You must set-up the Login Manager before you can use its themes."), i18n("Can't find Configuration File"));
156
+
157
+		delete config;
158
+		config = NULL;
159
+	} else {
160
+		kdDebug() << "Loading... ( " + kdmrc + " )" << endl;
161
+
162
+		delete config;
163
+		config = new KConfig( kdmrc );
164
+		config->setGroup( "X-*-Greeter" );
165
+		cUseTheme->setChecked( config->readBoolEntry( "UseTheme", false ) );
166
+
167
+		selectTheme( config->readEntry( "Theme", themeDir + "circles" ) );
168
+	}
169
+}
170
+
171
+void KDMThemeWidget::save()
172
+{
173
+	kdDebug() << "Saving: Theme " << defaultTheme->path << " - UseTheme " << cUseTheme->isChecked() << endl;
174
+	config->writeEntry( "Theme", defaultTheme->path );
175
+	config->writeEntry( "UseTheme", cUseTheme->isChecked() );
176
+	config->sync();
177
+}
178
+
179
+void KDMThemeWidget::defaults()
180
+{
181
+	selectTheme( themeDir + "circles" );
182
+
183
+	emit changed(true);
184
+}
185
+
186
+void KDMThemeWidget::toggleUseTheme(bool useTheme) {
187
+	setReadOnly( useTheme );
188
+	emit changed(true);
189
+}
190
+
191
+void KDMThemeWidget::setReadOnly(bool ro)
192
+{
193
+	themeWidget->setEnabled( ro );
194
+	bInstallTheme->setEnabled( ro );
195
+	bRemoveTheme->setEnabled( ro );
196
+}
197
+
198
+void KDMThemeWidget::insertTheme( const QString &_theme )
199
+{
200
+	KConfig * themeConfig;
201
+	QString name;
202
+
203
+	kdDebug() << "Looking for " << _theme << "/KdmGreeterTheme.desktop" << endl;
204
+	themeConfig = new KConfig( _theme + "/KdmGreeterTheme.desktop");
205
+	themeConfig->setGroup( "GdmGreeterTheme" );
206
+	name = themeConfig->readEntry( "Name" );
207
+	if (name.isEmpty()) {
208
+		kdDebug() << "Looking for " << _theme << "/GdmGreeterTheme.desktop" << endl;
209
+		themeConfig = new KConfig( _theme + "/GdmGreeterTheme.desktop");
210
+		themeConfig->setGroup( "GdmGreeterTheme" );
211
+
212
+		name = themeConfig->readEntry( "Name" );
213
+		if (name.isEmpty())
214
+			return;
215
+	}
216
+
217
+	for ( QListViewItemIterator tdi( themeWidget ); tdi.current(); tdi++ ) {
218
+		ThemeData * td = ((ThemeData *)*tdi);
219
+		if (td->name == name)
220
+			return;
221
+	}
222
+	kdDebug() << "Adding theme " << name << endl;
223
+
224
+	ThemeData *child = new ThemeData( themeWidget );
225
+	child->setText( 0, name );
226
+	child->setText( 1, themeConfig->readEntry( "Author" ) );
227
+	child->name = name;
228
+	child->path = _theme;
229
+	child->screenShot = themeConfig->readEntry( "Screenshot" );
230
+	child->copyright = themeConfig->readEntry( "Copyright" );
231
+	child->description = themeConfig->readEntry( "Description" );
232
+}
233
+
234
+void KDMThemeWidget::updateInfoView( ThemeData *theme )
235
+{
236
+	info->setText(
237
+		((theme->copyright.length() > 0) ?
238
+			i18n("<qt><strong>Copyright:</strong> %1<br/></qt>",
239
+				theme->copyright) : "") +
240
+		((theme->description.length() > 0) ?
241
+			i18n("<qt><strong>Description:</strong> %1</qt>",
242
+				theme->description) : "") );
243
+	preview->setPixmap( theme->path + '/' + theme->screenShot );
244
+	preview->setText( theme->screenShot.isEmpty() ?
245
+		"Screenshot not available" : QString() );
246
+}
247
+
248
+void KDMThemeWidget::installNewTheme()
249
+{
250
+	KURLRequesterDlg fileRequester( QString::null, this, i18n("Drag or Type Theme URL") );
251
+	fileRequester.urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly );
252
+	KURL themeURL = fileRequester.getURL();
253
+	if (themeURL.isEmpty())
254
+		return;
255
+
256
+	QString themeTmpFile;
257
+
258
+	if (!KIO::NetAccess::download( themeURL, themeTmpFile, this )) {
259
+		QString sorryText;
260
+		if (themeURL.isLocalFile())
261
+			sorryText = i18n("Unable to find the KDM theme archive %1.",themeURL.prettyURL());
262
+		else
263
+			sorryText = i18n("Unable to download the KDM theme archive;\n"
264
+			                 "please check that address %1 is correct.",themeURL.prettyURL());
265
+		KMessageBox::sorry( this, sorryText );
266
+		return;
267
+	}
268
+
269
+	QList<KArchiveDirectory> foundThemes;
270
+
271
+	KTar archive( themeTmpFile );
272
+	archive.open( IO_ReadOnly );
273
+
274
+	const KArchiveDirectory *archDir = archive.directory();
275
+	QStringList entries = archDir->entries();
276
+	for (QStringList::Iterator ent = entries.begin(); ent != entries.end(); ++ent) {
277
+		const KArchiveEntry *possibleDir = archDir->entry( *ent );
278
+		if (possibleDir->isDirectory()) {
279
+			const KArchiveDirectory *subDir =
280
+				static_cast<const KArchiveDirectory *>( possibleDir );
281
+			if (subDir->entry( "KdmGreeterTheme.desktop" ))
282
+				foundThemes.append( subDir );
283
+			else if (subDir->entry( "GdmGreeterTheme.desktop" ))
284
+				foundThemes.append( subDir );
285
+		}
286
+	}
287
+
288
+	if (foundThemes.isEmpty())
289
+		KMessageBox::error( this, i18n("The file is not a valid KDM theme archive.") );
290
+	else {
291
+		KProgressDialog progressDiag( this,
292
+			i18n("Installing KDM themes"), QString() );
293
+		progressDiag.setModal( true );
294
+		progressDiag.setAutoClose( true );
295
+		progressDiag.progressBar()->setTotalSteps( foundThemes.count() );
296
+		progressDiag.show();
297
+
298
+		for ( KArchiveDirectory * ard = foundThemes.first(); foundThemes.current(); foundThemes.next() ) {
299
+			progressDiag.setLabel(
300
+				i18n("<qt>Installing <strong>%1</strong> theme</qt>", ard->name() ) );
301
+
302
+			QString path = themeDir + "themes/" + ard->name();
303
+			kdDebug() << "Unpacking new theme to " << path << endl;
304
+			ard->copyTo( path, true );
305
+			if (QDir( path ).exists())
306
+				insertTheme( path );
307
+
308
+			progressDiag.progressBar()->setValue( progressDiag.progressBar()->value() + 1 );
309
+			if (progressDiag.wasCancelled())
310
+				break;
311
+		}
312
+		emit changed(true);
313
+	}
314
+
315
+	archive.close();
316
+
317
+	KIO::NetAccess::removeTempFile( themeTmpFile );
318
+}
319
+
320
+void KDMThemeWidget::themeSelected()
321
+{
322
+	if (themeWidget->selectedItem()) {
323
+		defaultTheme = (ThemeData *)(themeWidget->selectedItem());
324
+		updateInfoView( defaultTheme );
325
+	} else
326
+		updateInfoView( 0 );
327
+	emit changed(true);
328
+}
329
+
330
+void KDMThemeWidget::removeSelectedThemes()
331
+{
332
+	QListViewItem * themes = themeWidget->selectedItem();
333
+	if (!themes)
334
+		return;
335
+	if (KMessageBox::questionYesNoList( this,
336
+			i18n("Are you sure you want to remove this KDM theme?"),
337
+			themes->text(0), i18n("Remove theme?") ) != KMessageBox::Yes)
338
+		return;
339
+	KIO::del( ((ThemeData *)themes)->path ); // XXX error check
340
+
341
+	themeWidget->takeItem( themes );
342
+}
343
+
344
+#include "kdmtheme.moc"

+ 31
- 0
src/kdmtheme.desktop View File

@@ -0,0 +1,31 @@
1
+[Desktop Entry]
2
+Encoding=UTF-8
3
+Exec=kcmshell kdmtheme
4
+Icon=kdmconfig
5
+Type=Application
6
+
7
+X-KDE-ModuleType=Library
8
+X-KDE-Library=kdmtheme
9
+X-KDE-RootOnly=true
10
+X-KDE-HasReadOnlyMode=true
11
+X-KDE-ParentApp=kcontrol
12
+X-Keywords=kdmtheme
13
+
14
+Comment=kdmtheme - KDM Theme Manager
15
+Comment[es]=kdmtheme - Manejador del tema de KDM
16
+Comment[sv]=kdmtheme - Temahanterare för KDM
17
+Comment[id]=kdmtheme - Pengatur Tema KDM
18
+Comment[ms]=kdmtheme - Pengatur Tema KDM
19
+Comment[fr]=kdmtheme - Gestionnaire de thèmes KDM
20
+Comment[it]=kdmtheme - Gestore di temi KDM
21
+Comment[jp]=kdmtheme - KDM テーママネージャー
22
+Name=KDM Theme Manager
23
+Name[es]=Manejador del tema de KDM
24
+Name[sv]=Temahanterare för KDM
25
+Name[id]=Pengatur Tema KDM
26
+Name[ms]=Pengatur Tema KDM
27
+Name[fr]=Gestionnaire de thèmes KDM
28
+Name[it]=Gestore di temi KDM
29
+Name[jp]=KDM テーママネージャー
30
+
31
+Categories=Qt;KDE;X-KDE-settings-system;X-KDE-systemsettings-lookandfeel-appearance;

+ 71
- 0
src/kdmtheme.h View File

@@ -0,0 +1,71 @@
1
+/***************************************************************************
2
+ *   Copyright (C) 2005-2007 by Stephen Leaf <smileaf@gmail.com>           *
3
+ *   Copyright (C) 2006 by Oswald Buddenhagen <ossi@kde.org>               *
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
+#ifndef _KDMTHEME_H_
22
+#define _KDMTHEME_H_
23
+
24
+#include <kconfig.h>
25
+#include <kcmodule.h>
26
+
27
+#include <qwidget.h>
28
+
29
+class ThemeData;
30
+
31
+class QLabel;
32
+class QPushButton;
33
+class QListView;
34
+class QCheckBox;
35
+
36
+class KDMThemeWidget : public KCModule {
37
+	Q_OBJECT
38
+
39
+  public:
40
+	KDMThemeWidget( QWidget *parent = 0, const char *name=0, const QStringList& = QStringList() );
41
+
42
+	virtual void load();
43
+	virtual void save();
44
+	virtual void defaults();
45
+	void setReadOnly( bool );
46
+
47
+  private:
48
+	void selectTheme( const QString & );
49
+	void insertTheme( const QString & );
50
+	void updateInfoView( ThemeData * );
51
+
52
+	QListView *themeWidget;
53
+	QLabel *preview;
54
+	QLabel *info;
55
+	QPushButton *bInstallTheme;
56
+	QPushButton *bRemoveTheme;
57
+	QCheckBox *cUseTheme;
58
+
59
+	ThemeData *defaultTheme;
60
+	QString themeDir;
61
+	KConfig *config;
62
+
63
+  protected slots:
64
+	void themeSelected();
65
+	void removeSelectedThemes();
66
+	void installNewTheme();
67
+	void toggleUseTheme(bool);
68
+
69
+};
70
+
71
+#endif

+ 0
- 0
stamp-h.in View File


Loading…
Cancel
Save