summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--apps/Applications/opie-smb.desktop6
-rw-r--r--core/applets/vmemo/vmemo.h8
-rw-r--r--core/apps/textedit/textedit.cpp58
-rw-r--r--core/pim/datebook/dateentry.ui1230
-rw-r--r--inputmethods/dasher/opie-dasher-english.control2
-rw-r--r--noncore/applets/volumeapplet2/volumeapplet.cpp58
-rw-r--r--noncore/applets/volumeapplet2/volumeapplet.h15
-rw-r--r--noncore/apps/advancedfm/advancedfmData.cpp7
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp38
-rw-r--r--noncore/net/opie-smb/config.in4
-rw-r--r--noncore/net/opie-smb/main.cpp6
-rw-r--r--noncore/net/opie-smb/opie-smb.control12
-rw-r--r--noncore/net/opie-smb/opie-smb.pro18
-rw-r--r--noncore/net/opie-smb/qsmb.cpp402
-rw-r--r--noncore/net/opie-smb/qsmb.h39
-rw-r--r--noncore/net/opie-smb/qsmbbase.cpp146
-rw-r--r--noncore/net/opie-smb/qsmbbase.h62
-rw-r--r--noncore/net/opie-smb/qsmbbase.ui298
-rw-r--r--noncore/settings/netsystemtime/formattabwidget.cpp4
-rw-r--r--noncore/tools/calc2/binary/binary.pro28
-rw-r--r--noncore/tools/calc2/binary/binaryfactory.cpp2
-rw-r--r--noncore/tools/calc2/binary/binaryfactory.h4
-rw-r--r--noncore/tools/calc2/binary/binaryimpl.cpp2
-rw-r--r--noncore/tools/calc2/binary/binaryimpl.h2
-rw-r--r--noncore/tools/calc2/calc.cpp1
-rw-r--r--noncore/tools/calc2/simple/simple.pro22
-rw-r--r--noncore/tools/calc2/simple/simplefactory.cpp2
-rw-r--r--noncore/tools/calc2/simple/simplefactory.h4
-rw-r--r--noncore/tools/calc2/simple/simpleimpl.cpp2
-rw-r--r--noncore/tools/calc2/simple/simpleimpl.h4
-rw-r--r--packages5
-rw-r--r--pics/opie-smb/opie-smb.pngbin0 -> 1833 bytes
32 files changed, 1903 insertions, 588 deletions
diff --git a/apps/Applications/opie-smb.desktop b/apps/Applications/opie-smb.desktop
new file mode 100644
index 0000000..f3fe239
--- a/dev/null
+++ b/apps/Applications/opie-smb.desktop
@@ -0,0 +1,6 @@
1[Desktop Entry]
2Comment=Samba Client Utility
3Exec=opie-smb
4Icon=opie-smb/opie-smb
5Type=Application
6Name=opie-smb
diff --git a/core/applets/vmemo/vmemo.h b/core/applets/vmemo/vmemo.h
index 1bd735f..806fe0e 100644
--- a/core/applets/vmemo/vmemo.h
+++ b/core/applets/vmemo/vmemo.h
@@ -1,65 +1,71 @@
1/**************************************************************************************94x78** 1/**************************************************************************************94x78**
2** 2**
3** This file may be distributed and/or modified under the terms of the 3** This file may be distributed and/or modified under the terms of the
4** GNU General Public License version 2 as published by the Free Software 4** GNU General Public License version 2 as published by the Free Software
5** Foundation and appearing in the file LICENSE.GPL included in the 5** Foundation and appearing in the file LICENSE.GPL included in the
6** packaging of this file. 6** packaging of this file.
7** 7**
8** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 8** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 9** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10** 10**
11*********************************************************************************************/ 11*********************************************************************************************/
12 12
13/* 13/*
14 * $Id$ 14 * $Id$
15 */ 15 */
16 16
17#ifndef __VMEMO_H__ 17#ifndef __VMEMO_H__
18#define __VMEMO_H__ 18#define __VMEMO_H__
19 19
20 20
21#include <qwidget.h> 21#include <qwidget.h>
22#include <qpixmap.h> 22#include <qpixmap.h>
23#include <qpe/applnk.h> 23#include <qpe/applnk.h>
24#include <qfile.h> 24#include <qfile.h>
25#include <qpe/qcopenvelope_qws.h> 25#include <qpe/qcopenvelope_qws.h>
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qtimer.h> 27#include <qtimer.h>
28 28
29class VMemo : public QWidget 29class VMemo : public QWidget
30{ 30{
31 Q_OBJECT 31 Q_OBJECT
32
32public: 33public:
34
33 VMemo( QWidget *parent, const char *name = NULL); 35 VMemo( QWidget *parent, const char *name = NULL);
34 ~VMemo(); 36 ~VMemo();
35 static int position(); 37 static int position();
36 QFile track; 38 QFile track;
37 int length; 39 int length;
38 QString fileName, errorMsg, date; 40 QString fileName, errorMsg, date;
39 QLabel* msgLabel; 41 QLabel* msgLabel;
40 QTimer *t_timer; 42 QTimer *t_timer;
41bool usingIcon, useADPCM; 43 bool usingIcon, useADPCM;
44
42public slots: 45public slots:
46
43 bool record(); 47 bool record();
44 void mousePressEvent( QMouseEvent * ); 48 void mousePressEvent( QMouseEvent * );
45 void mouseReleaseEvent( QMouseEvent * ); 49 void mouseReleaseEvent( QMouseEvent * );
46 void receive( const QCString &msg, const QByteArray &data ); 50 void receive( const QCString &msg, const QByteArray &data );
47 bool startRecording(); 51 bool startRecording();
48 void stopRecording(); 52 void stopRecording();
49 void timerBreak(); 53 void timerBreak();
54
50private: 55private:
56
51 bool useAlerts; 57 bool useAlerts;
52 void paintEvent( QPaintEvent* ); 58 void paintEvent( QPaintEvent* );
53 int setToggleButton(int); 59 int setToggleButton(int);
54 int openDSP(); 60 int openDSP();
55 int openWAV(const char *filename); 61 int openWAV(const char *filename);
56 bool fromToggle; 62 bool fromToggle;
57 QPixmap vmemoPixmap; 63 QPixmap vmemoPixmap;
58 QCopChannel *myChannel; 64 QCopChannel *myChannel;
59 bool systemZaurus; 65 bool systemZaurus;
60 int dsp, wav, rate, speed, channels, format, resolution; 66 int dsp, wav, rate, speed, channels, format, resolution;
61 bool recording; 67 bool recording;
62}; 68};
63 69
64#endif // __VMEMO_H__ 70#endif // __VMEMO_H__
65 71
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index ca760bb..759e440 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -1,1212 +1,1212 @@
1/********************************************************************** 1/**********************************************************************
2// textedit.cpp 2// textedit.cpp
3** Copyright (C) 2000 Trolltech AS. All rights reserved. 3** Copyright (C) 2000 Trolltech AS. All rights reserved.
4** 4**
5** This file is part of Opie Environment. 5** This file is part of Opie Environment.
6** 6**
7** This file may be distributed and/or modified under the terms of the 7** This file may be distributed and/or modified under the terms of the
8** GNU General Public License version 2 as published by the Free Software 8** GNU General Public License version 2 as published by the Free Software
9** Foundation and appearing in the file LICENSE.GPL included in the 9** Foundation and appearing in the file LICENSE.GPL included in the
10** packaging of this file. 10** packaging of this file.
11** 11**
12**********************************************************************/ 12**********************************************************************/
13// changes added by L. J. Potter Sun 02-17-2002 21:31:31 13// changes added by L. J. Potter Sun 02-17-2002 21:31:31
14 14
15#include "textedit.h" 15#include "textedit.h"
16#include "filePermissions.h" 16#include "filePermissions.h"
17 17
18/* OPIE */ 18/* OPIE */
19#include <opie2/odebug.h> 19#include <opie2/odebug.h>
20#include <opie2/ofileselector.h> 20#include <opie2/ofileselector.h>
21#include <opie2/ofiledialog.h> 21#include <opie2/ofiledialog.h>
22#include <opie2/ofontselector.h> 22#include <opie2/ofontselector.h>
23#include <opie2/oresource.h> 23#include <opie2/oresource.h>
24 24
25#include <qpe/config.h> 25#include <qpe/config.h>
26#include <qpe/qpeapplication.h> 26#include <qpe/qpeapplication.h>
27 27
28 28
29/* QT */ 29/* QT */
30#include <qmenubar.h> 30#include <qmenubar.h>
31#include <qtoolbar.h> 31#include <qtoolbar.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qclipboard.h> 33#include <qclipboard.h>
34#include <qaction.h> 34#include <qaction.h>
35#include <qlineedit.h> 35#include <qlineedit.h>
36#include <qmessagebox.h> 36#include <qmessagebox.h>
37#include <qlayout.h> 37#include <qlayout.h>
38#include <qtimer.h> 38#include <qtimer.h>
39#include <qdir.h> 39#include <qdir.h>
40 40
41/* STD */ 41/* STD */
42#include <unistd.h> 42#include <unistd.h>
43#include <sys/stat.h> 43#include <sys/stat.h>
44#include <stdlib.h> //getenv 44#include <stdlib.h> //getenv
45 45
46using namespace Opie::Core; 46using namespace Opie::Core;
47using namespace Opie::Ui; 47using namespace Opie::Ui;
48 48
49#if QT_VERSION < 0x030000 49#if QT_VERSION < 0x030000
50class QpeEditor : public QMultiLineEdit 50class QpeEditor : public QMultiLineEdit
51{ 51{
52 52
53public: 53public:
54 QpeEditor( QWidget *parent, const char * name = 0 ) 54 QpeEditor( QWidget *parent, const char * name = 0 )
55 : QMultiLineEdit( parent, name ) { 55 : QMultiLineEdit( parent, name ) {
56 clearTableFlags(); 56 clearTableFlags();
57 setTableFlags( Tbl_vScrollBar | Tbl_autoHScrollBar ); 57 setTableFlags( Tbl_vScrollBar | Tbl_autoHScrollBar );
58} 58}
59 59
60 void find( const QString &txt, bool caseSensitive, 60 void find( const QString &txt, bool caseSensitive,
61 bool backwards ); 61 bool backwards );
62protected: 62protected:
63 bool markIt; 63 bool markIt;
64 int line1, line2, col1, col2; 64 int line1, line2, col1, col2;
65 void mousePressEvent( QMouseEvent * ); 65 void mousePressEvent( QMouseEvent * );
66 void mouseReleaseEvent( QMouseEvent * ); 66 void mouseReleaseEvent( QMouseEvent * );
67 67
68//public slots: 68//public slots:
69 /* 69 /*
70signals: 70signals:
71 void notFound(); 71 void notFound();
72 void searchWrapped(); 72 void searchWrapped();
73 */ 73 */
74 74
75private: 75private:
76 76
77}; 77};
78 78
79void QpeEditor::mousePressEvent( QMouseEvent *e ) { 79void QpeEditor::mousePressEvent( QMouseEvent *e ) {
80 switch(e->button()) { 80 switch(e->button()) {
81 case RightButton: 81 case RightButton:
82 { //rediculous workaround for qt popup menu 82 { //rediculous workaround for qt popup menu
83 //and the hold right click mechanism 83 //and the hold right click mechanism
84 this->setSelection( line1, col1, line2, col2); 84 this->setSelection( line1, col1, line2, col2);
85 QMultiLineEdit::mousePressEvent( e ); 85 QMultiLineEdit::mousePressEvent( e );
86 markIt = false; 86 markIt = false;
87 } 87 }
88 break; 88 break;
89 default: 89 default:
90 { 90 {
91 if(!markIt) { 91 if(!markIt) {
92 int line, col; 92 int line, col;
93 this->getCursorPosition(&line, &col); 93 this->getCursorPosition(&line, &col);
94 line1=line2=line; 94 line1=line2=line;
95 col1=col2=col; 95 col1=col2=col;
96 } 96 }
97 QMultiLineEdit::mousePressEvent( e ); 97 QMultiLineEdit::mousePressEvent( e );
98 } 98 }
99 break; 99 break;
100 }; 100 };
101} 101}
102 102
103void QpeEditor::mouseReleaseEvent( QMouseEvent * ) { 103void QpeEditor::mouseReleaseEvent( QMouseEvent * ) {
104 if(this->hasMarkedText()) { 104 if(this->hasMarkedText()) {
105 markIt = true; 105 markIt = true;
106 this->getMarkedRegion( &line1, &col1, &line2, & col2 ); 106 this->getMarkedRegion( &line1, &col1, &line2, & col2 );
107 } else { 107 } else {
108 markIt = false; 108 markIt = false;
109 } 109 }
110} 110}
111 111
112void QpeEditor::find ( const QString &txt, bool caseSensitive, 112void QpeEditor::find ( const QString &txt, bool caseSensitive,
113 bool backwards ) 113 bool backwards )
114{ 114{
115 static bool wrap = false; 115 static bool wrap = false;
116 int line, col; 116 int line, col;
117 if ( wrap ) { 117 if ( wrap ) {
118 if ( !backwards ) 118 if ( !backwards )
119 line = col = 0; 119 line = col = 0;
120 wrap = false; 120 wrap = false;
121 // emit searchWrapped(); 121 // emit searchWrapped();
122 } else { 122 } else {
123 getCursorPosition( &line, &col ); 123 getCursorPosition( &line, &col );
124 } 124 }
125 //ignore backwards for now.... 125 //ignore backwards for now....
126 if ( !backwards ) { 126 if ( !backwards ) {
127 for ( ; ; ) { 127 for ( ; ; ) {
128 if ( line >= numLines() ) { 128 if ( line >= numLines() ) {
129 wrap = true; 129 wrap = true;
130 //emit notFound(); 130 //emit notFound();
131 break; 131 break;
132 } 132 }
133 int findCol = getString( line )->find( txt, col, caseSensitive ); 133 int findCol = getString( line )->find( txt, col, caseSensitive );
134 if ( findCol >= 0 ) { 134 if ( findCol >= 0 ) {
135 setCursorPosition( line, findCol, false ); 135 setCursorPosition( line, findCol, false );
136 col = findCol + txt.length(); 136 col = findCol + txt.length();
137 setCursorPosition( line, col, true ); 137 setCursorPosition( line, col, true );
138 138
139 //found = true; 139 //found = true;
140 break; 140 break;
141 } 141 }
142 line++; 142 line++;
143 col = 0; 143 col = 0;
144 } 144 }
145 } 145 }
146} 146}
147 147
148 148
149#else 149#else
150 150
151#error "Must make a QpeEditor that inherits QTextEdit" 151#error "Must make a QpeEditor that inherits QTextEdit"
152 152
153#endif 153#endif
154 154
155 155
156static const int nfontsizes = 6; 156static const int nfontsizes = 6;
157static const int fontsize[nfontsizes] = {8,10,12,14,18,24}; 157static const int fontsize[nfontsizes] = {8,10,12,14,18,24};
158 158
159TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) 159TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
160 : QMainWindow( parent, name, f ), bFromDocView( false ) 160 : QMainWindow( parent, name, f ), bFromDocView( false )
161{ 161{
162 doc = 0; 162 doc = 0;
163 edited=false; 163 edited=false;
164 fromSetDocument=false; 164 fromSetDocument=false;
165 165
166 setToolBarsMovable( false ); 166 setToolBarsMovable( false );
167 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 167 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
168 168
169 channel = new QCopChannel( "QPE/Application/textedit", this ); 169 channel = new QCopChannel( "QPE/Application/textedit", this );
170 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), 170 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
171 this, SLOT(receive(const QCString&,const QByteArray&)) ); 171 this, SLOT(receive(const QCString&,const QByteArray&)) );
172 172
173 setIcon( Opie::Core::OResource::loadPixmap( "textedit/TextEditor", Opie::Core::OResource::SmallIcon ) ); 173 setIcon( Opie::Core::OResource::loadPixmap( "textedit/TextEditor", Opie::Core::OResource::SmallIcon ) );
174 174
175 QToolBar *bar = new QToolBar( this ); 175 QToolBar *bar = new QToolBar( this );
176 bar->setHorizontalStretchable( true ); 176 bar->setHorizontalStretchable( true );
177 menu = bar; 177 menu = bar;
178 178
179 QMenuBar *mb = new QMenuBar( bar ); 179 QMenuBar *mb = new QMenuBar( bar );
180 QPopupMenu *file = new QPopupMenu( this ); 180 QPopupMenu *file = new QPopupMenu( this );
181 QPopupMenu *edit = new QPopupMenu( this ); 181 QPopupMenu *edit = new QPopupMenu( this );
182 QPopupMenu *advancedMenu = new QPopupMenu(this); 182 QPopupMenu *advancedMenu = new QPopupMenu(this);
183 183
184 font = new QPopupMenu( this ); 184 font = new QPopupMenu( this );
185 185
186 bar = new QToolBar( this ); 186 bar = new QToolBar( this );
187 editBar = bar; 187 editBar = bar;
188 188
189 QAction *a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), 189 QAction *a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
190 QString::null, 0, this, 0 ); 190 QString::null, 0, this, 0 );
191 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 191 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
192// a->addTo( bar ); 192// a->addTo( bar );
193 a->addTo( file ); 193 a->addTo( file );
194 194
195 a = new QAction( tr( "Open" ), Opie::Core::OResource::loadPixmap( "fileopen", Opie::Core::OResource::SmallIcon ), 195 a = new QAction( tr( "Open" ), Opie::Core::OResource::loadPixmap( "fileopen", Opie::Core::OResource::SmallIcon ),
196 QString::null, 0, this, 0 ); 196 QString::null, 0, this, 0 );
197 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); 197 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
198 a->addTo( bar ); 198 a->addTo( bar );
199 a->addTo( file ); 199 a->addTo( file );
200 200
201 a = new QAction( tr( "Save" ), Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ), 201 a = new QAction( tr( "Save" ), Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ),
202 QString::null, 0, this, 0 ); 202 QString::null, 0, this, 0 );
203 connect( a, SIGNAL( activated() ), this, SLOT( save() ) ); 203 connect( a, SIGNAL( activated() ), this, SLOT( save() ) );
204 file->insertSeparator(); 204 file->insertSeparator();
205 a->addTo( bar ); 205 a->addTo( bar );
206 a->addTo( file ); 206 a->addTo( file );
207 207
208 a = new QAction( tr( "Save As" ), Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ), 208 a = new QAction( tr( "Save As" ), Opie::Core::OResource::loadPixmap( "save", Opie::Core::OResource::SmallIcon ),
209 QString::null, 0, this, 0 ); 209 QString::null, 0, this, 0 );
210 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) ); 210 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) );
211 a->addTo( file ); 211 a->addTo( file );
212 212
213 a = new QAction( tr( "Cut" ), Opie::Core::OResource::loadPixmap( "cut", Opie::Core::OResource::SmallIcon ), 213 a = new QAction( tr( "Cut" ), Opie::Core::OResource::loadPixmap( "cut", Opie::Core::OResource::SmallIcon ),
214 QString::null, 0, this, 0 ); 214 QString::null, 0, this, 0 );
215 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); 215 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
216 a->addTo( editBar ); 216 a->addTo( editBar );
217 a->addTo( edit ); 217 a->addTo( edit );
218 218
219 a = new QAction( tr( "Copy" ), Opie::Core::OResource::loadPixmap( "copy", Opie::Core::OResource::SmallIcon ), 219 a = new QAction( tr( "Copy" ), Opie::Core::OResource::loadPixmap( "copy", Opie::Core::OResource::SmallIcon ),
220 QString::null, 0, this, 0 ); 220 QString::null, 0, this, 0 );
221 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); 221 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) );
222 a->addTo( editBar ); 222 a->addTo( editBar );
223 a->addTo( edit ); 223 a->addTo( edit );
224 224
225 a = new QAction( tr( "Paste" ), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ), 225 a = new QAction( tr( "Paste" ), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ),
226 QString::null, 0, this, 0 ); 226 QString::null, 0, this, 0 );
227 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) ); 227 connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) );
228 a->addTo( editBar ); 228 a->addTo( editBar );
229 a->addTo( edit ); 229 a->addTo( edit );
230 230
231 231
232#ifndef QT_NO_CLIPBOARD 232#ifndef QT_NO_CLIPBOARD
233 a = new QAction( tr( "Insert Time and Date" ), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ), 233 a = new QAction( tr( "Insert Time and Date" ), Opie::Core::OResource::loadPixmap( "paste", Opie::Core::OResource::SmallIcon ),
234 QString::null, 0, this, 0 ); 234 QString::null, 0, this, 0 );
235 connect( a, SIGNAL( activated() ), this, SLOT( editPasteTimeDate() ) ); 235 connect( a, SIGNAL( activated() ), this, SLOT( editPasteTimeDate() ) );
236 a->addTo( edit ); 236 a->addTo( edit );
237#endif 237#endif
238 238
239 a = new QAction( tr( "Goto Line..." ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ), 239 a = new QAction( tr( "Goto Line..." ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
240 QString::null, 0, this, 0 ); 240 QString::null, 0, this, 0 );
241 connect( a, SIGNAL( activated() ), this, SLOT( gotoLine() ) ); 241 connect( a, SIGNAL( activated() ), this, SLOT( gotoLine() ) );
242 edit->insertSeparator(); 242 edit->insertSeparator();
243 a->addTo( edit ); 243 a->addTo( edit );
244 244
245 a = new QAction( tr( "Find..." ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ), 245 a = new QAction( tr( "Find..." ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
246 QString::null, 0, this, 0 ); 246 QString::null, 0, this, 0 );
247 connect( a, SIGNAL( activated() ), this, SLOT( editFind() ) ); 247 connect( a, SIGNAL( activated() ), this, SLOT( editFind() ) );
248 a->addTo( bar ); 248 a->addTo( bar );
249 a->addTo( edit ); 249 a->addTo( edit );
250 250
251 zin = new QAction( tr("Zoom in"), QString::null, 0, this, 0 ); 251 zin = new QAction( tr("Zoom in"), QString::null, 0, this, 0 );
252 connect( zin, SIGNAL( activated() ), this, SLOT( zoomIn() ) ); 252 connect( zin, SIGNAL( activated() ), this, SLOT( zoomIn() ) );
253 zin->addTo( font ); 253 zin->addTo( font );
254 254
255 zout = new QAction( tr("Zoom out"), QString::null, 0, this, 0 ); 255 zout = new QAction( tr("Zoom out"), QString::null, 0, this, 0 );
256 connect( zout, SIGNAL( activated() ), this, SLOT( zoomOut() ) ); 256 connect( zout, SIGNAL( activated() ), this, SLOT( zoomOut() ) );
257 zout->addTo( font ); 257 zout->addTo( font );
258 258
259 font->insertSeparator(); 259 font->insertSeparator();
260 260
261 font->insertItem(tr("Font"), this, SLOT(changeFont()) ); 261 font->insertItem(tr("Font"), this, SLOT(changeFont()) );
262 262
263 font->insertSeparator(); 263 font->insertSeparator();
264 font->insertItem(tr("Advanced Features"), advancedMenu); 264 font->insertItem(tr("Advanced Features"), advancedMenu);
265 265
266 QAction *wa = new QAction( tr("Wrap lines"), 266 QAction *wa = new QAction( tr("Wrap lines"),
267 QString::null, 0, this, 0 ); 267 QString::null, 0, this, 0 );
268 connect( wa, SIGNAL( toggled(bool) ), 268 connect( wa, SIGNAL( toggled(bool) ),
269 this, SLOT( setWordWrap(bool) ) ); 269 this, SLOT( setWordWrap(bool) ) );
270 wa->setToggleAction(true); 270 wa->setToggleAction(true);
271 wa->addTo( advancedMenu); 271 wa->addTo( advancedMenu);
272 272
273 nStart = new QAction( tr("Start with new file"), 273 nStart = new QAction( tr("Start with new file"),
274 QString::null, 0, this, 0 ); 274 QString::null, 0, this, 0 );
275 connect( nStart, SIGNAL( toggled(bool) ), 275 connect( nStart, SIGNAL( toggled(bool) ),
276 this, SLOT( changeStartConfig(bool) ) ); 276 this, SLOT( changeStartConfig(bool) ) );
277 nStart->setToggleAction(true); 277 nStart->setToggleAction(true);
278 nStart->addTo( advancedMenu ); 278 nStart->addTo( advancedMenu );
279 nStart->setEnabled(false); 279 nStart->setEnabled(false);
280 280
281 nAdvanced = new QAction( tr("Prompt on Exit"), 281 nAdvanced = new QAction( tr("Prompt on Exit"),
282 QString::null, 0, this, 0 ); 282 QString::null, 0, this, 0 );
283 connect( nAdvanced, SIGNAL( toggled(bool) ), 283 connect( nAdvanced, SIGNAL( toggled(bool) ),
284 this, SLOT( doPrompt(bool) ) ); 284 this, SLOT( doPrompt(bool) ) );
285 nAdvanced->setToggleAction(true); 285 nAdvanced->setToggleAction(true);
286 nAdvanced->addTo( advancedMenu ); 286 nAdvanced->addTo( advancedMenu );
287 287
288 desktopAction = new QAction( tr("Always open linked file"), 288 desktopAction = new QAction( tr("Always open linked file"),
289 QString::null, 0, this, 0 ); 289 QString::null, 0, this, 0 );
290 connect( desktopAction, SIGNAL( toggled(bool) ), 290 connect( desktopAction, SIGNAL( toggled(bool) ),
291 this, SLOT( doDesktop(bool) ) ); 291 this, SLOT( doDesktop(bool) ) );
292 desktopAction->setToggleAction(true); 292 desktopAction->setToggleAction(true);
293 desktopAction->addTo( advancedMenu); 293 desktopAction->addTo( advancedMenu);
294 294
295 filePermAction = new QAction( tr("File Permissions"), 295 filePermAction = new QAction( tr("File Permissions"),
296 QString::null, 0, this, 0 ); 296 QString::null, 0, this, 0 );
297 connect( filePermAction, SIGNAL( toggled(bool) ), 297 connect( filePermAction, SIGNAL( toggled(bool) ),
298 this, SLOT( doFilePerms(bool) ) ); 298 this, SLOT( doFilePerms(bool) ) );
299 filePermAction->setToggleAction(true); 299 filePermAction->setToggleAction(true);
300 filePermAction->addTo( advancedMenu); 300 filePermAction->addTo( advancedMenu);
301 301
302 searchBarAction = new QAction( tr("Search Bar Open"), 302 searchBarAction = new QAction( tr("Search Bar Open"),
303 QString::null, 0, this, 0 ); 303 QString::null, 0, this, 0 );
304 connect( searchBarAction, SIGNAL( toggled(bool) ), 304 connect( searchBarAction, SIGNAL( toggled(bool) ),
305 this, SLOT( setSearchBar(bool) ) ); 305 this, SLOT( setSearchBar(bool) ) );
306 searchBarAction->setToggleAction(true); 306 searchBarAction->setToggleAction(true);
307 searchBarAction->addTo( advancedMenu); 307 searchBarAction->addTo( advancedMenu);
308 308
309 nAutoSave = new QAction( tr("Auto Save 5 min."), 309 nAutoSave = new QAction( tr("Auto Save 5 min."),
310 QString::null, 0, this, 0 ); 310 QString::null, 0, this, 0 );
311 connect( nAutoSave, SIGNAL( toggled(bool) ), 311 connect( nAutoSave, SIGNAL( toggled(bool) ),
312 this, SLOT( doTimer(bool) ) ); 312 this, SLOT( doTimer(bool) ) );
313 nAutoSave->setToggleAction(true); 313 nAutoSave->setToggleAction(true);
314 nAutoSave->addTo( advancedMenu); 314 nAutoSave->addTo( advancedMenu);
315 315
316 316
317 //font->insertSeparator(); 317 //font->insertSeparator();
318 318
319 //font->insertItem(tr("About"), this, SLOT( doAbout()) ); 319 //font->insertItem(tr("About"), this, SLOT( doAbout()) );
320 320
321 mb->insertItem( tr( "File" ), file ); 321 mb->insertItem( tr( "File" ), file );
322 mb->insertItem( tr( "Edit" ), edit ); 322 mb->insertItem( tr( "Edit" ), edit );
323 mb->insertItem( tr( "View" ), font ); 323 mb->insertItem( tr( "View" ), font );
324 324
325 searchBar = new QToolBar(this); 325 searchBar = new QToolBar(this);
326 addToolBar( searchBar, "Search", QMainWindow::Top, true ); 326 addToolBar( searchBar, "Search", QMainWindow::Top, true );
327 327
328 searchBar->setHorizontalStretchable( true ); 328 searchBar->setHorizontalStretchable( true );
329 329
330 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 330 searchEdit = new QLineEdit( searchBar, "searchEdit" );
331 searchBar->setStretchableWidget( searchEdit ); 331 searchBar->setStretchableWidget( searchEdit );
332 connect( searchEdit, SIGNAL( textChanged(const QString&) ), 332 connect( searchEdit, SIGNAL( textChanged(const QString&) ),
333 this, SLOT( search() ) ); 333 this, SLOT( search() ) );
334 334
335 a = new QAction( tr( "Find Next" ), Opie::Core::OResource::loadPixmap( "next", Opie::Core::OResource::SmallIcon ), 335 a = new QAction( tr( "Find Next" ), Opie::Core::OResource::loadPixmap( "next", Opie::Core::OResource::SmallIcon ),
336 QString::null, 0, this, 0 ); 336 QString::null, 0, this, 0 );
337 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); 337 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) );
338 a->addTo( searchBar ); 338 a->addTo( searchBar );
339 a->addTo( edit ); 339 a->addTo( edit );
340 340
341 a = new QAction( tr( "Close Find" ), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ), 341 a = new QAction( tr( "Close Find" ), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),
342 QString::null, 0, this, 0 ); 342 QString::null, 0, this, 0 );
343 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 343 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
344 a->addTo( searchBar ); 344 a->addTo( searchBar );
345 345
346 edit->insertSeparator(); 346 edit->insertSeparator();
347 a = new QAction( tr( "Delete" ), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ), 347 a = new QAction( tr( "Delete" ), Opie::Core::OResource::loadPixmap( "close", Opie::Core::OResource::SmallIcon ),
348 QString::null, 0, this, 0 ); 348 QString::null, 0, this, 0 );
349 connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) ); 349 connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) );
350 a->addTo( edit ); 350 a->addTo( edit );
351 351
352 searchBar->hide(); 352 searchBar->hide();
353 353
354 editor = new QpeEditor( this ); 354 editor = new QpeEditor( this );
355 setCentralWidget( editor ); 355 setCentralWidget( editor );
356 editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 356 editor->setFrameStyle( QFrame::Panel | QFrame::Sunken );
357 connect( editor, SIGNAL( textChanged() ), 357 connect( editor, SIGNAL( textChanged() ),
358 this, SLOT( editorChanged() ) ); 358 this, SLOT( editorChanged() ) );
359 359
360 QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold); 360 QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold);
361 361
362 Config cfg("TextEdit"); 362 Config cfg("TextEdit");
363 cfg. setGroup ( "Font" ); 363 cfg. setGroup ( "Font" );
364 364
365 QFont defaultFont = editor-> font ( ); 365 QFont defaultFont = editor-> font ( );
366 366
367 QString family = cfg. readEntry ( "Family", defaultFont. family ( )); 367 QString family = cfg. readEntry ( "Family", defaultFont. family ( ));
368 int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( )); 368 int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( ));
369 int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( )); 369 int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( ));
370 bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( )); 370 bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( ));
371 371
372 defaultFont = QFont ( family, size, weight, italic ); 372 defaultFont = QFont ( family, size, weight, italic );
373 editor-> setFont ( defaultFont ); 373 editor-> setFont ( defaultFont );
374// updateCaption(); 374// updateCaption();
375 375
376 cfg.setGroup ( "View" ); 376 cfg.setGroup ( "View" );
377 377
378 promptExit = cfg.readBoolEntry ( "PromptExit", false ); 378 promptExit = cfg.readBoolEntry ( "PromptExit", false );
379 openDesktop = cfg.readBoolEntry ( "OpenDesktop", true ); 379 openDesktop = cfg.readBoolEntry ( "OpenDesktop", true );
380 filePerms = cfg.readBoolEntry ( "FilePermissions", false ); 380 filePerms = cfg.readBoolEntry ( "FilePermissions", false );
381 useSearchBar = cfg.readBoolEntry ( "SearchBar", false ); 381 useSearchBar = cfg.readBoolEntry ( "SearchBar", false );
382 startWithNew = cfg.readBoolEntry ( "startNew", true); 382 startWithNew = cfg.readBoolEntry ( "startNew", true);
383 featureAutoSave = cfg.readBoolEntry( "autosave", false); 383 featureAutoSave = cfg.readBoolEntry( "autosave", false);
384 384
385 if(useSearchBar) searchBarAction->setOn(true); 385 if(useSearchBar) searchBarAction->setOn(true);
386 if(promptExit) nAdvanced->setOn( true ); 386 if(promptExit) nAdvanced->setOn( true );
387 if(openDesktop) desktopAction->setOn( true ); 387 if(openDesktop) desktopAction->setOn( true );
388 if(filePerms) filePermAction->setOn( true ); 388 if(filePerms) filePermAction->setOn( true );
389 if(startWithNew) nStart->setOn( true ); 389 if(startWithNew) nStart->setOn( true );
390 if(featureAutoSave) nAutoSave->setOn(true); 390 if(featureAutoSave) nAutoSave->setOn(true);
391 391
392// { 392// {
393// doTimer(true); 393// doTimer(true);
394// } 394// }
395 395
396 bool wrap = cfg. readBoolEntry ( "Wrap", true ); 396 bool wrap = cfg. readBoolEntry ( "Wrap", true );
397 wa-> setOn ( wrap ); 397 wa-> setOn ( wrap );
398 setWordWrap ( wrap ); 398 setWordWrap ( wrap );
399 399
400///////////////// 400/////////////////
401 if( qApp->argc() > 1) { 401 if( qApp->argc() > 1) {
402 currentFileName=qApp->argv()[1]; 402 currentFileName=qApp->argv()[1];
403 403
404 QFileInfo fi(currentFileName); 404 QFileInfo fi(currentFileName);
405 405
406 if(fi.baseName().left(1) == "") { 406 if(fi.baseName().left(1) == "") {
407 openDotFile(currentFileName); 407 openDotFile(currentFileName);
408 } else { 408 } else {
409 openFile(currentFileName); 409 openFile(currentFileName);
410 } 410 }
411 } else { 411 } else {
412 edited1=false; 412 edited1=false;
413 openDotFile(""); 413 openDotFile("");
414 } 414 }
415 415
416 viewSelection = cfg.readNumEntry( "FileView", 0 ); 416 viewSelection = cfg.readNumEntry( "FileView", 0 );
417} 417}
418 418
419TextEdit::~TextEdit() { 419TextEdit::~TextEdit() {
420 if( edited1 && !promptExit) { 420 if( edited1 && !promptExit) {
421 switch( savePrompt() ) { 421 switch( savePrompt() ) {
422 case 1: { 422 case 1: {
423 saveAs(); 423 saveAs();
424 } 424 }
425 break; 425 break;
426 }; 426 };
427 } 427 }
428 428
429 delete editor; 429 delete editor;
430} 430}
431 431
432void TextEdit::closeEvent(QCloseEvent *) { 432void TextEdit::closeEvent(QCloseEvent *) {
433 if( promptExit) { 433 if( promptExit) {
434 switch( savePrompt() ) { 434 switch( savePrompt() ) {
435 case 1: { 435 case 1: {
436 saveAs(); 436 saveAs();
437 qApp->quit(); 437 qApp->quit();
438 } 438 }
439 break; 439 break;
440 440
441 case 2: { 441 case 2: {
442 qApp->quit(); 442 qApp->quit();
443 } 443 }
444 break; 444 break;
445 445
446 case -1: 446 case -1:
447 break; 447 break;
448 }; 448 };
449 } 449 }
450 else 450 else
451 qApp->quit(); 451 qApp->quit();
452} 452}
453 453
454void TextEdit::cleanUp() { 454void TextEdit::cleanUp() {
455 455
456 Config cfg ( "TextEdit" ); 456 Config cfg ( "TextEdit" );
457 cfg. setGroup ( "Font" ); 457 cfg. setGroup ( "Font" );
458 QFont f = editor->font(); 458 QFont f = editor->font();
459 cfg.writeEntry ( "Family", f. family ( )); 459 cfg.writeEntry ( "Family", f. family ( ));
460 cfg.writeEntry ( "Size", f. pointSize ( )); 460 cfg.writeEntry ( "Size", f. pointSize ( ));
461 cfg.writeEntry ( "Weight", f. weight ( )); 461 cfg.writeEntry ( "Weight", f. weight ( ));
462 cfg.writeEntry ( "Italic", f. italic ( )); 462 cfg.writeEntry ( "Italic", f. italic ( ));
463 463
464 cfg.setGroup ( "View" ); 464 cfg.setGroup ( "View" );
465 cfg.writeEntry ( "Wrap", editor->wordWrap() == QMultiLineEdit::WidgetWidth ); 465 cfg.writeEntry ( "Wrap", editor->wordWrap() == QMultiLineEdit::WidgetWidth );
466 cfg.writeEntry ( "FileView", viewSelection ); 466 cfg.writeEntry ( "FileView", viewSelection );
467 467
468 cfg.writeEntry ( "PromptExit", promptExit ); 468 cfg.writeEntry ( "PromptExit", promptExit );
469 cfg.writeEntry ( "OpenDesktop", openDesktop ); 469 cfg.writeEntry ( "OpenDesktop", openDesktop );
470 cfg.writeEntry ( "FilePermissions", filePerms ); 470 cfg.writeEntry ( "FilePermissions", filePerms );
471 cfg.writeEntry ( "SearchBar", useSearchBar ); 471 cfg.writeEntry ( "SearchBar", useSearchBar );
472 cfg.writeEntry ( "startNew", startWithNew ); 472 cfg.writeEntry ( "startNew", startWithNew );
473 473
474} 474}
475 475
476 476
477void TextEdit::accept() { 477void TextEdit::accept() {
478 if( edited1) 478 if( edited1)
479 saveAs(); 479 saveAs();
480 qApp->quit(); 480 qApp->quit();
481} 481}
482 482
483void TextEdit::zoomIn() { 483void TextEdit::zoomIn() {
484 setFontSize(editor->font().pointSize()+1,false); 484 setFontSize(editor->font().pointSize()+1,false);
485} 485}
486 486
487void TextEdit::zoomOut() { 487void TextEdit::zoomOut() {
488 setFontSize(editor->font().pointSize()-1,true); 488 setFontSize(editor->font().pointSize()-1,true);
489} 489}
490 490
491 491
492void TextEdit::setFontSize(int sz, bool round_down_not_up) { 492void TextEdit::setFontSize(int sz, bool round_down_not_up) {
493 int s=10; 493 int s=10;
494 for (int i=0; i<nfontsizes; i++) { 494 for (int i=0; i<nfontsizes; i++) {
495 if ( fontsize[i] == sz ) { 495 if ( fontsize[i] == sz ) {
496 s = sz; 496 s = sz;
497 break; 497 break;
498 } else if ( round_down_not_up ) { 498 } else if ( round_down_not_up ) {
499 if ( fontsize[i] < sz ) 499 if ( fontsize[i] < sz )
500 s = fontsize[i]; 500 s = fontsize[i];
501 } else { 501 } else {
502 if ( fontsize[i] > sz ) { 502 if ( fontsize[i] > sz ) {
503 s = fontsize[i]; 503 s = fontsize[i];
504 break; 504 break;
505 } 505 }
506 } 506 }
507 } 507 }
508 508
509 QFont f = editor->font(); 509 QFont f = editor->font();
510 f.setPointSize(s); 510 f.setPointSize(s);
511 editor->setFont(f); 511 editor->setFont(f);
512 512
513 zin->setEnabled(s != fontsize[nfontsizes-1]); 513 zin->setEnabled(s != fontsize[nfontsizes-1]);
514 zout->setEnabled(s != fontsize[0]); 514 zout->setEnabled(s != fontsize[0]);
515} 515}
516 516
517void TextEdit::setBold(bool y) { 517void TextEdit::setBold(bool y) {
518 QFont f = editor->font(); 518 QFont f = editor->font();
519 f.setBold(y); 519 f.setBold(y);
520 editor->setFont(f); 520 editor->setFont(f);
521} 521}
522 522
523void TextEdit::setItalic(bool y) { 523void TextEdit::setItalic(bool y) {
524 QFont f = editor->font(); 524 QFont f = editor->font();
525 f.setItalic(y); 525 f.setItalic(y);
526 editor->setFont(f); 526 editor->setFont(f);
527} 527}
528 528
529void TextEdit::setWordWrap(bool y) { 529void TextEdit::setWordWrap(bool y) {
530 bool state = editor->edited(); 530 bool state = editor->edited();
531 QString captionStr = caption(); 531 QString captionStr = caption();
532 bool b1 = edited1; 532 bool b1 = edited1;
533 bool b2 = edited; 533 bool b2 = edited;
534 534
535 editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap ); 535 editor->setWordWrap(y ? QMultiLineEdit::WidgetWidth : QMultiLineEdit::NoWrap );
536 editor->setEdited( state ); 536 editor->setEdited( state );
537 edited1=b1; 537 edited1=b1;
538 edited=b2; 538 edited=b2;
539 setCaption(captionStr); 539 setCaption(captionStr);
540} 540}
541 541
542void TextEdit::setSearchBar(bool b) { 542void TextEdit::setSearchBar(bool b) {
543 useSearchBar=b; 543 useSearchBar=b;
544 Config cfg("TextEdit"); 544 Config cfg("TextEdit");
545 cfg.setGroup("View"); 545 cfg.setGroup("View");
546 cfg.writeEntry ( "SearchBar", b ); 546 cfg.writeEntry ( "SearchBar", b );
547 searchBarAction->setOn(b); 547 searchBarAction->setOn(b);
548 if(b) 548 if(b)
549 searchBar->show(); 549 searchBar->show();
550 else 550 else
551 searchBar->hide(); 551 searchBar->hide();
552 editor->setFocus(); 552 editor->setFocus();
553} 553}
554 554
555void TextEdit::fileNew() { 555void TextEdit::fileNew() {
556// if( !bFromDocView ) { 556// if( !bFromDocView ) {
557// saveAs(); 557// saveAs();
558// } 558// }
559 newFile(DocLnk()); 559 newFile(DocLnk());
560} 560}
561 561
562void TextEdit::fileOpen() { 562void TextEdit::fileOpen() {
563 Config cfg("TextEdit"); 563 Config cfg("TextEdit");
564 cfg. setGroup ( "View" ); 564 cfg. setGroup ( "View" );
565 QMap<QString, QStringList> map; 565 QMap<QString, QStringList> map;
566 map.insert(tr("All"), QStringList() ); 566 map.insert(tr("All"), QStringList() );
567 QStringList text; 567 QStringList text;
568 text << "text/*"; 568 text << "text/*";
569 map.insert(tr("Text"), text ); 569 map.insert(tr("Text"), text );
570 text << "*"; 570 text << "*";
571 map.insert(tr("All"), text ); 571 map.insert(tr("All"), text );
572 QString str = OFileDialog::getOpenFileName( 2, 572 QString str = OFileDialog::getOpenFileName( 2,
573 QString::null , 573 QString::null ,
574 QString::null, map); 574 QString::null, map);
575 if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) 575 if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() )
576 { 576 {
577 openFile( str ); 577 openFile( str );
578 } 578 }
579 else 579 else
580 updateCaption(); 580 updateCaption();
581} 581}
582 582
583void TextEdit::doSearchBar() { 583void TextEdit::doSearchBar() {
584 if(!useSearchBar) 584 if(!useSearchBar)
585 searchBar->hide(); 585 searchBar->hide();
586 else 586 else
587 searchBar->show(); 587 searchBar->show();
588} 588}
589 589
590#if 0 590#if 0
591void TextEdit::slotFind() { 591void TextEdit::slotFind() {
592 FindDialog frmFind( tr("Text Editor"), this ); 592 FindDialog frmFind( tr("Text Editor"), this );
593 connect( &frmFind, SIGNAL(signalFindClicked(const QString&,bool,bool,int)), 593 connect( &frmFind, SIGNAL(signalFindClicked(const QString&,bool,bool,int)),
594 editor, SLOT(slotDoFind(const QString&,bool,bool))); 594 editor, SLOT(slotDoFind(const QString&,bool,bool)));
595 595
596 //case sensitive, backwards, [category] 596 //case sensitive, backwards, [category]
597 597
598 connect( editor, SIGNAL(notFound()), 598 connect( editor, SIGNAL(notFound()),
599 &frmFind, SLOT(slotNotFound()) ); 599 &frmFind, SLOT(slotNotFound()) );
600 connect( editor, SIGNAL(searchWrapped()), 600 connect( editor, SIGNAL(searchWrapped()),
601 &frmFind, SLOT(slotWrapAround()) ); 601 &frmFind, SLOT(slotWrapAround()) );
602 602
603 frmFind.exec(); 603 frmFind.exec();
604 604
605 605
606} 606}
607#endif 607#endif
608 608
609void TextEdit::fileRevert() { 609void TextEdit::fileRevert() {
610 clear(); 610 clear();
611 fileOpen(); 611 fileOpen();
612} 612}
613 613
614void TextEdit::editCut() { 614void TextEdit::editCut() {
615#ifndef QT_NO_CLIPBOARD 615#ifndef QT_NO_CLIPBOARD
616 editor->cut(); 616 editor->cut();
617#endif 617#endif
618} 618}
619 619
620void TextEdit::editCopy() { 620void TextEdit::editCopy() {
621#ifndef QT_NO_CLIPBOARD 621#ifndef QT_NO_CLIPBOARD
622 editor->copy(); 622 editor->copy();
623#endif 623#endif
624} 624}
625 625
626void TextEdit::editPaste() { 626void TextEdit::editPaste() {
627#ifndef QT_NO_CLIPBOARD 627#ifndef QT_NO_CLIPBOARD
628 editor->paste(); 628 editor->paste();
629#endif 629#endif
630} 630}
631 631
632void TextEdit::editFind() { 632void TextEdit::editFind() {
633 searchBar->show(); 633 searchBar->show();
634 searchEdit->setFocus(); 634 searchEdit->setFocus();
635} 635}
636 636
637void TextEdit::findNext() { 637void TextEdit::findNext() {
638 editor->find( searchEdit->text(), false, false ); 638 editor->find( searchEdit->text(), false, false );
639 639
640} 640}
641 641
642void TextEdit::findClose() { 642void TextEdit::findClose() {
643 searchBar->hide(); 643 searchBar->hide();
644} 644}
645 645
646void TextEdit::search() { 646void TextEdit::search() {
647 editor->find( searchEdit->text(), false, false ); 647 editor->find( searchEdit->text(), false, false );
648} 648}
649 649
650void TextEdit::newFile( const DocLnk &f ) { 650void TextEdit::newFile( const DocLnk &f ) {
651 DocLnk nf = f; 651 DocLnk nf = f;
652 nf.setType("text/plain"); 652 nf.setType("text/plain");
653 clear(); 653 clear();
654 setWState (WState_Reserved1 ); 654 setWState (WState_Reserved1 );
655 editor->setFocus(); 655 editor->setFocus();
656 doc = new DocLnk(nf); 656 doc = new DocLnk(nf);
657 currentFileName = "Unnamed"; 657 currentFileName = "Unnamed";
658 odebug << "newFile "+currentFileName << oendl; 658 odebug << "newFile "+currentFileName << oendl;
659 updateCaption( currentFileName); 659 updateCaption( currentFileName);
660// editor->setEdited( false); 660// editor->setEdited( false);
661} 661}
662 662
663void TextEdit::openDotFile( const QString &f ) { 663void TextEdit::openDotFile( const QString &f ) {
664 if(!currentFileName.isEmpty()) { 664 if(!currentFileName.isEmpty()) {
665 currentFileName=f; 665 currentFileName=f;
666 666
667 odebug << "openFile dotfile " + currentFileName << oendl; 667 odebug << "openFile dotfile " + currentFileName << oendl;
668 QString txt; 668 QString txt;
669 QFile file(f); 669 QFile file(f);
670 file.open(IO_ReadWrite); 670 file.open(IO_ReadWrite);
671 QTextStream t(&file); 671 QTextStream t(&file);
672 while ( !t.atEnd()) { 672 while ( !t.atEnd()) {
673 txt+=t.readLine()+"\n"; 673 txt+=t.readLine()+"\n";
674 } 674 }
675 editor->setText(txt); 675 editor->setText(txt);
676 editor->setEdited( false); 676 editor->setEdited( false);
677 edited1=false; 677 edited1=false;
678 edited=false; 678 edited=false;
679 679
680 680
681 } 681 }
682 updateCaption( currentFileName); 682 updateCaption( currentFileName);
683} 683}
684 684
685void TextEdit::openFile( const QString &f ) { 685void TextEdit::openFile( const QString &f ) {
686 odebug << "filename is "+ f << oendl; 686 odebug << "filename is "+ f << oendl;
687 QString filer; 687 QString filer;
688 QFileInfo fi( f); 688 QFileInfo fi( f);
689// bFromDocView = true; 689// bFromDocView = true;
690 if(f.find(".desktop",0,true) != -1 && !openDesktop ) 690 if(f.find(".desktop",0,true) != -1 && !openDesktop )
691 { 691 {
692 switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Text Editor has detected<BR>you selected a <B>.desktop</B>file.<BR>Open<B>.desktop</B> file or <B>linked</B> file?"),tr(".desktop File"),tr("Linked Document"),0,1,1) ) 692 switch ( QMessageBox::warning(this,tr("Text Editor"),tr("Text Editor has detected<BR>you selected a <B>.desktop</B>file.<BR>Open<B>.desktop</B> file or <B>linked</B> file?"),tr(".desktop File"),tr("Linked Document"),0,1,1) )
693 { 693 {
694 case 0: //desktop 694 case 0: //desktop
695 filer = f; 695 filer = f;
696 break; 696 break;
697 case 1: //linked 697 case 1: //linked
698 DocLnk sf(f); 698 DocLnk sf(f);
699 filer = sf.file(); 699 filer = sf.file();
700 break; 700 break;
701 }; 701 };
702 } 702 }
703 else if(fi.baseName().left(1) == "") 703 else if(fi.baseName().left(1) == "")
704 { 704 {
705 odebug << "opening dotfile" << oendl; 705 odebug << "opening dotfile" << oendl;
706 currentFileName=f; 706 currentFileName=f;
707 openDotFile(currentFileName); 707 openDotFile(currentFileName);
708 return; 708 return;
709 } 709 }
710 /* 710 /*
711 * The problem is a file where Config(f).isValid() and it does not 711 * The problem is a file where Config(f).isValid() and it does not
712 * end with .desktop will be treated as desktop file 712 * end with .desktop will be treated as desktop file
713 */ 713 */
714 else if (f.find(".desktop",0,true) != -1 ) 714 else if (f.find(".desktop",0,true) != -1 )
715 { 715 {
716 DocLnk sf(f); 716 DocLnk sf(f);
717 filer = sf.file(); 717 filer = sf.file();
718 if(filer.right(1) == "/") 718 if(filer.right(1) == "/")
719 filer = f; 719 filer = f;
720 720
721 } 721 }
722 else 722 else
723 filer = f; 723 filer = f;
724 724
725 DocLnk nf; 725 DocLnk nf;
726 nf.setType("text/plain"); 726 nf.setType("text/plain");
727 nf.setFile(filer); 727 nf.setFile(filer);
728 currentFileName=filer; 728 currentFileName=filer;
729 729
730 nf.setName(fi.baseName()); 730 nf.setName(fi.baseName());
731 openFile(nf); 731 openFile(nf);
732 732
733 odebug << "openFile string "+currentFileName << oendl; 733 odebug << "openFile string "+currentFileName << oendl;
734 734
735 showEditTools(); 735 showEditTools();
736 // Show filename in caption 736 // Show filename in caption
737 QString name = filer; 737 QString name = filer;
738 int sep = name.findRev( '/' ); 738 int sep = name.findRev( '/' );
739 if ( sep > 0 ) 739 if ( sep > 0 )
740 name = name.mid( sep+1 ); 740 name = name.mid( sep+1 );
741 updateCaption( name ); 741 updateCaption( name );
742} 742}
743 743
744void TextEdit::openFile( const DocLnk &f ) { 744void TextEdit::openFile( const DocLnk &f ) {
745// clear(); 745// clear();
746// bFromDocView = true; 746// bFromDocView = true;
747 FileManager fm; 747 FileManager fm;
748 QString txt; 748 QString txt;
749 currentFileName=f.file(); 749 currentFileName=f.file();
750 odebug << "openFile doclnk " + currentFileName << oendl; 750 odebug << "openFile doclnk " + currentFileName << oendl;
751 if ( !fm.loadFile( f, txt ) ) { 751 if ( !fm.loadFile( f, txt ) ) {
752 // ####### could be a new file 752 // ####### could be a new file
753 odebug << "Cannot open file" << oendl; 753 odebug << "Cannot open file" << oendl;
754 } 754 }
755// fileNew(); 755// fileNew();
756 if ( doc ) 756 if ( doc )
757 delete doc; 757 delete doc;
758 doc = new DocLnk(f); 758 doc = new DocLnk(f);
759 editor->setText(txt); 759 editor->setText(txt);
760 editor->setEdited( false); 760 editor->setEdited( false);
761 edited1=false; 761 edited1=false;
762 edited=false; 762 edited=false;
763 763
764 doc->setName(currentFileName); 764 doc->setName(currentFileName);
765 updateCaption(); 765 updateCaption();
766 setTimer(); 766 setTimer();
767} 767}
768 768
769void TextEdit::showEditTools() { 769void TextEdit::showEditTools() {
770 menu->show(); 770 menu->show();
771 editBar->show(); 771 editBar->show();
772 if(!useSearchBar) 772 if(!useSearchBar)
773 searchBar->hide(); 773 searchBar->hide();
774 else 774 else
775 searchBar->show(); 775 searchBar->show();
776 setWState (WState_Reserved1 ); 776 setWState (WState_Reserved1 );
777} 777}
778 778
779/*! 779/*!
780 unprompted save */ 780 unprompted save */
781bool TextEdit::save() { 781bool TextEdit::save() {
782 QString name, file; 782 QString name, file;
783 odebug << "saveAsFile " + currentFileName << oendl; 783 odebug << "saveAsFile " + currentFileName << oendl;
784 if(currentFileName.isEmpty()) { 784 if(currentFileName.isEmpty()) {
785 saveAs(); 785 saveAs();
786 return false; 786 return false;
787 } 787 }
788 name = currentFileName; 788 name = currentFileName;
789 if(doc) { 789 if(doc) {
790 file = doc->file(); 790 file = doc->file();
791 odebug << "saver file "+file << oendl; 791 odebug << "saver file "+file << oendl;
792 name = doc->name(); 792 name = doc->name();
793 odebug << "File named "+name << oendl; 793 odebug << "File named "+name << oendl;
794 } else { 794 } else {
795 file = currentFileName; 795 file = currentFileName;
796 name = QFileInfo(currentFileName).baseName(); 796 name = QFileInfo(currentFileName).baseName();
797 } 797 }
798 798
799 QString rt = editor->text(); 799 QString rt = editor->text();
800 if( !rt.isEmpty() ) { 800 if( !rt.isEmpty() ) {
801 if(name.isEmpty()) { 801 if(name.isEmpty()) {
802 saveAs(); 802 saveAs();
803 } else { 803 } else {
804 currentFileName = name; 804 currentFileName = name;
805 odebug << "saveFile "+currentFileName << oendl; 805 odebug << "saveFile "+currentFileName << oendl;
806 806
807 struct stat buf; 807 struct stat buf;
808 mode_t mode; 808 mode_t mode;
809 stat(file.latin1(), &buf); 809 stat(file.latin1(), &buf);
810 mode = buf.st_mode; 810 mode = buf.st_mode;
811 811
812 if(!fileIs) { 812 if(!fileIs) {
813 doc->setName( name); 813 doc->setName( name);
814 FileManager fm; 814 FileManager fm;
815 if ( !fm.saveFile( *doc, rt ) ) { 815 if ( !fm.saveFile( *doc, rt ) ) {
816 QMessageBox::message(tr("Text Edit"),tr("Save Failed")); 816 QMessageBox::message(tr("Text Edit"),tr("Save Failed"));
817 return false; 817 return false;
818 } 818 }
819 } else { 819 } else {
820 odebug << "regular save file" << oendl; 820 odebug << "regular save file" << oendl;
821 QFile f(file); 821 QFile f(file);
822 if( f.open(IO_WriteOnly)) { 822 if( f.open(IO_WriteOnly)) {
823 QCString crt = rt.utf8(); 823 QCString crt = rt.utf8();
824 f.writeBlock(crt,crt.length()); 824 f.writeBlock(crt,crt.length());
825 } else { 825 } else {
826 QMessageBox::message(tr("Text Edit"),tr("Write Failed")); 826 QMessageBox::message(tr("Text Edit"),tr("Write Failed"));
827 return false; 827 return false;
828 } 828 }
829 829
830 } 830 }
831 editor->setEdited( false); 831 editor->setEdited( false);
832 edited1=false; 832 edited1=false;
833 edited=false; 833 edited=false;
834 if(caption().left(1)=="*") 834 if(caption().left(1)=="*")
835 setCaption(caption().right(caption().length()-1)); 835 setCaption(caption().right(caption().length()-1));
836 836
837 837
838 chmod( file.latin1(), mode); 838 chmod( file.latin1(), mode);
839 } 839 }
840 return true; 840 return true;
841 } 841 }
842 return false; 842 return false;
843} 843}
844 844
845/*! 845/*!
846 prompted save */ 846 prompted save */
847bool TextEdit::saveAs() { 847bool TextEdit::saveAs() {
848 848
849 if(caption() == tr("Text Editor")) 849 if(caption() == tr("Text Editor"))
850 return false; 850 return false;
851 odebug << "saveAsFile " + currentFileName << oendl; 851 odebug << "saveAsFile " + currentFileName << oendl;
852 // case of nothing to save... 852 // case of nothing to save...
853// if ( !doc && !currentFileName.isEmpty()) { 853// if ( !doc && !currentFileName.isEmpty()) {
854// //|| !bFromDocView) 854// //|| !bFromDocView)
855// odebug << "no doc" << oendl; 855// odebug << "no doc" << oendl;
856// return true; 856// return true;
857// } 857// }
858// if ( !editor->edited() ) { 858// if ( !editor->edited() ) {
859// delete doc; 859// delete doc;
860// doc = 0; 860// doc = 0;
861// return true; 861// return true;
862// } 862// }
863 863
864 QString rt = editor->text(); 864 QString rt = editor->text();
865 odebug << currentFileName << oendl; 865 odebug << currentFileName << oendl;
866 866
867 if( currentFileName.isEmpty() 867 if( currentFileName.isEmpty()
868 || currentFileName == tr("Unnamed") 868 || currentFileName == tr("Unnamed")
869 || currentFileName == tr("Text Editor")) { 869 || currentFileName == tr("Text Editor")) {
870 odebug << "do silly TT filename thing" << oendl; 870 odebug << "do silly TT filename thing" << oendl;
871// if ( doc && doc->name().isEmpty() ) { 871// if ( doc && doc->name().isEmpty() ) {
872 QString pt = rt.simplifyWhiteSpace(); 872 QString pt = rt.simplifyWhiteSpace();
873 int i = pt.find( ' ' ); 873 int i = pt.find( ' ' );
874 QString docname = pt; 874 QString docname = pt;
875 if ( i > 0 ) 875 if ( i > 0 )
876 docname = pt.left( i ); 876 docname = pt.left( i );
877 // remove "." at the beginning 877 // remove "." at the beginning
878 while( docname.startsWith( "." ) ) 878 while( docname.startsWith( "." ) )
879 docname = docname.mid( 1 ); 879 docname = docname.mid( 1 );
880 docname.replace( QRegExp("/"), "_" ); 880 docname.replace( QRegExp("/"), "_" );
881 // cut the length. filenames longer than that 881 // cut the length. filenames longer than that
882 //don't make sense and something goes wrong when they get too long. 882 //don't make sense and something goes wrong when they get too long.
883 if ( docname.length() > 40 ) 883 if ( docname.length() > 40 )
884 docname = docname.left(40); 884 docname = docname.left(40);
885 if ( docname.isEmpty() ) 885 if ( docname.isEmpty() )
886 docname = tr("Unnamed"); 886 docname = tr("Unnamed");
887 if(doc) doc->setName(docname); 887 if(doc) doc->setName(docname);
888 currentFileName=docname; 888 currentFileName=docname;
889// } 889// }
890// else 890// else
891// odebug << "hmmmmmm" << oendl; 891// odebug << "hmmmmmm" << oendl;
892 } 892 }
893 893
894 894
895 QMap<QString, QStringList> map; 895 QMap<QString, QStringList> map;
896 map.insert(tr("All"), QStringList() ); 896 map.insert(tr("All"), QStringList() );
897 QStringList text; 897 QStringList text;
898 text << "text/*"; 898 text << "text/*";
899 map.insert(tr("Text"), text ); 899 map.insert(tr("Text"), text );
900 text << "*"; 900 text << "*";
901 map.insert(tr("All"), text ); 901 map.insert(tr("All"), text );
902 902
903 QFileInfo cuFi( currentFileName); 903 QFileInfo cuFi( currentFileName);
904 QString filee = cuFi.fileName(); 904 QString filee = cuFi.fileName();
905 QString dire = cuFi.dirPath(); 905 QString dire = cuFi.dirPath();
906 if(dire==".") 906 if(dire==".")
907 dire = QPEApplication::documentDir(); 907 dire = QPEApplication::documentDir();
908 QString str; 908 QString str;
909 if( !featureAutoSave) { 909 if( !featureAutoSave) {
910 str = OFileDialog::getSaveFileName( 2, 910 str = OFileDialog::getSaveFileName( 2,
911 dire, 911 dire,
912 filee, map); 912 filee, map);
913 } else 913 } else
914 str=currentFileName; 914 str = currentFileName;
915 915
916 if(!str.isEmpty()) { 916 if(!str.isEmpty()) {
917 QString fileNm=str; 917 QString fileNm=str;
918 918
919 odebug << "saving filename "+fileNm << oendl; 919 odebug << "saving filename "+fileNm << oendl;
920 QFileInfo fi(fileNm); 920 QFileInfo fi(fileNm);
921 currentFileName=fi.fileName(); 921 currentFileName=fi.fileName();
922 if(doc) 922 if(doc)
923// QString file = doc->file(); 923// QString file = doc->file();
924// doc->removeFiles(); 924// doc->removeFiles();
925 delete doc; 925 delete doc;
926 DocLnk nf; 926 DocLnk nf;
927 nf.setType("text/plain"); 927 nf.setType("text/plain");
928 nf.setFile( fileNm); 928 nf.setFile( fileNm);
929 doc = new DocLnk(nf); 929 doc = new DocLnk(nf);
930// editor->setText(rt); 930// editor->setText(rt);
931 odebug << "Saving file as "+currentFileName << oendl; 931 odebug << "Saving file as "+currentFileName << oendl;
932 doc->setName( fi.baseName() /*currentFileName*/); 932 doc->setName( fi.baseName() /*currentFileName*/);
933 updateCaption( currentFileName); 933 updateCaption( currentFileName);
934 934
935 FileManager fm; 935 FileManager fm;
936 if ( !fm.saveFile( *doc, rt ) ) { 936 if ( !fm.saveFile( *doc, rt ) ) {
937 QMessageBox::message(tr("Text Edit"),tr("Save Failed")); 937 QMessageBox::message(tr("Text Edit"),tr("Save Failed"));
938 return false; 938 return false;
939 } 939 }
940 940
941 if( filePerms ) { 941 if( filePerms ) {
942 filePermissions *filePerm; 942 filePermissions *filePerm;
943 filePerm = new filePermissions(this, 943 filePerm = new filePermissions(this,
944 tr("Permissions"),true, 944 tr("Permissions"),true,
945 0,(const QString &)fileNm); 945 0,(const QString &)fileNm);
946 QPEApplication::execDialog( filePerm ); 946 QPEApplication::execDialog( filePerm );
947 947
948 if( filePerm) 948 if( filePerm)
949 delete filePerm; 949 delete filePerm;
950 } 950 }
951// } 951// }
952 editor->setEdited( false); 952 editor->setEdited( false);
953 edited1 = false; 953 edited1 = false;
954 edited = false; 954 edited = false;
955 if(caption().left(1)=="*") 955 if(caption().left(1)=="*")
956 setCaption(caption().right(caption().length()-1)); 956 setCaption(caption().right(caption().length()-1));
957 957
958 return true; 958 return true;
959 } 959 }
960 odebug << "returning false" << oendl; 960 odebug << "returning false" << oendl;
961 currentFileName = ""; 961 currentFileName = "";
962 return false; 962 return false;
963} //end saveAs 963} //end saveAs
964 964
965void TextEdit::clear() { 965void TextEdit::clear() {
966 delete doc; 966 delete doc;
967 doc = 0; 967 doc = 0;
968 editor->clear(); 968 editor->clear();
969} 969}
970 970
971void TextEdit::updateCaption( const QString &name ) { 971void TextEdit::updateCaption( const QString &name ) {
972 972
973 if ( name.isEmpty() ) 973 if ( name.isEmpty() )
974 setCaption( tr("Text Editor") ); 974 setCaption( tr("Text Editor") );
975 else { 975 else {
976 QString s = name; 976 QString s = name;
977 if ( s.isNull() ) 977 if ( s.isNull() )
978 s = doc->name(); 978 s = doc->name();
979 if ( s.isEmpty() ) { 979 if ( s.isEmpty() ) {
980 s = tr( "Unnamed" ); 980 s = tr( "Unnamed" );
981 currentFileName=s; 981 currentFileName=s;
982 } 982 }
983// if(s.left(1) == "/") 983// if(s.left(1) == "/")
984// s = s.right(s.length()-1); 984// s = s.right(s.length()-1);
985 setCaption( tr("%1 - Text Editor").arg( s ) ); 985 setCaption( tr("%1 - Text Editor").arg( s ) );
986 } 986 }
987} 987}
988 988
989void TextEdit::setDocument(const QString& fileref) { 989void TextEdit::setDocument(const QString& fileref) {
990 if(fileref != "Unnamed") { 990 if(fileref != "Unnamed") {
991 currentFileName=fileref; 991 currentFileName=fileref;
992 odebug << "setDocument" << oendl; 992 odebug << "setDocument" << oendl;
993 QFileInfo fi(currentFileName); 993 QFileInfo fi(currentFileName);
994 odebug << "basename:"+fi.baseName()+": current filenmame "+currentFileName << oendl; 994 odebug << "basename:"+fi.baseName()+": current filenmame "+currentFileName << oendl;
995 if( (fi.baseName().left(1)).isEmpty() ) { 995 if( (fi.baseName().left(1)).isEmpty() ) {
996 openDotFile(currentFileName); 996 openDotFile(currentFileName);
997 997
998 } else { 998 } else {
999 odebug << "setDoc open" << oendl; 999 odebug << "setDoc open" << oendl;
1000 bFromDocView = true; 1000 bFromDocView = true;
1001 openFile(fileref); 1001 openFile(fileref);
1002 editor->setEdited(true); 1002 editor->setEdited(true);
1003 edited1=false; 1003 edited1=false;
1004 edited=true; 1004 edited=true;
1005 // fromSetDocument=false; 1005 // fromSetDocument=false;
1006 // doSearchBar(); 1006 // doSearchBar();
1007 } 1007 }
1008 } 1008 }
1009 updateCaption( currentFileName); 1009 updateCaption( currentFileName);
1010} 1010}
1011 1011
1012void TextEdit::changeFont() { 1012void TextEdit::changeFont() {
1013 QDialog *d = new QDialog ( this, "FontDialog", true ); 1013 QDialog *d = new QDialog ( this, "FontDialog", true );
1014 d-> setCaption ( tr( "Choose font" )); 1014 d-> setCaption ( tr( "Choose font" ));
1015 QBoxLayout *lay = new QVBoxLayout ( d ); 1015 QBoxLayout *lay = new QVBoxLayout ( d );
1016 OFontSelector *ofs = new OFontSelector ( true, d ); 1016 OFontSelector *ofs = new OFontSelector ( true, d );
1017 lay-> addWidget ( ofs ); 1017 lay-> addWidget ( ofs );
1018 ofs-> setSelectedFont ( editor-> font ( )); 1018 ofs-> setSelectedFont ( editor-> font ( ));
1019 1019
1020 if ( QPEApplication::execDialog( d ) == QDialog::Accepted ) 1020 if ( QPEApplication::execDialog( d ) == QDialog::Accepted )
1021 editor-> setFont ( ofs-> selectedFont ( )); 1021 editor-> setFont ( ofs-> selectedFont ( ));
1022 delete d; 1022 delete d;
1023 1023
1024} 1024}
1025 1025
1026void TextEdit::editDelete() { 1026void TextEdit::editDelete() {
1027 switch ( QMessageBox::warning(this,tr("Text Editor"), 1027 switch ( QMessageBox::warning(this,tr("Text Editor"),
1028 tr("Do you really want<BR>to <B>delete</B> " 1028 tr("Do you really want<BR>to <B>delete</B> "
1029 "the current file\nfrom the disk?<BR>This is " 1029 "the current file\nfrom the disk?<BR>This is "
1030 "<B>irreversable!</B>"), 1030 "<B>irreversable!</B>"),
1031 tr("Yes"),tr("No"),0,0,1) ) { 1031 tr("Yes"),tr("No"),0,0,1) ) {
1032 case 0: 1032 case 0:
1033 if(doc) { 1033 if(doc) {
1034 doc->removeFiles(); 1034 doc->removeFiles();
1035 clear(); 1035 clear();
1036 setCaption( tr("Text Editor") ); 1036 setCaption( tr("Text Editor") );
1037 } 1037 }
1038 break; 1038 break;
1039 case 1: 1039 case 1:
1040 // exit 1040 // exit
1041 break; 1041 break;
1042 }; 1042 };
1043} 1043}
1044 1044
1045void TextEdit::changeStartConfig( bool b ) { 1045void TextEdit::changeStartConfig( bool b ) {
1046 startWithNew=b; 1046 startWithNew=b;
1047 Config cfg("TextEdit"); 1047 Config cfg("TextEdit");
1048 cfg.setGroup("View"); 1048 cfg.setGroup("View");
1049 cfg.writeEntry("startNew",b); 1049 cfg.writeEntry("startNew",b);
1050 update(); 1050 update();
1051} 1051}
1052 1052
1053void TextEdit::editorChanged() { 1053void TextEdit::editorChanged() {
1054// odebug << "editor changed" << oendl; 1054// odebug << "editor changed" << oendl;
1055 if( /*editor->edited() &&*/ /*edited && */!edited1) { 1055 if( /*editor->edited() &&*/ /*edited && */!edited1) {
1056 setCaption( "*"+caption()); 1056 setCaption( "*"+caption());
1057 edited1=true; 1057 edited1=true;
1058 } 1058 }
1059 edited=true; 1059 edited=true;
1060} 1060}
1061 1061
1062void TextEdit::receive(const QCString&msg, const QByteArray &) { 1062void TextEdit::receive(const QCString&msg, const QByteArray &) {
1063 odebug << "QCop "+msg << oendl; 1063 odebug << "QCop "+msg << oendl;
1064 if ( msg == "setDocument(QString)" ) { 1064 if ( msg == "setDocument(QString)" ) {
1065 odebug << "bugger all" << oendl; 1065 odebug << "bugger all" << oendl;
1066 1066
1067 } 1067 }
1068 1068
1069} 1069}
1070 1070
1071void TextEdit::doAbout() { 1071void TextEdit::doAbout() {
1072 QMessageBox::about(0,tr("Text Edit"),tr("Text Edit is copyright<BR>" 1072 QMessageBox::about(0,tr("Text Edit"),tr("Text Edit is copyright<BR>"
1073 "2000 Trolltech AS, and<BR>" 1073 "2000 Trolltech AS, and<BR>"
1074 "2002 by <B>L. J. Potter <BR>llornkcor@handhelds.org</B><BR>" 1074 "2002 by <B>L. J. Potter <BR>llornkcor@handhelds.org</B><BR>"
1075 "and is licensed under the GPL")); 1075 "and is licensed under the GPL"));
1076} 1076}
1077 1077
1078void TextEdit::doPrompt(bool b) { 1078void TextEdit::doPrompt(bool b) {
1079 promptExit=b; 1079 promptExit=b;
1080 Config cfg("TextEdit"); 1080 Config cfg("TextEdit");
1081 cfg.setGroup ( "View" ); 1081 cfg.setGroup ( "View" );
1082 cfg.writeEntry ( "PromptExit", b); 1082 cfg.writeEntry ( "PromptExit", b);
1083} 1083}
1084 1084
1085void TextEdit::doDesktop(bool b) { 1085void TextEdit::doDesktop(bool b) {
1086 openDesktop=b; 1086 openDesktop=b;
1087 Config cfg("TextEdit"); 1087 Config cfg("TextEdit");
1088 cfg.setGroup ( "View" ); 1088 cfg.setGroup ( "View" );
1089 cfg.writeEntry ( "OpenDesktop", b); 1089 cfg.writeEntry ( "OpenDesktop", b);
1090} 1090}
1091 1091
1092void TextEdit::doFilePerms(bool b) { 1092void TextEdit::doFilePerms(bool b) {
1093 filePerms=b; 1093 filePerms=b;
1094 Config cfg("TextEdit"); 1094 Config cfg("TextEdit");
1095 cfg.setGroup ( "View" ); 1095 cfg.setGroup ( "View" );
1096 cfg.writeEntry ( "FilePermissions", b); 1096 cfg.writeEntry ( "FilePermissions", b);
1097} 1097}
1098 1098
1099void TextEdit::editPasteTimeDate() { 1099void TextEdit::editPasteTimeDate() {
1100#ifndef QT_NO_CLIPBOARD 1100#ifndef QT_NO_CLIPBOARD
1101 QClipboard *cb = QApplication::clipboard(); 1101 QClipboard *cb = QApplication::clipboard();
1102 QDateTime dt = QDateTime::currentDateTime(); 1102 QDateTime dt = QDateTime::currentDateTime();
1103 cb->setText( dt.toString()); 1103 cb->setText( dt.toString());
1104 editor->paste(); 1104 editor->paste();
1105#endif 1105#endif
1106} 1106}
1107 1107
1108int TextEdit::savePrompt() 1108int TextEdit::savePrompt()
1109{ 1109{
1110 switch( QMessageBox::information( 0, (tr("Textedit")), 1110 switch( QMessageBox::information( 0, (tr("Textedit")),
1111 (tr("Textedit detected\n" 1111 (tr("Textedit detected\n"
1112 "you have unsaved changes\n" 1112 "you have unsaved changes\n"
1113 "Go ahead and save?\n")), 1113 "Go ahead and save?\n")),
1114 (tr("Save")), (tr("Don't Save")), (tr("&Cancel")), 2, 2 ) ) 1114 (tr("Save")), (tr("Don't Save")), (tr("&Cancel")), 2, 2 ) )
1115 { 1115 {
1116 case 0: 1116 case 0:
1117 { 1117 {
1118 return 1; 1118 return 1;
1119 } 1119 }
1120 break; 1120 break;
1121 1121
1122 case 1: 1122 case 1:
1123 { 1123 {
1124 return 2; 1124 return 2;
1125 } 1125 }
1126 break; 1126 break;
1127 1127
1128 case 2: 1128 case 2:
1129 { 1129 {
1130 return -1; 1130 return -1;
1131 } 1131 }
1132 break; 1132 break;
1133 }; 1133 };
1134 1134
1135 return 0; 1135 return 0;
1136} 1136}
1137 1137
1138void TextEdit::timerCrank() 1138void TextEdit::timerCrank()
1139{ 1139{
1140 if(featureAutoSave && edited1) 1140 if(featureAutoSave && edited1)
1141 { 1141 {
1142 if(currentFileName.isEmpty()) 1142 if(currentFileName.isEmpty())
1143 { 1143 {
1144 currentFileName = QDir::homeDirPath()+"/textedit.tmp"; 1144 currentFileName = QDir::homeDirPath()+"/textedit.tmp";
1145 saveAs(); 1145 saveAs();
1146 } 1146 }
1147 else 1147 else
1148 { 1148 {
1149// odebug << "autosave" << oendl; 1149// odebug << "autosave" << oendl;
1150 save(); 1150 save();
1151 } 1151 }
1152 setTimer(); 1152 setTimer();
1153 } 1153 }
1154} 1154}
1155 1155
1156void TextEdit::doTimer(bool b) 1156void TextEdit::doTimer(bool b)
1157{ 1157{
1158 Config cfg("TextEdit"); 1158 Config cfg("TextEdit");
1159 cfg.setGroup ( "View" ); 1159 cfg.setGroup ( "View" );
1160 cfg.writeEntry ( "autosave", b); 1160 cfg.writeEntry ( "autosave", b);
1161 featureAutoSave = b; 1161 featureAutoSave = b;
1162 nAutoSave->setOn(b); 1162 nAutoSave->setOn(b);
1163 if(b) 1163 if(b)
1164 { 1164 {
1165// odebug << "doTimer true" << oendl; 1165// odebug << "doTimer true" << oendl;
1166 setTimer(); 1166 setTimer();
1167 } 1167 }
1168// else 1168// else
1169// odebug << "doTimer false" << oendl; 1169// odebug << "doTimer false" << oendl;
1170} 1170}
1171 1171
1172void TextEdit::setTimer() 1172void TextEdit::setTimer()
1173{ 1173{
1174if(featureAutoSave) 1174if(featureAutoSave)
1175 { 1175 {
1176// odebug << "setting autosave" << oendl; 1176// odebug << "setting autosave" << oendl;
1177 QTimer *timer = new QTimer(this ); 1177 QTimer *timer = new QTimer(this );
1178 connect( timer, SIGNAL(timeout()), this, SLOT(timerCrank()) ); 1178 connect( timer, SIGNAL(timeout()), this, SLOT(timerCrank()) );
1179 timer->start( 300000, true); //5 minutes 1179 timer->start( 300000, true); //5 minutes
1180 } 1180 }
1181} 1181}
1182 1182
1183void TextEdit::gotoLine() { 1183void TextEdit::gotoLine() {
1184 if( editor->length() < 1) 1184 if( editor->length() < 1)
1185 return; 1185 return;
1186 QWidget *d = QApplication::desktop(); 1186 QWidget *d = QApplication::desktop();
1187 gotoEdit = new QLineEdit( 0, "Goto line"); 1187 gotoEdit = new QLineEdit( 0, "Goto line");
1188 1188
1189 gotoEdit->move( (d->width()/2) - ( gotoEdit->width()/2) , (d->height()/2) - (gotoEdit->height()/2)); 1189 gotoEdit->move( (d->width()/2) - ( gotoEdit->width()/2) , (d->height()/2) - (gotoEdit->height()/2));
1190 gotoEdit->setFrame(true); 1190 gotoEdit->setFrame(true);
1191 gotoEdit->show(); 1191 gotoEdit->show();
1192 connect (gotoEdit,SIGNAL(returnPressed()), this, SLOT(doGoto())); 1192 connect (gotoEdit,SIGNAL(returnPressed()), this, SLOT(doGoto()));
1193} 1193}
1194 1194
1195void TextEdit::doGoto() { 1195void TextEdit::doGoto() {
1196 QString number = gotoEdit->text(); 1196 QString number = gotoEdit->text();
1197 gotoEdit->hide(); 1197 gotoEdit->hide();
1198 1198
1199 if(gotoEdit) { 1199 if(gotoEdit) {
1200 delete gotoEdit; 1200 delete gotoEdit;
1201 gotoEdit = 0; 1201 gotoEdit = 0;
1202 } 1202 }
1203 1203
1204 bool ok; 1204 bool ok;
1205 int lineNumber = number.toInt(&ok, 10); 1205 int lineNumber = number.toInt(&ok, 10);
1206 if( editor->numLines() < lineNumber) 1206 if( editor->numLines() < lineNumber)
1207 QMessageBox::message(tr("Text Edit"),tr("Not enough lines")); 1207 QMessageBox::message(tr("Text Edit"),tr("Not enough lines"));
1208 else 1208 else
1209 { 1209 {
1210 editor->setCursorPosition(lineNumber, 0, false); 1210 editor->setCursorPosition(lineNumber, 0, false);
1211 } 1211 }
1212} 1212}
diff --git a/core/pim/datebook/dateentry.ui b/core/pim/datebook/dateentry.ui
index f776911..6e4ada1 100644
--- a/core/pim/datebook/dateentry.ui
+++ b/core/pim/datebook/dateentry.ui
@@ -1,661 +1,913 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>DateEntryBase</class> 2<class>DateEntryBase</class>
3<comment>********************************************************************* 3<comment>*********************************************************************
4** Copyright (C) 2000 Trolltech AS. All rights reserved. 4** Copyright (C) 2000 Trolltech AS. All rights reserved.
5** 5**
6** This file is part of Qtopia Environment. 6** This file is part of Qtopia Environment.
7** 7**
8** This file may be distributed and/or modified under the terms of the 8** This file may be distributed and/or modified under the terms of the
9** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file. 11** packaging of this file.
12** 12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15** 15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information. 16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17** 17**
18** Contact info@trolltech.com if any conditions of this licensing are 18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you. 19** not clear to you.
20** 20**
21** $Id$ 21** $Id$
22** 22**
23*********************************************************************</comment> 23*********************************************************************</comment>
24<widget> 24<widget>
25 <class>QWidget</class> 25 <class>QWidget</class>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>name</name> 27 <name>name</name>
28 <cstring>DateEntryBase</cstring> 28 <cstring>DateEntryBase</cstring>
29 </property> 29 </property>
30 <property stdset="1"> 30 <property stdset="1">
31 <name>geometry</name> 31 <name>geometry</name>
32 <rect> 32 <rect>
33 <x>0</x> 33 <x>0</x>
34 <y>0</y> 34 <y>0</y>
35 <width>242</width> 35 <width>286</width>
36 <height>339</height> 36 <height>396</height>
37 </rect> 37 </rect>
38 </property> 38 </property>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>caption</name> 40 <name>caption</name>
41 <string>New Event</string> 41 <string>New Event</string>
42 </property> 42 </property>
43 <property>
44 <name>layoutMargin</name>
45 </property>
46 <property>
47 <name>layoutSpacing</name>
48 </property>
43 <grid> 49 <grid>
44 <property stdset="1"> 50 <property stdset="1">
45 <name>margin</name> 51 <name>margin</name>
46 <number>2</number> 52 <number>2</number>
47 </property> 53 </property>
48 <property stdset="1"> 54 <property stdset="1">
49 <name>spacing</name> 55 <name>spacing</name>
50 <number>0</number> 56 <number>2</number>
51 </property> 57 </property>
52 <widget row="1" column="0" >
53 <class>QLabel</class>
54 <property stdset="1">
55 <name>name</name>
56 <cstring>TextLabel2</cstring>
57 </property>
58 <property stdset="1">
59 <name>frameShape</name>
60 <enum>MShape</enum>
61 </property>
62 <property stdset="1">
63 <name>frameShadow</name>
64 <enum>MShadow</enum>
65 </property>
66 <property stdset="1">
67 <name>text</name>
68 <string>Location</string>
69 </property>
70 </widget>
71 <widget row="2" column="0" >
72 <class>QLabel</class>
73 <property stdset="1">
74 <name>name</name>
75 <cstring>TextLabel2_2</cstring>
76 </property>
77 <property stdset="1">
78 <name>text</name>
79 <string>Category</string>
80 </property>
81 <property>
82 <name>buddy</name>
83 <cstring>comboPriority</cstring>
84 </property>
85 </widget>
86 <widget row="0" column="1" rowspan="1" colspan="3" >
87 <class>QComboBox</class>
88 <item>
89 <property>
90 <name>text</name>
91 <string></string>
92 </property>
93 </item>
94 <item>
95 <property>
96 <name>text</name>
97 <string>Meeting</string>
98 </property>
99 </item>
100 <item>
101 <property>
102 <name>text</name>
103 <string>Lunch</string>
104 </property>
105 </item>
106 <item>
107 <property>
108 <name>text</name>
109 <string>Dinner</string>
110 </property>
111 </item>
112 <item>
113 <property>
114 <name>text</name>
115 <string>Travel</string>
116 </property>
117 </item>
118 <property stdset="1">
119 <name>name</name>
120 <cstring>comboDescription</cstring>
121 </property>
122 <property stdset="1">
123 <name>sizePolicy</name>
124 <sizepolicy>
125 <hsizetype>3</hsizetype>
126 <vsizetype>0</vsizetype>
127 </sizepolicy>
128 </property>
129 <property stdset="1">
130 <name>editable</name>
131 <bool>true</bool>
132 </property>
133 <property stdset="1">
134 <name>currentItem</name>
135 <number>0</number>
136 </property>
137 <property stdset="1">
138 <name>duplicatesEnabled</name>
139 <bool>false</bool>
140 </property>
141 </widget>
142 <widget row="0" column="0" > 58 <widget row="0" column="0" >
143 <class>QLabel</class> 59 <class>QLayoutWidget</class>
144 <property stdset="1">
145 <name>name</name>
146 <cstring>TextLabel1</cstring>
147 </property>
148 <property stdset="1">
149 <name>text</name>
150 <string>Description </string>
151 </property>
152 </widget>
153 <widget row="1" column="1" rowspan="1" colspan="3" >
154 <class>QComboBox</class>
155 <item>
156 <property>
157 <name>text</name>
158 <string></string>
159 </property>
160 </item>
161 <item>
162 <property>
163 <name>text</name>
164 <string>Office</string>
165 </property>
166 </item>
167 <item>
168 <property>
169 <name>text</name>
170 <string>Home</string>
171 </property>
172 </item>
173 <property stdset="1">
174 <name>name</name>
175 <cstring>comboLocation</cstring>
176 </property>
177 <property stdset="1">
178 <name>sizePolicy</name>
179 <sizepolicy>
180 <hsizetype>3</hsizetype>
181 <vsizetype>0</vsizetype>
182 </sizepolicy>
183 </property>
184 <property stdset="1">
185 <name>editable</name>
186 <bool>true</bool>
187 </property>
188 <property stdset="1">
189 <name>currentItem</name>
190 <number>0</number>
191 </property>
192 <property stdset="1">
193 <name>duplicatesEnabled</name>
194 <bool>false</bool>
195 </property>
196 </widget>
197 <widget row="2" column="1" rowspan="1" colspan="3" >
198 <class>CategorySelect</class>
199 <property stdset="1">
200 <name>name</name>
201 <cstring>comboCategory</cstring>
202 </property>
203 <property stdset="1">
204 <name>sizePolicy</name>
205 <sizepolicy>
206 <hsizetype>3</hsizetype>
207 <vsizetype>1</vsizetype>
208 </sizepolicy>
209 </property>
210 </widget>
211 <widget row="3" column="0" rowspan="2" colspan="1" >
212 <class>QLabel</class>
213 <property stdset="1">
214 <name>name</name>
215 <cstring>TextLabel3</cstring>
216 </property>
217 <property stdset="1">
218 <name>text</name>
219 <string>Start - End </string>
220 </property>
221 </widget>
222 <widget row="3" column="1" >
223 <class>QPushButton</class>
224 <property stdset="1">
225 <name>name</name>
226 <cstring>buttonStart</cstring>
227 </property>
228 <property stdset="1">
229 <name>minimumSize</name>
230 <size>
231 <width>70</width>
232 <height>0</height>
233 </size>
234 </property>
235 <property stdset="1">
236 <name>maximumSize</name>
237 <size>
238 <width>70</width>
239 <height>32767</height>
240 </size>
241 </property>
242 <property stdset="1">
243 <name>text</name>
244 <string>Jan 02 00</string>
245 </property>
246 </widget>
247 <widget row="4" column="1" >
248 <class>QLineEdit</class>
249 <property stdset="1">
250 <name>name</name>
251 <cstring>comboStart</cstring>
252 </property>
253 <property stdset="1">
254 <name>sizePolicy</name>
255 <sizepolicy>
256 <hsizetype>3</hsizetype>
257 <vsizetype>0</vsizetype>
258 </sizepolicy>
259 </property>
260 <property stdset="1">
261 <name>minimumSize</name>
262 <size>
263 <width>70</width>
264 <height>0</height>
265 </size>
266 </property>
267 <property stdset="1">
268 <name>maximumSize</name>
269 <size>
270 <width>70</width>
271 <height>32767</height>
272 </size>
273 </property>
274 <property stdset="1">
275 <name>alignment</name>
276 <set>AlignHCenter</set>
277 </property>
278 <property>
279 <name>hAlign</name>
280 </property>
281 </widget>
282 <spacer row="3" column="2" rowspan="2" colspan="1" >
283 <property>
284 <name>name</name>
285 <cstring>Spacer1_2</cstring>
286 </property>
287 <property stdset="1">
288 <name>orientation</name>
289 <enum>Horizontal</enum>
290 </property>
291 <property stdset="1">
292 <name>sizeType</name>
293 <enum>Expanding</enum>
294 </property>
295 <property>
296 <name>sizeHint</name>
297 <size>
298 <width>20</width>
299 <height>20</height>
300 </size>
301 </property>
302 </spacer>
303 <widget row="5" column="1" rowspan="1" colspan="3" >
304 <class>TimePicker</class>
305 <property stdset="1">
306 <name>name</name>
307 <cstring>timePickerStart</cstring>
308 </property>
309 <property stdset="1">
310 <name>sizePolicy</name>
311 <sizepolicy>
312 <hsizetype>3</hsizetype>
313 <vsizetype>1</vsizetype>
314 </sizepolicy>
315 </property>
316 </widget>
317 <widget row="3" column="3" >
318 <class>QPushButton</class>
319 <property stdset="1">
320 <name>name</name>
321 <cstring>buttonEnd</cstring>
322 </property>
323 <property stdset="1">
324 <name>minimumSize</name>
325 <size>
326 <width>70</width>
327 <height>0</height>
328 </size>
329 </property>
330 <property stdset="1">
331 <name>maximumSize</name>
332 <size>
333 <width>70</width>
334 <height>32767</height>
335 </size>
336 </property>
337 <property stdset="1">
338 <name>text</name>
339 <string>Jan 02 00</string>
340 </property>
341 </widget>
342 <widget row="4" column="3" >
343 <class>QLineEdit</class>
344 <property stdset="1"> 60 <property stdset="1">
345 <name>name</name> 61 <name>name</name>
346 <cstring>comboEnd</cstring> 62 <cstring>Layout19</cstring>
347 </property> 63 </property>
348 <property stdset="1"> 64 <vbox>
349 <name>sizePolicy</name> 65 <property stdset="1">
350 <sizepolicy> 66 <name>margin</name>
351 <hsizetype>3</hsizetype> 67 <number>0</number>
352 <vsizetype>0</vsizetype>
353 </sizepolicy>
354 </property>
355 <property stdset="1">
356 <name>minimumSize</name>
357 <size>
358 <width>70</width>
359 <height>0</height>
360 </size>
361 </property>
362 <property stdset="1">
363 <name>maximumSize</name>
364 <size>
365 <width>70</width>
366 <height>32767</height>
367 </size>
368 </property>
369 <property stdset="1">
370 <name>alignment</name>
371 <set>AlignHCenter</set>
372 </property>
373 <property>
374 <name>hAlign</name>
375 </property>
376 </widget>
377 <widget row="5" column="0" >
378 <class>QLabel</class>
379 <property stdset="1">
380 <name>name</name>
381 <cstring>TimePickerLabel</cstring>
382 </property>
383 <property stdset="1">
384 <name>text</name>
385 <string>Start time</string>
386 </property>
387 </widget>
388 <widget row="6" column="0" >
389 <class>QCheckBox</class>
390 <property stdset="1">
391 <name>name</name>
392 <cstring>checkAllDay</cstring>
393 </property>
394 <property stdset="1">
395 <name>text</name>
396 <string>All day</string>
397 </property>
398 </widget>
399 <widget row="7" column="0" >
400 <class>QLabel</class>
401 <property stdset="1">
402 <name>name</name>
403 <cstring>TextLabel3_2_2</cstring>
404 </property>
405 <property stdset="1">
406 <name>text</name>
407 <string>Time zone</string>
408 </property>
409 </widget>
410 <widget row="7" column="1" rowspan="1" colspan="3" >
411 <class>TimeZoneSelector</class>
412 <property stdset="1">
413 <name>name</name>
414 <cstring>timezone</cstring>
415 </property>
416 <property stdset="1">
417 <name>sizePolicy</name>
418 <sizepolicy>
419 <hsizetype>3</hsizetype>
420 <vsizetype>1</vsizetype>
421 </sizepolicy>
422 </property>
423 </widget>
424 <widget row="8" column="0" >
425 <class>QCheckBox</class>
426 <property stdset="1">
427 <name>name</name>
428 <cstring>checkAlarm</cstring>
429 </property>
430 <property stdset="1">
431 <name>enabled</name>
432 <bool>true</bool>
433 </property>
434 <property stdset="1">
435 <name>autoMask</name>
436 <bool>false</bool>
437 </property>
438 <property stdset="1">
439 <name>text</name>
440 <string>&amp;Alarm</string>
441 </property>
442 <property stdset="1">
443 <name>checked</name>
444 <bool>false</bool>
445 </property>
446 </widget>
447 <widget row="8" column="1" rowspan="1" colspan="2" >
448 <class>QSpinBox</class>
449 <property stdset="1">
450 <name>name</name>
451 <cstring>spinAlarm</cstring>
452 </property>
453 <property stdset="1">
454 <name>enabled</name>
455 <bool>false</bool>
456 </property>
457 <property stdset="1">
458 <name>suffix</name>
459 <string> minutes</string>
460 </property>
461 <property stdset="1">
462 <name>maxValue</name>
463 <number>180</number>
464 </property>
465 <property stdset="1">
466 <name>minValue</name>
467 <number>0</number>
468 </property>
469 <property stdset="1">
470 <name>lineStep</name>
471 <number>5</number>
472 </property>
473 <property stdset="1">
474 <name>value</name>
475 <number>5</number>
476 </property>
477 </widget>
478 <widget row="8" column="3" >
479 <class>QComboBox</class>
480 <item>
481 <property>
482 <name>text</name>
483 <string>Silent</string>
484 </property> 68 </property>
485 </item> 69 <property stdset="1">
486 <item> 70 <name>spacing</name>
487 <property> 71 <number>6</number>
488 <name>text</name>
489 <string>Loud</string>
490 </property> 72 </property>
491 </item> 73 <widget>
492 <property stdset="1"> 74 <class>QLayoutWidget</class>
493 <name>name</name> 75 <property stdset="1">
494 <cstring>comboSound</cstring> 76 <name>name</name>
495 </property> 77 <cstring>Layout1</cstring>
496 <property stdset="1"> 78 </property>
497 <name>enabled</name> 79 <hbox>
498 <bool>false</bool> 80 <property stdset="1">
499 </property> 81 <name>margin</name>
500 </widget> 82 <number>0</number>
501 <widget row="9" column="0" > 83 </property>
502 <class>QLabel</class> 84 <property stdset="1">
503 <property stdset="1"> 85 <name>spacing</name>
504 <name>name</name> 86 <number>6</number>
505 <cstring>lblRepeat</cstring> 87 </property>
506 </property> 88 <widget>
507 <property stdset="1"> 89 <class>QLabel</class>
508 <name>text</name> 90 <property stdset="1">
509 <string>Repeat</string> 91 <name>name</name>
510 </property> 92 <cstring>TextLabel1</cstring>
511 </widget> 93 </property>
512 <widget row="9" column="1" rowspan="1" colspan="3" > 94 <property stdset="1">
513 <class>QToolButton</class> 95 <name>text</name>
514 <property stdset="1"> 96 <string>Description </string>
515 <name>name</name> 97 </property>
516 <cstring>cmdRepeat</cstring> 98 </widget>
517 </property> 99 <widget>
518 <property stdset="1"> 100 <class>QComboBox</class>
519 <name>sizePolicy</name> 101 <item>
520 <sizepolicy> 102 <property>
521 <hsizetype>3</hsizetype> 103 <name>text</name>
522 <vsizetype>0</vsizetype> 104 <string></string>
523 </sizepolicy> 105 </property>
524 </property> 106 </item>
525 <property stdset="1"> 107 <item>
526 <name>focusPolicy</name> 108 <property>
527 <enum>TabFocus</enum> 109 <name>text</name>
528 </property> 110 <string>Meeting</string>
529 <property stdset="1"> 111 </property>
530 <name>text</name> 112 </item>
531 <string>No Repeat...</string> 113 <item>
532 </property> 114 <property>
533 </widget> 115 <name>text</name>
534 <widget row="10" column="0" rowspan="1" colspan="4" > 116 <string>Lunch</string>
535 <class>QToolButton</class> 117 </property>
536 <property stdset="1"> 118 </item>
537 <name>name</name> 119 <item>
538 <cstring>editNote</cstring> 120 <property>
539 </property> 121 <name>text</name>
540 <property stdset="1"> 122 <string>Dinner</string>
541 <name>text</name> 123 </property>
542 <string>Note...</string> 124 </item>
543 </property> 125 <item>
126 <property>
127 <name>text</name>
128 <string>Travel</string>
129 </property>
130 </item>
131 <property stdset="1">
132 <name>name</name>
133 <cstring>comboDescription</cstring>
134 </property>
135 <property stdset="1">
136 <name>sizePolicy</name>
137 <sizepolicy>
138 <hsizetype>3</hsizetype>
139 <vsizetype>0</vsizetype>
140 </sizepolicy>
141 </property>
142 <property stdset="1">
143 <name>editable</name>
144 <bool>true</bool>
145 </property>
146 <property stdset="1">
147 <name>currentItem</name>
148 <number>0</number>
149 </property>
150 <property stdset="1">
151 <name>duplicatesEnabled</name>
152 <bool>false</bool>
153 </property>
154 </widget>
155 </hbox>
156 </widget>
157 <widget>
158 <class>QLayoutWidget</class>
159 <property stdset="1">
160 <name>name</name>
161 <cstring>Layout2</cstring>
162 </property>
163 <hbox>
164 <property stdset="1">
165 <name>margin</name>
166 <number>0</number>
167 </property>
168 <property stdset="1">
169 <name>spacing</name>
170 <number>6</number>
171 </property>
172 <widget>
173 <class>QLabel</class>
174 <property stdset="1">
175 <name>name</name>
176 <cstring>TextLabel2</cstring>
177 </property>
178 <property stdset="1">
179 <name>frameShape</name>
180 <enum>MShape</enum>
181 </property>
182 <property stdset="1">
183 <name>frameShadow</name>
184 <enum>MShadow</enum>
185 </property>
186 <property stdset="1">
187 <name>text</name>
188 <string>Location</string>
189 </property>
190 </widget>
191 <widget>
192 <class>QComboBox</class>
193 <item>
194 <property>
195 <name>text</name>
196 <string></string>
197 </property>
198 </item>
199 <item>
200 <property>
201 <name>text</name>
202 <string>Office</string>
203 </property>
204 </item>
205 <item>
206 <property>
207 <name>text</name>
208 <string>Home</string>
209 </property>
210 </item>
211 <property stdset="1">
212 <name>name</name>
213 <cstring>comboLocation</cstring>
214 </property>
215 <property stdset="1">
216 <name>sizePolicy</name>
217 <sizepolicy>
218 <hsizetype>3</hsizetype>
219 <vsizetype>0</vsizetype>
220 </sizepolicy>
221 </property>
222 <property stdset="1">
223 <name>editable</name>
224 <bool>true</bool>
225 </property>
226 <property stdset="1">
227 <name>currentItem</name>
228 <number>0</number>
229 </property>
230 <property stdset="1">
231 <name>duplicatesEnabled</name>
232 <bool>false</bool>
233 </property>
234 </widget>
235 </hbox>
236 </widget>
237 <widget>
238 <class>QLayoutWidget</class>
239 <property stdset="1">
240 <name>name</name>
241 <cstring>Layout3</cstring>
242 </property>
243 <hbox>
244 <property stdset="1">
245 <name>margin</name>
246 <number>0</number>
247 </property>
248 <property stdset="1">
249 <name>spacing</name>
250 <number>6</number>
251 </property>
252 <widget>
253 <class>QLabel</class>
254 <property stdset="1">
255 <name>name</name>
256 <cstring>TextLabel2_2</cstring>
257 </property>
258 <property stdset="1">
259 <name>text</name>
260 <string>Category</string>
261 </property>
262 <property>
263 <name>buddy</name>
264 <cstring>comboPriority</cstring>
265 </property>
266 </widget>
267 <widget>
268 <class>CategorySelect</class>
269 <property stdset="1">
270 <name>name</name>
271 <cstring>comboCategory</cstring>
272 </property>
273 <property stdset="1">
274 <name>sizePolicy</name>
275 <sizepolicy>
276 <hsizetype>3</hsizetype>
277 <vsizetype>1</vsizetype>
278 </sizepolicy>
279 </property>
280 </widget>
281 </hbox>
282 </widget>
283 <widget>
284 <class>QLayoutWidget</class>
285 <property stdset="1">
286 <name>name</name>
287 <cstring>Layout18</cstring>
288 </property>
289 <hbox>
290 <property stdset="1">
291 <name>margin</name>
292 <number>0</number>
293 </property>
294 <property stdset="1">
295 <name>spacing</name>
296 <number>6</number>
297 </property>
298 <widget>
299 <class>QLayoutWidget</class>
300 <property stdset="1">
301 <name>name</name>
302 <cstring>Layout17</cstring>
303 </property>
304 <vbox>
305 <property stdset="1">
306 <name>margin</name>
307 <number>0</number>
308 </property>
309 <property stdset="1">
310 <name>spacing</name>
311 <number>6</number>
312 </property>
313 <widget>
314 <class>QLabel</class>
315 <property stdset="1">
316 <name>name</name>
317 <cstring>TextLabel3</cstring>
318 </property>
319 <property stdset="1">
320 <name>text</name>
321 <string>Start - End </string>
322 </property>
323 </widget>
324 </vbox>
325 </widget>
326 <widget>
327 <class>QLayoutWidget</class>
328 <property stdset="1">
329 <name>name</name>
330 <cstring>Layout4</cstring>
331 </property>
332 <vbox>
333 <property stdset="1">
334 <name>margin</name>
335 <number>0</number>
336 </property>
337 <property stdset="1">
338 <name>spacing</name>
339 <number>6</number>
340 </property>
341 <widget>
342 <class>QPushButton</class>
343 <property stdset="1">
344 <name>name</name>
345 <cstring>buttonStart</cstring>
346 </property>
347 <property stdset="1">
348 <name>minimumSize</name>
349 <size>
350 <width>70</width>
351 <height>0</height>
352 </size>
353 </property>
354 <property stdset="1">
355 <name>maximumSize</name>
356 <size>
357 <width>70</width>
358 <height>32767</height>
359 </size>
360 </property>
361 <property stdset="1">
362 <name>text</name>
363 <string>Jan 02 00</string>
364 </property>
365 </widget>
366 <widget>
367 <class>QLineEdit</class>
368 <property stdset="1">
369 <name>name</name>
370 <cstring>comboStart</cstring>
371 </property>
372 <property stdset="1">
373 <name>sizePolicy</name>
374 <sizepolicy>
375 <hsizetype>3</hsizetype>
376 <vsizetype>0</vsizetype>
377 </sizepolicy>
378 </property>
379 <property stdset="1">
380 <name>minimumSize</name>
381 <size>
382 <width>70</width>
383 <height>0</height>
384 </size>
385 </property>
386 <property stdset="1">
387 <name>maximumSize</name>
388 <size>
389 <width>70</width>
390 <height>32767</height>
391 </size>
392 </property>
393 <property stdset="1">
394 <name>alignment</name>
395 <set>AlignHCenter</set>
396 </property>
397 <property>
398 <name>hAlign</name>
399 </property>
400 </widget>
401 </vbox>
402 </widget>
403 <spacer>
404 <property>
405 <name>name</name>
406 <cstring>Spacer12</cstring>
407 </property>
408 <property stdset="1">
409 <name>orientation</name>
410 <enum>Horizontal</enum>
411 </property>
412 <property stdset="1">
413 <name>sizeType</name>
414 <enum>Expanding</enum>
415 </property>
416 <property>
417 <name>sizeHint</name>
418 <size>
419 <width>20</width>
420 <height>20</height>
421 </size>
422 </property>
423 </spacer>
424 <widget>
425 <class>QLayoutWidget</class>
426 <property stdset="1">
427 <name>name</name>
428 <cstring>Layout5</cstring>
429 </property>
430 <vbox>
431 <property stdset="1">
432 <name>margin</name>
433 <number>0</number>
434 </property>
435 <property stdset="1">
436 <name>spacing</name>
437 <number>6</number>
438 </property>
439 <widget>
440 <class>QPushButton</class>
441 <property stdset="1">
442 <name>name</name>
443 <cstring>buttonEnd</cstring>
444 </property>
445 <property stdset="1">
446 <name>minimumSize</name>
447 <size>
448 <width>70</width>
449 <height>0</height>
450 </size>
451 </property>
452 <property stdset="1">
453 <name>maximumSize</name>
454 <size>
455 <width>70</width>
456 <height>32767</height>
457 </size>
458 </property>
459 <property stdset="1">
460 <name>text</name>
461 <string>Jan 02 00</string>
462 </property>
463 </widget>
464 <widget>
465 <class>QLineEdit</class>
466 <property stdset="1">
467 <name>name</name>
468 <cstring>comboEnd</cstring>
469 </property>
470 <property stdset="1">
471 <name>sizePolicy</name>
472 <sizepolicy>
473 <hsizetype>3</hsizetype>
474 <vsizetype>0</vsizetype>
475 </sizepolicy>
476 </property>
477 <property stdset="1">
478 <name>minimumSize</name>
479 <size>
480 <width>70</width>
481 <height>0</height>
482 </size>
483 </property>
484 <property stdset="1">
485 <name>maximumSize</name>
486 <size>
487 <width>70</width>
488 <height>32767</height>
489 </size>
490 </property>
491 <property stdset="1">
492 <name>alignment</name>
493 <set>AlignHCenter</set>
494 </property>
495 <property>
496 <name>hAlign</name>
497 </property>
498 </widget>
499 </vbox>
500 </widget>
501 </hbox>
502 </widget>
503 <widget>
504 <class>QLayoutWidget</class>
505 <property stdset="1">
506 <name>name</name>
507 <cstring>Layout7</cstring>
508 </property>
509 <hbox>
510 <property stdset="1">
511 <name>margin</name>
512 <number>0</number>
513 </property>
514 <property stdset="1">
515 <name>spacing</name>
516 <number>6</number>
517 </property>
518 <widget>
519 <class>QLabel</class>
520 <property stdset="1">
521 <name>name</name>
522 <cstring>TimePickerLabel</cstring>
523 </property>
524 <property stdset="1">
525 <name>text</name>
526 <string>Start time</string>
527 </property>
528 </widget>
529 <widget>
530 <class>TimePicker</class>
531 <property stdset="1">
532 <name>name</name>
533 <cstring>timePickerStart</cstring>
534 </property>
535 <property stdset="1">
536 <name>sizePolicy</name>
537 <sizepolicy>
538 <hsizetype>3</hsizetype>
539 <vsizetype>1</vsizetype>
540 </sizepolicy>
541 </property>
542 </widget>
543 </hbox>
544 </widget>
545 <widget>
546 <class>QCheckBox</class>
547 <property stdset="1">
548 <name>name</name>
549 <cstring>checkAllDay</cstring>
550 </property>
551 <property stdset="1">
552 <name>text</name>
553 <string>All day</string>
554 </property>
555 </widget>
556 <widget>
557 <class>QLayoutWidget</class>
558 <property stdset="1">
559 <name>name</name>
560 <cstring>Layout8</cstring>
561 </property>
562 <hbox>
563 <property stdset="1">
564 <name>margin</name>
565 <number>0</number>
566 </property>
567 <property stdset="1">
568 <name>spacing</name>
569 <number>6</number>
570 </property>
571 <widget>
572 <class>QLabel</class>
573 <property stdset="1">
574 <name>name</name>
575 <cstring>TextLabel3_2_2</cstring>
576 </property>
577 <property stdset="1">
578 <name>text</name>
579 <string>Time zone</string>
580 </property>
581 </widget>
582 <widget>
583 <class>TimeZoneSelector</class>
584 <property stdset="1">
585 <name>name</name>
586 <cstring>timezone</cstring>
587 </property>
588 <property stdset="1">
589 <name>sizePolicy</name>
590 <sizepolicy>
591 <hsizetype>3</hsizetype>
592 <vsizetype>1</vsizetype>
593 </sizepolicy>
594 </property>
595 </widget>
596 </hbox>
597 </widget>
598 <widget>
599 <class>QLayoutWidget</class>
600 <property stdset="1">
601 <name>name</name>
602 <cstring>Layout9</cstring>
603 </property>
604 <property>
605 <name>layoutSpacing</name>
606 </property>
607 <hbox>
608 <property stdset="1">
609 <name>margin</name>
610 <number>0</number>
611 </property>
612 <property stdset="1">
613 <name>spacing</name>
614 <number>1</number>
615 </property>
616 <widget>
617 <class>QCheckBox</class>
618 <property stdset="1">
619 <name>name</name>
620 <cstring>checkAlarm</cstring>
621 </property>
622 <property stdset="1">
623 <name>enabled</name>
624 <bool>true</bool>
625 </property>
626 <property stdset="1">
627 <name>autoMask</name>
628 <bool>false</bool>
629 </property>
630 <property stdset="1">
631 <name>text</name>
632 <string>&amp;Alarm</string>
633 </property>
634 <property stdset="1">
635 <name>checked</name>
636 <bool>false</bool>
637 </property>
638 </widget>
639 <widget>
640 <class>QSpinBox</class>
641 <property stdset="1">
642 <name>name</name>
643 <cstring>spinAlarm</cstring>
644 </property>
645 <property stdset="1">
646 <name>enabled</name>
647 <bool>false</bool>
648 </property>
649 <property stdset="1">
650 <name>suffix</name>
651 <string></string>
652 </property>
653 <property stdset="1">
654 <name>maxValue</name>
655 <number>180</number>
656 </property>
657 <property stdset="1">
658 <name>minValue</name>
659 <number>0</number>
660 </property>
661 <property stdset="1">
662 <name>lineStep</name>
663 <number>1</number>
664 </property>
665 <property stdset="1">
666 <name>value</name>
667 <number>5</number>
668 </property>
669 </widget>
670 <widget>
671 <class>QComboBox</class>
672 <item>
673 <property>
674 <name>text</name>
675 <string>minutes</string>
676 </property>
677 </item>
678 <item>
679 <property>
680 <name>text</name>
681 <string>hours</string>
682 </property>
683 </item>
684 <item>
685 <property>
686 <name>text</name>
687 <string>days</string>
688 </property>
689 </item>
690 <property stdset="1">
691 <name>name</name>
692 <cstring>ComboInterval</cstring>
693 </property>
694 <property stdset="1">
695 <name>enabled</name>
696 <bool>false</bool>
697 </property>
698 <property stdset="1">
699 <name>currentItem</name>
700 <number>0</number>
701 </property>
702 </widget>
703 <widget>
704 <class>QComboBox</class>
705 <item>
706 <property>
707 <name>text</name>
708 <string>Silent</string>
709 </property>
710 </item>
711 <item>
712 <property>
713 <name>text</name>
714 <string>Loud</string>
715 </property>
716 </item>
717 <property stdset="1">
718 <name>name</name>
719 <cstring>comboSound</cstring>
720 </property>
721 <property stdset="1">
722 <name>enabled</name>
723 <bool>false</bool>
724 </property>
725 </widget>
726 </hbox>
727 </widget>
728 <widget>
729 <class>QLayoutWidget</class>
730 <property stdset="1">
731 <name>name</name>
732 <cstring>Layout11</cstring>
733 </property>
734 <hbox>
735 <property stdset="1">
736 <name>margin</name>
737 <number>0</number>
738 </property>
739 <property stdset="1">
740 <name>spacing</name>
741 <number>6</number>
742 </property>
743 <widget>
744 <class>QLabel</class>
745 <property stdset="1">
746 <name>name</name>
747 <cstring>lblRepeat</cstring>
748 </property>
749 <property stdset="1">
750 <name>text</name>
751 <string>Repeat</string>
752 </property>
753 </widget>
754 <widget>
755 <class>QToolButton</class>
756 <property stdset="1">
757 <name>name</name>
758 <cstring>cmdRepeat</cstring>
759 </property>
760 <property stdset="1">
761 <name>sizePolicy</name>
762 <sizepolicy>
763 <hsizetype>3</hsizetype>
764 <vsizetype>0</vsizetype>
765 </sizepolicy>
766 </property>
767 <property stdset="1">
768 <name>focusPolicy</name>
769 <enum>TabFocus</enum>
770 </property>
771 <property stdset="1">
772 <name>text</name>
773 <string>No Repeat...</string>
774 </property>
775 </widget>
776 </hbox>
777 </widget>
778 <widget>
779 <class>QToolButton</class>
780 <property stdset="1">
781 <name>name</name>
782 <cstring>editNote</cstring>
783 </property>
784 <property stdset="1">
785 <name>text</name>
786 <string>Note...</string>
787 </property>
788 </widget>
789 </vbox>
544 </widget> 790 </widget>
545 </grid> 791 </grid>
546</widget> 792</widget>
547<customwidgets> 793<customwidgets>
548 <customwidget> 794 <customwidget>
549 <class>TimeZoneSelector</class> 795 <class>TimeZoneSelector</class>
550 <header location="global">qpe/tzselect.h</header> 796 <header location="global">qpe/tzselect.h</header>
551 <sizehint> 797 <sizehint>
552 <width>21</width> 798 <width>21</width>
553 <height>10</height> 799 <height>10</height>
554 </sizehint> 800 </sizehint>
555 <container>0</container> 801 <container>0</container>
556 <sizepolicy> 802 <sizepolicy>
557 <hordata>7</hordata> 803 <hordata>7</hordata>
558 <verdata>1</verdata> 804 <verdata>1</verdata>
559 </sizepolicy> 805 </sizepolicy>
560 <pixmap>image0</pixmap> 806 <pixmap>image0</pixmap>
561 </customwidget> 807 </customwidget>
562 <customwidget> 808 <customwidget>
563 <class>CategorySelect</class> 809 <class>CategorySelect</class>
564 <header location="global">qpe/categoryselect.h</header> 810 <header location="global">qpe/categoryselect.h</header>
565 <sizehint> 811 <sizehint>
566 <width>-1</width> 812 <width>-1</width>
567 <height>-1</height> 813 <height>-1</height>
568 </sizehint> 814 </sizehint>
569 <container>0</container> 815 <container>0</container>
570 <sizepolicy> 816 <sizepolicy>
571 <hordata>7</hordata> 817 <hordata>7</hordata>
572 <verdata>1</verdata> 818 <verdata>1</verdata>
573 </sizepolicy> 819 </sizepolicy>
574 <pixmap>image1</pixmap> 820 <pixmap>image1</pixmap>
575 </customwidget> 821 </customwidget>
576 <customwidget> 822 <customwidget>
577 <class>TimePicker</class> 823 <class>TimePicker</class>
578 <header location="local">namespace_hack.h</header> 824 <header location="local">namespace_hack.h</header>
579 <sizehint> 825 <sizehint>
580 <width>-1</width> 826 <width>-1</width>
581 <height>-1</height> 827 <height>-1</height>
582 </sizehint> 828 </sizehint>
583 <container>0</container> 829 <container>0</container>
584 <sizepolicy> 830 <sizepolicy>
585 <hordata>7</hordata> 831 <hordata>7</hordata>
586 <verdata>1</verdata> 832 <verdata>1</verdata>
587 </sizepolicy> 833 </sizepolicy>
588 <pixmap>image1</pixmap> 834 <pixmap>image1</pixmap>
589 </customwidget> 835 </customwidget>
590</customwidgets> 836</customwidgets>
591<images> 837<images>
592 <image> 838 <image>
593 <name>image0</name> 839 <name>image0</name>
594 <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data> 840 <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data>
595 </image> 841 </image>
596 <image> 842 <image>
597 <name>image1</name> 843 <name>image1</name>
598 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 844 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
599 </image> 845 </image>
600</images> 846</images>
601<connections> 847<connections>
602 <connection> 848 <connection>
603 <sender>checkAlarm</sender> 849 <sender>checkAlarm</sender>
604 <signal>toggled(bool)</signal> 850 <signal>toggled(bool)</signal>
605 <receiver>spinAlarm</receiver> 851 <receiver>spinAlarm</receiver>
606 <slot>setEnabled(bool)</slot> 852 <slot>setEnabled(bool)</slot>
607 </connection> 853 </connection>
608 <connection> 854 <connection>
609 <sender>comboEnd</sender> 855 <sender>comboEnd</sender>
610 <signal>textChanged(const QString&amp;)</signal> 856 <signal>textChanged(const QString&amp;)</signal>
611 <receiver>DateEntryBase</receiver> 857 <receiver>DateEntryBase</receiver>
612 <slot>endTimeChanged( const QString &amp; )</slot> 858 <slot>endTimeChanged( const QString &amp; )</slot>
613 </connection> 859 </connection>
614 <connection> 860 <connection>
615 <sender>cmdRepeat</sender> 861 <sender>cmdRepeat</sender>
616 <signal>clicked()</signal> 862 <signal>clicked()</signal>
617 <receiver>DateEntryBase</receiver> 863 <receiver>DateEntryBase</receiver>
618 <slot>slotRepeat()</slot> 864 <slot>slotRepeat()</slot>
619 </connection> 865 </connection>
620 <connection> 866 <connection>
621 <sender>comboStart</sender> 867 <sender>comboStart</sender>
622 <signal>textChanged(const QString &amp;)</signal> 868 <signal>textChanged(const QString &amp;)</signal>
623 <receiver>DateEntryBase</receiver> 869 <receiver>DateEntryBase</receiver>
624 <slot>startTimeEdited( const QString &amp; )</slot> 870 <slot>startTimeEdited( const QString &amp; )</slot>
625 </connection> 871 </connection>
626 <connection> 872 <connection>
627 <sender>checkAllDay</sender> 873 <sender>checkAllDay</sender>
628 <signal>toggled(bool)</signal> 874 <signal>toggled(bool)</signal>
629 <receiver>comboEnd</receiver> 875 <receiver>comboEnd</receiver>
630 <slot>setDisabled(bool)</slot> 876 <slot>setDisabled(bool)</slot>
631 </connection> 877 </connection>
632 <connection> 878 <connection>
633 <sender>checkAllDay</sender> 879 <sender>checkAllDay</sender>
634 <signal>toggled(bool)</signal> 880 <signal>toggled(bool)</signal>
635 <receiver>timePickerStart</receiver> 881 <receiver>timePickerStart</receiver>
636 <slot>setDisabled(bool)</slot> 882 <slot>setDisabled(bool)</slot>
637 </connection> 883 </connection>
638 <connection> 884 <connection>
639 <sender>checkAlarm</sender> 885 <sender>checkAlarm</sender>
640 <signal>toggled(bool)</signal> 886 <signal>toggled(bool)</signal>
641 <receiver>comboSound</receiver> 887 <receiver>comboSound</receiver>
642 <slot>setEnabled(bool)</slot> 888 <slot>setEnabled(bool)</slot>
643 </connection> 889 </connection>
644 <connection> 890 <connection>
645 <sender>checkAllDay</sender> 891 <sender>checkAllDay</sender>
646 <signal>toggled(bool)</signal> 892 <signal>toggled(bool)</signal>
647 <receiver>comboStart</receiver> 893 <receiver>comboStart</receiver>
648 <slot>setDisabled(bool)</slot> 894 <slot>setDisabled(bool)</slot>
649 </connection> 895 </connection>
896 <connection>
897 <sender>checkAlarm</sender>
898 <signal>toggled(bool)</signal>
899 <receiver>ComboInterval</receiver>
900 <slot>setEnabled(bool)</slot>
901 </connection>
650 <slot access="public">endDateChanged( const QString &amp; )</slot> 902 <slot access="public">endDateChanged( const QString &amp; )</slot>
651 <slot access="public">endDateChanged( int, int, int )</slot> 903 <slot access="public">endDateChanged( int, int, int )</slot>
652 <slot access="public">endTimeChanged( const QString &amp; )</slot> 904 <slot access="public">endTimeChanged( const QString &amp; )</slot>
653 <slot access="public">slotRepeat()</slot> 905 <slot access="public">slotRepeat()</slot>
654 <slot access="public">slotWait( int )</slot> 906 <slot access="public">slotWait( int )</slot>
655 <slot access="public">startDateChanged( const QString &amp; )</slot> 907 <slot access="public">startDateChanged( const QString &amp; )</slot>
656 <slot access="public">startDateChanged(int, int, int)</slot> 908 <slot access="public">startDateChanged(int, int, int)</slot>
657 <slot access="public">startTimeEdited( const QString &amp; )</slot> 909 <slot access="public">startTimeEdited( const QString &amp; )</slot>
658 <slot access="public">typeChanged( const QString &amp; )</slot> 910 <slot access="public">typeChanged( const QString &amp; )</slot>
659 <slot access="public">tzexecute(void)</slot> 911 <slot access="public">tzexecute(void)</slot>
660</connections> 912</connections>
661</UI> 913</UI>
diff --git a/inputmethods/dasher/opie-dasher-english.control b/inputmethods/dasher/opie-dasher-english.control
index 180f121..286b392 100644
--- a/inputmethods/dasher/opie-dasher-english.control
+++ b/inputmethods/dasher/opie-dasher-english.control
@@ -1,12 +1,12 @@
1Package: opie-dasher-english 1Package: opie-dasher-english
2Files: share/dasher/training_english_GB.txt 2Files: share/dasher/training_english_GB.txt
3Priority: optional 3Priority: optional
4Section: opie/inputmethods 4Section: opie/inputmethods
5Maintainer: Matthew Garrett <mjg59@srcf.ucam.org> 5Maintainer: Matthew Garrett <mjg59@srcf.ucam.org>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION$EXTRAVERSION 7Version: $QPE_VERSION$EXTRAVERSION
8Depends: opie-dasher 8Depends: opie-dasher libexpat0
9Description: Dasher text input method 9Description: Dasher text input method
10 Dasher is a novel zooming text entry method that allows significantly faster 10 Dasher is a novel zooming text entry method that allows significantly faster
11 text entry than traditional methods. This package provides the necessary 11 text entry than traditional methods. This package provides the necessary
12 data file to allow it to make predictions in English. 12 data file to allow it to make predictions in English.
diff --git a/noncore/applets/volumeapplet2/volumeapplet.cpp b/noncore/applets/volumeapplet2/volumeapplet.cpp
index 2f61f48..2122007 100644
--- a/noncore/applets/volumeapplet2/volumeapplet.cpp
+++ b/noncore/applets/volumeapplet2/volumeapplet.cpp
@@ -1,175 +1,213 @@
1/* 1/*
2 This file is part of the Opie Project 2 This file is part of the Opie Project
3 3
4 =. (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> 4 =. (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
5 .=l. 5 .=l.
6 .>+-= 6 .>+-=
7_;:, .> :=|. This program is free software; you can 7_;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under 8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public 9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software 10.="- .-=="i, .._ License as published by the Free Software
11- . .-<_> .<> Foundation; either version 2 of the License, 11- . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version. 12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_. 13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that 14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of 16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU 18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more 19..}^=.= = ; Library General Public License for more
20++= -. .` .: details. 20++= -. .` .: details.
21: = ...= . :.=- 21: = ...= . :.=-
22-. .:....=;==+<; You should have received a copy of the GNU 22-. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with 23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB. 24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28 28
29*/ 29*/
30 30
31#include "volumeapplet.h" 31#include "volumeapplet.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie2/odebug.h> 34#include <opie2/odebug.h>
35#include <opie2/otaskbarapplet.h> 35#include <opie2/otaskbarapplet.h>
36#include <opie2/osoundsystem.h> 36#include <opie2/osoundsystem.h>
37#include <opie2/oledbox.h> 37#include <opie2/oledbox.h>
38#include <opie2/oresource.h> 38#include <opie2/oresource.h>
39 39
40#include <qpe/applnk.h> 40#include <qpe/applnk.h>
41#include <qpe/qpeapplication.h>
41 42
42using namespace Opie::Core; 43using namespace Opie::Core;
43using namespace Opie::MM; 44using namespace Opie::MM;
44using namespace Opie::Ui; 45using namespace Opie::Ui;
45 46
46/* QT */ 47/* QT */
47#include <qpainter.h> 48#include <qpainter.h>
48#include <qlabel.h> 49#include <qlabel.h>
49#include <qlayout.h> 50#include <qlayout.h>
50#include <qslider.h> 51#include <qslider.h>
51 52
52/* STD */ 53/* STD */
53#include <assert.h> 54#include <assert.h>
54 55
55Channel::Channel( OMixerInterface* mixer, QWidget* parent, const char* name ) 56Channel::Channel( OMixerInterface* mixer, QWidget* parent, const char* name )
56 :QVBox( parent, name ) 57 :QVBox( parent, name )
57{ 58{
58 _name = new QLabel( name, this ); 59 _name = new QLabel( name, this );
59 _name->setFont( QFont( "Vera", 8 ) ); 60 _name->setFont( QFont( "Vera", 8 ) );
60 _volume = new QSlider( 0, 100, 10, mixer->volume( name ) & 0xff, QSlider::Vertical, this ); 61 _volume = new QSlider( 0, 100, 10, mixer->volume( name ) & 0xff, QSlider::Vertical, this );
61 _volume->setTickmarks( QSlider::Both ); 62 _volume->setTickmarks( QSlider::Both );
62 _volume->setTickInterval( 20 ); 63 _volume->setTickInterval( 20 );
63 _mute = new OLedBox( green, this ); 64 _mute = new OLedBox( green, this );
64 _mute->setFocusPolicy( QWidget::NoFocus ); 65 _mute->setFocusPolicy( QWidget::NoFocus );
65 _mute->setFixedSize( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 66 _mute->setFixedSize( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
66 _name->show(); 67 _name->show();
67 _volume->show(); 68 _volume->show();
68 _mute->show(); 69 _mute->show();
69} 70}
70 71
71 72
72Channel::~Channel() 73Channel::~Channel()
73{ 74{
74} 75}
75 76
76 77
77VolumeAppletControl::VolumeAppletControl( OTaskbarApplet* parent, const char* name ) 78VolumeAppletControl::VolumeAppletControl( OTaskbarApplet* parent, const char* name )
78 :QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), l(0) 79 :QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), l(0)
79{ 80{
80 setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); 81 setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
81 l = new QGridLayout( this ); 82 l = new QGridLayout( this );
82 build(); 83 build();
83} 84}
84 85
85 86
86void VolumeAppletControl::build() 87void VolumeAppletControl::build()
87{ 88{
88 OSoundSystem* sound = OSoundSystem::instance(); 89 OSoundSystem* sound = OSoundSystem::instance();
89 OSoundSystem::CardIterator it = sound->iterator(); 90 OSoundSystem::CardIterator it = sound->iterator();
90 91
91 OMixerInterface* mixer = new OMixerInterface( this, "/dev/mixer" ); 92// OMixerInterface*
93 mixer = new OMixerInterface( this, "/dev/mixer" );
92 94
93 QStringList channels = mixer->allChannels(); 95 QStringList channels = mixer->allChannels();
94 96
95 int x = 0; 97 int x = 0;
96 // int y = 0; 98 // int y = 0;
97 99
98 for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it ) 100 for ( QStringList::Iterator it = channels.begin(); it != channels.end(); ++it )
99 { 101 {
100 odebug << "OSSDEMO: Mixer has channel " << *it << "" << oendl; 102 if((*it) == mixer->volume( "Vol")) {
101 odebug << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff ) 103 m_vol_percent=mixer->volume( *it ) >> 8;
104 }
105 owarn << "OSSDEMO: Mixer has channel " << *it << "" << oendl;
106 owarn << "OSSDEMO: +--- volume " << ( mixer->volume( *it ) & 0xff )
102 << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl; 107 << " (left) | " << ( mixer->volume( *it ) >> 8 ) << " (right)" << oendl;
103 108
104 l->addWidget( new Channel( mixer, this, *it ), 0, x++, AlignCenter ); 109 l->addWidget( new Channel( mixer, this, *it ), 0, x++, AlignCenter );
105 } 110 }
106 111
107} 112}
108 113
109 114
110VolumeAppletControl::~VolumeAppletControl() 115VolumeAppletControl::~VolumeAppletControl()
111{ 116{
112} 117}
113 118
119int VolumeAppletControl::volPercent ( ) const
120{
121 return m_vol_percent;
122}
123
124bool VolumeAppletControl::volMuted ( ) const
125{
126 return m_vol_muted;
127}
128
114 129
115void VolumeAppletControl::showEvent( QShowEvent* e ) 130void VolumeAppletControl::showEvent( QShowEvent* e )
116{ 131{
117 odebug << "showEvent" << oendl; 132 odebug << "showEvent" << oendl;
118 QWidget::showEvent( e ); 133 QWidget::showEvent( e );
119} 134}
120 135
121 136
122void VolumeAppletControl::hideEvent( QHideEvent* e ) 137void VolumeAppletControl::hideEvent( QHideEvent* e )
123{ 138{
124 odebug << "hideEvent" << oendl; 139 odebug << "hideEvent" << oendl;
125 QWidget::hideEvent( e ); 140 QWidget::hideEvent( e );
126} 141}
127 142
128 143
129QSize VolumeAppletControl::sizeHint() const 144 QSize VolumeAppletControl::sizeHint() const
130{ 145 {
131 return QSize( 200, 200 ); //QFrame::sizeHint(); 146 int wd = QPEApplication::desktop()->width();
147 return QSize( wd, 200 ); //QFrame::sizeHint();
132} 148}
133 149
134 150
135VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) 151VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
136 :OTaskbarApplet( parent, name ) 152 :OTaskbarApplet( parent, name )
137{ 153{
138 setFixedHeight( AppLnk::smallIconSize() ); 154 setFixedHeight( AppLnk::smallIconSize() +4);
139 setFixedWidth( AppLnk::smallIconSize() ); 155 setFixedWidth( AppLnk::smallIconSize() );
140 _pixmap = Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ); 156 _pixmap = new QPixmap (Opie::Core::OResource::loadPixmap( "volume", Opie::Core::OResource::SmallIcon ));
141 _control = new VolumeAppletControl( this, "control" ); 157 _control = new VolumeAppletControl( this, "control" );
142} 158}
143 159
144 160
145VolumeApplet::~VolumeApplet() 161VolumeApplet::~VolumeApplet()
146{ 162{
147} 163}
148 164
149 165
150int VolumeApplet::position() 166int VolumeApplet::position()
151{ 167{
152 return 4; 168 return 4;
153} 169}
154 170
155 171
156void VolumeApplet::paintEvent( QPaintEvent* ) 172void VolumeApplet::paintEvent( QPaintEvent* )
157{ 173{
158 QPainter p(this); 174 QPainter p ( this );
159 p.drawPixmap(0, 2, _pixmap ); 175
176 p. drawPixmap ( (width()- _pixmap->width())/2, QMAX( (height()-4-_pixmap->height() )/2, 1), *_pixmap );
177 p. setPen ( darkGray );
178 p. drawRect ( 1, height() - 4, width() - 2, 4 );
179
180 OMixerInterface* mixer = new OMixerInterface( this, "/dev/mixer" );
181
182 int volPercent = mixer->volume( "Vol" ) >> 8;
183
184 int pixelsWide = volPercent * ( width() - 4 ) / 100;
185 p. fillRect ( 2, height() - 3, pixelsWide, 2, red );
186 p. fillRect ( pixelsWide + 2, height() - 3, width() - 4 - pixelsWide, 2, lightGray );
187
188// if ( _control-> volMuted ( )) {
189// p. setPen ( red );
190// p. drawLine ( 1, 2, width() - 2, height() - 5 );
191// p. drawLine ( 1, 3, width() - 2, height() - 4 );
192// p. drawLine ( width() - 2, 2, 1, height() - 5 );
193// p. drawLine ( width() - 2, 3, 1, height() - 4 );
194// }
195
196// QPainter p(this);
197 // p.drawPixmap(0, 2, _pixmap );
160} 198}
161 199
162 200
163void VolumeApplet::mousePressEvent( QMouseEvent* ) 201void VolumeApplet::mousePressEvent( QMouseEvent* )
164{ 202{
165 if ( !_control->isVisible() ) 203 if ( !_control->isVisible() )
166 { 204 {
167 popup( _control ); 205 popup( _control );
168 } 206 }
169 else 207 else
170 { 208 {
171 _control->hide(); 209 _control->hide();
172 } 210 }
173} 211}
174 212
175EXPORT_OPIE_APPLET_v1( VolumeApplet ) 213EXPORT_OPIE_APPLET_v1( VolumeApplet )
diff --git a/noncore/applets/volumeapplet2/volumeapplet.h b/noncore/applets/volumeapplet2/volumeapplet.h
index c1f1a3a..953c305 100644
--- a/noncore/applets/volumeapplet2/volumeapplet.h
+++ b/noncore/applets/volumeapplet2/volumeapplet.h
@@ -1,103 +1,112 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 3
4 =. (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de> 4 =. (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
5 .=l. 5 .=l.
6           .>+-= 6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can 7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under 8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software 10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License, 11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version. 12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_. 13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that 14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of 16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more 19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details. 20++=   -.     .`     .: details.
21 :     =  ...= . :.=- 21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU 22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with 23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB. 24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28 28
29*/ 29*/
30 30
31#ifndef VOLUMEAPPLET_H 31#ifndef VOLUMEAPPLET_H
32#define VOLUMEAPPLET_H 32#define VOLUMEAPPLET_H
33 33
34#include <opie2/otaskbarapplet.h> 34#include <opie2/otaskbarapplet.h>
35#include <opie2/osoundsystem.h>
35#include <qframe.h> 36#include <qframe.h>
36#include <qstring.h> 37#include <qstring.h>
37#include <qvbox.h> 38#include <qvbox.h>
38#include <qpixmap.h> 39#include <qpixmap.h>
40//using namespace Opie::MM;
39 41
40namespace Opie 42namespace Opie
41{ 43{
42 namespace Ui { class OLedBox; } 44 namespace Ui { class OLedBox; }
43 namespace MM { class OMixerInterface; } 45// namespace MM { class OMixerInterface; }
44} 46}
45class QLabel; 47class QLabel;
46class QSlider; 48class QSlider;
47class QShowEvent; 49class QShowEvent;
48class QHideEvent; 50class QHideEvent;
49class QGridLayout; 51class QGridLayout;
50 52
51class Channel : public QVBox 53class Channel : public QVBox
52{ 54{
53 public: 55 public:
54 Channel( Opie::MM::OMixerInterface* mixer, QWidget* parent, const char* name ); 56 Channel( Opie::MM::OMixerInterface* mixer, QWidget* parent, const char* name );
55 virtual ~Channel(); 57 virtual ~Channel();
56 58
57 // public slots: 59 // public slots:
58 // virtual void clicked(); 60 // virtual void clicked();
59 61
60 private: 62 private:
61 QLabel* _name; 63 QLabel* _name;
62 QSlider* _volume; 64 QSlider* _volume;
63 Opie::Ui::OLedBox* _mute; 65 Opie::Ui::OLedBox* _mute;
64 Opie::MM::OMixerInterface* _mixer; 66 Opie::MM::OMixerInterface* _mixer;
65}; 67};
66 68
67class VolumeAppletControl : public QFrame 69class VolumeAppletControl : public QFrame
68{ 70{
69 public: 71 public:
70 VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 ); 72 VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 );
71 ~VolumeAppletControl(); 73 ~VolumeAppletControl();
74 bool volMuted() const;
75 int volPercent() const;
76
77 int m_vol_percent;
78 bool m_vol_muted;
79
80 Opie::MM::OMixerInterface* mixer;
72 81
73 virtual QSize sizeHint() const; 82 virtual QSize sizeHint() const;
74 83
75 protected: 84 protected:
76 virtual void showEvent( QShowEvent* ); 85 virtual void showEvent( QShowEvent* );
77 virtual void hideEvent( QHideEvent* ); 86 virtual void hideEvent( QHideEvent* );
78 void build(); 87 void build();
79 88
80 private: 89 private:
90
81 QGridLayout* l; 91 QGridLayout* l;
82
83}; 92};
84 93
85 94
86class VolumeApplet : public Opie::Ui::OTaskbarApplet 95class VolumeApplet : public Opie::Ui::OTaskbarApplet
87{ 96{
88 public: 97 public:
89 VolumeApplet( QWidget* parent = 0, const char* name = 0 ); 98 VolumeApplet( QWidget* parent = 0, const char* name = 0 );
90 ~VolumeApplet(); 99 ~VolumeApplet();
91 100
92 static int position(); 101 static int position();
93 protected: 102 protected:
94 virtual void paintEvent( QPaintEvent* ); 103 virtual void paintEvent( QPaintEvent* );
95 virtual void mousePressEvent( QMouseEvent* ); 104 virtual void mousePressEvent( QMouseEvent* );
96 105
97 private: 106 private:
98 VolumeAppletControl* _control; 107 VolumeAppletControl* _control;
99 QPixmap _pixmap; 108 QPixmap* _pixmap;
100}; 109};
101 110
102#endif 111#endif
103 112
diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp
index feda198..95e619b 100644
--- a/noncore/apps/advancedfm/advancedfmData.cpp
+++ b/noncore/apps/advancedfm/advancedfmData.cpp
@@ -1,277 +1,282 @@
1/*************************************************************************** 1/***************************************************************************
2 advancedfmData.cpp 2 advancedfmData.cpp
3 ------------------- 3 -------------------
4** Created: Mon 09-23-2002 13:24:11 4** Created: Mon 09-23-2002 13:24:11
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12#include "advancedfm.h" 12#include "advancedfm.h"
13 13
14/* OPIE */ 14/* OPIE */
15#include <opie2/odebug.h> 15#include <opie2/odebug.h>
16#include <opie2/oresource.h> 16#include <opie2/oresource.h>
17#include <qpe/applnk.h> 17#include <qpe/applnk.h>
18#include <qpe/storage.h> 18#include <qpe/storage.h>
19#include <qpe/qpeapplication.h> 19#include <qpe/qpeapplication.h>
20#include <qpe/menubutton.h> 20#include <qpe/menubutton.h>
21using namespace Opie::Core; 21using namespace Opie::Core;
22using namespace Opie::Ui; 22using namespace Opie::Ui;
23 23
24/* QT */ 24/* QT */
25#include <qframe.h>
25#include <qlayout.h> 26#include <qlayout.h>
26#include <qhbox.h> 27#include <qhbox.h>
27#include <qmenubar.h> 28#include <qmenubar.h>
28#include <qcombobox.h> 29#include <qcombobox.h>
29#include <qtoolbutton.h> 30#include <qtoolbutton.h>
30#include <qlineedit.h> 31#include <qlineedit.h>
31#include <qlistview.h> 32#include <qlistview.h>
32 33
33/* STD */ 34/* STD */
34#include <sys/utsname.h> 35#include <sys/utsname.h>
35 36
36void AdvancedFm::init() { 37void AdvancedFm::init() {
37 b = false; 38 b = false;
38 setCaption( tr( "AdvancedFm" ) ); 39 setCaption( tr( "AdvancedFm" ) );
39 40
40 QVBoxLayout *layout = new QVBoxLayout( this ); 41// QFrame* frame = new QFrame(this);
42// setCentralWidget(frame);
43// QVBoxLayout *layout = new QVBoxLayout( frame );
44
45 QVBoxLayout *layout = new QVBoxLayout( this);
41 layout->setSpacing( 2); 46 layout->setSpacing( 2);
42 layout->setMargin( 0); // squeeze 47 layout->setMargin( 0); // squeeze
43 48
44 QMenuBar *menuBar = new QMenuBar(this); 49 QMenuBar *menuBar = new QMenuBar(this);
45 menuBar->setMargin( 0 ); // squeeze 50 menuBar->setMargin( 0 ); // squeeze
46 fileMenu = new QPopupMenu( this ); 51 fileMenu = new QPopupMenu( this );
47 viewMenu = new QPopupMenu( this ); 52 viewMenu = new QPopupMenu( this );
48// customDirMenu = new QPopupMenu( this ); 53// customDirMenu = new QPopupMenu( this );
49 54
50 layout->addWidget( menuBar ); 55 layout->addWidget( menuBar );
51 56
52 menuBar->insertItem( tr( "File" ), fileMenu); 57 menuBar->insertItem( tr( "File" ), fileMenu);
53 menuBar->insertItem( tr( "View" ), viewMenu); 58 menuBar->insertItem( tr( "View" ), viewMenu);
54 59
55 bool useBigIcon = qApp->desktop()->size().width() > 330; 60 bool useBigIcon = qApp->desktop()->size().width() > 330;
56 61
57 cdUpButton = new QToolButton( 0,"cdUpButton"); 62 cdUpButton = new QToolButton( 0,"cdUpButton");
58 cdUpButton->setUsesBigPixmap( useBigIcon ); 63 cdUpButton->setUsesBigPixmap( useBigIcon );
59 cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); 64 cdUpButton->setPixmap( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) );
60 cdUpButton->setAutoRaise( true ); 65 cdUpButton->setAutoRaise( true );
61 menuBar->insertItem( cdUpButton ); 66 menuBar->insertItem( cdUpButton );
62 67
63 qpeDirButton= new QToolButton( 0,"QPEButton"); 68 qpeDirButton= new QToolButton( 0,"QPEButton");
64 qpeDirButton->setUsesBigPixmap( useBigIcon ); 69 qpeDirButton->setUsesBigPixmap( useBigIcon );
65 qpeDirButton->setPixmap( Opie::Core::OResource::loadPixmap( "logo/opielogo", Opie::Core::OResource::SmallIcon ) ); 70 qpeDirButton->setPixmap( Opie::Core::OResource::loadPixmap( "logo/opielogo", Opie::Core::OResource::SmallIcon ) );
66 qpeDirButton->setAutoRaise( true ); 71 qpeDirButton->setAutoRaise( true );
67 menuBar->insertItem( qpeDirButton ); 72 menuBar->insertItem( qpeDirButton );
68 73
69 cfButton = new QToolButton( 0, "CFButton"); 74 cfButton = new QToolButton( 0, "CFButton");
70 cfButton->setUsesBigPixmap( useBigIcon ); 75 cfButton->setUsesBigPixmap( useBigIcon );
71 cfButton->setPixmap( Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ) ); 76 cfButton->setPixmap( Opie::Core::OResource::loadPixmap( "pcmcia", Opie::Core::OResource::SmallIcon ) );
72 cfButton->setAutoRaise( true ); 77 cfButton->setAutoRaise( true );
73 menuBar->insertItem( cfButton ); 78 menuBar->insertItem( cfButton );
74 79
75 sdButton = new QToolButton( 0, "SDButton"); 80 sdButton = new QToolButton( 0, "SDButton");
76 sdButton->setUsesBigPixmap( useBigIcon ); 81 sdButton->setUsesBigPixmap( useBigIcon );
77 sdButton->setPixmap( Opie::Core::OResource::loadPixmap( "advancedfm/sdcard", Opie::Core::OResource::SmallIcon ) ); 82 sdButton->setPixmap( Opie::Core::OResource::loadPixmap( "advancedfm/sdcard", Opie::Core::OResource::SmallIcon ) );
78 sdButton->setAutoRaise( true ); 83 sdButton->setAutoRaise( true );
79 menuBar->insertItem( sdButton ); 84 menuBar->insertItem( sdButton );
80 85
81 docButton = new QToolButton( 0,"docsButton"); 86 docButton = new QToolButton( 0,"docsButton");
82 docButton->setUsesBigPixmap( useBigIcon ); 87 docButton->setUsesBigPixmap( useBigIcon );
83 docButton->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) ); 88 docButton->setPixmap( Opie::Core::OResource::loadPixmap( "DocsIcon", Opie::Core::OResource::SmallIcon ) );
84 docButton->setAutoRaise( true ); 89 docButton->setAutoRaise( true );
85 menuBar->insertItem( docButton ); 90 menuBar->insertItem( docButton );
86 91
87 homeButton = new QToolButton( 0, "homeButton"); 92 homeButton = new QToolButton( 0, "homeButton");
88 homeButton->setUsesBigPixmap( useBigIcon ); 93 homeButton->setUsesBigPixmap( useBigIcon );
89 homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) ); 94 homeButton->setPixmap( Opie::Core::OResource::loadPixmap( "home", Opie::Core::OResource::SmallIcon ) );
90 homeButton->setAutoRaise( true ); 95 homeButton->setAutoRaise( true );
91 menuBar->insertItem( homeButton ); 96 menuBar->insertItem( homeButton );
92 97
93 fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() )); 98 fileMenu->insertItem( tr( "Show Hidden Files" ), this, SLOT( showMenuHidden() ));
94 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); 99 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
95 fileMenu->insertSeparator(); 100 fileMenu->insertSeparator();
96 fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() )); 101 fileMenu->insertItem( tr( "File Search" ), this, SLOT( openSearch() ));
97 fileMenu->insertSeparator(); 102 fileMenu->insertSeparator();
98 fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() )); 103 fileMenu->insertItem( tr( "Make Directory" ), this, SLOT( mkDir() ));
99 fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() )); 104 fileMenu->insertItem( tr( "Rename" ), this, SLOT( rn() ));
100 fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() )); 105 fileMenu->insertItem( tr( "Run Command" ), this, SLOT( runCommandStd() ));
101 fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() )); 106 fileMenu->insertItem( tr( "Run Command with Output" ), this, SLOT( runCommand() ));
102 fileMenu->insertSeparator(); 107 fileMenu->insertSeparator();
103 fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() )); 108 fileMenu->insertItem( tr( "Make Symlink" ), this, SLOT( mkSym() ));
104 fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() )); 109 fileMenu->insertItem( tr( "Select All" ), this, SLOT( selectAll() ));
105 fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() )); 110 fileMenu->insertItem( tr( "Add To Documents" ), this, SLOT( addToDocs() ));
106 fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() )); 111 fileMenu->insertItem( tr( "Delete" ), this, SLOT( del() ));
107 fileMenu->setCheckable(TRUE); 112 fileMenu->setCheckable(TRUE);
108 113
109 viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab())); 114 viewMenu->insertItem( tr( "Switch to View 1" ), this, SLOT( switchToLocalTab()));
110 viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab())); 115 viewMenu->insertItem( tr( "Switch to View 2" ), this, SLOT( switchToRemoteTab()));
111 viewMenu->insertItem( tr( "Refresh" ), this, SLOT( refreshCurrentTab())); 116 viewMenu->insertItem( tr( "Refresh" ), this, SLOT( refreshCurrentTab()));
112// viewMenu->insertSeparator(); 117// viewMenu->insertSeparator();
113// viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() )); 118// viewMenu->insertItem( tr( "About" ), this, SLOT( doAbout() ));
114 viewMenu->setCheckable(true); 119 viewMenu->setCheckable(true);
115 viewMenu->setItemChecked( viewMenu->idAt(0), true); 120 viewMenu->setItemChecked( viewMenu->idAt(0), true);
116 viewMenu->setItemChecked( viewMenu->idAt(1), false); 121 viewMenu->setItemChecked( viewMenu->idAt(1), false);
117 122
118 s_addBookmark = tr("Bookmark Directory"); 123 s_addBookmark = tr("Bookmark Directory");
119 s_removeBookmark = tr("Remove Current Directory from Bookmarks"); 124 s_removeBookmark = tr("Remove Current Directory from Bookmarks");
120 125
121// menuButton->insertItem(""); 126// menuButton->insertItem("");
122 127
123// customDirMenu->insertItem(tr("Add This Directory")); 128// customDirMenu->insertItem(tr("Add This Directory"));
124// customDirMenu->insertItem(tr("Remove This Directory")); 129// customDirMenu->insertItem(tr("Remove This Directory"));
125// customDirMenu->insertSeparator(); 130// customDirMenu->insertSeparator();
126 131
127 QHBoxLayout *CBHB = new QHBoxLayout(); // parent layout will be set later 132 QHBoxLayout *CBHB = new QHBoxLayout(); // parent layout will be set later
128 CBHB->setMargin( 0 ); 133 CBHB->setMargin( 0 );
129 CBHB->setSpacing( 1 ); 134 CBHB->setSpacing( 1 );
130 135
131 menuButton = new MenuButton( this ); 136 menuButton = new MenuButton( this );
132 137
133 menuButton->setUseLabel(false); 138 menuButton->setUseLabel(false);
134 menuButton->setMaximumWidth( 20 ); 139 menuButton->setMaximumWidth( 20 );
135 menuButton->insertItem( s_addBookmark); 140 menuButton->insertItem( s_addBookmark);
136 menuButton->insertItem( s_removeBookmark); 141 menuButton->insertItem( s_removeBookmark);
137 menuButton->insertSeparator(); 142 menuButton->insertSeparator();
138// menuButton->setFocusPolicy(NoFocus); 143// menuButton->setFocusPolicy(NoFocus);
139 CBHB->addWidget( menuButton ); 144 CBHB->addWidget( menuButton );
140 145
141 customDirsToMenu(); 146 customDirsToMenu();
142 147
143 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); 148 currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" );
144 currentPathCombo->setEditable(TRUE); 149 currentPathCombo->setEditable(TRUE);
145 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); 150 currentPathCombo->lineEdit()->setText( currentDir.canonicalPath());
146 // currentPathCombo->setFocusPolicy(NoFocus); 151 // currentPathCombo->setFocusPolicy(NoFocus);
147 CBHB->addWidget( currentPathCombo ); 152 CBHB->addWidget( currentPathCombo );
148 153
149 layout->addLayout( CBHB ); 154 layout->addLayout( CBHB );
150 155
151 TabWidget = new OSplitter( Horizontal, this, "TabWidget" ); 156 TabWidget = new OSplitter( Horizontal, this, "TabWidget" );
152// TabWidget = new QTabWidget( this, "TabWidget" ); 157// TabWidget = new QTabWidget( this, "TabWidget" );
153 layout->addWidget( TabWidget, 4 ); 158 layout->addWidget( TabWidget, 4 );
154 159
155 tab = new QWidget( TabWidget, "tab" ); 160 tab = new QWidget( TabWidget, "tab" );
156 tabLayout = new QGridLayout( tab ); 161 tabLayout = new QGridLayout( tab );
157 tabLayout->setSpacing( 2); 162 tabLayout->setSpacing( 2);
158 tabLayout->setMargin( 2); 163 tabLayout->setMargin( 2);
159 164
160 Local_View = new QListView( tab, "Local_View" ); 165 Local_View = new QListView( tab, "Local_View" );
161 Local_View->addColumn( tr("File"),130); 166 Local_View->addColumn( tr("File"),130);
162 Local_View->addColumn( tr("Size"),-1); 167 Local_View->addColumn( tr("Size"),-1);
163 Local_View->setColumnAlignment(1,QListView::AlignRight); 168 Local_View->setColumnAlignment(1,QListView::AlignRight);
164 Local_View->addColumn( tr("Date"),-1); 169 Local_View->addColumn( tr("Date"),-1);
165 Local_View->setColumnAlignment(2,QListView::AlignRight); 170 Local_View->setColumnAlignment(2,QListView::AlignRight);
166 Local_View->setAllColumnsShowFocus(TRUE); 171 Local_View->setAllColumnsShowFocus(TRUE);
167 Local_View->setMultiSelection( TRUE ); 172 Local_View->setMultiSelection( TRUE );
168 Local_View->setSelectionMode(QListView::Extended); 173 Local_View->setSelectionMode(QListView::Extended);
169 Local_View->setFocusPolicy(StrongFocus); 174 Local_View->setFocusPolicy(StrongFocus);
170 Local_View->installEventFilter( this ); 175 Local_View->installEventFilter( this );
171 176
172 QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold); 177 QPEApplication::setStylusOperation( Local_View->viewport() , QPEApplication::RightOnHold);
173 178
174 tabLayout->addWidget( Local_View, 0, 0 ); 179 tabLayout->addWidget( Local_View, 0, 0 );
175 180
176 TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1")); 181 TabWidget->addWidget( tab,"advancedfm/smFileBrowser.png", tr("1"));
177// TabWidget->insertTab( tab, tr("1")); 182// TabWidget->insertTab( tab, tr("1"));
178 183
179 tab_2 = new QWidget( TabWidget, "tab_2" ); 184 tab_2 = new QWidget( TabWidget, "tab_2" );
180 tabLayout_2 = new QGridLayout( tab_2 ); 185 tabLayout_2 = new QGridLayout( tab_2 );
181 tabLayout_2->setSpacing( 2); 186 tabLayout_2->setSpacing( 2);
182 tabLayout_2->setMargin( 2); 187 tabLayout_2->setMargin( 2);
183 188
184 Remote_View = new QListView( tab_2, "Remote_View" ); 189 Remote_View = new QListView( tab_2, "Remote_View" );
185 Remote_View->addColumn( tr("File"),130); 190 Remote_View->addColumn( tr("File"),130);
186 Remote_View->addColumn( tr("Size"),-1); 191 Remote_View->addColumn( tr("Size"),-1);
187 Remote_View->setColumnAlignment(1,QListView::AlignRight); 192 Remote_View->setColumnAlignment(1,QListView::AlignRight);
188 Remote_View->addColumn( tr("Date"),-1); 193 Remote_View->addColumn( tr("Date"),-1);
189 Remote_View->setColumnAlignment(2,QListView::AlignRight); 194 Remote_View->setColumnAlignment(2,QListView::AlignRight);
190 Remote_View->setAllColumnsShowFocus(TRUE); 195 Remote_View->setAllColumnsShowFocus(TRUE);
191 Remote_View->setMultiSelection( TRUE ); 196 Remote_View->setMultiSelection( TRUE );
192 Remote_View->setSelectionMode(QListView::Extended); 197 Remote_View->setSelectionMode(QListView::Extended);
193 Remote_View->setFocusPolicy(StrongFocus); 198 Remote_View->setFocusPolicy(StrongFocus);
194 Remote_View->installEventFilter( this ); 199 Remote_View->installEventFilter( this );
195 200
196 QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold); 201 QPEApplication::setStylusOperation( Remote_View->viewport(), QPEApplication::RightOnHold);
197 202
198 tabLayout_2->addWidget( Remote_View, 0, 0 ); 203 tabLayout_2->addWidget( Remote_View, 0, 0 );
199 204
200 TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2")); 205 TabWidget->addWidget( tab_2, "advancedfm/smFileBrowser.png",tr( "2"));
201 TabWidget->setSizeChange( 370 ); 206 TabWidget->setSizeChange( 370 );
202// TabWidget->insertTab( tab_2, tr( "2")); 207// TabWidget->insertTab( tab_2, tr( "2"));
203 208
204 /* tab_3 = new QWidget( TabWidget, "tab_3" ); 209 /* tab_3 = new QWidget( TabWidget, "tab_3" );
205 tabLayout_3 = new QGridLayout( tab_3 ); 210 tabLayout_3 = new QGridLayout( tab_3 );
206 tabLayout_3->setSpacing( 2); 211 tabLayout_3->setSpacing( 2);
207 tabLayout_3->setMargin( 2); 212 tabLayout_3->setMargin( 2);
208 213
209 214
210 // OFileDialog fileDialog; 215 // OFileDialog fileDialog;
211 // fileDialog; 216 // fileDialog;
212 // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy 217 // fileSelector = new FileSelector( "*",tab_3, "fileselector" , FALSE, FALSE); //buggy
213 // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow"); 218 // fileDialog = new OFileDialog("bangalow", tab_3, 4, 2, "Bungalow");
214 // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/"); 219 // OFileSelector fileDialog = new OFileSelector( tab_3, 4, 2,"/");
215 220
216 QListView *fileTree; 221 QListView *fileTree;
217 fileTree = new QListView( tab_3, "tree" ); 222 fileTree = new QListView( tab_3, "tree" );
218 223
219 224
220 tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 ); 225 tabLayout_3->addMultiCellWidget( fileTree, 0, 0, 0, 3 );
221 226
222 TabWidget->insertTab( tab_3, tr( "Remote" ) ); 227 TabWidget->insertTab( tab_3, tr( "Remote" ) );
223 */ 228 */
224 229
225 /////////////// 230 ///////////////
226 231
227 if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { 232 if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) {
228 sdButton->hide(); 233 sdButton->hide();
229 } 234 }
230 if( !StorageInfo::hasCf() ) { 235 if( !StorageInfo::hasCf() ) {
231 cfButton->hide(); 236 cfButton->hide();
232 } 237 }
233 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 238 currentDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
234 currentDir.setPath( QDir::currentDirPath()); 239 currentDir.setPath( QDir::currentDirPath());
235 240
236 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 241 currentRemoteDir.setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
237 currentRemoteDir.setPath( QDir::currentDirPath()); 242 currentRemoteDir.setPath( QDir::currentDirPath());
238 243
239 filterStr="*"; 244 filterStr="*";
240 showMenuHidden(); 245 showMenuHidden();
241 TabWidget->setCurrentWidget(0); 246 TabWidget->setCurrentWidget(0);
242 247
243} 248}
244 249
245void AdvancedFm::initConnections() 250void AdvancedFm::initConnections()
246{ 251{
247 252
248 connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp())); 253 connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(cleanUp()));
249 connect(qpeDirButton,SIGNAL(released()),this,SLOT(QPEButtonPushed())); 254 connect(qpeDirButton,SIGNAL(released()),this,SLOT(QPEButtonPushed()));
250 connect(cfButton,SIGNAL(released()),this,SLOT(CFButtonPushed())); 255 connect(cfButton,SIGNAL(released()),this,SLOT(CFButtonPushed()));
251 connect(sdButton,SIGNAL(released()),this,SLOT(SDButtonPushed())); 256 connect(sdButton,SIGNAL(released()),this,SLOT(SDButtonPushed()));
252 connect(cdUpButton,SIGNAL(released()),this,SLOT(upDir())); 257 connect(cdUpButton,SIGNAL(released()),this,SLOT(upDir()));
253 connect(docButton,SIGNAL(released()),this,SLOT(docButtonPushed())); 258 connect(docButton,SIGNAL(released()),this,SLOT(docButtonPushed()));
254 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed())); 259 connect(homeButton,SIGNAL(released()),this,SLOT(homeButtonPushed()));
255 connect(currentPathCombo,SIGNAL(activated(const QString&)),this,SLOT(changeTo(const QString&))); 260 connect(currentPathCombo,SIGNAL(activated(const QString&)),this,SLOT(changeTo(const QString&)));
256 261
257 connect(currentPathCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(currentPathComboChanged())); 262 connect(currentPathCombo->lineEdit(),SIGNAL(returnPressed()),this,SLOT(currentPathComboChanged()));
258 263
259 connect(Local_View,SIGNAL(clicked(QListViewItem*)),this,SLOT( ListClicked(QListViewItem*))); 264 connect(Local_View,SIGNAL(clicked(QListViewItem*)),this,SLOT( ListClicked(QListViewItem*)));
260 265
261 connect(Local_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); 266 connect(Local_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) );
262 267
263 connect(Remote_View,SIGNAL(clicked(QListViewItem*)),this,SLOT(ListClicked(QListViewItem*))); 268 connect(Remote_View,SIGNAL(clicked(QListViewItem*)),this,SLOT(ListClicked(QListViewItem*)));
264 connect(Remote_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT(ListPressed(int,QListViewItem*,const QPoint&,int))); 269 connect(Remote_View,SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint&,int)),this,SLOT(ListPressed(int,QListViewItem*,const QPoint&,int)));
265 270
266 connect(TabWidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); 271 connect(TabWidget,SIGNAL(currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*)));
267 272
268 connect(Remote_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu())); 273 connect(Remote_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu()));
269 connect(Local_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu())); 274 connect(Local_View,SIGNAL(rightButtonPressed(QListViewItem*,const QPoint&,int)),this,SLOT(showFileMenu()));
270 275
271 connect(menuButton,SIGNAL(selected(const QString&)),SLOT(gotoCustomDir(const QString&))); 276 connect(menuButton,SIGNAL(selected(const QString&)),SLOT(gotoCustomDir(const QString&)));
272// connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int))); 277// connect( menuButton, SIGNAL( selected(int)), SLOT( dirMenuSelected(int)));
273 connect(viewMenu,SIGNAL(activated(int)),this,SLOT(slotSwitchMenu(int))); 278 connect(viewMenu,SIGNAL(activated(int)),this,SLOT(slotSwitchMenu(int)));
274// connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int))); 279// connect( customDirMenu, SIGNAL( activated(int)), this, SLOT( dirMenuSelected(int)));
275 280
276} 281}
277 282
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 80324eb..ed280aa 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -1,874 +1,888 @@
1/*************************************************************************** 1/***************************************************************************
2 AdvancedFm.cpp 2 AdvancedFm.cpp
3 ------------------- 3 -------------------
4 ** Created: Sat Mar 9 23:33:09 2002 4 ** Created: Sat Mar 9 23:33:09 2002
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12 12
13#include "advancedfm.h" 13#include "advancedfm.h"
14#include "output.h" 14#include "output.h"
15#include "filePermissions.h" 15#include "filePermissions.h"
16 16
17/* OPIE */ 17/* OPIE */
18#include <opie2/odebug.h> 18#include <opie2/odebug.h>
19#include <qpe/lnkproperties.h> 19#include <qpe/lnkproperties.h>
20#include <qpe/qpeapplication.h> 20#include <qpe/qpeapplication.h>
21#include <qpe/applnk.h> 21#include <qpe/applnk.h>
22using namespace Opie::Core; 22using namespace Opie::Core;
23 23
24/* QT*/ 24/* QT*/
25 25
26#include <qmessagebox.h> 26#include <qmessagebox.h>
27#include <qpopupmenu.h> 27#include <qpopupmenu.h>
28#include <qlistview.h> 28#include <qlistview.h>
29 29
30/* STD */ 30/* STD */
31 31
32#include <errno.h> 32#include <errno.h>
33#include <stdlib.h> 33#include <stdlib.h>
34#include <unistd.h> 34#include <unistd.h>
35#include <sys/stat.h> 35#include <sys/stat.h>
36#include <dirent.h> 36#include <dirent.h>
37#include <sys/sendfile.h> 37#include <sys/sendfile.h>
38#include <fcntl.h> 38#include <fcntl.h>
39 39
40void AdvancedFm::doDirChange() { 40void AdvancedFm::doDirChange() {
41 QString pathItem = CurrentView()->currentItem()->text(0); 41 QString pathItem = CurrentView()->currentItem()->text(0);
42 if( pathItem == "../") { 42 if( pathItem == "../") {
43 ListClicked( CurrentView()->currentItem()); 43 ListClicked( CurrentView()->currentItem());
44 } else { 44 } else {
45 if( pathItem.find(" -> ",0,TRUE) != -1) 45 if( pathItem.find(" -> ",0,TRUE) != -1)
46 pathItem = dealWithSymName((const QString&)pathItem)+"/"; 46 pathItem = dealWithSymName((const QString&)pathItem)+"/";
47// owarn << pathItem << oendl; 47// owarn << pathItem << oendl;
48 changeTo( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) ); 48 changeTo( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
49 } 49 }
50} 50}
51 51
52void AdvancedFm::showMenuHidden() { 52void AdvancedFm::showMenuHidden() {
53 if (b) { 53 if (b) {
54 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 54 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
55 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 55 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
56 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); 56 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
57 } else { 57 } else {
58 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 58 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
59 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 59 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
60 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); 60 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
61 } 61 }
62 b = !b; 62 b = !b;
63 populateView(); 63 populateView();
64} 64}
65 65
66void AdvancedFm::showHidden() { 66void AdvancedFm::showHidden() {
67 if (b) { 67 if (b) {
68 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 68 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
69 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 69 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
70 } else { 70 } else {
71 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 71 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
72 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 72 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
73 } 73 }
74 populateView(); 74 populateView();
75} 75}
76 76
77QString AdvancedFm::dealWithSymName(const QString &fileName) { 77QString AdvancedFm::dealWithSymName(const QString &fileName) {
78 QString strItem = fileName; 78 QString strItem = fileName;
79 return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); 79 return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
80} 80}
81 81
82void AdvancedFm::runThis() { 82void AdvancedFm::runThis() {
83 if( !CurrentView()->currentItem()) return; 83 if( !CurrentView()->currentItem()) return;
84 QString fs; 84 QString fs;
85 QDir *thisDir = CurrentDir(); 85 QDir *thisDir = CurrentDir();
86 86
87 QString curFile = CurrentView()->currentItem()->text(0); 87 QString curFile = CurrentView()->currentItem()->text(0);
88 QString path = thisDir->canonicalPath(); 88 QString path = thisDir->canonicalPath();
89 89
90 if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink 90 if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
91 91
92 curFile = dealWithSymName((const QString&)curFile); 92 curFile = dealWithSymName((const QString&)curFile);
93 93
94 if(curFile != "../") { 94 if(curFile != "../") {
95 95
96 fs = getFileSystemType((const QString &) path); 96 fs = getFileSystemType((const QString &) path);
97 QFileInfo fileInfo( path + "/" + curFile); 97 QFileInfo fileInfo( path + "/" + curFile);
98// odebug << fileInfo.owner() << oendl; 98// odebug << fileInfo.owner() << oendl;
99 99
100 if( (fileInfo.permission( QFileInfo::ExeUser) 100 if( (fileInfo.permission( QFileInfo::ExeUser)
101 | fileInfo.permission( QFileInfo::ExeGroup) 101 | fileInfo.permission( QFileInfo::ExeGroup)
102 | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { 102 | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) {
103 | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { 103 | fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
104 QCopEnvelope e("QPE/System", "execute(QString)" ); 104 QCopEnvelope e("QPE/System", "execute(QString)" );
105 e << curFile; 105 e << curFile;
106 } else { 106 } else {
107 curFile = path + "/" + curFile; 107 curFile = path + "/" + curFile;
108 DocLnk nf(curFile); 108 DocLnk nf(curFile);
109 QString execStr = nf.exec(); 109 QString execStr = nf.exec();
110// odebug << execStr << oendl; 110// odebug << execStr << oendl;
111 if( execStr.isEmpty() ) { 111 if( execStr.isEmpty() ) {
112 } else { 112 } else {
113 nf.execute(); 113 nf.execute();
114 } 114 }
115 } 115 }
116 } 116 }
117} 117}
118 118
119void AdvancedFm::runText() { 119void AdvancedFm::runText() {
120 if( !CurrentView()->currentItem()) return; 120 if( !CurrentView()->currentItem()) return;
121 QString curFile = CurrentView()->currentItem()->text(0); 121 QString curFile = CurrentView()->currentItem()->text(0);
122 if(curFile != "../") { 122 if(curFile != "../") {
123 if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink 123 if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
124 curFile = dealWithSymName((const QString&)curFile); 124 curFile = dealWithSymName((const QString&)curFile);
125 curFile = CurrentDir()->canonicalPath()+"/"+curFile; 125 curFile = CurrentDir()->canonicalPath()+"/"+curFile;
126 QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" ); 126 QCopEnvelope e("QPE/Application/textedit", "setDocument(QString)" );
127 e << curFile; 127 e << curFile;
128 } 128 }
129} 129}
130 130
131void AdvancedFm::makeDir() { 131void AdvancedFm::makeDir() {
132 InputDialog *fileDlg; 132 InputDialog *fileDlg;
133 fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0); 133 fileDlg = new InputDialog(this,tr("Make Directory"),TRUE, 0);
134 fileDlg->exec(); 134 fileDlg->exec();
135 if( fileDlg->result() == 1 ) { 135 if( fileDlg->result() == 1 ) {
136 QDir *thisDir = CurrentDir(); 136 QDir *thisDir = CurrentDir();
137 QString filename = fileDlg->LineEdit1->text(); 137 QString filename = fileDlg->LineEdit1->text();
138 thisDir->mkdir( thisDir->canonicalPath()+"/"+filename); 138 thisDir->mkdir( thisDir->canonicalPath()+"/"+filename);
139 } 139 }
140 populateView(); 140 populateView();
141} 141}
142 142
143void AdvancedFm::doDelete() { 143void AdvancedFm::doDelete() {
144 QStringList curFileList = getPath(); 144 QStringList curFileList = getPath();
145 bool doMsg=true; 145 bool doMsg=true;
146 int count = curFileList.count(); 146 int count = curFileList.count();
147 if( count > 0) { 147 if( count > 0) {
148 if(count > 1 ) { 148 if(count > 1 ) {
149 QString msg; 149 QString msg;
150 msg=tr("<p>Really delete %1 files?</p>").arg(count); 150 msg=tr("<p>Really delete %1 files?</p>").arg(count);
151 switch ( QMessageBox::warning(this,tr("Delete"),msg 151 switch ( QMessageBox::warning(this,tr("Delete"),msg
152 ,tr("Yes"),tr("No"),0,0,1) ) 152 ,tr("Yes"),tr("No"),0,0,1) )
153 { 153 {
154 case 0: 154 case 0:
155 doMsg=false; 155 doMsg=false;
156 break; 156 break;
157 case 1: 157 case 1:
158 return; 158 return;
159 break; 159 break;
160 default: 160 default:
161 return; 161 return;
162 break; 162 break;
163 }; 163 };
164 } 164 }
165 165
166 QString myFile; 166 QString myFile;
167 167
168 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 168 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
169 myFile = (*it); 169 myFile = (*it);
170 if( myFile.find(" -> ",0,TRUE) != -1) 170 if( myFile.find(" -> ",0,TRUE) != -1)
171 myFile = myFile.left( myFile.find(" -> ",0,TRUE)); 171 myFile = myFile.left( myFile.find(" -> ",0,TRUE));
172 172
173 QString f = CurrentDir()->canonicalPath(); 173 QString f = CurrentDir()->canonicalPath();
174 if(f.right(1).find("/",0,TRUE) == -1) 174 if(f.right(1).find("/",0,TRUE) == -1)
175 f += "/"; 175 f += "/";
176 f += myFile; 176 f += myFile;
177 if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) { 177 if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) {
178 //if file is a directory 178 //if file is a directory
179 179
180 switch ( QMessageBox::warning( this, tr("Delete Directory?"), 180 switch ( QMessageBox::warning( this, tr("Delete Directory?"),
181 tr("<p>Really delete %1 and all it's contents?</p>" ).arg( f ) , 181 tr("<p>Really delete %1 and all it's contents?</p>" ).arg( f ) ,
182 tr("Yes"), tr("No"), 0, 0, 1) ) { 182 tr("Yes"), tr("No"), 0, 0, 1) ) {
183 case 0: 183 case 0:
184 { 184 {
185 f=f.left(f.length()-1); 185 f=f.left(f.length()-1);
186 QString cmd="rm -rf "+f; 186 QString cmd="rm -rf "+f;
187 startProcess( (const QString)cmd.latin1() ); 187 startProcess( (const QString)cmd.latin1() );
188 populateView(); 188 populateView();
189 } 189 }
190 break; 190 break;
191 case 1: 191 case 1:
192 // exit 192 // exit
193 break; 193 break;
194 default: 194 default:
195 break; 195 break;
196 }; 196 };
197 197
198 } else { 198 } else {
199 if(doMsg) { 199 if(doMsg) {
200 switch ( QMessageBox::warning(this,tr("Delete"), 200 switch ( QMessageBox::warning(this,tr("Delete"),
201 tr("<p>Really delete %1?</p>").arg( myFile ), 201 tr("<p>Really delete %1?</p>").arg( myFile ),
202 tr("Yes"), tr("No"), 0, 0, 1) ) { 202 tr("Yes"), tr("No"), 0, 0, 1) ) {
203 case 0: 203 case 0:
204 break; 204 break;
205 case 1: 205 case 1:
206 return; 206 return;
207 break; 207 break;
208 default: 208 default:
209 return; 209 return;
210 break; 210 break;
211 }; 211 };
212 } 212 }
213 213
214 QString cmd="rm "+f; 214 QString cmd="rm "+f;
215 QFile file(f); 215 QFile file(f);
216 QFileInfo fi(myFile); 216 QFileInfo fi(myFile);
217 if( fi.fileName().find("../",0,TRUE)==-1) { 217 if( fi.fileName().find("../",0,TRUE)==-1) {
218// odebug << "remove link files "+myFile << oendl; 218// odebug << "remove link files "+myFile << oendl;
219 219
220// DocLnk lnk(f); 220// DocLnk lnk(f);
221 DocLnk *lnk; 221 DocLnk *lnk;
222 lnk = new DocLnk(f); 222 lnk = new DocLnk(f);
223// odebug << "Deleting doclnk " + lnk->linkFile() << oendl; 223// odebug << "Deleting doclnk " + lnk->linkFile() << oendl;
224 if(lnk->isValid()) 224 if(lnk->isValid())
225 lnk->removeLinkFile(); 225 lnk->removeLinkFile();
226 // delete lnk; 226 // delete lnk;
227 file.remove(); 227 file.remove();
228 } 228 }
229 } 229 }
230 } 230 }
231 } 231 }
232 populateView(); 232 populateView();
233} 233}
234 234
235void AdvancedFm::filePerms() { 235void AdvancedFm::filePerms() {
236 QStringList curFileList = getPath(); 236 QStringList curFileList = getPath();
237 QString filePath; 237 QString filePath;
238 238
239 filePath = CurrentDir()->canonicalPath()+"/"; 239 filePath = CurrentDir()->canonicalPath()+"/";
240 240
241 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 241 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
242 filePermissions *filePerm; 242 filePermissions *filePerm;
243 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it)); 243 filePerm = new filePermissions(this, "Permissions",true,0,(const QString &)(filePath+*it));
244 QPEApplication::execDialog( filePerm ); 244 QPEApplication::execDialog( filePerm );
245 if( filePerm ) 245 if( filePerm )
246 delete filePerm; 246 delete filePerm;
247 } 247 }
248 populateView(); 248 populateView();
249} 249}
250 250
251void AdvancedFm::doProperties() { 251void AdvancedFm::doProperties() {
252#if defined(QT_QWS_OPIE) 252#if defined(QT_QWS_OPIE)
253 253
254 QStringList curFileList = getPath(); 254 QStringList curFileList = getPath();
255 255
256 QString filePath; 256 QString filePath;
257 filePath = CurrentDir()->canonicalPath()+"/"; 257 filePath = CurrentDir()->canonicalPath()+"/";
258 258
259// odebug << "" << curFileList.count() << "" << oendl; 259// odebug << "" << curFileList.count() << "" << oendl;
260 260
261 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 261 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
262// odebug << (filePath+*it) << oendl; 262// odebug << (filePath+*it) << oendl;
263 DocLnk lnk( (filePath+*it)); 263 DocLnk lnk( (filePath+*it));
264 LnkProperties prop( &lnk ); 264 LnkProperties prop( &lnk );
265 QPEApplication::execDialog( &prop ); 265 QPEApplication::execDialog( &prop );
266 } 266 }
267#endif 267#endif
268 268
269} 269}
270 270
271void AdvancedFm::upDir() { 271void AdvancedFm::upDir() {
272 272
273 QDir dir( CurrentDir()->canonicalPath()); 273 QDir dir( CurrentDir()->canonicalPath());
274 dir.cdUp(); 274 dir.cdUp();
275 changeTo(dir.canonicalPath()); 275 changeTo(dir.canonicalPath());
276} 276}
277 277
278void AdvancedFm::copyTimer() { 278void AdvancedFm::copyTimer() {
279 QTimer::singleShot(125,this,SLOT(copy())); 279 QTimer::singleShot(125,this,SLOT(copy()));
280} 280}
281 281
282void AdvancedFm::copy() { 282void AdvancedFm::copy() {
283 QStringList curFileList = getPath(); 283 QStringList curFileList = getPath();
284 284
285 QDir *thisDir = CurrentDir(); 285 QDir *thisDir = CurrentDir();
286 QDir *thatDir = OtherDir(); 286 QDir *thatDir = OtherDir();
287 287
288 bool doMsg = true; 288 bool doMsg = true;
289 int count = curFileList.count(); 289 int count = curFileList.count();
290 if( count > 0) { 290 if( count > 0) {
291 if(count > 1 ){ 291 if(count > 1 ){
292 QString msg; 292 QString msg;
293 msg=tr("<p>Really copy %1 files?</p>").arg(count); 293 msg=tr("<p>Really copy %1 files?</p>").arg(count);
294 switch ( QMessageBox::warning(this,tr("Copy"),msg 294 switch ( QMessageBox::warning(this,tr("Copy"),msg
295 ,tr("Yes"),tr("No"),0,0,1) ) 295 ,tr("Yes"),tr("No"),0,0,1) )
296 { 296 {
297 case 0: 297 case 0:
298 doMsg=false; 298 doMsg=false;
299 break; 299 break;
300 case 1: 300 case 1:
301 return; 301 return;
302 break; 302 break;
303 default: 303 default:
304 return; 304 return;
305 break; 305 break;
306 }; 306 };
307 } 307 }
308 308
309 QString curFile, item, destFile; 309 QString curFile, item, destFile;
310 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 310 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
311 item=(*it); 311 item=(*it);
312 if(item.find("->",0,TRUE)) //symlink 312 if(item.find("->",0,TRUE)) //symlink
313 item = item.left(item.find("->",0,TRUE)); 313 item = item.left(item.find("->",0,TRUE));
314 314
315 curFile = thisDir->canonicalPath()+"/"+ item; 315 curFile = thisDir->canonicalPath()+"/"+ item;
316 destFile = thatDir->canonicalPath()+"/"+ item; 316 destFile = thatDir->canonicalPath()+"/"+ item;
317 317
318// odebug << "Destination file is "+destFile << oendl; 318// odebug << "Destination file is "+destFile << oendl;
319// odebug << "CurrentFile file is " + curFile << oendl; 319// odebug << "CurrentFile file is " + curFile << oendl;
320 320
321 QFile f(destFile); 321 QFile f(destFile);
322 if( f.exists()) { 322 if( f.exists()) {
323 if(doMsg) { 323 if(doMsg) {
324 switch ( QMessageBox::warning(this,tr("File Exists!"), 324 switch ( QMessageBox::warning(this,tr("File Exists!"),
325 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item), 325 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item),
326 tr("Yes"),tr("No"),0,0,1)) { 326 tr("Yes"),tr("No"),0,0,1)) {
327 case 0: 327 case 0:
328 break; 328 break;
329 case 1: 329 case 1:
330 return; 330 return;
331 break; 331 break;
332 default: 332 default:
333 return; 333 return;
334 break; 334 break;
335 }; 335 };
336 } 336 }
337 f.remove(); 337 f.remove();
338 } 338 }
339 339
340 if( !copyFile( curFile, destFile) ) { 340 if( !copyFile( curFile, destFile) ) {
341 QMessageBox::message("AdvancedFm", 341 QMessageBox::message("AdvancedFm",
342 tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); 342 tr( "<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
343 return; 343 return;
344 } 344 }
345 } 345 }
346 rePopulate(); 346 rePopulate();
347 } 347 }
348} 348}
349 349
350void AdvancedFm::copyAsTimer() { 350void AdvancedFm::copyAsTimer() {
351 QTimer::singleShot(125,this,SLOT(copyAs())); 351 QTimer::singleShot(125,this,SLOT(copyAs()));
352} 352}
353 353
354void AdvancedFm::copyAs() { 354void AdvancedFm::copyAs() {
355 355
356 QStringList curFileList = getPath(); 356 QStringList curFileList = getPath();
357 QString curFile, item; 357 QString curFile, item;
358 InputDialog *fileDlg; 358 InputDialog *fileDlg;
359 359
360 QDir *thisDir = CurrentDir(); 360 QDir *thisDir = CurrentDir();
361 QDir *thatDir = OtherDir(); 361 QDir *thatDir = OtherDir();
362 362
363 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 363 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
364 QString destFile; 364 QString destFile;
365 item=(*it); 365 item=(*it);
366 curFile = thisDir->canonicalPath()+"/"+(*it); 366 curFile = thisDir->canonicalPath()+"/"+(*it);
367 fileDlg = new InputDialog( this, tr("Copy %1 As").arg(curFile), TRUE, 0); 367 fileDlg = new InputDialog( this, tr("Copy %1 As").arg(curFile), TRUE, 0);
368 368
369 fileDlg->setInputText((const QString &) destFile ); 369 fileDlg->setInputText((const QString &) destFile );
370 fileDlg->exec(); 370 fileDlg->exec();
371 371
372 if( fileDlg->result() == 1 ) { 372 if( fileDlg->result() == 1 ) {
373 QString filename = fileDlg->LineEdit1->text(); 373 QString filename = fileDlg->LineEdit1->text();
374 destFile = thatDir->canonicalPath()+"/"+filename; 374 destFile = thatDir->canonicalPath()+"/"+filename;
375 375
376 QFile f( destFile); 376 QFile f( destFile);
377 if( f.exists()) { 377 if( f.exists()) {
378 switch (QMessageBox::warning(this,tr("File Exists!"), 378 switch (QMessageBox::warning(this,tr("File Exists!"),
379 tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item), 379 tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item),
380 tr("Yes"),tr("No"),0,0,1) ) { 380 tr("Yes"),tr("No"),0,0,1) ) {
381 case 0: 381 case 0:
382 f.remove(); 382 f.remove();
383 break; 383 break;
384 case 1: 384 case 1:
385 return; 385 return;
386 break; 386 break;
387 default: 387 default:
388 return; 388 return;
389 break; 389 break;
390 }; 390 };
391 } 391 }
392 if( !copyFile( curFile, destFile) ) { 392 if( !copyFile( curFile, destFile) ) {
393 QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); 393 QMessageBox::message("AdvancedFm",tr("<p>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
394 return; 394 return;
395 } 395 }
396 } 396 }
397 delete fileDlg; 397 delete fileDlg;
398 398
399 } 399 }
400 rePopulate(); 400 rePopulate();
401 // setOtherTabCurrent(); 401 // setOtherTabCurrent();
402 qApp->processEvents(); 402 qApp->processEvents();
403 403
404} 404}
405 405
406void AdvancedFm::copySameDirTimer() { 406void AdvancedFm::copySameDirTimer() {
407 QTimer::singleShot(125,this,SLOT(copySameDir())); 407 QTimer::singleShot(125,this,SLOT(copySameDir()));
408} 408}
409 409
410void AdvancedFm::copySameDir() { 410void AdvancedFm::copySameDir() {
411 qApp->processEvents(); 411 qApp->processEvents();
412 QStringList curFileList = getPath(); 412 QStringList curFileList = getPath();
413 QString curFile, item, destFile; 413 QString curFile, item, destFile;
414 InputDialog *fileDlg; 414 InputDialog *fileDlg;
415 415
416 QDir *thisDir = CurrentDir(); 416 QDir *thisDir = CurrentDir();
417 417
418 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 418 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
419 item=(*it); 419 item=(*it);
420 curFile = thisDir->canonicalPath()+"/"+ item; 420 curFile = thisDir->canonicalPath()+"/"+ item;
421 421
422 fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0); 422 fileDlg = new InputDialog(this,tr("Copy ")+curFile+tr(" As"),TRUE, 0);
423 fileDlg->setInputText((const QString &) destFile ); 423 fileDlg->setInputText((const QString &) destFile );
424 fileDlg->exec(); 424 fileDlg->exec();
425 425
426 if( fileDlg->result() == 1 ) { 426 if( fileDlg->result() == 1 ) {
427 427
428 QString filename = fileDlg->LineEdit1->text(); 428 QString filename = fileDlg->LineEdit1->text();
429 destFile = thisDir->canonicalPath()+"/"+filename; 429 destFile = thisDir->canonicalPath()+"/"+filename;
430 430
431 QFile f(destFile); 431 QFile f(destFile);
432 if( f.exists()) { 432 if( f.exists()) {
433 switch (QMessageBox::warning(this,tr("Delete"), 433 switch (QMessageBox::warning(this,tr("Delete"),
434 tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile), 434 tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile),
435 tr("Yes"),tr("No"),0,0,1) ) { 435 tr("Yes"),tr("No"),0,0,1) ) {
436 case 0: 436 case 0:
437 f.remove(); 437 f.remove();
438 break; 438 break;
439 case 1: 439 case 1:
440 return; 440 return;
441 break; 441 break;
442 default: 442 default:
443 return; 443 return;
444 break; 444 break;
445 }; 445 };
446 } 446 }
447 if(!copyFile( curFile,destFile) ) { 447 if(!copyFile( curFile,destFile) ) {
448 QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile)); 448 QMessageBox::message("AdvancedFm",tr("<P>Could not copy %1 to %2</P>").arg(curFile).arg(destFile));
449 return; 449 return;
450 } 450 }
451 451
452// odebug << "copy "+curFile+" as "+destFile << oendl; 452// odebug << "copy "+curFile+" as "+destFile << oendl;
453 } 453 }
454 delete fileDlg; 454 delete fileDlg;
455 } 455 }
456 rePopulate(); 456 rePopulate();
457} 457}
458 458
459void AdvancedFm::moveTimer() { 459void AdvancedFm::moveTimer() {
460 QTimer::singleShot(125,this,SLOT(move())); 460 QTimer::singleShot(125,this,SLOT(move()));
461} 461}
462 462
463void AdvancedFm::move() { 463void AdvancedFm::move() {
464 464
465 QStringList curFileList = getPath(); 465 QStringList curFileList = getPath();
466 if( curFileList.count() > 0) { 466 if( curFileList.count() > 0) {
467 QString curFile, destFile, item; 467 QString curFile, destFile, item;
468 468
469 QDir *thisDir = CurrentDir(); 469 QDir *thisDir = CurrentDir();
470 QDir *thatDir = OtherDir(); 470 QDir *thatDir = OtherDir();
471 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 471 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
472 item=(*it); 472 item=(*it);
473 QString destFile = thatDir->canonicalPath(); 473 QString destFile = thatDir->canonicalPath();
474 474
475 if(destFile.right(1).find("/",0,TRUE) == -1) 475 if(destFile.right(1).find("/",0,TRUE) == -1)
476 destFile+="/"; 476 destFile+="/";
477 destFile += item; 477 destFile += item;
478// odebug << "Destination file is "+destFile << oendl; 478// odebug << "Destination file is "+destFile << oendl;
479 479
480 curFile = thisDir->canonicalPath(); 480 curFile = thisDir->canonicalPath();
481 if(curFile.right(1).find("/",0,TRUE) == -1) 481 if(curFile.right(1).find("/",0,TRUE) == -1)
482 curFile +="/"; 482 curFile +="/";
483 curFile+= item; 483 curFile+= item;
484// odebug << "CurrentFile file is " + curFile << oendl; 484// odebug << "CurrentFile file is " + curFile << oendl;
485 485
486 if(QFileInfo(curFile).isDir()) { 486 if(QFileInfo(curFile).isDir()) {
487 moveDirectory( curFile, destFile ); 487 moveDirectory( curFile, destFile );
488 rePopulate(); 488 rePopulate();
489 return; 489 return;
490 } 490 }
491 QFile f( destFile); 491 QFile f( destFile);
492 if( f.exists()) { 492 if( f.exists()) {
493 switch ( QMessageBox::warning(this,tr("File Exists!"), 493 switch ( QMessageBox::warning(this,tr("File Exists!"),
494 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(destFile), 494 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(destFile),
495 tr("Yes"),tr("No"),0,0,1)) { 495 tr("Yes"),tr("No"),0,0,1)) {
496 case 0: 496 case 0:
497 break; 497 break;
498 case 1: 498 case 1:
499 return; 499 return;
500 break; 500 break;
501 default: 501 default:
502 return; 502 return;
503 break; 503 break;
504 }; 504 };
505 } 505 }
506 if( !copyFile( curFile, destFile) ) { 506 if( !copyFile( curFile, destFile) ) {
507 QMessageBox::message(tr("Note"),tr("<p>Could not move %1</p>").arg(curFile)); 507 QMessageBox::message(tr("Note"),tr("<p>Could not move %1</p>").arg(curFile));
508 return; 508 return;
509 } else 509 } else
510 QFile::remove(curFile); 510 QFile::remove(curFile);
511 } 511 }
512 } 512 }
513 rePopulate(); 513 rePopulate();
514 //setOtherTabCurrent(); 514 //setOtherTabCurrent();
515} 515}
516 516
517bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) { 517bool AdvancedFm::moveDirectory( const QString & src, const QString & dest ) {
518 int err = 0; 518 int err = 0;
519 if( copyDirectory( src, dest ) ) { 519 if( copyDirectory( src, dest ) ) {
520 QString cmd = "rm -rf " + src; 520 QString cmd = "rm -rf " + src;
521 err = system((const char*)cmd); 521 err = system((const char*)cmd);
522 } else 522 } else
523 err = -1; 523 err = -1;
524 524
525 if(err!=0) { 525 if(err!=0) {
526 QMessageBox::message(tr("Note"),tr("<p>Could not move %1</p>").arg( src)); 526 QMessageBox::message(tr("Note"),tr("<p>Could not move %1</p>").arg( src));
527 return false; 527 return false;
528 } 528 }
529 return true; 529 return true;
530} 530}
531 531
532bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) { 532bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) {
533 533
534 QString cmd = "/bin/cp -fpR " + src + " " + dest; 534 QString cmd = "/bin/cp -fpR " + src + " " + dest;
535 owarn << cmd << oendl; 535 owarn << cmd << oendl;
536 int err = system( (const char *) cmd ); 536 int err = system( (const char *) cmd );
537 if ( err != 0 ) { 537 if ( err != 0 ) {
538 QMessageBox::message("AdvancedFm", tr( "<p>Could not copy %1 to %2</p>").arg( src ).arg( dest ) ); 538 QMessageBox::message("AdvancedFm", tr( "<p>Could not copy %1 to %2</p>").arg( src ).arg( dest ) );
539 return false; 539 return false;
540 } 540 }
541 541
542 return true; 542 return true;
543} 543}
544 544
545 545
546bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { 546bool AdvancedFm::copyFile( const QString & src, const QString & dest ) {
547 if(QFileInfo(src).isDir()) { 547 if(QFileInfo(src).isDir()) {
548 if( copyDirectory( src, dest )) { 548 if( copyDirectory( src, dest )) {
549 // setOtherTabCurrent(); 549 // setOtherTabCurrent();
550 rePopulate(); 550 rePopulate();
551 return true; 551 return true;
552 } 552 }
553 else 553 else
554 return false; 554 return false;
555 } 555 }
556 556
557 557
558 bool success = true; 558 bool success = true;
559 struct stat status; 559 struct stat status;
560 QFile srcFile(src); 560 QFile srcFile(src);
561 QFile destFile(dest); 561 QFile destFile(dest);
562 int err=0; 562 int err=0;
563 int read_fd=0; 563 int read_fd=0;
564 int write_fd=0; 564 int write_fd=0;
565 struct stat stat_buf; 565 struct stat stat_buf;
566 off_t offset = 0; 566 off_t offset = 0;
567 if(!srcFile.open( IO_ReadOnly|IO_Raw)) { 567 if(!srcFile.open( IO_ReadOnly|IO_Raw)) {
568// owarn << "open failed" << oendl; 568// owarn << "open failed" << oendl;
569 return success = false; 569 return success = false;
570 } 570 }
571 read_fd = srcFile.handle(); 571 read_fd = srcFile.handle();
572 if(read_fd != -1) { 572 if(read_fd != -1) {
573 fstat (read_fd, &stat_buf); 573 fstat (read_fd, &stat_buf);
574 if( !destFile.open( IO_WriteOnly|IO_Raw ) ) { 574 if( !destFile.open( IO_WriteOnly|IO_Raw ) ) {
575// owarn << "destfile open failed" << oendl; 575// owarn << "destfile open failed" << oendl;
576 return success = false; 576 return success = false;
577 } 577 }
578 write_fd = destFile.handle(); 578 write_fd = destFile.handle();
579 if(write_fd != -1) { 579 if(write_fd != -1) {
580 err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size); 580 err = sendfile(write_fd, read_fd, &offset, stat_buf.st_size);
581 if( err == -1) { 581 if( err == -1) {
582 QString msg; 582 QString msg;
583 switch(err) { 583 switch(err) {
584 case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. "; 584 case EBADF : msg = "The input file was not opened for reading or the output file was not opened for writing. ";
585 case EINVAL: msg = "Descriptor is not valid or locked. "; 585 case EINVAL: msg = "Descriptor is not valid or locked. ";
586 case ENOMEM: msg = "Insufficient memory to read from in_fd."; 586 case ENOMEM: msg = "Insufficient memory to read from in_fd.";
587 case EIO: msg = "Unspecified error while reading from in_fd."; 587 case EIO: msg = "Unspecified error while reading from in_fd.";
588 }; 588 };
589 success = false; 589 success = false;
590// owarn << msg << oendl; 590// owarn << msg << oendl;
591 } 591 }
592 } else { 592 } else {
593 success = false; 593 success = false;
594 } 594 }
595 } else { 595 } else {
596 success = false; 596 success = false;
597 } 597 }
598 srcFile.close(); 598 srcFile.close();
599 destFile.close(); 599 destFile.close();
600 // Set file permissions 600 // Set file permissions
601 if( stat( QFile::encodeName(src), &status ) == 0 ) { 601 if( stat( QFile::encodeName(src), &status ) == 0 ) {
602 chmod( QFile::encodeName(dest), status.st_mode ); 602 chmod( QFile::encodeName(dest), status.st_mode );
603 } 603 }
604 604
605 return success; 605 return success;
606} 606}
607 607
608void AdvancedFm::runCommand() { 608void AdvancedFm::runCommand() {
609 if( !CurrentView()->currentItem()) return; 609 if( !CurrentView()->currentItem()) return;
610 QDir *thisDir = CurrentDir(); 610 QDir *thisDir = CurrentDir();
611 611
612 QString curFile; 612 QString curFile;
613 curFile = thisDir->canonicalPath() +"/"+ CurrentView()->currentItem()->text(0); 613 curFile = thisDir->canonicalPath() +"/"+ CurrentView()->currentItem()->text(0);
614 614
615 InputDialog *fileDlg; 615 InputDialog *fileDlg;
616 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); 616 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
617 fileDlg->setInputText(curFile); 617 fileDlg->setInputText(curFile);
618 fileDlg->exec(); 618 fileDlg->exec();
619 //QString command; 619 //QString command;
620 620
621 if( fileDlg->result() == 1 ) { 621 if( fileDlg->result() == 1 ) {
622// odebug << fileDlg->LineEdit1->text() << oendl; 622// odebug << fileDlg->LineEdit1->text() << oendl;
623 QStringList command; 623 QStringList command;
624 624
625 command << "/bin/sh"; 625 command << "/bin/sh";
626 command << "-c"; 626 command << "-c";
627 command << fileDlg->LineEdit1->text(); 627 command << fileDlg->LineEdit1->text();
628 Output *outDlg; 628 Output *outDlg;
629 outDlg = new Output( command, this, tr("AdvancedFm Output"), true); 629 outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
630 QPEApplication::execDialog( outDlg ); 630 QPEApplication::execDialog( outDlg );
631 qApp->processEvents(); 631 qApp->processEvents();
632 632
633 } 633 }
634} 634}
635 635
636void AdvancedFm::runCommandStd() { 636void AdvancedFm::runCommandStd() {
637 if( !CurrentView()->currentItem()) return; 637 if( !CurrentView()->currentItem()) return;
638 QString curFile; 638 QString curFile;
639 QDir *thisDir = CurrentDir(); 639 QDir *thisDir = CurrentDir();
640 QListView *thisView = CurrentView(); 640 QListView *thisView = CurrentView();
641 if( thisView->currentItem()) 641 if( thisView->currentItem())
642 curFile = thisDir->canonicalPath() +"/"+ thisView->currentItem()->text(0); 642 curFile = thisDir->canonicalPath() +"/"+ thisView->currentItem()->text(0);
643 643
644 InputDialog *fileDlg; 644 InputDialog *fileDlg;
645 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0); 645 fileDlg = new InputDialog(this,tr("Run Command"),TRUE, 0);
646 fileDlg->setInputText(curFile); 646 fileDlg->setInputText(curFile);
647 fileDlg->exec(); 647 fileDlg->exec();
648 648
649 if( fileDlg->result() == 1 ) { 649 if( fileDlg->result() == 1 ) {
650 qApp->processEvents(); 650 qApp->processEvents();
651 startProcess( (const QString)fileDlg->LineEdit1->text().latin1()); 651 startProcess( (const QString)fileDlg->LineEdit1->text().latin1());
652 } 652 }
653} 653}
654 654
655void AdvancedFm::fileStatus() { 655void AdvancedFm::fileStatus() {
656 if( !CurrentView()->currentItem()) return; 656 if( !CurrentView()->currentItem()) return;
657 QString curFile; 657 QString curFile;
658 curFile = CurrentView()->currentItem()->text(0); 658 curFile = CurrentView()->currentItem()->text(0);
659 659 if(QFileInfo("/usr/bin/stat").exists()) {
660 QStringList command; 660 QStringList command;
661 command << "/bin/sh"; 661 command << "/bin/sh";
662 command << "-c"; 662 command << "-c";
663 command << "stat -l "+ curFile; 663 command << "stat -l "+ curFile;
664 Output *outDlg;
665 outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
666 QPEApplication::execDialog( outDlg );
667 } else {
668/* struct stat buf;
669 stat( curFile.local8bit(), &buf);
670
671 st_dev dev;
672 st_uid uid;
673 st_gid gid;
674 st_size size;
675 st_atime atime;
676 st_mtime mtime;
677 st_ctime ctime;
678 st_mode mode;
679*/
680 }
664 681
665 Output *outDlg; 682 qApp->processEvents();
666 outDlg = new Output( command, this, tr("AdvancedFm Output"), true);
667 QPEApplication::execDialog( outDlg );
668 qApp->processEvents();
669} 683}
670 684
671 685
672void AdvancedFm::mkDir() { 686void AdvancedFm::mkDir() {
673 makeDir(); 687 makeDir();
674} 688}
675 689
676void AdvancedFm::rn() { 690void AdvancedFm::rn() {
677 renameIt(); 691 renameIt();
678} 692}
679 693
680void AdvancedFm::del() { 694void AdvancedFm::del() {
681 doDelete(); 695 doDelete();
682} 696}
683 697
684void AdvancedFm::mkSym() { 698void AdvancedFm::mkSym() {
685 QString cmd; 699 QString cmd;
686 QStringList curFileList = getPath(); 700 QStringList curFileList = getPath();
687 if( curFileList.count() > 0) { 701 if( curFileList.count() > 0) {
688 QDir *thisDir = CurrentDir(); 702 QDir *thisDir = CurrentDir();
689 QDir * thatDir = OtherDir(); 703 QDir * thatDir = OtherDir();
690 704
691 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 705 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
692 706
693 QString destName = thatDir->canonicalPath()+"/"+(*it); 707 QString destName = thatDir->canonicalPath()+"/"+(*it);
694 if(destName.right(1) == "/") { 708 if(destName.right(1) == "/") {
695 destName = destName.left( destName.length() -1); 709 destName = destName.left( destName.length() -1);
696 } 710 }
697 711
698 QString curFile = thisDir->canonicalPath()+"/"+(*it); 712 QString curFile = thisDir->canonicalPath()+"/"+(*it);
699 713
700 if( curFile.right(1) == "/") { 714 if( curFile.right(1) == "/") {
701 curFile = curFile.left( curFile.length() -1); 715 curFile = curFile.left( curFile.length() -1);
702 } 716 }
703 717
704 cmd = "ln -s "+curFile+" "+destName; 718 cmd = "ln -s "+curFile+" "+destName;
705// odebug << cmd << oendl; 719// odebug << cmd << oendl;
706 startProcess( (const QString)cmd ); 720 startProcess( (const QString)cmd );
707 } 721 }
708 rePopulate(); 722 rePopulate();
709 setOtherTabCurrent(); 723 setOtherTabCurrent();
710 } 724 }
711} 725}
712 726
713void AdvancedFm::doBeam() { 727void AdvancedFm::doBeam() {
714 Ir ir; 728 Ir ir;
715 if(!ir.supported()) { 729 if(!ir.supported()) {
716 } else { 730 } else {
717 QStringList curFileList = getPath(); 731 QStringList curFileList = getPath();
718 if( curFileList.count() > 0) { 732 if( curFileList.count() > 0) {
719 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) { 733 for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
720 QString curFile = (*it); 734 QString curFile = (*it);
721 QString curFilePath = CurrentDir()->canonicalPath()+"/"+curFile; 735 QString curFilePath = CurrentDir()->canonicalPath()+"/"+curFile;
722 if( curFilePath.right(1) == "/") { 736 if( curFilePath.right(1) == "/") {
723 curFilePath = curFilePath.left( curFilePath.length() -1); 737 curFilePath = curFilePath.left( curFilePath.length() -1);
724 } 738 }
725 Ir *file = new Ir(this, "IR"); 739 Ir *file = new Ir(this, "IR");
726 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*))); 740 connect(file, SIGNAL(done(Ir*)), this, SLOT( fileBeamFinished(Ir*)));
727 file->send( curFilePath, curFile ); 741 file->send( curFilePath, curFile );
728 } 742 }
729 } 743 }
730 } 744 }
731} 745}
732 746
733void AdvancedFm::fileBeamFinished( Ir *) { 747void AdvancedFm::fileBeamFinished( Ir *) {
734 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") ); 748 QMessageBox::message( tr("Advancedfm Beam out"), tr("Ir sent.") ,tr("Ok") );
735} 749}
736 750
737void AdvancedFm::selectAll() { 751void AdvancedFm::selectAll() {
738 QListView *thisView = CurrentView(); 752 QListView *thisView = CurrentView();
739 thisView->selectAll(true); 753 thisView->selectAll(true);
740 thisView->setSelected( thisView->firstChild(),false); 754 thisView->setSelected( thisView->firstChild(),false);
741} 755}
742 756
743void AdvancedFm::startProcess(const QString & cmd) { 757void AdvancedFm::startProcess(const QString & cmd) {
744 QStringList command; 758 QStringList command;
745 OProcess *process; 759 OProcess *process;
746 process = new OProcess(); 760 process = new OProcess();
747 connect(process,SIGNAL(processExited(Opie::Core::OProcess*)),this,SLOT(processEnded(Opie::Core::OProcess*))); 761 connect(process,SIGNAL(processExited(Opie::Core::OProcess*)),this,SLOT(processEnded(Opie::Core::OProcess*)));
748 connect(process,SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),this,SLOT(oprocessStderr(Opie::Core::OProcess*,char*,int))); 762 connect(process,SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),this,SLOT(oprocessStderr(Opie::Core::OProcess*,char*,int)));
749 763
750 command << "/bin/sh"; 764 command << "/bin/sh";
751 command << "-c"; 765 command << "-c";
752 command << cmd.latin1(); 766 command << cmd.latin1();
753 *process << command; 767 *process << command;
754 if(!process->start(OProcess::NotifyOnExit, OProcess::All) ) 768 if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
755 odebug << "could not start process" << oendl; 769 odebug << "could not start process" << oendl;
756} 770}
757 771
758void AdvancedFm::processEnded(OProcess *) { 772void AdvancedFm::processEnded(OProcess *) {
759 rePopulate(); 773 rePopulate();
760} 774}
761 775
762void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) { 776void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
763// owarn << "received stderrt " << buflen << " bytes" << oendl; 777// owarn << "received stderrt " << buflen << " bytes" << oendl;
764 778
765 QString lineStr = buffer; 779 QString lineStr = buffer;
766 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); 780 QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") );
767} 781}
768 782
769bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { 783bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) {
770 if ( o->inherits( "QLineEdit" ) ) { 784 if ( o->inherits( "QLineEdit" ) ) {
771 if ( e->type() == QEvent::KeyPress ) { 785 if ( e->type() == QEvent::KeyPress ) {
772 QKeyEvent *ke = (QKeyEvent*)e; 786 QKeyEvent *ke = (QKeyEvent*)e;
773 if ( ke->key() == Key_Return || 787 if ( ke->key() == Key_Return ||
774 ke->key() == Key_Enter ) { 788 ke->key() == Key_Enter ) {
775 okRename(); 789 okRename();
776 return true; 790 return true;
777 } 791 }
778 else if ( ke->key() == Key_Escape ) { 792 else if ( ke->key() == Key_Escape ) {
779 cancelRename(); 793 cancelRename();
780 return true; 794 return true;
781 } 795 }
782 } 796 }
783 else if ( e->type() == QEvent::FocusOut ) { 797 else if ( e->type() == QEvent::FocusOut ) {
784 cancelRename(); 798 cancelRename();
785 return true; 799 return true;
786 } 800 }
787 } 801 }
788 if ( o->inherits( "QListView" ) ) { 802 if ( o->inherits( "QListView" ) ) {
789 if ( e->type() == QEvent::FocusIn ) { 803 if ( e->type() == QEvent::FocusIn ) {
790 if( o == Local_View) { //keep track of which view 804 if( o == Local_View) { //keep track of which view
791 whichTab = 1; 805 whichTab = 1;
792 viewMenu->setItemChecked(viewMenu->idAt(0), true); 806 viewMenu->setItemChecked(viewMenu->idAt(0), true);
793 viewMenu->setItemChecked(viewMenu->idAt(1), false); 807 viewMenu->setItemChecked(viewMenu->idAt(1), false);
794 } else { 808 } else {
795 whichTab = 2; 809 whichTab = 2;
796 viewMenu->setItemChecked(viewMenu->idAt(0), false); 810 viewMenu->setItemChecked(viewMenu->idAt(0), false);
797 viewMenu->setItemChecked(viewMenu->idAt(1), true); 811 viewMenu->setItemChecked(viewMenu->idAt(1), true);
798 } 812 }
799 } 813 }
800 OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection 814 OtherView()->setSelected( OtherView()->currentItem(), FALSE );//make sure there's correct selection
801 } 815 }
802 816
803 return QWidget::eventFilter( o, e ); 817 return QWidget::eventFilter( o, e );
804} 818}
805 819
806 820
807void AdvancedFm::cancelRename() { 821void AdvancedFm::cancelRename() {
808// odebug << "cancel rename" << oendl; 822// odebug << "cancel rename" << oendl;
809 QListView * view; 823 QListView * view;
810 view = CurrentView(); 824 view = CurrentView();
811 825
812 bool resetFocus = view->viewport()->focusProxy() == renameBox; 826 bool resetFocus = view->viewport()->focusProxy() == renameBox;
813 delete renameBox; 827 delete renameBox;
814 renameBox = 0; 828 renameBox = 0;
815 if ( resetFocus ) { 829 if ( resetFocus ) {
816 view->viewport()->setFocusProxy( view); 830 view->viewport()->setFocusProxy( view);
817 view->setFocus(); 831 view->setFocus();
818 } 832 }
819} 833}
820 834
821void AdvancedFm::doRename(QListView * view) { 835void AdvancedFm::doRename(QListView * view) {
822 if( !CurrentView()->currentItem()) return; 836 if( !CurrentView()->currentItem()) return;
823 837
824 QRect r = view->itemRect( view->currentItem( )); 838 QRect r = view->itemRect( view->currentItem( ));
825 r = QRect( view->viewportToContents( r.topLeft() ), r.size() ); 839 r = QRect( view->viewportToContents( r.topLeft() ), r.size() );
826 r.setX( view->contentsX() ); 840 r.setX( view->contentsX() );
827 if ( r.width() > view->visibleWidth() ) 841 if ( r.width() > view->visibleWidth() )
828 r.setWidth( view->visibleWidth() ); 842 r.setWidth( view->visibleWidth() );
829 843
830 renameBox = new QLineEdit( view->viewport(), "qt_renamebox" ); 844 renameBox = new QLineEdit( view->viewport(), "qt_renamebox" );
831 renameBox->setFrame(true); 845 renameBox->setFrame(true);
832 renameBox->setText( view->currentItem()->text(0) ); 846 renameBox->setText( view->currentItem()->text(0) );
833 renameBox->selectAll(); 847 renameBox->selectAll();
834 renameBox->installEventFilter( this ); 848 renameBox->installEventFilter( this );
835 view->addChild( renameBox, r.x(), r.y() ); 849 view->addChild( renameBox, r.x(), r.y() );
836 renameBox->resize( r.size() ); 850 renameBox->resize( r.size() );
837 view->viewport()->setFocusProxy( renameBox ); 851 view->viewport()->setFocusProxy( renameBox );
838 renameBox->setFocus(); 852 renameBox->setFocus();
839 renameBox->show(); 853 renameBox->show();
840} 854}
841 855
842 856
843void AdvancedFm::renameIt() { 857void AdvancedFm::renameIt() {
844 if( !CurrentView()->currentItem()) return; 858 if( !CurrentView()->currentItem()) return;
845 859
846 QListView *thisView = CurrentView(); 860 QListView *thisView = CurrentView();
847 oldName = thisView->currentItem()->text(0); 861 oldName = thisView->currentItem()->text(0);
848 doRename( thisView ); 862 doRename( thisView );
849} 863}
850 864
851void AdvancedFm::okRename() { 865void AdvancedFm::okRename() {
852 qDebug("okrename"); 866 qDebug("okrename");
853 if( !renameBox) return; 867 if( !renameBox) return;
854 868
855 QString newName = renameBox->text(); 869 QString newName = renameBox->text();
856 cancelRename(); 870 cancelRename();
857 QListView * view = CurrentView(); 871 QListView * view = CurrentView();
858 QString path = CurrentDir()->canonicalPath() + "/"; 872 QString path = CurrentDir()->canonicalPath() + "/";
859 oldName = path + oldName; 873 oldName = path + oldName;
860 newName = path + newName; 874 newName = path + newName;
861 if( rename( oldName.latin1(), newName.latin1())== -1) 875 if( rename( oldName.latin1(), newName.latin1())== -1)
862 QMessageBox::message(tr("Note"),tr("Could not rename")); 876 QMessageBox::message(tr("Note"),tr("Could not rename"));
863 else 877 else
864 oldName = ""; 878 oldName = "";
865 QListViewItem *item = view->currentItem(); 879 QListViewItem *item = view->currentItem();
866 view->takeItem( item ); 880 view->takeItem( item );
867 delete item; 881 delete item;
868 populateView(); 882 populateView();
869 883
870} 884}
871 885
872void AdvancedFm::openSearch() { 886void AdvancedFm::openSearch() {
873 QMessageBox::message(tr("Note"),tr("Not Yet Implemented")); 887 QMessageBox::message(tr("Note"),tr("Not Yet Implemented"));
874} 888}
diff --git a/noncore/net/opie-smb/config.in b/noncore/net/opie-smb/config.in
new file mode 100644
index 0000000..4ff78fd
--- a/dev/null
+++ b/noncore/net/opie-smb/config.in
@@ -0,0 +1,4 @@
1 config OPIESMB
2 boolean "opie-smb (samba front end client for Opie)"
3 default "n"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
diff --git a/noncore/net/opie-smb/main.cpp b/noncore/net/opie-smb/main.cpp
new file mode 100644
index 0000000..5fae972
--- a/dev/null
+++ b/noncore/net/opie-smb/main.cpp
@@ -0,0 +1,6 @@
1#include "qsmb.h"
2#include <opie2/oapplicationfactory.h>
3using namespace Opie::Core;
4OPIE_EXPORT_APP( OApplicationFactory<Qsmb> )
5
6
diff --git a/noncore/net/opie-smb/opie-smb.control b/noncore/net/opie-smb/opie-smb.control
new file mode 100644
index 0000000..ce5c6bf
--- a/dev/null
+++ b/noncore/net/opie-smb/opie-smb.control
@@ -0,0 +1,12 @@
1Package: smbclient
2Version: 1.0
3Architecture: arm
4Arch: arm
5Maintainer: Kurt Korbatits (support@midget.net.au)
6Section: Network
7Priority: optional
8Description: Gui front end for samba utilities.
9Source:
10Depends: smbclient
11
12
diff --git a/noncore/net/opie-smb/opie-smb.pro b/noncore/net/opie-smb/opie-smb.pro
new file mode 100644
index 0000000..90f9980
--- a/dev/null
+++ b/noncore/net/opie-smb/opie-smb.pro
@@ -0,0 +1,18 @@
1 TEMPLATE= app
2 CONFIG += qte warn_on quickapp debug
3 HEADERS = qsmb.h
4 SOURCES = main.cpp qsmb.cpp
5INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include
7DESTDIR = $(OPIEDIR)/bin
8LIBS += -lqpe -lopiecore2 -lopieui2 -lpthread
9
10 # INCLUDEPATH+= $(QPEDIR)/include
11 # DEPENDPATH+= $(QPEDIR)/include
12# LIBS +=
13
14 INTERFACES= qsmbbase.ui
15 TARGET = opie-smb
16
17#DEFINES += QT_QWS_NONOPIE
18include( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/opie-smb/qsmb.cpp b/noncore/net/opie-smb/qsmb.cpp
new file mode 100644
index 0000000..527ab38
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmb.cpp
@@ -0,0 +1,402 @@
1#include "qsmb.h"
2#include <qpushbutton.h>
3#include <qpe/qpeapplication.h>
4
5#include <string.h>
6#include <qstring.h>
7#include <qdir.h>
8#include <qfileinfo.h>
9
10#include <qlabel.h>
11#include <qlineedit.h>
12#include <qcombobox.h>
13#include <qstringlist.h>
14#include <qcheckbox.h>
15#include <qtextview.h>
16#include <qmessagebox.h>
17
18
19#include <pthread.h>
20#include <signal.h>
21#include <ctype.h>
22
23
24#include <opie2/odebug.h>
25using namespace Opie::Core;
26
27
28Qsmb::Qsmb( QWidget* parent, const char* name, WFlags fl )
29 : FormQPESMBBase( parent, name, fl )
30{
31 connect(CBHost, SIGNAL(activated(int)), this, SLOT(hostSelected(int)));
32 connect(DoItBtn, SIGNAL(clicked()), this, SLOT(DoItClicked()));
33 connect(BtnScan, SIGNAL(clicked()), this, SLOT(scanClicked()));
34 connect(BtnClear, SIGNAL(clicked()), this, SLOT(clear()));
35
36//TODO configurable mount points
37 if(!QFileInfo("/mnt/samba1").exists()) system("mkdir /mnt/samba1");
38 if(!QFileInfo("/mnt/samba2").exists()) system("mkdir /mnt/samba2");
39 if(!QFileInfo("/mnt/samba2").exists()) system("mkdir /mnt/samba3");
40
41 mountpt->insertItem("/mnt/samba1",-1);
42 mountpt->insertItem("/mnt/samba2",-1);
43 mountpt->insertItem("/mnt/samba3",-1);
44
45 top_element = NULL;
46 scanning = false;
47}
48
49Qsmb::~Qsmb()
50{
51}
52
53void Qsmb::clear()
54{
55 if (scanning) return;
56 ListViewScan->clear();
57 TextViewOutput->setText("");
58 top_element = NULL;
59}
60
61void Qsmb::scanClicked()
62{
63 if (scanning) return;
64 pthread_create(&tpid, NULL, runit, (void *)this);
65}
66
67void Qsmb::DoItClicked()
68{
69
70 if(! ListViewScan->selectedItem()) {
71 QMessageBox::warning(this, tr("Error"),tr("<p>No share selected!</p>"));
72 return;
73 }
74 if (scanning) return;
75 pthread_create(&tpid, NULL, runitm, (void *)this);
76}
77
78void* runit(void* arg)
79{
80 Qsmb* caller = (Qsmb*)arg;
81 caller->scan();
82 return(0);
83}
84
85void* runitm(void* arg)
86{
87 Qsmb* caller = (Qsmb*)arg;
88 caller->DoIt();
89 return(0);
90}
91
92void Qsmb::scan()
93{
94 int i;
95
96 if (scanning) return;
97 scanning = true;
98
99 char match[512], lmhosts[512];
100 QString cmd;
101 char result[256];
102
103 FILE *pipe, *pipe2;
104
105 LScan->setText("Scanning...");
106 qApp->processEvents();
107
108 cmd = "ifconfig |grep 'addr:'|awk '{print $2}'|awk 'BEGIN{FS=\":\"}{print $2}'|sed 's/\\.[0-9]*$//'|head -n1";
109
110 owarn << "cmd: " << cmd << oendl;
111
112 /* run findsmb & read output */
113 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
114 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
115 TextViewOutput->append(result);
116 return;
117 }
118 while(fgets(result, 256, pipe) != NULL) {
119 strcpy( match, result);
120 match[5]='\0';
121 break;
122 }
123 owarn << "match: " << match << oendl;
124
125 cmd = "/usr/bin/findsmb";
126 owarn <<"cmd: " << cmd << oendl;
127
128 TextViewOutput->append(cmd);
129
130 snprintf(lmhosts, 512, "echo '127.0.0.1 localhost'>/etc/samba/lmhosts");
131
132 if ((pipe2 = popen(lmhosts, "r")) == NULL) {
133 snprintf(result, 256, "Error: Can't run %s", lmhosts);
134 //TextViewOutput->append(result);
135 return;
136 }
137
138 /* run command & read output */
139 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
140 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
141 TextViewOutput->append(result);
142 return;
143 }
144
145 /* parse output and display in ListViewScan */
146 while(fgets(result, 256, pipe) != NULL) {
147 /* put result into TextViewOutput */
148 TextViewOutput->append(result);
149
150 if( strstr(result, match) != NULL ) {
151 char ip_addr[256], host[256], *ptr1;
152
153 strcpy( ip_addr, result);
154 ptr1 = strchr(ip_addr,' ');
155 strcpy( host, ptr1);
156 ip_addr[ptr1 - ip_addr]='\0';
157
158 for(i = 0; i < 256; i++) {
159 if(host[i]!=' ') {
160 strcpy( host, host + i);
161 break;
162 }
163 }
164 ptr1 = strchr(host,' ');
165 host[ptr1 - host] = '\0';
166
167 owarn << "add host: " << host << oendl;
168
169 CBHost->insertItem( host, -1);
170 snprintf( lmhosts, 512, "echo '%s %s'>>/etc/samba/lmhosts", ip_addr,host);
171
172 owarn << "lmhosts: " << lmhosts << oendl;
173
174 if ((pipe2 = popen(lmhosts, "r")) == NULL) {
175 snprintf(result, 256, "Error: Can't run %s", lmhosts);
176 return;
177 }
178 }
179 }
180
181 TextViewOutput->append("\n\n============================================\n");
182 LScan->setText("");
183 scanning = false;
184}
185
186void Qsmb::hostSelected(int index)
187{
188 owarn << "hostSelected" << oendl;
189 int i;
190
191 QListViewItem *element;
192 QListViewItem *parent;
193
194 QString text = CBHost->currentText();
195
196 if (scanning) return;
197 scanning = true;
198
199 QString cmd;
200 char result[256];
201
202 FILE *pipe;
203
204 LScan->setText("Scanning...");
205
206 if((const char *)username->text() == '\0')
207 cmd = "/usr/bin/smbclient -L //"+CBHost->currentText()+" -N 2>&1 |grep Disk";
208 else
209 cmd = "/usr/bin/smbclient -L //"+CBHost->currentText()+" -N -U"+username->text()+":"+password->text()+" 2>&1 |grep Disk";
210
211 for(i = 0; i < 512; i++) {
212 if(cmd[i]==':') {
213 cmd[i]='%';
214 break;
215 }
216 if(cmd[i]=='\0')
217 break;
218 }
219
220 owarn << "i="<< index << "cmd:" << cmd << oendl;
221
222 TextViewOutput->append(cmd);
223
224 /* run smbclient & read output */
225 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
226 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
227// cmd = "Error: Can't run "+cmd;
228 TextViewOutput->append(result);
229 return;
230 }
231
232 /* parse output and display in ListViewScan */
233 while(fgets(result, 256, pipe) != NULL) {
234 /* put result into TextViewOutput */
235 TextViewOutput->append(result);
236
237 if( strchr(result, '$') == NULL ) {
238 char share[256], *ptr1;
239
240 strcpy(share,result);
241 ptr1 = strchr(share,' ');
242 share[ptr1 - share]='\0';
243
244 owarn<< "add share: " << share << oendl;
245
246 if(top_element != NULL) {
247 bool found = false;
248 element = top_element;
249
250 while(element != NULL && !found) {
251 if(strcmp( element->text(0).ascii(), share)==0) {
252 parent = element;
253 found = true;
254 }
255 element = element->nextSibling();
256 }
257
258 if(!found) {
259 element = new QListViewItem(ListViewScan,share);
260 element->setOpen(true);
261 parent=element;
262 }
263 } else {
264 element = new QListViewItem(ListViewScan,share);
265 element->setOpen(true);
266 top_element = element;
267 parent = element;
268 }
269 }
270 }
271
272 TextViewOutput->append("\n\n============================================\n");
273 LScan->setText("");
274 scanning = false;
275}
276
277void Qsmb::DoIt()
278{
279 QListViewItem *element;
280 element = ListViewScan->selectedItem();
281 if(!element) {
282 QMessageBox::warning(this, tr("Error!!"),tr("<p><b>No</b> share selected!!</p>"));
283 return;
284 }
285
286 if (scanning) return;
287 scanning = true;
288
289 int i;
290
291 char share[512];
292 QString cmd;
293 QString cmd2;
294 char result[256];
295// QString result;
296 QString text = mountpt->currentText();
297
298 FILE *pipe,*pipe2;
299
300 LScan->setText("Mounting...");
301 qApp->processEvents();
302
303 cmd = "mkdir -p "+ text;
304
305 owarn<<"cmd: "<< cmd << oendl;
306
307 /* make sure mount exists! */
308 if ((pipe2 = popen(cmd.latin1(), "r")) == NULL) {
309
310 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
311 // result = "Error: Can't run " + cmd;
312 TextViewOutput->append(result);
313 return;
314 }
315
316 while(fgets(result, 256, pipe2) != NULL) {
317 /* put result into TextViewOutput */
318 TextViewOutput->append(result);
319 }
320
321
322 strcpy(share,(const char *)element->text(0));
323
324 for(i = 0; i < 256; i++) {
325 if(isalpha( share[i])) {
326 strcpy( share, share + i);
327 break;
328 }
329 }
330
331 cmd = "/usr/bin/smbmount //"+CBHost->currentText()+"/"+share+" "+mountpt->currentText()+" -U"+username->text()+":"+password->text();
332
333 for(i = 0; i < 512; i++) {
334 if(cmd[i]==':') {
335 cmd[i]='%';
336 break;
337 }
338 if(cmd[i]=='\0')
339 break;
340 }
341
342 owarn << "cmd: " << cmd << oendl;
343 TextViewOutput->append(cmd.latin1());
344
345
346 if(onbootBtn->isChecked()) {
347 owarn << "Saving Setting permanently..." << oendl;
348 cmd2 = "echo '" + cmd + "'>/opt/QtPalmtop/etc/samba.env";
349
350 /* run command & read output */
351 if ((pipe = popen(cmd2.latin1(), "r")) == NULL) {
352
353 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
354// result = "Error: Can't run "+ cmd;
355 //TextViewOutput->append(result);
356 return;
357 }
358 /* parse output and display in ListViewScan */
359 while(fgets(result, 256, pipe) != NULL) {
360 /* put result into TextViewOutput */
361 //TextViewOutput->append(result);
362 }
363 }
364
365 /* run command & read output */
366 if ((pipe = popen(cmd.latin1(), "r")) == NULL) {
367
368// result = "Error: Can't run "+ cmd;
369 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
370
371 TextViewOutput->append(result);
372 return;
373 }
374
375 /* parse output and display in ListViewScan */
376 while(fgets(result, 256, pipe) != NULL) {
377 /* put result into TextViewOutput */
378 TextViewOutput->append(result);
379 }
380 TextViewOutput->append("\n\n================CheckMounts==================\n");
381 LScan->setText("");
382
383 cmd = "/bin/mount 2>&1";
384 owarn << "cmd: " << cmd << oendl;
385
386 if ((pipe2 = popen(cmd.latin1(), "r")) == NULL) {
387
388 snprintf(result, 256, "Error: Can't run %s", cmd.latin1());
389// result = "Error: Can't run "+ cmd;
390
391 TextViewOutput->append(result);
392 return;
393 }
394 /* parse output and display in ListViewScan */
395 while(fgets(result, 256, pipe2) != NULL) {
396 /* put result into TextViewOutput */
397 TextViewOutput->append(result);
398 }
399
400 TextViewOutput->append("\n\n============================================\n");
401 scanning = false;
402}
diff --git a/noncore/net/opie-smb/qsmb.h b/noncore/net/opie-smb/qsmb.h
new file mode 100644
index 0000000..8fefe91
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmb.h
@@ -0,0 +1,39 @@
1#ifndef QSMB_H
2#define QSMB_H
3
4#include "qsmbbase.h"
5
6#include <stdlib.h>
7#include <stdlib.h>
8#include <stdio.h>
9
10#include <qlistview.h>
11#include <pthread.h>
12
13class Qsmb : public FormQPESMBBase
14{
15 Q_OBJECT
16
17public:
18 static QString appName() { return QString::fromLatin1("opie-smb"); }
19 Qsmb( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
20 ~Qsmb();
21 void scan();
22 void DoIt();
23
24private:
25 QListViewItem *top_element;
26 QComboBox *hosts;
27 pthread_t tpid;
28 bool scanning;
29
30public slots:
31 void clear();
32 void scanClicked();
33 void hostSelected(int);
34 void DoItClicked();
35};
36void* runit(void *arg);
37void* runitm(void *arg);
38
39#endif // QSMB_H
diff --git a/noncore/net/opie-smb/qsmbbase.cpp b/noncore/net/opie-smb/qsmbbase.cpp
new file mode 100644
index 0000000..21cd306
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmbbase.cpp
@@ -0,0 +1,146 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'qsmbbase.ui'
3**
4** Created: Thu Aug 11 19:30:44 2005
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#include "qsmbbase.h"
10
11#include <qcheckbox.h>
12#include <qcombobox.h>
13#include <qheader.h>
14#include <qlabel.h>
15#include <qlineedit.h>
16#include <qlistview.h>
17#include <qpushbutton.h>
18#include <qtabwidget.h>
19#include <qtextview.h>
20#include <qlayout.h>
21#include <qvariant.h>
22#include <qtooltip.h>
23#include <qwhatsthis.h>
24
25/*
26 * Constructs a FormQPESMBBase which is a child of 'parent', with the
27 * name 'name' and widget flags set to 'f'
28 */
29FormQPESMBBase::FormQPESMBBase( QWidget* parent, const char* name, WFlags fl )
30 : QWidget( parent, name, fl )
31{
32 if ( !name )
33 setName( "FormQPESMBBase" );
34 resize( 254, 352 );
35 QFont f( font() );
36 setFont( f );
37 setCaption( tr( "Opie Smb" ) );
38 FormQPESMBBaseLayout = new QGridLayout( this );
39 FormQPESMBBaseLayout->setSpacing( 2 );
40 FormQPESMBBaseLayout->setMargin( 0 );
41
42 TabWidget2 = new QTabWidget( this, "TabWidget2" );
43
44 tab = new QWidget( TabWidget2, "tab" );
45 tabLayout = new QGridLayout( tab );
46 tabLayout->setSpacing( 0 );
47 tabLayout->setMargin( 2 );
48
49 CBHost = new QComboBox( FALSE, tab, "CBHost" );
50
51 tabLayout->addMultiCellWidget( CBHost, 1, 1, 0, 3 );
52
53 mountpt = new QComboBox( FALSE, tab, "mountpt" );
54
55 tabLayout->addMultiCellWidget( mountpt, 4, 4, 1, 3 );
56
57 LScan = new QLabel( tab, "LScan" );
58 LScan->setText( tr( "" ) );
59
60 tabLayout->addWidget( LScan, 0, 3 );
61
62 textLabel1 = new QLabel( tab, "textLabel1" );
63 textLabel1->setText( tr( "mount pt:" ) );
64
65 tabLayout->addWidget( textLabel1, 4, 0 );
66
67 ListViewScan = new QListView( tab, "ListViewScan" );
68 ListViewScan->addColumn( tr( "Shares" ) );
69
70 tabLayout->addMultiCellWidget( ListViewScan, 2, 2, 0, 3 );
71
72 BtnScan = new QPushButton( tab, "BtnScan" );
73 BtnScan->setText( tr( "&Scan" ) );
74
75 tabLayout->addMultiCellWidget( BtnScan, 0, 0, 0, 1 );
76
77 BtnClear = new QPushButton( tab, "BtnClear" );
78 BtnClear->setText( tr( "&Clear" ) );
79
80 tabLayout->addWidget( BtnClear, 0, 2 );
81
82 onbootBtn = new QCheckBox( tab, "onbootBtn" );
83 onbootBtn->setText( tr( "Reconnect on boot" ) );
84
85 tabLayout->addMultiCellWidget( onbootBtn, 3, 3, 0, 2 );
86
87 DoItBtn = new QPushButton( tab, "DoItBtn" );
88 DoItBtn->setText( tr( "&Login" ) );
89
90 tabLayout->addMultiCellWidget( DoItBtn, 5, 5, 0, 1 );
91
92 Layout6 = new QGridLayout;
93 Layout6->setSpacing( 6 );
94 Layout6->setMargin( 0 );
95
96 Layout2 = new QHBoxLayout;
97 Layout2->setSpacing( 6 );
98 Layout2->setMargin( 0 );
99
100 pwdlabel = new QLabel( tab, "pwdlabel" );
101 pwdlabel->setText( tr( "password" ) );
102 Layout2->addWidget( pwdlabel );
103
104 password = new QLineEdit( tab, "password" );
105 Layout2->addWidget( password );
106
107 Layout6->addLayout( Layout2, 1, 0 );
108
109 Layout5 = new QHBoxLayout;
110 Layout5->setSpacing( 6 );
111 Layout5->setMargin( 0 );
112
113 usrlabel = new QLabel( tab, "usrlabel" );
114 usrlabel->setText( tr( "username" ) );
115 Layout5->addWidget( usrlabel );
116
117 username = new QLineEdit( tab, "username" );
118 Layout5->addWidget( username );
119
120 Layout6->addLayout( Layout5, 0, 0 );
121
122 tabLayout->addMultiCellLayout( Layout6, 5, 5, 2, 3 );
123 TabWidget2->insertTab( tab, tr( "Scan" ) );
124
125 tab_2 = new QWidget( TabWidget2, "tab_2" );
126 tabLayout_2 = new QGridLayout( tab_2 );
127 tabLayout_2->setSpacing( 6 );
128 tabLayout_2->setMargin( 11 );
129
130 TextViewOutput = new QTextView( tab_2, "TextViewOutput" );
131 TextViewOutput->setTextFormat( QTextView::PlainText );
132
133 tabLayout_2->addWidget( TextViewOutput, 0, 0 );
134 TabWidget2->insertTab( tab_2, tr( "SMB Output" ) );
135
136 FormQPESMBBaseLayout->addWidget( TabWidget2, 0, 0 );
137}
138
139/*
140 * Destroys the object and frees any allocated resources
141 */
142FormQPESMBBase::~FormQPESMBBase()
143{
144 // no need to delete child widgets, Qt does it all for us
145}
146
diff --git a/noncore/net/opie-smb/qsmbbase.h b/noncore/net/opie-smb/qsmbbase.h
new file mode 100644
index 0000000..3ee2f57
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmbbase.h
@@ -0,0 +1,62 @@
1/****************************************************************************
2** Form interface generated from reading ui file 'qsmbbase.ui'
3**
4** Created: Thu Aug 11 19:30:41 2005
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#ifndef FORMQPESMBBASE_H
10#define FORMQPESMBBASE_H
11
12#include <qvariant.h>
13#include <qwidget.h>
14class QVBoxLayout;
15class QHBoxLayout;
16class QGridLayout;
17class QCheckBox;
18class QComboBox;
19class QLabel;
20class QLineEdit;
21class QListView;
22class QListViewItem;
23class QPushButton;
24class QTabWidget;
25class QTextView;
26
27class FormQPESMBBase : public QWidget
28{
29 Q_OBJECT
30
31public:
32 FormQPESMBBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 ~FormQPESMBBase();
34
35 QTabWidget* TabWidget2;
36 QWidget* tab;
37 QComboBox* CBHost;
38 QComboBox* mountpt;
39 QLabel* LScan;
40 QLabel* textLabel1;
41 QListView* ListViewScan;
42 QPushButton* BtnScan;
43 QPushButton* BtnClear;
44 QCheckBox* onbootBtn;
45 QPushButton* DoItBtn;
46 QLabel* pwdlabel;
47 QLineEdit* password;
48 QLabel* usrlabel;
49 QLineEdit* username;
50 QWidget* tab_2;
51 QTextView* TextViewOutput;
52
53protected:
54 QGridLayout* FormQPESMBBaseLayout;
55 QGridLayout* tabLayout;
56 QGridLayout* Layout6;
57 QHBoxLayout* Layout2;
58 QHBoxLayout* Layout5;
59 QGridLayout* tabLayout_2;
60};
61
62#endif // FORMQPESMBBASE_H
diff --git a/noncore/net/opie-smb/qsmbbase.ui b/noncore/net/opie-smb/qsmbbase.ui
new file mode 100644
index 0000000..35a1aec
--- a/dev/null
+++ b/noncore/net/opie-smb/qsmbbase.ui
@@ -0,0 +1,298 @@
1<!DOCTYPE UI><UI>
2<class>FormQPESMBBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>FormQPESMBBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>254</width>
15 <height>352</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>font</name>
20 <font>
21 </font>
22 </property>
23 <property stdset="1">
24 <name>caption</name>
25 <string>Opie Smb</string>
26 </property>
27 <property>
28 <name>layoutMargin</name>
29 </property>
30 <property>
31 <name>layoutSpacing</name>
32 </property>
33 <grid>
34 <property stdset="1">
35 <name>margin</name>
36 <number>0</number>
37 </property>
38 <property stdset="1">
39 <name>spacing</name>
40 <number>2</number>
41 </property>
42 <widget row="0" column="0" >
43 <class>QTabWidget</class>
44 <property stdset="1">
45 <name>name</name>
46 <cstring>TabWidget2</cstring>
47 </property>
48 <property>
49 <name>layoutMargin</name>
50 </property>
51 <property>
52 <name>layoutSpacing</name>
53 </property>
54 <widget>
55 <class>QWidget</class>
56 <property stdset="1">
57 <name>name</name>
58 <cstring>tab</cstring>
59 </property>
60 <attribute>
61 <name>title</name>
62 <string>Scan</string>
63 </attribute>
64 <grid>
65 <property stdset="1">
66 <name>margin</name>
67 <number>2</number>
68 </property>
69 <property stdset="1">
70 <name>spacing</name>
71 <number>0</number>
72 </property>
73 <widget row="1" column="0" rowspan="1" colspan="4" >
74 <class>QComboBox</class>
75 <property stdset="1">
76 <name>name</name>
77 <cstring>CBHost</cstring>
78 </property>
79 </widget>
80 <widget row="4" column="1" rowspan="1" colspan="3" >
81 <class>QComboBox</class>
82 <property stdset="1">
83 <name>name</name>
84 <cstring>mountpt</cstring>
85 </property>
86 </widget>
87 <widget row="0" column="3" >
88 <class>QLabel</class>
89 <property stdset="1">
90 <name>name</name>
91 <cstring>LScan</cstring>
92 </property>
93 <property stdset="1">
94 <name>text</name>
95 <string></string>
96 </property>
97 </widget>
98 <widget row="4" column="0" >
99 <class>QLabel</class>
100 <property stdset="1">
101 <name>name</name>
102 <cstring>textLabel1</cstring>
103 </property>
104 <property stdset="1">
105 <name>text</name>
106 <string>mount pt:</string>
107 </property>
108 </widget>
109 <widget row="2" column="0" rowspan="1" colspan="4" >
110 <class>QListView</class>
111 <column>
112 <property>
113 <name>text</name>
114 <string>Shares</string>
115 </property>
116 <property>
117 <name>clickable</name>
118 <bool>true</bool>
119 </property>
120 <property>
121 <name>resizeable</name>
122 <bool>true</bool>
123 </property>
124 </column>
125 <property stdset="1">
126 <name>name</name>
127 <cstring>ListViewScan</cstring>
128 </property>
129 </widget>
130 <widget row="0" column="0" rowspan="1" colspan="2" >
131 <class>QPushButton</class>
132 <property stdset="1">
133 <name>name</name>
134 <cstring>BtnScan</cstring>
135 </property>
136 <property stdset="1">
137 <name>text</name>
138 <string>&amp;Scan</string>
139 </property>
140 </widget>
141 <widget row="0" column="2" >
142 <class>QPushButton</class>
143 <property stdset="1">
144 <name>name</name>
145 <cstring>BtnClear</cstring>
146 </property>
147 <property stdset="1">
148 <name>text</name>
149 <string>&amp;Clear</string>
150 </property>
151 </widget>
152 <widget row="3" column="0" rowspan="1" colspan="3" >
153 <class>QCheckBox</class>
154 <property stdset="1">
155 <name>name</name>
156 <cstring>onbootBtn</cstring>
157 </property>
158 <property stdset="1">
159 <name>text</name>
160 <string>Reconnect on boot</string>
161 </property>
162 </widget>
163 <widget row="5" column="0" rowspan="1" colspan="2" >
164 <class>QPushButton</class>
165 <property stdset="1">
166 <name>name</name>
167 <cstring>DoItBtn</cstring>
168 </property>
169 <property stdset="1">
170 <name>text</name>
171 <string>&amp;Login</string>
172 </property>
173 </widget>
174 <widget row="5" column="2" rowspan="1" colspan="2" >
175 <class>QLayoutWidget</class>
176 <property stdset="1">
177 <name>name</name>
178 <cstring>Layout6</cstring>
179 </property>
180 <grid>
181 <property stdset="1">
182 <name>margin</name>
183 <number>0</number>
184 </property>
185 <property stdset="1">
186 <name>spacing</name>
187 <number>6</number>
188 </property>
189 <widget row="1" column="0" >
190 <class>QLayoutWidget</class>
191 <property stdset="1">
192 <name>name</name>
193 <cstring>Layout2</cstring>
194 </property>
195 <hbox>
196 <property stdset="1">
197 <name>margin</name>
198 <number>0</number>
199 </property>
200 <property stdset="1">
201 <name>spacing</name>
202 <number>6</number>
203 </property>
204 <widget>
205 <class>QLabel</class>
206 <property stdset="1">
207 <name>name</name>
208 <cstring>pwdlabel</cstring>
209 </property>
210 <property stdset="1">
211 <name>text</name>
212 <string>password</string>
213 </property>
214 </widget>
215 <widget>
216 <class>QLineEdit</class>
217 <property stdset="1">
218 <name>name</name>
219 <cstring>password</cstring>
220 </property>
221 </widget>
222 </hbox>
223 </widget>
224 <widget row="0" column="0" >
225 <class>QLayoutWidget</class>
226 <property stdset="1">
227 <name>name</name>
228 <cstring>Layout5</cstring>
229 </property>
230 <hbox>
231 <property stdset="1">
232 <name>margin</name>
233 <number>0</number>
234 </property>
235 <property stdset="1">
236 <name>spacing</name>
237 <number>6</number>
238 </property>
239 <widget>
240 <class>QLabel</class>
241 <property stdset="1">
242 <name>name</name>
243 <cstring>usrlabel</cstring>
244 </property>
245 <property stdset="1">
246 <name>text</name>
247 <string>username</string>
248 </property>
249 </widget>
250 <widget>
251 <class>QLineEdit</class>
252 <property stdset="1">
253 <name>name</name>
254 <cstring>username</cstring>
255 </property>
256 </widget>
257 </hbox>
258 </widget>
259 </grid>
260 </widget>
261 </grid>
262 </widget>
263 <widget>
264 <class>QWidget</class>
265 <property stdset="1">
266 <name>name</name>
267 <cstring>tab</cstring>
268 </property>
269 <attribute>
270 <name>title</name>
271 <string>SMB Output</string>
272 </attribute>
273 <grid>
274 <property stdset="1">
275 <name>margin</name>
276 <number>11</number>
277 </property>
278 <property stdset="1">
279 <name>spacing</name>
280 <number>6</number>
281 </property>
282 <widget row="0" column="0" >
283 <class>QTextView</class>
284 <property stdset="1">
285 <name>name</name>
286 <cstring>TextViewOutput</cstring>
287 </property>
288 <property stdset="1">
289 <name>textFormat</name>
290 <enum>PlainText</enum>
291 </property>
292 </widget>
293 </grid>
294 </widget>
295 </widget>
296 </grid>
297</widget>
298</UI>
diff --git a/noncore/settings/netsystemtime/formattabwidget.cpp b/noncore/settings/netsystemtime/formattabwidget.cpp
index 7d01bff..a037881 100644
--- a/noncore/settings/netsystemtime/formattabwidget.cpp
+++ b/noncore/settings/netsystemtime/formattabwidget.cpp
@@ -1,170 +1,170 @@
1/* 1/*
2                 This file is part of the Opie Project 2                 This file is part of the Opie Project
3 3
4 Copyright (C) Opie Team <opie-devel@handhelds.org> 4 Copyright (C) Opie Team <opie-devel@handhelds.org>
5 =. 5 =.
6 .=l. 6 .=l.
7           .>+-= 7           .>+-=
8 _;:,     .>    :=|. This program is free software; you can 8 _;:,     .>    :=|. This program is free software; you can
9.> <`_,   >  .   <= redistribute it and/or modify it under 9.> <`_,   >  .   <= redistribute it and/or modify it under
10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public 10:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software 11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13     ._= =}       : or (at your option) any later version.
14    .%`+i>       _;_. 14    .%`+i>       _;_.
15    .i_,=:_.      -<s. This program is distributed in the hope that 15    .i_,=:_.      -<s. This program is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17 : ..    .:,     . . . without even the implied warranty of 17 : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.=       =       ; Library General Public License for more
21++=   -.     .`     .: details. 21++=   -.     .`     .: details.
22:     =  ...= . :.=- 22:     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-=` this library; see the file COPYING.LIB. 25    --        :-=` this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "formattabwidget.h" 31#include "formattabwidget.h"
32 32
33#include <qpe/config.h> 33#include <qpe/config.h>
34 34
35#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 35#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
36#include <qpe/qcopenvelope_qws.h> 36#include <qpe/qcopenvelope_qws.h>
37#endif 37#endif
38 38
39#include <qcombobox.h> 39#include <qcombobox.h>
40#include <qlabel.h> 40#include <qlabel.h>
41#include <qlayout.h> 41#include <qlayout.h>
42#include <qscrollview.h> 42#include <qscrollview.h>
43#include <qtimer.h> 43#include <qtimer.h>
44 44
45FormatTabWidget::FormatTabWidget( QWidget *parent ) 45FormatTabWidget::FormatTabWidget( QWidget *parent )
46 : QWidget( parent, 0x0, 0 ) 46 : QWidget( parent, 0x0, 0 )
47{ 47{
48 QVBoxLayout *tmpvb = new QVBoxLayout( this ); 48 QVBoxLayout *tmpvb = new QVBoxLayout( this );
49 QScrollView *sv = new QScrollView( this ); 49 QScrollView *sv = new QScrollView( this );
50 tmpvb->addWidget( sv, 0, 0 ); 50 tmpvb->addWidget( sv, 0, 0 );
51 sv->setResizePolicy( QScrollView::AutoOneFit ); 51 sv->setResizePolicy( QScrollView::AutoOneFit );
52 sv->setFrameStyle( QFrame::NoFrame ); 52 sv->setFrameStyle( QFrame::NoFrame );
53 QWidget *container = new QWidget( sv->viewport() ); 53 QWidget *container = new QWidget( sv->viewport() );
54 sv->addChild( container ); 54 sv->addChild( container );
55 55
56 QGridLayout *layout = new QGridLayout( container ); 56 QGridLayout *layout = new QGridLayout( container );
57 layout->setMargin( 2 ); 57 layout->setMargin( 2 );
58 layout->setSpacing( 4 ); 58 layout->setSpacing( 4 );
59 59
60 // Time format selector 60 // Time format selector
61 layout->addWidget( new QLabel( tr( "Time format" ), container ), 0, 0 ); 61 layout->addWidget( new QLabel( tr( "Time format" ), container ), 0, 0 );
62 cbAppletFormat = new QComboBox( container ); 62 cbAppletFormat = new QComboBox( container );
63 cbAppletFormat->insertItem( tr( "hh:mm" ), 0 ); 63 cbAppletFormat->insertItem( tr( "hh:mm" ), 0 );
64 cbAppletFormat->insertItem( tr( "D/M hh:mm" ), 1 ); 64 cbAppletFormat->insertItem( tr( "D/M hh:mm" ), 1 );
65 cbAppletFormat->insertItem( tr( "M/D hh:mm" ), 2 ); 65 cbAppletFormat->insertItem( tr( "M/D hh:mm" ), 2 );
66 layout->addWidget( cbAppletFormat, 0, 1 ); 66 layout->addWidget( cbAppletFormat, 0, 1 );
67 67
68 // 12/24 hour selector 68 // 12/24 hour selector
69 layout->addWidget( new QLabel( tr( "12/24 hour" ), container ), 1, 0 ); 69 layout->addWidget( new QLabel( tr( "12/24 hour" ), container ), 1, 0 );
70 cbAmpm = new QComboBox( container ); 70 cbAmpm = new QComboBox( container );
71 cbAmpm->insertItem( tr( "24 hour" ), 0 ); 71 cbAmpm->insertItem( tr( "24 hour" ), 0 );
72 cbAmpm->insertItem( tr( "12 hour" ), 1 ); 72 cbAmpm->insertItem( tr( "12 hour" ), 1 );
73 connect( cbAmpm, SIGNAL(activated(int)), this, SIGNAL(show12HourTime(int)) ); 73 connect( cbAmpm, SIGNAL(activated( int)), this, SIGNAL(show12HourTime( int)) );
74 layout->addWidget( cbAmpm, 1, 1 ); 74 layout->addWidget( cbAmpm, 1, 1 );
75 75
76 // Date format selector 76 // Date format selector
77 layout->addWidget( new QLabel( tr( "Date format" ), container ), 2, 0 ); 77 layout->addWidget( new QLabel( tr( "Date format" ), container ), 2, 0 );
78 cbDateFormat = new QComboBox( container ); 78 cbDateFormat = new QComboBox( container );
79 connect( cbDateFormat, SIGNAL(activated(int)), this, SLOT(slotDateFormatChanged(int)) ); 79 connect( cbDateFormat, SIGNAL(activated( int)), this, SLOT(slotDateFormatChanged( int)) );
80 layout->addWidget( cbDateFormat, 2, 1 ); 80 layout->addWidget( cbDateFormat, 2, 1 );
81 81
82 // Week starts on selector 82 // Week starts on selector
83 layout->addWidget( new QLabel( tr( "Weeks start on" ), container ), 3, 0 ); 83 layout->addWidget( new QLabel( tr( "Weeks start on" ), container ), 3, 0 );
84 cbWeekStart = new QComboBox( container ); 84 cbWeekStart = new QComboBox( container );
85 cbWeekStart->insertItem( tr( "Sunday" ), 0 ); 85 cbWeekStart->insertItem( tr( "Sunday" ), 0 );
86 cbWeekStart->insertItem( tr( "Monday" ), 1 ); 86 cbWeekStart->insertItem( tr( "Monday" ), 1 );
87 connect( cbWeekStart, SIGNAL(activated(int)), this, SIGNAL(weekStartChanged(int)) ); 87 connect( cbWeekStart, SIGNAL(activated(int)), this, SIGNAL(weekStartChanged(int)) );
88 layout->addWidget( cbWeekStart, 3, 1 ); 88 layout->addWidget( cbWeekStart, 3, 1 );
89 89
90 // Initialize values 90 // Initialize values
91 Config config( "qpe" ); 91 Config config( "qpe" );
92 config.setGroup( "Date" ); 92 config.setGroup( "Date" );
93 cbAppletFormat->setCurrentItem( config.readNumEntry( "ClockApplet", 0 ) ); 93 cbAppletFormat->setCurrentItem( config.readNumEntry( "ClockApplet", 0 ) );
94 94
95 DateFormat df(QChar(config.readEntry("Separator", "/")[0]), 95 DateFormat df(QChar(config.readEntry("Separator", "/")[0]),
96 (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear), 96 (DateFormat::Order)config .readNumEntry("ShortOrder", DateFormat::DayMonthYear),
97 (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear)); 97 (DateFormat::Order)config.readNumEntry("LongOrder", DateFormat::DayMonthYear));
98 98
99 int currentdf = 0; 99 int currentdf = 0;
100 date_formats[0] = DateFormat( '/', DateFormat::MonthDayYear ); 100 date_formats[0] = DateFormat( '/', DateFormat::MonthDayYear );
101 cbDateFormat->insertItem( tr( date_formats[0].toNumberString() ) ); 101 cbDateFormat->insertItem( tr( date_formats[0].toNumberString() ) );
102 date_formats[1] = DateFormat( '.', DateFormat::DayMonthYear ); 102 date_formats[1] = DateFormat( '.', DateFormat::DayMonthYear );
103 if ( df == date_formats[1] ) 103 if ( df == date_formats[1] )
104 currentdf = 1; 104 currentdf = 1;
105 cbDateFormat->insertItem( tr( date_formats[1].toNumberString() ) ); 105 cbDateFormat->insertItem( tr( date_formats[1].toNumberString() ) );
106 date_formats[2] = DateFormat( '-', DateFormat::YearMonthDay, DateFormat::DayMonthYear ); 106 date_formats[2] = DateFormat( '-', DateFormat::YearMonthDay, DateFormat::DayMonthYear );
107 if ( df == date_formats[2] ) 107 if ( df == date_formats[2] )
108 currentdf = 2; 108 currentdf = 2;
109 cbDateFormat->insertItem( tr( date_formats[2].toNumberString() ) ); //ISO8601 109 cbDateFormat->insertItem( tr( date_formats[2].toNumberString() ) ); //ISO8601
110 date_formats[3] = DateFormat( '/', DateFormat::DayMonthYear ); 110 date_formats[3] = DateFormat( '/', DateFormat::DayMonthYear );
111 if ( df == date_formats[3] ) 111 if ( df == date_formats[3] )
112 currentdf = 3; 112 currentdf = 3;
113 cbDateFormat->insertItem( tr( date_formats[3].toNumberString() ) ); 113 cbDateFormat->insertItem( tr( date_formats[3].toNumberString() ) );
114 114
115 cbDateFormat->setCurrentItem( currentdf ); 115 cbDateFormat->setCurrentItem( currentdf );
116 //dateButton->setDateFormat( df ); 116 //dateButton->setDateFormat( df );
117 117
118 config.setGroup( "Time" ); 118 config.setGroup( "Time" );
119 cbAmpm->setCurrentItem( config.readBoolEntry( "AMPM", FALSE ) ? 1 : 0 ); 119 cbAmpm->setCurrentItem( config.readBoolEntry( "AMPM", FALSE ) ? 1 : 0 );
120 cbWeekStart->setCurrentItem( config.readBoolEntry( "MONDAY", TRUE ) ? 1 : 0 ); 120 cbWeekStart->setCurrentItem( config.readBoolEntry( "MONDAY", TRUE ) ? 1 : 0 );
121 121
122 // Send initial configuration options 122 // Send initial configuration options
123 QTimer::singleShot( 1200, this, SLOT(sendOptions()) ); 123 QTimer::singleShot( 1200, this, SLOT(sendOptions()) );
124} 124}
125 125
126FormatTabWidget::~FormatTabWidget() 126FormatTabWidget::~FormatTabWidget()
127{ 127{
128} 128}
129 129
130void FormatTabWidget::saveSettings( bool commit ) 130void FormatTabWidget::saveSettings( bool commit )
131{ 131{
132 int ampm = cbAmpm->currentItem(); 132 int ampm = cbAmpm->currentItem();
133 int weekstart = cbWeekStart->currentItem(); 133 int weekstart = cbWeekStart->currentItem();
134 DateFormat df = date_formats[cbDateFormat->currentItem()]; 134 DateFormat df = date_formats[cbDateFormat->currentItem()];
135 int appletformat = cbAppletFormat->currentItem(); 135 int appletformat = cbAppletFormat->currentItem();
136 136
137 if ( commit ) 137 if ( commit )
138 { 138 {
139 // Write settings to config file 139 // Write settings to config file
140 Config config("qpe"); 140 Config config("qpe");
141 config.setGroup( "Time" ); 141 config.setGroup( "Time" );
142 config.writeEntry( "AMPM", ampm ); 142 config.writeEntry( "AMPM", ampm );
143 config.writeEntry( "MONDAY", weekstart ); 143 config.writeEntry( "MONDAY", weekstart );
144 config.setGroup( "Date" ); 144 config.setGroup( "Date" );
145 config.writeEntry( "Separator", QString( df.separator() ) ); 145 config.writeEntry( "Separator", QString( df.separator() ) );
146 config.writeEntry( "ShortOrder", df.shortOrder() ); 146 config.writeEntry( "ShortOrder", df.shortOrder() );
147 config.writeEntry( "LongOrder", df.longOrder() ); 147 config.writeEntry( "LongOrder", df.longOrder() );
148 config.writeEntry( "ClockApplet", appletformat ); 148 config.writeEntry( "ClockApplet", appletformat );
149 } 149 }
150 150
151 // Make rest of system aware of new settings 151 // Make rest of system aware of new settings
152 QCopEnvelope setClock( "QPE/System", "clockChange(bool)" ); 152 QCopEnvelope setClock( "QPE/System", "clockChange(bool)" );
153 setClock << ampm; 153 setClock << ampm;
154 QCopEnvelope setWeek( "QPE/System", "weekChange(bool)" ); 154 QCopEnvelope setWeek( "QPE/System", "weekChange(bool)" );
155 setWeek << weekstart; 155 setWeek << weekstart;
156 QCopEnvelope setDateFormat( "QPE/System", "setDateFormat(DateFormat)" ); 156 QCopEnvelope setDateFormat( "QPE/System", "setDateFormat(DateFormat)" );
157 setDateFormat << df; 157 setDateFormat << df;
158} 158}
159 159
160void FormatTabWidget::slotDateFormatChanged( int selected ) 160void FormatTabWidget::slotDateFormatChanged( int selected )
161{ 161{
162 emit dateFormatChanged( date_formats[selected] ); 162 emit dateFormatChanged( date_formats[selected] );
163} 163}
164 164
165void FormatTabWidget::sendOptions() 165void FormatTabWidget::sendOptions()
166{ 166{
167 emit show12HourTime( cbAmpm->currentItem() ); 167 emit show12HourTime( cbAmpm->currentItem() );
168 emit dateFormatChanged( date_formats[cbDateFormat->currentItem()] ); 168 emit dateFormatChanged( date_formats[cbDateFormat->currentItem()] );
169 emit weekStartChanged( cbWeekStart->currentItem() ); 169 emit weekStartChanged( cbWeekStart->currentItem() );
170} 170}
diff --git a/noncore/tools/calc2/binary/binary.pro b/noncore/tools/calc2/binary/binary.pro
index 1348d00..9cbb0ff 100644
--- a/noncore/tools/calc2/binary/binary.pro
+++ b/noncore/tools/calc2/binary/binary.pro
@@ -1,17 +1,15 @@
1#TEMPLATE = lib 1TEMPLATE = lib
2#CONFIG -= moc 2CONFIG += qt
3#CONFIG += qt 3INTERFACES += binary.ui
4## Input 4HEADERS = binaryimpl.h \
5#INTERFACES += binary.ui 5 binaryfactory.h
6#HEADERS = binaryimpl.h \ 6SOURCES = binaryimpl.cpp \
7 # binaryfactory.h 7 binaryfactory.cpp
8#SOURCES = binaryimpl.cpp \ 8INCLUDEPATH += $(OPIEDIR)/include \
9 # binaryfactory.cpp 9 $(OPIEDIR)/calc2
10#INCLUDEPATH += $(OPIEDIR)/include \ 10DEPENDPATH += $(OPIEDIR)/include
11 # $(OPIEDIR)/calc2 11DESTDIR = $(OPIEDIR)/plugins/calculator
12#DEPENDPATH += $(OPIEDIR)/include 12TARGET = binary
13#DESTDIR = $(OPIEDIR)/plugins/calculator 13
14#TARGET = binary
15#
16 14
17include( $(OPIEDIR)/include.pro ) 15include( $(OPIEDIR)/include.pro )
diff --git a/noncore/tools/calc2/binary/binaryfactory.cpp b/noncore/tools/calc2/binary/binaryfactory.cpp
index 110334f..bccc9ca 100644
--- a/noncore/tools/calc2/binary/binaryfactory.cpp
+++ b/noncore/tools/calc2/binary/binaryfactory.cpp
@@ -1,51 +1,51 @@
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** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file. 11** packaging of this file.
12** 12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15** 15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information. 16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17** 17**
18** Contact info@trolltech.com if any conditions of this licensing are 18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you. 19** not clear to you.
20** 20**
21**********************************************************************/ 21**********************************************************************/
22 22
23#include "binaryfactory.h" 23#include "binaryfactory.h"
24#include "binaryimpl.h" 24#include "binaryimpl.h"
25#include <engine.h> 25#include "../engine.h"
26 26
27QWidget *BinaryInterface::getPlugin ( Engine *e, QWidget *parent ) { 27QWidget *BinaryInterface::getPlugin ( Engine *e, QWidget *parent ) {
28 if ( !input ) 28 if ( !input )
29 input = new FormBinaryImpl ( e, parent ); 29 input = new FormBinaryImpl ( e, parent );
30 return input; 30 return input;
31} 31}
32 32
33#ifndef QT_NO_COMPONENT 33#ifndef QT_NO_COMPONENT
34QRESULT BinaryInterface::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 34QRESULT BinaryInterface::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
35{ 35{
36 *iface = 0; 36 *iface = 0;
37 if ( uuid == IID_QUnknown ) 37 if ( uuid == IID_QUnknown )
38 *iface = this; 38 *iface = this;
39 else if ( uuid == IID_Calc ) 39 else if ( uuid == IID_Calc )
40 *iface = this; 40 *iface = this;
41 41
42 if ( *iface ) 42 if ( *iface )
43 (*iface)->addRef(); 43 (*iface)->addRef();
44 return QS_OK; 44 return QS_OK;
45} 45}
46 46
47Q_EXPORT_INTERFACE() 47Q_EXPORT_INTERFACE()
48{ 48{
49 Q_CREATE_INSTANCE( BinaryInterface ) 49 Q_CREATE_INSTANCE( BinaryInterface )
50} 50}
51#endif 51#endif
diff --git a/noncore/tools/calc2/binary/binaryfactory.h b/noncore/tools/calc2/binary/binaryfactory.h
index e015384..237a926 100644
--- a/noncore/tools/calc2/binary/binaryfactory.h
+++ b/noncore/tools/calc2/binary/binaryfactory.h
@@ -1,46 +1,46 @@
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#ifndef BINARYIMPL_H 21#ifndef BINARYIMPL_H
22#define BINARYIMPL_H 22#define BINARYIMPL_H
23 23
24#include "binaryimpl.h" 24#include "binaryimpl.h"
25#include <plugininterface.h> 25#include "../plugininterface.h"
26#include <engine.h> 26#include "../engine.h"
27 27
28class BinaryInterface : public CalcInterface 28class BinaryInterface : public CalcInterface
29{ 29{
30public: 30public:
31 BinaryInterface(){input = 0;}; 31 BinaryInterface(){input = 0;};
32 virtual ~BinaryInterface(){}; 32 virtual ~BinaryInterface(){};
33 33
34#ifndef QT_NO_COMPONENT 34#ifndef QT_NO_COMPONENT
35 QRESULT queryInterface( const QUuid&, QUnknownInterface** ); 35 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
36 Q_REFCOUNT 36 Q_REFCOUNT
37#endif 37#endif
38 38
39 QWidget *getPlugin( Engine *, QWidget *parent ); 39 QWidget *getPlugin( Engine *, QWidget *parent );
40 40
41private: 41private:
42 FormBinaryImpl *input; 42 FormBinaryImpl *input;
43 ulong ref; 43 ulong ref;
44}; 44};
45 45
46#endif 46#endif
diff --git a/noncore/tools/calc2/binary/binaryimpl.cpp b/noncore/tools/calc2/binary/binaryimpl.cpp
index ffc56ad..ecbf232 100644
--- a/noncore/tools/calc2/binary/binaryimpl.cpp
+++ b/noncore/tools/calc2/binary/binaryimpl.cpp
@@ -1,110 +1,110 @@
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 "binaryimpl.h" 21#include "binaryimpl.h"
22#include <instruction.h> 22#include "../instruction.h"
23 23
24class iXOR : public Instruction { 24class iXOR : public Instruction {
25public: 25public:
26 iXOR():Instruction(){}; 26 iXOR():Instruction(){};
27 ~iXOR(){}; 27 ~iXOR(){};
28 Data eval(Data num) { 28 Data eval(Data num) {
29 Data result; 29 Data result;
30 result.i = num.i ^ acc.i; 30 result.i = num.i ^ acc.i;
31 return result; 31 return result;
32 }; 32 };
33}; 33};
34class iAND : public Instruction { 34class iAND : public Instruction {
35public: 35public:
36 iAND():Instruction(){}; 36 iAND():Instruction(){};
37 ~iAND(){}; 37 ~iAND(){};
38 Data eval(Data num) { 38 Data eval(Data num) {
39 Data result; 39 Data result;
40 result.i = num.i & acc.i; 40 result.i = num.i & acc.i;
41 return result; 41 return result;
42 }; 42 };
43}; 43};
44class iNOT : public Instruction { 44class iNOT : public Instruction {
45public: 45public:
46 iNOT():Instruction(){}; 46 iNOT():Instruction(){};
47 ~iNOT(){}; 47 ~iNOT(){};
48 Data eval(Data num) { 48 Data eval(Data num) {
49 Data result; 49 Data result;
50 result.i = ~ num.i; 50 result.i = ~ num.i;
51 return result; 51 return result;
52 }; 52 };
53}; 53};
54class iOR : public Instruction { 54class iOR : public Instruction {
55public: 55public:
56 iOR():Instruction(){}; 56 iOR():Instruction(){};
57 ~iOR(){}; 57 ~iOR(){};
58 Data eval(Data num) { 58 Data eval(Data num) {
59 Data result; 59 Data result;
60 result.i = num.i | acc.i; 60 result.i = num.i | acc.i;
61 return result; 61 return result;
62 }; 62 };
63}; 63};
64class iLSH : public Instruction { 64class iLSH : public Instruction {
65public: 65public:
66 iLSH():Instruction(){}; 66 iLSH():Instruction(){};
67 ~iLSH(){}; 67 ~iLSH(){};
68 Data eval(Data num) { 68 Data eval(Data num) {
69 Data result; 69 Data result;
70 result.i = num.i << 1; 70 result.i = num.i << 1;
71 return result; 71 return result;
72 }; 72 };
73}; 73};
74class iRSH : public Instruction { 74class iRSH : public Instruction {
75public: 75public:
76 iRSH():Instruction(){}; 76 iRSH():Instruction(){};
77 ~iRSH(){}; 77 ~iRSH(){};
78 Data eval(Data num) { 78 Data eval(Data num) {
79 Data result; 79 Data result;
80 result.i = num.i >> 1; 80 result.i = num.i >> 1;
81 return result; 81 return result;
82 }; 82 };
83}; 83};
84 84
85void FormBinaryImpl::val0Clicked() { 85void FormBinaryImpl::val0Clicked() {
86 engine->pushValue('0'); 86 engine->pushValue('0');
87} 87}
88 88
89void FormBinaryImpl::val1Clicked() { 89void FormBinaryImpl::val1Clicked() {
90 engine->pushValue('1'); 90 engine->pushValue('1');
91} 91}
92 92
93void FormBinaryImpl::XORClicked() { 93void FormBinaryImpl::XORClicked() {
94 engine->pushInstruction(new iXOR()); 94 engine->pushInstruction(new iXOR());
95} 95}
96void FormBinaryImpl::ANDClicked() { 96void FormBinaryImpl::ANDClicked() {
97 engine->pushInstruction(new iAND()); 97 engine->pushInstruction(new iAND());
98} 98}
99void FormBinaryImpl::NOTClicked() { 99void FormBinaryImpl::NOTClicked() {
100 engine->immediateInstruction(new iNOT()); 100 engine->immediateInstruction(new iNOT());
101} 101}
102void FormBinaryImpl::ORClicked() { 102void FormBinaryImpl::ORClicked() {
103 engine->pushInstruction(new iOR()); 103 engine->pushInstruction(new iOR());
104} 104}
105void FormBinaryImpl::LSHClicked() { 105void FormBinaryImpl::LSHClicked() {
106 engine->immediateInstruction(new iLSH()); 106 engine->immediateInstruction(new iLSH());
107} 107}
108void FormBinaryImpl::RSHClicked() { 108void FormBinaryImpl::RSHClicked() {
109 engine->immediateInstruction(new iRSH()); 109 engine->immediateInstruction(new iRSH());
110} 110}
diff --git a/noncore/tools/calc2/binary/binaryimpl.h b/noncore/tools/calc2/binary/binaryimpl.h
index bf9e3a7..7bf123a 100644
--- a/noncore/tools/calc2/binary/binaryimpl.h
+++ b/noncore/tools/calc2/binary/binaryimpl.h
@@ -1,50 +1,50 @@
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#ifndef FORMBINARYINPUTIMPL 20#ifndef FORMBINARYINPUTIMPL
21#define FORMBINARYINPUTIMPL 21#define FORMBINARYINPUTIMPL
22 22
23#include "binary.h" 23#include "binary.h"
24#include <engine.h> 24#include "../engine.h"
25 25
26class FormBinaryImpl : public FormBinary { 26class FormBinaryImpl : public FormBinary {
27Q_OBJECT 27Q_OBJECT
28public: 28public:
29 FormBinaryImpl(Engine *e,QWidget *p) : FormBinary (p,"Binary") { 29 FormBinaryImpl(Engine *e,QWidget *p) : FormBinary (p,"Binary") {
30 engine = e; 30 engine = e;
31 engine->setRepresentation(rBin); 31 engine->setRepresentation(rBin);
32 }; 32 };
33 ~FormBinaryImpl(){}; 33 ~FormBinaryImpl(){};
34private: 34private:
35 Engine *engine; 35 Engine *engine;
36 36
37private slots: 37private slots:
38 void val0Clicked(); 38 void val0Clicked();
39 void val1Clicked(); 39 void val1Clicked();
40 40
41 void XORClicked(); 41 void XORClicked();
42 void ANDClicked(); 42 void ANDClicked();
43 void NOTClicked(); 43 void NOTClicked();
44 void ORClicked(); 44 void ORClicked();
45 45
46 void LSHClicked(); 46 void LSHClicked();
47 void RSHClicked(); 47 void RSHClicked();
48}; 48};
49 49
50#endif 50#endif
diff --git a/noncore/tools/calc2/calc.cpp b/noncore/tools/calc2/calc.cpp
index c7656bf..8c50c2c 100644
--- a/noncore/tools/calc2/calc.cpp
+++ b/noncore/tools/calc2/calc.cpp
@@ -1,104 +1,103 @@
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 <qvaluelist.h> 21#include <qvaluelist.h>
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include <qdir.h> 23#include <qdir.h>
24#include <qwidgetstack.h> 24#include <qwidgetstack.h>
25 25
26#include "calc.h" 26#include "calc.h"
27#include "plugininterface.h" 27#include "plugininterface.h"
28 28
29calc::calc (QWidget * p, const char *n):QWidget (p, n) 29calc::calc (QWidget * p, const char *n):QWidget (p, n)
30{ 30{
31 setCaption (tr ("Calculator")); 31 setCaption (tr ("Calculator"));
32 32
33// widgets 33// widgets
34 LCD = new QLCDNumber (this); 34 LCD = new QLCDNumber (this);
35 LCD->setMaximumSize (QSize (240, 30)); 35 LCD->setMaximumSize (QSize (240, 30));
36 LCD->setNumDigits(12); 36 LCD->setNumDigits(12);
37LCD->setSegmentStyle(QLCDNumber::Filled); 37LCD->setSegmentStyle(QLCDNumber::Filled);
38 pluginWidgetStack = new QWidgetStack (this); 38 pluginWidgetStack = new QWidgetStack (this);
39 39
40// layout widgets 40// layout widgets
41 calculatorLayout = new QVBoxLayout (this); 41 calculatorLayout = new QVBoxLayout (this);
42 calculatorLayout->addWidget (LCD); 42 calculatorLayout->addWidget (LCD);
43 calculatorLayout->addWidget (pluginWidgetStack); 43 calculatorLayout->addWidget (pluginWidgetStack);
44 44
45// no formatting of display for now 45// no formatting of display for now
46 connect (&engine, SIGNAL(display(double)), LCD, SLOT(display(double))); 46 connect (&engine, SIGNAL(display(double)), LCD, SLOT(display(double)));
47 connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&))); 47 connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&)));
48 connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode())); 48 connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode()));
49 connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode())); 49 connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode()));
50 connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode())); 50 connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode()));
51 connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode())); 51 connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode()));
52 52
53#ifndef NO_PLUGINS 53#ifndef NO_PLUGINS
54// load plugins 54// load plugins
55 QValueList < Plugin >::Iterator mit; 55 QValueList < Plugin >::Iterator mit;
56 for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { 56 for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) {
57 (*mit).interface->release (); 57 (*mit).interface->release ();
58 (*mit).library->unload (); 58 (*mit).library->unload ();
59 delete (*mit).library; 59 delete (*mit).library;
60 } 60 }
61 pluginList.clear (); 61 pluginList.clear ();
62 62
63 QString path = QPEApplication::qpeDir() + "plugins/calculator"; 63 QString path = QPEApplication::qpeDir() + "plugins/calculator";
64 QDir dir (path, "lib*.so"); 64 QDir dir (path, "lib*.so");
65 QStringList list = dir.entryList (); 65 QStringList list = dir.entryList ();
66 66
67 QStringList::Iterator it; 67 QStringList::Iterator it;
68 for (it = list.begin (); it != list.end (); ++it) { 68 for (it = list.begin (); it != list.end (); ++it) {
69 CalcInterface *iface = 0; 69 CalcInterface *iface = 0;
70 QLibrary *lib = new QLibrary (path + "/" + *it); 70 QLibrary *lib = new QLibrary (path + "/" + *it);
71
72 Plugin plugin; 71 Plugin plugin;
73 plugin.pluginWidget = 0; 72 plugin.pluginWidget = 0;
74 73
75 if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) == 74 if (lib->queryInterface (IID_Calc, (QUnknownInterface **) & iface) ==
76 QS_OK) { 75 QS_OK) {
77 plugin.library = lib; 76 plugin.library = lib;
78 plugin.interface = iface; 77 plugin.interface = iface;
79 plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack); 78 plugin.pluginWidget = plugin.interface->getPlugin(&engine,pluginWidgetStack);
80 if (plugin.pluginWidget) 79 if (plugin.pluginWidget)
81 pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count()); 80 pluginWidgetStack->addWidget (plugin.pluginWidget, pluginList.count());
82 pluginList.append (plugin); 81 pluginList.append (plugin);
83 } else { 82 } else {
84 delete lib; 83 delete lib;
85 } 84 }
86 } 85 }
87 setMode (1); 86 setMode (1);
88#else 87#else
89// load simple interface 88// load simple interface
90#endif 89#endif
91} 90}
92 91
93calc::~calc () 92calc::~calc ()
94{ 93{
95#ifndef NO_PLUGINS 94#ifndef NO_PLUGINS
96 QValueList < Plugin >::Iterator mit; 95 QValueList < Plugin >::Iterator mit;
97 for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) { 96 for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) {
98 (*mit).interface->release (); 97 (*mit).interface->release ();
99 (*mit).library->unload (); 98 (*mit).library->unload ();
100 delete (*mit).library; 99 delete (*mit).library;
101 } 100 }
102#endif 101#endif
103} 102}
104 103
diff --git a/noncore/tools/calc2/simple/simple.pro b/noncore/tools/calc2/simple/simple.pro
index 2312f99..dde5e7d 100644
--- a/noncore/tools/calc2/simple/simple.pro
+++ b/noncore/tools/calc2/simple/simple.pro
@@ -1,14 +1,12 @@
1#TEMPLATE = lib 1TEMPLATE = lib
2#CONFIG -= moc 2CONFIG += qt
3#CONFIG += qt 3INTERFACES += simple.ui
4## Input 4HEADERS = simpleimpl.h simplefactory.h stdinstructions.h
5#INTERFACES += simple.ui 5SOURCES = simpleimpl.cpp simplefactory.cpp
6#HEADERS = simpleimpl.h simplefactory.h stdinstructions.h 6INCLUDEPATH += $(OPIEDIR)/include \
7#SOURCES = simpleimpl.cpp simplefactory.cpp 7 $(OPIEDIR)/calc2
8#INCLUDEPATH += $(OPIEDIR)/include \ 8DEPENDPATH += $(OPIEDIR)/include
9 # $(OPIEDIR)/calc2 9DESTDIR = $(OPIEDIR)/plugins/calculator
10#DEPENDPATH += $(OPIEDIR)/include 10
11#DESTDIR = $(OPIEDIR)/plugins/calculator
12#
13 11
14include( $(OPIEDIR)/include.pro ) 12include( $(OPIEDIR)/include.pro )
diff --git a/noncore/tools/calc2/simple/simplefactory.cpp b/noncore/tools/calc2/simple/simplefactory.cpp
index 515418f..52b090b 100644
--- a/noncore/tools/calc2/simple/simplefactory.cpp
+++ b/noncore/tools/calc2/simple/simplefactory.cpp
@@ -1,51 +1,51 @@
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** GNU General Public License version 2 as published by the Free Software 9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the 10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file. 11** packaging of this file.
12** 12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15** 15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information. 16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17** 17**
18** Contact info@trolltech.com if any conditions of this licensing are 18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you. 19** not clear to you.
20** 20**
21**********************************************************************/ 21**********************************************************************/
22 22
23#include "simplefactory.h" 23#include "simplefactory.h"
24#include "simpleimpl.h" 24#include "simpleimpl.h"
25#include <engine.h> 25#include "../engine.h"
26 26
27QWidget *SimpleInterface::getPlugin ( Engine *e, QWidget *parent ) { 27QWidget *SimpleInterface::getPlugin ( Engine *e, QWidget *parent ) {
28 if ( !input ) 28 if ( !input )
29 input = new FormSimpleImpl ( e, parent ); 29 input = new FormSimpleImpl ( e, parent );
30 return input; 30 return input;
31} 31}
32 32
33#ifndef QT_NO_COMPONENT 33#ifndef QT_NO_COMPONENT
34QRESULT SimpleInterface::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 34QRESULT SimpleInterface::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
35{ 35{
36 *iface = 0; 36 *iface = 0;
37 if ( uuid == IID_QUnknown ) 37 if ( uuid == IID_QUnknown )
38 *iface = this; 38 *iface = this;
39 else if ( uuid == IID_Calc ) 39 else if ( uuid == IID_Calc )
40 *iface = this; 40 *iface = this;
41 41
42 if ( *iface ) 42 if ( *iface )
43 (*iface)->addRef(); 43 (*iface)->addRef();
44 return QS_OK; 44 return QS_OK;
45} 45}
46 46
47Q_EXPORT_INTERFACE() 47Q_EXPORT_INTERFACE()
48{ 48{
49 Q_CREATE_INSTANCE( SimpleInterface ) 49 Q_CREATE_INSTANCE( SimpleInterface )
50} 50}
51#endif 51#endif
diff --git a/noncore/tools/calc2/simple/simplefactory.h b/noncore/tools/calc2/simple/simplefactory.h
index e1022fd..460c2b9 100644
--- a/noncore/tools/calc2/simple/simplefactory.h
+++ b/noncore/tools/calc2/simple/simplefactory.h
@@ -1,46 +1,46 @@
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#ifndef BINARYIMPL_H 21#ifndef BINARYIMPL_H
22#define BINARYIMPL_H 22#define BINARYIMPL_H
23 23
24#include "simpleimpl.h" 24#include "simpleimpl.h"
25#include <plugininterface.h> 25#include "../plugininterface.h"
26#include <engine.h> 26#include "../engine.h"
27 27
28class SimpleInterface : public CalcInterface 28class SimpleInterface : public CalcInterface
29{ 29{
30public: 30public:
31 SimpleInterface(){input = 0;}; 31 SimpleInterface(){input = 0;};
32 virtual ~SimpleInterface(){}; 32 virtual ~SimpleInterface(){};
33 33
34#ifndef QT_NO_COMPONENT 34#ifndef QT_NO_COMPONENT
35 QRESULT queryInterface( const QUuid&, QUnknownInterface** ); 35 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
36 Q_REFCOUNT 36 Q_REFCOUNT
37#endif 37#endif
38 38
39 QWidget *getPlugin( Engine *, QWidget *parent ); 39 QWidget *getPlugin( Engine *, QWidget *parent );
40 40
41private: 41private:
42 FormSimpleImpl *input; 42 FormSimpleImpl *input;
43 ulong ref; 43 ulong ref;
44}; 44};
45 45
46#endif 46#endif
diff --git a/noncore/tools/calc2/simple/simpleimpl.cpp b/noncore/tools/calc2/simple/simpleimpl.cpp
index f71f000..447cbdf 100644
--- a/noncore/tools/calc2/simple/simpleimpl.cpp
+++ b/noncore/tools/calc2/simple/simpleimpl.cpp
@@ -1,120 +1,120 @@
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 <qpushbutton.h> 21#include <qpushbutton.h>
22#include <qlcdnumber.h> 22#include <qlcdnumber.h>
23 23
24#include "simpleimpl.h" 24#include "simpleimpl.h"
25#include <stdinstructions.h> 25#include "../stdinstructions.h"
26 26
27void FormSimpleImpl::CEClicked() { 27void FormSimpleImpl::CEClicked() {
28 engine->hardReset(); 28 engine->hardReset();
29} 29}
30 30
31void FormSimpleImpl::MCClicked() { 31void FormSimpleImpl::MCClicked() {
32 engine->memClear(); 32 engine->memClear();
33} 33}
34 34
35void FormSimpleImpl::MRClicked() { 35void FormSimpleImpl::MRClicked() {
36 engine->memRecall(); 36 engine->memRecall();
37} 37}
38 38
39void FormSimpleImpl::MPlusClicked() { 39void FormSimpleImpl::MPlusClicked() {
40 engine->memSave(); 40 engine->memSave();
41} 41}
42 42
43void FormSimpleImpl::evalClicked() { 43void FormSimpleImpl::evalClicked() {
44 engine->eval(); 44 engine->eval();
45} 45}
46 46
47void FormSimpleImpl::addClicked () 47void FormSimpleImpl::addClicked ()
48{ 48{
49 engine->pushInstruction (new iAdd ()); 49 engine->pushInstruction (new iAdd ());
50} 50}
51 51
52void FormSimpleImpl::subClicked () 52void FormSimpleImpl::subClicked ()
53{ 53{
54 engine->pushInstruction (new iSub ()); 54 engine->pushInstruction (new iSub ());
55} 55}
56 56
57void FormSimpleImpl::mulClicked () 57void FormSimpleImpl::mulClicked ()
58{ 58{
59 engine->pushInstruction (new iMul ()); 59 engine->pushInstruction (new iMul ());
60} 60}
61 61
62void FormSimpleImpl::divClicked () 62void FormSimpleImpl::divClicked ()
63{ 63{
64 engine->pushInstruction (new iDiv ()); 64 engine->pushInstruction (new iDiv ());
65} 65}
66 66
67void FormSimpleImpl::decimalClicked () 67void FormSimpleImpl::decimalClicked ()
68{ 68{
69 engine->pushValue ('.'); 69 engine->pushValue ('.');
70} 70}
71 71
72void FormSimpleImpl::val1Clicked () 72void FormSimpleImpl::val1Clicked ()
73{ 73{
74 engine->pushValue ('1'); 74 engine->pushValue ('1');
75} 75}
76 76
77void FormSimpleImpl::val2Clicked () 77void FormSimpleImpl::val2Clicked ()
78{ 78{
79 engine->pushValue ('2'); 79 engine->pushValue ('2');
80} 80}
81 81
82void FormSimpleImpl::val3Clicked () 82void FormSimpleImpl::val3Clicked ()
83{ 83{
84 engine->pushValue ('3'); 84 engine->pushValue ('3');
85} 85}
86 86
87void FormSimpleImpl::val4Clicked () 87void FormSimpleImpl::val4Clicked ()
88{ 88{
89 engine->pushValue ('4'); 89 engine->pushValue ('4');
90} 90}
91 91
92void FormSimpleImpl::val5Clicked () 92void FormSimpleImpl::val5Clicked ()
93{ 93{
94 engine->pushValue ('5'); 94 engine->pushValue ('5');
95} 95}
96 96
97void FormSimpleImpl::val6Clicked () 97void FormSimpleImpl::val6Clicked ()
98{ 98{
99 engine->pushValue ('6'); 99 engine->pushValue ('6');
100} 100}
101 101
102void FormSimpleImpl::val7Clicked () 102void FormSimpleImpl::val7Clicked ()
103{ 103{
104 engine->pushValue ('7'); 104 engine->pushValue ('7');
105} 105}
106 106
107void FormSimpleImpl::val8Clicked () 107void FormSimpleImpl::val8Clicked ()
108{ 108{
109 engine->pushValue ('8'); 109 engine->pushValue ('8');
110} 110}
111 111
112void FormSimpleImpl::val9Clicked () 112void FormSimpleImpl::val9Clicked ()
113{ 113{
114 engine->pushValue ('9'); 114 engine->pushValue ('9');
115} 115}
116 116
117void FormSimpleImpl::val0Clicked () 117void FormSimpleImpl::val0Clicked ()
118{ 118{
119 engine->pushValue ('0'); 119 engine->pushValue ('0');
120} 120}
diff --git a/noncore/tools/calc2/simple/simpleimpl.h b/noncore/tools/calc2/simple/simpleimpl.h
index a2db154..b7b83e2 100644
--- a/noncore/tools/calc2/simple/simpleimpl.h
+++ b/noncore/tools/calc2/simple/simpleimpl.h
@@ -1,65 +1,65 @@
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#ifndef STANDARDIMPL_H 21#ifndef STANDARDIMPL_H
22#define STANDARDIMPL_H 22#define STANDARDIMPL_H
23 23
24#include <qpe/qmath.h> 24#include <qpe/qmath.h>
25#include <qlcdnumber.h> 25#include <qlcdnumber.h>
26 26
27#include "simple.h" 27#include "simple.h"
28#include "engine.h" 28#include "../engine.h"
29#include "instruction.h" 29#include "../instruction.h"
30 30
31class FormSimpleImpl:public FormSimple { 31class FormSimpleImpl:public FormSimple {
32Q_OBJECT 32Q_OBJECT
33public: 33public:
34 FormSimpleImpl (Engine *e, QWidget * parent = 0, const char *name = 0) 34 FormSimpleImpl (Engine *e, QWidget * parent = 0, const char *name = 0)
35 :FormSimple (parent, name) {engine = e;engine->setRepresentation(rDouble);}; 35 :FormSimple (parent, name) {engine = e;engine->setRepresentation(rDouble);};
36 36
37 ~FormSimpleImpl () { }; 37 ~FormSimpleImpl () { };
38 38
39private: 39private:
40 Engine *engine; 40 Engine *engine;
41 41
42private slots: 42private slots:
43 void MPlusClicked(); 43 void MPlusClicked();
44 void MCClicked(); 44 void MCClicked();
45 void MRClicked(); 45 void MRClicked();
46 void CEClicked(); 46 void CEClicked();
47 void evalClicked(); 47 void evalClicked();
48 void addClicked (); 48 void addClicked ();
49 void decimalClicked (); 49 void decimalClicked ();
50 void divClicked (); 50 void divClicked ();
51 void mulClicked (); 51 void mulClicked ();
52 void subClicked (); 52 void subClicked ();
53 void val0Clicked (); 53 void val0Clicked ();
54 void val1Clicked (); 54 void val1Clicked ();
55 void val2Clicked (); 55 void val2Clicked ();
56 void val3Clicked (); 56 void val3Clicked ();
57 void val4Clicked (); 57 void val4Clicked ();
58 void val5Clicked (); 58 void val5Clicked ();
59 void val6Clicked (); 59 void val6Clicked ();
60 void val7Clicked (); 60 void val7Clicked ();
61 void val8Clicked (); 61 void val8Clicked ();
62 void val9Clicked (); 62 void val9Clicked ();
63}; 63};
64 64
65#endif 65#endif
diff --git a/packages b/packages
index 433bd06..86dcab4 100644
--- a/packages
+++ b/packages
@@ -1,264 +1,267 @@
1 CONFIG_ABOUTAPPLET core/applets/aboutappletaboutapplet.pro 1 CONFIG_ABOUTAPPLET core/applets/aboutappletaboutapplet.pro
2 CONFIG_ADDRESSBOOK core/pim/addressbookaddressbook.pro 2 CONFIG_ADDRESSBOOK core/pim/addressbookaddressbook.pro
3 CONFIG_ADVANCEDFM noncore/apps/advancedfmadvancedfm.pro 3 CONFIG_ADVANCEDFM noncore/apps/advancedfmadvancedfm.pro
4 CONFIG_APPEARANCE2 noncore/settings/appearance2appearance2.pro 4 CONFIG_APPEARANCE2 noncore/settings/appearance2appearance2.pro
5 CONFIG_APPSKEY noncore/settings/appskeyappskey.pro 5 CONFIG_APPSKEY noncore/settings/appskeyappskey.pro
6 CONFIG_AQPKG noncore/settings/aqpkgaqpkg.pro 6 CONFIG_AQPKG noncore/settings/aqpkgaqpkg.pro
7 CONFIG_AUTOROTATEAPPLET noncore/applets/autorotateappletautorotateapplet.pro 7 CONFIG_AUTOROTATEAPPLET noncore/applets/autorotateappletautorotateapplet.pro
8 CONFIG_BACKGAMMONnoncore/games/backgammon backgammon.pro 8 CONFIG_BACKGAMMONnoncore/games/backgammon backgammon.pro
9 CONFIG_BACKUP noncore/settings/backupbackup.pro 9 CONFIG_BACKUP noncore/settings/backupbackup.pro
10 CONFIG_BARTENDER noncore/apps/opie-bartenderbartender.pro 10 CONFIG_BARTENDER noncore/apps/opie-bartenderbartender.pro
11 CONFIG_BATTERYAPPLET core/applets/batteryappletbatteryapplet.pro 11 CONFIG_BATTERYAPPLET core/applets/batteryappletbatteryapplet.pro
12 CONFIG_BEND noncore/unsupported/mail2/bendbend.pro 12 CONFIG_BEND noncore/unsupported/mail2/bendbend.pro
13CONFIG_BIGSCREEN_EXAMPLE unsupported/libopie/big-screen/example osplitter_mail.pro 13CONFIG_BIGSCREEN_EXAMPLE unsupported/libopie/big-screen/example osplitter_mail.pro
14 CONFIG_BINARY noncore/tools/calc2/binarybinary.pro 14 CONFIG_BINARY noncore/tools/calc2/binarybinary.pro
15 CONFIG_BLUE-PIN noncore/net/opietooth/blue-pinblue-pin.pro 15 CONFIG_BLUE-PIN noncore/net/opietooth/blue-pinblue-pin.pro
16 CONFIG_BOUNCE noncore/games/bouncebounce.pro 16 CONFIG_BOUNCE noncore/games/bouncebounce.pro
17 CONFIG_BRIGHTNESSAPPLET noncore/applets/brightnessappletbrightnessapplet.pro 17 CONFIG_BRIGHTNESSAPPLET noncore/applets/brightnessappletbrightnessapplet.pro
18 CONFIG_BUTTON-SETTINGS core/settings/buttonbutton.pro 18 CONFIG_BUTTON-SETTINGS core/settings/buttonbutton.pro
19 CONFIG_BUZZWORD noncore/games/buzzwordbuzzword.pro 19 CONFIG_BUZZWORD noncore/games/buzzwordbuzzword.pro
20 CONFIG_CALC2 noncore/tools/calc2calc.pro 20 CONFIG_CALC2 noncore/tools/calc2calc2.pro
21 CONFIG_CALC2-BINARY noncore/tools/calc2/binarybinary.pro
22 CONFIG_CALC2-SIMPLE noncore/tools/calc2/simplesimple.pro
21 CONFIG_CALCULATOR noncore/tools/calculatorcalculator.pro 23 CONFIG_CALCULATOR noncore/tools/calculatorcalculator.pro
22 CONFIG_CALIBRATE core/apps/calibratecalibrate.pro 24 CONFIG_CALIBRATE core/apps/calibratecalibrate.pro
23 CONFIG_CAMERA noncore/multimedia/cameracamera.pro 25 CONFIG_CAMERA noncore/multimedia/cameracamera.pro
24 CONFIG_CARDMON core/applets/cardmoncardmon.pro 26 CONFIG_CARDMON core/applets/cardmoncardmon.pro
25 CONFIG_CHECKBOOK noncore/apps/checkbookcheckbook.pro 27 CONFIG_CHECKBOOK noncore/apps/checkbookcheckbook.pro
26 CONFIG_CITYTIME core/settings/citytimecitytime.pro 28 CONFIG_CITYTIME core/settings/citytimecitytime.pro
27 CONFIG_CLIPBOARDAPPLET core/applets/clipboardappletclipboardapplet.pro 29 CONFIG_CLIPBOARDAPPLET core/applets/clipboardappletclipboardapplet.pro
28 CONFIG_CLOCKAPPLET core/applets/clockappletclockapplet.pro 30 CONFIG_CLOCKAPPLET core/applets/clockappletclockapplet.pro
29 CONFIG_CLOCK noncore/tools/clockclock.pro 31 CONFIG_CLOCK noncore/tools/clockclock.pro
30 CONFIG_CONFEDIT noncore/apps/confeditconfedit.pro 32 CONFIG_CONFEDIT noncore/apps/confeditconfedit.pro
31CONFIG_DAGGER noncore/apps/dagger dagger.pro 33CONFIG_DAGGER noncore/apps/dagger dagger.pro
32 CONFIG_DASHER inputmethods/dasherdasher.pro 34 CONFIG_DASHER inputmethods/dasherdasher.pro
33 CONFIG_DATEBOOK2 core/pim/datebook2datebook2.pro 35 CONFIG_DATEBOOK2 core/pim/datebook2datebook2.pro
34 CONFIG_DATEBOOK core/pim/datebookdatebook.pro 36 CONFIG_DATEBOOK core/pim/datebookdatebook.pro
35CONFIG_DATEBOOK_BIRTHDAYS_HOLIDAY core/pim/datebook/holiday/birthday birthdays.pro 37CONFIG_DATEBOOK_BIRTHDAYS_HOLIDAY core/pim/datebook/holiday/birthday birthdays.pro
36CONFIG_DATEBOOK_CHRISTIAN_HOLIDAY core/pim/datebook/holiday/christian christian-holidays.pro 38CONFIG_DATEBOOK_CHRISTIAN_HOLIDAY core/pim/datebook/holiday/christian christian-holidays.pro
37CONFIG_DATEBOOK_NATIONAL_HOLIDAY core/pim/datebook/holiday/national national-holidays.pro 39CONFIG_DATEBOOK_NATIONAL_HOLIDAY core/pim/datebook/holiday/national national-holidays.pro
38 CONFIG_DECO_FLAT noncore/decorations/flatflat.pro 40 CONFIG_DECO_FLAT noncore/decorations/flatflat.pro
39 CONFIG_DECO_LIQUID noncore/decorations/liquidliquid.pro 41 CONFIG_DECO_LIQUID noncore/decorations/liquidliquid.pro
40 CONFIG_DECO_POLISHED noncore/decorations/polishedpolished.pro 42 CONFIG_DECO_POLISHED noncore/decorations/polishedpolished.pro
41 CONFIG_DICTIONARY noncore/apps/dictionarydictionary.pro 43 CONFIG_DICTIONARY noncore/apps/dictionarydictionary.pro
42CONFIG_DOCTAB noncore/settings/doctab doctab.pro 44CONFIG_DOCTAB noncore/settings/doctab doctab.pro
43 CONFIG_DRAWPAD noncore/graphics/drawpaddrawpad.pro 45 CONFIG_DRAWPAD noncore/graphics/drawpaddrawpad.pro
44 CONFIG_DVORAK inputmethods/dvorakdvorak.pro 46 CONFIG_DVORAK inputmethods/dvorakdvorak.pro
45 CONFIG_EMBEDDEDKONSOLE core/apps/embeddedkonsoleembeddedkonsole.pro 47 CONFIG_EMBEDDEDKONSOLE core/apps/embeddedkonsoleembeddedkonsole.pro
46 CONFIG_EUROCONV noncore/tools/euroconv/ euroconv.pro 48 CONFIG_EUROCONV noncore/tools/euroconv/ euroconv.pro
47 CONFIG_EXAMPLE_APPLET examples/appletapplet.pro 49 CONFIG_EXAMPLE_APPLET examples/appletapplet.pro
48CONFIG_EXAMPLE_BOARD examples/inputmethod inputmethod.pro 50CONFIG_EXAMPLE_BOARD examples/inputmethod inputmethod.pro
49 CONFIG_EXAMPLE_LIBOPIE2BLUEZ examples/opiebluezopiebluez.pro 51 CONFIG_EXAMPLE_LIBOPIE2BLUEZ examples/opiebluezopiebluez.pro
50 CONFIG_EXAMPLE_LIBOPIE2COREexamples/opiecore opiecore.pro 52 CONFIG_EXAMPLE_LIBOPIE2COREexamples/opiecore opiecore.pro
51 CONFIG_EXAMPLE_LIBOPIE2DBexamples/opiedb opiedb.pro 53 CONFIG_EXAMPLE_LIBOPIE2DBexamples/opiedb opiedb.pro
52 CONFIG_EXAMPLE_LIBOPIE2MMexamples/opiemm opiemm.pro 54 CONFIG_EXAMPLE_LIBOPIE2MMexamples/opiemm opiemm.pro
53 CONFIG_EXAMPLE_LIBOPIE2NETexamples/opienet opienet.pro 55 CONFIG_EXAMPLE_LIBOPIE2NETexamples/opienet opienet.pro
54 CONFIG_EXAMPLE_LIBOPIE2PIMexamples/opiepim opiepim.pro 56 CONFIG_EXAMPLE_LIBOPIE2PIMexamples/opiepim opiepim.pro
55 CONFIG_EXAMPLE_LIBOPIE2SECURITYexamples/opiesecurity opiesecurity.pro 57 CONFIG_EXAMPLE_LIBOPIE2SECURITYexamples/opiesecurity opiesecurity.pro
56 CONFIG_EXAMPLE_LIBOPIE2UI examples/opieuiopieui.pro 58 CONFIG_EXAMPLE_LIBOPIE2UI examples/opieuiopieui.pro
57CONFIG_EXAMPLE_MENU examples/menuapplet menuapplet.pro 59CONFIG_EXAMPLE_MENU examples/menuapplet menuapplet.pro
58CONFIG_EXAMPLE_VPN examples/networksettings networksettings.pro 60CONFIG_EXAMPLE_VPN examples/networksettings networksettings.pro
59 CONFIG_FIFTEEN noncore/games/fifteenfifteen.pro 61 CONFIG_FIFTEEN noncore/games/fifteenfifteen.pro
60 CONFIG_FILEBROWSER noncore/unsupported/filebrowserfilebrowser.pro 62 CONFIG_FILEBROWSER noncore/unsupported/filebrowserfilebrowser.pro
61 CONFIG_FLAT noncore/styles/flatflat.pro 63 CONFIG_FLAT noncore/styles/flatflat.pro
62 CONFIG_FORMATTER noncore/tools/formatterformatter.pro 64 CONFIG_FORMATTER noncore/tools/formatterformatter.pro
63 CONFIG_FREETYPE freetypefreetype.pro 65 CONFIG_FREETYPE freetypefreetype.pro
64 CONFIG_FRESH noncore/styles/freshfresh.pro 66 CONFIG_FRESH noncore/styles/freshfresh.pro
65 CONFIG_FTPLIB noncore/net/ftplibftplib.pro 67 CONFIG_FTPLIB noncore/net/ftplibftplib.pro
66 CONFIG_GO noncore/games/gogo.pro 68 CONFIG_GO noncore/games/gogo.pro
67 CONFIG_GSMTOOL noncore/unsupported/gsmtoolgsmtool.pro 69 CONFIG_GSMTOOL noncore/unsupported/gsmtoolgsmtool.pro
68 CONFIG_GUTENBROWSER noncore/apps/opie-gutenbrowseropie-gutenbrowser.pro 70 CONFIG_GUTENBROWSER noncore/apps/opie-gutenbrowseropie-gutenbrowser.pro
69 CONFIG_HANDWRITING inputmethods/handwritinghandwriting.pro 71 CONFIG_HANDWRITING inputmethods/handwritinghandwriting.pro
70 CONFIG_HELPBROWSER core/apps/helpbrowserhelpbrowser.pro 72 CONFIG_HELPBROWSER core/apps/helpbrowserhelpbrowser.pro
71 CONFIG_HOMEAPPLET core/applets/homeapplethomeapplet.pro 73 CONFIG_HOMEAPPLET core/applets/homeapplethomeapplet.pro
72 CONFIG_HOTPLUG_QCOP core/tools/hotplug-qcophotplug-qcop.pro 74 CONFIG_HOTPLUG_QCOP core/tools/hotplug-qcophotplug-qcop.pro
73 CONFIG_INTERFACES noncore/settings/networksettings/interfacesinterfaces.pro 75 CONFIG_INTERFACES noncore/settings/networksettings/interfacesinterfaces.pro
74 CONFIG_IRDAAPPLET core/applets/irdaappletirdaapplet.pro 76 CONFIG_IRDAAPPLET core/applets/irdaappletirdaapplet.pro
75 CONFIG_JUMPX inputmethods/jumpxjumpx.pro 77 CONFIG_JUMPX inputmethods/jumpxjumpx.pro
76 CONFIG_KBILL noncore/games/kbillkbill.pro 78 CONFIG_KBILL noncore/games/kbillkbill.pro
77 CONFIG_KCHECKERS noncore/games/kcheckerskcheckers.pro 79 CONFIG_KCHECKERS noncore/games/kcheckerskcheckers.pro
78 CONFIG_KEYBOARD inputmethods/keyboardkeyboard.pro 80 CONFIG_KEYBOARD inputmethods/keyboardkeyboard.pro
79CONFIG_KEYHELPER noncore/applets/keyhelper keyhelper.pro 81CONFIG_KEYHELPER noncore/applets/keyhelper keyhelper.pro
80 CONFIG_KEYPEBBLE noncore/comm/keypebblekeypebble.pro 82 CONFIG_KEYPEBBLE noncore/comm/keypebblekeypebble.pro
81 CONFIG_KEYVIEW development/keyviewkeyview.pro 83 CONFIG_KEYVIEW development/keyviewkeyview.pro
82 CONFIG_KJUMPX inputmethods/kjumpxkjumpx.pro 84 CONFIG_KJUMPX inputmethods/kjumpxkjumpx.pro
83 CONFIG_KPACMAN noncore/games/kpacmankpacman.pro 85 CONFIG_KPACMAN noncore/games/kpacmankpacman.pro
84 CONFIG_LANGUAGE noncore/settings/languagelanguage.pro 86 CONFIG_LANGUAGE noncore/settings/languagelanguage.pro
85 CONFIG_LAUNCHER core/launcherserver.pro 87 CONFIG_LAUNCHER core/launcherserver.pro
86 CONFIG_LAUNCHER-SETTINGS core/settings/launcherlauncher.pro 88 CONFIG_LAUNCHER-SETTINGS core/settings/launcherlauncher.pro
87 CONFIG_LIBFFMPEG core/multimedia/opieplayer/libffmpeglibffmpeg.pro 89 CONFIG_LIBFFMPEG core/multimedia/opieplayer/libffmpeglibffmpeg.pro
88 CONFIG_LIBFLASH core/multimedia/opieplayer/libflashlibflash.pro 90 CONFIG_LIBFLASH core/multimedia/opieplayer/libflashlibflash.pro
89 CONFIG_LIBMAD core/multimedia/opieplayer/libmadlibmad.pro 91 CONFIG_LIBMAD core/multimedia/opieplayer/libmadlibmad.pro
90 CONFIG_LIBMAIL noncore/unsupported/mail2/libmaillibmail.pro 92 CONFIG_LIBMAIL noncore/unsupported/mail2/libmaillibmail.pro
91CONFIG_LIBMAILWRAPPER noncore/net/mail/libmailwrapper libmailwrapper.pro 93CONFIG_LIBMAILWRAPPER noncore/net/mail/libmailwrapper libmailwrapper.pro
92 CONFIG_LIBMPEG3 core/multimedia/opieplayer/libmpeg3libmpeg3.pro 94 CONFIG_LIBMPEG3 core/multimedia/opieplayer/libmpeg3libmpeg3.pro
93 CONFIG_LIBOPIE2BLUEZ libopie2/opiebluezopiebluez.pro 95 CONFIG_LIBOPIE2BLUEZ libopie2/opiebluezopiebluez.pro
94 CONFIG_LIBOPIE2CORE libopie2/opiecoreopiecore.pro 96 CONFIG_LIBOPIE2CORE libopie2/opiecoreopiecore.pro
95 CONFIG_LIBOPIE2DB libopie2/opiedbopiedb.pro 97 CONFIG_LIBOPIE2DB libopie2/opiedbopiedb.pro
96 CONFIG_LIBOPIE2EXAMPLES libopie2/examplesexamples.pro 98 CONFIG_LIBOPIE2EXAMPLES libopie2/examplesexamples.pro
97 CONFIG_LIBOPIE2MM libopie2/opiemmopiemm.pro 99 CONFIG_LIBOPIE2MM libopie2/opiemmopiemm.pro
98 CONFIG_LIBOPIE2NET libopie2/opienetopienet.pro 100 CONFIG_LIBOPIE2NET libopie2/opienetopienet.pro
99 CONFIG_LIBOPIE2PIM libopie2/opiepimopiepim.pro 101 CONFIG_LIBOPIE2PIM libopie2/opiepimopiepim.pro
100 CONFIG_LIBOPIE2SECURITYlibopie2/opiesecurity opiesecurity.pro 102 CONFIG_LIBOPIE2SECURITYlibopie2/opiesecurity opiesecurity.pro
101 CONFIG_LIBOPIE2UI libopie2/opieuiopieui.pro 103 CONFIG_LIBOPIE2UI libopie2/opieuiopieui.pro
102 CONFIG_LIBOPIETOOTH noncore/net/opietooth/liblib.pro 104 CONFIG_LIBOPIETOOTH noncore/net/opietooth/liblib.pro
103 CONFIG_LIBOPIEnoncore/unsupported/libopie libopie.pro 105 CONFIG_LIBOPIEnoncore/unsupported/libopie libopie.pro
104 CONFIG_LIBQPE librarylibrary.pro 106 CONFIG_LIBQPE librarylibrary.pro
105 CONFIG_LIBQPE-X11 x11/libqpe-x11libqpe-x11.pro 107 CONFIG_LIBQPE-X11 x11/libqpe-x11libqpe-x11.pro
106CONFIG_LIBQRSYNC rsync rsync.pro 108CONFIG_LIBQRSYNC rsync rsync.pro
107 CONFIG_LIBQTAUX libqtauxlibqtaux.pro 109 CONFIG_LIBQTAUX libqtauxlibqtaux.pro
108 CONFIG_LIBSLCOMPAT libslcompatlibslcompat.pro 110 CONFIG_LIBSLCOMPAT libslcompatlibslcompat.pro
109 CONFIG_LIBSQL libsqllibsql.pro 111 CONFIG_LIBSQL libsqllibsql.pro
110CONFIG_LIBTREMOR core/multimedia/opieplayer/vorbis/tremor tremor.pro 112CONFIG_LIBTREMOR core/multimedia/opieplayer/vorbis/tremor tremor.pro
111CONFIG_LIBTREMORPLUGIN core/multimedia/opieplayer/vorbis libtremor.pro 113CONFIG_LIBTREMORPLUGIN core/multimedia/opieplayer/vorbis libtremor.pro
112 CONFIG_LIGHT-AND-POWER core/settings/light-and-powerlight-and-power.pro 114 CONFIG_LIGHT-AND-POWER core/settings/light-and-powerlight-and-power.pro
113 CONFIG_LIQUID noncore/styles/liquidliquid.pro 115 CONFIG_LIQUID noncore/styles/liquidliquid.pro
114 CONFIG_LOCKAPPLET core/applets/lockappletlockapplet.pro 116 CONFIG_LOCKAPPLET core/applets/lockappletlockapplet.pro
115 CONFIG_LOGOUTAPPLET core/applets/logoutappletlogoutapplet.pro 117 CONFIG_LOGOUTAPPLET core/applets/logoutappletlogoutapplet.pro
116 CONFIG_MAIL3 noncore/net/mail mail.pro 118 CONFIG_MAIL3 noncore/net/mail mail.pro
117CONFIG_MAILAPPLET noncore/net/mail/taskbarapplet taskbarapplet.pro 119CONFIG_MAILAPPLET noncore/net/mail/taskbarapplet taskbarapplet.pro
118 CONFIG_MAILIT noncore/unsupported/mailit mailit.pro 120 CONFIG_MAILIT noncore/unsupported/mailit mailit.pro
119CONFIG_MAIN_TAB_EXAMPLE examples/main-tab main-tab.pro 121CONFIG_MAIN_TAB_EXAMPLE examples/main-tab main-tab.pro
120 CONFIG_MEDIUMMOUNT noncore/settings/mediummountmediummount.pro 122 CONFIG_MEDIUMMOUNT noncore/settings/mediummountmediummount.pro
121 CONFIG_MEMORYAPPLET noncore/applets/memoryappletmemoryapplet.pro 123 CONFIG_MEMORYAPPLET noncore/applets/memoryappletmemoryapplet.pro
122 CONFIG_METAL noncore/styles/metalmetal.pro 124 CONFIG_METAL noncore/styles/metalmetal.pro
123 CONFIG_MINDBREAKER noncore/games/mindbreakermindbreaker.pro 125 CONFIG_MINDBREAKER noncore/games/mindbreakermindbreaker.pro
124 CONFIG_MINESWEEP noncore/games/minesweepminesweep.pro 126 CONFIG_MINESWEEP noncore/games/minesweepminesweep.pro
125 CONFIG_MOBILEMSG noncore/unsupported/mobilemsgmobilemsg.pro 127 CONFIG_MOBILEMSG noncore/unsupported/mobilemsgmobilemsg.pro
126 CONFIG_MODPLUG core/multimedia/opieplayer/modplugmodplug.pro 128 CONFIG_MODPLUG core/multimedia/opieplayer/modplugmodplug.pro
127CONFIG_MULTIAUTH_BLUEPING noncore/securityplugins/blueping bluepingplugin.pro 129CONFIG_MULTIAUTH_BLUEPING noncore/securityplugins/blueping bluepingplugin.pro
128CONFIG_MULTIAUTH_DUMMY noncore/securityplugins/dummy dummyplugin.pro 130CONFIG_MULTIAUTH_DUMMY noncore/securityplugins/dummy dummyplugin.pro
129CONFIG_MULTIAUTH_NOTICE noncore/securityplugins/notice noticeplugin.pro 131CONFIG_MULTIAUTH_NOTICE noncore/securityplugins/notice noticeplugin.pro
130CONFIG_MULTIAUTH_PIN noncore/securityplugins/pin pinplugin.pro 132CONFIG_MULTIAUTH_PIN noncore/securityplugins/pin pinplugin.pro
131 CONFIG_MULTIKEYAPPLET core/applets/multikeyappletmultikeyapplet.pro 133 CONFIG_MULTIKEYAPPLET core/applets/multikeyappletmultikeyapplet.pro
132 CONFIG_MULTIKEY inputmethods/multikeymultikey.pro 134 CONFIG_MULTIKEY inputmethods/multikeymultikey.pro
133 CONFIG_NETSYSTEMTIME noncore/settings/netsystemtimenetsystemtime.pro 135 CONFIG_NETSYSTEMTIME noncore/settings/netsystemtimenetsystemtime.pro
134 CONFIG_NETWORKAPPLET noncore/applets/networkappletnetworkapplet.pro 136 CONFIG_NETWORKAPPLET noncore/applets/networkappletnetworkapplet.pro
135 CONFIG_NETWORKSETUP noncore/settings/networksettingsnetworksettings.pro 137 CONFIG_NETWORKSETUP noncore/settings/networksettingsnetworksettings.pro
136 CONFIG_NOTESAPPLET noncore/applets/notesappletnotesapplet.pro 138 CONFIG_NOTESAPPLET noncore/applets/notesappletnotesapplet.pro
137 CONFIG_NS2BT noncore/settings/networksettings2/bluetoothbluetooth.pro 139 CONFIG_NS2BT noncore/settings/networksettings2/bluetoothbluetooth.pro
138 CONFIG_NS2GPRS noncore/settings/networksettings2/gprsGPRS.pro 140 CONFIG_NS2GPRS noncore/settings/networksettings2/gprsGPRS.pro
139 CONFIG_NS2CABLE noncore/settings/networksettings2/cablecable.pro 141 CONFIG_NS2CABLE noncore/settings/networksettings2/cablecable.pro
140 CONFIG_NS2CORE noncore/settings/networksettings2/networksettings2networksettings2.pro 142 CONFIG_NS2CORE noncore/settings/networksettings2/networksettings2networksettings2.pro
141 CONFIG_NS2OPIETOOTH noncore/settings/networksettings2/opietooth2opietooth2.pro 143 CONFIG_NS2OPIETOOTH noncore/settings/networksettings2/opietooth2opietooth2.pro
142 CONFIG_NS2OPIETOOTHAPPLET noncore/settings/networksettings2/opietooth2_appletopietooth2_applet.pro 144 CONFIG_NS2OPIETOOTHAPPLET noncore/settings/networksettings2/opietooth2_appletopietooth2_applet.pro
143 CONFIG_NS2IRDA noncore/settings/networksettings2/irdairda.pro 145 CONFIG_NS2IRDA noncore/settings/networksettings2/irdairda.pro
144 CONFIG_NS2LANCARD noncore/settings/networksettings2/lancardlancard.pro 146 CONFIG_NS2LANCARD noncore/settings/networksettings2/lancardlancard.pro
145 CONFIG_NS2MODEM noncore/settings/networksettings2/modemmodem.pro 147 CONFIG_NS2MODEM noncore/settings/networksettings2/modemmodem.pro
146 CONFIG_NS2NETWORK noncore/settings/networksettings2/networknetwork.pro 148 CONFIG_NS2NETWORK noncore/settings/networksettings2/networknetwork.pro
147 CONFIG_NS2 noncore/settings/networksettings2networksettings.pro 149 CONFIG_NS2 noncore/settings/networksettings2networksettings.pro
148 CONFIG_NS2PPP noncore/settings/networksettings2/pppppp.pro 150 CONFIG_NS2PPP noncore/settings/networksettings2/pppppp.pro
149 CONFIG_NS2PROFILE noncore/settings/networksettings2/profileprofile.pro 151 CONFIG_NS2PROFILE noncore/settings/networksettings2/profileprofile.pro
150 CONFIG_NS2USB noncore/settings/networksettings2/usbusb.pro 152 CONFIG_NS2USB noncore/settings/networksettings2/usbusb.pro
151 CONFIG_NS2VPN noncore/settings/networksettings2/vpnvpn.pro 153 CONFIG_NS2VPN noncore/settings/networksettings2/vpnvpn.pro
152 CONFIG_NS2WLAN noncore/settings/networksettings2/wlanwlan.pro 154 CONFIG_NS2WLAN noncore/settings/networksettings2/wlanwlan.pro
153 CONFIG_OAPP core/apps/oappoapp.pro 155 CONFIG_OAPP core/apps/oappoapp.pro
154 CONFIG_OBEX core/obexobex.pro 156 CONFIG_OBEX core/obexobex.pro
155 CONFIG_ODICT noncore/apps/odictodict.pro 157 CONFIG_ODICT noncore/apps/odictodict.pro
156 CONFIG_OIPKG noncore/unsupported/oipkgoipkg.pro 158 CONFIG_OIPKG noncore/unsupported/oipkgoipkg.pro
157 CONFIG_OPIEALARM core/opiealarmopiealarm.pro 159 CONFIG_OPIEALARM core/opiealarmopiealarm.pro
158 CONFIG_OPIE-CONSOLE noncore/apps/opie-consoleopie-console.pro 160 CONFIG_OPIE-CONSOLE noncore/apps/opie-consoleopie-console.pro
159 CONFIG_OPIE_EYE noncore/graphics/opie-eyephunk_view.pro 161 CONFIG_OPIE_EYE noncore/graphics/opie-eyephunk_view.pro
160 CONFIG_OPIE_EYE_SLAVE noncore/graphics/opie-eye/slaveslave.pro 162 CONFIG_OPIE_EYE_SLAVE noncore/graphics/opie-eye/slaveslave.pro
161 CONFIG_OPIEFTP noncore/net/opieftpopieftp.pro 163 CONFIG_OPIEFTP noncore/net/opieftpopieftp.pro
162 CONFIG_OPIEIRC noncore/net/opieircopieirc.pro 164 CONFIG_OPIEIRC noncore/net/opieircopieirc.pro
163 CONFIG_OPIE-LOGIN core/opie-loginopie-login.pro 165 CONFIG_OPIE-LOGIN core/opie-loginopie-login.pro
164 CONFIG_OPIEMAIL2noncore/unsupported/mail2 mail.pro 166 CONFIG_OPIEMAIL2noncore/unsupported/mail2 mail.pro
165 CONFIG_OPIEPLAYER2 noncore/multimedia/opieplayer2opieplayer2.pro 167 CONFIG_OPIEPLAYER2 noncore/multimedia/opieplayer2opieplayer2.pro
166 CONFIG_OPIEPLAYER3 noncore/multimedia/opieplayer3opieplayer3.pro 168 CONFIG_OPIEPLAYER3 noncore/multimedia/opieplayer3opieplayer3.pro
167 CONFIG_OPIEPLAYER core/multimedia/opieplayeropieplayer.pro 169 CONFIG_OPIEPLAYER core/multimedia/opieplayeropieplayer.pro
168 CONFIG_OPIE-RDESKTOP noncore/net/opierdesktopopierdesktop.pro 170 CONFIG_OPIE-RDESKTOP noncore/net/opierdesktopopierdesktop.pro
169 CONFIG_OPIE-READER noncore/apps/opie-readeropie-reader.pro 171 CONFIG_OPIE-READER noncore/apps/opie-readeropie-reader.pro
170 CONFIG_OPIE-READER-FLITEDYN noncore/apps/opie-reader/FliteDynFliteDyn.pro 172 CONFIG_OPIE-READER-FLITEDYN noncore/apps/opie-reader/FliteDynFliteDyn.pro
171 CONFIG_OPIE-READER-FLITEDYN16 noncore/apps/opie-reader/FliteDyn16FliteDyn16.pro 173 CONFIG_OPIE-READER-FLITEDYN16 noncore/apps/opie-reader/FliteDyn16FliteDyn16.pro
172 CONFIG_OPIEREC noncore/multimedia/opierecopierec.pro 174 CONFIG_OPIEREC noncore/multimedia/opierecopierec.pro
175 CONFIG_OPIESMB noncore/net/opie-smbopie-smb.pro
173 CONFIG_OPIE-SHEET noncore/apps/opie-sheetopie-sheet.pro 176 CONFIG_OPIE-SHEET noncore/apps/opie-sheetopie-sheet.pro
174 CONFIG_OPIE-SH noncore/tools/opie-shopie-sh.pro 177 CONFIG_OPIE-SH noncore/tools/opie-shopie-sh.pro
175 CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/appletapplet.pro 178 CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/appletapplet.pro
176 CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/managermanager.pro 179 CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/managermanager.pro
177 CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro 180 CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro
178 CONFIG_OSEARCH core/pim/osearchosearch.pro 181 CONFIG_OSEARCH core/pim/osearchosearch.pro
179 CONFIG_OXYGEN noncore/apps/oxygenoxygen.pro 182 CONFIG_OXYGEN noncore/apps/oxygenoxygen.pro
180 CONFIG_PACKAGEMANAGER noncore/settings/packagemanagerpackagemanager.pro 183 CONFIG_PACKAGEMANAGER noncore/settings/packagemanagerpackagemanager.pro
181 CONFIG_PARASHOOT noncore/games/parashootparashoot.pro 184 CONFIG_PARASHOOT noncore/games/parashootparashoot.pro
182 CONFIG_PCMCIA-APPLET noncore/applets/pcmciapcmcia.pro 185 CONFIG_PCMCIA-APPLET noncore/applets/pcmciapcmcia.pro
183 CONFIG_PHASE noncore/styles/phasephase.pro 186 CONFIG_PHASE noncore/styles/phasephase.pro
184 CONFIG_PICKBOARD inputmethods/pickboardpickboard.pro 187 CONFIG_PICKBOARD inputmethods/pickboardpickboard.pro
185CONFIG_PIMCONVERTER noncore/tools/pimconverter converter.pro 188CONFIG_PIMCONVERTER noncore/tools/pimconverter converter.pro
186 CONFIG_POWERCHORD noncore/multimedia/powerchordpowerchord.pro 189 CONFIG_POWERCHORD noncore/multimedia/powerchordpowerchord.pro
187CONFIG_PPP noncore/settings/networksettings/ppp ppp.pro 190CONFIG_PPP noncore/settings/networksettings/ppp ppp.pro
188 CONFIG_PYQUICKLAUNCH-APPLET noncore/applets/pyquicklaunchpyquicklaunch.pro 191 CONFIG_PYQUICKLAUNCH-APPLET noncore/applets/pyquicklaunchpyquicklaunch.pro
189 CONFIG_PYQUICKLAUNCHER noncore/tools/pyquicklauncherpyquicklauncher.pro 192 CONFIG_PYQUICKLAUNCHER noncore/tools/pyquicklauncherpyquicklauncher.pro
190 CONFIG_PYTHON-EXAMPLESexamples/python bla.pro 193 CONFIG_PYTHON-EXAMPLESexamples/python bla.pro
191 CONFIG_QASHMONEY noncore/unsupported/qashmoneyqashmoney.pro 194 CONFIG_QASHMONEY noncore/unsupported/qashmoneyqashmoney.pro
192 CONFIG_QASTEROIDS noncore/games/qasteroidsqasteroids.pro 195 CONFIG_QASTEROIDS noncore/games/qasteroidsqasteroids.pro
193 CONFIG_QCOP core/apps/qcopqcop.pro 196 CONFIG_QCOP core/apps/qcopqcop.pro
194 CONFIG_QPDF noncore/unsupported/qpdfqpdf.pro 197 CONFIG_QPDF noncore/unsupported/qpdfqpdf.pro
195 CONFIG_QSS core/apps/qssqss.pro 198 CONFIG_QSS core/apps/qssqss.pro
196CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro 199CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro
197 CONFIG_QWS core/qwsqws.pro 200 CONFIG_QWS core/qwsqws.pro
198 CONFIG_REMOTE noncore/tools/remoteremote.pro 201 CONFIG_REMOTE noncore/tools/remoteremote.pro
199 CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro 202 CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro
200 CONFIG_RESTARTAPPLET core/applets/restartappletrestartapplet.pro 203 CONFIG_RESTARTAPPLET core/applets/restartappletrestartapplet.pro
201 CONFIG_ROTATEAPPLET core/applets/rotateappletrotateapplet.pro 204 CONFIG_ROTATEAPPLET core/applets/rotateappletrotateapplet.pro
202 CONFIG_ROTATION noncore/settings/rotationrotation.pro 205 CONFIG_ROTATION noncore/settings/rotationrotation.pro
203 CONFIG_RUNAPPLET core/applets/runappletrunapplet.pro 206 CONFIG_RUNAPPLET core/applets/runappletrunapplet.pro
204 CONFIG_SCREENSHOTAPPLET core/applets/screenshotappletscreenshotapplet.pro 207 CONFIG_SCREENSHOTAPPLET core/applets/screenshotappletscreenshotapplet.pro
205 CONFIG_SECURITY core/settings/securitysecurity.pro 208 CONFIG_SECURITY core/settings/securitysecurity.pro
206 CONFIG_MULTIAUTH_DEMO core/settings/security/demomultiauth.pro 209 CONFIG_MULTIAUTH_DEMO core/settings/security/demomultiauth.pro
207 CONFIG_SFCAVE noncore/games/sfcavesfcave.pro 210 CONFIG_SFCAVE noncore/games/sfcavesfcave.pro
208 CONFIG_SFCAVE-SDL noncore/games/sfcave-sdlsfcave-sdl.pro 211 CONFIG_SFCAVE-SDL noncore/games/sfcave-sdlsfcave-sdl.pro
209 CONFIG_SHOWIMG noncore/unsupported/showimgshowimg.pro 212 CONFIG_SHOWIMG noncore/unsupported/showimgshowimg.pro
210CONFIG_SIMPLE_EXAMPLE examples/simple simple.pro 213CONFIG_SIMPLE_EXAMPLE examples/simple simple.pro
211CONFIG_SIMPLE_ICON examples/simple-icon simple-icon.pro 214CONFIG_SIMPLE_ICON examples/simple-icon simple-icon.pro
212CONFIG_SIMPLE_MAIN examples/simple-main simple-main.pro 215CONFIG_SIMPLE_MAIN examples/simple-main simple-main.pro
213 CONFIG_SIMPLE noncore/tools/calc2/simplesimple.pro 216 CONFIG_SIMPLE noncore/tools/calc2/simplesimple.pro
214CONFIG_SIMPLE_PIM examples/simple-pim simple-pim.pro 217CONFIG_SIMPLE_PIM examples/simple-pim simple-pim.pro
215 CONFIG_SINGLE singlesingle.pro 218 CONFIG_SINGLE singlesingle.pro
216 CONFIG_SNAKE noncore/games/snakesnake.pro 219 CONFIG_SNAKE noncore/games/snakesnake.pro
217 CONFIG_SOLITAIRE noncore/games/solitairesolitaire.pro 220 CONFIG_SOLITAIRE noncore/games/solitairesolitaire.pro
218 CONFIG_SOUND noncore/settings/soundsound.pro 221 CONFIG_SOUND noncore/settings/soundsound.pro
219 CONFIG_SSHKEYS noncore/settings/sshkeyssshkeys.pro 222 CONFIG_SSHKEYS noncore/settings/sshkeyssshkeys.pro
220 CONFIG_SUSPENDAPPLET core/applets/suspendappletsuspendapplet.pro 223 CONFIG_SUSPENDAPPLET core/applets/suspendappletsuspendapplet.pro
221CONFIG_SYMLINKER core/symlinker symlinker.pro 224CONFIG_SYMLINKER core/symlinker symlinker.pro
222 CONFIG_SYSINFO noncore/settings/sysinfosysinfo.pro 225 CONFIG_SYSINFO noncore/settings/sysinfosysinfo.pro
223 CONFIG_TABLEVIEWER noncore/apps/tableviewertableviewer.pro 226 CONFIG_TABLEVIEWER noncore/apps/tableviewertableviewer.pro
224 CONFIG_TABMANAGER noncore/unsupported/tabmanagertabmanager.pro 227 CONFIG_TABMANAGER noncore/unsupported/tabmanagertabmanager.pro
225 CONFIG_TABOAPP core/apps/taboapptaboapp.pro 228 CONFIG_TABOAPP core/apps/taboapptaboapp.pro
226 CONFIG_TEST libsql/testtest.pro 229 CONFIG_TEST libsql/testtest.pro
227 CONFIG_TEST noncore/apps/opie-console/testtest.pro 230 CONFIG_TEST noncore/apps/opie-console/testtest.pro
228 CONFIG_TETRIX noncore/games/tetrixtetrix.pro 231 CONFIG_TETRIX noncore/games/tetrixtetrix.pro
229 CONFIG_TEXTEDIT core/apps/textedittextedit.pro 232 CONFIG_TEXTEDIT core/apps/textedittextedit.pro
230 CONFIG_THEME noncore/styles/themetheme.pro 233 CONFIG_THEME noncore/styles/themetheme.pro
231 CONFIG_TICTAC noncore/games/tictactictac.pro 234 CONFIG_TICTAC noncore/games/tictactictac.pro
232 CONFIG_TINYKATE noncore/apps/tinykatetinykate.pro 235 CONFIG_TINYKATE noncore/apps/tinykatetinykate.pro
233CONFIG_TODAY_ADDRESSBOOK core/pim/today/plugins/addressbook addressbook.pro 236CONFIG_TODAY_ADDRESSBOOK core/pim/today/plugins/addressbook addressbook.pro
234 CONFIG_TODAY core/pim/todaytoday.pro 237 CONFIG_TODAY core/pim/todaytoday.pro
235 CONFIG_TODAY_DATEBOOK core/pim/today/plugins/datebookdatebook.pro 238 CONFIG_TODAY_DATEBOOK core/pim/today/plugins/datebookdatebook.pro
236CONFIG_TODAY_EXAMPLE examples/todayplugin todayplugin.pro 239CONFIG_TODAY_EXAMPLE examples/todayplugin todayplugin.pro
237 CONFIG_TODAY_FORTUNE noncore/todayplugins/fortunefortune.pro 240 CONFIG_TODAY_FORTUNE noncore/todayplugins/fortunefortune.pro
238 CONFIG_TODAY_MAIL core/pim/today/plugins/mailmail.pro 241 CONFIG_TODAY_MAIL core/pim/today/plugins/mailmail.pro
239 CONFIG_TODAY_STOCKTICKERLIB noncore/todayplugins/stockticker/stocktickerlibstocktickerlib.pro 242 CONFIG_TODAY_STOCKTICKERLIB noncore/todayplugins/stockticker/stocktickerlibstocktickerlib.pro
240 CONFIG_TODAY_STOCKTICKER noncore/todayplugins/stockticker/stocktickerstockticker.pro 243 CONFIG_TODAY_STOCKTICKER noncore/todayplugins/stockticker/stocktickerstockticker.pro
241 CONFIG_TODAY_TODOLIST core/pim/today/plugins/todolisttodolist.pro 244 CONFIG_TODAY_TODOLIST core/pim/today/plugins/todolisttodolist.pro
242 CONFIG_TODAY_WEATHERnoncore/todayplugins/weather weather.pro 245 CONFIG_TODAY_WEATHERnoncore/todayplugins/weather weather.pro
243 CONFIG_TODO core/pim/todotodo.pro 246 CONFIG_TODO core/pim/todotodo.pro
244 CONFIG_TONLEITER noncore/multimedia/tonleitertonleiter.pro 247 CONFIG_TONLEITER noncore/multimedia/tonleitertonleiter.pro
245 CONFIG_TRACKER noncore/multimedia/trackertracker.pro 248 CONFIG_TRACKER noncore/multimedia/trackertracker.pro
246 CONFIG_UBROWSER noncore/unsupported/ubrowserubrowser.pro 249 CONFIG_UBROWSER noncore/unsupported/ubrowserubrowser.pro
247 CONFIG_UNIKEYBOARD inputmethods/unikeyboardunikeyboard.pro 250 CONFIG_UNIKEYBOARD inputmethods/unikeyboardunikeyboard.pro
248 CONFIG_USERMANAGER noncore/settings/usermanagerusermanager.pro 251 CONFIG_USERMANAGER noncore/settings/usermanagerusermanager.pro
249 CONFIG_VMEMO core/applets/vmemovmemo.pro 252 CONFIG_VMEMO core/applets/vmemovmemo.pro
250 CONFIG_VOLUMEAPPLET core/applets/volumeappletvolumeapplet.pro 253 CONFIG_VOLUMEAPPLET core/applets/volumeappletvolumeapplet.pro
251 CONFIG_VOLUMEAPPLET2 noncore/applets/volumeapplet2volumeapplet2.pro 254 CONFIG_VOLUMEAPPLET2 noncore/applets/volumeapplet2volumeapplet2.pro
252 CONFIG_VTAPPLET core/applets/vtappletvtapplet.pro 255 CONFIG_VTAPPLET core/applets/vtappletvtapplet.pro
253 CONFIG_WAVPLUGIN core/multimedia/opieplayer/wavpluginwavplugin.pro 256 CONFIG_WAVPLUGIN core/multimedia/opieplayer/wavpluginwavplugin.pro
254 CONFIG_WEBSTYLE noncore/styles/webweb.pro 257 CONFIG_WEBSTYLE noncore/styles/webweb.pro
255 CONFIG_WELLENREITER noncore/net/wellenreiterwellenreiter.pro 258 CONFIG_WELLENREITER noncore/net/wellenreiterwellenreiter.pro
256 CONFIG_WIRELESSAPPLET noncore/applets/wirelessappletwirelessapplet.pro 259 CONFIG_WIRELESSAPPLET noncore/applets/wirelessappletwirelessapplet.pro
257 CONFIG_WLAN noncore/settings/networksettings/wlanwlan.pro 260 CONFIG_WLAN noncore/settings/networksettings/wlanwlan.pro
258 CONFIG_WORDGAME noncore/games/wordgamewordgame.pro 261 CONFIG_WORDGAME noncore/games/wordgamewordgame.pro
259 CONFIG_YATZEE noncore/games/oyatzeeoyatzee.pro 262 CONFIG_YATZEE noncore/games/oyatzeeoyatzee.pro
260CONFIG_ZKBAPPLET noncore/applets/zkbapplet zkbapplet.pro 263CONFIG_ZKBAPPLET noncore/applets/zkbapplet zkbapplet.pro
261 CONFIG_ZLINES noncore/games/zlines zlines.pro 264 CONFIG_ZLINES noncore/games/zlines zlines.pro
262 CONFIG_ZSAFEnoncore/apps/zsafe zsafe.pro 265 CONFIG_ZSAFEnoncore/apps/zsafe zsafe.pro
263 CONFIG_ZSAME noncore/games/zsame zsame.pro 266 CONFIG_ZSAME noncore/games/zsame zsame.pro
264CONFIG_OPIESTUMBLER noncore/net/opiestumbler opiestumbler.pro 267CONFIG_OPIESTUMBLER noncore/net/opiestumbler opiestumbler.pro
diff --git a/pics/opie-smb/opie-smb.png b/pics/opie-smb/opie-smb.png
new file mode 100644
index 0000000..0cf5d67
--- a/dev/null
+++ b/pics/opie-smb/opie-smb.png
Binary files differ