summaryrefslogtreecommitdiff
path: root/noncore/settings
authorar <ar>2005-01-21 19:56:15 (UTC)
committer ar <ar>2005-01-21 19:56:15 (UTC)
commitcd51d382be50bc021739395309e23760f1619759 (patch) (unidiff)
treee76155f772df7faea5fcf38667c6da8c916208db /noncore/settings
parentfdc37fbd908472e28735a8f0b01e3e66a43535e0 (diff)
downloadopie-cd51d382be50bc021739395309e23760f1619759.zip
opie-cd51d382be50bc021739395309e23760f1619759.tar.gz
opie-cd51d382be50bc021739395309e23760f1619759.tar.bz2
- make opie compilable against qte 2.3.10 snapshot
check QT_VERSION against 0x030000 instead of 300
Diffstat (limited to 'noncore/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp4
-rw-r--r--noncore/settings/doctab/doctab.cpp2
-rw-r--r--noncore/settings/language/language.cpp2
-rw-r--r--noncore/settings/networksettings/interfaces/module.h2
-rw-r--r--noncore/settings/networksettings/mainwindow/addconnectionimp.cpp2
-rw-r--r--noncore/settings/networksettings/mainwindow/mainwindowimp.cpp2
6 files changed, 7 insertions, 7 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index 9638686..088171c 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -18,164 +18,164 @@
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
19..}^=.=       =       ; Public License for more details. 19..}^=.=       =       ; Public License for more details.
20++=   -.     .`     .: 20++=   -.     .`     .:
21 :     =  ...= . :.=- You should have received a copy of the GNU 21 :     =  ...= . :.=- You should have received a copy of the GNU
22 -.   .:....=;==+<; General Public License along with this file; 22 -.   .:....=;==+<; General Public License along with this file;
23  -_. . .   )=.  = see the file COPYING. If not, write to the 23  -_. . .   )=.  = see the file COPYING. If not, write to the
24    --        :-=` Free Software Foundation, Inc., 24    --        :-=` Free Software Foundation, Inc.,
25 59 Temple Place - Suite 330, 25 59 Temple Place - Suite 330,
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
29 29
30#include "appearance.h" 30#include "appearance.h"
31#include "editScheme.h" 31#include "editScheme.h"
32#include "stylelistitem.h" 32#include "stylelistitem.h"
33#include "decolistitem.h" 33#include "decolistitem.h"
34#include "colorlistitem.h" 34#include "colorlistitem.h"
35#include "exceptlistitem.h" 35#include "exceptlistitem.h"
36#include "sample.h" 36#include "sample.h"
37 37
38/* OPIE */ 38/* OPIE */
39#include <opie2/odevice.h> 39#include <opie2/odevice.h>
40#include <opie2/ofiledialog.h> 40#include <opie2/ofiledialog.h>
41#include <opie2/otabwidget.h> 41#include <opie2/otabwidget.h>
42#include <opie2/odebug.h> 42#include <opie2/odebug.h>
43 43
44#include <qpe/config.h> 44#include <qpe/config.h>
45#include <qpe/global.h> 45#include <qpe/global.h>
46#include <qpe/qpeapplication.h> 46#include <qpe/qpeapplication.h>
47#include <qpe/qpemessagebox.h> 47#include <qpe/qpemessagebox.h>
48#include <qpe/qcopenvelope_qws.h> 48#include <qpe/qcopenvelope_qws.h>
49#include <qpe/qpestyle.h> 49#include <qpe/qpestyle.h>
50#include <qpe/lightstyle.h> 50#include <qpe/lightstyle.h>
51#include <qpe/styleinterface.h> 51#include <qpe/styleinterface.h>
52 52
53/* QT */ 53/* QT */
54#include <qbuttongroup.h> 54#include <qbuttongroup.h>
55#include <qcheckbox.h> 55#include <qcheckbox.h>
56#include <qcombobox.h> 56#include <qcombobox.h>
57#include <qdialog.h> 57#include <qdialog.h>
58#include <qdir.h> 58#include <qdir.h>
59#include <qlabel.h> 59#include <qlabel.h>
60#include <qlayout.h> 60#include <qlayout.h>
61#include <qlineedit.h> 61#include <qlineedit.h>
62#include <qlistbox.h> 62#include <qlistbox.h>
63#include <qmessagebox.h> 63#include <qmessagebox.h>
64#include <qpushbutton.h> 64#include <qpushbutton.h>
65#include <qradiobutton.h> 65#include <qradiobutton.h>
66#if QT_VERSION >= 300 66#if QT_VERSION >= 0x030000
67#include <qstylefactory.h> 67#include <qstylefactory.h>
68#endif 68#endif
69#include <qtoolbutton.h> 69#include <qtoolbutton.h>
70#include <qwindowsstyle.h> 70#include <qwindowsstyle.h>
71#include <qlistview.h> 71#include <qlistview.h>
72#include <qheader.h> 72#include <qheader.h>
73#include <qvbox.h> 73#include <qvbox.h>
74#include <qwhatsthis.h> 74#include <qwhatsthis.h>
75 75
76using namespace Opie; 76using namespace Opie;
77using namespace Opie::Ui; 77using namespace Opie::Ui;
78using namespace Opie::Core; 78using namespace Opie::Core;
79 79
80class DefaultWindowDecoration : public WindowDecorationInterface 80class DefaultWindowDecoration : public WindowDecorationInterface
81{ 81{
82public: 82public:
83 DefaultWindowDecoration() : ref(0) {} 83 DefaultWindowDecoration() : ref(0) {}
84 QString name() const 84 QString name() const
85 { 85 {
86 return "Default"; 86 return "Default";
87 } 87 }
88 QPixmap icon() const 88 QPixmap icon() const
89 { 89 {
90 return QPixmap(); 90 return QPixmap();
91 } 91 }
92 QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 92 QRESULT queryInterface( const QUuid &uuid, QUnknownInterface **iface )
93 { 93 {
94 *iface = 0; 94 *iface = 0;
95 if ( uuid == IID_QUnknown ) 95 if ( uuid == IID_QUnknown )
96 *iface = this; 96 *iface = this;
97 else if ( uuid == IID_WindowDecoration ) 97 else if ( uuid == IID_WindowDecoration )
98 *iface = this; 98 *iface = this;
99 99
100 if ( *iface ) 100 if ( *iface )
101 (*iface)->addRef(); 101 (*iface)->addRef();
102 return QS_OK; 102 return QS_OK;
103 } 103 }
104 Q_REFCOUNT 104 Q_REFCOUNT
105 105
106private: 106private:
107 ulong ref; 107 ulong ref;
108}; 108};
109 109
110 110
111 111
112 112
113 113
114 114
115 115
116QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg ) 116QWidget *Appearance::createStyleTab ( QWidget *parent, Config &cfg )
117{ 117{
118 QWidget* tab = new QWidget( parent, "StyleTab" ); 118 QWidget* tab = new QWidget( parent, "StyleTab" );
119 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 ); 119 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 );
120 120
121 m_style_list = new QListBox( tab, "m_style_list" ); 121 m_style_list = new QListBox( tab, "m_style_list" );
122 vertLayout->addWidget( m_style_list ); 122 vertLayout->addWidget( m_style_list );
123 QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) ); 123 QWhatsThis::add( m_style_list, tr( "Styles control the way items such as buttons and scroll bars appear in all applications.\n\nClick here to select an available style." ) );
124 124
125 m_style_settings = new QPushButton ( tr( "Settings..." ), tab ); 125 m_style_settings = new QPushButton ( tr( "Settings..." ), tab );
126 connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked())); 126 connect ( m_style_settings, SIGNAL( clicked()), this, SLOT( styleSettingsClicked()));
127 vertLayout-> addWidget ( m_style_settings ); 127 vertLayout-> addWidget ( m_style_settings );
128 QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) ); 128 QWhatsThis::add( m_style_settings, tr( "Click here to configure the currently selected style.\n\nNote: This option is not available for all styles." ) );
129 129
130 QString s = cfg. readEntry ( "Style", "Light" ); 130 QString s = cfg. readEntry ( "Style", "Light" );
131 131
132 132
133#if QT_VERSION >= 300 133#if QT_VERSION >= 0x030000
134 m_style_list->insertStringList(QStyleFactory::styles()); 134 m_style_list->insertStringList(QStyleFactory::styles());
135#else 135#else
136 m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( ))); 136 m_style_list-> insertItem ( new StyleListItem ( "Windows", new QWindowsStyle ( )));
137 m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( ))); 137 m_style_list-> insertItem ( new StyleListItem ( "Light", new LightStyle ( )));
138 m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( ))); 138 m_style_list-> insertItem ( new StyleListItem ( "QPE", new QPEStyle ( )));
139#endif 139#endif
140 140
141 { 141 {
142 QString path = QPEApplication::qpeDir ( ); 142 QString path = QPEApplication::qpeDir ( );
143 path.append( "/plugins/styles/" ); 143 path.append( "/plugins/styles/" );
144 QStringList sl = QDir ( path, "lib*.so" ). entryList ( ); 144 QStringList sl = QDir ( path, "lib*.so" ). entryList ( );
145 145
146 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it ) 146 for ( QStringList::Iterator it = sl. begin ( ); it != sl. end ( ); ++it )
147 { 147 {
148 QString libstr = path; 148 QString libstr = path;
149 libstr.append( "/" ); 149 libstr.append( "/" );
150 libstr.append( *it ); 150 libstr.append( *it );
151 QLibrary *lib = new QLibrary ( libstr ); 151 QLibrary *lib = new QLibrary ( libstr );
152 StyleInterface *iface; 152 StyleInterface *iface;
153 153
154 if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface ) 154 if (( lib-> queryInterface ( IID_Style, (QUnknownInterface **) &iface ) == QS_OK ) && iface )
155 { 155 {
156 StyleListItem *slit = new StyleListItem ( lib, iface ); 156 StyleListItem *slit = new StyleListItem ( lib, iface );
157 m_style_list-> insertItem ( slit ); 157 m_style_list-> insertItem ( slit );
158 158
159 if ( slit-> key ( ) == s ) 159 if ( slit-> key ( ) == s )
160 m_style_list-> setCurrentItem ( slit ); 160 m_style_list-> setCurrentItem ( slit );
161 } 161 }
162 else 162 else
163 delete lib; 163 delete lib;
164 } 164 }
165 } 165 }
166 166
167 m_original_style = m_style_list-> currentItem ( ); 167 m_original_style = m_style_list-> currentItem ( );
168 styleClicked ( m_original_style ); 168 styleClicked ( m_original_style );
169 169
170 connect( m_style_list, SIGNAL( highlighted(int) ), this, SLOT( styleClicked(int) ) ); 170 connect( m_style_list, SIGNAL( highlighted(int) ), this, SLOT( styleClicked(int) ) );
171 171
172 return tab; 172 return tab;
173} 173}
174 174
175QWidget *Appearance::createDecoTab ( QWidget *parent, Config &cfg ) 175QWidget *Appearance::createDecoTab ( QWidget *parent, Config &cfg )
176{ 176{
177 QWidget* tab = new QWidget( parent, "DecoTab" ); 177 QWidget* tab = new QWidget( parent, "DecoTab" );
178 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 ); 178 QVBoxLayout* vertLayout = new QVBoxLayout( tab, 3, 3 );
179 179
180 m_deco_list = new QListBox( tab, "m_deco_list" ); 180 m_deco_list = new QListBox( tab, "m_deco_list" );
181 vertLayout->addWidget( m_deco_list ); 181 vertLayout->addWidget( m_deco_list );
diff --git a/noncore/settings/doctab/doctab.cpp b/noncore/settings/doctab/doctab.cpp
index feaf538..72eda6b 100644
--- a/noncore/settings/doctab/doctab.cpp
+++ b/noncore/settings/doctab/doctab.cpp
@@ -1,94 +1,94 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of 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 "doctab.h" 21#include "doctab.h"
22 22
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/fontmanager.h> 24#include <qpe/fontmanager.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/applnk.h> 26#include <qpe/applnk.h>
27#include <qpe/qpedialog.h> 27#include <qpe/qpedialog.h>
28#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
29#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 29#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
30#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31#endif 31#endif
32 32
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qslider.h> 37#include <qslider.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qtextstream.h> 39#include <qtextstream.h>
40#include <qdatastream.h> 40#include <qdatastream.h>
41#include <qmessagebox.h> 41#include <qmessagebox.h>
42#include <qcombobox.h> 42#include <qcombobox.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <qlistbox.h> 44#include <qlistbox.h>
45#include <qdir.h> 45#include <qdir.h>
46#if QT_VERSION >= 300 46#if QT_VERSION >= 0x030000
47#include <qstylefactory.h> 47#include <qstylefactory.h>
48#endif 48#endif
49 49
50#include <stdlib.h> 50#include <stdlib.h>
51 51
52 52
53DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl ) 53DocTabSettings::DocTabSettings( QWidget* parent, const char* name, WFlags fl )
54 : DocTabSettingsBase( parent, name, TRUE, fl ) 54 : DocTabSettingsBase( parent, name, TRUE, fl )
55{ 55{
56 dl = new QPEDialogListener(this); 56 dl = new QPEDialogListener(this);
57 reset(); 57 reset();
58} 58}
59 59
60DocTabSettings::~DocTabSettings() 60DocTabSettings::~DocTabSettings()
61{} 61{}
62 62
63void DocTabSettings::accept() 63void DocTabSettings::accept()
64{ 64{
65 applyDocTab(); 65 applyDocTab();
66 QDialog::accept(); 66 QDialog::accept();
67} 67}
68 68
69void DocTabSettings::applyDocTab() 69void DocTabSettings::applyDocTab()
70{ 70{
71 Config cfg( "Launcher" ); 71 Config cfg( "Launcher" );
72 cfg.setGroup( "DocTab" ); 72 cfg.setGroup( "DocTab" );
73 cfg.writeEntry( "Enable", yes->isChecked() ); 73 cfg.writeEntry( "Enable", yes->isChecked() );
74 cfg.write(); 74 cfg.write();
75} 75}
76 76
77 77
78void DocTabSettings::reject() 78void DocTabSettings::reject()
79{ 79{
80 reset(); 80 reset();
81 QDialog::reject(); 81 QDialog::reject();
82} 82}
83 83
84void DocTabSettings::reset() 84void DocTabSettings::reset()
85{ 85{
86} 86}
87 87
88QString DocTabSettings::actualDocTab; 88QString DocTabSettings::actualDocTab;
89 89
90void DocTabSettings::done(int r) 90void DocTabSettings::done(int r)
91{ 91{
92 QDialog::done(r); 92 QDialog::done(r);
93 close(); 93 close();
94} 94}
diff --git a/noncore/settings/language/language.cpp b/noncore/settings/language/language.cpp
index 14750ac..bf90576 100644
--- a/noncore/settings/language/language.cpp
+++ b/noncore/settings/language/language.cpp
@@ -1,94 +1,94 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of 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 "settings.h" 21#include "settings.h"
22 22
23#include <qpe/global.h> 23#include <qpe/global.h>
24#include <qpe/fontmanager.h> 24#include <qpe/fontmanager.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/applnk.h> 26#include <qpe/applnk.h>
27#include <qpe/qpedialog.h> 27#include <qpe/qpedialog.h>
28#include <qpe/qpeapplication.h> 28#include <qpe/qpeapplication.h>
29#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 29#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
30#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31#endif 31#endif
32 32
33#include <qlabel.h> 33#include <qlabel.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qradiobutton.h> 35#include <qradiobutton.h>
36#include <qtabwidget.h> 36#include <qtabwidget.h>
37#include <qslider.h> 37#include <qslider.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qtextstream.h> 39#include <qtextstream.h>
40#include <qdatastream.h> 40#include <qdatastream.h>
41#include <qmessagebox.h> 41#include <qmessagebox.h>
42#include <qcombobox.h> 42#include <qcombobox.h>
43#include <qspinbox.h> 43#include <qspinbox.h>
44#include <qlistbox.h> 44#include <qlistbox.h>
45#include <qdir.h> 45#include <qdir.h>
46#if QT_VERSION >= 300 46#if QT_VERSION >= 0x030000
47#include <qstylefactory.h> 47#include <qstylefactory.h>
48#endif 48#endif
49 49
50#include <stdlib.h> 50#include <stdlib.h>
51 51
52 52
53LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl ) 53LanguageSettings::LanguageSettings( QWidget* parent, const char* name, WFlags fl )
54 : LanguageSettingsBase( parent, name, TRUE, fl ) 54 : LanguageSettingsBase( parent, name, TRUE, fl )
55{ 55{
56 if ( FontManager::hasUnicodeFont() ) 56 if ( FontManager::hasUnicodeFont() )
57 languages->setFont(FontManager::unicodeFont(FontManager::Proportional)); 57 languages->setFont(FontManager::unicodeFont(FontManager::Proportional));
58 58
59 59
60 QString tfn = QPEApplication::qpeDir() + "i18n/"; 60 QString tfn = QPEApplication::qpeDir() + "i18n/";
61 QDir langDir = tfn; 61 QDir langDir = tfn;
62 QStringList list = langDir.entryList("*", QDir::Dirs ); 62 QStringList list = langDir.entryList("*", QDir::Dirs );
63 63
64 QStringList::Iterator it; 64 QStringList::Iterator it;
65 65
66 for ( it = list.begin(); it != list.end(); ++it ) { 66 for ( it = list.begin(); it != list.end(); ++it ) {
67 QString name = (*it); 67 QString name = (*it);
68 QFileInfo desktopFile( tfn + "/" + name + "/.directory" ); 68 QFileInfo desktopFile( tfn + "/" + name + "/.directory" );
69 if ( desktopFile.exists() ) { 69 if ( desktopFile.exists() ) {
70 langAvail.append(name); 70 langAvail.append(name);
71 Config conf( desktopFile.filePath(), Config::File ); 71 Config conf( desktopFile.filePath(), Config::File );
72 QString langName = conf.readEntry( "Name" ); 72 QString langName = conf.readEntry( "Name" );
73 QString ownName = conf.readEntryDirect( "Name[" + name + "]" ); 73 QString ownName = conf.readEntryDirect( "Name[" + name + "]" );
74 if ( ownName.isEmpty() ) 74 if ( ownName.isEmpty() )
75 ownName = conf.readEntryDirect( "Name" ); 75 ownName = conf.readEntryDirect( "Name" );
76 if ( !ownName.isEmpty() && ownName != langName ) 76 if ( !ownName.isEmpty() && ownName != langName )
77 langName = langName + " [" + ownName + "]"; 77 langName = langName + " [" + ownName + "]";
78 languages->insertItem( langName ); 78 languages->insertItem( langName );
79 79
80 } 80 }
81 } 81 }
82 if ( langAvail. find ( "en" ) == -1 ) { 82 if ( langAvail. find ( "en" ) == -1 ) {
83 langAvail. prepend ( "" ); // no tr 83 langAvail. prepend ( "" ); // no tr
84 languages-> insertItem ( QString ( "English [%1] (%2)" /* no tr (!) */ ). arg ( tr ( "English" )). arg ( tr( "default" )), 0 ); 84 languages-> insertItem ( QString ( "English [%1] (%2)" /* no tr (!) */ ). arg ( tr ( "English" )). arg ( tr( "default" )), 0 );
85 } 85 }
86 86
87 dl = new QPEDialogListener(this); 87 dl = new QPEDialogListener(this);
88 reset(); 88 reset();
89} 89}
90 90
91LanguageSettings::~LanguageSettings() 91LanguageSettings::~LanguageSettings()
92{} 92{}
93 93
94void LanguageSettings::accept() 94void LanguageSettings::accept()
diff --git a/noncore/settings/networksettings/interfaces/module.h b/noncore/settings/networksettings/interfaces/module.h
index 9dc913e..13189c3 100644
--- a/noncore/settings/networksettings/interfaces/module.h
+++ b/noncore/settings/networksettings/interfaces/module.h
@@ -1,53 +1,53 @@
1#ifndef NETCONF_MODULE_H 1#ifndef NETCONF_MODULE_H
2#define NETCONF_MODULE_H 2#define NETCONF_MODULE_H
3 3
4#include <qobject.h> 4#include <qobject.h>
5#if QT_VERSION < 300 5#if QT_VERSION < 0x030000
6#include <qlist.h> 6#include <qlist.h>
7#else 7#else
8#include <qptrlist.h> 8#include <qptrlist.h>
9#endif 9#endif
10#include <qmap.h> 10#include <qmap.h>
11#include "interface.h" 11#include "interface.h"
12 12
13class QWidget; 13class QWidget;
14class QTabWidget; 14class QTabWidget;
15 15
16 16
17/** 17/**
18 * \brief The basis of all plugins 18 * \brief The basis of all plugins
19 * 19 *
20 * This is the way to extend networksettings with 20 * This is the way to extend networksettings with
21 * extra functionality. 21 * extra functionality.
22 * 22 *
23 * 23 *
24 * Networksettings in the 1.0 release does not use QCOM 24 * Networksettings in the 1.0 release does not use QCOM
25 * for activation. You need to provide the following function yourself. 25 * for activation. You need to provide the following function yourself.
26 * 26 *
27 * A module needs to provide Name, Images, and methods for 27 * A module needs to provide Name, Images, and methods for
28 * claiming interfaces. For example you can claim physicla 28 * claiming interfaces. For example you can claim physicla
29 * interfaces like wlan0, ppp0 or virtual like a VPN 29 * interfaces like wlan0, ppp0 or virtual like a VPN
30 * connection and hide the real ppp device or ethernet device 30 * connection and hide the real ppp device or ethernet device
31 * behind your VPN plugin. 31 * behind your VPN plugin.
32 * 32 *
33 * During start up. The main application searches for network devices 33 * During start up. The main application searches for network devices
34 * and then looks for an owner under the plugins for them. 34 * and then looks for an owner under the plugins for them.
35 * For example the WLAN Plugin looks if there is a WLAN Extension 35 * For example the WLAN Plugin looks if there is a WLAN Extension
36 * on that interface and then claims it by returning true from isOwner() 36 * on that interface and then claims it by returning true from isOwner()
37 * 37 *
38 * \code 38 * \code
39 * extern "C" 39 * extern "C"
40 * { 40 * {
41 * void* create_plugin() { 41 * void* create_plugin() {
42 * return new WLANModule(); 42 * return new WLANModule();
43 * } 43 * }
44 * }; 44 * };
45 * \endcode 45 * \endcode
46 * @see isOwner(Interface*) 46 * @see isOwner(Interface*)
47 */ 47 */
48class Module : private QObject{ 48class Module : private QObject{
49 49
50signals: 50signals:
51/** 51/**
52 * Emit this Signal once you change the Interface 52 * Emit this Signal once you change the Interface
53 * you're operating on 53 * you're operating on
diff --git a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
index 84f1cf6..9049af4 100644
--- a/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/addconnectionimp.cpp
@@ -1,41 +1,41 @@
1#include "addconnectionimp.h" 1#include "addconnectionimp.h"
2#include <qlistview.h> 2#include <qlistview.h>
3#if QT_VERSION < 300 3#if QT_VERSION < 0x030000
4#include <qlist.h> 4#include <qlist.h>
5#else 5#else
6#include <qptrlist.h> 6#include <qptrlist.h>
7#endif 7#endif
8#include <qlabel.h> 8#include <qlabel.h>
9#include <qheader.h> 9#include <qheader.h>
10 10
11/** 11/**
12 * Constructor 12 * Constructor
13 */ 13 */
14AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){ 14AddConnectionImp::AddConnectionImp(QWidget *parent, const char *name, WFlags f):AddConnection(parent, name, f){
15 connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed())); 15 connect(registeredServicesList, SIGNAL(selectionChanged()), this, SLOT(changed()));
16 registeredServicesList->header()->hide(); 16 registeredServicesList->header()->hide();
17}; 17};
18 18
19/** 19/**
20 * The current item changed, update the discription. 20 * The current item changed, update the discription.
21 */ 21 */
22void AddConnectionImp::changed(){ 22void AddConnectionImp::changed(){
23 QListViewItem *item = registeredServicesList->currentItem(); 23 QListViewItem *item = registeredServicesList->currentItem();
24 if(item) 24 if(item)
25 help->setText(list[item->text(0)]); 25 help->setText(list[item->text(0)]);
26} 26}
27 27
28/** 28/**
29 * Save a copy of newList for the discriptions and append them all to the view 29 * Save a copy of newList for the discriptions and append them all to the view
30 * @param newList the new list of possible interfaces 30 * @param newList the new list of possible interfaces
31 */ 31 */
32void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){ 32void AddConnectionImp::addConnections(const QMap<QString, QString> &newList){
33 list = newList; 33 list = newList;
34 QMap<QString, QString>::Iterator it; 34 QMap<QString, QString>::Iterator it;
35 for( it = list.begin(); it != list.end(); ++it ) 35 for( it = list.begin(); it != list.end(); ++it )
36 (void)new QListViewItem(registeredServicesList, it.key()); 36 (void)new QListViewItem(registeredServicesList, it.key());
37 registeredServicesList->setCurrentItem(registeredServicesList->firstChild()); 37 registeredServicesList->setCurrentItem(registeredServicesList->firstChild());
38} 38}
39 39
40// addserviceimp.cpp 40// addserviceimp.cpp
41 41
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
index 5f23aea..8feb7a5 100644
--- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp
@@ -1,76 +1,76 @@
1 1
2#include "mainwindowimp.h" 2#include "mainwindowimp.h"
3#include "addconnectionimp.h" 3#include "addconnectionimp.h"
4#include "interfaceinformationimp.h" 4#include "interfaceinformationimp.h"
5#include "interfacesetupimp.h" 5#include "interfacesetupimp.h"
6#include "interfaces.h" 6#include "interfaces.h"
7#include "module.h" 7#include "module.h"
8 8
9/* OPIE */ 9/* OPIE */
10#include <opie2/odebug.h> 10#include <opie2/odebug.h>
11#include <qpe/qcopenvelope_qws.h> 11#include <qpe/qcopenvelope_qws.h>
12#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
13#include <qpe/config.h> 13#include <qpe/config.h>
14#include <qpe/qlibrary.h> 14#include <qpe/qlibrary.h>
15#include <qpe/resource.h> 15#include <qpe/resource.h>
16 16
17/* QT */ 17/* QT */
18#include <qpushbutton.h> 18#include <qpushbutton.h>
19#include <qlistbox.h> 19#include <qlistbox.h>
20#include <qlineedit.h> 20#include <qlineedit.h>
21#include <qlistview.h> 21#include <qlistview.h>
22#include <qheader.h> 22#include <qheader.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qtabwidget.h> // in order to disable the profiles tab 24#include <qtabwidget.h> // in order to disable the profiles tab
25#include <qmessagebox.h> 25#include <qmessagebox.h>
26 26
27 27
28#if QT_VERSION < 300 28#if QT_VERSION < 0x030000
29#include <qlist.h> 29#include <qlist.h>
30#else 30#else
31#include <qptrlist.h> 31#include <qptrlist.h>
32#endif 32#endif
33#include <qdir.h> 33#include <qdir.h>
34#include <qfile.h> 34#include <qfile.h>
35#include <qtextstream.h> 35#include <qtextstream.h>
36#include <qregexp.h> 36#include <qregexp.h>
37 37
38/* STD */ 38/* STD */
39#include <net/if.h> 39#include <net/if.h>
40#include <sys/ioctl.h> 40#include <sys/ioctl.h>
41#include <sys/socket.h> 41#include <sys/socket.h>
42 42
43#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" 43#define DEFAULT_SCHEME "/var/lib/pcmcia/scheme"
44#define _PROCNETDEV "/proc/net/dev" 44#define _PROCNETDEV "/proc/net/dev"
45 45
46MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME) 46MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWindow(parent, name, Qt::WStyle_ContextHelp), advancedUserMode(true), scheme(DEFAULT_SCHEME)
47{ 47{
48 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); 48 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
49 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); 49 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
50 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); 50 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
51 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); 51 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
52 52
53 //remove tab with no function 53 //remove tab with no function
54 tabWidget->removePage( tab ); 54 tabWidget->removePage( tab );
55 55
56 // Load connections. 56 // Load connections.
57 // /usr/local/kde/lib/libinterfaces.la 57 // /usr/local/kde/lib/libinterfaces.la
58 loadModules(QPEApplication::qpeDir() + "plugins/networksettings"); 58 loadModules(QPEApplication::qpeDir() + "plugins/networksettings");
59 getAllInterfaces(); 59 getAllInterfaces();
60 60
61 Interfaces i; 61 Interfaces i;
62 QStringList list = i.getInterfaceList(); 62 QStringList list = i.getInterfaceList();
63 QMap<QString, Interface*>::Iterator it; 63 QMap<QString, Interface*>::Iterator it;
64 for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni ) 64 for ( QStringList::Iterator ni = list.begin(); ni != list.end(); ++ni )
65 { 65 {
66 /* 66 /*
67 * we skipped it in getAllInterfaces now 67 * we skipped it in getAllInterfaces now
68 * we need to ignore it as well 68 * we need to ignore it as well
69 */ 69 */
70 if (m_handledIfaces.contains( *ni) ) 70 if (m_handledIfaces.contains( *ni) )
71 { 71 {
72 odebug << "Not up iface handled by module" << oendl; 72 odebug << "Not up iface handled by module" << oendl;
73 continue; 73 continue;
74 } 74 }
75 bool found = false; 75 bool found = false;
76 for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it ) 76 for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it )