Skip to content
Browse files

del

  • Loading branch information...
1 parent 46c2e46 commit 682fe8f9c5ab05edab4155da436c4073602a70ea @circass committed Jan 16, 2013
Showing with 0 additions and 41,851 deletions.
  1. +0 −14 kaptan/AUTHORS
  2. +0 −356 kaptan/COPYING
  3. +0 −25 kaptan/README
  4. +0 −8 kaptan/TODO
  5. +0 −31 kaptan/about.py
  6. +0 −244 kaptan/build/kaptan.py
  7. +0 −2 kaptan/build/kaptan/__init__.py
  8. +0 −32,425 kaptan/build/kaptan/kaptan_rc.py
  9. BIN kaptan/build/kaptan/kde-themes/cherry.png
  10. +0 −14 kaptan/build/kaptan/kde-themes/cherry.style
  11. BIN kaptan/build/kaptan/kde-themes/chrome.png
  12. +0 −14 kaptan/build/kaptan/kde-themes/chrome.style
  13. BIN kaptan/build/kaptan/kde-themes/dark.png
  14. +0 −14 kaptan/build/kaptan/kde-themes/dark.style
  15. BIN kaptan/build/kaptan/kde-themes/default.png
  16. +0 −14 kaptan/build/kaptan/kde-themes/default.style
  17. BIN kaptan/build/kaptan/kde-themes/desert.png
  18. +0 −14 kaptan/build/kaptan/kde-themes/desert.style
  19. BIN kaptan/build/kaptan/kde-themes/north.png
  20. +0 −14 kaptan/build/kaptan/kde-themes/north.style
  21. BIN kaptan/build/kaptan/kde-themes/obsidian.png
  22. +0 −14 kaptan/build/kaptan/kde-themes/obsidian.style
  23. BIN kaptan/build/kaptan/kde-themes/soldier.png
  24. +0 −14 kaptan/build/kaptan/kde-themes/soldier.style
  25. +0 −29 kaptan/build/kaptan/screen.py
  26. 0 kaptan/build/kaptan/screens/__init__.py
  27. +0 −197 kaptan/build/kaptan/screens/scrAvatar.py
  28. +0 −66 kaptan/build/kaptan/screens/scrGoodbye.py
  29. +0 −129 kaptan/build/kaptan/screens/scrKeyboard.py
  30. +0 −108 kaptan/build/kaptan/screens/scrMenu.py
  31. +0 −150 kaptan/build/kaptan/screens/scrMouse.py
  32. +0 −98 kaptan/build/kaptan/screens/scrPackage.py
  33. +0 −152 kaptan/build/kaptan/screens/scrSmolt.py
  34. +0 −176 kaptan/build/kaptan/screens/scrStyle.py
  35. +0 −328 kaptan/build/kaptan/screens/scrSummary.py
  36. +0 −131 kaptan/build/kaptan/screens/scrWallpaper.py
  37. +0 −41 kaptan/build/kaptan/screens/scrWelcome.py
  38. +0 −32 kaptan/build/kaptan/screens/styleItem.py
  39. +0 −374 kaptan/build/kaptan/screens/ui_kaptan.py
  40. +0 −263 kaptan/build/kaptan/screens/ui_scrAvatar.py
  41. +0 −346 kaptan/build/kaptan/screens/ui_scrGoodbye.py
  42. +0 −106 kaptan/build/kaptan/screens/ui_scrKeyboard.py
  43. +0 −139 kaptan/build/kaptan/screens/ui_scrMenu.py
  44. +0 −222 kaptan/build/kaptan/screens/ui_scrMouse.py
  45. +0 −149 kaptan/build/kaptan/screens/ui_scrPackage.py
  46. +0 −114 kaptan/build/kaptan/screens/ui_scrSearch.py
  47. +0 −177 kaptan/build/kaptan/screens/ui_scrSmolt.py
  48. +0 −267 kaptan/build/kaptan/screens/ui_scrStyle.py
  49. +0 −81 kaptan/build/kaptan/screens/ui_scrStyleItem.py
  50. +0 −98 kaptan/build/kaptan/screens/ui_scrSummary.py
  51. +0 −147 kaptan/build/kaptan/screens/ui_scrWallpaper.py
  52. +0 −90 kaptan/build/kaptan/screens/ui_scrWelcome.py
  53. +0 −84 kaptan/build/kaptan/screens/ui_wallpaperItem.py
  54. +0 −33 kaptan/build/kaptan/screens/wallpaperItem.py
  55. 0 kaptan/build/kaptan/tools/__init__.py
  56. +0 −161 kaptan/build/kaptan/tools/desktop_parser.py
  57. +0 −68 kaptan/build/kaptan/tools/kaptan_menu.py
  58. +0 −45 kaptan/build/kaptan/tools/progress_pie.py
  59. +0 −78 kaptan/build/kaptan/tools/tools.py
  60. +0 −33 kaptan/data/kaptan.desktop
  61. +0 −12 kaptan/data/kaptan.desktop.in
  62. +0 −44 kaptan/data/kaptan.qrc
  63. BIN kaptan/data/kde-themes/cherry.png
  64. +0 −14 kaptan/data/kde-themes/cherry.style
  65. BIN kaptan/data/kde-themes/chrome.png
  66. +0 −14 kaptan/data/kde-themes/chrome.style
  67. BIN kaptan/data/kde-themes/dark.png
  68. +0 −14 kaptan/data/kde-themes/dark.style
  69. BIN kaptan/data/kde-themes/default.png
  70. +0 −14 kaptan/data/kde-themes/default.style
  71. BIN kaptan/data/kde-themes/desert.png
  72. +0 −14 kaptan/data/kde-themes/desert.style
  73. BIN kaptan/data/kde-themes/inversion.png
  74. +0 −12 kaptan/data/kde-themes/inversion.style
  75. BIN kaptan/data/kde-themes/north.png
  76. +0 −14 kaptan/data/kde-themes/north.style
  77. BIN kaptan/data/kde-themes/obsidian.png
  78. +0 −14 kaptan/data/kde-themes/obsidian.style
  79. BIN kaptan/data/kde-themes/soldier.png
  80. +0 −14 kaptan/data/kde-themes/soldier.style
  81. BIN kaptan/data/kde-themes/white.png
  82. +0 −12 kaptan/data/kde-themes/white.style
  83. +0 −4 kaptan/data/pixmap/.directory
  84. BIN kaptan/data/pixmap/applications-internet.png
  85. BIN kaptan/data/pixmap/applications-other.png
  86. BIN kaptan/data/pixmap/arrow-left.png
  87. BIN kaptan/data/pixmap/arrow-right.png
  88. BIN kaptan/data/pixmap/basket.png
  89. BIN kaptan/data/pixmap/bg2.png
  90. BIN kaptan/data/pixmap/cr64-app-kaptan.png
  91. BIN kaptan/data/pixmap/cross.png
  92. BIN kaptan/data/pixmap/document-save.png
  93. BIN kaptan/data/pixmap/kaptan-left.png
  94. BIN kaptan/data/pixmap/kaptan-logo.png
  95. BIN kaptan/data/pixmap/kaptan_settings.png
  96. BIN kaptan/data/pixmap/kaptan_welcome.png
  97. BIN kaptan/data/pixmap/kde-windows.png
  98. BIN kaptan/data/pixmap/kde.png
  99. BIN kaptan/data/pixmap/kickoff.png
  100. BIN kaptan/data/pixmap/lancelot.png
  101. BIN kaptan/data/pixmap/menu-arrow-left.png
  102. BIN kaptan/data/pixmap/menu-arrow-right.png
  103. BIN kaptan/data/pixmap/milky.png
  104. BIN kaptan/data/pixmap/multiple.png
  105. BIN kaptan/data/pixmap/nepomuk.png
  106. BIN kaptan/data/pixmap/oxygen.png
  107. BIN kaptan/data/pixmap/preferences-desktop-color.png
  108. BIN kaptan/data/pixmap/preferences-desktop-icons.png
  109. BIN kaptan/data/pixmap/preferences-desktop-keyboard.png
  110. BIN kaptan/data/pixmap/preferences-desktop-peripherals.png
  111. BIN kaptan/data/pixmap/preferences-desktop-personal.png
  112. BIN kaptan/data/pixmap/preferences-desktop-wallpaper.png
  113. BIN kaptan/data/pixmap/preferences-security.png
  114. BIN kaptan/data/pixmap/preferences-services.png
  115. BIN kaptan/data/pixmap/preferences-system.png
  116. BIN kaptan/data/pixmap/simple.png
  117. BIN kaptan/data/pixmap/system-help.png
  118. BIN kaptan/data/pixmap/tab-new-background.png
  119. BIN kaptan/data/pixmap/tick.png
  120. BIN kaptan/data/pixmap/view-pim-contacts.png
  121. BIN kaptan/data/pixmap/view-refresh.png
  122. BIN kaptan/data/pixmap/webcamreceive.png
  123. BIN kaptan/data/pixmap/white-arrow-down.gif
  124. +0 −75 kaptan/help/en/main_help.rst
  125. +0 −97 kaptan/help/tr/main_help.rst
  126. +0 −118 kaptan/kaptan-rootactions
  127. BIN kaptan/po/az.mo
  128. +0 −598 kaptan/po/az.po
  129. BIN kaptan/po/da.mo
  130. +0 −844 kaptan/po/da.po
  131. BIN kaptan/po/de.mo
  132. +0 −996 kaptan/po/de.po
  133. BIN kaptan/po/es.mo
  134. +0 −998 kaptan/po/es.po
  135. BIN kaptan/po/fr.mo
