-rw-r--r-- | core/settings/launcher/.cvsignore | 2 | ||||
-rw-r--r-- | core/settings/launcher/taskbarsettings.cpp | 23 | ||||
-rw-r--r-- | noncore/settings/sshkeys/.cvsignore | 4 |
3 files changed, 18 insertions, 11 deletions
diff --git a/core/settings/launcher/.cvsignore b/core/settings/launcher/.cvsignore new file mode 100644 index 0000000..034a627 --- a/dev/null +++ b/core/settings/launcher/.cvsignore | |||
@@ -0,0 +1,2 @@ | |||
1 | Makefile* | ||
2 | moc_* \ No newline at end of file | ||
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index 8f16951..7df9a68 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp | |||
@@ -1,169 +1,170 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of the Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "taskbarsettings.h" | 21 | #include "taskbarsettings.h" |
22 | 22 | ||
23 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
24 | #include <qpe/qlibrary.h> | 24 | #include <qpe/qlibrary.h> |
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/taskbarappletinterface.h> | 26 | #include <qpe/taskbarappletinterface.h> |
27 | #include <qpe/qcopenvelope_qws.h> | 27 | #include <qpe/qcopenvelope_qws.h> |
28 | 28 | ||
29 | #include <qdir.h> | 29 | #include <qdir.h> |
30 | #include <qlistview.h> | 30 | #include <qlistview.h> |
31 | #include <qcheckbox.h> | 31 | #include <qcheckbox.h> |
32 | #include <qheader.h> | 32 | #include <qheader.h> |
33 | #include <qlayout.h> | 33 | #include <qlayout.h> |
34 | #include <qlabel.h> | 34 | #include <qlabel.h> |
35 | #include <qwhatsthis.h> | 35 | #include <qwhatsthis.h> |
36 | 36 | ||
37 | #include <stdlib.h> | 37 | #include <stdlib.h> |
38 | 38 | ||
39 | 39 | ||
40 | TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) | 40 | TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) |
41 | : QWidget ( parent, name ) | 41 | : QWidget ( parent, name ) |
42 | { | 42 | { |
43 | m_applets_changed = false; | 43 | m_applets_changed = false; |
44 | 44 | ||
45 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 45 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
46 | 46 | ||
47 | QLabel *l = new QLabel ( tr( "Load applets:" ), this ); | 47 | QLabel *l = new QLabel ( tr( "Load applets:" ), this ); |
48 | lay-> addWidget ( l ); | 48 | lay-> addWidget ( l ); |
49 | 49 | ||
50 | m_list = new QListView ( this ); | 50 | m_list = new QListView ( this ); |
51 | m_list-> addColumn ( "foobar" ); | 51 | m_list-> addColumn ( "foobar" ); |
52 | m_list-> header ( )-> hide ( ); | 52 | m_list-> header ( )-> hide ( ); |
53 | 53 | ||
54 | lay-> addWidget ( m_list ); | 54 | lay-> addWidget ( m_list ); |
55 | 55 | ||
56 | m_omenu = new QCheckBox ( tr( "Show O-Menu" ), this ); | 56 | m_omenu = new QCheckBox ( tr( "Show O-Menu" ), this ); |
57 | lay-> addWidget ( m_omenu ); | 57 | lay-> addWidget ( m_omenu ); |
58 | 58 | ||
59 | m_omenu_tabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); | 59 | m_omenu_tabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); |
60 | lay-> addWidget ( m_omenu_tabs ); | 60 | lay-> addWidget ( m_omenu_tabs ); |
61 | 61 | ||
62 | QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); | 62 | QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); |
63 | QWhatsThis::add( m_omenu_tabs, tr( "Adds the contents of the Launcher as menus in the O-Menu." )); | 63 | QWhatsThis::add( m_omenu_tabs, tr( "Adds the contents of the Launcher as menus in the O-Menu." )); |
64 | QWhatsThis::add( m_omenu, tr( "Check if you want the O-Menu in the taskbar." )); | 64 | QWhatsThis::add( m_omenu, tr( "Check if you want the O-Menu in the taskbar." )); |
65 | 65 | ||
66 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); | 66 | connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); |
67 | connect ( m_omenu, SIGNAL( toggled ( bool )), m_omenu_tabs, SLOT( setEnabled ( bool ))); | 67 | connect ( m_omenu, SIGNAL( toggled ( bool )), m_omenu_tabs, SLOT( setEnabled ( bool ))); |
68 | 68 | ||
69 | // This option does not make sense ! (sandman) | 69 | // This option does not make sense ! (sandman) |
70 | m_omenu_tabs-> hide ( ); | 70 | m_omenu_tabs-> hide ( ); |
71 | 71 | ||
72 | init ( ); | 72 | init ( ); |
73 | } | 73 | } |
74 | 74 | ||
75 | void TaskbarSettings::init ( ) | 75 | void TaskbarSettings::init ( ) |
76 | { | 76 | { |
77 | Config cfg ( "Taskbar" ); | 77 | Config cfg ( "Taskbar" ); |
78 | cfg. setGroup ( "Applets" ); | 78 | cfg. setGroup ( "Applets" ); |
79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); | 79 | QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); |
80 | 80 | ||
81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 81 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
82 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 82 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
83 | 83 | ||
84 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 84 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
85 | QString name; | 85 | QString name; |
86 | QPixmap icon; | 86 | QPixmap icon; |
87 | TaskbarNamedAppletInterface *iface = 0; | 87 | TaskbarNamedAppletInterface *iface = 0; |
88 | 88 | ||
89 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 89 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
90 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); | 90 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); |
91 | if ( iface ) { | 91 | if ( iface ) { |
92 | QString lang = getenv( "LANG" ); | 92 | |
93 | QTranslator *trans = new QTranslator ( qApp ); | 93 | QString lang = getenv( "LANG" ); |
94 | QString type = (*it). left ((*it). find (".")); | 94 | QTranslator *trans = new QTranslator ( qApp ); |
95 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; | 95 | QString type = (*it). left ((*it). find (".")); |
96 | if ( trans-> load ( tfn )) | 96 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; |
97 | qApp-> installTranslator ( trans ); | 97 | if ( trans-> load ( tfn )) |
98 | qApp-> installTranslator ( trans ); | ||
98 | else | 99 | else |
99 | delete trans; | 100 | delete trans; |
100 | name = iface-> name ( ); | 101 | name = iface-> name ( ); |
101 | icon = iface-> icon ( ); | 102 | icon = iface-> icon ( ); |
102 | iface-> release ( ); | 103 | iface-> release ( ); |
103 | lib-> unload ( ); | 104 | lib-> unload ( ); |
104 | } else { | 105 | } else { |
105 | delete lib; | 106 | delete lib; |
106 | name = (*it). mid ( 3 ); | 107 | name = (*it). mid ( 3 ); |
107 | int sep = name. find( ".so" ); | 108 | int sep = name. find( ".so" ); |
108 | if ( sep > 0 ) | 109 | if ( sep > 0 ) |
109 | name. truncate ( sep ); | 110 | name. truncate ( sep ); |
110 | sep = name. find ( "applet" ); | 111 | sep = name. find ( "applet" ); |
111 | if ( sep == (int) name.length ( ) - 6 ) | 112 | if ( sep == (int) name.length ( ) - 6 ) |
112 | name. truncate ( sep ); | 113 | name. truncate ( sep ); |
113 | name[0] = name[0]. upper ( ); | 114 | name[0] = name[0]. upper ( ); |
114 | } | 115 | } |
115 | QCheckListItem *item; | 116 | QCheckListItem *item; |
116 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 117 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
117 | if ( !icon. isNull ( )) | 118 | if ( !icon. isNull ( )) |
118 | item-> setPixmap ( 0, icon ); | 119 | item-> setPixmap ( 0, icon ); |
119 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 120 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
120 | m_applets [*it] = item; | 121 | m_applets [*it] = item; |
121 | } | 122 | } |
122 | 123 | ||
123 | cfg. setGroup ( "Menu" ); | 124 | cfg. setGroup ( "Menu" ); |
124 | 125 | ||
125 | m_omenu_tabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); | 126 | m_omenu_tabs-> setChecked ( cfg. readBoolEntry ( "LauncherTabs", true )); |
126 | m_omenu-> setChecked ( cfg. readBoolEntry ( "ShowMenu", true )); | 127 | m_omenu-> setChecked ( cfg. readBoolEntry ( "ShowMenu", true )); |
127 | 128 | ||
128 | m_omenu_tabs-> setEnabled ( m_omenu-> isChecked ( )); | 129 | m_omenu_tabs-> setEnabled ( m_omenu-> isChecked ( )); |
129 | } | 130 | } |
130 | 131 | ||
131 | void TaskbarSettings::appletChanged() | 132 | void TaskbarSettings::appletChanged() |
132 | { | 133 | { |
133 | m_applets_changed = true; | 134 | m_applets_changed = true; |
134 | } | 135 | } |
135 | 136 | ||
136 | void TaskbarSettings::accept ( ) | 137 | void TaskbarSettings::accept ( ) |
137 | { | 138 | { |
138 | Config cfg ( "Taskbar" ); | 139 | Config cfg ( "Taskbar" ); |
139 | cfg. setGroup ( "Applets" ); | 140 | cfg. setGroup ( "Applets" ); |
140 | if ( m_applets_changed ) { | 141 | if ( m_applets_changed ) { |
141 | QStringList exclude; | 142 | QStringList exclude; |
142 | QMap <QString, QCheckListItem *>::Iterator it; | 143 | QMap <QString, QCheckListItem *>::Iterator it; |
143 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { | 144 | for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { |
144 | if ( !(*it)-> isOn ( )) | 145 | if ( !(*it)-> isOn ( )) |
145 | exclude << it. key ( ); | 146 | exclude << it. key ( ); |
146 | } | 147 | } |
147 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); | 148 | cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); |
148 | } | 149 | } |
149 | cfg. writeEntry ( "SafeMode", false ); | 150 | cfg. writeEntry ( "SafeMode", false ); |
150 | 151 | ||
151 | cfg. setGroup ( "Menu" ); | 152 | cfg. setGroup ( "Menu" ); |
152 | 153 | ||
153 | if ( m_omenu_tabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { | 154 | if ( m_omenu_tabs-> isChecked ( ) != cfg. readBoolEntry ( "LauncherTabs", true )) { |
154 | m_applets_changed = true; | 155 | m_applets_changed = true; |
155 | cfg. writeEntry ( "LauncherTabs", m_omenu_tabs-> isChecked ( )); | 156 | cfg. writeEntry ( "LauncherTabs", m_omenu_tabs-> isChecked ( )); |
156 | } | 157 | } |
157 | 158 | ||
158 | if ( m_omenu-> isChecked ( ) != cfg. readBoolEntry ( "ShowMenu", true )) { | 159 | if ( m_omenu-> isChecked ( ) != cfg. readBoolEntry ( "ShowMenu", true )) { |
159 | m_applets_changed = true; | 160 | m_applets_changed = true; |
160 | cfg. writeEntry ( "ShowMenu", m_omenu-> isChecked ( )); | 161 | cfg. writeEntry ( "ShowMenu", m_omenu-> isChecked ( )); |
161 | } | 162 | } |
162 | cfg. write ( ); | 163 | cfg. write ( ); |
163 | 164 | ||
164 | if ( m_applets_changed ) { | 165 | if ( m_applets_changed ) { |
165 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); | 166 | QCopEnvelope ( "QPE/TaskBar", "reloadApplets()" ); |
166 | m_applets_changed = false; | 167 | m_applets_changed = false; |
167 | } | 168 | } |
168 | } | 169 | } |
169 | 170 | ||
diff --git a/noncore/settings/sshkeys/.cvsignore b/noncore/settings/sshkeys/.cvsignore new file mode 100644 index 0000000..19bace6 --- a/dev/null +++ b/noncore/settings/sshkeys/.cvsignore | |||
@@ -0,0 +1,4 @@ | |||
1 | Makefile* | ||
2 | moc_* | ||
3 | sshkeysbase.cpp | ||
4 | sshkeysbase.h \ No newline at end of file | ||