Sorry, we could not display the entire diff because it was too big.
View
14 kaptan/AUTHORS
@@ -1,14 +0,0 @@
-Current Developer
------------------
-george <george at chakra-project org>
-Renan Cakirerk <renan at pardus org tr>
-
-Previous Developers & Contributors
-----------------------------------
-Pınar Yanardağ <pinar at pardus org tr>
-Gökmen Göksel <gokmen at pardus org tr>
-Gökçen Eraslan <gokcen at pardus org tr>
-Onur Küçük <onur at pardus org tr>
-
-Smolt Screen: Fethican Coşkuner <fethicanc at gmail com>
-Avatar Screen: Deniz Gürsel <denizzgursel at gmail com>
View
356 kaptan/COPYING
@@ -1,356 +0,0 @@
-Copyright (C) 2009-2011 TUBITAK/UEKAE
-
-This program is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2 of the License, or (at your option)
-any later version.
-
-NOTE! The GPL below is copyrighted by the Free Software Foundation, but
-the instance of code that it refers to are copyrighted
-by the authors who actually wrote it.
-
-----------------------------------------------------------------------------
-
-Table of Contents
-
- * GNU GENERAL PUBLIC LICENSE
- o Preamble
- o TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- o How to Apply These Terms to Your New Programs
-
-----------------------------------------------------------------------------
-
-GNU GENERAL PUBLIC LICENSE
-
-Version 2, June 1991
-
-Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-
-Preamble
-
-The licenses for most software are designed to take away your freedom to
-share and change it. By contrast, the GNU General Public License is intended
-to guarantee your freedom to share and change free software--to make sure
-the software is free for all its users. This General Public License applies
-to most of the Free Software Foundation's software and to any other program
-whose authors commit to using it. (Some other Free Software Foundation
-software is covered by the GNU Library General Public License instead.) You
-can apply it to your programs, too.
-
-When we speak of free software, we are referring to freedom, not price. Our
-General Public Licenses are designed to make sure that you have the freedom
-to distribute copies of free software (and charge for this service if you
-wish), that you receive source code or can get it if you want it, that you
-can change the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid anyone to
-deny you these rights or to ask you to surrender the rights. These
-restrictions translate to certain responsibilities for you if you distribute
-copies of the software, or if you modify it.
-
-For example, if you distribute copies of such a program, whether gratis or
-for a fee, you must give the recipients all the rights that you have. You
-must make sure that they, too, receive or can get the source code. And you
-must show them these terms so they know their rights.
-
-We protect your rights with two steps: (1) copyright the software, and (2)
-offer you this license which gives you legal permission to copy, distribute
-and/or modify the software.
-
-Also, for each author's protection and ours, we want to make certain that
-everyone understands that there is no warranty for this free software. If
-the software is modified by someone else and passed on, we want its
-recipients to know that what they have is not the original, so that any
-problems introduced by others will not reflect on the original authors'
-reputations.
-
-Finally, any free program is threatened constantly by software patents. We
-wish to avoid the danger that redistributors of a free program will
-individually obtain patent licenses, in effect making the program
-proprietary. To prevent this, we have made it clear that any patent must be
-licensed for everyone's free use or not licensed at all.
-
-The precise terms and conditions for copying, distribution and modification
-follow.
-
-TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License applies to any program or other work which contains a notice
-placed by the copyright holder saying it may be distributed under the terms
-of this General Public License. The "Program", below, refers to any such
-program or work, and a "work based on the Program" means either the Program
-or any derivative work under copyright law: that is to say, a work
-containing the Program or a portion of it, either verbatim or with
-modifications and/or translated into another language. (Hereinafter,
-translation is included without limitation in the term "modification".) Each
-licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not covered
-by this License; they are outside its scope. The act of running the Program
-is not restricted, and the output from the Program is covered only if its
-contents constitute a work based on the Program (independent of having been
-made by running the Program). Whether that is true depends on what the
-Program does.
-
-1. You may copy and distribute verbatim copies of the Program's source code
-as you receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice and
-disclaimer of warranty; keep intact all the notices that refer to this
-License and to the absence of any warranty; and give any other recipients of
-the Program a copy of this License along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and you
-may at your option offer warranty protection in exchange for a fee.
-
-2. You may modify your copy or copies of the Program or any portion of it,
-thus forming a work based on the Program, and copy and distribute such
-modifications or work under the terms of Section 1 above, provided that you
-also meet all of these conditions:
-
- * a) You must cause the modified files to carry prominent notices stating
- that you changed the files and the date of any change.
-
- * b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any part
- thereof, to be licensed as a whole at no charge to all third parties
- under the terms of this License.
-
- * c) If the modified program normally reads commands interactively when
- run, you must cause it, when started running for such interactive use
- in the most ordinary way, to print or display an announcement including
- an appropriate copyright notice and a notice that there is no warranty
- (or else, saying that you provide a warranty) and that users may
- redistribute the program under these conditions, and telling the user
- how to view a copy of this License. (Exception: if the Program itself
- is interactive but does not normally print such an announcement, your
- work based on the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If identifiable
-sections of that work are not derived from the Program, and can be
-reasonably considered independent and separate works in themselves, then
-this License, and its terms, do not apply to those sections when you
-distribute them as separate works. But when you distribute the same sections
-as part of a whole which is a work based on the Program, the distribution of
-the whole must be on the terms of this License, whose permissions for other
-licensees extend to the entire whole, and thus to each and every part
-regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest your
-rights to work written entirely by you; rather, the intent is to exercise
-the right to control the distribution of derivative or collective works
-based on the Program.
-
-In addition, mere aggregation of another work not based on the Program with
-the Program (or with a work based on the Program) on a volume of a storage
-or distribution medium does not bring the other work under the scope of this
-License.
-
-3. You may copy and distribute the Program (or a work based on it, under
-Section 2) in object code or executable form under the terms of Sections 1
-and 2 above provided that you also do one of the following:
-
- * a) Accompany it with the complete corresponding machine-readable source
- code, which must be distributed under the terms of Sections 1 and 2
- above on a medium customarily used for software interchange; or,
-
- * b) Accompany it with a written offer, valid for at least three years,
- to give any third party, for a charge no more than your cost of
- physically performing source distribution, a complete machine-readable
- copy of the corresponding source code, to be distributed under the
- terms of Sections 1 and 2 above on a medium customarily used for
- software interchange; or,
-
- * c) Accompany it with the information you received as to the offer to
- distribute corresponding source code. (This alternative is allowed only
- for noncommercial distribution and only if you received the program in
- object code or executable form with such an offer, in accord with
- Subsection b above.)
-
-The source code for a work means the preferred form of the work for making
-modifications to it. For an executable work, complete source code means all
-the source code for all modules it contains, plus any associated interface
-definition files, plus the scripts used to control compilation and
-installation of the executable. However, as a special exception, the source
-code distributed need not include anything that is normally distributed (in
-either source or binary form) with the major components (compiler, kernel,
-and so on) of the operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-If distribution of executable or object code is made by offering access to
-copy from a designated place, then offering equivalent access to copy the
-source code from the same place counts as distribution of the source code,
-even though third parties are not compelled to copy the source along with
-the object code.
-
-4. You may not copy, modify, sublicense, or distribute the Program except as
-expressly provided under this License. Any attempt otherwise to copy,
-modify, sublicense or distribute the Program is void, and will automatically
-terminate your rights under this License. However, parties who have received
-copies, or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-5. You are not required to accept this License, since you have not signed
-it. However, nothing else grants you permission to modify or distribute the
-Program or its derivative works. These actions are prohibited by law if you
-do not accept this License. Therefore, by modifying or distributing the
-Program (or any work based on the Program), you indicate your acceptance of
-this License to do so, and all its terms and conditions for copying,
-distributing or modifying the Program or works based on it.
-
-6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the original
-licensor to copy, distribute or modify the Program subject to these terms
-and conditions. You may not impose any further restrictions on the
-recipients' exercise of the rights granted herein. You are not responsible
-for enforcing compliance by third parties to this License.
-
-7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot distribute so
-as to satisfy simultaneously your obligations under this License and any
-other pertinent obligations, then as a consequence you may not distribute
-the Program at all. For example, if a patent license would not permit
-royalty-free redistribution of the Program by all those who receive copies
-directly or indirectly through you, then the only way you could satisfy both
-it and this License would be to refrain entirely from distribution of the
-Program.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply and
-the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any patents
-or other property right claims or to contest validity of any such claims;
-this section has the sole purpose of protecting the integrity of the free
-software distribution system, which is implemented by public license
-practices. Many people have made generous contributions to the wide range of
-software distributed through that system in reliance on consistent
-application of that system; it is up to the author/donor to decide if he or
-she is willing to distribute software through any other system and a
-licensee cannot impose that choice.
-
-This section is intended to make thoroughly clear what is believed to be a
-consequence of the rest of this License.
-
-8. If the distribution and/or use of the Program is restricted in certain
-countries either by patents or by copyrighted interfaces, the original
-copyright holder who places the Program under this License may add an
-explicit geographical distribution limitation excluding those countries, so
-that distribution is permitted only in or among countries not thus excluded.
-In such case, this License incorporates the limitation as if written in the
-body of this License.
-
-9. The Free Software Foundation may publish revised and/or new versions of
-the General Public License from time to time. Such new versions will be
-similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-10. If you wish to incorporate parts of the Program into other free programs
-whose distribution conditions are different, write to the author to ask for
-permission. For software which is copyrighted by the Free Software
-Foundation, write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two goals of
-preserving the free status of all derivatives of our free software and of
-promoting the sharing and reuse of software generally.
-
-NO WARRANTY
-
-11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
-THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO
-THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM
-PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
-CORRECTION.
-
-12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO
-LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
-THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-END OF TERMS AND CONDITIONS
-
-How to Apply These Terms to Your New Programs
-
-If you develop a new program, and you want it to be of the greatest possible
-use to the public, the best way to achieve this is to make it free software
-which everyone can redistribute and change under these terms.
-
-To do so, attach the following notices to the program. It is safest to
-attach them to the start of each source file to most effectively convey the
-exclusion of warranty; and each file should have at least the "copyright"
-line and a pointer to where the full notice is found.
-
-one line to give the program's name and an idea of what it does.
-Copyright (C) 19yy name of author
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this when
-it starts in an interactive mode:
-
-Gnomovision version 69, Copyright (C) 19yy name of author
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'. This is free software, and you are welcome
-to redistribute it under certain conditions; type `show c'
-for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may be
-called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
-Yoyodyne, Inc., hereby disclaims all copyright
-interest in the program `Gnomovision'
-(which makes passes at compilers) written
-by James Hacker.
-
-signature of Ty Coon, 1 April 1989
-Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General Public
-License instead of this License.
-
View
25 kaptan/README
@@ -1,25 +0,0 @@
-License
--------
-GPLv2 (please read the COPYING file)
-
-
-Dependencies
-------------
-Python, PyQt4, PyKDE4, KDE4
-
-
-Building & Installation
------------------------
-* Build Kaptan "without installing" to your system:
-
- ./setup build
-
-* Running Kaptan after building:
-
- python build/kaptan.py
-
-* Build and "install" Kaptan to your system:
-
- ./setup install
-
-
View
8 kaptan/TODO
@@ -1,8 +0,0 @@
-Legend:
-
-- Todo
-? Not determined if/how we have to do
-/ In progress
-+ Accomplished
-
-TODO:
View
31 kaptan/about.py
@@ -1,31 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2006-2009 TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-# PyKDE
-from PyKDE4.kdecore import KAboutData, ki18n
-
-# Application Data
-appName = "kaptan"
-programName = ki18n("Kaptan")
-modName = "kaptan"
-version = "5.0.6"
-description = ki18n("Kaptan")
-license = KAboutData.License_GPL
-copyright = ki18n("(c) 2005-2011 TUBITAK/UEKAE")
-text = ki18n(" ")
-homePage = "https://github.com/pardus-anka"
-catalog = appName
-aboutData = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homePage)
-
-# Author(s)
-aboutData.addAuthor(ki18n("Renan Çakırerk"), ki18n("Current Maintainer"))
View
244 kaptan/build/kaptan.py
@@ -1,244 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-import sys
-import os
-
-from PyQt4 import QtCore, QtGui
-from PyKDE4 import kdeui
-from PyQt4.QtCore import QTimeLine
-from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs, KConfig
-
-from kaptan.screens.ui_kaptan import Ui_kaptan
-
-from kaptan.tools import tools
-from kaptan.tools.progress_pie import DrawPie
-from kaptan.tools.kaptan_menu import Menu
-
-class Kaptan(QtGui.QWidget):
- def __init__(self, parent = None):
- QtGui.QWidget.__init__(self, parent)
- self.initializeGlobals()
- self.initializeUI()
- self.signalHandler()
-
- def initializeGlobals(self):
- ''' initializes global variables '''
- self.screenData = None
- self.moveInc = 1
- self.menuText = ""
- self.titles = []
- self.descriptions = []
- self.currentDir = os.path.dirname(os.path.realpath(__file__))
- self.screensPath = self.currentDir + "/kaptan/screens/scr*py"
- self.kaptanConfig = KConfig("kaptanrc")
- self.plasmaConfig = KConfig("plasma-desktop-appletsrc")
-
- def signalHandler(self):
- ''' connects signals to slots '''
- self.connect(self.ui.buttonNext, QtCore.SIGNAL("clicked()"), self.slotNext)
- self.connect(self.ui.buttonApply, QtCore.SIGNAL("clicked()"), self.slotNext)
- self.connect(self.ui.buttonBack, QtCore.SIGNAL("clicked()"), self.slotBack)
- self.connect(self.ui.buttonFinish, QtCore.SIGNAL("clicked()"), QtGui.qApp, QtCore.SLOT("quit()"))
- self.connect(self.ui.buttonCancel, QtCore.SIGNAL("clicked()"), QtGui.qApp, QtCore.SLOT("quit()"))
-
- def initializeUI(self):
- ''' initializes the human interface '''
- self.ui = Ui_kaptan()
- self.ui.setupUi(self)
-
- # load screens
- tools.loadScreens(self.screensPath, globals())
-
- # kaptan screen settings
- self.headScreens = [scrWelcome, scrMouse, scrStyle, scrMenu, scrWallpaper]
- self.tailScreens = [scrSummary, scrGoodbye]
- self.screens = self.screenOrganizer(self.headScreens, self.tailScreens)
-
- # Add screens to StackWidget
- self.createWidgets(self.screens)
-
- # Get Screen Titles
- for screen in self.screens:
- title = screen.Widget.title.toString()
- self.titles.append(title)
-
- # draw progress pie
- self.countScreens = len(self.screens)
- self.pie = DrawPie(self.countScreens, self.ui.labelProgress)
-
- # Initialize Menu
- self.menu = Menu(self.titles, self.ui.labelMenu)
- self.menu.start()
-
- def screenOrganizer(self, headScreens, tailScreens):
- ''' appends unsorted screens to the list '''
- screens = []
-
- allScreens = [value for key, value in globals().iteritems() if key.startswith("scr")]
-
- otherScreens = list((set(allScreens) - set(headScreens)) - set(tailScreens))
- otherScreens.remove(scrKeyboard)
- otherScreens.remove(scrPackage)
- otherScreens.remove(scrSmolt)
-
- screens.extend(headScreens)
- screens.extend(otherScreens)
-
- # Append other screens depending on the following cases
- if tools.isLiveCD():
- screens.append(scrKeyboard)
-
- else:
- screens.append(scrPackage)
-
- if not tools.smoltProfileSent():
- screens.append(scrSmolt)
-
- screens.extend(tailScreens)
-
- return screens
-
- def getCur(self, d):
- ''' returns the id of current stack '''
- new = self.ui.mainStack.currentIndex() + d
- total = self.ui.mainStack.count()
- if new < 0: new = 0
- if new > total: new = total
- return new
-
- def setCurrent(self, id=None):
- ''' move to id numbered step '''
- if id: self.stackMove(id)
-
- def slotNext(self,dryRun=False):
- ''' execute next step '''
- self.menuText = ""
- curIndex = self.ui.mainStack.currentIndex() + 1
-
- # update pie progress
- self.pie.updatePie(curIndex)
-
- # animate menu
- self.menu.next()
-
- _w = self.ui.mainStack.currentWidget()
-
- ret = _w.execute()
- if ret:
- self.stackMove(self.getCur(self.moveInc))
- self.moveInc = 1
-
- def slotBack(self):
- ''' execute previous step '''
- self.menuText = ""
- curIndex = self.ui.mainStack.currentIndex()
-
- # update pie progress
- self.pie.updatePie(curIndex-1)
-
- # animate menu
- self.menu.prev()
-
- _w = self.ui.mainStack.currentWidget()
-
- _w.backCheck()
- self.stackMove(self.getCur(self.moveInc * -1))
- self.moveInc = 1
-
- def stackMove(self, id):
- ''' move to id numbered stack '''
- if not id == self.ui.mainStack.currentIndex() or id==0:
- self.ui.mainStack.setCurrentIndex(id)
-
- # Set screen title
- self.ui.screenTitle.setText(self.descriptions[id])
-
- _w = self.ui.mainStack.currentWidget()
- _w.update()
- _w.shown()
-
- if self.ui.mainStack.currentIndex() == len(self.screens) - 3:
- self.ui.buttonNext.show()
- self.ui.buttonApply.hide()
- self.ui.buttonFinish.hide()
-
- if self.ui.mainStack.currentIndex() == len(self.screens) - 2:
- self.ui.buttonNext.hide()
- self.ui.buttonApply.show()
- self.ui.buttonFinish.hide()
-
- if self.ui.mainStack.currentIndex() == len(self.screens) - 1:
- self.ui.buttonApply.hide()
- self.ui.buttonFinish.show()
-
- if self.ui.mainStack.currentIndex() == 0:
- self.ui.buttonBack.hide()
- self.ui.buttonFinish.hide()
- self.ui.buttonApply.hide()
- else:
- self.ui.buttonBack.show()
-
- def createWidgets(self, screens=[]):
- ''' create all widgets and add inside stack '''
- self.ui.mainStack.removeWidget(self.ui.page)
- for screen in screens:
- _scr = screen.Widget()
-
- # Append screen descriptions to list
- self.descriptions.append(_scr.desc.toString())
-
- # Append screens to stack widget
- self.ui.mainStack.addWidget(_scr)
-
-
- self.stackMove(0)
-
- def disableNext(self):
- self.buttonNext.setEnabled(False)
-
- def disableBack(self):
- self.buttonBack.setEnabled(False)
-
- def enableNext(self):
- self.buttonNext.setEnabled(True)
-
- def enableBack(self):
- self.buttonBack.setEnabled(True)
-
- def isNextEnabled(self):
- return self.buttonNext.isEnabled()
-
- def isBackEnabled(self):
- return self.buttonBack.isEnabled()
-
- def __del__(self):
- group = self.kaptanConfig.group("General")
- group.writeEntry("RunOnStart", "False")
-
-if __name__ == "__main__":
- appName = "kaptan"
- catalog = ""
- programName = ki18n("kaptan")
- version = "5.0.1"
- description = ki18n("Kaptan lets you configure your Pardus workspace at first login")
- license = KAboutData.License_GPL
- copyright = ki18n("(c) 2011 Pardus")
- text = ki18n("none")
- homePage = "http://developer.pardus.org.tr/projects/kaptan"
- bugEmail = "renan@pardus.org.tr"
-
- aboutData = KAboutData(appName,catalog, programName, version, description,
- license, copyright,text, homePage, bugEmail)
-
- KCmdLineArgs.init(sys.argv, aboutData)
- app = kdeui.KApplication()
-
- # attach dbus to main loop
- tools.DBus()
-
- kaptan = Kaptan()
- kaptan.show()
- tools.centerWindow(kaptan)
- app.exec_()
-
View
2 kaptan/build/kaptan/__init__.py
@@ -1,2 +0,0 @@
-version="4.0"
-
View
32,425 kaptan/build/kaptan/kaptan_rc.py
0 additions, 32,425 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
BIN kaptan/build/kaptan/kde-themes/cherry.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/cherry.style
@@ -1,14 +0,0 @@
-[Style]
-name = Cherry Blossom
-name[tr] = Kiraz Çiçeği
-
-description = A pink colored theme with a panel on top
-description[tr]= Paneli üstte olan pembe renkli bir tema
-
-panelPosition = 3
-widgetStyle = oxygen
-colorScheme = CherryBlossom
-desktopTheme = default
-thumbnail = cherry.png
-iconTheme = oxygen
-windowDecoration = kwin3_oxygen
View
BIN kaptan/build/kaptan/kde-themes/chrome.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/chrome.style
@@ -1,14 +0,0 @@
-[Style]
-name = Chrome
-name[tr] = Krom
-
-description = A light blue and gray colored theme with a white panel on bottom
-description[tr] = Paneli beyaz ve altta olan açık mavi ve gri renkli bir tema
-
-panelPosition = 4
-widgetStyle = oxygen
-colorScheme = Chrome
-desktopTheme = default
-thumbnail = chrome.png
-iconTheme = oxygen
-windowDecoration = kwin3_plastik
View
BIN kaptan/build/kaptan/kde-themes/dark.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/dark.style
@@ -1,14 +0,0 @@
-[Style]
-name = Dark Night
-name[tr] = Alaca Karanlık
-
-description = A dark colored theme with a panel on bottom
-description[tr]= Paneli allta olan koyu renkli bir tema
-
-panelPosition = 4
-widgetStyle = qtcurve
-colorScheme = ObsidianCoast
-desktopTheme = Elegance
-thumbnail = dark.png
-iconTheme = oxygen
-windowDecoration = kwin3_oxygen
View
BIN kaptan/build/kaptan/kde-themes/default.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/default.style
@@ -1,14 +0,0 @@
-[Style]
-name = KDE
-name[tr] = KDE
-
-description = A light blue and gray colored theme with a white panel on bottom
-description[tr] = Paneli beyaz ve altta olan açık mavi ve gri renkli bir tema
-
-panelPosition = 4
-widgetStyle = oxygen
-colorScheme = Default
-desktopTheme = default
-thumbnail = default.png
-iconTheme = oxygen
-windowDecoration = kwin3_oxygen
View
BIN kaptan/build/kaptan/kde-themes/desert.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/desert.style
@@ -1,14 +0,0 @@
-[Style]
-name = Desert Rose
-name[tr] = Çöl Gülü
-
-description = A red and gray colored theme with a panel on top
-description[tr]= Paneli üstte olan kırmızı ve gri renkli bir tema
-
-panelPosition = 3
-widgetStyle = qtcurve
-colorScheme = Desert
-desktopTheme = slim-glow
-thumbnail = desert.png
-iconTheme = oxygen
-windowDecoration = kwin3_plastik
View
BIN kaptan/build/kaptan/kde-themes/north.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/north.style
@@ -1,14 +0,0 @@
-[Style]
-name = North
-name[tr] = Kuzey
-
-description = A blue and gray colored shiny theme with a panel on bottom
-description[tr]= Paneli altta olan mavi ve gri renkli parlak bir tema
-
-panelPosition = 4
-widgetStyle = oxygen
-colorScheme = Steel
-desktopTheme = Aya
-thumbnail = north.png
-iconTheme = oxygen
-windowDecoration = kwin3_oxygen
View
BIN kaptan/build/kaptan/kde-themes/obsidian.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/obsidian.style
@@ -1,14 +0,0 @@
-[Style]
-name = Obsidian
-name[tr] = Lav Taşı
-
-description = A light colored theme with a panel on bottom
-description[tr]= Paneli altta olan açık renkli bir tema
-
-panelPosition = 4
-widgetStyle = oxygen
-colorScheme = Norway
-desktopTheme = slim-glow
-thumbnail = obsidian.png
-iconTheme = oxygen
-windowDecoration = kwin3_oxygen
View
BIN kaptan/build/kaptan/kde-themes/soldier.png
Deleted file not rendered
View
14 kaptan/build/kaptan/kde-themes/soldier.style
@@ -1,14 +0,0 @@
-[Style]
-name = Soldier
-name[tr] = Asker
-
-description = A dark gray and green theme with a panel on top
-description[tr]= Paneli üstte olan koyu gri ve yeşil bir tema
-
-panelPosition = 3
-widgetStyle = qtCurve
-colorScheme = EveningLilac
-desktopTheme = Aya
-thumbnail = soldier.png
-iconTheme = oxygen
-windowDecoration = kwin3_oxygen
View
29 kaptan/build/kaptan/screen.py
@@ -1,29 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-
-# Abstract class for screen widgets
-class Screen:
-
- title = ""
- desc = ""
- help = ""
- icon = None
-
- def shown(self):
- pass
-
- def execute(self):
- return True
-
- def backCheck(self):
- return False
View
0 kaptan/build/kaptan/screens/__init__.py
No changes.
View
197 kaptan/build/kaptan/screens/scrAvatar.py
@@ -1,197 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-#TODO:
-#- left right position duzelecek
-#- kamera yoksa gorunmeyebilir
-# Please read the COPYING file.
-#
-
-
-from PyQt4 import QtGui, QtCore
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-from PyKDE4.kdecore import ki18n
-from PyKDE4.kdecore import i18n
-import ImageQt
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrAvatar import Ui_Form
-
-import subprocess
-import os
-
-import Image
-import select
-import v4l2capture
-
-class Widget(QtGui.QWidget, Screen):
-
- title = ki18n("User Picture")
-
- screenSettings = {}
- screenSettings["hasChanged"] = False
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self, None)
- self.ui = Ui_Form()
- self.ui.setupUi(self)
-
- self.camActive = False
-
- Widget.desc = QVariant(unicode(ki18n("Create Your User Picture").toString()))
-
- self.pictureTaken = 0
- self.ui.takeButton.hide()
-
- for dev in os.listdir("/dev"):
- if dev.startswith("video"):
- cam = v4l2capture.Video_device(os.path.join("/dev", dev))
- cam_driver, cam_card, cam_bus, cam_capabilities = cam.get_info()
- cam_str = "%s - %s" % (cam_card, os.path.join("/dev", dev))
-
- if "video_capture" in cam_capabilities:
- if "radio" in cam_capabilities or "tuner" in cam_capabilities:
- continue
- self.ui.comboBox.addItem(cam_str, QVariant(os.path.join("/dev", dev)))
-
- self.timer = QtCore.QTimer(self)
- self.connect(self.timer, QtCore.SIGNAL("timeout()"), self.refreshCam)
- self.connect(self.ui.comboBox, QtCore.SIGNAL('activated(QString)'), self.processSelection)
- self.connect(self.ui.takeButton, QtCore.SIGNAL('clicked()'), self.showPicture)
- self.connect(self.ui.takeAgainButton, QtCore.SIGNAL('clicked()'), self.activateCam)
-
- self.ui.takeAgainButton.hide()
-
- def processSelection(self):
- if self.ui.comboBox.currentIndex() == 1:
- self.chooseFile()
-
- if self.ui.comboBox.currentIndex() > 1:
- self.activateCam()
-
- def activateCam(self):
- self.drawCrop = DrawCropMask(self.ui.camGoruntu)
- self.camActive = True
- self.ui.takeButton.show()
- self.ui.takeAgainButton.hide()
- self.timer.stop()
- cam = str(self.ui.comboBox.itemData(self.ui.comboBox.currentIndex()).toString())
- self.video = v4l2capture.Video_device(cam)
-
- self.size_x, self.size_y = self.video.set_format(320, 240)
- self.video.create_buffers(10)
- self.video.queue_all_buffers()
- self.video.start()
-
- select.select((self.video,), (), ())
-
- self.timer.setInterval(30)
- self.timer.start()
-
- def refreshCam(self):
- try:
- self.image_data = self.video.read_and_queue()
- self.image_raw = Image.fromstring("RGB", (self.size_x, self.size_y), self.image_data)
- self.image = ImageQt.ImageQt(self.image_raw).mirrored(True, False)
- self.ui.camGoruntu.setPixmap(QtGui.QPixmap.fromImage(self.image))
- self.updateCropMask()
- except:
- pass
-
- def showPicture(self):
- self.__class__.screenSettings["hasChanged"] = True
- self.camActive = False
- self.deactivateCam()
- self.ui.takeAgainButton.show()
- self.ui.takeButton.hide()
-
- self.savePicture()
-
- def deactivateCam(self):
- self.timer.stop()
- self.video.close()
-
- def savePicture(self, picturePath = None):
- home = os.path.expanduser("~")
-
- if picturePath:
- self.picturePath = str(picturePath)
- else:
- self.pictureTaken = 1
- self.picturePath = home + "/temp.jpg"
- self.image.save(self.picturePath)
-
- self.foto = Image.open(self.picturePath)
- self.space = (85, 70, 235, 195)
- self.paste = self.foto.crop(self.space)
- self.paste.save(home + "/temp.jpg")
- os.rename(home + "/temp.jpg", home + "/.face.icon")
-
- def chooseFile(self):
- self.ui.takeButton.hide()
- self.__class__.screenSettings["hasChanged"] = True
- if self.camActive == True:
- self.deactivateCam()
-
- self.selectedFile = QFileDialog.getOpenFileName(None,"Open Image", os.environ["HOME"], 'Image Files (*.png *.jpg *bmp)')
-
- if self.selectedFile.isNull():
- return
- else:
- home = os.path.expanduser("~")
-
- self.ui.camGoruntu.setPixmap(QtGui.QPixmap(str(self.selectedFile)))
- self.ui.camGoruntu.update()
-
- self.savePicture(self.selectedFile)
-
- def shown(self):
- pass
-
- def execute(self):
- if not self.pictureTaken == 1:
- self.timer.stop()
- try:
- self.video.close()
- except:
- pass
-
- return True
-
-
-class DrawCropMask(QtGui.QWidget):
- def __init__(self, parent=None):
- QtGui.QWidget.__init__(self, parent)
- self.setGeometry(QtCore.QRect(0, 0, 320, 240))
-
- def paintEvent(self, event):
- painter = QPainter()
- painter.begin(self)
- painter.setRenderHint(QPainter.Antialiasing)
- painter.setPen(QColor(20,20,20, 0))
- painter.setBrush(QBrush(QColor(0, 0, 0, 200)))
-
- rect = QRect(0, 0, 85, 240) # x, y, w, h
- rect2 = QRect(85, 0, 150, 45)
- rect3 = QRect(235, 0, 85, 240)
- rect4 = QRect(85, 195, 150, 45)
- painter.drawRect(rect)
- painter.drawRect(rect2)
- painter.drawRect(rect3)
- painter.drawRect(rect4)
-
- painter.setBrush(QBrush(QColor(20, 20, 20, 100)))
-
- painter.end()
-
- def updateCropMask(self):
- self.update()
-
-
View
66 kaptan/build/kaptan/screens/scrGoodbye.py
@@ -1,66 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-from PyQt4 import QtGui
-from PyQt4.QtCore import *
-from PyKDE4.kdecore import ki18n, KGlobal, KConfig
-
-import subprocess, sys
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrGoodbye import Ui_goodbyeWidget
-import kaptan.screens.scrSmolt as smoltWidget
-
-class Widget(QtGui.QWidget, Screen):
- title = ki18n("More")
- desc = ki18n("Congratulations!")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_goodbyeWidget()
- self.ui.setupUi(self)
-
- lang = KGlobal.locale().language()
- if lang == "tr":
- self.helpPageUrl = "http://www.pardus-anka.org/"
- else:
- self.helpPageUrl = "http://www.pardus-anka.org/"
-
- self.smoltUrl = "http://smolt.pardus.org.tr:8090"
-
- def on_buttonSystemSettings_clicked(self):
- self.procSettings = QProcess()
- self.procSettings.start("systemsettings")
-
- def on_buttonHelpPages_clicked(self):
- self.procSettings = QProcess()
- command = "kfmclient openURL " + self.helpPageUrl
- self.procSettings.start(command)
-
- def on_buttonSystemSettings_2_clicked(self):
- self.procSettings = QProcess()
- command = "kfmclient openURL " + self.smoltUrl
- self.procSettings.start(command)
-
- def setSmolt(self):
- if not self.smoltSettings["profileSend"]:
- self.ui.smoltGroupBox.hide()
- self.ui.label.hide()
-
- def shown(self):
- self.smoltSettings = smoltWidget.Widget.screenSettings
- self.setSmolt()
-
- def execute(self):
- return True
-
-
View
129 kaptan/build/kaptan/screens/scrKeyboard.py
@@ -1,129 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-
-from PyQt4 import QtGui
-
-from PyQt4.QtCore import *
-from PyKDE4.kdecore import ki18n, KConfig
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrKeyboard import Ui_keyboardWidget
-
-import subprocess
-
-from pardus import localedata
-
-class Widget(QtGui.QWidget, Screen):
- screenSettings = {}
- screenSettings["hasChanged"] = False
-
- # title and description at the top of the dialog window
- title = ki18n("Keyboard")
- desc = ki18n("Keyboard Layout Language")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_keyboardWidget()
- self.ui.setupUi(self)
-
- # get layout config
- self.config = KConfig("kxkbrc")
- self.group = self.config.group("Layout")
- self.layoutList = str(self.group.readEntry("LayoutList"))
- self.lastLayout = 0
-
- # get language list
- self.languageList = self.getLanguageList()
-
- # generate language list
- for language in self.languageList:
- languageCode, languageName, languageLayout, languageVariant = language
-
- item = QtGui.QListWidgetItem(self.ui.listWidgetKeyboard)
- item.setText(languageName)
- item.setToolTip(languageLayout)
- item.setStatusTip(languageVariant)
- self.ui.listWidgetKeyboard.addItem(item)
-
- # select appropriate keymap
- if self.getCurrentSystemLanguage().strip() == languageCode.strip():
- if languageCode.strip()=="tr" and languageVariant.strip() == "f":
- break
- else:
- self.ui.listWidgetKeyboard.setCurrentItem(item)
-
- self.ui.listWidgetKeyboard.sortItems()
- self.ui.listWidgetKeyboard.connect(self.ui.listWidgetKeyboard, SIGNAL("itemSelectionChanged()"), self.setKeyboard)
-
- def getCurrentSystemLanguage(self):
- lang = "en"
-
- try:
- langFile = open('/etc/mudur/language', 'r')
- lang = langFile.readline().rstrip('\n').strip()
- except IOError:
- print "Cannot read /etc/mudur/language file"
-
- return lang
-
- def getLanguageList(self):
- languageList = []
-
- for language in localedata.languages.items():
- lcode, lprops = language
-
- lkeymaps = lprops.keymaps
-
- for lmap in lkeymaps:
- lname = lmap.name
- llayout = lmap.xkb_layout
- lvariant = lmap.xkb_variant
-
- languageList.append([lcode, lname, llayout, lvariant])
-
- return languageList
-
- def setKeyboard(self):
- layout = self.ui.listWidgetKeyboard.currentItem().toolTip()
- variant = self.ui.listWidgetKeyboard.currentItem().statusTip()
-
- subprocess.Popen(["setxkbmap", layout, variant])
- if variant:
- self.lastLayout = layout + "(" + variant + ")"
- else:
- self.lastLayout = layout
-
- def shown(self):
- pass
-
- def execute(self):
- if self.lastLayout:
- layoutArr = self.layoutList.split(",")
-
- if self.lastLayout not in layoutArr:
- layoutArr.insert(0, str(self.lastLayout))
- else:
- layoutArr.remove(self.lastLayout)
- layoutArr.insert(0, str(self.lastLayout))
-
- for i in layoutArr:
- if i == "":
- layoutArr.remove(i)
-
- layoutList = ",".join(layoutArr)
- self.group.writeEntry("LayoutList", layoutList)
- self.group.writeEntry("DisplayNames", layoutList)
- self.config.sync()
- return True
-
-
View
108 kaptan/build/kaptan/screens/scrMenu.py
@@ -1,108 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-from PyQt4 import QtGui
-from PyQt4.QtCore import *
-from PyKDE4.kdecore import ki18n, KStandardDirs, KGlobal, KConfig
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrMenu import Ui_menuWidget
-
-
-class Widget(QtGui.QWidget, Screen):
- screenSettings = {}
- screenSettings["hasChanged"] = False
-
- # Set title and description for the information widget
- title = ki18n("Menu")
- desc = ki18n("Choose a Menu Style")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_menuWidget()
- self.ui.setupUi(self)
-
- # read default menu style first
- config = KConfig("plasma-desktop-appletsrc")
- group = config.group("Containments")
-
- self.menuNames = {}
- self.menuNames["launcher"] = {
- "menuIndex": 0,
- "summaryMessage": ki18n("Kick-off Menu"),
- "image": QtGui.QPixmap(':/raw/pixmap/kickoff.png'),
- "description": ki18n("Kick-off menu is the default menu of Pardus.<br><br>The program shortcuts are easy to access and well organized.")
- }
- self.menuNames["simplelauncher"] = {
- "menuIndex": 1,
- "summaryMessage": ki18n("Simple Menu"),
- "image": QtGui.QPixmap(':/raw/pixmap/simple.png'),
- "description": ki18n("Simple menu is an old style menu from KDE 3.<br><br>It is a very lightweight menu thus it is recommended for slower PC's.")
- }
- self.menuNames["lancelot_launcher"] = {
- "menuIndex": 2,
- "summaryMessage": ki18n("Lancelot Menu"),
- "image": QtGui.QPixmap(':/raw/pixmap/lancelot.png'),
- "description": ki18n("Lancelot is an advanced and highly customizable menu for Pardus.<br><br>The program shortcuts are easy to access and well organized.")
- }
-
- for each in list(group.groupList()):
- subgroup = group.group(each)
- subcomponent = subgroup.readEntry('plugin')
- if subcomponent == 'panel':
- subg = subgroup.group('Applets')
- for i in list(subg.groupList()):
- subg2 = subg.group(i)
- launcher = subg2.readEntry('plugin')
- if str(launcher).find('launcher') >= 0:
- self.__class__.screenSettings["selectedMenu"] = subg2.readEntry('plugin')
-
- # set menu preview to default menu
- # if default menu could not found, default to kickoff
- if not self.__class__.screenSettings.has_key("selectedMenu"):
- self.__class__.screenSettings["selectedMenu"] = "launcher"
-
- self.ui.pictureMenuStyles.setPixmap(self.menuNames[str(self.__class__.screenSettings["selectedMenu"])]["image"])
- self.ui.labelMenuDescription.setText(self.menuNames[str(self.__class__.screenSettings["selectedMenu"])]["description"].toString())
- self.ui.menuStyles.setCurrentIndex(self.menuNames[str(self.__class__.screenSettings["selectedMenu"])]["menuIndex"])
-
- self.ui.menuStyles.connect(self.ui.menuStyles, SIGNAL("activated(const QString &)"), self.setMenuStyle)
-
- def setMenuStyle(self, enee):
- self.__class__.screenSettings["hasChanged"] = True
- currentIndex = self.ui.menuStyles.currentIndex()
-
- if currentIndex == 0:
- self.__class__.screenSettings["selectedMenu"] = 'launcher'
-
- self.ui.pictureMenuStyles.setPixmap(self.menuNames["launcher"]["image"])
- self.ui.labelMenuDescription.setText(self.menuNames["launcher"]["description"].toString())
- elif currentIndex == 1:
- self.__class__.screenSettings["selectedMenu"] = 'simplelauncher'
-
- self.ui.pictureMenuStyles.setPixmap(self.menuNames["simplelauncher"]["image"])
- self.ui.labelMenuDescription.setText(self.menuNames["simplelauncher"]["description"].toString())
-
- else:
- self.__class__.screenSettings["selectedMenu"] = 'lancelot_launcher'
-
- self.ui.pictureMenuStyles.setPixmap(self.menuNames["lancelot_launcher"]["image"])
- self.ui.labelMenuDescription.setText(self.menuNames["lancelot_launcher"]["description"].toString())
-
- def shown(self):
- pass
-
- def execute(self):
- self.__class__.screenSettings["summaryMessage"] = self.menuNames[str(self.__class__.screenSettings["selectedMenu"])]["summaryMessage"]
- return True
-
-
View
150 kaptan/build/kaptan/screens/scrMouse.py
@@ -1,150 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-from PyQt4 import QtGui
-from PyQt4.QtCore import *
-from PyKDE4.kdecore import ki18n, KConfig
-from PyKDE4.kdeui import KGlobalSettings
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrMouse import Ui_mouseWidget
-
-from Xlib import display
-RIGHT_HANDED, LEFT_HANDED = range(2)
-
-class Widget(QtGui.QWidget, Screen):
- screenSettings = {}
- screenSettings["hasChanged"] = False
-
- # title and description at the top of the dialog window
- title = ki18n("Mouse")
- desc = ki18n("Setup Mouse Behavior")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_mouseWidget()
- self.ui.setupUi(self)
-
- # Our default click behaviour is double click. So make SingleClick = false (kdeglobals)
- self.clickBehaviour = "False"
-
- # read default settings
-
- try:
- config = KConfig("kcminputrc")
- group = config.group("Mouse")
- self.__class__.screenSettings["selectedMouse"] = group.readEntry("MouseButtonMapping")
-
- config = KConfig("kdeglobals")
- group = config.group("KDE")
- self.__class__.screenSettings["selectedBehaviour"] = str(group.readEntry("SingleClick"))
-
- self.ui.singleClick.setChecked(self.str2bool(self.__class__.screenSettings["selectedBehaviour"]))
- self.clickBehaviour = self.str2bool(self.__class__.screenSettings["selectedBehaviour"])
-
- if self.__class__.screenSettings["selectedMouse"] == "LeftHanded":
- self.ui.radioButtonLeftHand.setChecked(True)
-
- except:
- pass
-
- # set signals
- self.connect(self.ui.radioButtonRightHand, SIGNAL("toggled(bool)"), self.setHandedness)
- self.connect(self.ui.checkReverse, SIGNAL("toggled(bool)"), self.setHandedness)
-
- def str2bool(self, s):
- return bool(eval(s.capitalize()))
-
- def on_singleClick_clicked(self):
- if self.ui.singleClick.isChecked():
- self.clickBehaviour = "True"
- else:
- self.clickBehaviour = "False"
-
- def getMouseMap(self):
- self.mapMouse = {}
-
- if self.ui.radioButtonRightHand.isChecked():
- self.handed = RIGHT_HANDED
-
- else:
- self.handed = LEFT_HANDED
-
- self.mapMouse = display.Display().get_pointer_mapping()
- self.num_buttons = len(self.mapMouse)
-
- def setHandedness(self, item):
- self.getMouseMap()
-
- # mouse has 1 button
- if self.num_buttons == 1:
- self.mapMouse[0] = 1
-
- # mouse has 2 buttons
- elif self.num_buttons == 2:
- if self.handed == RIGHT_HANDED:
- self.mapMouse[0], self.mapMouse[1] = 1, 3
- else:
- self.mapMouse[0], self.mapMouse[1] = 3, 1
-
- # mouse has 3 or more buttons
- else:
- if self.handed == RIGHT_HANDED:
- self.mapMouse[0], self.mapMouse[2] = 1, 3
- else:
- self.mapMouse[0], self.mapMouse[2] = 3, 1
-
- if self.num_buttons >= 5:
- # get wheel position
- for pos in range(0, self.num_buttons):
- if self.mapMouse[pos] in (4,5): break
-
- if pos < self.num_buttons -1:
- if self.ui.checkReverse.isChecked():
- self.mapMouse[pos], self.mapMouse[pos + 1] = 5, 4
- else:
- self.mapMouse[pos], self.mapMouse[pos + 1] = 4, 5
-
- display.Display().set_pointer_mapping(self.mapMouse)
-
- config = KConfig("kcminputrc")
- group = config.group("Mouse")
-
- if self.handed == RIGHT_HANDED:
- group.writeEntry("MouseButtonMapping", QString("RightHanded"))
- self.__class__.screenSettings["selectedMouse"] = "RightHanded"
- else:
- group.writeEntry("MouseButtonMapping", QString("LeftHanded"))
- self.__class__.screenSettings["selectedMouse"] = "LeftHanded"
-
- group.writeEntry("ReverseScrollPolarity", QString(str(self.ui.checkReverse.isChecked())))
- config.sync()
-
- KGlobalSettings.self().emitChange(KGlobalSettings.SettingsChanged, KGlobalSettings.SETTINGS_MOUSE)
-
- def shown(self):
- pass
-
- def execute(self):
- self.__class__.screenSettings["summaryMessage"] ={}
-
- self.__class__.screenSettings["summaryMessage"].update({"selectedMouse": ki18n("Left Handed") if self.__class__.screenSettings["selectedMouse"] == "LeftHanded" else ki18n("Right Handed")})
- self.__class__.screenSettings["summaryMessage"].update({"clickBehaviour": ki18n("Single Click ") if self.clickBehaviour == "True" else ki18n("Double Click")})
-
- config = KConfig("kdeglobals")
- group = config.group("KDE")
- group.writeEntry("SingleClick", QString(self.clickBehaviour))
- config.sync()
- KGlobalSettings.self().emitChange(KGlobalSettings.SettingsChanged, KGlobalSettings.SETTINGS_MOUSE)
-
- return True
-
View
98 kaptan/build/kaptan/screens/scrPackage.py
@@ -1,98 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-from PyQt4 import QtGui
-from PyQt4.QtCore import *
-
-from PyKDE4.kdecore import ki18n, KConfig, KProcess
-
-from PyKDE4 import kdeui
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrPackage import Ui_packageWidget
-
-import subprocess
-
-isUpdateOn = False
-
-class Widget(QtGui.QWidget, Screen):
- title = ki18n("Packages")
- desc = ki18n("Install / Remove Programs")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_packageWidget()
- self.ui.setupUi(self)
-
- # set initial checkbox visibility
- self.ui.checkUpdate.setVisible(False)
- self.ui.updateInterval.setVisible(False)
-
- # set signals
- self.ui.showTray.connect(self.ui.showTray, SIGNAL("toggled(bool)"), self.enableCheckTime)
- self.ui.checkUpdate.connect(self.ui.checkUpdate, SIGNAL("toggled(bool)"), self.updateSelected)
-
- def enableCheckTime(self):
- if self.ui.showTray.isChecked():
- self.ui.checkUpdate.setVisible(True)
- self.ui.updateInterval.setVisible(True)
- else:
- self.ui.checkUpdate.setChecked(False)
- self.ui.checkUpdate.setVisible(False)
- self.ui.checkUpdate.setCheckState(Qt.Unchecked)
- self.ui.updateInterval.setVisible(False)
-
- def updateSelected(self):
- if self.ui.checkUpdate.isChecked():
- self.ui.updateInterval.setEnabled(True)
- else:
- self.ui.updateInterval.setEnabled(False)
-
- def applySettings(self):
- # write selected configurations to future package-managerrc
- config = PMConfig()
- config.setSystemTray(self.ui.showTray.isChecked())
- config.setUpdateCheck(self.ui.checkUpdate.isChecked())
- config.setUpdateCheckInterval(self.ui.updateInterval.value())
-
- if self.ui.showTray.isChecked():
- p = subprocess.Popen(["package-manager"], stdout=subprocess.PIPE)
-
- def shown(self):
- pass
-
- def execute(self):
- self.applySettings()
- return True
-
-class Config:
- def __init__(self, config):
- self.config = KConfig(config)
- self.group = None
-
- def setValue(self, option, value):
- self.group = self.config.group("General")
- self.group.writeEntry(option, QVariant(value))
- self.config.sync()
-
-class PMConfig(Config):
- def __init__(self):
- Config.__init__(self, "package-managerrc")
-
- def setSystemTray(self, enabled):
- self.setValue("SystemTray", enabled)
-
- def setUpdateCheck(self, enabled):
- self.setValue("UpdateCheck", enabled)
-
- def setUpdateCheckInterval(self, value):
- self.setValue("UpdateCheckInterval", value)
View
152 kaptan/build/kaptan/screens/scrSmolt.py
@@ -1,152 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-import sys
-import pardus.netutils
-
-from PyQt4 import QtGui
-from PyQt4 import QtCore
-
-from PyKDE4 import kdecore
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrSmolt import Ui_smoltWidget
-
-sys.path.append('/usr/share/smolt/client')
-
-import smolt
-
-class Widget(QtGui.QWidget, Screen):
- screenSettings = {}
- screenSettings["profileSend"] = False
-
- title = kdecore.ki18n("Smolt")
- desc = kdecore.ki18n("Help Pardus Improve!")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_smoltWidget()
- self.ui.setupUi(self)
-
- self.actions()
-
- self.profile = smolt.Hardware()
-
- self.setTableWidget()
- self.fillTableWidget()
-
- def fillTableWidget(self):
- ''' Fill the host information '''
-
- row = 0
- labels = self.getLabels()
-
- for label, value in self.profile.hostIter():
- self.ui.tableWidget.insertRow(row)
-
- labelItem = QtGui.QTableWidgetItem(labels[row])
- self.setRowColor(self.ui.tableWidget, labelItem)
- self.ui.tableWidget.setItem(row, 0, labelItem)
-
- dataItem = QtGui.QTableWidgetItem(str(value))
- self.setRowColor(self.ui.tableWidget, dataItem)
- self.ui.tableWidget.setItem(row, 1, dataItem)
-
- row = row + 1
-
- def setTableWidget(self):
- ''' Specify the tableWidget properties '''
-
- colLabel = kdecore.ki18n("Label").toString()
- colData = kdecore.ki18n("Data").toString()
- item = QtGui.QTableWidgetItem(colLabel)
- self.ui.tableWidget.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem(colData)
- self.ui.tableWidget.setHorizontalHeaderItem(1, item)
-
- #self.ui.tableWidget.setHorizontalHeaderLabels(labels)
- self.ui.tableWidget.horizontalHeader().setResizeMode(0, QtGui.QHeaderView.ResizeToContents)
- self.ui.tableWidget.horizontalHeader().setResizeMode(1, QtGui.QHeaderView.Stretch)
-
- self.ui.tableWidget.verticalHeader().hide()
- self.ui.tableWidget.setShowGrid(False)
- self.ui.tableWidget.setSortingEnabled(False)
- self.ui.tableWidget.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.ui.tableWidget.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
- self.ui.tableWidget.horizontalHeader().setCascadingSectionResizes(True)
-
- def actions(self):
- QtCore.QObject.connect(self.ui.privacyButton, QtCore.SIGNAL("clicked()"), self.changePage)
- QtCore.QObject.connect(self.ui.checkBox, QtCore.SIGNAL("stateChanged(int)"), self.activateSend)
-
- def activateSend(self, state):
- if state:
- self.__class__.screenSettings["profileSend"] = True
- else:
- self.__class__.screenSettings["profileSend"] = False
-
- def setRowColor(self, widget, tableItem):
- ''' Set row background to two colors consecutively like KTableWidget does '''
-
- if widget.rowCount() % 2 == 0:
- tableItem.setBackgroundColor(QtGui.QColor('#e1e1e1')) #Light gray
- else:
- tableItem.setBackgroundColor(QtGui.QColor('#ffffff')) # White
-
- def changePage(self):
-
- if self.ui.stackedWidget.currentIndex() == 0:
- self.ui.stackedWidget.setCurrentIndex(1)
- self.ui.privacyButton.setText(kdecore.i18n("&Host Information"))
- else:
- self.ui.stackedWidget.setCurrentIndex(0)
- self.ui.privacyButton.setText(kdecore.i18n("&Privacy policy"))
-
- def getLabels(self):
- self.sendable_host_labels = [ kdecore.i18n("UUID"),
- kdecore.i18n("OS"),
- kdecore.i18n("Default Run Level"),
- kdecore.i18n("Language"),
- kdecore.i18n("Platform"),
- kdecore.i18n("BogoMIPS"),
- kdecore.i18n("CPU Vendor"),
- kdecore.i18n("CPU Model"),
- kdecore.i18n("CPU Stepping"),
- kdecore.i18n("CPU Family"),
- kdecore.i18n("CPU Model Num"),
- kdecore.i18n("Number of CPUs"),
- kdecore.i18n("CPU Speed"),
- kdecore.i18n("System Memory"),
- kdecore.i18n("System Swap"),
- kdecore.i18n("Vendor"),
- kdecore.i18n("System"),
- kdecore.i18n("Form Factor"),
- kdecore.i18n("Kernel"),
- kdecore.i18n("SELinux Enabled"),
- kdecore.i18n("SELinux Policy"),
- kdecore.i18n("SELinux Enforce") ]
-
- return self.sendable_host_labels
-
- def disableSend(self):
- if pardus.netutils.waitNet(3):
- self.ui.checkBox.setEnabled(True)
-
- def shown(self):
- self.disableSend()
-
- def execute(self):
- if self.__class__.screenSettings["profileSend"]:
- self.__class__.screenSettings["summaryMessage"] = kdecore.i18n("Yes")
- else:
- self.__class__.screenSettings["summaryMessage"] = kdecore.i18n("No")
-
- return True
View
176 kaptan/build/kaptan/screens/scrStyle.py
@@ -1,176 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-from PyQt4 import QtGui
-from PyQt4.QtCore import *
-from PyKDE4.kdecore import ki18n, KStandardDirs, KGlobal, KConfig
-from PyKDE4 import kdeui
-
-import os, sys, Image, dbus, glob
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrStyle import Ui_styleWidget
-from kaptan.screens.styleItem import StyleItemWidget
-
-from kaptan.tools.desktop_parser import DesktopParser
-from ConfigParser import ConfigParser
-
-class Widget(QtGui.QWidget, Screen):
- screenSettings = {}
- screenSettings["hasChanged"] = False
- screenSettings["iconChanged"] = False
- screenSettings["iconTheme"] = ""
- screenSettings["styleChanged"] = False
- screenSettings["hasChangedDesktopType"] = False
- screenSettings["hasChangedDesktopNumber"] = False
-
- # Set title and description for the information widget
- title = ki18n("Themes")
- desc = ki18n("Customize Your Desktop")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_styleWidget()
- self.ui.setupUi(self)
-
- self.styleDetails = {}
- self.catLang = KGlobal.locale().language()
-
- config = KConfig("kwinrc")
- group = config.group("Desktops")
- defaultDesktopNumber = int(group.readEntry('Number'))
-
- self.ui.spinBoxDesktopNumbers.setValue(defaultDesktopNumber)
- lst2 = glob.glob1("/usr/share/kde4/apps/kaptan/kaptan/kde-themes", "*.style")
-
- for desktopFiles in lst2:
- parser = DesktopParser()
- parser.read("/usr/share/kde4/apps/kaptan/kaptan/kde-themes/" +str(desktopFiles))
- try:
- styleName = unicode(parser.get_locale('Style', 'name[%s]'%self.catLang, ''))
- except:
- styleName = unicode(parser.get_locale('Style', 'name', ''))
- try:
- styleDesc = unicode(parser.get_locale('Style', 'description[%s]'%self.catLang, ''))
- except:
- styleDesc = unicode(parser.get_locale('Style', 'description', ''))
- try:
- # TODO find a fallback values for these & handle exceptions seperately.
- #styleApplet = parser.get_locale('Style', 'applets', '')
- panelPosition = parser.get_locale('Style', 'panelPosition', '')
- #styleColorScheme = parser.get_locale('Style', 'colorScheme', '')
- widgetStyle = unicode(parser.get_locale('Style', 'widgetStyle', ''))
- desktopTheme = unicode(parser.get_locale('Style', 'desktopTheme', ''))
- colorScheme = unicode(parser.get_locale('Style', 'colorScheme', ''))
-
- self.iconTheme = unicode(self.ui.listIcon.selectedItems()[0].text())
- self.iconTheme = str(self.iconTheme.split()[0]).lower()
- self.__class__.screenSettings["iconTheme"] = self.iconTheme
-
- windowDecoration = unicode(parser.get_locale('Style', 'windowDecoration', ''))
- styleThumb = unicode(os.path.join("/usr/share/kde4/apps/kaptan/kaptan/kde-themes/", parser.get_locale('Style', 'thumbnail','')))
-
- colorDict = {}
- colorDir = "/usr/share/kde4/apps/color-schemes/"
- self.Config = ConfigParser()
- self.Config.optionxform = str
- color = colorDir + colorScheme + ".colors"
- if not os.path.exists(color):
- color = colorDir + "Oxygen.colors"
-
- self.Config.read(color)
- #colorConfig= KConfig("kdeglobals")
- for i in self.Config.sections():
- #colorGroup = colorConfig.group(str(i))
- colorDict[i] = {}
- for key, value in self.ConfigSectionMap(i).items():
- colorDict[i][key] = value
- #colorGroup.writeEntry(str(key), str(value))
-
- self.styleDetails[styleName] = {
- "description": styleDesc,
- "widgetStyle": widgetStyle,
- "colorScheme": colorDict,
- "desktopTheme": desktopTheme,
- "iconTheme": self.iconTheme,
- "windowDecoration": windowDecoration,
- "panelPosition": panelPosition
- }
-
- item = QtGui.QListWidgetItem(self.ui.listStyles)
- widget = StyleItemWidget(unicode(styleName), unicode(styleDesc), styleThumb, self.ui.listStyles)
- self.ui.listStyles.setItemWidget(item, widget)
- item.setSizeHint(QSize(120,170))
- item.setStatusTip(styleName)
- except:
- print "Warning! Invalid syntax in ", desktopFiles
-
- self.ui.listStyles.connect(self.ui.listStyles, SIGNAL("itemSelectionChanged()"), self.setStyle)
- self.ui.listIcon.connect(self.ui.listIcon, SIGNAL("itemClicked(QListWidgetItem *)"), self.setIcon)
- self.ui.comboBoxDesktopType.connect(self.ui.comboBoxDesktopType, SIGNAL("activated(const QString &)"), self.setDesktopType)
- self.ui.spinBoxDesktopNumbers.connect(self.ui.spinBoxDesktopNumbers, SIGNAL("valueChanged(const QString &)"), self.addDesktop)
- #self.ui.previewButton.connect(self.ui.previewButton, SIGNAL("clicked()"), self.previewStyle)
-
- def ConfigSectionMap(self,section):
- dict1 = {}
- options = self.Config.options(section)
- for option in options:
- try:
- dict1[option] = self.Config.get(section, option)
- if dict1[option] == -1:
- DebugPrint("skip: %s" % option)
- except:
- print("exception on %s!" % option)
- dict1[option] = None
- return dict1
-
- def addDesktop(self, numberOfDesktop):
- self.__class__.screenSettings["hasChangedDesktopNumber"] = True
- self.__class__.screenSettings["desktopNumber"] = str(numberOfDesktop)
-
- def setDesktopType(self):
- currentIndex = self.ui.comboBoxDesktopType.currentIndex()
- if currentIndex == 0:
- self.selectedType = 'desktop'
- else:
- self.selectedType = 'folderview'
-
- self.__class__.screenSettings["hasChangedDesktopType"] = True
- self.__class__.screenSettings["desktopType"] = self.selectedType
-
- def setStyle(self):
- styleName = str(self.ui.listStyles.currentItem().statusTip())
- self.__class__.screenSettings["summaryMessage"] = unicode(styleName)
- self.__class__.screenSettings["hasChanged"] = True
- self.__class__.screenSettings["styleChanged"] = True
-
- self.__class__.screenSettings["styleDetails"] = self.styleDetails
- self.__class__.screenSettings["styleName"] = styleName
-
- def setIcon(self):
- print "icon item pressed"
- self.__class__.screenSettings["hasChanged"] = True
- self.iconTheme = unicode(self.ui.listIcon.selectedItems()[0].text())
- self.iconTheme = str(self.iconTheme.split()[0]).lower()
-
- self.__class__.screenSettings["iconTheme"] = self.iconTheme
- self.__class__.screenSettings["summaryMessage"] = unicode(self.iconTheme)
- self.__class__.screenSettings["iconChanged"] = True
-
-
- def shown(self):
- pass
-
- def execute(self):
- return True
-
-
View
328 kaptan/build/kaptan/screens/scrSummary.py
@@ -1,328 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2005-2009, TUBITAK/UEKAE
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# Please read the COPYING file.
-#
-
-from PyQt4 import QtGui
-from PyQt4.QtCore import *
-from PyQt4.QtGui import QMessageBox
-from PyKDE4.kdecore import ki18n, KConfig
-
-import subprocess,os, dbus
-
-from kaptan.screen import Screen
-from kaptan.screens.ui_scrSummary import Ui_summaryWidget
-from PyKDE4 import kdeui
-
-# import other widgets to get the latest configuration
-import kaptan.screens.scrWallpaper as wallpaperWidget
-import kaptan.screens.scrMouse as mouseWidget
-import kaptan.screens.scrStyle as styleWidget
-import kaptan.screens.scrMenu as menuWidget
-import kaptan.screens.scrSmolt as smoltWidget
-import kaptan.screens.scrAvatar as avatarWidget
-
-from kaptan.tools import tools
-
-class Widget(QtGui.QWidget, Screen):
- title = ki18n("Summary")
- desc = ki18n("Save Your Settings")
-
- def __init__(self, *args):
- QtGui.QWidget.__init__(self,None)
- self.ui = Ui_summaryWidget()
- self.ui.setupUi(self)
-
- def shown(self):
- self.wallpaperSettings = wallpaperWidget.Widget.screenSettings
- self.mouseSettings = mouseWidget.Widget.screenSettings
- self.menuSettings = menuWidget.Widget.screenSettings
- self.styleSettings = styleWidget.Widget.screenSettings
- self.smoltSettings = smoltWidget.Widget.screenSettings
- self.avatarSettings = avatarWidget.Widget.screenSettings
-
- subject = "<p><li><b>%s</b></li><ul>"
- item = "<li>%s</li>"
- end = "</ul></p>"
- content = QString("")
-
- content.append("""<html><body><ul>""")
-
- # Mouse Settings
- content.append(subject % ki18n("Mouse Settings").toString())
-
- content.append(item % ki18n("Selected Mouse configuration: <b>%s</b>").toString() % self.mouseSettings["summaryMessage"]["selectedMouse"].toString())
- content.append(item % ki18n("Selected clicking behaviour: <b>%s</b>").toString() % self.mouseSettings["summaryMessage"]["clickBehaviour"].toString())
- content.append(end)
-
- # Menu Settings
- content.append(subject % ki18n("Menu Settings").toString())
- content.append(item % ki18n("Selected Menu: <b>%s</b>").toString() % self.menuSettings["summaryMessage"].toString())
- content.append(end)
-
- # Wallpaper Settings
- content.append(subject % ki18n("Wallpaper Settings").toString())
- if not self.wallpaperSettings["hasChanged"]:
- content.append(item % ki18n("You haven't selected any wallpaper.").toString())
- else:
- content.append(item % ki18n("Selected Wallpaper: <b>%s</b>").toString() % os.path.basename(str(self.wallpaperSettings["selectedWallpaper"])))
- content.append(end)
-
- # Style Settings
- content.append(subject % ki18n("Style Settings").toString())
-
- if not self.styleSettings["hasChanged"]:
- content.append(item % ki18n("You haven't selected any style.").toString())
- else:
- content.append(item % ki18n("Selected Style: <b>%s</b>").toString() % unicode(self.styleSettings["summaryMessage"]))
-
- content.append(end)
-
- # Smolt Settings
- try:
- if self.smoltSettings["summaryMessage"]:
- content.append(subject %ki18n("Smolt Settings").toString())
- content.append(item % ki18n("Send my profile: <b>%s</b>").toString() % self.smoltSettings["summaryMessage"])
- #content.append(ki18n("(<i><u>Warning:</u> Sending profile requires to set up communication with Smolt server and can take between 30 seconds to a minute. Kaptan may freeze during this time.</i>)").toString())
- content.append(end)
- except:
- print "WARNING: Your Smolt profile is already sent."
-
- content.append("""</ul></body></html>""")
- self.ui.textSummary.setHtml(content)
-
- def killPlasma(self):
- try:
- p = subprocess.Popen(["pidof", "-s", "plasma-desktop"], stdout=subprocess.PIPE)
- out, err = p.communicate()
- pidOfPlasma = int(out)
-
- try:
- os.kill(pidOfPlasma, 15)
- except OSError, e:
- print 'WARNING: failed os.kill: %s' % e
- print "Trying SIGKILL"
- os.kill(pidOfPlasma, 9)
-
- finally:
- self.startPlasma()
- except:
- QMessageBox.critical(self, ki18n("Error").toString(), ki18n("Cannot restart plasma-desktop. Kaptan will now shutdown.").toString())
- from PyKDE4 import kdeui
- kdeui.KApplication.kApplication().quit()
-
- def startPlasma(self):
- p = subprocess.Popen(["plasma-desktop"], stdout=subprocess.PIPE)
-
-
- def execute(self):
- hasChanged = False
-
- # Wallpaper Settings
- if self.wallpaperSettings["hasChanged"]:
- hasChanged = True
- if self.wallpaperSettings["selectedWallpaper"]:
- config = KConfig("plasma-desktop-appletsrc")
- group = config.group("Containments")
- for each in list(group.groupList()):